@pisell/pisellos 3.0.76 → 3.0.78

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 (314) hide show
  1. package/dist/core/index.js +1 -2
  2. package/dist/effects/index.d.ts +3 -5
  3. package/dist/effects/index.js +8 -40
  4. package/dist/modules/Account/index.js +3 -2
  5. package/dist/modules/AccountList/index.d.ts +1 -7
  6. package/dist/modules/AccountList/index.js +14 -81
  7. package/dist/modules/AccountList/types.d.ts +0 -28
  8. package/dist/modules/AccountList/types.js +0 -8
  9. package/dist/modules/BaseModule.d.ts +0 -3
  10. package/dist/modules/BaseModule.js +0 -15
  11. package/dist/modules/Cart/index.d.ts +0 -1
  12. package/dist/modules/Cart/index.js +1 -2
  13. package/dist/modules/Date/types.d.ts +3 -1
  14. package/dist/modules/Discount/index.d.ts +0 -1
  15. package/dist/modules/Discount/index.js +1 -1
  16. package/dist/modules/Guests/index.js +9 -9
  17. package/dist/modules/Order/index.d.ts +1 -25
  18. package/dist/modules/Order/index.js +3 -224
  19. package/dist/modules/Order/types.d.ts +0 -45
  20. package/dist/modules/Order/types.js +0 -8
  21. package/dist/modules/Order/utils.js +1 -1
  22. package/dist/modules/Payment/index.d.ts +9 -184
  23. package/dist/modules/Payment/index.js +109 -2084
  24. package/dist/modules/Payment/types.d.ts +30 -772
  25. package/dist/modules/Payment/types.js +12 -236
  26. package/dist/modules/ProductList/index.d.ts +1 -12
  27. package/dist/modules/ProductList/index.js +6 -29
  28. package/dist/modules/Resource/index.js +1 -1
  29. package/dist/modules/Rules/index.d.ts +4 -3
  30. package/dist/modules/Rules/index.js +121 -78
  31. package/dist/modules/Rules/types.d.ts +6 -1
  32. package/dist/modules/Rules/types.js +8 -0
  33. package/dist/modules/Schedule/index.d.ts +0 -9
  34. package/dist/modules/Schedule/index.js +0 -77
  35. package/dist/modules/index.d.ts +0 -1
  36. package/dist/modules/index.js +0 -1
  37. package/dist/plugins/window.d.ts +0 -1
  38. package/dist/solution/BookingByStep/index.d.ts +17 -0
  39. package/dist/solution/BookingByStep/index.js +525 -190
  40. package/dist/solution/BookingByStep/utils/products.d.ts +0 -6
  41. package/dist/solution/BookingByStep/utils/products.js +0 -10
  42. package/dist/solution/BookingByStep/utils/resources.js +4 -0
  43. package/dist/solution/BuyTickets/index.js +8 -7
  44. package/dist/solution/ShopDiscount/index.d.ts +12 -10
  45. package/dist/solution/ShopDiscount/index.js +64 -110
  46. package/dist/solution/ShopDiscount/types.d.ts +0 -8
  47. package/dist/solution/ShopDiscount/utils.js +1 -0
  48. package/dist/solution/index.d.ts +0 -2
  49. package/dist/solution/index.js +1 -3
  50. package/dist/types/index.d.ts +1 -4
  51. package/lib/core/index.js +1 -1
  52. package/lib/effects/index.d.ts +3 -5
  53. package/lib/effects/index.js +1 -17
  54. package/lib/modules/Account/index.js +3 -2
  55. package/lib/modules/AccountList/index.d.ts +1 -7
  56. package/lib/modules/AccountList/index.js +0 -27
  57. package/lib/modules/AccountList/types.d.ts +0 -28
  58. package/lib/modules/BaseModule.d.ts +0 -3
  59. package/lib/modules/BaseModule.js +0 -9
  60. package/lib/modules/Cart/index.d.ts +0 -1
  61. package/lib/modules/Cart/index.js +2 -5
  62. package/lib/modules/Date/types.d.ts +3 -1
  63. package/lib/modules/Discount/index.d.ts +0 -1
  64. package/lib/modules/Discount/index.js +1 -1
  65. package/lib/modules/Guests/index.js +9 -9
  66. package/lib/modules/Order/index.d.ts +1 -25
  67. package/lib/modules/Order/index.js +1 -186
  68. package/lib/modules/Order/types.d.ts +0 -45
  69. package/lib/modules/Order/utils.js +1 -1
  70. package/lib/modules/Payment/index.d.ts +9 -184
  71. package/lib/modules/Payment/index.js +51 -1084
  72. package/lib/modules/Payment/types.d.ts +30 -772
  73. package/lib/modules/Payment/types.js +6 -79
  74. package/lib/modules/ProductList/index.d.ts +1 -12
  75. package/lib/modules/ProductList/index.js +5 -31
  76. package/lib/modules/Resource/index.js +1 -1
  77. package/lib/modules/Rules/index.d.ts +4 -3
  78. package/lib/modules/Rules/index.js +64 -43
  79. package/lib/modules/Rules/types.d.ts +6 -1
  80. package/lib/modules/Rules/types.js +11 -2
  81. package/lib/modules/Schedule/index.d.ts +0 -9
  82. package/lib/modules/Schedule/index.js +0 -60
  83. package/lib/modules/index.d.ts +0 -1
  84. package/lib/modules/index.js +0 -2
  85. package/lib/plugins/window.d.ts +0 -1
  86. package/lib/solution/BookingByStep/index.d.ts +17 -0
  87. package/lib/solution/BookingByStep/index.js +325 -60
  88. package/lib/solution/BookingByStep/utils/products.d.ts +0 -6
  89. package/lib/solution/BookingByStep/utils/products.js +2 -8
  90. package/lib/solution/BookingByStep/utils/resources.js +4 -1
  91. package/lib/solution/BuyTickets/index.js +8 -7
  92. package/lib/solution/ShopDiscount/index.d.ts +12 -10
  93. package/lib/solution/ShopDiscount/index.js +30 -51
  94. package/lib/solution/ShopDiscount/types.d.ts +0 -8
  95. package/lib/solution/index.d.ts +0 -2
  96. package/lib/solution/index.js +1 -5
  97. package/lib/types/index.d.ts +1 -4
  98. package/package.json +1 -3
  99. package/dist/modules/Customer/constants.d.ts +0 -7
  100. package/dist/modules/Customer/constants.js +0 -12
  101. package/dist/modules/Customer/index.d.ts +0 -122
  102. package/dist/modules/Customer/index.js +0 -696
  103. package/dist/modules/Customer/types.d.ts +0 -146
  104. package/dist/modules/Customer/types.js +0 -41
  105. package/dist/modules/Payment/cash.d.ts +0 -19
  106. package/dist/modules/Payment/cash.js +0 -97
  107. package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -22
  108. package/dist/modules/Payment/cashRecommendationAlgorithm.js +0 -423
  109. package/dist/modules/Payment/eftpos.d.ts +0 -11
  110. package/dist/modules/Payment/eftpos.js +0 -80
  111. package/dist/modules/Payment/mx51.d.ts +0 -0
  112. package/dist/modules/Payment/mx51.js +0 -0
  113. package/dist/modules/Payment/utils.d.ts +0 -17
  114. package/dist/modules/Payment/utils.js +0 -62
  115. package/dist/modules/Payment/walletpass.d.ts +0 -99
  116. package/dist/modules/Payment/walletpass.js +0 -711
  117. package/dist/plugins/app-types/app/app.d.ts +0 -83
  118. package/dist/plugins/app-types/app/const.d.ts +0 -4
  119. package/dist/plugins/app-types/app/index.d.ts +0 -14
  120. package/dist/plugins/app-types/applicationManager/application.d.ts +0 -50
  121. package/dist/plugins/app-types/applicationManager/index.d.ts +0 -13
  122. package/dist/plugins/app-types/config.d.ts +0 -3
  123. package/dist/plugins/app-types/cookie/index.d.ts +0 -13
  124. package/dist/plugins/app-types/data/index.d.ts +0 -8
  125. package/dist/plugins/app-types/history/config.d.ts +0 -24
  126. package/dist/plugins/app-types/history/index.d.ts +0 -20
  127. package/dist/plugins/app-types/history/type.d.ts +0 -2
  128. package/dist/plugins/app-types/hooks/index.d.ts +0 -12
  129. package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +0 -2
  130. package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +0 -2
  131. package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +0 -13
  132. package/dist/plugins/app-types/hooks/useStore/index.d.ts +0 -6
  133. package/dist/plugins/app-types/index.d.ts +0 -6
  134. package/dist/plugins/app-types/indexDB/index.d.ts +0 -178
  135. package/dist/plugins/app-types/locales/en.d.ts +0 -3
  136. package/dist/plugins/app-types/locales/index.d.ts +0 -37
  137. package/dist/plugins/app-types/locales/original.d.ts +0 -3
  138. package/dist/plugins/app-types/locales/type.d.ts +0 -19
  139. package/dist/plugins/app-types/locales/zh-CN.d.ts +0 -3
  140. package/dist/plugins/app-types/locales/zh-HK.d.ts +0 -3
  141. package/dist/plugins/app-types/logger/feishu.d.ts +0 -11
  142. package/dist/plugins/app-types/logger/index.d.ts +0 -122
  143. package/dist/plugins/app-types/menuManager/hooks.d.ts +0 -17
  144. package/dist/plugins/app-types/menuManager/index.d.ts +0 -28
  145. package/dist/plugins/app-types/models/global.d.ts +0 -32
  146. package/dist/plugins/app-types/models/index.d.ts +0 -45
  147. package/dist/plugins/app-types/models/type.d.ts +0 -2
  148. package/dist/plugins/app-types/package.json +0 -15
  149. package/dist/plugins/app-types/plugin/index.d.ts +0 -0
  150. package/dist/plugins/app-types/pubsub/example.d.ts +0 -5
  151. package/dist/plugins/app-types/pubsub/index.d.ts +0 -63
  152. package/dist/plugins/app-types/request/cache.d.ts +0 -46
  153. package/dist/plugins/app-types/request/cancelToken.d.ts +0 -38
  154. package/dist/plugins/app-types/request/config.d.ts +0 -3
  155. package/dist/plugins/app-types/request/constants.d.ts +0 -2
  156. package/dist/plugins/app-types/request/index.d.ts +0 -24
  157. package/dist/plugins/app-types/request/pisell2Request.d.ts +0 -6
  158. package/dist/plugins/app-types/request/type.d.ts +0 -41
  159. package/dist/plugins/app-types/request/utils.d.ts +0 -46
  160. package/dist/plugins/app-types/routes/config.d.ts +0 -7
  161. package/dist/plugins/app-types/routes/index.d.ts +0 -28
  162. package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +0 -6
  163. package/dist/plugins/app-types/socket/components/index.d.ts +0 -2
  164. package/dist/plugins/app-types/socket/constants.d.ts +0 -33
  165. package/dist/plugins/app-types/socket/events.d.ts +0 -31
  166. package/dist/plugins/app-types/socket/heartbeat.d.ts +0 -66
  167. package/dist/plugins/app-types/socket/index.d.ts +0 -61
  168. package/dist/plugins/app-types/socket/monitor.d.ts +0 -169
  169. package/dist/plugins/app-types/socket/reconnect.d.ts +0 -61
  170. package/dist/plugins/app-types/socket/socket.d.ts +0 -129
  171. package/dist/plugins/app-types/socket/types.d.ts +0 -85
  172. package/dist/plugins/app-types/storage/index.d.ts +0 -17
  173. package/dist/plugins/app-types/tasks/index.d.ts +0 -77
  174. package/dist/plugins/app-types/tasks/type.d.ts +0 -62
  175. package/dist/plugins/app-types/tasks/useTasks.d.ts +0 -5
  176. package/dist/plugins/app-types/type.d.ts +0 -2
  177. package/dist/plugins/app-types/variables/VariablesProvider.d.ts +0 -7
  178. package/dist/plugins/app-types/variables/config.d.ts +0 -3
  179. package/dist/plugins/app-types/variables/index.d.ts +0 -6
  180. package/dist/plugins/app-types/variables/type.d.ts +0 -2
  181. package/dist/plugins/app-types/website/index.d.ts +0 -6
  182. package/dist/plugins/app.d.ts +0 -8
  183. package/dist/plugins/app.js +0 -1
  184. package/dist/solution/BookingTicket/index.d.ts +0 -184
  185. package/dist/solution/BookingTicket/index.js +0 -698
  186. package/dist/solution/BookingTicket/types.d.ts +0 -68
  187. package/dist/solution/BookingTicket/types.js +0 -43
  188. package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  189. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +0 -159
  190. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -22
  191. package/dist/solution/BookingTicket/utils/scan/handleScan.js +0 -189
  192. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -85
  193. package/dist/solution/BookingTicket/utils/scan/index.js +0 -294
  194. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  195. package/dist/solution/BookingTicket/utils/scan/scanCache.js +0 -305
  196. package/dist/solution/Checkout/appointmentDemo.json +0 -1
  197. package/dist/solution/Checkout/index.d.ts +0 -432
  198. package/dist/solution/Checkout/index.js +0 -4452
  199. package/dist/solution/Checkout/types.d.ts +0 -727
  200. package/dist/solution/Checkout/types.js +0 -104
  201. package/dist/solution/Checkout/utils/index.d.ts +0 -121
  202. package/dist/solution/Checkout/utils/index.js +0 -511
  203. package/dist/utils/task.d.ts +0 -40
  204. package/dist/utils/task.js +0 -171
  205. package/dist/utils/watch.d.ts +0 -102
  206. package/dist/utils/watch.js +0 -294
  207. package/lib/modules/Customer/constants.d.ts +0 -7
  208. package/lib/modules/Customer/constants.js +0 -39
  209. package/lib/modules/Customer/index.d.ts +0 -122
  210. package/lib/modules/Customer/index.js +0 -439
  211. package/lib/modules/Customer/types.d.ts +0 -146
  212. package/lib/modules/Customer/types.js +0 -37
  213. package/lib/modules/Payment/cash.d.ts +0 -19
  214. package/lib/modules/Payment/cash.js +0 -64
  215. package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -22
  216. package/lib/modules/Payment/cashRecommendationAlgorithm.js +0 -342
  217. package/lib/modules/Payment/eftpos.d.ts +0 -11
  218. package/lib/modules/Payment/eftpos.js +0 -51
  219. package/lib/modules/Payment/mx51.d.ts +0 -0
  220. package/lib/modules/Payment/mx51.js +0 -0
  221. package/lib/modules/Payment/utils.d.ts +0 -17
  222. package/lib/modules/Payment/utils.js +0 -67
  223. package/lib/modules/Payment/walletpass.d.ts +0 -99
  224. package/lib/modules/Payment/walletpass.js +0 -484
  225. package/lib/plugins/app-types/app/app.d.ts +0 -83
  226. package/lib/plugins/app-types/app/const.d.ts +0 -4
  227. package/lib/plugins/app-types/app/index.d.ts +0 -14
  228. package/lib/plugins/app-types/applicationManager/application.d.ts +0 -50
  229. package/lib/plugins/app-types/applicationManager/index.d.ts +0 -13
  230. package/lib/plugins/app-types/config.d.ts +0 -3
  231. package/lib/plugins/app-types/cookie/index.d.ts +0 -13
  232. package/lib/plugins/app-types/data/index.d.ts +0 -8
  233. package/lib/plugins/app-types/history/config.d.ts +0 -24
  234. package/lib/plugins/app-types/history/index.d.ts +0 -20
  235. package/lib/plugins/app-types/history/type.d.ts +0 -2
  236. package/lib/plugins/app-types/hooks/index.d.ts +0 -12
  237. package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +0 -2
  238. package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +0 -2
  239. package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +0 -13
  240. package/lib/plugins/app-types/hooks/useStore/index.d.ts +0 -6
  241. package/lib/plugins/app-types/index.d.ts +0 -6
  242. package/lib/plugins/app-types/indexDB/index.d.ts +0 -178
  243. package/lib/plugins/app-types/locales/en.d.ts +0 -3
  244. package/lib/plugins/app-types/locales/index.d.ts +0 -37
  245. package/lib/plugins/app-types/locales/original.d.ts +0 -3
  246. package/lib/plugins/app-types/locales/type.d.ts +0 -19
  247. package/lib/plugins/app-types/locales/zh-CN.d.ts +0 -3
  248. package/lib/plugins/app-types/locales/zh-HK.d.ts +0 -3
  249. package/lib/plugins/app-types/logger/feishu.d.ts +0 -11
  250. package/lib/plugins/app-types/logger/index.d.ts +0 -122
  251. package/lib/plugins/app-types/menuManager/hooks.d.ts +0 -17
  252. package/lib/plugins/app-types/menuManager/index.d.ts +0 -28
  253. package/lib/plugins/app-types/models/global.d.ts +0 -32
  254. package/lib/plugins/app-types/models/index.d.ts +0 -45
  255. package/lib/plugins/app-types/models/type.d.ts +0 -2
  256. package/lib/plugins/app-types/package.json +0 -15
  257. package/lib/plugins/app-types/plugin/index.d.ts +0 -0
  258. package/lib/plugins/app-types/pubsub/example.d.ts +0 -5
  259. package/lib/plugins/app-types/pubsub/index.d.ts +0 -63
  260. package/lib/plugins/app-types/request/cache.d.ts +0 -46
  261. package/lib/plugins/app-types/request/cancelToken.d.ts +0 -38
  262. package/lib/plugins/app-types/request/config.d.ts +0 -3
  263. package/lib/plugins/app-types/request/constants.d.ts +0 -2
  264. package/lib/plugins/app-types/request/index.d.ts +0 -24
  265. package/lib/plugins/app-types/request/pisell2Request.d.ts +0 -6
  266. package/lib/plugins/app-types/request/type.d.ts +0 -41
  267. package/lib/plugins/app-types/request/utils.d.ts +0 -46
  268. package/lib/plugins/app-types/routes/config.d.ts +0 -7
  269. package/lib/plugins/app-types/routes/index.d.ts +0 -28
  270. package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +0 -6
  271. package/lib/plugins/app-types/socket/components/index.d.ts +0 -2
  272. package/lib/plugins/app-types/socket/constants.d.ts +0 -33
  273. package/lib/plugins/app-types/socket/events.d.ts +0 -31
  274. package/lib/plugins/app-types/socket/heartbeat.d.ts +0 -66
  275. package/lib/plugins/app-types/socket/index.d.ts +0 -61
  276. package/lib/plugins/app-types/socket/monitor.d.ts +0 -169
  277. package/lib/plugins/app-types/socket/reconnect.d.ts +0 -61
  278. package/lib/plugins/app-types/socket/socket.d.ts +0 -129
  279. package/lib/plugins/app-types/socket/types.d.ts +0 -85
  280. package/lib/plugins/app-types/storage/index.d.ts +0 -17
  281. package/lib/plugins/app-types/tasks/index.d.ts +0 -77
  282. package/lib/plugins/app-types/tasks/type.d.ts +0 -62
  283. package/lib/plugins/app-types/tasks/useTasks.d.ts +0 -5
  284. package/lib/plugins/app-types/type.d.ts +0 -2
  285. package/lib/plugins/app-types/variables/VariablesProvider.d.ts +0 -7
  286. package/lib/plugins/app-types/variables/config.d.ts +0 -3
  287. package/lib/plugins/app-types/variables/index.d.ts +0 -6
  288. package/lib/plugins/app-types/variables/type.d.ts +0 -2
  289. package/lib/plugins/app-types/website/index.d.ts +0 -6
  290. package/lib/plugins/app.d.ts +0 -8
  291. package/lib/plugins/app.js +0 -17
  292. package/lib/solution/BookingTicket/index.d.ts +0 -184
  293. package/lib/solution/BookingTicket/index.js +0 -426
  294. package/lib/solution/BookingTicket/types.d.ts +0 -68
  295. package/lib/solution/BookingTicket/types.js +0 -72
  296. package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  297. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +0 -117
  298. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -22
  299. package/lib/solution/BookingTicket/utils/scan/handleScan.js +0 -132
  300. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -85
  301. package/lib/solution/BookingTicket/utils/scan/index.js +0 -216
  302. package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  303. package/lib/solution/BookingTicket/utils/scan/scanCache.js +0 -231
  304. package/lib/solution/Checkout/appointmentDemo.json +0 -1
  305. package/lib/solution/Checkout/index.d.ts +0 -432
  306. package/lib/solution/Checkout/index.js +0 -2776
  307. package/lib/solution/Checkout/types.d.ts +0 -727
  308. package/lib/solution/Checkout/types.js +0 -63
  309. package/lib/solution/Checkout/utils/index.d.ts +0 -121
  310. package/lib/solution/Checkout/utils/index.js +0 -362
  311. package/lib/utils/task.d.ts +0 -40
  312. package/lib/utils/task.js +0 -109
  313. package/lib/utils/watch.d.ts +0 -102
  314. package/lib/utils/watch.js +0 -217
@@ -1,83 +0,0 @@
1
- import { RouterManager } from '../routes';
2
- import { ApplicationManager } from '../applicationManager';
3
- import { History, HistoryOptions } from '../history';
4
- import { Data } from '../data';
5
- import { Locales, LocalesOptions } from '../locales';
6
- import { Storage, StorageOptions } from '../storage';
7
- import { MenuManager } from '../menuManager';
8
- import LoggerManager, { LoggerOptions } from '../logger';
9
- import { TasksManager } from '../tasks';
10
- import IndexDBManager, { DBOptions } from '../indexDB';
11
- declare global {
12
- interface Window {
13
- app: App;
14
- }
15
- }
16
- export interface AppOptions {
17
- logger?: LoggerOptions;
18
- db?: DBOptions;
19
- constants?: any;
20
- history?: HistoryOptions;
21
- storage?: StorageOptions;
22
- locales?: LocalesOptions;
23
- }
24
- declare class App {
25
- private static instance;
26
- private plugins;
27
- globalData: any;
28
- router: RouterManager;
29
- applicationManager: ApplicationManager;
30
- history: History;
31
- data: Data;
32
- hooks: import("../hooks").HooksExport;
33
- locales: Locales;
34
- models: {
35
- getStore: () => import("../models").Store;
36
- StoreProvider: typeof import("react-redux").Provider;
37
- setConfig: (models: any[]) => void;
38
- };
39
- request: {
40
- get: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
41
- post: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
42
- put: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
43
- remove: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
44
- custom: (url: import("../request").RequestWrapperProps["url"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
45
- setConfig: (newConfig: Partial<import("../request").RequestConfig>) => void;
46
- getConfig: () => import("../request").RequestConfig;
47
- };
48
- storage: Storage;
49
- menuManager: MenuManager;
50
- cookie: {
51
- setCookie: (name: string, value: string, domain?: string) => void;
52
- getCookie: (name: string) => string | null;
53
- deleteCookie: (name: string, domain?: string) => void;
54
- checkCookie: (name: string) => boolean;
55
- updateCookie: (name: string, value: string, domain?: string) => void;
56
- };
57
- website: {
58
- setTitle: (title: string) => void;
59
- setIcon: (paramsIcon: string) => void;
60
- setAppleWebAppTitle: (title: string) => void;
61
- };
62
- logger: LoggerManager;
63
- pubsub: import("../pubsub").PubSub;
64
- tasksManager: TasksManager;
65
- dbManager: IndexDBManager | null;
66
- constants: {
67
- channel: string;
68
- [key: string]: string;
69
- };
70
- private constructor();
71
- static getInstance(options?: AppOptions): App;
72
- setGlobalData(globalData: any): void;
73
- usePlugin(name: string, plugin: any): void;
74
- usePlugins(plugins: {
75
- name: string;
76
- plugin: any;
77
- }[]): void;
78
- getPlugin(name: string): any;
79
- getGlobalData(): any;
80
- install(): void;
81
- unInstall(): void;
82
- }
83
- export default App;
@@ -1,4 +0,0 @@
1
- export declare enum APPEvent {
2
- APP_INSTALL = "app.install",
3
- APP_UNINSTALL = "app.uninstall"
4
- }
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import App, { AppOptions } from "./app";
3
- type AppContextType = {
4
- globalData: any;
5
- setGlobalData: React.Dispatch<React.SetStateAction<any>>;
6
- app: App;
7
- };
8
- export declare const AppProvider: React.FC<{
9
- children: React.ReactNode;
10
- options: AppOptions;
11
- }>;
12
- export declare const useApp: () => AppContextType;
13
- export declare const getApp: typeof App.getInstance;
14
- export default App;
@@ -1,50 +0,0 @@
1
- import App from "../app";
2
- import { LoadLibraryByUrlParams } from "../locales/type";
3
- import { MenuItem } from "../menuManager/index";
4
- export type ApplicationInterface = {
5
- page_type: "low_code" | "code";
6
- page_id: number | string;
7
- page_code: string;
8
- page_version?: string;
9
- page_name: string;
10
- router: string;
11
- category: "page" | "component" | "function";
12
- Component?: any;
13
- children?: any;
14
- layout?: string;
15
- originalUrl?: string;
16
- };
17
- export type ApplicationData = {
18
- app_id: number;
19
- app_name: string;
20
- app_type: "system" | "custom";
21
- interfaces: ApplicationInterface[];
22
- functions?: any[];
23
- menu?: {
24
- [key: string]: MenuItem[];
25
- };
26
- locales?: LoadLibraryByUrlParams;
27
- [key: string]: any;
28
- };
29
- export declare class Application {
30
- options: ApplicationData;
31
- name: ApplicationData["app_name"];
32
- interfaces: Map<ApplicationInterface["page_name"], ApplicationInterface>;
33
- components: Map<string, any>;
34
- functions: Map<string, any>;
35
- app: App;
36
- constructor(options: ApplicationData, app: App);
37
- afterAdd(application: Application): Promise<void>;
38
- beforeLoad(): Promise<void>;
39
- load(): Promise<void>;
40
- initInterfaces(interfaces: ApplicationData["interfaces"]): void;
41
- initFunctions(functions: ApplicationData["functions"]): void;
42
- loadInterface(interfaceItem: ApplicationInterface): Promise<ApplicationInterface>;
43
- setInterface(code: string, interfaceItem: ApplicationInterface): void;
44
- setComponent(code: string, component: ApplicationInterface): void;
45
- setFunction(code: string, functionItem: ApplicationInterface): void;
46
- getInterface(code: string): ApplicationInterface | undefined;
47
- getComponent(code: string): any;
48
- getFunction(code: string): any;
49
- runFunction(code: string, params?: any, ...args: any): any;
50
- }
@@ -1,13 +0,0 @@
1
- import APP from "../app";
2
- import { Application, ApplicationData } from "./application";
3
- export declare class ApplicationManager {
4
- applicationList: Application[];
5
- protected app: APP;
6
- applications: Map<string, Application>;
7
- constructor(applicationList: Application[] | undefined, app: APP);
8
- init(applicationList: Application[] | ApplicationData[]): Promise<unknown>;
9
- add(application: Application): Promise<void>;
10
- get(appName: Application["name"]): Application | undefined;
11
- remove(appName: Application["name"]): void;
12
- load(): Promise<void>;
13
- }
@@ -1,3 +0,0 @@
1
- import { CoreConfig } from './type';
2
- export declare const setConfig: (newConfig: Partial<CoreConfig>) => void;
3
- export declare const getConfig: () => CoreConfig;
@@ -1,13 +0,0 @@
1
- declare function setCookie(name: string, value: string, domain?: string): void;
2
- declare function getCookie(name: string): string | null;
3
- declare function deleteCookie(name: string, domain?: string): void;
4
- declare function checkCookie(name: string): boolean;
5
- declare function updateCookie(name: string, value: string, domain?: string): void;
6
- declare const _default: {
7
- setCookie: typeof setCookie;
8
- getCookie: typeof getCookie;
9
- deleteCookie: typeof deleteCookie;
10
- checkCookie: typeof checkCookie;
11
- updateCookie: typeof updateCookie;
12
- };
13
- export default _default;
@@ -1,8 +0,0 @@
1
- import { Storage } from '../storage';
2
- import App from '../app';
3
- export declare class Data {
4
- private app;
5
- storage: Storage;
6
- store: any;
7
- constructor(app: App);
8
- }
@@ -1,24 +0,0 @@
1
- import { HistoryConfig } from './type';
2
- /**
3
- * @title: 默认配置
4
- * @description:
5
- * @return {*}
6
- * @Author: zhiwei.Wang
7
- */
8
- export declare const defaultConfig: HistoryConfig;
9
- /**
10
- * @title: 设置配置
11
- * @description:
12
- * @param {Partial} newConfig
13
- * @return {*}
14
- * @Author: zhiwei.Wang
15
- */
16
- export declare const setConfig: (newConfig: Partial<HistoryConfig>) => HistoryConfig;
17
- /**
18
- * @title: 获取配置
19
- * @description:
20
- * @param {*} HistoryConfig
21
- * @return {*}
22
- * @Author: zhiwei.Wang
23
- */
24
- export declare const getConfig: () => HistoryConfig;
@@ -1,20 +0,0 @@
1
- import type { History as HistoryType } from "history";
2
- import { useHistory, useLocation, useParams } from "react-router-dom";
3
- import App from "../app";
4
- export interface HistoryOptions {
5
- basename?: string;
6
- }
7
- export declare class History {
8
- instance: HistoryType<unknown>;
9
- useHistory: typeof useHistory;
10
- useLocation: typeof useLocation;
11
- useParams: typeof useParams;
12
- app: App;
13
- constructor(app: App, options?: HistoryOptions);
14
- push: HistoryType["push"];
15
- replace: HistoryType["replace"];
16
- reload: () => void;
17
- reloadTo: (path: string) => void;
18
- externalPage: (path: string) => void;
19
- goLogin: () => any;
20
- }
@@ -1,2 +0,0 @@
1
- export interface HistoryConfig {
2
- }
@@ -1,12 +0,0 @@
1
- import useLowCode from './useLowCode';
2
- import useDelayedValue from './useDelayedValue';
3
- import useStore from './useStore';
4
- import useDispatch from './useDispatch';
5
- export interface HooksExport {
6
- useLowCode: typeof useLowCode;
7
- useDelayedValue: typeof useDelayedValue;
8
- useStore: typeof useStore;
9
- useDispatch: typeof useDispatch;
10
- }
11
- declare const _default: HooksExport;
12
- export default _default;
@@ -1,2 +0,0 @@
1
- declare function useDelayedValue<T>(value: T, timeout?: number): T;
2
- export default useDelayedValue;
@@ -1,2 +0,0 @@
1
- import { useDispatch } from "react-redux";
2
- export default useDispatch;
@@ -1,13 +0,0 @@
1
- export interface useLowCodeProps {
2
- onChange: (e: any) => void;
3
- onReady: (e: any) => void;
4
- }
5
- export interface useLowCodeResult {
6
- lowcodeRef: {
7
- onReady: (e: any) => void;
8
- onChange: (e: any) => void;
9
- };
10
- setState: (values: any, callback?: any) => any;
11
- }
12
- declare const useLowCode: (props: Partial<useLowCodeProps>) => useLowCodeResult;
13
- export default useLowCode;
@@ -1,6 +0,0 @@
1
- import { ModelsState } from "../../models";
2
- declare const useStore: <T extends keyof ModelsState, D extends keyof ModelsState[T]>(props: {
3
- models: T;
4
- key?: D;
5
- }) => D extends undefined ? ModelsState[T] : ModelsState[T][D];
6
- export default useStore;
@@ -1,6 +0,0 @@
1
- export { default as request } from './request';
2
- export { default as hooks } from './hooks';
3
- export { default as models } from './models';
4
- export { default as pubsub } from './pubsub';
5
- export { default as socket } from './socket';
6
- export * from './app';
@@ -1,178 +0,0 @@
1
- import App from "../app";
2
- /**
3
- * IndexDB 管理器模块
4
- *
5
- * 这个模块提供了对浏览器 IndexedDB 的简单封装,并在不支持 IndexedDB 的环境中
6
- * 自动降级使用 localStorage 作为备选存储方案。
7
- */
8
- /**
9
- * 数据库配置选项接口
10
- * @interface DBOptions
11
- * @property {string} dbName - 数据库名称
12
- * @property {number} version - 数据库版本号
13
- * @property {Array} stores - 存储对象配置数组
14
- * @property {string} stores[].name - 存储对象名称
15
- * @property {string} stores[].keyPath - 主键路径
16
- * @property {Array} [stores[].indexes] - 索引配置数组(可选)
17
- * @property {string} stores[].indexes[].name - 索引名称
18
- * @property {string} stores[].indexes[].keyPath - 索引键路径
19
- * @property {IDBIndexParameters} [stores[].indexes[].options] - 索引选项(可选)
20
- */
21
- export interface DBOptions {
22
- dbName: string;
23
- version: number;
24
- stores: {
25
- name: string;
26
- keyPath: string;
27
- indexes?: {
28
- name: string;
29
- keyPath: string;
30
- options?: IDBIndexParameters;
31
- }[];
32
- }[];
33
- }
34
- /**
35
- * IndexDB 管理器类
36
- * 提供对 IndexedDB 的简单封装,支持自动降级到 localStorage
37
- * @class IndexDBManager
38
- */
39
- declare class IndexDBManager {
40
- /**
41
- * 检查环境是否支持 IndexedDB
42
- * @returns {boolean} 是否支持 IndexedDB
43
- * @private
44
- */
45
- private static isSupported;
46
- private db;
47
- private dbName;
48
- private version;
49
- private stores;
50
- private useIndexDB;
51
- private app;
52
- /**
53
- * 创建 IndexDBManager 实例
54
- * @param {DBOptions} options - 数据库配置选项
55
- */
56
- constructor(app: App, options: DBOptions);
57
- /**
58
- * 初始化数据库连接
59
- * 如果环境不支持 IndexedDB,将自动使用 localStorage
60
- * @returns {Promise<boolean>} 连接是否成功
61
- */
62
- connect(): Promise<boolean>;
63
- /**
64
- * 生成用于 localStorage 的存储键
65
- * @param {string} storeName - 存储对象名称
66
- * @param {string|number} [key] - 可选的键值
67
- * @returns {string} 格式化的存储键
68
- * @private
69
- */
70
- private getStorageKey;
71
- /**
72
- * 添加数据到指定的存储对象
73
- * @param {string} storeName - 存储对象名称
74
- * @param {T} data - 要添加的数据
75
- * @returns {Promise<T>} 添加的数据
76
- * @template T
77
- */
78
- add<T>(storeName: string, data: T): Promise<T>;
79
- /**
80
- * 获取指定存储对象中的数据
81
- * @param {string} storeName - 存储对象名称
82
- * @param {string|number} key - 数据主键
83
- * @returns {Promise<T|null>} 获取的数据,不存在则返回 null
84
- * @template T
85
- */
86
- get<T>(storeName: string, key: string | number): Promise<T | null>;
87
- /**
88
- * 更新指定存储对象中的数据
89
- * @param {string} storeName - 存储对象名称
90
- * @param {T} data - 要更新的数据
91
- * @returns {Promise<T>} 更新后的数据
92
- * @template T
93
- */
94
- update<T>(storeName: string, data: T): Promise<T>;
95
- /**
96
- * 删除指定存储对象中的数据
97
- * @param {string} storeName - 存储对象名称
98
- * @param {string|number} key - 数据主键
99
- * @returns {Promise<boolean>} 删除是否成功
100
- */
101
- delete(storeName: string, key: string | number): Promise<boolean>;
102
- /**
103
- * 获取指定存储对象中的所有数据
104
- * @param {string} storeName - 存储对象名称
105
- * @returns {Promise<T[]>} 数据数组
106
- * @template T
107
- */
108
- getAll<T>(storeName: string): Promise<T[]>;
109
- /**
110
- * 清空指定存储对象中的所有数据
111
- * @param {string} storeName - 存储对象名称
112
- * @returns {Promise<boolean>} 清空是否成功
113
- */
114
- clear(storeName: string): Promise<boolean>;
115
- /**
116
- * 关闭数据库连接
117
- * 在不再需要使用数据库时调用,释放资源
118
- */
119
- close(): void;
120
- /**
121
- * 获取当前使用的存储方式
122
- * @returns {'indexDB'|'localStorage'} 当前使用的存储方式
123
- */
124
- getCurrentStorage(): 'indexDB' | 'localStorage';
125
- }
126
- /**
127
- * 使用示例:
128
- *
129
- * // 1. 创建数据库配置
130
- * const dbOptions: DBOptions = {
131
- * dbName: 'myApp',
132
- * version: 1,
133
- * stores: [
134
- * {
135
- * name: 'users',
136
- * keyPath: 'id',
137
- * indexes: [
138
- * { name: 'email', keyPath: 'email', options: { unique: true } }
139
- * ]
140
- * },
141
- * {
142
- * name: 'products',
143
- * keyPath: 'id'
144
- * }
145
- * ]
146
- * };
147
- *
148
- * // 2. 创建并连接数据库
149
- * const db = new IndexDBManager(dbOptions);
150
- * await db.connect();
151
- *
152
- * // 3. 添加数据
153
- * const user = { id: '1', name: '张三', email: 'zhangsan@example.com' };
154
- * await db.add('users', user);
155
- *
156
- * // 4. 获取数据
157
- * const retrievedUser = await db.get('users', '1');
158
- *
159
- * // 5. 更新数据
160
- * user.name = '张三 (已更新)';
161
- * await db.update('users', user);
162
- *
163
- * // 6. 获取所有数据
164
- * const allUsers = await db.getAll('users');
165
- *
166
- * // 7. 删除数据
167
- * await db.delete('users', '1');
168
- *
169
- * // 8. 清空存储对象
170
- * await db.clear('users');
171
- *
172
- * // 9. 关闭数据库连接
173
- * db.close();
174
- *
175
- * // 10. 检查当前使用的存储方式
176
- * const storageType = db.getCurrentStorage(); // 'indexDB' 或 'localStorage'
177
- */
178
- export default IndexDBManager;
@@ -1,3 +0,0 @@
1
- import { LibraryItem } from './type';
2
- declare const _default: LibraryItem;
3
- export default _default;
@@ -1,37 +0,0 @@
1
- import { Locale, LibraryItem, LoadLibraryByUrlParams } from "./type";
2
- import App from "../app";
3
- export interface LocalesOptions {
4
- locale?: Locale;
5
- library?: {
6
- [key in Locale]: LibraryItem;
7
- };
8
- }
9
- export declare class Locales {
10
- private app;
11
- locale: string;
12
- library: {
13
- [key in Locale]: LibraryItem;
14
- };
15
- constructor(app: App, options?: LocalesOptions);
16
- getLocale: () => string;
17
- getCurrentTexts: (locale?: Locale) => {
18
- [key: string]: string;
19
- };
20
- setLocale: (locale: Locale, reload?: boolean) => void;
21
- getText: (id: string, locale?: Locale) => string;
22
- isCN: () => boolean;
23
- loadLibraryByUrl: (urls: LoadLibraryByUrlParams) => Promise<{
24
- [x: string]: LibraryItem;
25
- }>;
26
- loadLibraryByItems(libraryList: LibraryItem[]): void;
27
- loadLibrary: (urls: LoadLibraryByUrlParams) => Promise<{
28
- [x: string]: LibraryItem;
29
- }>;
30
- translation: (text: string | {
31
- [key: Locale]: string;
32
- }, locale?: Locale) => string | number;
33
- getLibraryByData: (data: LibraryItem[]) => LibraryItem;
34
- createTextsByLibrary: (id: string, library?: { [key in Locale]: LibraryItem; }) => {
35
- [x: string]: string;
36
- };
37
- }
@@ -1,3 +0,0 @@
1
- import { LibraryItem } from './type';
2
- declare const _default: LibraryItem;
3
- export default _default;
@@ -1,19 +0,0 @@
1
- export type Locale = 'original' | 'en' | 'zh-CN' | 'zh-HK' | string;
2
- export type MultiLanguage = {
3
- [key in Locale]: string;
4
- };
5
- export interface LibraryItem {
6
- locale: Locale;
7
- name: string;
8
- translations: {
9
- [key: string]: string;
10
- };
11
- [key: string]: any;
12
- }
13
- export interface LocaleConfig {
14
- locale: Locale;
15
- library: {
16
- [key in Locale]: LibraryItem;
17
- };
18
- }
19
- export type LoadLibraryByUrlParams = (string | Promise<LibraryItem> | (() => Promise<LibraryItem>) | LibraryItem)[];
@@ -1,3 +0,0 @@
1
- import { LibraryItem } from './type';
2
- declare const _default: LibraryItem;
3
- export default _default;
@@ -1,3 +0,0 @@
1
- import { LibraryItem } from './type';
2
- declare const _default: LibraryItem;
3
- export default _default;
@@ -1,11 +0,0 @@
1
- interface contentItem {
2
- key: string;
3
- value: string;
4
- }
5
- interface sendWebhookProps {
6
- title: string;
7
- content: contentItem[];
8
- webhook: string;
9
- }
10
- export declare const sendWarningLog: ({ title, content, webhook }: sendWebhookProps) => Promise<any>;
11
- export {};