@pisell/pisellos 0.0.569 → 0.0.571
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/effects/index.d.ts +2 -2
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +3 -3
- package/dist/model/strategy/adapter/itemRule/type.d.ts +6 -6
- package/dist/model/strategy/adapter/promotion/type.d.ts +5 -5
- package/dist/model/strategy/type.d.ts +1 -1
- package/dist/modules/BookingContext/types.d.ts +4 -4
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +1 -1
- package/dist/modules/Customer/types.d.ts +1 -1
- package/dist/modules/Discount/types.d.ts +1 -1
- package/dist/modules/Holder/types.d.ts +1 -1
- package/dist/modules/OpenData/types.d.ts +1 -1
- package/dist/modules/Order/types.d.ts +5 -5
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +1 -1
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +1 -1
- package/dist/modules/Order/utils.d.ts +1 -1
- package/dist/modules/Payment/types.d.ts +7 -7
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/ResourcePlanner/types.d.ts +4 -4
- package/dist/modules/Rules/index.js +2 -1
- package/dist/modules/Rules/types.d.ts +2 -2
- package/dist/modules/ScanOrderLogger/types.d.ts +2 -2
- package/dist/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
- package/dist/modules/Schedule/type.d.ts +7 -7
- package/dist/modules/Schedule/types.d.ts +9 -9
- package/dist/plugins/app.d.ts +1 -1
- package/dist/plugins/request.d.ts +2 -2
- package/dist/server/modules/floor-plan/types.d.ts +1 -1
- package/dist/server/modules/menu/types.d.ts +1 -1
- package/dist/server/modules/order/types.d.ts +16 -16
- package/dist/server/modules/products/types.d.ts +1 -1
- package/dist/server/modules/resource/types.d.ts +1 -1
- package/dist/server/modules/schedule/utils.d.ts +1 -1
- package/dist/server/types.d.ts +4 -4
- package/dist/server/utils/small-ticket.d.ts +1 -1
- package/dist/solution/BaseSales/index.d.ts +1 -1
- package/dist/solution/BaseSales/types.d.ts +7 -7
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -13
- package/dist/solution/BookingTicket/types.d.ts +3 -3
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +1 -1
- package/dist/solution/Sales/types.d.ts +4 -4
- package/dist/solution/ScanOrder/types.d.ts +5 -5
- package/dist/solution/ShopDiscount/types.d.ts +1 -1
- package/dist/solution/ShopDiscount/utils.d.ts +2 -2
- package/dist/solution/UnifiedBookingSales/types.d.ts +1 -1
- package/dist/solution/VenueBooking/types.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/task.d.ts +2 -2
- package/dist/utils/watch.d.ts +2 -2
- package/lib/effects/index.d.ts +2 -2
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +3 -3
- package/lib/model/strategy/adapter/itemRule/type.d.ts +6 -6
- package/lib/model/strategy/adapter/promotion/type.d.ts +5 -5
- package/lib/model/strategy/type.d.ts +1 -1
- package/lib/modules/BookingContext/types.d.ts +4 -4
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +1 -1
- package/lib/modules/Customer/types.d.ts +1 -1
- package/lib/modules/Discount/types.d.ts +1 -1
- package/lib/modules/Holder/types.d.ts +1 -1
- package/lib/modules/OpenData/types.d.ts +1 -1
- package/lib/modules/Order/types.d.ts +5 -5
- package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +1 -1
- package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +1 -1
- package/lib/modules/Order/utils.d.ts +1 -1
- package/lib/modules/Payment/types.d.ts +7 -7
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/ResourcePlanner/types.d.ts +4 -4
- package/lib/modules/Rules/index.js +1 -1
- package/lib/modules/Rules/types.d.ts +2 -2
- package/lib/modules/ScanOrderLogger/types.d.ts +2 -2
- package/lib/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
- package/lib/modules/Schedule/type.d.ts +7 -7
- package/lib/modules/Schedule/types.d.ts +9 -9
- package/lib/plugins/app.d.ts +1 -1
- package/lib/plugins/request.d.ts +2 -2
- package/lib/server/modules/floor-plan/types.d.ts +1 -1
- package/lib/server/modules/menu/types.d.ts +1 -1
- package/lib/server/modules/order/types.d.ts +16 -16
- package/lib/server/modules/products/types.d.ts +1 -1
- package/lib/server/modules/resource/types.d.ts +1 -1
- package/lib/server/modules/schedule/utils.d.ts +1 -1
- package/lib/server/types.d.ts +4 -4
- package/lib/server/utils/small-ticket.d.ts +1 -1
- package/lib/solution/BaseSales/index.d.ts +1 -1
- package/lib/solution/BaseSales/types.d.ts +7 -7
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -13
- package/lib/solution/BookingTicket/types.d.ts +3 -3
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +1 -1
- package/lib/solution/Sales/types.d.ts +4 -4
- package/lib/solution/ScanOrder/types.d.ts +5 -5
- package/lib/solution/ShopDiscount/types.d.ts +1 -1
- package/lib/solution/ShopDiscount/utils.d.ts +2 -2
- package/lib/solution/UnifiedBookingSales/types.d.ts +1 -1
- package/lib/solution/VenueBooking/types.d.ts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/utils/task.d.ts +2 -2
- package/lib/utils/watch.d.ts +2 -2
- package/package.json +18 -19
- package/dist/model/strategy/adapter/promotion/index.d.ts +0 -4
- package/lib/model/strategy/adapter/promotion/index.d.ts +0 -4
|
@@ -10,8 +10,8 @@ export declare enum ScanOrderHooks {
|
|
|
10
10
|
onRefresh = "scanOrder:onRefresh",
|
|
11
11
|
onCartValidationChanged = "scanOrder:onCartValidationChanged"
|
|
12
12
|
}
|
|
13
|
-
export type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
|
|
14
|
-
export type ScanOrderEntryContext = {
|
|
13
|
+
export declare type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
|
|
14
|
+
export declare type ScanOrderEntryContext = {
|
|
15
15
|
biz: string;
|
|
16
16
|
mode: 'scan' | 'append';
|
|
17
17
|
resourceId?: string;
|
|
@@ -208,7 +208,7 @@ export interface ScanOrderSubmitPayload extends Omit<ScanOrderTempOrder, 'platfo
|
|
|
208
208
|
}>;
|
|
209
209
|
products: ScanOrderSubmitProduct[];
|
|
210
210
|
}
|
|
211
|
-
export type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
|
|
211
|
+
export declare type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
|
|
212
212
|
export interface ScanOrderTableFormRecord {
|
|
213
213
|
policy?: string | null;
|
|
214
214
|
partyroom_booking?: string | null;
|
|
@@ -267,7 +267,7 @@ export interface ScanOrderResourceOccupyDetailApiResponse {
|
|
|
267
267
|
occupy_details?: ScanOrderResourceOccupyDetail[] | null;
|
|
268
268
|
} | null;
|
|
269
269
|
}
|
|
270
|
-
export type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
|
|
270
|
+
export declare type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
|
|
271
271
|
export interface ScanOrderReservationResourceSelectInfo {
|
|
272
272
|
resourceSelectType?: ScanOrderResourceSelectType;
|
|
273
273
|
isSingleReservation: boolean;
|
|
@@ -277,7 +277,7 @@ export interface ScanOrderReservationResourceSelectInfo {
|
|
|
277
277
|
export interface ScanOrderAllowAddItemsInfo {
|
|
278
278
|
enabled: boolean;
|
|
279
279
|
}
|
|
280
|
-
export type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
|
|
280
|
+
export declare type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
|
|
281
281
|
export interface ScanOrderSyncAdditionalOrderResult {
|
|
282
282
|
matched: boolean;
|
|
283
283
|
order_id?: string;
|
|
@@ -11,7 +11,7 @@ export declare enum ShopDiscountHooks {
|
|
|
11
11
|
onRulesListChange = "shopDiscount:onRulesListChange",
|
|
12
12
|
onLoadPrepareCalcResult = "shopDiscount:onLoadPrepareCalcResult"
|
|
13
13
|
}
|
|
14
|
-
export type Customer = {
|
|
14
|
+
export declare type Customer = {
|
|
15
15
|
id: string | number;
|
|
16
16
|
name: string;
|
|
17
17
|
email: string;
|
|
@@ -21,13 +21,13 @@ export declare const isAllNormalProduct: (items: any[]) => boolean;
|
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
23
|
export declare const getDiscountAmount: (discount: Discount, total: number, price: number) => number;
|
|
24
|
-
export declare const getDiscountListAmountTotal: (discount: Discount[]) =>
|
|
24
|
+
export declare const getDiscountListAmountTotal: (discount: Discount[]) => Discount;
|
|
25
25
|
/**
|
|
26
26
|
* 获取折扣金额 计算每个折扣的金额
|
|
27
27
|
* @param discount
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
export declare const getDiscountListAmount: (discount: Discount[]) =>
|
|
30
|
+
export declare const getDiscountListAmount: (discount: Discount[]) => Discount;
|
|
31
31
|
export interface ScheduleItem {
|
|
32
32
|
id: number;
|
|
33
33
|
name: string | {
|
|
@@ -55,7 +55,7 @@ export interface UnifiedBookingSalesStagePlannerProductsParams {
|
|
|
55
55
|
rawProducts?: Record<string, any>[];
|
|
56
56
|
}
|
|
57
57
|
/** Ordinary retail product staging. No resource, time, or booking facts are required. */
|
|
58
|
-
export type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
|
|
58
|
+
export declare type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
|
|
59
59
|
/** Adds one ordinary retail product without replacing other retail lines already in the cart. */
|
|
60
60
|
export interface UnifiedBookingSalesAddRetailProductParams {
|
|
61
61
|
/** Prefer a supplied catalog record when the UI has already loaded it. */
|
|
@@ -11,7 +11,7 @@ export declare enum VenueBookingHooks {
|
|
|
11
11
|
/** 登录客户的智能定价、营销配置与订单汇总已完成刷新 */
|
|
12
12
|
onSmartPricingUpdated = "venueBooking:onSmartPricingUpdated"
|
|
13
13
|
}
|
|
14
|
-
export type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
|
|
14
|
+
export declare type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
|
|
15
15
|
export interface VenueBookingEntryContext {
|
|
16
16
|
biz: string;
|
|
17
17
|
venueId?: string;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface ModuleOptions {
|
|
|
38
38
|
initialState?: Record<string, any>;
|
|
39
39
|
otherParams?: Record<string, any>;
|
|
40
40
|
}
|
|
41
|
-
export type EventHandler = (data?: any) => void;
|
|
41
|
+
export declare type EventHandler = (data?: any) => void;
|
|
42
42
|
export interface PisellCore {
|
|
43
43
|
registerPlugin: (plugin: Plugin, options?: PluginOptions) => void;
|
|
44
44
|
getPlugin: <T extends Plugin>(name: string) => T | null;
|
package/lib/utils/task.d.ts
CHANGED
package/lib/utils/watch.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 监听模块
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
|
-
export type WatchEventCallback = (...args: any[]) => void;
|
|
6
|
-
export type WatchEventItem = {
|
|
5
|
+
export declare type WatchEventCallback = (...args: any[]) => void;
|
|
6
|
+
export declare type WatchEventItem = {
|
|
7
7
|
key: string;
|
|
8
8
|
callback: WatchEventCallback;
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@pisell/pisellos",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.571",
|
|
5
5
|
"description": "一个可扩展的前端模块化SDK框架,支持插件系统",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -9,23 +9,6 @@
|
|
|
9
9
|
"dist",
|
|
10
10
|
"lib"
|
|
11
11
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "father build",
|
|
14
|
-
"dev": "father dev --watch",
|
|
15
|
-
"push": "yalc push --replace",
|
|
16
|
-
"test": "vitest",
|
|
17
|
-
"lint": "eslint src --ext .ts",
|
|
18
|
-
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
19
|
-
"changeset": "changeset",
|
|
20
|
-
"version": "changeset version",
|
|
21
|
-
"release": "changeset publish && npm run sync && git push",
|
|
22
|
-
"example": "npx parcel-bundler examples/index.html",
|
|
23
|
-
"docs": "typedoc --out docs src/index.ts",
|
|
24
|
-
"sync": "node sync.js",
|
|
25
|
-
"prepublishOnly": "npm run build",
|
|
26
|
-
"deploy": "npm run build && npm run changeset && npm run version && npm run release",
|
|
27
|
-
"deploy:ci": "npm run build && npm run version && changeset publish --registry=https://registry.npmjs.com/ && npm run sync"
|
|
28
|
-
},
|
|
29
12
|
"repository": {
|
|
30
13
|
"type": "git",
|
|
31
14
|
"url": "git+https://github.com/username/pisell-os.git"
|
|
@@ -70,5 +53,21 @@
|
|
|
70
53
|
},
|
|
71
54
|
"publishConfig": {
|
|
72
55
|
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "father build",
|
|
59
|
+
"dev": "father dev --watch",
|
|
60
|
+
"push": "yalc push --replace",
|
|
61
|
+
"test": "vitest",
|
|
62
|
+
"lint": "eslint src --ext .ts",
|
|
63
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
64
|
+
"changeset": "changeset",
|
|
65
|
+
"version": "changeset version",
|
|
66
|
+
"release": "changeset publish && npm run sync && git push",
|
|
67
|
+
"example": "npx parcel-bundler examples/index.html",
|
|
68
|
+
"docs": "typedoc --out docs src/index.ts",
|
|
69
|
+
"sync": "node sync.js",
|
|
70
|
+
"deploy": "npm run build && npm run changeset && npm run version && npm run release",
|
|
71
|
+
"deploy:ci": "npm run build && npm run version && changeset publish --registry=https://registry.npmjs.com/ && npm run sync"
|
|
73
72
|
}
|
|
74
|
-
}
|
|
73
|
+
}
|