halo-fe 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. package/dist/main.js +3453 -2365
  2. package/dist/style.css +1 -1
  3. package/dist/{vendor-crypto-js-B6Qe-gIg.js → vendor-crypto-js-DWn5nTKL.js} +3 -1
  4. package/dist/vendor-xlsx-js-style-DMPNZPOx.js +11862 -0
  5. package/esm/coms/Code.vue.d.ts +1 -1
  6. package/esm/coms/Fill.vue.d.ts +15 -0
  7. package/esm/coms/RichText.vue.d.ts +24 -0
  8. package/esm/coms/Scroller.vue.d.ts +28 -0
  9. package/esm/coms/index.d.ts +5 -1
  10. package/esm/coms/types/RichTextOptions.d.ts +14 -0
  11. package/esm/coms/types/RichTextProps.d.ts +12 -0
  12. package/esm/coms/types/ScrollerProps.d.ts +15 -0
  13. package/esm/coms/types/index.d.ts +4 -1
  14. package/esm/drivers/IDisposable.d.ts +4 -0
  15. package/esm/drivers/bridges/index.d.ts +1 -0
  16. package/esm/drivers/cdns/index.d.ts +2 -2
  17. package/esm/drivers/driver-helper.d.ts +46 -0
  18. package/esm/drivers/encoders/Encoder.d.ts +6 -1
  19. package/esm/drivers/encoders/EncoderFactory.d.ts +0 -1
  20. package/esm/drivers/encoders/IEncoder.d.ts +7 -3
  21. package/esm/drivers/encoders/implement/Base64Encoder.d.ts +1 -1
  22. package/esm/drivers/encoders/index.d.ts +2 -2
  23. package/esm/drivers/excels/index.d.ts +2 -3
  24. package/esm/drivers/explainers/index.d.ts +1 -2
  25. package/esm/drivers/factories/Factories.d.ts +55 -0
  26. package/esm/drivers/factories/Factory.d.ts +9 -0
  27. package/esm/drivers/factories/IFactory.d.ts +4 -0
  28. package/esm/drivers/factories/implement/CdnFactory.d.ts +13 -0
  29. package/esm/drivers/factories/implement/EncoderFactory.d.ts +17 -0
  30. package/esm/drivers/factories/implement/ExcelFactory.d.ts +13 -0
  31. package/esm/drivers/factories/implement/ExplainerFactory.d.ts +6 -0
  32. package/esm/drivers/factories/implement/FeatureFactory.d.ts +13 -0
  33. package/esm/drivers/factories/implement/HasherFactory.d.ts +11 -0
  34. package/esm/drivers/factories/implement/HttpFactory.d.ts +18 -0
  35. package/esm/drivers/factories/implement/ProviderFactory.d.ts +18 -0
  36. package/esm/drivers/factories/implement/SignerFactory.d.ts +13 -0
  37. package/esm/drivers/factories/implement/SsoFactory.d.ts +17 -0
  38. package/esm/drivers/factories/implement/TaskFactory.d.ts +9 -0
  39. package/esm/drivers/factories/implement/VideoFactory.d.ts +3 -0
  40. package/esm/drivers/factories/implement/VoiceFactory.d.ts +6 -0
  41. package/esm/drivers/factories/implement/index.d.ts +11 -0
  42. package/esm/drivers/factories/index.d.ts +14 -26
  43. package/esm/drivers/features/index.d.ts +2 -3
  44. package/esm/drivers/hashers/HasherFactory.d.ts +0 -1
  45. package/esm/drivers/hashers/index.d.ts +2 -3
  46. package/esm/drivers/https/Http.d.ts +5 -5
  47. package/esm/drivers/https/HttpFactory.d.ts +0 -2
  48. package/esm/drivers/https/IHttp.d.ts +4 -4
  49. package/esm/drivers/https/entities/HttpResponse.d.ts +13 -1
  50. package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -0
  51. package/esm/drivers/https/implements/HaloHttp.d.ts +28 -4
  52. package/esm/drivers/https/index.d.ts +2 -3
  53. package/esm/drivers/index.d.ts +7 -1
  54. package/esm/drivers/providers/implements/CookieProvider.d.ts +3 -0
  55. package/esm/drivers/providers/implements/StorageHelper.d.ts +34 -0
  56. package/esm/drivers/providers/index.d.ts +2 -3
  57. package/esm/drivers/requesters/IRequester.d.ts +25 -0
  58. package/esm/drivers/requesters/Requester.d.ts +13 -0
  59. package/esm/drivers/requesters/RequesterFactory.d.ts +21 -0
  60. package/esm/drivers/requesters/entities/HttpRequest.d.ts +34 -0
  61. package/esm/drivers/requesters/entities/HttpResponse.d.ts +19 -0
  62. package/esm/drivers/requesters/implements/DefaultRequester.d.ts +12 -0
  63. package/esm/drivers/requesters/implements/LocalRequester.d.ts +43 -0
  64. package/esm/drivers/requesters/implements/MkRequester.d.ts +40 -0
  65. package/esm/drivers/requesters/index.d.ts +5 -0
  66. package/esm/drivers/signers/implements/DefaultSigner.d.ts +0 -2
  67. package/esm/drivers/signers/index.d.ts +2 -3
  68. package/esm/drivers/ssos/index.d.ts +2 -3
  69. package/esm/drivers/tasks/ITask.d.ts +12 -0
  70. package/esm/drivers/tasks/Task.d.ts +10 -0
  71. package/esm/drivers/tasks/implement/MemoryTask.d.ts +11 -0
  72. package/esm/drivers/tasks/index.d.ts +2 -0
  73. package/esm/drivers/videos/VideoFactory.d.ts +3 -0
  74. package/esm/drivers/videos/index.d.ts +1 -0
  75. package/esm/drivers/voices/IVoice.d.ts +2 -1
  76. package/esm/drivers/voices/Voice.d.ts +8 -0
  77. package/esm/drivers/voices/VoiceFactory.d.ts +6 -1
  78. package/esm/drivers/voices/implement/DefaultVoice.d.ts +4 -2
  79. package/esm/drivers/voices/implement/TencentVoice.d.ts +4 -2
  80. package/esm/drivers/voices/index.d.ts +1 -0
  81. package/esm/helpers/ArrayHelper.d.ts +98 -0
  82. package/esm/helpers/BrowserHelper.d.ts +10 -0
  83. package/esm/helpers/ComponentHelper.d.ts +18 -0
  84. package/esm/helpers/DictionaryHelper.d.ts +18 -0
  85. package/esm/helpers/DomHelper.d.ts +95 -0
  86. package/esm/helpers/EventHelper.d.ts +30 -0
  87. package/esm/helpers/FileHelper.d.ts +22 -0
  88. package/esm/helpers/HtmlHelper.d.ts +14 -0
  89. package/esm/helpers/ImageHelper.d.ts +10 -0
  90. package/esm/helpers/JsonHelper.d.ts +35 -0
  91. package/esm/helpers/MathHelper.d.ts +54 -0
  92. package/esm/helpers/MicroHelper.d.ts +10 -0
  93. package/esm/helpers/MountHelper.d.ts +14 -0
  94. package/esm/helpers/ObjectHelper.d.ts +38 -0
  95. package/esm/helpers/ScriptHelper.d.ts +31 -0
  96. package/esm/helpers/ScrollHelper.d.ts +14 -0
  97. package/esm/helpers/SignHelper.d.ts +14 -0
  98. package/esm/helpers/StringHelper.d.ts +94 -0
  99. package/esm/helpers/TaskHelper.d.ts +26 -0
  100. package/esm/helpers/TimeHelper.d.ts +66 -0
  101. package/esm/helpers/TreeHelper.d.ts +54 -0
  102. package/esm/helpers/TypeHelper.d.ts +26 -0
  103. package/esm/helpers/UrlHelper.d.ts +88 -0
  104. package/esm/helpers/index.d.ts +25 -26
  105. package/esm/helpers/json-helper.d.ts +4 -12
  106. package/esm/helpers/object-helper.d.ts +0 -4
  107. package/esm/helpers/time-helper.d.ts +3 -7
  108. package/esm/helpers/types/TreeNodeProp.d.ts +6 -0
  109. package/esm/helpers/types/index.d.ts +2 -0
  110. package/esm/helpers/url-helper.d.ts +2 -2
  111. package/esm/main.d.ts +5 -4
  112. package/esm/plugins/index.d.ts +2 -2
  113. package/esm/plugins/types/IMessager.d.ts +1 -1
  114. package/esm/{services/types/IMessager.d.ts → plugins/types/IMessenger.d.ts} +4 -4
  115. package/esm/plugins/types/index.d.ts +8 -5
  116. package/esm/repos/SettingRepo.d.ts +11 -0
  117. package/esm/repos/index.d.ts +3 -0
  118. package/esm/services/index.d.ts +14 -1
  119. package/esm/servs/IServ.d.ts +6 -0
  120. package/esm/servs/Serv.d.ts +4 -0
  121. package/esm/servs/ServFactory.d.ts +11 -0
  122. package/esm/servs/implement/ConfigServ.d.ts +66 -0
  123. package/esm/servs/implement/DriverServ.d.ts +36 -0
  124. package/esm/servs/implement/EnvServ.d.ts +14 -0
  125. package/esm/servs/implement/LogServ.d.ts +19 -0
  126. package/esm/servs/implement/SettingServ.d.ts +42 -0
  127. package/esm/servs/implement/SocketServ.d.ts +38 -0
  128. package/esm/servs/implement/UserServ.d.ts +47 -0
  129. package/esm/servs/index.d.ts +15 -0
  130. package/esm/stores/config.d.ts +6 -10
  131. package/esm/stores/driver.d.ts +6 -2
  132. package/esm/stores/index.d.ts +2 -3
  133. package/esm/stores/setting.d.ts +4 -0
  134. package/esm/stores/user.d.ts +7 -3
  135. package/esm/svcs/ISvc.d.ts +6 -0
  136. package/esm/svcs/Svc.d.ts +4 -0
  137. package/esm/svcs/SvcFactory.d.ts +11 -0
  138. package/esm/svcs/implement/ConfigSvc.d.ts +75 -0
  139. package/esm/svcs/implement/DriverSvc.d.ts +36 -0
  140. package/esm/svcs/implement/EnvSvc.d.ts +14 -0
  141. package/esm/svcs/implement/LogSvc.d.ts +19 -0
  142. package/esm/svcs/implement/SettingSvc.d.ts +42 -0
  143. package/esm/svcs/implement/SocketSvc.d.ts +38 -0
  144. package/esm/svcs/implement/UserSvc.d.ts +47 -0
  145. package/esm/svcs/index.d.ts +34 -0
  146. package/esm/svcs/proxies/driverSvc.d.ts +18 -0
  147. package/esm/svcs/proxies/index.d.ts +2 -0
  148. package/esm/thirds/index.d.ts +8 -0
  149. package/esm/types/CreateOptions.d.ts +18 -0
  150. package/esm/types/index.d.ts +2 -0
  151. package/esm/utilities/EventUtility.d.ts +39 -8
  152. package/esm/utilities/index.d.ts +1 -0
  153. package/esm/utilities/types/DragEvent.d.ts +11 -0
  154. package/esm/utilities/types/DragOptions.d.ts +28 -0
  155. package/esm/utilities/types/Position.d.ts +15 -0
  156. package/esm/utilities/types/Range.d.ts +10 -0
  157. package/esm/utilities/types/Rect.d.ts +6 -0
  158. package/esm/utilities/types/index.d.ts +5 -0
  159. package/package.json +9 -8
  160. package/dist/vendor-@vue-l0sNRNKZ.js +0 -1
  161. package/dist/vendor-pinia-DVLspbiC.js +0 -310
  162. package/dist/vendor-vue-demi-CIhrFbpB.js +0 -17
  163. package/esm/services/types/IMessage.d.ts +0 -14
  164. package/esm/services/types/index.d.ts +0 -2
@@ -1,30 +1,61 @@
1
+ import { DragOptions } from "./types";
1
2
  /**
2
3
  * 事件工具类
3
4
  */
4
5
  declare class EventUtility {
5
6
  resizeObserver: ResizeObserver;
7
+ element: Element;
6
8
  resizeHandler: any;
7
9
  /**
8
10
  * 大小改变事件,已防抖
9
11
  */
10
- resize: (element: Element, handler: Function, debounceMs?: number) => void;
12
+ resize: (element: Element, handler: (entries: ResizeObserverEntry[]) => void, debounceMs?: number) => void;
13
+ scrollElement: Element;
14
+ scrollHandler: (event: Event) => void;
11
15
  /**
12
- * 移除大小改变事件
16
+ * 滚动事件
17
+ */
18
+ scroll(element: Element, handler: (event: Event) => void): void;
19
+ /**
20
+ * 拖拽起始位置
21
+ */
22
+ dragStart: MouseEvent;
23
+ /**
24
+ * 拖拽起始数据,每次拖拽时,都会回调到拖拽方法的参数中
25
+ */
26
+ dragStartData: any;
27
+ dragElement: Element;
28
+ dragMouseDownHandler: (event: MouseEvent) => void;
29
+ /**
30
+ * 拖拽事件
31
+ */
32
+ drag(element: Element, options: DragOptions): void;
33
+ observeElement: Element;
34
+ observer: MutationObserver;
35
+ /**
36
+ * 观察DOM变动
37
+ */
38
+ observe(element: Element, handler: (mutations: MutationRecord[]) => void): void;
39
+ mouseDownElement: Element;
40
+ mouseDownHandler: (event: MouseEvent) => void;
41
+ mouseUpHandler: (event: MouseEvent) => void;
42
+ /**
43
+ * 鼠标按下
13
44
  */
14
- unresize: (element: Element) => void;
45
+ mouseDown(element: Element, mouseDown: (event: MouseEvent) => void, mouseUp: (event: MouseEvent) => void): void;
15
46
  lastDebounceTime: number;
16
47
  lastDebounceTimeout: any;
17
48
  /**
18
49
  * 事件防抖: time ms没重复触发才执行指定操作
19
50
  */
20
- debounce: (func: Function, time: number, args?: any) => void;
21
- /**
22
- * 清空防抖
23
- */
24
- clearDebounce: () => void;
51
+ debounce: (func: (args: any) => void, time: number, args?: any) => void;
25
52
  /**
26
53
  * 事件节流: 指定时间段内只第一次操作被触发
27
54
  */
28
55
  throttle: () => void;
56
+ /**
57
+ * 移除大小改变事件
58
+ */
59
+ dispose: () => void;
29
60
  }
30
61
  export default EventUtility;
@@ -1,4 +1,5 @@
1
1
  import MouseUtility from "./MouseUtility";
2
2
  import KeyboardUtility from "./KeyboardUtility";
3
3
  import EventUtility from "./EventUtility";
4
+ export * from "./types";
4
5
  export { MouseUtility, KeyboardUtility, EventUtility, };
@@ -0,0 +1,11 @@
1
+ import Position from "./Position";
2
+ /**
3
+ * 自定义拖拽事件
4
+ */
5
+ declare class DragEvent extends Position {
6
+ /**
7
+ * 吸附的方向
8
+ */
9
+ affix?: string;
10
+ }
11
+ export default DragEvent;
@@ -0,0 +1,28 @@
1
+ import Range from "./Range";
2
+ import DragEvent from "./DragEvent";
3
+ /**
4
+ * 拖拽选项
5
+ */
6
+ interface DragOptions {
7
+ /**
8
+ * 拖拽初始化
9
+ */
10
+ init: (event: MouseEvent) => any;
11
+ /**
12
+ * 拖拽事件
13
+ */
14
+ handler: (dragEvent: DragEvent, start: MouseEvent, data: any, first: boolean, event: MouseEvent) => void;
15
+ /**
16
+ * 拖拽结束事件
17
+ */
18
+ end?: (event: MouseEvent) => void;
19
+ /**
20
+ * 可拖拽范围
21
+ */
22
+ range?: Range;
23
+ /**
24
+ * 吸附检测的距离,设置吸附位置必须设置拖拽范围(依赖宽度等信息)
25
+ */
26
+ affix?: number;
27
+ }
28
+ export default DragOptions;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 位置
3
+ */
4
+ declare class Position {
5
+ /**
6
+ * 距窗口左边的距离
7
+ */
8
+ x: number;
9
+ /**
10
+ * 距窗口顶部的距离
11
+ */
12
+ y: number;
13
+ constructor(x?: number, y?: number);
14
+ }
15
+ export default Position;
@@ -0,0 +1,10 @@
1
+ import Position from "./Position";
2
+ /**
3
+ * 区域类
4
+ */
5
+ declare class Range extends Position {
6
+ width: number;
7
+ height: number;
8
+ constructor(x: number, y: number, width: number, height: number);
9
+ }
10
+ export default Range;
@@ -0,0 +1,6 @@
1
+ import Position from "./Position";
2
+ declare class Rect extends Position {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export default Rect;
@@ -0,0 +1,5 @@
1
+ import DragOptions from "./DragOptions";
2
+ import DragEvent from "./DragEvent";
3
+ import Position from "./Position";
4
+ import Range from "./Range";
5
+ export { type DragOptions, DragEvent, Position, Range };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halo-fe",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Halo front end sdk",
5
5
  "scripts": {
6
6
  "halo-fe:tsc": "vue-tsc",
@@ -8,10 +8,12 @@
8
8
  "halo-fe:build:debug": "vite build --debug",
9
9
  "halo-fe:build:watch": "npx vite build --watch",
10
10
  "halo-fe:build:publish": "vue-tsc & npx vite build & npm publish",
11
+ "halo-fe:install": "pnpm install",
12
+ "halo-fe:outdated": "pnpm outdated",
11
13
  "halo-fe:publish": "npm publish"
12
14
  },
13
15
  "type": "module",
14
- "main": "./dist/main.js",
16
+ "module": "./dist/main.js",
15
17
  "types": "./esm/main.d.ts",
16
18
  "files": [
17
19
  "dist",
@@ -28,25 +30,24 @@
28
30
  },
29
31
  "dependencies": {
30
32
  "@monaco-editor/loader": "1.4.0",
31
- "axios": "1.7.2",
32
33
  "clone": "2.1.2",
33
34
  "crypto-js": "4.2.0",
34
35
  "echarts": "5.5.1",
35
36
  "file-saver": "2.0.5",
36
37
  "moment": "2.30.1",
37
38
  "monaco-editor": "0.50.0",
38
- "pinia": "2.1.7",
39
+ "quill": "2.0.2",
39
40
  "underscore": "1.13.6",
40
41
  "underscore.string": "3.3.6",
41
- "vue": "3.4.31",
42
+ "vue": "3.4.33",
42
43
  "xlsx-js-style": "1.2.0"
43
44
  },
44
45
  "devDependencies": {
45
- "@types/node": "20.14.10",
46
+ "@types/node": "20.14.11",
46
47
  "@vitejs/plugin-vue": "5.0.5",
47
48
  "@vitejs/plugin-vue-jsx": "4.0.0",
48
- "sass": "1.77.6",
49
- "vite": "5.3.3",
49
+ "sass": "1.77.8",
50
+ "vite": "5.3.4",
50
51
  "vue-tsc": "2.0.26"
51
52
  }
52
53
  }
@@ -1 +0,0 @@
1
-
@@ -1,310 +0,0 @@
1
- import { i as rt, s as $, d as R } from "./vendor-vue-demi-CIhrFbpB.js";
2
- import { hasInjectionContext as ct, inject as at, getCurrentInstance as ut, ref as Z, watch as it, reactive as ft, markRaw as S, effectScope as lt, isRef as x, isReactive as A, toRef as L, toRaw as pt, nextTick as B, computed as G, getCurrentScope as dt, onScopeDispose as ht, toRefs as M } from "vue";
3
- /*!
4
- * pinia v2.1.7
5
- * (c) 2023 Eduardo San Martin Morote
6
- * @license MIT
7
- */
8
- let j;
9
- const k = (t) => j = t, Et = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
10
- /* istanbul ignore next */
11
- Symbol()
12
- );
13
- function g(t) {
14
- return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
15
- }
16
- var w;
17
- (function(t) {
18
- t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
19
- })(w || (w = {}));
20
- const H = typeof window < "u", U = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && H;
21
- function K(t, a) {
22
- for (const r in a) {
23
- const o = a[r];
24
- if (!(r in t))
25
- continue;
26
- const c = t[r];
27
- g(c) && g(o) && !x(o) && !A(o) ? t[r] = K(c, o) : t[r] = o;
28
- }
29
- return t;
30
- }
31
- const tt = () => {
32
- };
33
- function Q(t, a, r, o = tt) {
34
- t.push(a);
35
- const c = () => {
36
- const f = t.indexOf(a);
37
- f > -1 && (t.splice(f, 1), o());
38
- };
39
- return !r && dt() && ht(c), c;
40
- }
41
- function V(t, ...a) {
42
- t.slice().forEach((r) => {
43
- r(...a);
44
- });
45
- }
46
- const _t = (t) => t();
47
- function F(t, a) {
48
- t instanceof Map && a instanceof Map && a.forEach((r, o) => t.set(o, r)), t instanceof Set && a instanceof Set && a.forEach(t.add, t);
49
- for (const r in a) {
50
- if (!a.hasOwnProperty(r))
51
- continue;
52
- const o = a[r], c = t[r];
53
- g(c) && g(o) && t.hasOwnProperty(r) && !x(o) && !A(o) ? t[r] = F(c, o) : t[r] = o;
54
- }
55
- return t;
56
- }
57
- const vt = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
58
- /* istanbul ignore next */
59
- Symbol()
60
- );
61
- function Nt(t) {
62
- return !g(t) || !t.hasOwnProperty(vt);
63
- }
64
- const { assign: y } = Object;
65
- function X(t) {
66
- return !!(x(t) && t.effect);
67
- }
68
- function Y(t, a, r, o) {
69
- const { state: c, actions: f, getters: h } = a, i = r.state.value[t];
70
- let b;
71
- function E() {
72
- !i && (process.env.NODE_ENV === "production" || !o) && (r.state.value[t] = c ? c() : {});
73
- const _ = process.env.NODE_ENV !== "production" && o ? (
74
- // use ref() to unwrap refs inside state TODO: check if this is still necessary
75
- M(Z(c ? c() : {}).value)
76
- ) : M(r.state.value[t]);
77
- return y(_, f, Object.keys(h || {}).reduce((l, p) => (process.env.NODE_ENV !== "production" && p in _ && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${t}".`), l[p] = S(G(() => {
78
- k(r);
79
- const v = r._s.get(t);
80
- return h[p].call(v, v);
81
- })), l), {}));
82
- }
83
- return b = W(t, E, a, r, o, !0), b;
84
- }
85
- function W(t, a, r = {}, o, c, f) {
86
- let h;
87
- const i = y({ actions: {} }, r);
88
- if (process.env.NODE_ENV !== "production" && !o._e.active)
89
- throw new Error("Pinia destroyed");
90
- const b = {
91
- deep: !0
92
- // flush: 'post',
93
- };
94
- process.env.NODE_ENV !== "production" && !rt && (b.onTrigger = (s) => {
95
- E ? v = s : E == !1 && !n._hotUpdating && (Array.isArray(v) ? v.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
96
- });
97
- let E, _, l = [], p = [], v;
98
- const O = o.state.value[t];
99
- !f && !O && (process.env.NODE_ENV === "production" || !c) && (o.state.value[t] = {});
100
- const I = Z({});
101
- let J;
102
- function T(s) {
103
- let e;
104
- E = _ = !1, process.env.NODE_ENV !== "production" && (v = []), typeof s == "function" ? (s(o.state.value[t]), e = {
105
- type: w.patchFunction,
106
- storeId: t,
107
- events: v
108
- }) : (F(o.state.value[t], s), e = {
109
- type: w.patchObject,
110
- payload: s,
111
- storeId: t,
112
- events: v
113
- });
114
- const u = J = Symbol();
115
- B().then(() => {
116
- J === u && (E = !0);
117
- }), _ = !0, V(l, e, o.state.value[t]);
118
- }
119
- const et = f ? function() {
120
- const { state: e } = r, u = e ? e() : {};
121
- this.$patch((d) => {
122
- y(d, u);
123
- });
124
- } : (
125
- /* istanbul ignore next */
126
- process.env.NODE_ENV !== "production" ? () => {
127
- throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`);
128
- } : tt
129
- );
130
- function ot() {
131
- h.stop(), l = [], p = [], o._s.delete(t);
132
- }
133
- function q(s, e) {
134
- return function() {
135
- k(o);
136
- const u = Array.from(arguments), d = [], P = [];
137
- function st(N) {
138
- d.push(N);
139
- }
140
- function nt(N) {
141
- P.push(N);
142
- }
143
- V(p, {
144
- args: u,
145
- name: s,
146
- store: n,
147
- after: st,
148
- onError: nt
149
- });
150
- let D;
151
- try {
152
- D = e.apply(this && this.$id === t ? this : n, u);
153
- } catch (N) {
154
- throw V(P, N), N;
155
- }
156
- return D instanceof Promise ? D.then((N) => (V(d, N), N)).catch((N) => (V(P, N), Promise.reject(N))) : (V(d, D), D);
157
- };
158
- }
159
- const C = /* @__PURE__ */ S({
160
- actions: {},
161
- getters: {},
162
- state: [],
163
- hotState: I
164
- }), z = {
165
- _p: o,
166
- // _s: scope,
167
- $id: t,
168
- $onAction: Q.bind(null, p),
169
- $patch: T,
170
- $reset: et,
171
- $subscribe(s, e = {}) {
172
- const u = Q(l, s, e.detached, () => d()), d = h.run(() => it(() => o.state.value[t], (P) => {
173
- (e.flush === "sync" ? _ : E) && s({
174
- storeId: t,
175
- type: w.direct,
176
- events: v
177
- }, P);
178
- }, y({}, b, e)));
179
- return u;
180
- },
181
- $dispose: ot
182
- }, n = ft(process.env.NODE_ENV !== "production" || U ? y(
183
- {
184
- _hmrPayload: C,
185
- _customProperties: S(/* @__PURE__ */ new Set())
186
- // devtools custom properties
187
- },
188
- z
189
- // must be added later
190
- // setupStore
191
- ) : z);
192
- o._s.set(t, n);
193
- const m = (o._a && o._a.runWithContext || _t)(() => o._e.run(() => (h = lt()).run(a)));
194
- for (const s in m) {
195
- const e = m[s];
196
- if (x(e) && !X(e) || A(e))
197
- process.env.NODE_ENV !== "production" && c ? $(I.value, s, L(m, s)) : f || (O && Nt(e) && (x(e) ? e.value = O[s] : F(e, O[s])), o.state.value[t][s] = e), process.env.NODE_ENV !== "production" && C.state.push(s);
198
- else if (typeof e == "function") {
199
- const u = process.env.NODE_ENV !== "production" && c ? e : q(s, e);
200
- m[s] = u, process.env.NODE_ENV !== "production" && (C.actions[s] = e), i.actions[s] = e;
201
- } else process.env.NODE_ENV !== "production" && X(e) && (C.getters[s] = f ? (
202
- // @ts-expect-error
203
- r.getters[s]
204
- ) : e, H && (m._getters || // @ts-expect-error: same
205
- (m._getters = S([]))).push(s));
206
- }
207
- if (y(n, m), y(pt(n), m), Object.defineProperty(n, "$state", {
208
- get: () => process.env.NODE_ENV !== "production" && c ? I.value : o.state.value[t],
209
- set: (s) => {
210
- if (process.env.NODE_ENV !== "production" && c)
211
- throw new Error("cannot set hotState");
212
- T((e) => {
213
- y(e, s);
214
- });
215
- }
216
- }), process.env.NODE_ENV !== "production" && (n._hotUpdate = S((s) => {
217
- n._hotUpdating = !0, s._hmrPayload.state.forEach((e) => {
218
- if (e in n.$state) {
219
- const u = s.$state[e], d = n.$state[e];
220
- typeof u == "object" && g(u) && g(d) ? K(u, d) : s.$state[e] = d;
221
- }
222
- $(n, e, L(s.$state, e));
223
- }), Object.keys(n.$state).forEach((e) => {
224
- e in s.$state || R(n, e);
225
- }), E = !1, _ = !1, o.state.value[t] = L(s._hmrPayload, "hotState"), _ = !0, B().then(() => {
226
- E = !0;
227
- });
228
- for (const e in s._hmrPayload.actions) {
229
- const u = s[e];
230
- $(n, e, q(e, u));
231
- }
232
- for (const e in s._hmrPayload.getters) {
233
- const u = s._hmrPayload.getters[e], d = f ? (
234
- // special handling of options api
235
- G(() => (k(o), u.call(n, n)))
236
- ) : u;
237
- $(n, e, d);
238
- }
239
- Object.keys(n._hmrPayload.getters).forEach((e) => {
240
- e in s._hmrPayload.getters || R(n, e);
241
- }), Object.keys(n._hmrPayload.actions).forEach((e) => {
242
- e in s._hmrPayload.actions || R(n, e);
243
- }), n._hmrPayload = s._hmrPayload, n._getters = s._getters, n._hotUpdating = !1;
244
- })), U) {
245
- const s = {
246
- writable: !0,
247
- configurable: !0,
248
- // avoid warning on devtools trying to display this property
249
- enumerable: !1
250
- };
251
- ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((e) => {
252
- Object.defineProperty(n, e, y({ value: n[e] }, s));
253
- });
254
- }
255
- return o._p.forEach((s) => {
256
- if (U) {
257
- const e = h.run(() => s({
258
- store: n,
259
- app: o._a,
260
- pinia: o,
261
- options: i
262
- }));
263
- Object.keys(e || {}).forEach((u) => n._customProperties.add(u)), y(n, e);
264
- } else
265
- y(n, h.run(() => s({
266
- store: n,
267
- app: o._a,
268
- pinia: o,
269
- options: i
270
- })));
271
- }), process.env.NODE_ENV !== "production" && n.$state && typeof n.$state == "object" && typeof n.$state.constructor == "function" && !n.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
272
- state: () => new MyClass()
273
- Found in store "${n.$id}".`), O && f && r.hydrate && r.hydrate(n.$state, O), E = !0, _ = !0, n;
274
- }
275
- function gt(t, a, r) {
276
- let o, c;
277
- const f = typeof a == "function";
278
- if (typeof t == "string")
279
- o = t, c = f ? r : a;
280
- else if (c = t, o = t.id, process.env.NODE_ENV !== "production" && typeof o != "string")
281
- throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
282
- function h(i, b) {
283
- const E = ct();
284
- if (i = // in test mode, ignore the argument provided as we can always retrieve a
285
- // pinia instance with getActivePinia()
286
- (process.env.NODE_ENV === "test" && j && j._testing ? null : i) || (E ? at(Et, null) : null), i && k(i), process.env.NODE_ENV !== "production" && !j)
287
- throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
288
- See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
289
- This will fail in production.`);
290
- i = j, i._s.has(o) || (f ? W(o, a, c, i) : Y(o, c, i), process.env.NODE_ENV !== "production" && (h._pinia = i));
291
- const _ = i._s.get(o);
292
- if (process.env.NODE_ENV !== "production" && b) {
293
- const l = "__hot:" + o, p = f ? W(l, a, c, i, !0) : Y(l, y({}, c), i, !0);
294
- b._hotUpdate(p), delete i.state.value[l], i._s.delete(l);
295
- }
296
- if (process.env.NODE_ENV !== "production" && H) {
297
- const l = ut();
298
- if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
299
- !b) {
300
- const p = l.proxy, v = "_pStores" in p ? p._pStores : p._pStores = {};
301
- v[o] = _;
302
- }
303
- }
304
- return _;
305
- }
306
- return h.$id = o, h;
307
- }
308
- export {
309
- gt as d
310
- };
@@ -1,17 +0,0 @@
1
- import "vue";
2
- var e = !1;
3
- function u(i, r, s) {
4
- return Array.isArray(i) ? (i.length = Math.max(i.length, r), i.splice(r, 1, s), s) : (i[r] = s, s);
5
- }
6
- function f(i, r) {
7
- if (Array.isArray(i)) {
8
- i.splice(r, 1);
9
- return;
10
- }
11
- delete i[r];
12
- }
13
- export {
14
- f as d,
15
- e as i,
16
- u as s
17
- };
@@ -1,14 +0,0 @@
1
- /**
2
- * 消息提示接口,下游自己定义
3
- */
4
- interface IMessage {
5
- /**
6
- * 成功消息提示
7
- */
8
- success(message: string): void;
9
- /**
10
- * 错误消息提示
11
- */
12
- error(message: string): void;
13
- }
14
- export default IMessage;
@@ -1,2 +0,0 @@
1
- import type IMessager from "./IMessager";
2
- export { IMessager };