@pisell/core 1.0.0 → 1.0.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 (267) hide show
  1. package/es/app/app.d.ts +83 -0
  2. package/es/app/app.js +151 -0
  3. package/es/app/const.d.ts +4 -0
  4. package/es/app/const.js +6 -0
  5. package/es/app/index.d.ts +14 -0
  6. package/es/app/index.js +52 -0
  7. package/es/applicationManager/application.d.ts +50 -0
  8. package/es/applicationManager/application.js +223 -0
  9. package/es/applicationManager/index.d.ts +13 -0
  10. package/es/applicationManager/index.js +190 -0
  11. package/es/config.d.ts +3 -3
  12. package/es/config.js +5 -5
  13. package/es/cookie/index.d.ts +13 -0
  14. package/es/cookie/index.js +47 -0
  15. package/es/css/global.less +73 -0
  16. package/es/css/index.less +31 -0
  17. package/es/css/variables.css +84 -0
  18. package/es/data/index.d.ts +8 -0
  19. package/es/data/index.js +16 -0
  20. package/es/{locales → history}/config.d.ts +5 -5
  21. package/es/history/config.js +43 -0
  22. package/es/history/index.d.ts +20 -0
  23. package/es/history/index.js +41 -0
  24. package/es/history/type.d.ts +2 -0
  25. package/es/hooks/index.d.ts +12 -0
  26. package/es/hooks/index.js +13 -0
  27. package/es/hooks/useDelayedValue/index.d.ts +2 -0
  28. package/es/hooks/useDelayedValue/index.js +26 -0
  29. package/es/hooks/useDispatch/index.d.ts +2 -0
  30. package/es/hooks/useDispatch/index.js +2 -0
  31. package/es/hooks/useLowCode/index.d.ts +13 -0
  32. package/es/hooks/useLowCode/index.js +74 -0
  33. package/es/hooks/useStore/index.d.ts +6 -0
  34. package/es/hooks/useStore/index.js +11 -0
  35. package/es/index.d.ts +1 -2
  36. package/es/index.js +9 -2
  37. package/es/indexDB/index.d.ts +178 -0
  38. package/es/indexDB/index.js +542 -0
  39. package/es/locales/en.d.ts +2 -1
  40. package/es/locales/en.js +5 -1
  41. package/es/locales/index.d.ts +37 -53
  42. package/es/locales/index.js +213 -70
  43. package/es/locales/original.d.ts +3 -0
  44. package/es/locales/original.js +7 -0
  45. package/es/locales/type.d.ts +15 -5
  46. package/es/locales/zh-CN.d.ts +2 -1
  47. package/es/locales/zh-CN.js +5 -1
  48. package/es/locales/zh-HK.d.ts +2 -1
  49. package/es/locales/zh-HK.js +5 -1
  50. package/es/logger/feishu.d.ts +11 -0
  51. package/es/logger/feishu.js +50 -0
  52. package/es/logger/index.d.ts +122 -0
  53. package/es/logger/index.js +539 -0
  54. package/es/menuManager/hooks.d.ts +17 -0
  55. package/es/menuManager/hooks.js +136 -0
  56. package/es/menuManager/index.d.ts +28 -0
  57. package/es/menuManager/index.js +142 -0
  58. package/es/models/global.d.ts +32 -0
  59. package/es/models/global.js +66 -0
  60. package/es/models/index.d.ts +45 -0
  61. package/es/models/index.js +65 -0
  62. package/es/models/type.d.ts +2 -0
  63. package/es/models/type.js +1 -0
  64. package/es/plugin/index.d.ts +0 -0
  65. package/es/plugin/index.js +0 -0
  66. package/es/pubsub/example.d.ts +5 -0
  67. package/es/pubsub/example.js +92 -0
  68. package/es/pubsub/index.d.ts +63 -0
  69. package/es/pubsub/index.js +144 -0
  70. package/es/request/cache.d.ts +46 -0
  71. package/es/request/cache.js +311 -0
  72. package/es/request/cancelToken.d.ts +38 -0
  73. package/es/request/cancelToken.js +59 -0
  74. package/es/request/config.d.ts +3 -0
  75. package/es/request/config.js +58 -0
  76. package/es/request/constants.d.ts +2 -0
  77. package/es/request/constants.js +6 -0
  78. package/es/request/index.d.ts +24 -0
  79. package/es/request/index.js +176 -0
  80. package/es/request/pisell2Request.d.ts +6 -0
  81. package/es/request/pisell2Request.js +62 -0
  82. package/es/request/type.d.ts +41 -0
  83. package/es/request/type.js +1 -0
  84. package/es/request/utils.d.ts +46 -0
  85. package/es/request/utils.js +147 -0
  86. package/es/routes/config.d.ts +7 -0
  87. package/es/routes/config.js +17 -0
  88. package/es/routes/index.d.ts +28 -0
  89. package/es/routes/index.js +148 -0
  90. package/es/socket/components/SocketMonitorPage.d.ts +6 -0
  91. package/es/socket/components/SocketMonitorPage.js +485 -0
  92. package/es/socket/components/index.d.ts +2 -0
  93. package/es/socket/components/index.js +2 -0
  94. package/es/socket/constants.d.ts +33 -0
  95. package/es/socket/constants.js +39 -0
  96. package/es/socket/events.d.ts +31 -0
  97. package/es/socket/events.js +19 -0
  98. package/es/socket/heartbeat.d.ts +66 -0
  99. package/es/socket/heartbeat.js +184 -0
  100. package/es/socket/index.d.ts +61 -0
  101. package/es/socket/index.js +246 -0
  102. package/es/socket/monitor.d.ts +169 -0
  103. package/es/socket/monitor.js +447 -0
  104. package/es/socket/reconnect.d.ts +61 -0
  105. package/es/socket/reconnect.js +199 -0
  106. package/es/socket/socket.d.ts +129 -0
  107. package/es/socket/socket.js +595 -0
  108. package/es/socket/types.d.ts +85 -0
  109. package/es/socket/types.js +35 -0
  110. package/es/storage/index.d.ts +17 -0
  111. package/es/storage/index.js +56 -0
  112. package/es/tasks/index.d.ts +77 -0
  113. package/es/tasks/index.js +743 -0
  114. package/es/tasks/type.d.ts +62 -0
  115. package/es/tasks/type.js +1 -0
  116. package/es/tasks/useTasks.d.ts +5 -0
  117. package/es/tasks/useTasks.js +25 -0
  118. package/es/type.d.ts +1 -1
  119. package/es/variables/VariablesProvider.d.ts +7 -0
  120. package/es/variables/VariablesProvider.js +12 -0
  121. package/es/variables/config.d.ts +3 -0
  122. package/es/variables/config.js +16 -0
  123. package/es/variables/index.d.ts +6 -0
  124. package/es/variables/index.js +5 -0
  125. package/es/variables/type.d.ts +2 -0
  126. package/es/variables/type.js +1 -0
  127. package/es/website/index.d.ts +6 -0
  128. package/es/website/index.js +65 -0
  129. package/lib/app/app.d.ts +83 -0
  130. package/lib/app/app.js +125 -0
  131. package/lib/app/const.d.ts +4 -0
  132. package/lib/app/const.js +33 -0
  133. package/lib/app/index.d.ts +14 -0
  134. package/lib/app/index.js +76 -0
  135. package/lib/applicationManager/application.d.ts +50 -0
  136. package/lib/applicationManager/application.js +110 -0
  137. package/lib/applicationManager/index.d.ts +13 -0
  138. package/lib/applicationManager/index.js +76 -0
  139. package/lib/config.d.ts +3 -3
  140. package/lib/cookie/index.d.ts +13 -0
  141. package/lib/cookie/index.js +64 -0
  142. package/lib/css/global.less +73 -0
  143. package/lib/css/index.less +31 -0
  144. package/lib/css/variables.css +84 -0
  145. package/lib/data/index.d.ts +8 -0
  146. package/lib/data/index.js +35 -0
  147. package/lib/{locales → history}/config.d.ts +5 -5
  148. package/lib/history/config.js +41 -0
  149. package/lib/history/index.d.ts +20 -0
  150. package/lib/history/index.js +58 -0
  151. package/lib/history/type.d.ts +2 -0
  152. package/lib/history/type.js +17 -0
  153. package/lib/hooks/index.d.ts +12 -0
  154. package/lib/{date → hooks}/index.js +14 -20
  155. package/lib/hooks/useDelayedValue/index.d.ts +2 -0
  156. package/lib/hooks/useDelayedValue/index.js +36 -0
  157. package/lib/hooks/useDispatch/index.d.ts +2 -0
  158. package/lib/hooks/useDispatch/index.js +26 -0
  159. package/lib/hooks/useLowCode/index.d.ts +13 -0
  160. package/lib/hooks/useLowCode/index.js +75 -0
  161. package/lib/hooks/useStore/index.d.ts +6 -0
  162. package/lib/hooks/useStore/index.js +33 -0
  163. package/lib/index.d.ts +1 -2
  164. package/lib/index.js +3 -22
  165. package/lib/indexDB/index.d.ts +178 -0
  166. package/lib/indexDB/index.js +277 -0
  167. package/lib/locales/en.d.ts +2 -1
  168. package/lib/locales/en.js +5 -1
  169. package/lib/locales/index.d.ts +37 -53
  170. package/lib/locales/index.js +130 -41
  171. package/lib/locales/original.d.ts +3 -0
  172. package/lib/locales/original.js +31 -0
  173. package/lib/locales/type.d.ts +15 -5
  174. package/lib/locales/zh-CN.d.ts +2 -1
  175. package/lib/locales/zh-CN.js +5 -1
  176. package/lib/locales/zh-HK.d.ts +2 -1
  177. package/lib/locales/zh-HK.js +5 -1
  178. package/lib/logger/feishu.d.ts +11 -0
  179. package/lib/logger/feishu.js +52 -0
  180. package/lib/logger/index.d.ts +122 -0
  181. package/lib/logger/index.js +288 -0
  182. package/lib/menuManager/hooks.d.ts +17 -0
  183. package/lib/menuManager/hooks.js +135 -0
  184. package/lib/menuManager/index.d.ts +28 -0
  185. package/lib/menuManager/index.js +110 -0
  186. package/lib/models/global.d.ts +32 -0
  187. package/lib/models/global.js +62 -0
  188. package/lib/models/index.d.ts +45 -0
  189. package/lib/models/index.js +69 -0
  190. package/lib/models/type.d.ts +2 -0
  191. package/lib/models/type.js +17 -0
  192. package/lib/plugin/index.d.ts +0 -0
  193. package/lib/plugin/index.js +0 -0
  194. package/lib/pubsub/example.d.ts +5 -0
  195. package/lib/pubsub/example.js +61 -0
  196. package/lib/pubsub/index.d.ts +63 -0
  197. package/lib/pubsub/index.js +129 -0
  198. package/lib/request/cache.d.ts +46 -0
  199. package/lib/request/cache.js +159 -0
  200. package/lib/request/cancelToken.d.ts +38 -0
  201. package/lib/request/cancelToken.js +59 -0
  202. package/lib/request/config.d.ts +3 -0
  203. package/lib/request/config.js +64 -0
  204. package/lib/request/constants.d.ts +2 -0
  205. package/lib/request/constants.js +34 -0
  206. package/lib/request/index.d.ts +24 -0
  207. package/lib/request/index.js +147 -0
  208. package/lib/request/pisell2Request.d.ts +6 -0
  209. package/lib/request/pisell2Request.js +75 -0
  210. package/lib/request/type.d.ts +41 -0
  211. package/lib/request/type.js +17 -0
  212. package/lib/request/utils.d.ts +46 -0
  213. package/lib/request/utils.js +113 -0
  214. package/lib/routes/config.d.ts +7 -0
  215. package/lib/routes/config.js +50 -0
  216. package/lib/routes/index.d.ts +28 -0
  217. package/lib/routes/index.js +118 -0
  218. package/lib/socket/components/SocketMonitorPage.d.ts +6 -0
  219. package/lib/socket/components/SocketMonitorPage.js +346 -0
  220. package/lib/socket/components/index.d.ts +2 -0
  221. package/lib/socket/components/index.js +39 -0
  222. package/lib/socket/constants.d.ts +33 -0
  223. package/lib/socket/constants.js +62 -0
  224. package/lib/socket/events.d.ts +31 -0
  225. package/lib/socket/events.js +44 -0
  226. package/lib/socket/heartbeat.d.ts +66 -0
  227. package/lib/socket/heartbeat.js +152 -0
  228. package/lib/socket/index.d.ts +61 -0
  229. package/lib/socket/index.js +200 -0
  230. package/lib/socket/monitor.d.ts +169 -0
  231. package/lib/socket/monitor.js +346 -0
  232. package/lib/socket/reconnect.d.ts +61 -0
  233. package/lib/socket/reconnect.js +153 -0
  234. package/lib/socket/socket.d.ts +129 -0
  235. package/lib/socket/socket.js +410 -0
  236. package/lib/socket/types.d.ts +85 -0
  237. package/lib/socket/types.js +36 -0
  238. package/lib/storage/index.d.ts +17 -0
  239. package/lib/storage/index.js +63 -0
  240. package/lib/tasks/index.d.ts +77 -0
  241. package/lib/tasks/index.js +438 -0
  242. package/lib/tasks/type.d.ts +62 -0
  243. package/lib/{date → tasks}/type.js +1 -1
  244. package/lib/tasks/useTasks.d.ts +5 -0
  245. package/lib/tasks/useTasks.js +37 -0
  246. package/lib/type.d.ts +1 -1
  247. package/lib/variables/VariablesProvider.d.ts +7 -0
  248. package/lib/{locales/config.js → variables/VariablesProvider.js} +17 -29
  249. package/lib/variables/config.d.ts +3 -0
  250. package/lib/{date → variables}/config.js +2 -7
  251. package/lib/variables/index.d.ts +6 -0
  252. package/lib/variables/index.js +29 -0
  253. package/lib/variables/type.d.ts +2 -0
  254. package/lib/variables/type.js +17 -0
  255. package/lib/website/index.d.ts +6 -0
  256. package/lib/website/index.js +75 -0
  257. package/package.json +22 -5
  258. package/es/date/config.d.ts +0 -3
  259. package/es/date/config.js +0 -21
  260. package/es/date/index.d.ts +0 -7
  261. package/es/date/index.js +0 -22
  262. package/es/date/type.d.ts +0 -7
  263. package/es/locales/config.js +0 -57
  264. package/lib/date/config.d.ts +0 -3
  265. package/lib/date/index.d.ts +0 -7
  266. package/lib/date/type.d.ts +0 -7
  267. /package/es/{date → history}/type.js +0 -0
@@ -0,0 +1,110 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/applicationManager/application.tsx
20
+ var application_exports = {};
21
+ __export(application_exports, {
22
+ Application: () => Application
23
+ });
24
+ module.exports = __toCommonJS(application_exports);
25
+ var Application = class {
26
+ constructor(options, app) {
27
+ // 应用内的interface
28
+ this.interfaces = /* @__PURE__ */ new Map();
29
+ // 应用内的组件
30
+ this.components = /* @__PURE__ */ new Map();
31
+ // 应用内的函数, 比如跳转登录页面的方法
32
+ this.functions = /* @__PURE__ */ new Map();
33
+ this.options = options;
34
+ this.name = options.app_name;
35
+ this.app = app;
36
+ this.initInterfaces(options.interfaces);
37
+ this.initFunctions(options.functions);
38
+ }
39
+ async afterAdd(application) {
40
+ if (application.options.locales) {
41
+ this.app.locales.loadLibraryByUrl(application.options.locales);
42
+ }
43
+ }
44
+ async beforeLoad() {
45
+ }
46
+ async load() {
47
+ this.interfaces.forEach((item, key) => {
48
+ this.app.router.add(item.router, item);
49
+ });
50
+ }
51
+ initInterfaces(interfaces) {
52
+ interfaces.forEach(async (interfaceItem) => {
53
+ let _interface = await this.loadInterface(interfaceItem);
54
+ if (interfaceItem.category === "page") {
55
+ this.setInterface(interfaceItem.page_code, _interface);
56
+ }
57
+ if (interfaceItem.category === "component") {
58
+ this.setComponent(interfaceItem.page_code, _interface);
59
+ }
60
+ if (interfaceItem.category === "function") {
61
+ this.setFunction(interfaceItem.page_code, _interface);
62
+ }
63
+ });
64
+ }
65
+ initFunctions(functions) {
66
+ (functions || []).forEach(async (functionItem) => {
67
+ this.setFunction(functionItem.function_code, functionItem);
68
+ });
69
+ }
70
+ async loadInterface(interfaceItem) {
71
+ if (interfaceItem.Component) {
72
+ return interfaceItem;
73
+ }
74
+ if (interfaceItem.page_type === "low_code") {
75
+ }
76
+ if (interfaceItem.page_type === "code") {
77
+ }
78
+ return interfaceItem;
79
+ }
80
+ setInterface(code, interfaceItem) {
81
+ this.interfaces.set(code, interfaceItem);
82
+ }
83
+ setComponent(code, component) {
84
+ this.components.set(code, component);
85
+ }
86
+ setFunction(code, functionItem) {
87
+ this.functions.set(code, functionItem);
88
+ }
89
+ getInterface(code) {
90
+ return this.interfaces.get(code);
91
+ }
92
+ getComponent(code) {
93
+ return this.components.get(code);
94
+ }
95
+ getFunction(code) {
96
+ return this.functions.get(code);
97
+ }
98
+ runFunction(code, params, ...args) {
99
+ var _a;
100
+ const _params = {
101
+ app: this.app,
102
+ ...params
103
+ };
104
+ return (_a = this.getFunction(code)) == null ? void 0 : _a.code(_params, ...args);
105
+ }
106
+ };
107
+ // Annotate the CommonJS export names for ESM import in node:
108
+ 0 && (module.exports = {
109
+ Application
110
+ });
@@ -0,0 +1,13 @@
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[], 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
+ }
@@ -0,0 +1,76 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/applicationManager/index.tsx
20
+ var applicationManager_exports = {};
21
+ __export(applicationManager_exports, {
22
+ ApplicationManager: () => ApplicationManager
23
+ });
24
+ module.exports = __toCommonJS(applicationManager_exports);
25
+ var import_application = require("./application");
26
+ var ApplicationManager = class {
27
+ constructor(applicationList = [], app) {
28
+ this.applicationList = applicationList;
29
+ this.app = app;
30
+ this.applications = /* @__PURE__ */ new Map();
31
+ this.app = app;
32
+ if (applicationList == null ? void 0 : applicationList.length) {
33
+ this.init(applicationList);
34
+ }
35
+ }
36
+ async init(applicationList) {
37
+ return new Promise(async (res, req) => {
38
+ applicationList.forEach(
39
+ async (application) => {
40
+ if (typeof application === "object") {
41
+ application = new import_application.Application(
42
+ application,
43
+ this.app
44
+ );
45
+ }
46
+ await this.add(application);
47
+ }
48
+ );
49
+ await this.load();
50
+ res(true);
51
+ });
52
+ }
53
+ async add(application) {
54
+ this.applications.set(application.name, application);
55
+ await application.afterAdd(application);
56
+ }
57
+ get(appName) {
58
+ let application = this.applications.get(appName);
59
+ return application;
60
+ }
61
+ remove(appName) {
62
+ this.applications.delete(appName);
63
+ }
64
+ async load() {
65
+ for (const plugin of this.applications.values()) {
66
+ await plugin.beforeLoad();
67
+ }
68
+ for (const plugin of this.applications.values()) {
69
+ await plugin.load();
70
+ }
71
+ }
72
+ };
73
+ // Annotate the CommonJS export names for ESM import in node:
74
+ 0 && (module.exports = {
75
+ ApplicationManager
76
+ });
package/lib/config.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { UtilsConfig } from './type';
2
- export declare const setConfig: (newConfig: Partial<UtilsConfig>) => void;
3
- export declare const getConfig: () => UtilsConfig;
1
+ import { CoreConfig } from './type';
2
+ export declare const setConfig: (newConfig: Partial<CoreConfig>) => void;
3
+ export declare const getConfig: () => CoreConfig;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,64 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/cookie/index.ts
20
+ var cookie_exports = {};
21
+ __export(cookie_exports, {
22
+ default: () => cookie_default
23
+ });
24
+ module.exports = __toCommonJS(cookie_exports);
25
+ function setCookie(name, value, domain) {
26
+ let expires = "";
27
+ let cookieDomain = "";
28
+ if (domain) {
29
+ cookieDomain = "; domain=" + domain;
30
+ }
31
+ document.cookie = name + "=" + (value || "") + expires + cookieDomain + "; path=/";
32
+ }
33
+ function getCookie(name) {
34
+ const nameEQ = name + "=";
35
+ const ca = document.cookie.split(";");
36
+ for (let i = 0; i < ca.length; i++) {
37
+ let c = ca[i];
38
+ while (c.charAt(0) === " ")
39
+ c = c.substring(1, c.length);
40
+ if (c.indexOf(nameEQ) === 0)
41
+ return c.substring(nameEQ.length, c.length);
42
+ }
43
+ return null;
44
+ }
45
+ function deleteCookie(name, domain) {
46
+ let cookieDomain = "";
47
+ if (domain) {
48
+ cookieDomain = "; domain=" + domain;
49
+ }
50
+ document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC" + cookieDomain + "; path=/;";
51
+ }
52
+ function checkCookie(name) {
53
+ return getCookie(name) !== null;
54
+ }
55
+ function updateCookie(name, value, domain) {
56
+ setCookie(name, value, domain);
57
+ }
58
+ var cookie_default = {
59
+ setCookie,
60
+ getCookie,
61
+ deleteCookie,
62
+ checkCookie,
63
+ updateCookie
64
+ };
@@ -0,0 +1,73 @@
1
+ .disabled-select {
2
+ -webkit-user-select: none;
3
+ /* Safari */
4
+ -moz-user-select: none;
5
+ /* Firefox */
6
+ -ms-user-select: none;
7
+ /* IE10+/Edge */
8
+ user-select: none;
9
+ /* Standard syntax */
10
+ }
11
+
12
+ ion-segment-button {
13
+ font-weight: 600;
14
+ --color-checked: var(--ion-color-primary);
15
+ }
16
+
17
+ .tab-bar {
18
+ //height: 78px;
19
+ --background: #fff;
20
+ padding: 10px 0;
21
+
22
+ .tab-bar-icon {
23
+ margin-bottom: 6px;
24
+ //font-size: 24px;
25
+ }
26
+
27
+ .tab-bar-name {
28
+ font-size: 12px;
29
+ font-style: normal;
30
+ font-weight: 600;
31
+ line-height: 18px;
32
+ /* 150% */
33
+ }
34
+ }
35
+
36
+ ul {
37
+ padding: 0;
38
+ margin: 0;
39
+ }
40
+
41
+ li {
42
+ list-style: none;
43
+ padding: 0;
44
+ margin: 0;
45
+ }
46
+
47
+
48
+ /*默认滚动条样式*/
49
+ ::-webkit-scrollbar {
50
+ width: 8px;
51
+ height: 8px;
52
+ }
53
+
54
+ ::-webkit-scrollbar-track {
55
+ background: #f1f1f1;
56
+ border-radius: 4px;
57
+ }
58
+
59
+ ::-webkit-scrollbar-thumb {
60
+ background: #c1c1c1;
61
+ border-radius: 4px;
62
+
63
+ &:hover {
64
+ background: #a8a8a8;
65
+ }
66
+ }
67
+
68
+ html.plt-mobile ion-app {
69
+ -webkit-user-select: auto;
70
+ -moz-user-select: auto;
71
+ -ms-user-select: auto;
72
+ user-select: auto;
73
+ }
@@ -0,0 +1,31 @@
1
+ /* Core CSS required for Ionic components to work properly */
2
+ @import "@ionic/react/css/core.css";
3
+
4
+ /* Basic CSS for apps built with Ionic */
5
+ @import "@ionic/react/css/normalize.css";
6
+ @import "@ionic/react/css/structure.css";
7
+ @import "@ionic/react/css/typography.css";
8
+
9
+ /* Optional CSS utils that can be commented out */
10
+ @import "@ionic/react/css/padding.css";
11
+ @import "@ionic/react/css/float-elements.css";
12
+ @import "@ionic/react/css/text-alignment.css";
13
+ @import "@ionic/react/css/text-transformation.css";
14
+ @import "@ionic/react/css/flex-utils.css";
15
+ @import "@ionic/react/css/display.css";
16
+
17
+ /**
18
+ * Ionic Dark Mode
19
+ * -----------------------------------------------------
20
+ * For more info, please see:
21
+ * https://ionicframework.com/docs/theming/dark-mode
22
+ */
23
+
24
+ /* @import '@ionic/react/css/palettes/dark.always.css'; */
25
+ /* @import '@ionic/react/css/palettes/dark.class.css'; */
26
+ // @import "@ionic/react/css/palettes/dark.system.css";
27
+
28
+ /* Theme variables */
29
+ @import "./variables.css";
30
+
31
+ @import "./global.less";
@@ -0,0 +1,84 @@
1
+ /* For information on how to create your own theme, please see:
2
+ http://ionicframework.com/docs/theming/ */
3
+
4
+ :root {
5
+ --ion-platform: ios;
6
+ --ion-color-primary: #5D3F9F;
7
+ --ion-color-primary-rgb: 93,63,159;
8
+ --ion-color-primary-contrast: #ffffff;
9
+ --ion-color-primary-contrast-rgb: 255,255,255;
10
+ --ion-color-primary-shade: #52378c;
11
+ --ion-color-primary-tint: #6d52a9;
12
+
13
+ --ion-color-secondary: #7f56da;
14
+ --ion-color-secondary-rgb: 127,86,218;
15
+ --ion-color-secondary-contrast: #ffffff;
16
+ --ion-color-secondary-contrast-rgb: 255,255,255;
17
+ --ion-color-secondary-shade: #704cc0;
18
+ --ion-color-secondary-tint: #8c67de;
19
+
20
+ --ion-color-tertiary: #eee5ff;
21
+ --ion-color-tertiary-rgb: 238,229,255;
22
+ --ion-color-tertiary-contrast: #000000;
23
+ --ion-color-tertiary-contrast-rgb: 0,0,0;
24
+ --ion-color-tertiary-shade: #d1cae0;
25
+ --ion-color-tertiary-tint: #f0e8ff;
26
+
27
+ /** success **/
28
+ --ion-color-success: #2dd36f;
29
+ --ion-color-success-rgb: 45, 211, 111;
30
+ --ion-color-success-contrast: #ffffff;
31
+ --ion-color-success-contrast-rgb: 255, 255, 255;
32
+ --ion-color-success-shade: #28ba62;
33
+ --ion-color-success-tint: #42d77d;
34
+
35
+ /** warning **/
36
+ --ion-color-warning: #ffc409;
37
+ --ion-color-warning-rgb: 255, 196, 9;
38
+ --ion-color-warning-contrast: #000000;
39
+ --ion-color-warning-contrast-rgb: 0, 0, 0;
40
+ --ion-color-warning-shade: #e0ac08;
41
+ --ion-color-warning-tint: #ffca22;
42
+
43
+ /** danger **/
44
+ --ion-color-danger: #eb445a;
45
+ --ion-color-danger-rgb: 235, 68, 90;
46
+ --ion-color-danger-contrast: #ffffff;
47
+ --ion-color-danger-contrast-rgb: 255, 255, 255;
48
+ --ion-color-danger-shade: #cf3c4f;
49
+ --ion-color-danger-tint: #ed576b;
50
+
51
+ /** dark **/
52
+ --ion-color-dark: #222428;
53
+ --ion-color-dark-rgb: 34, 36, 40;
54
+ --ion-color-dark-contrast: #ffffff;
55
+ --ion-color-dark-contrast-rgb: 255, 255, 255;
56
+ --ion-color-dark-shade: #1e2023;
57
+ --ion-color-dark-tint: #383a3e;
58
+
59
+ /** medium **/
60
+ --ion-color-medium: #92949c;
61
+ --ion-color-medium-rgb: 146, 148, 156;
62
+ --ion-color-medium-contrast: #ffffff;
63
+ --ion-color-medium-contrast-rgb: 255, 255, 255;
64
+ --ion-color-medium-shade: #808289;
65
+ --ion-color-medium-tint: #9d9fa6;
66
+
67
+ /** light **/
68
+ --ion-color-light: #f4f5f8;
69
+ --ion-color-light-rgb: 244, 245, 248;
70
+ --ion-color-light-contrast: #000000;
71
+ --ion-color-light-contrast-rgb: 0, 0, 0;
72
+ --ion-color-light-shade: #d7d8da;
73
+ --ion-color-light-tint: #f5f6f9;
74
+
75
+ --ion-toolbar-background: #ffffff;
76
+
77
+
78
+ --theme-color: var(--ion-color-primary);
79
+
80
+ --ion-text-color: var(--ion-color-dark);
81
+
82
+ --theme-a-color: #7F56DA;
83
+
84
+ }
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,35 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/data/index.ts
20
+ var data_exports = {};
21
+ __export(data_exports, {
22
+ Data: () => Data
23
+ });
24
+ module.exports = __toCommonJS(data_exports);
25
+ var Data = class {
26
+ constructor(app) {
27
+ this.app = app;
28
+ this.storage = app.storage;
29
+ this.store = app.models;
30
+ }
31
+ };
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ Data
35
+ });
@@ -1,11 +1,11 @@
1
- import { LocaleConfig } from './type';
1
+ import { HistoryConfig } from './type';
2
2
  /**
3
3
  * @title: 默认配置
4
4
  * @description:
5
5
  * @return {*}
6
6
  * @Author: zhiwei.Wang
7
7
  */
8
- export declare const defaultConfig: LocaleConfig;
8
+ export declare const defaultConfig: HistoryConfig;
9
9
  /**
10
10
  * @title: 设置配置
11
11
  * @description:
@@ -13,12 +13,12 @@ export declare const defaultConfig: LocaleConfig;
13
13
  * @return {*}
14
14
  * @Author: zhiwei.Wang
15
15
  */
16
- export declare const setConfig: (newConfig: Partial<LocaleConfig>) => LocaleConfig;
16
+ export declare const setConfig: (newConfig: Partial<HistoryConfig>) => HistoryConfig;
17
17
  /**
18
18
  * @title: 获取配置
19
19
  * @description:
20
- * @param {*} LocaleConfig
20
+ * @param {*} HistoryConfig
21
21
  * @return {*}
22
22
  * @Author: zhiwei.Wang
23
23
  */
24
- export declare const getConfig: () => LocaleConfig;
24
+ export declare const getConfig: () => HistoryConfig;
@@ -0,0 +1,41 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/history/config.ts
20
+ var config_exports = {};
21
+ __export(config_exports, {
22
+ defaultConfig: () => defaultConfig,
23
+ getConfig: () => getConfig,
24
+ setConfig: () => setConfig
25
+ });
26
+ module.exports = __toCommonJS(config_exports);
27
+ var defaultConfig = {};
28
+ var config = {
29
+ ...defaultConfig
30
+ };
31
+ var setConfig = (newConfig) => {
32
+ config = { ...config, ...newConfig };
33
+ return config;
34
+ };
35
+ var getConfig = () => config;
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ defaultConfig,
39
+ getConfig,
40
+ setConfig
41
+ });
@@ -0,0 +1,20 @@
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
+ }
@@ -0,0 +1,58 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/history/index.ts
20
+ var history_exports = {};
21
+ __export(history_exports, {
22
+ History: () => History
23
+ });
24
+ module.exports = __toCommonJS(history_exports);
25
+ var import_history = require("history");
26
+ var import_react_router_dom = require("react-router-dom");
27
+ var History = class {
28
+ constructor(app, options) {
29
+ this.useHistory = import_react_router_dom.useHistory;
30
+ this.useLocation = import_react_router_dom.useLocation;
31
+ this.useParams = import_react_router_dom.useParams;
32
+ this.push = (path, state) => {
33
+ this.instance.push(path, state);
34
+ };
35
+ this.replace = (path, state) => {
36
+ this.instance.replace(path, state);
37
+ };
38
+ this.reload = () => {
39
+ window.location.reload();
40
+ };
41
+ this.reloadTo = (path) => {
42
+ window.location.href = path;
43
+ };
44
+ this.externalPage = (path) => {
45
+ window.open(path);
46
+ };
47
+ this.goLogin = () => {
48
+ var _a, _b;
49
+ return (_b = (_a = this.app.applicationManager.get("login")) == null ? void 0 : _a.runFunction) == null ? void 0 : _b.call(_a, "goLogin");
50
+ };
51
+ this.app = app;
52
+ this.instance = (0, import_history.createBrowserHistory)({ basename: (options == null ? void 0 : options.basename) || "/" });
53
+ }
54
+ };
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ History
58
+ });
@@ -0,0 +1,2 @@
1
+ export interface HistoryConfig {
2
+ }