@pisell/pisellos 2.3.50 → 2.3.53
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/BookingContext/utils/buildCacheItemFromOrderLine.js +12 -10
- package/dist/modules/Discount/index.d.ts +0 -1
- package/dist/modules/Discount/index.js +11 -40
- package/dist/modules/Discount/types.d.ts +0 -1
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +6 -8
- package/dist/modules/Order/index.js +165 -140
- package/dist/modules/Order/types.d.ts +21 -12
- package/dist/modules/Order/types.js +11 -0
- package/dist/modules/Order/utils.d.ts +0 -10
- package/dist/modules/Order/utils.js +3 -35
- package/dist/modules/Payment/types.d.ts +8 -0
- package/dist/modules/Payment/walletpass.d.ts +7 -1
- package/dist/modules/Payment/walletpass.js +155 -45
- package/dist/modules/Product/types.d.ts +0 -1
- package/dist/modules/ProductList/index.js +14 -33
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/Rules/index.js +32 -56
- package/dist/modules/SalesSummary/index.js +13 -12
- package/dist/modules/SalesSummary/utils.js +7 -1
- package/dist/modules/ScanOrderLogger/index.d.ts +0 -2
- package/dist/modules/ScanOrderLogger/index.js +2 -15
- package/dist/modules/ScanOrderLogger/providers/feishu.js +27 -45
- package/dist/modules/ScanOrderLogger/types.d.ts +0 -1
- package/dist/modules/Schedule/index.d.ts +1 -3
- package/dist/modules/Schedule/index.js +16 -21
- package/dist/modules/Summary/utils.js +13 -38
- package/dist/modules/index.d.ts +0 -2
- package/dist/modules/index.js +1 -3
- package/dist/plugins/window.d.ts +0 -1
- package/dist/server/index.d.ts +0 -14
- package/dist/server/index.js +793 -907
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +16 -0
- package/dist/server/modules/order/index.js +964 -776
- package/dist/server/modules/order/types.d.ts +14 -0
- package/dist/server/modules/order/types.js +6 -0
- package/dist/solution/BaseSales/index.d.ts +18 -13
- package/dist/solution/BaseSales/index.js +202 -178
- package/dist/solution/BaseSales/utils/cartPromotion.js +5 -3
- package/dist/solution/BookingByStep/index.d.ts +2 -17
- package/dist/solution/BookingByStep/index.js +215 -294
- package/dist/solution/BookingByStep/types.d.ts +1 -2
- package/dist/solution/BookingByStep/types.js +1 -3
- package/dist/solution/BookingByStep/utils/capacity.js +1 -17
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
- package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
- package/dist/solution/BookingTicket/index.d.ts +1 -13
- package/dist/solution/BookingTicket/index.js +2 -2
- package/dist/solution/BookingTicket/types.d.ts +3 -0
- package/dist/solution/BookingTicket/utils/cartView.js +44 -32
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -10
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +16 -2
- package/dist/solution/ScanOrder/index.d.ts +14 -26
- package/dist/solution/ScanOrder/index.js +739 -1142
- package/dist/solution/ScanOrder/types.d.ts +1 -21
- package/dist/solution/ScanOrder/utils.d.ts +0 -8
- package/dist/solution/ScanOrder/utils.js +25 -66
- package/dist/solution/ShopDiscount/index.d.ts +0 -1
- package/dist/solution/ShopDiscount/index.js +87 -125
- package/dist/solution/VenueBooking/index.d.ts +11 -39
- package/dist/solution/VenueBooking/index.js +841 -1167
- package/dist/solution/VenueBooking/types.d.ts +0 -3
- package/dist/solution/VenueBooking/utils/resource.js +0 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +5 -10
- package/dist/solution/index.d.ts +0 -1
- package/dist/solution/index.js +1 -2
- package/dist/types/index.d.ts +0 -1
- package/lib/model/strategy/adapter/promotion/index.js +0 -51
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -1
- package/lib/modules/Discount/index.d.ts +0 -1
- package/lib/modules/Discount/index.js +0 -9
- package/lib/modules/Discount/types.d.ts +0 -1
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +6 -8
- package/lib/modules/Order/index.js +89 -38
- package/lib/modules/Order/types.d.ts +21 -12
- package/lib/modules/Order/utils.d.ts +0 -10
- package/lib/modules/Order/utils.js +5 -36
- package/lib/modules/Payment/types.d.ts +8 -0
- package/lib/modules/Payment/walletpass.d.ts +7 -1
- package/lib/modules/Payment/walletpass.js +107 -9
- package/lib/modules/Product/types.d.ts +0 -1
- package/lib/modules/ProductList/index.js +31 -40
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/Rules/index.js +32 -44
- package/lib/modules/SalesSummary/index.js +7 -6
- package/lib/modules/SalesSummary/utils.js +5 -1
- package/lib/modules/ScanOrderLogger/index.d.ts +0 -2
- package/lib/modules/ScanOrderLogger/index.js +1 -13
- package/lib/modules/ScanOrderLogger/providers/feishu.js +6 -15
- package/lib/modules/ScanOrderLogger/types.d.ts +0 -1
- package/lib/modules/Schedule/index.d.ts +1 -3
- package/lib/modules/Schedule/index.js +8 -10
- package/lib/modules/Summary/utils.js +1 -21
- package/lib/modules/index.d.ts +0 -2
- package/lib/modules/index.js +1 -5
- package/lib/plugins/window.d.ts +0 -1
- package/lib/server/index.d.ts +0 -14
- package/lib/server/index.js +15 -72
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +16 -0
- package/lib/server/modules/order/index.js +140 -4
- package/lib/server/modules/order/types.d.ts +14 -0
- package/lib/server/modules/order/types.js +1 -0
- package/lib/solution/BaseSales/index.d.ts +18 -13
- package/lib/solution/BaseSales/index.js +58 -35
- package/lib/solution/BaseSales/utils/cartPromotion.js +5 -2
- package/lib/solution/BookingByStep/index.d.ts +2 -17
- package/lib/solution/BookingByStep/index.js +18 -60
- package/lib/solution/BookingByStep/types.d.ts +1 -2
- package/lib/solution/BookingByStep/types.js +0 -5
- package/lib/solution/BookingByStep/utils/capacity.js +1 -20
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
- package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
- package/lib/solution/BookingTicket/index.d.ts +1 -13
- package/lib/solution/BookingTicket/index.js +2 -10
- package/lib/solution/BookingTicket/types.d.ts +3 -0
- package/lib/solution/BookingTicket/utils/cartView.js +43 -30
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/Sales/index.js +15 -3
- package/lib/solution/ScanOrder/index.d.ts +14 -26
- package/lib/solution/ScanOrder/index.js +182 -449
- package/lib/solution/ScanOrder/types.d.ts +1 -21
- package/lib/solution/ScanOrder/utils.d.ts +0 -8
- package/lib/solution/ScanOrder/utils.js +0 -31
- package/lib/solution/ShopDiscount/index.d.ts +0 -1
- package/lib/solution/ShopDiscount/index.js +0 -14
- package/lib/solution/VenueBooking/index.d.ts +11 -39
- package/lib/solution/VenueBooking/index.js +110 -322
- package/lib/solution/VenueBooking/types.d.ts +0 -3
- package/lib/solution/VenueBooking/utils/resource.js +0 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +4 -6
- package/lib/solution/index.d.ts +0 -1
- package/lib/solution/index.js +1 -3
- package/lib/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/modules/Holder/index.d.ts +0 -48
- package/dist/modules/Holder/index.js +0 -640
- package/dist/modules/Holder/types.d.ts +0 -123
- package/dist/modules/Holder/types.js +0 -1
- package/dist/modules/Holder/utils.d.ts +0 -13
- package/dist/modules/Holder/utils.js +0 -34
- package/dist/modules/ResourcePlanner/index.d.ts +0 -24
- package/dist/modules/ResourcePlanner/index.js +0 -181
- package/dist/modules/ResourcePlanner/planner.d.ts +0 -14
- package/dist/modules/ResourcePlanner/planner.js +0 -1069
- package/dist/modules/ResourcePlanner/types.d.ts +0 -227
- package/dist/modules/ResourcePlanner/types.js +0 -1
- package/dist/solution/UnifiedBookingSales/index.d.ts +0 -183
- package/dist/solution/UnifiedBookingSales/index.js +0 -1891
- package/dist/solution/UnifiedBookingSales/types.d.ts +0 -143
- package/dist/solution/UnifiedBookingSales/types.js +0 -11
- package/lib/modules/Holder/index.d.ts +0 -48
- package/lib/modules/Holder/index.js +0 -402
- package/lib/modules/Holder/types.d.ts +0 -123
- package/lib/modules/Holder/types.js +0 -17
- package/lib/modules/Holder/utils.d.ts +0 -13
- package/lib/modules/Holder/utils.js +0 -71
- package/lib/modules/ResourcePlanner/index.d.ts +0 -24
- package/lib/modules/ResourcePlanner/index.js +0 -148
- package/lib/modules/ResourcePlanner/planner.d.ts +0 -14
- package/lib/modules/ResourcePlanner/planner.js +0 -933
- package/lib/modules/ResourcePlanner/types.d.ts +0 -227
- package/lib/modules/ResourcePlanner/types.js +0 -17
- package/lib/solution/UnifiedBookingSales/index.d.ts +0 -183
- package/lib/solution/UnifiedBookingSales/index.js +0 -1084
- package/lib/solution/UnifiedBookingSales/types.d.ts +0 -143
- package/lib/solution/UnifiedBookingSales/types.js +0 -33
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import type { ResourcePlannerModule } from '../../modules';
|
|
2
|
-
import type { OpenDataConfig } from '../../modules/OpenData';
|
|
3
|
-
import type { ResourcePlannerAssignment, ResourcePlannerAssignableSlotResult, ResourcePlannerContextInput, ResourcePlannerProjection, ResourcePlannerQuery, ResourcePlannerSelectionPatch, ResourcePlannerSnapshot, ResourcePlannerValidationResult } from '../../modules/ResourcePlanner';
|
|
4
|
-
import type { ProductListLoadProductsParams } from '../../modules/ProductList';
|
|
5
|
-
import type { LoadScheduleAvailableDateParams } from '../../modules/Schedule/types';
|
|
6
|
-
import type { BookingTicketState } from '../BookingTicket/types';
|
|
7
|
-
export declare enum UnifiedBookingSalesHooks {
|
|
8
|
-
onPlannerContextLoaded = "unifiedBookingSales:onPlannerContextLoaded",
|
|
9
|
-
onPlannerCommitted = "unifiedBookingSales:onPlannerCommitted"
|
|
10
|
-
}
|
|
11
|
-
export interface UnifiedBookingSalesState extends BookingTicketState {
|
|
12
|
-
resourcePlanner: ResourcePlannerModule;
|
|
13
|
-
}
|
|
14
|
-
/** Explicit OpenData target used by page-level UnifiedBookingSales skins. */
|
|
15
|
-
export interface UnifiedBookingSalesLoadOpenDataParams {
|
|
16
|
-
businessCode: string;
|
|
17
|
-
channel: string;
|
|
18
|
-
/** Bypasses the target-scoped in-memory cache. */
|
|
19
|
-
force?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface UnifiedBookingSalesLoadPlannerContextParams extends ResourcePlannerQuery {
|
|
22
|
-
/** ProductList request options used only when products are not supplied as raw/context data. */
|
|
23
|
-
productLoadParams?: ProductListLoadProductsParams;
|
|
24
|
-
/** Escape hatch for tests or callers that already own raw ProductList records. */
|
|
25
|
-
rawProducts?: Record<string, any>[];
|
|
26
|
-
/** Escape hatch for tests or callers that already own raw resource records. */
|
|
27
|
-
rawResources?: Record<string, any>[];
|
|
28
|
-
/** Fully normalized Planner context; takes precedence over API loading for supplied fields. */
|
|
29
|
-
context?: ResourcePlannerContextInput;
|
|
30
|
-
/** Enables the v2 resource API + schedule materialization path. */
|
|
31
|
-
useResourceDateApi?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface UnifiedBookingSalesCommitPlannerSelectionParams {
|
|
34
|
-
/** Optional selection patch applied before validation and order mutation. */
|
|
35
|
-
selection?: ResourcePlannerSelectionPatch;
|
|
36
|
-
/** Directly supplies selected resource/time facts, usually from resolveAssignableSlots(). */
|
|
37
|
-
assignments?: ResourcePlannerAssignment[];
|
|
38
|
-
/** Defaults to false. True performs the real BaseSales / OrderModule submit after tempOrder is written. */
|
|
39
|
-
submitAfterCommit?: boolean;
|
|
40
|
-
}
|
|
41
|
-
export interface UnifiedBookingSalesLoadProductsByScheduleDateParams extends Omit<ProductListLoadProductsParams, 'schedule_date' | 'product_ids'> {
|
|
42
|
-
/** The chosen calendar date, used for both availability lookup and ProductList schedule_date. */
|
|
43
|
-
date: string;
|
|
44
|
-
/** Optional caller-side filter applied after the availability result produces its product pool. */
|
|
45
|
-
product_ids?: number[];
|
|
46
|
-
/** Required by the availability API; this is not the low-code page id. */
|
|
47
|
-
custom_page_id?: number;
|
|
48
|
-
/** Availability API channel, commonly pc. ProductList keeps its own sales application channel. */
|
|
49
|
-
channel?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface UnifiedBookingSalesStagePlannerProductsParams {
|
|
52
|
-
/** Products the customer selected before a time/resource booking exists. */
|
|
53
|
-
productIds: Array<number | string>;
|
|
54
|
-
productLoadParams?: ProductListLoadProductsParams;
|
|
55
|
-
rawProducts?: Record<string, any>[];
|
|
56
|
-
}
|
|
57
|
-
/** Ordinary retail product staging. No resource, time, or booking facts are required. */
|
|
58
|
-
export type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
|
|
59
|
-
/** Adds one ordinary retail product without replacing other retail lines already in the cart. */
|
|
60
|
-
export interface UnifiedBookingSalesAddRetailProductParams {
|
|
61
|
-
/** Prefer a supplied catalog record when the UI has already loaded it. */
|
|
62
|
-
product?: Record<string, any>;
|
|
63
|
-
/** Used to resolve a product from the current catalog or load it on demand. */
|
|
64
|
-
productId?: number | string;
|
|
65
|
-
/** Defaults to one. */
|
|
66
|
-
quantity?: number;
|
|
67
|
-
/** Only used when the product is not already present in the solution catalog. */
|
|
68
|
-
productLoadParams?: ProductListLoadProductsParams;
|
|
69
|
-
}
|
|
70
|
-
export interface UnifiedBookingSalesCommitResult {
|
|
71
|
-
tempOrder: Record<string, any> | null;
|
|
72
|
-
assignments: ResourcePlannerAssignment[];
|
|
73
|
-
validation: ResourcePlannerValidationResult;
|
|
74
|
-
submitResult?: unknown;
|
|
75
|
-
}
|
|
76
|
-
export interface UnifiedBookingSalesApplyPlannerDiscountsParams {
|
|
77
|
-
/** Customer whose cards/coupons should be loaded. Defaults to tempOrder.customer_id. */
|
|
78
|
-
customerId?: number | string;
|
|
79
|
-
/** Optional explicit card/coupon id. When provided, Rules applies this card instead of auto-picking another card. */
|
|
80
|
-
preferredDiscountId?: number | string;
|
|
81
|
-
/** Defaults to true: after loading eligible cards, let Rules choose the best valid combination. */
|
|
82
|
-
applyBestDiscount?: boolean;
|
|
83
|
-
}
|
|
84
|
-
export interface UnifiedBookingSalesDiscountItem {
|
|
85
|
-
id: number | string;
|
|
86
|
-
name?: string;
|
|
87
|
-
type?: string;
|
|
88
|
-
available: boolean;
|
|
89
|
-
selected: boolean;
|
|
90
|
-
savedAmount?: number;
|
|
91
|
-
unavailableReason?: string;
|
|
92
|
-
}
|
|
93
|
-
export interface UnifiedBookingSalesDiscountApplication {
|
|
94
|
-
discountId?: number | string;
|
|
95
|
-
discountName?: string;
|
|
96
|
-
discountType?: string;
|
|
97
|
-
productId?: number | string;
|
|
98
|
-
productTitle?: string;
|
|
99
|
-
productUid?: string;
|
|
100
|
-
amount: number;
|
|
101
|
-
}
|
|
102
|
-
export interface UnifiedBookingSalesDiscountResult {
|
|
103
|
-
status: 'applied' | 'loaded' | 'no_customer';
|
|
104
|
-
customerId: number | null;
|
|
105
|
-
preferredDiscountFound?: boolean;
|
|
106
|
-
/** True only when the requested card is both selected and written into a planner product line. */
|
|
107
|
-
preferredDiscountApplied?: boolean;
|
|
108
|
-
availableDiscounts: UnifiedBookingSalesDiscountItem[];
|
|
109
|
-
selectedDiscounts: UnifiedBookingSalesDiscountItem[];
|
|
110
|
-
applications: UnifiedBookingSalesDiscountApplication[];
|
|
111
|
-
summaryBefore?: unknown;
|
|
112
|
-
summaryAfter?: unknown;
|
|
113
|
-
}
|
|
114
|
-
export interface UnifiedBookingSalesApi {
|
|
115
|
-
/** Loads board OpenData for a concrete business + channel target. */
|
|
116
|
-
loadOpenData: (params: UnifiedBookingSalesLoadOpenDataParams) => Promise<OpenDataConfig>;
|
|
117
|
-
/** Returns the latest OpenData payload cached by this solution instance. */
|
|
118
|
-
getOpenData: () => OpenDataConfig | null;
|
|
119
|
-
/** Date-first calendar availability backed by ScheduleModule. */
|
|
120
|
-
loadScheduleAvailableDate: (params: LoadScheduleAvailableDateParams) => Promise<unknown>;
|
|
121
|
-
/** Date-first product pool derived from schedule date ids and globally sellable products. */
|
|
122
|
-
loadProductsByScheduleDate: (params: UnifiedBookingSalesLoadProductsByScheduleDateParams) => Promise<unknown[]>;
|
|
123
|
-
/** Adds product lines only; booking creation is intentionally deferred. */
|
|
124
|
-
stagePlannerProducts: (params: UnifiedBookingSalesStagePlannerProductsParams) => Promise<Record<string, any> | null>;
|
|
125
|
-
/** Adds ordinary product lines only. It never creates bookings or invokes ResourcePlanner. */
|
|
126
|
-
stageRetailProducts: (params: UnifiedBookingSalesStageRetailProductsParams) => Promise<Record<string, any> | null>;
|
|
127
|
-
/** Adds one ordinary retail line while preserving all existing cart lines. */
|
|
128
|
-
addRetailProduct: (params: UnifiedBookingSalesAddRetailProductParams) => Promise<Record<string, any>[]>;
|
|
129
|
-
/** Loads and normalizes all IO data needed for the pure ResourcePlanner. */
|
|
130
|
-
loadPlannerContext: (params?: UnifiedBookingSalesLoadPlannerContextParams) => Promise<ResourcePlannerSnapshot>;
|
|
131
|
-
/** Reads continuous availability cells and UI-oriented aggregates. */
|
|
132
|
-
queryPlannerAvailability: (query?: ResourcePlannerQuery) => Promise<ResourcePlannerProjection>;
|
|
133
|
-
/** Produces selectable slots and the assignments required to commit them. */
|
|
134
|
-
resolveAssignableSlots: (query?: ResourcePlannerQuery) => ResourcePlannerAssignableSlotResult;
|
|
135
|
-
setPlannerSelection: (patch: ResourcePlannerSelectionPatch) => ResourcePlannerSnapshot;
|
|
136
|
-
autoAssignPlanner: (query?: ResourcePlannerQuery) => Promise<ResourcePlannerSnapshot>;
|
|
137
|
-
validatePlannerSelection: () => ResourcePlannerValidationResult;
|
|
138
|
-
/** Validates, writes to tempOrder, and only optionally makes a real submit request. */
|
|
139
|
-
commitPlannerSelection: (params?: UnifiedBookingSalesCommitPlannerSelectionParams) => Promise<UnifiedBookingSalesCommitResult>;
|
|
140
|
-
/** Loads the current customer's cards/coupons, optionally applies the best one, and reports line applications. */
|
|
141
|
-
applyPlannerDiscounts: (params?: UnifiedBookingSalesApplyPlannerDiscountsParams) => Promise<UnifiedBookingSalesDiscountResult>;
|
|
142
|
-
getPlannerSnapshot: () => ResourcePlannerSnapshot;
|
|
143
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export var UnifiedBookingSalesHooks = /*#__PURE__*/function (UnifiedBookingSalesHooks) {
|
|
2
|
-
UnifiedBookingSalesHooks["onPlannerContextLoaded"] = "unifiedBookingSales:onPlannerContextLoaded";
|
|
3
|
-
UnifiedBookingSalesHooks["onPlannerCommitted"] = "unifiedBookingSales:onPlannerCommitted";
|
|
4
|
-
return UnifiedBookingSalesHooks;
|
|
5
|
-
}({});
|
|
6
|
-
|
|
7
|
-
/** Explicit OpenData target used by page-level UnifiedBookingSales skins. */
|
|
8
|
-
|
|
9
|
-
/** Ordinary retail product staging. No resource, time, or booking facts are required. */
|
|
10
|
-
|
|
11
|
-
/** Adds one ordinary retail product without replacing other retail lines already in the cart. */
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
|
-
import { BaseModule } from '../BaseModule';
|
|
3
|
-
import { IFormInfo, IFormRecord, IFormItemData, IFetchFormInfoParams, IFetchFormRecordsParams, IAddFormRecordParams, IAppendFormRecordParams, IEnsureFormDataParams, IEnsureFormByProductParams, IRefreshAllFormRecordsParams, HolderModuleAPI, HolderFormMap } from './types';
|
|
4
|
-
export * from './types';
|
|
5
|
-
export * from './utils';
|
|
6
|
-
export declare class HolderModule extends BaseModule implements Module, HolderModuleAPI {
|
|
7
|
-
protected defaultName: string;
|
|
8
|
-
protected defaultVersion: string;
|
|
9
|
-
private store;
|
|
10
|
-
private request;
|
|
11
|
-
private cacheId;
|
|
12
|
-
private openCache;
|
|
13
|
-
private fatherModule;
|
|
14
|
-
private isLoading;
|
|
15
|
-
private error;
|
|
16
|
-
/** 已加载过表单数据的 form_id 缓存标记 */
|
|
17
|
-
private loadedFormIds;
|
|
18
|
-
private window;
|
|
19
|
-
constructor(name?: string, version?: string);
|
|
20
|
-
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
21
|
-
/** 统一提交 formMap,仅此处触发 store changed */
|
|
22
|
-
private commitFormMap;
|
|
23
|
-
/** 通知 UI 刷新(数据未变但需要 re-read 的场景) */
|
|
24
|
-
private notifyFormMapChanged;
|
|
25
|
-
getHolderFormMap(): HolderFormMap;
|
|
26
|
-
getHolderFormData(formId: number | string): IFormItemData | undefined;
|
|
27
|
-
setFormData(formId: number | string, data: Partial<IFormItemData>): void;
|
|
28
|
-
private ensureFormItem;
|
|
29
|
-
private hasFormData;
|
|
30
|
-
private patchFormMap;
|
|
31
|
-
fetchFormInfo(params: IFetchFormInfoParams): Promise<IFormInfo | IFormInfo[]>;
|
|
32
|
-
fetchRecords(params: IFetchFormRecordsParams): Promise<any>;
|
|
33
|
-
ensureFormData(params: IEnsureFormDataParams): Promise<IFormItemData>;
|
|
34
|
-
ensureFormByProduct(params: IEnsureFormByProductParams): Promise<IFormItemData | null>;
|
|
35
|
-
addFormRecord(params: IAddFormRecordParams): Promise<any>;
|
|
36
|
-
/**
|
|
37
|
-
* UI 层自行请求添加接口后,将返回记录合并到 holderMap 对应 form_id 的 records 中
|
|
38
|
-
*/
|
|
39
|
-
appendFormRecord(params: IAppendFormRecordParams): IFormRecord;
|
|
40
|
-
removeFormRecord(formId: number | string, formRecordId: number): void;
|
|
41
|
-
clearFormData(formId?: number | string): void;
|
|
42
|
-
/**
|
|
43
|
-
* 登录后按当前 holderMap 批量刷新所有表单的 records。
|
|
44
|
-
* 遍历 holderMap,从 form.form 中读取 form_id、shop_id,结合 customer_id 重新拉取记录。
|
|
45
|
-
*/
|
|
46
|
-
refreshAllFormRecords(params?: IRefreshAllFormRecordsParams): Promise<HolderFormMap>;
|
|
47
|
-
storeChange(path?: string): void;
|
|
48
|
-
}
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/modules/Holder/index.ts
|
|
21
|
-
var Holder_exports = {};
|
|
22
|
-
__export(Holder_exports, {
|
|
23
|
-
HolderModule: () => HolderModule
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Holder_exports);
|
|
26
|
-
var import_lodash_es = require("lodash-es");
|
|
27
|
-
var import_BaseModule = require("../BaseModule");
|
|
28
|
-
var import_utils = require("./utils");
|
|
29
|
-
__reExport(Holder_exports, require("./types"), module.exports);
|
|
30
|
-
__reExport(Holder_exports, require("./utils"), module.exports);
|
|
31
|
-
var HolderModule = class extends import_BaseModule.BaseModule {
|
|
32
|
-
constructor(name, version) {
|
|
33
|
-
super(name, version);
|
|
34
|
-
this.defaultName = "holder";
|
|
35
|
-
this.defaultVersion = "1.0.0";
|
|
36
|
-
this.openCache = false;
|
|
37
|
-
this.isLoading = false;
|
|
38
|
-
this.error = null;
|
|
39
|
-
/** 已加载过表单数据的 form_id 缓存标记 */
|
|
40
|
-
this.loadedFormIds = /* @__PURE__ */ new Set();
|
|
41
|
-
}
|
|
42
|
-
async initialize(core, options) {
|
|
43
|
-
var _a, _b, _c;
|
|
44
|
-
this.core = core;
|
|
45
|
-
this.store = options.store;
|
|
46
|
-
this.request = this.core.getPlugin("request");
|
|
47
|
-
this.window = this.core.getPlugin("window");
|
|
48
|
-
if ((_a = options.initialState) == null ? void 0 : _a.holderMap) {
|
|
49
|
-
this.commitFormMap((0, import_lodash_es.cloneDeep)(options.initialState.holderMap));
|
|
50
|
-
Object.keys(this.store.holderMap).forEach((formId) => {
|
|
51
|
-
if (this.hasFormData(formId)) {
|
|
52
|
-
this.loadedFormIds.add(formId);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
if (!this.store.holderMap || typeof this.store.holderMap !== "object") {
|
|
57
|
-
this.store.holderMap = {};
|
|
58
|
-
}
|
|
59
|
-
if ((_b = options.otherParams) == null ? void 0 : _b.cacheId) {
|
|
60
|
-
this.openCache = options.otherParams.openCache;
|
|
61
|
-
this.cacheId = options.otherParams.cacheId;
|
|
62
|
-
}
|
|
63
|
-
if ((_c = options.otherParams) == null ? void 0 : _c.fatherModule) {
|
|
64
|
-
this.fatherModule = options.otherParams.fatherModule;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/** 统一提交 formMap,仅此处触发 store changed */
|
|
68
|
-
commitFormMap(holderMap) {
|
|
69
|
-
this.store.holderMap = holderMap;
|
|
70
|
-
}
|
|
71
|
-
/** 通知 UI 刷新(数据未变但需要 re-read 的场景) */
|
|
72
|
-
notifyFormMapChanged() {
|
|
73
|
-
this.commitFormMap({ ...this.store.holderMap });
|
|
74
|
-
}
|
|
75
|
-
getHolderFormMap() {
|
|
76
|
-
return (0, import_lodash_es.cloneDeep)(this.store.holderMap);
|
|
77
|
-
}
|
|
78
|
-
getHolderFormData(formId) {
|
|
79
|
-
const formData = this.store.holderMap[(0, import_utils.normalizeFormId)(formId)];
|
|
80
|
-
return formData ? (0, import_lodash_es.cloneDeep)(formData) : void 0;
|
|
81
|
-
}
|
|
82
|
-
setFormData(formId, data) {
|
|
83
|
-
const key = (0, import_utils.normalizeFormId)(formId);
|
|
84
|
-
const current = this.store.holderMap[key] || (0, import_utils.createEmptyFormItemData)();
|
|
85
|
-
this.commitFormMap({
|
|
86
|
-
...this.store.holderMap,
|
|
87
|
-
[key]: {
|
|
88
|
-
records: data.records ?? current.records,
|
|
89
|
-
form: data.form ?? current.form
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
ensureFormItem(formId, holderMap = this.store.holderMap) {
|
|
94
|
-
const key = (0, import_utils.normalizeFormId)(formId);
|
|
95
|
-
if (!holderMap[key]) {
|
|
96
|
-
holderMap[key] = (0, import_utils.createEmptyFormItemData)();
|
|
97
|
-
}
|
|
98
|
-
return holderMap[key];
|
|
99
|
-
}
|
|
100
|
-
hasFormData(formId) {
|
|
101
|
-
const item = this.store.holderMap[formId];
|
|
102
|
-
return !!item && (Object.keys(item.form || {}).length > 0 || item.records.length > 0);
|
|
103
|
-
}
|
|
104
|
-
patchFormMap(holderMap, formId, patch) {
|
|
105
|
-
const current = this.ensureFormItem(formId, holderMap);
|
|
106
|
-
holderMap[formId] = {
|
|
107
|
-
records: patch.records ?? current.records,
|
|
108
|
-
form: patch.form ?? current.form
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
async fetchFormInfo(params) {
|
|
112
|
-
const { form_id } = params.query || {};
|
|
113
|
-
const url = params.url || `/form/${form_id}`;
|
|
114
|
-
const useCache = params.useCache !== false;
|
|
115
|
-
this.isLoading = true;
|
|
116
|
-
this.error = null;
|
|
117
|
-
try {
|
|
118
|
-
const res = await this.request.get(url, {}, { useCache });
|
|
119
|
-
const formData = res == null ? void 0 : res.data;
|
|
120
|
-
const formList = Array.isArray(formData == null ? void 0 : formData.list) ? formData.list : formData ? [formData] : [];
|
|
121
|
-
const nextFormMap = { ...this.store.holderMap };
|
|
122
|
-
formList.forEach((form) => {
|
|
123
|
-
const key = (0, import_utils.normalizeFormId)(form.form_id ?? form_id ?? form.id);
|
|
124
|
-
this.patchFormMap(nextFormMap, key, { form });
|
|
125
|
-
});
|
|
126
|
-
if (!formList.length && form_id !== void 0) {
|
|
127
|
-
const key = (0, import_utils.normalizeFormId)(form_id);
|
|
128
|
-
this.patchFormMap(nextFormMap, key, { form: formData || {} });
|
|
129
|
-
}
|
|
130
|
-
this.commitFormMap(nextFormMap);
|
|
131
|
-
return formList.length === 1 ? formList[0] : formList;
|
|
132
|
-
} catch (error) {
|
|
133
|
-
this.error = error instanceof Error ? error.message : String(error);
|
|
134
|
-
throw error;
|
|
135
|
-
} finally {
|
|
136
|
-
this.isLoading = false;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
async fetchRecords(params) {
|
|
140
|
-
var _a, _b, _c;
|
|
141
|
-
const url = params.url || "/form/data/v1";
|
|
142
|
-
const { form_id, shop_id, num, skip, customer_id, ...rest } = params.query || {};
|
|
143
|
-
const formId = (0, import_utils.normalizeFormId)(form_id);
|
|
144
|
-
const useCache = params.useCache !== false;
|
|
145
|
-
const customer = JSON.parse(((_b = (_a = this.window) == null ? void 0 : _a.getLocalStorage) == null ? void 0 : _b.call(_a, "customer")) || "{}");
|
|
146
|
-
const customerId = customer_id ?? customer.id;
|
|
147
|
-
if (!customerId)
|
|
148
|
-
return [];
|
|
149
|
-
this.isLoading = true;
|
|
150
|
-
this.error = null;
|
|
151
|
-
try {
|
|
152
|
-
const res = await this.request.get(
|
|
153
|
-
url,
|
|
154
|
-
{
|
|
155
|
-
customer_id: customerId,
|
|
156
|
-
form_id,
|
|
157
|
-
shop_id,
|
|
158
|
-
num: num || 100,
|
|
159
|
-
skip: skip || 1,
|
|
160
|
-
front_end_cache_id: useCache && this.cacheId,
|
|
161
|
-
...rest
|
|
162
|
-
},
|
|
163
|
-
{ useCache }
|
|
164
|
-
);
|
|
165
|
-
const records = ((_c = res == null ? void 0 : res.data) == null ? void 0 : _c.list) || [];
|
|
166
|
-
const nextFormMap = { ...this.store.holderMap };
|
|
167
|
-
this.patchFormMap(nextFormMap, formId, { records });
|
|
168
|
-
this.commitFormMap(nextFormMap);
|
|
169
|
-
return records;
|
|
170
|
-
} catch (error) {
|
|
171
|
-
this.error = error instanceof Error ? error.message : String(error);
|
|
172
|
-
throw error;
|
|
173
|
-
} finally {
|
|
174
|
-
this.isLoading = false;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
async ensureFormData(params) {
|
|
178
|
-
const formId = (0, import_utils.normalizeFormId)(params.form_id);
|
|
179
|
-
const useCache = params.useCache !== false;
|
|
180
|
-
if (useCache && !params.forceRefresh && this.loadedFormIds.has(formId)) {
|
|
181
|
-
this.notifyFormMapChanged();
|
|
182
|
-
return this.ensureFormItem(formId);
|
|
183
|
-
}
|
|
184
|
-
const current = this.ensureFormItem(formId);
|
|
185
|
-
const tasks = [];
|
|
186
|
-
if (params.forceRefresh || !Object.keys(current.form || {}).length) {
|
|
187
|
-
tasks.push(
|
|
188
|
-
this.fetchFormInfo({
|
|
189
|
-
url: params.formInfoUrl,
|
|
190
|
-
query: {
|
|
191
|
-
form_id: params.form_id
|
|
192
|
-
},
|
|
193
|
-
useCache
|
|
194
|
-
})
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
if (params.forceRefresh || !current.records.length) {
|
|
198
|
-
tasks.push(
|
|
199
|
-
this.fetchRecords({
|
|
200
|
-
url: params.recordsUrl,
|
|
201
|
-
query: {
|
|
202
|
-
form_id: params.form_id,
|
|
203
|
-
shop_id: params.shop_id,
|
|
204
|
-
customer_id: params.customer_id
|
|
205
|
-
},
|
|
206
|
-
useCache
|
|
207
|
-
})
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
if (!tasks.length) {
|
|
211
|
-
this.notifyFormMapChanged();
|
|
212
|
-
} else {
|
|
213
|
-
await Promise.all(tasks);
|
|
214
|
-
}
|
|
215
|
-
this.loadedFormIds.add(formId);
|
|
216
|
-
return this.ensureFormItem(formId);
|
|
217
|
-
}
|
|
218
|
-
async ensureFormByProduct(params) {
|
|
219
|
-
const holderConfig = (0, import_utils.getProductHolderConfig)(params.product);
|
|
220
|
-
if (!holderConfig)
|
|
221
|
-
return null;
|
|
222
|
-
const formId = (0, import_utils.getFormIdFromHolderConfig)(holderConfig);
|
|
223
|
-
const shopId = params.shop_id ?? params.product.shop_id;
|
|
224
|
-
return this.ensureFormData({
|
|
225
|
-
form_id: formId,
|
|
226
|
-
shop_id: shopId,
|
|
227
|
-
customer_id: params.customer_id,
|
|
228
|
-
useCache: params.useCache,
|
|
229
|
-
skip: 1,
|
|
230
|
-
num: 100
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
async addFormRecord(params) {
|
|
234
|
-
const url = params.url || "/form/record";
|
|
235
|
-
const formId = (0, import_utils.normalizeFormId)(params.body.form_id);
|
|
236
|
-
this.isLoading = true;
|
|
237
|
-
this.error = null;
|
|
238
|
-
try {
|
|
239
|
-
await this.request.post(url, params.body);
|
|
240
|
-
const records = await this.fetchRecords({
|
|
241
|
-
query: {
|
|
242
|
-
form_id: params.body.form_id,
|
|
243
|
-
shop_id: params.body.shop_id,
|
|
244
|
-
customer_id: params.body.customer_id
|
|
245
|
-
},
|
|
246
|
-
useCache: false
|
|
247
|
-
});
|
|
248
|
-
this.loadedFormIds.add(formId);
|
|
249
|
-
return records[records.length - 1];
|
|
250
|
-
} catch (error) {
|
|
251
|
-
this.error = error instanceof Error ? error.message : String(error);
|
|
252
|
-
throw error;
|
|
253
|
-
} finally {
|
|
254
|
-
this.isLoading = false;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* UI 层自行请求添加接口后,将返回记录合并到 holderMap 对应 form_id 的 records 中
|
|
259
|
-
*/
|
|
260
|
-
appendFormRecord(params) {
|
|
261
|
-
let record = params.record;
|
|
262
|
-
if ((record == null ? void 0 : record.data) && record.form_record_id === void 0) {
|
|
263
|
-
record = record.data;
|
|
264
|
-
}
|
|
265
|
-
const normalizedRecord = (0, import_lodash_es.cloneDeep)(record);
|
|
266
|
-
const formId = (0, import_utils.normalizeFormId)(
|
|
267
|
-
params.form_id ?? normalizedRecord.form_id
|
|
268
|
-
);
|
|
269
|
-
if (!formId) {
|
|
270
|
-
throw new Error("[HolderModule] appendFormRecord: form_id is required");
|
|
271
|
-
}
|
|
272
|
-
if (!normalizedRecord.form_record_id) {
|
|
273
|
-
throw new Error(
|
|
274
|
-
"[HolderModule] appendFormRecord: form_record_id is required"
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
normalizedRecord.form_id = Number(formId) || normalizedRecord.form_id;
|
|
278
|
-
const nextFormMap = { ...this.store.holderMap };
|
|
279
|
-
const current = this.ensureFormItem(formId, nextFormMap);
|
|
280
|
-
const recordIndex = current.records.findIndex(
|
|
281
|
-
(item) => item.form_record_id === normalizedRecord.form_record_id
|
|
282
|
-
);
|
|
283
|
-
const records = recordIndex >= 0 ? current.records.map(
|
|
284
|
-
(item, index) => index === recordIndex ? { ...item, ...normalizedRecord } : item
|
|
285
|
-
) : [...current.records, normalizedRecord];
|
|
286
|
-
this.patchFormMap(nextFormMap, formId, { records });
|
|
287
|
-
this.commitFormMap(nextFormMap);
|
|
288
|
-
this.loadedFormIds.add(formId);
|
|
289
|
-
return normalizedRecord;
|
|
290
|
-
}
|
|
291
|
-
removeFormRecord(formId, formRecordId) {
|
|
292
|
-
const key = (0, import_utils.normalizeFormId)(formId);
|
|
293
|
-
const current = this.store.holderMap[key] || (0, import_utils.createEmptyFormItemData)();
|
|
294
|
-
const nextFormMap = { ...this.store.holderMap };
|
|
295
|
-
this.patchFormMap(nextFormMap, key, {
|
|
296
|
-
records: current.records.filter(
|
|
297
|
-
(record) => record.form_record_id !== formRecordId
|
|
298
|
-
)
|
|
299
|
-
});
|
|
300
|
-
this.commitFormMap(nextFormMap);
|
|
301
|
-
}
|
|
302
|
-
clearFormData(formId) {
|
|
303
|
-
if (formId !== void 0) {
|
|
304
|
-
const key = (0, import_utils.normalizeFormId)(formId);
|
|
305
|
-
const nextFormMap = { ...this.store.holderMap };
|
|
306
|
-
delete nextFormMap[key];
|
|
307
|
-
this.loadedFormIds.delete(key);
|
|
308
|
-
this.commitFormMap(nextFormMap);
|
|
309
|
-
} else {
|
|
310
|
-
this.loadedFormIds.clear();
|
|
311
|
-
this.commitFormMap({});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* 登录后按当前 holderMap 批量刷新所有表单的 records。
|
|
316
|
-
* 遍历 holderMap,从 form.form 中读取 form_id、shop_id,结合 customer_id 重新拉取记录。
|
|
317
|
-
*/
|
|
318
|
-
async refreshAllFormRecords(params = {}) {
|
|
319
|
-
const { customer_id, recordsUrl, num, skip } = params;
|
|
320
|
-
const useCache = params.useCache ?? false;
|
|
321
|
-
if (!customer_id) {
|
|
322
|
-
return this.getHolderFormMap();
|
|
323
|
-
}
|
|
324
|
-
const entries = Object.entries(this.store.holderMap);
|
|
325
|
-
if (!entries.length) {
|
|
326
|
-
return this.getHolderFormMap();
|
|
327
|
-
}
|
|
328
|
-
const url = recordsUrl || "/form/data/v1";
|
|
329
|
-
this.isLoading = true;
|
|
330
|
-
this.error = null;
|
|
331
|
-
try {
|
|
332
|
-
const results = await Promise.all(
|
|
333
|
-
entries.map(async ([mapKey, item]) => {
|
|
334
|
-
var _a;
|
|
335
|
-
const meta = (0, import_utils.resolveFormMetaFromHolderItem)(mapKey, item);
|
|
336
|
-
if (!meta)
|
|
337
|
-
return null;
|
|
338
|
-
try {
|
|
339
|
-
const res = await this.request.get(
|
|
340
|
-
url,
|
|
341
|
-
{
|
|
342
|
-
customer_id,
|
|
343
|
-
form_id: meta.form_id,
|
|
344
|
-
shop_id: meta.shop_id,
|
|
345
|
-
num: num || 100,
|
|
346
|
-
skip: skip || 1,
|
|
347
|
-
front_end_cache_id: useCache && this.cacheId
|
|
348
|
-
},
|
|
349
|
-
{ useCache }
|
|
350
|
-
);
|
|
351
|
-
return {
|
|
352
|
-
formId: meta.form_id,
|
|
353
|
-
records: ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.list) || []
|
|
354
|
-
};
|
|
355
|
-
} catch (error) {
|
|
356
|
-
console.error(
|
|
357
|
-
`[HolderModule] refreshAllFormRecords failed for form ${meta.form_id}`,
|
|
358
|
-
error
|
|
359
|
-
);
|
|
360
|
-
return null;
|
|
361
|
-
}
|
|
362
|
-
})
|
|
363
|
-
);
|
|
364
|
-
const nextFormMap = { ...this.store.holderMap };
|
|
365
|
-
results.forEach((result) => {
|
|
366
|
-
if (!result)
|
|
367
|
-
return;
|
|
368
|
-
this.patchFormMap(nextFormMap, result.formId, {
|
|
369
|
-
records: result.records
|
|
370
|
-
});
|
|
371
|
-
this.loadedFormIds.add(result.formId);
|
|
372
|
-
});
|
|
373
|
-
this.commitFormMap(nextFormMap);
|
|
374
|
-
return (0, import_lodash_es.cloneDeep)(nextFormMap);
|
|
375
|
-
} catch (error) {
|
|
376
|
-
this.error = error instanceof Error ? error.message : String(error);
|
|
377
|
-
throw error;
|
|
378
|
-
} finally {
|
|
379
|
-
this.isLoading = false;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
storeChange(path) {
|
|
383
|
-
if (path !== "holderMap" && path !== void 0) {
|
|
384
|
-
return;
|
|
385
|
-
}
|
|
386
|
-
if (this.openCache) {
|
|
387
|
-
const store = (0, import_lodash_es.cloneDeep)(this.store);
|
|
388
|
-
this.checkSaveCache({
|
|
389
|
-
cacheId: this.cacheId,
|
|
390
|
-
fatherModule: this.fatherModule,
|
|
391
|
-
store,
|
|
392
|
-
cacheKey: ["holderMap"]
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
398
|
-
0 && (module.exports = {
|
|
399
|
-
HolderModule,
|
|
400
|
-
...require("./types"),
|
|
401
|
-
...require("./utils")
|
|
402
|
-
});
|