@pisell/private-materials 6.11.658 → 6.11.660
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/bigSale/hooks/useSyncBigSaleCartToCds.js +44 -12
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/plus/piPaymentOld/ui/eftpos/hooks/usePaymentSessionController.d.ts +1 -1
- package/es/plus/piPaymentUI/eftpos/hooks/usePaymentSessionController.d.ts +1 -1
- package/es/plus/pisellGlobalSearch/providers/orderResultViews.d.ts +1 -1
- package/es/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +0 -1
- package/es/plus/pisellReservation/hooks/useReservationResourceWallPersist.d.ts +0 -1
- package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/es/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/es/plus/saasDevice/appDevicePlanning/hooks/useAppDeviceList.d.ts +0 -1
- package/es/plus/saasDevice/appDevicePlanning/hooks/useAppWorkAreas.d.ts +0 -1
- package/es/plus/saasDevice/appPeripheral/hooks/useConnectDeviceModal.d.ts +0 -1
- package/es/plus/saasDevice/devicePlanning/modules/workAreas/hooks/useWorkAreas.d.ts +0 -1
- package/es/plus/saleDetail/hooks/useSaleDetailBookingLineItemProps.d.ts +0 -1
- package/es/plus/saleDetail/hooks/useSaleDetailProductSelectionModal.d.ts +0 -1
- package/es/plus/saleDetail/tmpl/B/components/WalletPass/utils/format.d.ts +1 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/i18n.d.ts +1 -2
- package/es/pro/skuDetailModal/flow/modules/autoResolution.d.ts +4 -5
- package/es/pro/skuDetailModal/flow/modules/bookingPrice/index.d.ts +5 -5
- package/es/pro/skuDetailModal/flow/modules/date/index.d.ts +2 -20
- package/es/pro/skuDetailModal/flow/modules/holder/index.d.ts +1 -2
- package/es/pro/skuDetailModal/flow/modules/price/index.d.ts +2 -2
- package/es/pro/skuDetailModal/flow/modules/resource/index.d.ts +1 -2
- package/es/pro/skuDetailModal/flow/modules/resource/model.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/modules/resource/policy.d.ts +1 -2
- package/es/pro/skuDetailModal/flow/modules/shared/index.d.ts +5 -6
- package/es/pro/skuDetailModal/flow/modules/sku/index.d.ts +1 -2
- package/es/pro/skuDetailModal/flow/modules/time/index.d.ts +4 -5
- package/es/pro/skuDetailModal/flow/presets.d.ts +5 -5
- package/es/pro/skuDetailModal/flow/registry.d.ts +19 -54
- package/lib/components/bigSale/hooks/useSyncBigSaleCartToCds.js +54 -19
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/plus/piPaymentOld/ui/eftpos/hooks/usePaymentSessionController.d.ts +1 -1
- package/lib/plus/piPaymentUI/eftpos/hooks/usePaymentSessionController.d.ts +1 -1
- package/lib/plus/pisellGlobalSearch/providers/orderResultViews.d.ts +1 -1
- package/lib/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +0 -1
- package/lib/plus/pisellReservation/hooks/useReservationResourceWallPersist.d.ts +0 -1
- package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/lib/plus/saasDevice/appDevicePlanning/hooks/useAppDeviceList.d.ts +0 -1
- package/lib/plus/saasDevice/appDevicePlanning/hooks/useAppWorkAreas.d.ts +0 -1
- package/lib/plus/saasDevice/appPeripheral/hooks/useConnectDeviceModal.d.ts +0 -1
- package/lib/plus/saasDevice/devicePlanning/modules/workAreas/hooks/useWorkAreas.d.ts +0 -1
- package/lib/plus/saleDetail/hooks/useSaleDetailBookingLineItemProps.d.ts +0 -1
- package/lib/plus/saleDetail/hooks/useSaleDetailProductSelectionModal.d.ts +0 -1
- package/lib/plus/saleDetail/tmpl/B/components/WalletPass/utils/format.d.ts +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lib/pro/skuDetailModal/flow/i18n.d.ts +1 -2
- package/lib/pro/skuDetailModal/flow/modules/autoResolution.d.ts +4 -5
- package/lib/pro/skuDetailModal/flow/modules/bookingPrice/index.d.ts +5 -5
- package/lib/pro/skuDetailModal/flow/modules/date/index.d.ts +2 -20
- package/lib/pro/skuDetailModal/flow/modules/holder/index.d.ts +1 -2
- package/lib/pro/skuDetailModal/flow/modules/price/index.d.ts +2 -2
- package/lib/pro/skuDetailModal/flow/modules/resource/index.d.ts +1 -2
- package/lib/pro/skuDetailModal/flow/modules/resource/model.d.ts +1 -1
- package/lib/pro/skuDetailModal/flow/modules/resource/policy.d.ts +1 -2
- package/lib/pro/skuDetailModal/flow/modules/shared/index.d.ts +5 -6
- package/lib/pro/skuDetailModal/flow/modules/sku/index.d.ts +1 -2
- package/lib/pro/skuDetailModal/flow/modules/time/index.d.ts +4 -5
- package/lib/pro/skuDetailModal/flow/presets.d.ts +5 -5
- package/lib/pro/skuDetailModal/flow/registry.d.ts +19 -54
- package/package.json +3 -3
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Duration: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Duration;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const MemberPrice: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true | React.
|
|
6
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
7
7
|
export default MemberPrice;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Resource: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Resource;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Stock: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Stock;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Time: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Time;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { CreateDeviceConnectionPayload, DeviceBrandItem, DeviceConnectionType, DeviceItem, DeviceModelItem, DeviceStructure, I18nText, LangDict, WorkAreaItem } from '../types';
|
|
3
2
|
export declare type ConnectMode = 'existing' | 'new';
|
|
4
3
|
export declare type ConnectStep = 'pick' | 'config';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { SalesSdkBookingContextValue, SalesSdkCartContextValue, SalesSdkCustomerContextValue, SalesSdkContextValue } from '../salesSdk';
|
|
3
2
|
import type { CartItemsInteractionPolicy } from '../components/CartItems';
|
|
4
3
|
import type { LineItemProps } from '../components/LineItem/types';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type UsePromotionModalOptions } from '../../../components/shoppingCart/hooks/usePromotionModal';
|
|
3
2
|
import type { SalesSdkContextValue } from '../../salesSdk';
|
|
4
3
|
export interface UseSaleDetailProductSelectionModalOptions extends Pick<UsePromotionModalOptions, 'onConfirm' | 'onCancel'> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WalletPassAmountUnit, WalletPassStatus } from './types';
|
|
2
2
|
export declare const DEFAULT_SYMBOL = "$";
|
|
3
3
|
export declare function formatMoney(amount: number, symbol?: string): string;
|
|
4
|
-
export declare function getUsageLabel(status: WalletPassStatus, locale: 'en' | 'zh'): "
|
|
4
|
+
export declare function getUsageLabel(status: WalletPassStatus, locale: 'en' | 'zh'): "Unused" | "Used" | "未使用" | "已使用";
|
|
5
5
|
export declare function getUsageValue(amount: number, unit: WalletPassAmountUnit, symbol: string, locale: 'en' | 'zh'): string;
|
|
6
6
|
export declare function formatBalanceText(amount: number | null, unit: WalletPassAmountUnit, symbol: string, locale: 'en' | 'zh', remainingUses?: number | null): string;
|
|
7
7
|
export declare function maskPassId(value: string): string;
|
|
@@ -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 | 8000 | 4000;
|
|
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?: "multiple" | "single" | undefined;
|
|
7
7
|
itemLayout?: ItemLayout | undefined;
|
|
8
8
|
valueType?: "object" | "primitive" | undefined;
|
|
9
9
|
variant?: SelectorVariant | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { SelectionFlowCompileIssue, SelectionFlowMessageCode, SelectionFlowRuntimeIssue } from '@pisell/materials';
|
|
3
2
|
/**
|
|
4
3
|
* Selection Flow 的配置既允许业务方传入普通文案,也允许内置预设传入语言 key。
|
|
5
4
|
* 只解析 pisell2 命名空间,避免把商品名、资源名等接口返回文案误当成语言 key。
|
|
@@ -12,6 +11,6 @@ export declare const selectionFlowTextWithArgs: (key: string, ...args: unknown[]
|
|
|
12
11
|
/** 将原子 Flow 的稳定消息码映射回现有 SKU Detail 多语言键。 */
|
|
13
12
|
export declare const translateSelectionFlowMessage: (code: SelectionFlowMessageCode, params?: Readonly<Record<string, unknown>>) => string;
|
|
14
13
|
/** 私有展示层负责把原子状态机的结构化原因转换成当前语言文案。 */
|
|
15
|
-
export declare const resolveSelectionFlowRuntimeIssue: (issue?:
|
|
14
|
+
export declare const resolveSelectionFlowRuntimeIssue: (issue?: any) => string | undefined;
|
|
16
15
|
/** 编译器保留英文诊断详情,界面使用当前语言的业务提示。 */
|
|
17
16
|
export declare const renderSelectionFlowCompileIssue: (issue: SelectionFlowCompileIssue) => ReactNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SelectionFlowContextValue } from '../types';
|
|
2
1
|
interface AutoResolutionModule {
|
|
3
2
|
key: string;
|
|
4
3
|
type: string;
|
|
@@ -6,13 +5,13 @@ interface AutoResolutionModule {
|
|
|
6
5
|
}
|
|
7
6
|
export declare const findFirstNormallyAvailableDate: <T extends {
|
|
8
7
|
date: string;
|
|
9
|
-
status?: "available" | "
|
|
8
|
+
status?: "available" | "unavailable" | "full" | "limited" | "conflict" | "past" | undefined;
|
|
10
9
|
remainingCapacity?: number | undefined;
|
|
11
10
|
maxCapacity?: number | undefined;
|
|
12
11
|
}>(items: readonly T[]) => T | undefined;
|
|
13
|
-
export declare const validateAvailabilityDateAutoResolution: (context:
|
|
14
|
-
export declare const validateAvailabilityTimeAutoResolution: (context:
|
|
15
|
-
export declare const validateAvailabilityResourceAutoResolution: (context:
|
|
12
|
+
export declare const validateAvailabilityDateAutoResolution: (context: AtomicSelectionFlowContextValue<import("../types").SelectionFlowDraft, import("../types").SelectionFlowDraftUpdate, import("../types").SelectionDraftField, TType, import("../types").SelectionFlowServices, unknown>, module: AutoResolutionModule) => any;
|
|
13
|
+
export declare const validateAvailabilityTimeAutoResolution: (context: AtomicSelectionFlowContextValue<import("../types").SelectionFlowDraft, import("../types").SelectionFlowDraftUpdate, import("../types").SelectionDraftField, TType, import("../types").SelectionFlowServices, unknown>, module: AutoResolutionModule) => any;
|
|
14
|
+
export declare const validateAvailabilityResourceAutoResolution: (context: AtomicSelectionFlowContextValue<import("../types").SelectionFlowDraft, import("../types").SelectionFlowDraftUpdate, import("../types").SelectionDraftField, TType, import("../types").SelectionFlowServices, unknown>, module: AutoResolutionModule) => any;
|
|
16
15
|
export declare const isCapacityAutoResolved: (capacityConfig: any, value: unknown) => boolean;
|
|
17
16
|
export declare const getDefaultCustomCapacitySelection: (capacityConfig: any) => any;
|
|
18
17
|
export declare const isHolderAutoResolved: ({ required, holderIds, quantity, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FlowModuleProps, SelectionFlowBookingPriceQuote, SelectionFlowBookingPriceRequest, SelectionFlowBookingPriceService
|
|
2
|
+
import type { FlowModuleProps, SelectionFlowBookingPriceQuote, SelectionFlowBookingPriceRequest, SelectionFlowBookingPriceService } from '../../types';
|
|
3
3
|
interface BookingPriceModuleCache {
|
|
4
4
|
entries: Map<string, Promise<SelectionFlowBookingPriceQuote>>;
|
|
5
5
|
}
|
|
@@ -8,7 +8,7 @@ interface BookingPriceModuleCache {
|
|
|
8
8
|
* 初始订单行快照也进入同一缓存,因此编辑切回原时段不会产生价格漂移。
|
|
9
9
|
*/
|
|
10
10
|
export declare const loadSelectionFlowBookingPrice: (cache: BookingPriceModuleCache, service: SelectionFlowBookingPriceService, request: SelectionFlowBookingPriceRequest, requestKey?: string) => Promise<SelectionFlowBookingPriceQuote>;
|
|
11
|
-
export declare const refreshSelectionFlowBookingPrice: (context:
|
|
11
|
+
export declare const refreshSelectionFlowBookingPrice: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, module: AtomicCompiledSelectionFlowModuleConfig<TType_1>) => Promise<void>;
|
|
12
12
|
export declare const bookingPriceFlowModule: {
|
|
13
13
|
type: string;
|
|
14
14
|
Component: React.FC<FlowModuleProps<string>>;
|
|
@@ -17,10 +17,10 @@ export declare const bookingPriceFlowModule: {
|
|
|
17
17
|
refreshOn: string[];
|
|
18
18
|
isApplicable: (context: any) => boolean;
|
|
19
19
|
canInitialize: (context: any) => boolean;
|
|
20
|
-
refresh: (context:
|
|
21
|
-
shouldRefresh: (_context: any, change: any) =>
|
|
20
|
+
refresh: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, module: AtomicCompiledSelectionFlowModuleConfig<TType_1>) => Promise<void>;
|
|
21
|
+
shouldRefresh: (_context: any, change: any) => any;
|
|
22
22
|
clearDependencies: (context: any, change: any, module: any) => void;
|
|
23
23
|
validate: (context: any, handle: any) => any;
|
|
24
|
-
validateAutoResolution: (context:
|
|
24
|
+
validateAutoResolution: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>) => boolean;
|
|
25
25
|
}, satisfies: any, SelectionFlowModuleAdapter: any;
|
|
26
26
|
export {};
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { FlowModuleProps, SelectionFlowModuleAdapter } from '../../types';
|
|
1
|
+
import type { SelectionFlowModuleAdapter } from '../../types';
|
|
3
2
|
export declare const dateFlowModule: SelectionFlowModuleAdapter, satisfies: any, SelectionFlowModuleAdapter: any;
|
|
4
3
|
/**
|
|
5
4
|
* 跨日日期范围适配器复用同一个 Date module 组件,只扩展依赖声明:
|
|
6
5
|
* range 选择完成后会同时提供开始日期、结束日期和按天计算的 duration。
|
|
7
6
|
*/
|
|
8
|
-
export declare const multiDayDateFlowModule:
|
|
9
|
-
type: string;
|
|
10
|
-
validateAutoResolution: undefined;
|
|
11
|
-
provides: string[];
|
|
12
|
-
initializeWhileInactive?: boolean | undefined;
|
|
13
|
-
hardRequires?: readonly import("../../types").SelectionDraftField[] | undefined;
|
|
14
|
-
refreshOn?: readonly import("../../types").SelectionDraftField[] | undefined;
|
|
15
|
-
shouldRefresh?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("../../types").SelectionFlowDraft, import("../../types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean) | undefined;
|
|
16
|
-
isApplicable?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean) | undefined;
|
|
17
|
-
canInitialize?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean | Promise<boolean>) | undefined;
|
|
18
|
-
refresh?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
19
|
-
reconcile?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("../../types").SelectionFlowDraft, import("../../types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
20
|
-
clearDependencies?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("../../types").SelectionFlowDraft, import("../../types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
21
|
-
validate?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, handle: import("@pisell/materials").FlowModuleHandle | null, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => import("@pisell/materials").FlowModuleValidationReturn) | undefined;
|
|
22
|
-
beforeLeave?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, string, import("../../types").SelectionFlowServices, unknown>, handle: import("@pisell/materials").FlowModuleHandle | null, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => import("@pisell/materials").FlowModuleBeforeLeaveReturn) | undefined;
|
|
23
|
-
Component: React.ComponentType<FlowModuleProps<string>>;
|
|
24
|
-
rendersOwnError?: boolean | undefined;
|
|
25
|
-
}, satisfies: any, SelectionFlowModuleAdapter: any;
|
|
7
|
+
export declare const multiDayDateFlowModule: any, satisfies: any, SelectionFlowModuleAdapter: any;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const holderFlowModule: SelectionFlowModuleAdapter<string>;
|
|
1
|
+
export declare const holderFlowModule: any;
|
|
@@ -5,8 +5,8 @@ import type { FlowModuleProps } from '../../types';
|
|
|
5
5
|
* 使用同一个 getProductTotalPrice 规则计算变体、套餐、option 和称重价格。
|
|
6
6
|
* 计算自动价格时必须移除旧 priceOverride,否则覆盖价会遮住 SKU 新价格。
|
|
7
7
|
*/
|
|
8
|
-
export declare const resolveAutomaticSelectionPrice: (context:
|
|
9
|
-
export declare const resolveSelectionFlowPriceValues: (context:
|
|
8
|
+
export declare const resolveAutomaticSelectionPrice: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>) => number;
|
|
9
|
+
export declare const resolveSelectionFlowPriceValues: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>) => {
|
|
10
10
|
value: number;
|
|
11
11
|
originalValue: number;
|
|
12
12
|
};
|
|
@@ -56,7 +56,7 @@ export declare const NO_RESOURCE_TEXT_KEY = "pisell2.text.sku.detail.modal.resou
|
|
|
56
56
|
export declare const RESOURCE_REFRESH_FIELDS: readonly ["productData", "quantity", "booking.startDate", "booking.endDate", "booking.startTime", "booking.endTime", "booking.duration", "booking.capacity", "booking.selectedCandidate"];
|
|
57
57
|
export declare const nextResourceRequestId: () => number;
|
|
58
58
|
/** Availability 资源选择转换为旧 BookingContext 使用的 resource map。 */
|
|
59
|
-
export declare const buildLegacyResourceMap: (groups: NonNullable<ResourceModuleData['availabilityRange']>['requirementGroups'], selections: NonNullable<SelectionFlowContextValue<string>['draft']['booking']['requirementSelections']>, existingResource?: unknown) =>
|
|
59
|
+
export declare const buildLegacyResourceMap: (groups: NonNullable<ResourceModuleData['availabilityRange']>['requirementGroups'], selections: NonNullable<SelectionFlowContextValue<string>['draft']['booking']['requirementSelections']>, existingResource?: unknown) => any;
|
|
60
60
|
export declare const collectExistingResourceIds: (value: unknown) => Array<number | string>;
|
|
61
61
|
/** relation_id=0 要按 form_id 恢复,因为多个资源组共享占位 ID。 */
|
|
62
62
|
export declare const collectNoResourceFormIds: (value: unknown) => string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SelectionFlowContextValue } from '../../types';
|
|
2
1
|
import type { ResourceModuleData } from './model';
|
|
3
2
|
interface SelectedResourcePolicy {
|
|
4
3
|
policyId: number | string;
|
|
@@ -8,5 +7,5 @@ interface SelectedResourcePolicy {
|
|
|
8
7
|
* 收集当前真正选中的资源协议:兼容旧 Booking renderItem 和 UBS
|
|
9
8
|
* Availability option,并按协议 ID 去重。
|
|
10
9
|
*/
|
|
11
|
-
export declare const collectSelectedResourcePolicies: (context:
|
|
10
|
+
export declare const collectSelectedResourcePolicies: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, data?: ResourceModuleData) => SelectedResourcePolicy[];
|
|
12
11
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { FlowModuleProps, SelectionFlowContextValue } from '../../types';
|
|
2
1
|
export declare type ModuleOptions = Readonly<Record<string, unknown>>;
|
|
3
|
-
export declare const getModuleOptions: (module:
|
|
2
|
+
export declare const getModuleOptions: (module: AtomicCompiledSelectionFlowModuleConfig<TType>) => ModuleOptions;
|
|
4
3
|
export declare const hasSkuSelectionOptions: (productData: unknown) => boolean;
|
|
5
4
|
/** 商品根级或任一规格启用了按重量销售。 */
|
|
6
5
|
export declare const hasWeighingSelection: (productData: unknown) => boolean;
|
|
@@ -19,21 +18,21 @@ export declare const isSameSkuSelection: (left: unknown, right: unknown) => bool
|
|
|
19
18
|
* 将组件层 Draft 合并成现有预约子组件可读取的 cacheItem 形状。
|
|
20
19
|
* 这里只做选择态字段映射,不生成购物车或订单数据。
|
|
21
20
|
*/
|
|
22
|
-
export declare const buildDraftCacheItem: (context:
|
|
21
|
+
export declare const buildDraftCacheItem: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, source?: unknown) => any;
|
|
23
22
|
/**
|
|
24
23
|
* 对齐旧 addService/editService:SKU(尤其套餐)变化后,以最新选择重新生成
|
|
25
24
|
* capacity。package capacity 直接来自参与人数统计的套餐子商品 quantity;
|
|
26
25
|
* custom/无配置继续沿用 setDefaultCapacitys 的既有默认规则。
|
|
27
26
|
*/
|
|
28
|
-
export declare const resolveSelectionFlowCapacityForSku: (context:
|
|
27
|
+
export declare const resolveSelectionFlowCapacityForSku: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, skuValue: Readonly<Record<string, unknown>>) => any[];
|
|
29
28
|
/**
|
|
30
29
|
* 单份预约的 Guests:capacity 各项之和。
|
|
31
30
|
* UBS commit 会另外接收 bookingCount,因此这里不能再乘商品数量;否则多份
|
|
32
31
|
* 预约会同时放大 partySize 和 bookingCount,造成容量被重复计算。
|
|
33
32
|
*/
|
|
34
|
-
export declare const resolveSelectionFlowPartySize: (draft:
|
|
33
|
+
export declare const resolveSelectionFlowPartySize: (draft: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, fallback?: number) => number;
|
|
35
34
|
/**
|
|
36
35
|
* Availability 查询没有独立 bookingCount 参数,需要用总 Guests 提前过滤
|
|
37
36
|
* 日期、时间和资源;真正 commit 时则使用上面的单份 partySize + bookingCount。
|
|
38
37
|
*/
|
|
39
|
-
export declare const resolveSelectionFlowQueryPartySize: (draft:
|
|
38
|
+
export declare const resolveSelectionFlowQueryPartySize: (draft: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, fallback?: number) => number;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const skuFlowModule: SelectionFlowModuleAdapter<string>;
|
|
1
|
+
export declare const skuFlowModule: any;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { SelectionFlowContextValue, SelectionFlowModuleAdapter } from '../../types';
|
|
1
|
+
import type { SelectionFlowModuleAdapter } from '../../types';
|
|
3
2
|
/**
|
|
4
3
|
* 把现有商品/缓存中的 duration 收敛为 Flow Draft 的可控值。
|
|
5
4
|
* 普通预约统一使用分钟;跨日预约保留天数标量。
|
|
6
5
|
*/
|
|
7
6
|
export declare const normalizeSelectionDuration: (duration: unknown) => number | string | null;
|
|
8
|
-
export declare const deriveTimeBooking: (context:
|
|
7
|
+
export declare const deriveTimeBooking: (context: AtomicSelectionFlowContextValue<import("../../types").SelectionFlowDraft, import("../../types").SelectionFlowDraftUpdate, import("../../types").SelectionDraftField, TType, import("../../types").SelectionFlowServices, unknown>, startTime: string | null, duration: number | string | null) => {
|
|
9
8
|
duration: string | number | null;
|
|
10
|
-
startDate:
|
|
11
|
-
endDate:
|
|
9
|
+
startDate: any;
|
|
10
|
+
endDate: any;
|
|
12
11
|
endTime: string | null;
|
|
13
12
|
};
|
|
14
13
|
export declare const timeFlowModule: SelectionFlowModuleAdapter;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ResolveSelectionFlowSteps,
|
|
1
|
+
import type { ResolveSelectionFlowSteps, SelectionFlowStepConfig } from './types';
|
|
2
2
|
/** 普通商品只展示其真实存在的规格与称重能力。 */
|
|
3
3
|
export declare const resolveNormalProductSelectionFlowSteps: ResolveSelectionFlowSteps;
|
|
4
4
|
/** 用户端:每项选择能力独立成一步。 */
|
|
5
5
|
export declare const customerSteps: readonly SelectionFlowStepConfig[];
|
|
6
6
|
/** POS:先完成日期与 SKU,再合并其余预约模块。 */
|
|
7
|
-
export declare const posSteps: readonly
|
|
7
|
+
export declare const posSteps: readonly AtomicSelectionFlowStepConfig<TType>[];
|
|
8
8
|
/**
|
|
9
9
|
* 统一预约交互:先选 SKU,再在同一步联动日期与时间,
|
|
10
10
|
* 最后分别选择资源和 Holder。Kiosk 与 POS 预约模板共享这一组步骤。
|
|
@@ -14,7 +14,7 @@ export declare const posSteps: readonly SelectionFlowStepConfig<SelectionModuleT
|
|
|
14
14
|
* 该日期应由当前销售页业务日期(新增)或购物车预约行的 start_date(编辑)
|
|
15
15
|
* 预先写入 Flow Draft,不能因为界面隐藏日期就把日期上下文一起删除。
|
|
16
16
|
*/
|
|
17
|
-
export declare const bookingSelectionFlowSteps: readonly
|
|
17
|
+
export declare const bookingSelectionFlowSteps: readonly AtomicSelectionFlowStepConfig<TType>[];
|
|
18
18
|
/**
|
|
19
19
|
* POS 旧服务抽屉对应的手动预约流程。
|
|
20
20
|
*
|
|
@@ -89,7 +89,7 @@ export declare const resolveBookingSelectionFlowSteps: ResolveSelectionFlowSteps
|
|
|
89
89
|
*/
|
|
90
90
|
export declare const resolveKioskBookingSelectionFlowSteps: ResolveSelectionFlowSteps;
|
|
91
91
|
export declare const selectionFlowPresets: {
|
|
92
|
-
readonly customer: readonly
|
|
93
|
-
readonly pos: readonly
|
|
92
|
+
readonly customer: readonly AtomicSelectionFlowStepConfig<TType>[];
|
|
93
|
+
readonly pos: readonly AtomicSelectionFlowStepConfig<TType>[];
|
|
94
94
|
};
|
|
95
95
|
export declare type SelectionFlowPresetName = keyof typeof selectionFlowPresets;
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { SelectionFlowModuleAdapter } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* 第一期使用静态注册表,模块 key 同时作为 SelectionModuleType 的类型来源。
|
|
5
4
|
* 新类型只需实现适配器并在此增加一项,不提供运行时 register API。
|
|
6
5
|
*/
|
|
7
6
|
export declare const flowModuleRegistry: {
|
|
8
|
-
readonly sku:
|
|
9
|
-
readonly date:
|
|
10
|
-
readonly multiDayDate:
|
|
11
|
-
|
|
12
|
-
validateAutoResolution: undefined;
|
|
13
|
-
provides: string[];
|
|
14
|
-
initializeWhileInactive?: boolean | undefined;
|
|
15
|
-
hardRequires?: readonly import("./types").SelectionDraftField[] | undefined;
|
|
16
|
-
refreshOn?: readonly import("./types").SelectionDraftField[] | undefined;
|
|
17
|
-
shouldRefresh?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("./types").SelectionFlowDraft, import("./types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean) | undefined;
|
|
18
|
-
isApplicable?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean) | undefined;
|
|
19
|
-
canInitialize?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean | Promise<boolean>) | undefined;
|
|
20
|
-
refresh?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
21
|
-
reconcile?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("./types").SelectionFlowDraft, import("./types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
22
|
-
clearDependencies?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("./types").SelectionFlowDraft, import("./types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
23
|
-
validate?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, handle: import("@pisell/materials").FlowModuleHandle | null, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => import("@pisell/materials").FlowModuleValidationReturn) | undefined;
|
|
24
|
-
beforeLeave?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, handle: import("@pisell/materials").FlowModuleHandle | null, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => import("@pisell/materials").FlowModuleBeforeLeaveReturn) | undefined;
|
|
25
|
-
Component: import("react").ComponentType<import("./types").FlowModuleProps<string>>;
|
|
26
|
-
rendersOwnError?: boolean | undefined;
|
|
27
|
-
};
|
|
28
|
-
readonly time: SelectionFlowModuleAdapter<string>;
|
|
7
|
+
readonly sku: any;
|
|
8
|
+
readonly date: any;
|
|
9
|
+
readonly multiDayDate: any;
|
|
10
|
+
readonly time: any;
|
|
29
11
|
readonly bookingPrice: {
|
|
30
12
|
type: string;
|
|
31
13
|
Component: import("react").FC<import("./types").FlowModuleProps<string>>;
|
|
@@ -34,11 +16,11 @@ export declare const flowModuleRegistry: {
|
|
|
34
16
|
refreshOn: string[];
|
|
35
17
|
isApplicable: (context: any) => boolean;
|
|
36
18
|
canInitialize: (context: any) => boolean;
|
|
37
|
-
refresh: (context: import("./types").
|
|
38
|
-
shouldRefresh: (_context: any, change: any) =>
|
|
19
|
+
refresh: (context: AtomicSelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, TType, import("./types").SelectionFlowServices, unknown>, module: AtomicCompiledSelectionFlowModuleConfig<TType_1>) => Promise<void>;
|
|
20
|
+
shouldRefresh: (_context: any, change: any) => any;
|
|
39
21
|
clearDependencies: (context: any, change: any, module: any) => void;
|
|
40
22
|
validate: (context: any, handle: any) => any;
|
|
41
|
-
validateAutoResolution: (context: import("./types").
|
|
23
|
+
validateAutoResolution: (context: AtomicSelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, TType, import("./types").SelectionFlowServices, unknown>) => boolean;
|
|
42
24
|
};
|
|
43
25
|
readonly capacity: {
|
|
44
26
|
type: string;
|
|
@@ -52,8 +34,8 @@ export declare const flowModuleRegistry: {
|
|
|
52
34
|
validate: (context: any, handle: any) => any;
|
|
53
35
|
validateAutoResolution: (context: any) => boolean;
|
|
54
36
|
};
|
|
55
|
-
readonly resource:
|
|
56
|
-
readonly holder:
|
|
37
|
+
readonly resource: any;
|
|
38
|
+
readonly holder: any;
|
|
57
39
|
readonly price: {
|
|
58
40
|
type: string;
|
|
59
41
|
Component: import("react").FC<import("./types").FlowModuleProps<string>>;
|
|
@@ -75,28 +57,11 @@ export declare const flowModuleRegistry: {
|
|
|
75
57
|
};
|
|
76
58
|
}, satisfies: any, Record: any;
|
|
77
59
|
export declare type RegisteredSelectionModuleType = keyof typeof flowModuleRegistry;
|
|
78
|
-
export declare const getFlowModuleAdapter: <TType extends "
|
|
79
|
-
readonly sku:
|
|
80
|
-
readonly date:
|
|
81
|
-
readonly multiDayDate:
|
|
82
|
-
|
|
83
|
-
validateAutoResolution: undefined;
|
|
84
|
-
provides: string[];
|
|
85
|
-
initializeWhileInactive?: boolean | undefined;
|
|
86
|
-
hardRequires?: readonly import("./types").SelectionDraftField[] | undefined;
|
|
87
|
-
refreshOn?: readonly import("./types").SelectionDraftField[] | undefined;
|
|
88
|
-
shouldRefresh?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("./types").SelectionFlowDraft, import("./types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean) | undefined;
|
|
89
|
-
isApplicable?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean) | undefined;
|
|
90
|
-
canInitialize?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => boolean | Promise<boolean>) | undefined;
|
|
91
|
-
refresh?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
92
|
-
reconcile?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("./types").SelectionFlowDraft, import("./types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
93
|
-
clearDependencies?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, change: import("@pisell/materials").SelectionFlowDraftChange<import("./types").SelectionFlowDraft, import("./types").SelectionDraftField, string>, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => void | Promise<void>) | undefined;
|
|
94
|
-
validate?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, handle: import("@pisell/materials").FlowModuleHandle | null, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => import("@pisell/materials").FlowModuleValidationReturn) | undefined;
|
|
95
|
-
beforeLeave?: ((context: import("@pisell/materials").SelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, string, import("./types").SelectionFlowServices, unknown>, handle: import("@pisell/materials").FlowModuleHandle | null, module: import("@pisell/materials").CompiledSelectionFlowModuleConfig<string>) => import("@pisell/materials").FlowModuleBeforeLeaveReturn) | undefined;
|
|
96
|
-
Component: import("react").ComponentType<import("./types").FlowModuleProps<string>>;
|
|
97
|
-
rendersOwnError?: boolean | undefined;
|
|
98
|
-
};
|
|
99
|
-
readonly time: SelectionFlowModuleAdapter<string>;
|
|
60
|
+
export declare const getFlowModuleAdapter: <TType extends "time" | "resource" | "holder" | "price" | "date" | "weighing" | "bookingPrice" | "multiDayDate" | "capacity" | "sku">(type: TType) => {
|
|
61
|
+
readonly sku: any;
|
|
62
|
+
readonly date: any;
|
|
63
|
+
readonly multiDayDate: any;
|
|
64
|
+
readonly time: any;
|
|
100
65
|
readonly bookingPrice: {
|
|
101
66
|
type: string;
|
|
102
67
|
Component: import("react").FC<import("./types").FlowModuleProps<string>>;
|
|
@@ -105,11 +70,11 @@ export declare const getFlowModuleAdapter: <TType extends "weighing" | "bookingP
|
|
|
105
70
|
refreshOn: string[];
|
|
106
71
|
isApplicable: (context: any) => boolean;
|
|
107
72
|
canInitialize: (context: any) => boolean;
|
|
108
|
-
refresh: (context: import("./types").
|
|
109
|
-
shouldRefresh: (_context: any, change: any) =>
|
|
73
|
+
refresh: (context: AtomicSelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, TType, import("./types").SelectionFlowServices, unknown>, module: AtomicCompiledSelectionFlowModuleConfig<TType_1>) => Promise<void>;
|
|
74
|
+
shouldRefresh: (_context: any, change: any) => any;
|
|
110
75
|
clearDependencies: (context: any, change: any, module: any) => void;
|
|
111
76
|
validate: (context: any, handle: any) => any;
|
|
112
|
-
validateAutoResolution: (context: import("./types").
|
|
77
|
+
validateAutoResolution: (context: AtomicSelectionFlowContextValue<import("./types").SelectionFlowDraft, import("./types").SelectionFlowDraftUpdate, import("./types").SelectionDraftField, TType, import("./types").SelectionFlowServices, unknown>) => boolean;
|
|
113
78
|
};
|
|
114
79
|
readonly capacity: {
|
|
115
80
|
type: string;
|
|
@@ -123,8 +88,8 @@ export declare const getFlowModuleAdapter: <TType extends "weighing" | "bookingP
|
|
|
123
88
|
validate: (context: any, handle: any) => any;
|
|
124
89
|
validateAutoResolution: (context: any) => boolean;
|
|
125
90
|
};
|
|
126
|
-
readonly resource:
|
|
127
|
-
readonly holder:
|
|
91
|
+
readonly resource: any;
|
|
92
|
+
readonly holder: any;
|
|
128
93
|
readonly price: {
|
|
129
94
|
type: string;
|
|
130
95
|
Component: import("react").FC<import("./types").FlowModuleProps<string>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.660",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"styled-components": "^6.0.0-rc.3",
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/pi-payment-sdk": "0.0.3",
|
|
73
|
-
"@pisell/
|
|
73
|
+
"@pisell/date-picker": "3.0.10",
|
|
74
74
|
"@pisell/utils": "3.0.4",
|
|
75
75
|
"@pisell/icon": "0.0.11",
|
|
76
|
-
"@pisell/
|
|
76
|
+
"@pisell/materials": "6.11.256"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|