halo-fe 1.0.12 → 1.0.15

Sign up to get free protection for your applications and to get access to all the features.
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-fill{width:100%}.ha-progress{position:absolute;width:0;z-index:1}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{line-height:20px;width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}
1
+ html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-fill{width:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{line-height:20px;width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.ha-socket-progress{width:100%;display:flex;line-height:24px;gap:5px}.ha-socket-progress .progress-tips{display:flex;gap:5px}.ha-socket-progress .progress-tip{font-size:12px;padding:0 8px;border-radius:4px}.ha-socket-progress .progress-tip.info{color:#409eff;background:#18222c;border:1px solid #1d3043}.ha-socket-progress .progress-tip.success{color:#67c23a;background:#1c2518;border:1px solid #25371c}.ha-socket-progress .progress-tip.error{color:#f56c6c;background:#2b1d1d;border:1px solid #412626}.ha-socket-progress .progress-chart{display:flex;flex:1;align-items:center;gap:5px}.ha-socket-progress .progress-bar{height:6px;background:#363637;width:100%;border-radius:4px}.ha-socket-progress .progress-percentage{height:100%;background:#67c23a;transition:width .5s;border-radius:4px}.ha-socket-progress .progress-text{color:#cfd3dc}.ha-socket-progress.error .progress-percentage{background:#f56c6c}.ha-socket-progress.error .progress-text{color:#f56c6c}
@@ -1,12 +1,12 @@
1
1
  import HaEmpty from "./Empty.vue";
2
2
  import HaFill from "./Fill.vue";
3
- import HaProgress from "./Progress.vue";
4
3
  import HaScroller from "./Scroller.vue";
5
4
  import HaTimer from "./Timer.vue";
6
5
  export * from "./conditions";
7
6
  export * from "./controls";
8
7
  export * from "./layouts";
8
+ export * from "./progresses";
9
9
  export * from "./tables";
10
10
  export * from "./tabs";
11
11
  export * from "./types";
12
- export { HaEmpty, HaFill, HaProgress, HaScroller, HaTimer };
12
+ export { HaEmpty, HaFill, HaScroller, HaTimer };
@@ -0,0 +1,18 @@
1
+ type __VLS_PublicProps = {
2
+ modelValue?: boolean;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (modelValue: boolean) => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
7
+ "onUpdate:modelValue"?: (modelValue: boolean) => any;
8
+ }, {}, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToOption<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: import('vue').PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -0,0 +1,12 @@
1
+ import { SocketProgressProps } from "./types";
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<SocketProgressProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<SocketProgressProps>>>, {}, {}>;
3
+ export default _default;
4
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
+ type __VLS_TypePropsToOption<T> = {
6
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
7
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
8
+ } : {
9
+ type: import('vue').PropType<T[K]>;
10
+ required: true;
11
+ };
12
+ };
@@ -0,0 +1,3 @@
1
+ import HaProgress from "./Progress.vue";
2
+ import HaSocketProgress from "./SocketProgress.vue";
3
+ export { HaProgress, HaSocketProgress };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 实时进度属性
3
+ */
4
+ interface SocketProgressProps {
5
+ /**
6
+ * 进度数据
7
+ */
8
+ progress: {
9
+ /**
10
+ * 成功数量
11
+ */
12
+ succeed: number;
13
+ /**
14
+ * 异常数量
15
+ */
16
+ errored: number;
17
+ /**
18
+ * 总数量
19
+ */
20
+ total: number;
21
+ };
22
+ }
23
+ export default SocketProgressProps;
@@ -0,0 +1,2 @@
1
+ import SocketProgressProps from "./SocketProgressProps";
2
+ export { SocketProgressProps };
@@ -13,6 +13,7 @@ declare abstract class Cdn implements ICdn {
13
13
  abstract getMonacoPath(): string;
14
14
  abstract getMonaco(): Promise<any>;
15
15
  abstract getQuill(): Promise<any>;
16
+ abstract getWeiXin(): Promise<any>;
16
17
  abstract getXlsx(): Promise<any>;
17
18
  /**
18
19
  * 异步加载脚本/样式内容,把内容处理为行内html
@@ -35,6 +35,10 @@ interface ICdn extends IDriver {
35
35
  * 获取编辑器
36
36
  */
37
37
  getQuill(): Promise<any>;
38
+ /**
39
+ * 获取微信SDK
40
+ */
41
+ getWeiXin(): Promise<any>;
38
42
  /**
39
43
  * 获取Excel插件
40
44
  */
@@ -13,6 +13,7 @@ declare class LocalCdn extends Cdn {
13
13
  getMonaco(): Promise<any>;
14
14
  getMonacoPath(): string;
15
15
  getQuill(): Promise<any>;
16
+ getWeiXin(): Promise<any>;
16
17
  getXlsx(): Promise<any>;
17
18
  }
18
19
  export default LocalCdn;
@@ -29,6 +29,7 @@ declare class ThirdCdn extends Cdn {
29
29
  getMonacoPath(): string;
30
30
  getMonaco(): Promise<any>;
31
31
  getQuill(): Promise<any>;
32
+ getWeiXin(): Promise<any>;
32
33
  getXlsx(): Promise<any>;
33
34
  }
34
35
  export default ThirdCdn;
@@ -2,6 +2,14 @@
2
2
  * Http消息基类
3
3
  */
4
4
  declare abstract class HttpMessage {
5
+ /**
6
+ * 请求唯一标识
7
+ */
8
+ id: string;
9
+ /**
10
+ * 消息创建时间
11
+ */
12
+ time: Date;
5
13
  /**
6
14
  * 数据实体
7
15
  */
@@ -3,10 +3,6 @@ import HttpMessage from "./HttpMessage";
3
3
  * Http请求
4
4
  */
5
5
  declare class HttpRequest extends HttpMessage {
6
- /**
7
- * 请求唯一标识
8
- */
9
- id: string;
10
6
  /**
11
7
  * 请求方法
12
8
  */
@@ -19,5 +15,6 @@ declare class HttpRequest extends HttpMessage {
19
15
  * 实际请求地址
20
16
  */
21
17
  url?: string;
18
+ constructor();
22
19
  }
23
20
  export default HttpRequest;
@@ -2,7 +2,7 @@ import Http from "../Http";
2
2
  import HttpRequest from "../entities/HttpRequest";
3
3
  import HttpResponse from "../entities/HttpResponse";
4
4
  import IHttp from "../IHttp";
5
- import { ISso } from "../../ssos";
5
+ import { ISso, SsoUser } from "../../ssos";
6
6
  import { ISigner } from "../../signers";
7
7
  /**
8
8
  * 框架请求器
@@ -16,7 +16,7 @@ declare class HaloHttp extends Http {
16
16
  /**
17
17
  * 当前用户信息
18
18
  */
19
- user: any;
19
+ user: SsoUser;
20
20
  /**
21
21
  * 请求语言
22
22
  */
@@ -1,6 +1,22 @@
1
+ /**
2
+ * SSO用户信息
3
+ */
1
4
  declare class SsoUser {
5
+ /**
6
+ * 用户标识
7
+ */
2
8
  userId: string;
3
- token: string;
9
+ /**
10
+ * 授权类型
11
+ */
12
+ type: string;
13
+ /**
14
+ * 用户密钥
15
+ */
4
16
  secret: string;
17
+ /**
18
+ * Token身份认证信息
19
+ */
20
+ identity: any;
5
21
  }
6
22
  export default SsoUser;
@@ -0,0 +1,2 @@
1
+ import SsoUser from "./SsoUser";
2
+ export { SsoUser };
@@ -1,4 +1,4 @@
1
1
  import ISso from "./ISso";
2
2
  import SsoFactory from "./SsoFactory";
3
- import SsoUser from "./entities/SsoUser";
4
- export { type ISso, SsoUser, SsoFactory };
3
+ export * from "./entities";
4
+ export { type ISso, SsoFactory };
@@ -54,6 +54,10 @@ declare class ArrayHelper {
54
54
  * 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
55
55
  */
56
56
  static distinct: (entities: any[], selector: Function) => any[];
57
+ /**
58
+ * 创建集合
59
+ */
60
+ static from(entities: any): any[];
57
61
  /**
58
62
  * 连接值构建成新数组,重复项也会自动构建,不存在的值,会自动创建为一个新项
59
63
  */
@@ -106,5 +110,9 @@ declare class ArrayHelper {
106
110
  * 分组
107
111
  */
108
112
  static groupByArray: (entities: any[], keyFunc: (item: any) => any) => any[];
113
+ /**
114
+ * 替换指定元素为新元素
115
+ */
116
+ static replace(entities: any[], selectFn: (value: any) => boolean, replacement: any): void;
109
117
  }
110
118
  export default ArrayHelper;
@@ -37,15 +37,15 @@ declare class MathHelper {
37
37
  /**
38
38
  * 获取百分比
39
39
  */
40
- static getPercentage: (current: number, total: number) => number;
40
+ static getPercentage: (handled: number, total: number) => number;
41
41
  /**
42
- * 获取百分比,保留2位小数
42
+ * 获取进度文本
43
43
  */
44
- static getPercentageText: (current: number, total: number) => string;
44
+ static getProgressText: (handled: number, total: number) => string;
45
45
  /**
46
- * 获取进度文本
46
+ * 获取百分比,保留2位小数
47
47
  */
48
- static getProgressText: (current: number, total: number) => string;
48
+ static getPercentageText: (handled: number, total: number) => string;
49
49
  /**
50
50
  * 获取大小
51
51
  */
@@ -25,11 +25,11 @@ declare class ObjectHelper {
25
25
  /**
26
26
  * 对对象进行深度克隆,同时可以移除Proxy对象
27
27
  */
28
- static clone: (obj: any, handler?: (n: any) => void) => any;
28
+ static clone<T>(obj: T, handler?: (n: any) => void): T;
29
29
  /**
30
30
  * 合并来源对象到目标对象上
31
31
  */
32
- static mergeTo: (target: any, from: any) => any;
32
+ static mergeTo(target: any, from: any): any;
33
33
  /**
34
34
  * 给对象添加多层属性,并赋值
35
35
  */
@@ -5,7 +5,7 @@ declare class StringHelper {
5
5
  /**
6
6
  * 生成唯一字符串
7
7
  */
8
- static getUniqueId: () => string;
8
+ static getUniqueId: (length?: number) => string;
9
9
  /**
10
10
  * 填充字符串到指定长度,使用pad填充
11
11
  */
@@ -1,5 +1,5 @@
1
- import ComponentHelper from './ComponentHelper';
2
1
  import ArrayHelper from "./ArrayHelper";
2
+ import ComponentHelper from './ComponentHelper';
3
3
  import DomHelper from "./DomHelper";
4
4
  import DictionaryHelper from "./DictionaryHelper";
5
5
  import EventHelper from "./EventHelper";
@@ -20,4 +20,4 @@ import JsonHelper from "./JsonHelper";
20
20
  import BrowserHelper from "./BrowserHelper";
21
21
  import UrlHelper from "./UrlHelper";
22
22
  import SignHelper from "./SignHelper";
23
- export { ComponentHelper, ArrayHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, SignHelper };
23
+ export { ArrayHelper, ComponentHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, SignHelper };
@@ -1,3 +1,4 @@
1
+ import { SsoUser } from "../../drivers";
1
2
  /**
2
3
  * 用户服务
3
4
  */
@@ -10,6 +11,9 @@ declare class UserSvc {
10
11
  * 接口返回的菜单信息(空:菜单未加载 空数组:匿名用户已加载菜单,但是无菜单;防止未登录状态每次跳转路由都加载菜单)
11
12
  */
12
13
  menus: any;
14
+ /**
15
+ * 扁平化菜单
16
+ */
13
17
  menusFlat: any;
14
18
  /**
15
19
  * 是否调试人
@@ -22,7 +26,7 @@ declare class UserSvc {
22
26
  /**
23
27
  * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
24
28
  */
25
- getSso(): Promise<any>;
29
+ getSso(): Promise<SsoUser>;
26
30
  /**
27
31
  * 登录后,获取用户信息
28
32
  */
@@ -1,3 +1,2 @@
1
1
  import CreateFeOptions from "./CreateFeOptions";
2
- import CreatePcOptions from "./CreatePcOptions";
3
- export { CreateFeOptions, CreatePcOptions };
2
+ export { CreateFeOptions };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "halo-fe",
3
- "version": "1.0.12",
3
+ "version": "1.0.15",
4
4
  "description": "Halo front end sdk",
5
5
  "scripts": {
6
6
  "halo-fe:tsc": "vue-tsc",
7
7
  "halo-fe:build": "vite build",
8
8
  "halo-fe:build:debug": "vite build --debug",
9
- "halo-fe:build:watch": "npx vite build --watch",
10
- "halo-fe:build:publish": "vue-tsc & npx vite build & npm publish",
9
+ "halo-fe:build:watch": "vite build --watch",
10
+ "halo-fe:build:publish": "vue-tsc & vite build & npm publish",
11
11
  "halo-fe:install": "pnpm install",
12
12
  "halo-fe:outdated": "pnpm outdated",
13
13
  "halo-fe:publish": "npm publish"
@@ -50,7 +50,7 @@
50
50
  "crypto-js": "4.2.0",
51
51
  "quill": "2.0.2",
52
52
  "sass": "1.77.8",
53
- "vite": "5.4.0",
53
+ "vite": "5.4.1",
54
54
  "vue-tsc": "2.0.29",
55
55
  "xlsx-js-style": "1.2.0"
56
56
  }