@pisell/pisellos 2.0.67 → 2.1.2

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.
Files changed (96) hide show
  1. package/dist/core/index.js +1 -2
  2. package/dist/effects/index.d.ts +3 -4
  3. package/dist/effects/index.js +6 -15
  4. package/dist/modules/AccountList/index.d.ts +1 -7
  5. package/dist/modules/AccountList/index.js +14 -81
  6. package/dist/modules/AccountList/types.d.ts +0 -28
  7. package/dist/modules/AccountList/types.js +0 -8
  8. package/dist/modules/Cart/utils/changePrice.d.ts +2 -2
  9. package/dist/modules/Cart/utils/changePrice.js +1 -1
  10. package/dist/modules/ProductList/index.d.ts +3 -14
  11. package/dist/modules/ProductList/index.js +33 -67
  12. package/dist/modules/ProductList/types.d.ts +0 -1
  13. package/dist/modules/Rules/index.js +14 -27
  14. package/dist/modules/Rules/types.d.ts +0 -1
  15. package/dist/modules/index.d.ts +0 -1
  16. package/dist/modules/index.js +0 -1
  17. package/dist/plugins/window.d.ts +0 -1
  18. package/dist/solution/BookingByStep/index.js +50 -34
  19. package/dist/solution/BookingByStep/types.d.ts +3 -2
  20. package/dist/solution/BookingByStep/utils/resources.js +12 -4
  21. package/dist/solution/BuyTickets/index.d.ts +2 -2
  22. package/dist/solution/BuyTickets/index.js +1 -1
  23. package/dist/solution/ShopDiscount/index.js +2 -4
  24. package/dist/solution/index.d.ts +0 -1
  25. package/dist/solution/index.js +0 -1
  26. package/dist/types/index.d.ts +1 -3
  27. package/lib/core/index.js +1 -1
  28. package/lib/effects/index.d.ts +3 -4
  29. package/lib/effects/index.js +1 -4
  30. package/lib/modules/AccountList/index.d.ts +1 -7
  31. package/lib/modules/AccountList/index.js +0 -27
  32. package/lib/modules/AccountList/types.d.ts +0 -28
  33. package/lib/modules/Cart/utils/changePrice.d.ts +2 -2
  34. package/lib/modules/Cart/utils/changePrice.js +1 -1
  35. package/lib/modules/ProductList/index.d.ts +3 -14
  36. package/lib/modules/ProductList/index.js +14 -54
  37. package/lib/modules/ProductList/types.d.ts +0 -1
  38. package/lib/modules/Rules/index.js +12 -20
  39. package/lib/modules/Rules/types.d.ts +0 -1
  40. package/lib/modules/index.d.ts +0 -1
  41. package/lib/modules/index.js +0 -2
  42. package/lib/plugins/window.d.ts +0 -1
  43. package/lib/solution/BookingByStep/index.js +39 -27
  44. package/lib/solution/BookingByStep/types.d.ts +3 -2
  45. package/lib/solution/BookingByStep/utils/resources.js +12 -4
  46. package/lib/solution/BuyTickets/index.d.ts +2 -2
  47. package/lib/solution/BuyTickets/index.js +1 -1
  48. package/lib/solution/ShopDiscount/index.js +1 -2
  49. package/lib/solution/index.d.ts +0 -1
  50. package/lib/solution/index.js +0 -2
  51. package/lib/types/index.d.ts +1 -3
  52. package/package.json +1 -1
  53. package/dist/modules/Customer/constants.d.ts +0 -7
  54. package/dist/modules/Customer/constants.js +0 -12
  55. package/dist/modules/Customer/index.d.ts +0 -122
  56. package/dist/modules/Customer/index.js +0 -697
  57. package/dist/modules/Customer/types.d.ts +0 -146
  58. package/dist/modules/Customer/types.js +0 -41
  59. package/dist/solution/BookingTicket/index.d.ts +0 -172
  60. package/dist/solution/BookingTicket/index.js +0 -665
  61. package/dist/solution/BookingTicket/types.d.ts +0 -68
  62. package/dist/solution/BookingTicket/types.js +0 -43
  63. package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  64. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +0 -159
  65. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -16
  66. package/dist/solution/BookingTicket/utils/scan/handleScan.js +0 -174
  67. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -81
  68. package/dist/solution/BookingTicket/utils/scan/index.js +0 -285
  69. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  70. package/dist/solution/BookingTicket/utils/scan/scanCache.js +0 -305
  71. package/dist/utils/task.d.ts +0 -40
  72. package/dist/utils/task.js +0 -171
  73. package/dist/utils/watch.d.ts +0 -102
  74. package/dist/utils/watch.js +0 -294
  75. package/lib/modules/Customer/constants.d.ts +0 -7
  76. package/lib/modules/Customer/constants.js +0 -39
  77. package/lib/modules/Customer/index.d.ts +0 -122
  78. package/lib/modules/Customer/index.js +0 -440
  79. package/lib/modules/Customer/types.d.ts +0 -146
  80. package/lib/modules/Customer/types.js +0 -37
  81. package/lib/solution/BookingTicket/index.d.ts +0 -172
  82. package/lib/solution/BookingTicket/index.js +0 -399
  83. package/lib/solution/BookingTicket/types.d.ts +0 -68
  84. package/lib/solution/BookingTicket/types.js +0 -72
  85. package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  86. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +0 -117
  87. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -16
  88. package/lib/solution/BookingTicket/utils/scan/handleScan.js +0 -125
  89. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -81
  90. package/lib/solution/BookingTicket/utils/scan/index.js +0 -210
  91. package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  92. package/lib/solution/BookingTicket/utils/scan/scanCache.js +0 -231
  93. package/lib/utils/task.d.ts +0 -40
  94. package/lib/utils/task.js +0 -109
  95. package/lib/utils/watch.d.ts +0 -102
  96. package/lib/utils/watch.js +0 -217
@@ -1,12 +0,0 @@
1
- // 排序字段
2
- export var SORT_BY = "id";
3
-
4
- // 默认每页数量
5
- export var DEFAULT_PAGE_SIZE = 20;
6
-
7
- // 默认客户
8
- export var DEFAULT_CUSTOMER = {
9
- "id": 1,
10
- "nickname": "Select a customer",
11
- "name": "选择一个客户"
12
- };
@@ -1,122 +0,0 @@
1
- import { Module, PisellCore, ModuleOptions } from '../../types';
2
- import { BaseModule } from '../BaseModule';
3
- import { CustomerState, ShopCustomer, ShopGetCustomerListParams, CustomerModuleAPI, IPaginationInfo, ICustomerListResponse } from './types';
4
- export declare class CustomerModule extends BaseModule implements Module, CustomerModuleAPI {
5
- protected defaultName: string;
6
- protected defaultVersion: string;
7
- private store;
8
- private request;
9
- private cacheId;
10
- private openCache;
11
- private fatherModule;
12
- constructor(name?: string, version?: string);
13
- initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
14
- /**
15
- * 获取客户列表数据(内部方法)
16
- * @param params 查询参数
17
- * @returns API响应数据
18
- */
19
- private fetchCustomerListData;
20
- /**
21
- * 处理客户列表操作的错误(内部方法)
22
- * @param error 错误对象
23
- * @param operation 操作名称
24
- */
25
- private handleCustomerListError;
26
- /**
27
- * 获取客户列表
28
- * @param params 查询参数
29
- * @returns 客户列表响应
30
- */
31
- getCustomerList(params?: ShopGetCustomerListParams): Promise<ICustomerListResponse>;
32
- /**
33
- * 设置客户列表
34
- * @param customers 客户列表
35
- * @param total 总数
36
- */
37
- setCustomerList(customers: ShopCustomer[], total?: number): void;
38
- /**
39
- * 设置当前选择的客户
40
- * @param customer 选择的客户
41
- */
42
- setSelectedCustomer(customer: ShopCustomer | null): void;
43
- /**
44
- * 获取当前选择的客户
45
- * @returns 当前选择的客户
46
- */
47
- getSelectedCustomer(): ShopCustomer | null;
48
- /**
49
- * 获取客户列表
50
- * @returns 客户列表
51
- */
52
- getCustomers(): ShopCustomer[];
53
- /**
54
- * 根据ID查找客户
55
- * @param id 客户ID
56
- * @returns 客户信息
57
- */
58
- getCustomerById(id: string | number): ShopCustomer | null;
59
- /**
60
- * 清空客户列表
61
- */
62
- clearCustomers(): void;
63
- /**
64
- * 添加客户到列表第一位
65
- * @param customer 要添加的客户信息
66
- */
67
- addCustomerToFirst(customer: ShopCustomer): void;
68
- /**
69
- * 获取当前状态
70
- * @returns 当前状态
71
- */
72
- getState(): CustomerState;
73
- /**
74
- * 获取分页信息
75
- * @returns 分页信息
76
- */
77
- getPaginationInfo(): IPaginationInfo;
78
- /**
79
- * 触发分页变化事件
80
- * @param pagination 分页信息
81
- */
82
- triggerPaginationChange(pagination: IPaginationInfo): void;
83
- /**
84
- * 设置分页信息
85
- * @param page 页码
86
- * @param pageSize 每页数量
87
- */
88
- setPaginationInfo(page: number, pageSize: number): void;
89
- /**
90
- * 便捷方法:切换分页并自动获取数据
91
- * @param page 页码
92
- * @param pageSize 每页数量(可选,不传则使用当前pageSize)
93
- * @returns 客户列表响应
94
- */
95
- changeCustomerPage(page: number, pageSize?: number): Promise<ICustomerListResponse>;
96
- /**
97
- * 滚动加载更多客户数据 - 数据会追加到现有列表中
98
- * @returns 客户列表响应
99
- */
100
- loadMoreCustomers(): Promise<ICustomerListResponse>;
101
- /**
102
- * 重置并重新开始滚动加载
103
- * @param params 查询参数
104
- * @returns 客户列表响应
105
- */
106
- resetAndLoadCustomers(params?: ShopGetCustomerListParams): Promise<ICustomerListResponse>;
107
- /**
108
- * 检查是否还有更多数据可以加载
109
- * @returns 是否还有更多数据
110
- */
111
- hasMoreCustomers(): boolean;
112
- /**
113
- * 获取当前的搜索条件
114
- * @returns 当前搜索条件
115
- */
116
- getCurrentSearchParams(): Omit<ShopGetCustomerListParams, 'skip' | 'num'>;
117
- /**
118
- * 缓存状态变化
119
- */
120
- private storeChange;
121
- }
122
- export * from './types';