@pisell/pisellos 3.0.93 → 3.0.95
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/dist/modules/Cart/utils/changePrice.js +16 -9
- package/dist/modules/Holder/index.d.ts +48 -0
- package/dist/modules/Holder/index.js +640 -0
- package/dist/modules/Holder/types.d.ts +123 -0
- package/dist/modules/Holder/types.js +1 -0
- package/dist/modules/Holder/utils.d.ts +13 -0
- package/dist/modules/Holder/utils.js +34 -0
- package/dist/modules/Order/index.d.ts +1 -0
- package/dist/modules/Order/index.js +18 -1
- package/dist/modules/Order/types.d.ts +2 -0
- package/dist/modules/Order/utils.d.ts +10 -0
- package/dist/modules/Order/utils.js +35 -3
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/Product/types.d.ts +7 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +2 -1
- package/dist/plugins/window.d.ts +1 -0
- package/dist/solution/BookingByStep/index.d.ts +16 -1
- package/dist/solution/BookingByStep/index.js +276 -204
- package/dist/solution/BookingByStep/types.d.ts +2 -1
- package/dist/solution/BookingByStep/types.js +3 -1
- package/dist/solution/ScanOrder/types.d.ts +1 -0
- package/dist/solution/VenueBooking/index.d.ts +19 -0
- package/dist/solution/VenueBooking/index.js +978 -748
- package/dist/solution/VenueBooking/types.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/lib/modules/Cart/utils/changePrice.js +13 -9
- package/lib/modules/Holder/index.d.ts +48 -0
- package/lib/modules/Holder/index.js +402 -0
- package/lib/modules/Holder/types.d.ts +123 -0
- package/lib/modules/Holder/types.js +17 -0
- package/lib/modules/Holder/utils.d.ts +13 -0
- package/lib/modules/Holder/utils.js +71 -0
- package/lib/modules/Order/index.d.ts +1 -0
- package/lib/modules/Order/index.js +14 -0
- package/lib/modules/Order/types.d.ts +2 -0
- package/lib/modules/Order/utils.d.ts +10 -0
- package/lib/modules/Order/utils.js +36 -5
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Product/types.d.ts +7 -0
- package/lib/modules/index.d.ts +1 -0
- package/lib/modules/index.js +3 -1
- package/lib/plugins/window.d.ts +1 -0
- package/lib/solution/BookingByStep/index.d.ts +16 -1
- package/lib/solution/BookingByStep/index.js +39 -0
- package/lib/solution/BookingByStep/types.d.ts +2 -1
- package/lib/solution/BookingByStep/types.js +5 -0
- package/lib/solution/ScanOrder/types.d.ts +1 -0
- package/lib/solution/VenueBooking/index.d.ts +19 -0
- package/lib/solution/VenueBooking/index.js +134 -16
- package/lib/solution/VenueBooking/types.d.ts +2 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductList, CartModule, ProductData, AccountModule, AccountListModule, DateModule, GuestListModule, OrderModule, PaymentModule, ResourceListModule, StepModule, SummaryModule, SalesSummaryModule, ScheduleModule, ScanOrderLoggerModule } from '../../modules';
|
|
1
|
+
import { ProductList, CartModule, ProductData, AccountModule, AccountListModule, DateModule, GuestListModule, OrderModule, PaymentModule, ResourceListModule, StepModule, SummaryModule, SalesSummaryModule, ScheduleModule, ScanOrderLoggerModule, HolderModule } from '../../modules';
|
|
2
2
|
export interface BookingByStepState {
|
|
3
3
|
cart: CartModule;
|
|
4
4
|
summary: SummaryModule;
|
|
@@ -16,6 +16,7 @@ export interface BookingByStepState {
|
|
|
16
16
|
schedule: ScheduleModule;
|
|
17
17
|
salesSummary?: SalesSummaryModule;
|
|
18
18
|
scanOrderLogger?: ScanOrderLoggerModule;
|
|
19
|
+
holder: HolderModule;
|
|
19
20
|
}
|
|
20
21
|
export declare function createModule<T extends keyof BookingByStepState>(moduleName: T, solutionName: string, name?: string, version?: string): BookingByStepState[T];
|
|
21
22
|
export declare enum BookingByStepHooks {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductList, CartModule, AccountListModule, DateModule, OrderModule, PaymentModule, StepModule, SummaryModule, SalesSummaryModule, ScheduleModule, ScanOrderLoggerModule } from "../../modules";
|
|
1
|
+
import { ProductList, CartModule, AccountListModule, DateModule, OrderModule, PaymentModule, StepModule, SummaryModule, SalesSummaryModule, ScheduleModule, ScanOrderLoggerModule, HolderModule } from "../../modules";
|
|
2
2
|
export function createModule(moduleName, solutionName, name, version) {
|
|
3
3
|
switch (moduleName) {
|
|
4
4
|
case 'cart':
|
|
@@ -23,6 +23,8 @@ export function createModule(moduleName, solutionName, name, version) {
|
|
|
23
23
|
return new ScheduleModule("".concat(solutionName, "_").concat(name || moduleName), version);
|
|
24
24
|
case 'scanOrderLogger':
|
|
25
25
|
return new ScanOrderLoggerModule("".concat(solutionName, "_").concat(name || moduleName), version);
|
|
26
|
+
case 'holder':
|
|
27
|
+
return new HolderModule("".concat(solutionName, "_").concat(name || moduleName), version);
|
|
26
28
|
default:
|
|
27
29
|
throw new Error("Unknown module type: ".concat(moduleName));
|
|
28
30
|
}
|
|
@@ -34,6 +34,7 @@ export interface ScanOrderOrderProductIdentity {
|
|
|
34
34
|
/** 参与合并/匹配;与 remove 通配语义见 isSkuOnlyDeleteIdentity */
|
|
35
35
|
product_option_item?: any[];
|
|
36
36
|
product_bundle?: any[];
|
|
37
|
+
shop_id?: number | string;
|
|
37
38
|
}
|
|
38
39
|
export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
39
40
|
order_detail_id: number | null;
|
|
@@ -7,6 +7,7 @@ import type { OpenDataAvailabilityResult } from '../../modules/OpenData';
|
|
|
7
7
|
import type { ProductData } from '../../modules/Product/types';
|
|
8
8
|
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
|
|
9
9
|
import type { StrategyConfig } from '../../model/strategy/type';
|
|
10
|
+
import type { IAppendFormRecordParams, IRefreshAllFormRecordsParams } from '../../modules/Holder/types';
|
|
10
11
|
export * from './types';
|
|
11
12
|
interface VenueBookingItemRuleRuntimeConfig {
|
|
12
13
|
strategyConfigs?: StrategyConfig[];
|
|
@@ -52,6 +53,12 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
52
53
|
constructor(name?: string, version?: string);
|
|
53
54
|
private normalizeCustomerId;
|
|
54
55
|
private resolveCustomerIdFromLoginPayload;
|
|
56
|
+
private resolveHolderCustomerId;
|
|
57
|
+
/**
|
|
58
|
+
* 按商品 holder_config 预加载表单数据到 holderMap。
|
|
59
|
+
* appointment_booking 在加购时触发;venueBooking 在商品加载后预加载,避免 getHolderFormMap 为空。
|
|
60
|
+
*/
|
|
61
|
+
private preloadHolderForms;
|
|
55
62
|
private clearLoginEffectListeners;
|
|
56
63
|
private registerLoginEffect;
|
|
57
64
|
private registerCustomerLoginListeners;
|
|
@@ -199,6 +206,18 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
199
206
|
getUIState<T = any>(key: string): T | undefined;
|
|
200
207
|
deleteUIState(key: string): void;
|
|
201
208
|
setBookingHolder(bookingUid: string, holder: any): void;
|
|
209
|
+
/**
|
|
210
|
+
* 获取 holder 表单 map
|
|
211
|
+
*/
|
|
212
|
+
getHolderFormMap(): import("../../modules/Holder").HolderFormMap;
|
|
213
|
+
/**
|
|
214
|
+
* UI 层触发:按当前 holderMap 批量刷新所有表单的 records
|
|
215
|
+
*/
|
|
216
|
+
refreshAllHolderFormRecords(params?: Pick<IRefreshAllFormRecordsParams, 'customer_id' | 'useCache' | 'recordsUrl' | 'num' | 'skip'>): Promise<import("../../modules/Holder").HolderFormMap>;
|
|
217
|
+
/**
|
|
218
|
+
* 添加表单记录
|
|
219
|
+
*/
|
|
220
|
+
appendFormRecord(params: IAppendFormRecordParams): import("../../modules/Holder").IFormRecord;
|
|
202
221
|
checkOpenDataAvailability(): Promise<OpenDataAvailabilityResult>;
|
|
203
222
|
setOtherParams(params: Record<string, any>, { cover }?: {
|
|
204
223
|
cover?: boolean;
|