halo-fe 1.0.27 → 1.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/dist/main.js +1008 -857
  2. package/esm/coms/controls/@types/CodeProps.d.ts +1 -1
  3. package/esm/coms/controls/Code.vue.d.ts +1 -1
  4. package/esm/drivers/builders/BuilderFactory.d.ts +1 -0
  5. package/esm/drivers/cdns/Cdn.d.ts +6 -6
  6. package/esm/drivers/cdns/CdnFactory.d.ts +1 -0
  7. package/esm/drivers/encoders/Encoder.d.ts +1 -1
  8. package/esm/drivers/encoders/EncoderFactory.d.ts +1 -0
  9. package/esm/drivers/excels/ExcelFactory.d.ts +1 -0
  10. package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -0
  11. package/esm/drivers/features/Feature.d.ts +9 -0
  12. package/esm/drivers/features/FeatureFactory.d.ts +1 -0
  13. package/esm/drivers/features/implements/ExpressionFeature.d.ts +2 -3
  14. package/esm/drivers/features/implements/I18NFeature.d.ts +2 -3
  15. package/esm/drivers/features/implements/SortFeature.d.ts +2 -3
  16. package/esm/drivers/hashers/HasherFactory.d.ts +1 -0
  17. package/esm/drivers/https/HttpFactory.d.ts +1 -0
  18. package/esm/drivers/i18ns/I18nFactory.d.ts +1 -0
  19. package/esm/drivers/messengers/MessengerFactory.d.ts +1 -0
  20. package/esm/drivers/providers/ProviderFactory.d.ts +1 -0
  21. package/esm/drivers/signers/SignerFactory.d.ts +1 -0
  22. package/esm/drivers/sockets/SocketFactory.d.ts +1 -0
  23. package/esm/drivers/ssos/SsoFactory.d.ts +1 -0
  24. package/esm/drivers/tasks/TaskFactory.d.ts +1 -0
  25. package/esm/drivers/templates/TemplateFactory.d.ts +1 -0
  26. package/esm/drivers/util/UtilFactory.d.ts +2 -2
  27. package/esm/drivers/util/implements/ObjectUtil.d.ts +20 -0
  28. package/esm/drivers/util/index.d.ts +1 -2
  29. package/esm/drivers/utilities/UtilityFactory.d.ts +1 -0
  30. package/esm/drivers/videos/VideoFactory.d.ts +1 -0
  31. package/esm/drivers/voices/VoiceFactory.d.ts +1 -0
  32. package/esm/factory/Factory.d.ts +11 -3
  33. package/esm/factory/IFactory.d.ts +13 -4
  34. package/package.json +1 -1
@@ -15,7 +15,7 @@ interface CodeProps {
15
15
  /**
16
16
  * 是否显示行号
17
17
  */
18
- lineNumbers?: string;
18
+ lineNumbers?: boolean;
19
19
  /**
20
20
  * 是否启用小地图
21
21
  */
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<CodeProps, {
17
17
  }>, {
18
18
  options: {
19
19
  readonly?: boolean;
20
- lineNumbers?: string;
20
+ lineNumbers?: boolean;
21
21
  minimap?: boolean;
22
22
  category?: string;
23
23
  language?: string;
@@ -4,6 +4,7 @@ import IBuilder from "./IBuilder";
4
4
  * 构建器工厂
5
5
  */
6
6
  declare class BuilderFactory extends Factory<IBuilder> {
7
+ type: string;
7
8
  open(): void;
8
9
  }
9
10
  export default BuilderFactory;
@@ -10,14 +10,14 @@ declare abstract class Cdn implements ICdn {
10
10
  */
11
11
  task: ITask;
12
12
  openAsync(conn: string): Promise<void>;
13
- abstract getCrypto(): Promise<any>;
14
- abstract getECharts(): Promise<any>;
15
- abstract getElementPlus(): Promise<any>;
16
- abstract getFortAwesome(): Promise<any>;
13
+ getCrypto(): Promise<any>;
14
+ getECharts(): Promise<any>;
15
+ getElementPlus(): Promise<any>;
16
+ getFortAwesome(): Promise<any>;
17
17
  getMonaco(baseUrl?: string): Promise<any>;
18
18
  getQuill(): Promise<any>;
19
- abstract getWeiXin(): Promise<any>;
20
- abstract getXlsx(): Promise<any>;
19
+ getWeiXin(): Promise<any>;
20
+ getXlsx(): Promise<any>;
21
21
  /**
22
22
  * 使用并发限制顺序加载资源,并防止monaco-editor的define函数冲突
23
23
  */
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * CDN工厂类
5
5
  */
6
6
  declare class CdnFactory extends Factory<ICdn> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 获取指定CDN实例
@@ -4,7 +4,7 @@ import IEncoder from "./IEncoder";
4
4
  */
5
5
  declare abstract class Encoder implements IEncoder {
6
6
  type: string;
7
- abstract openAsync(conn: string): Promise<void>;
7
+ openAsync(conn: string): Promise<void>;
8
8
  encode(value: string | object): string;
9
9
  /**
10
10
  * 编码字符串
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * 编码器工厂
5
5
  */
6
6
  declare class EncoderFactory extends Factory<IEncoder> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 创建执行类型的Hash实例
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * Excel工厂
5
5
  */
6
6
  declare class ExcelFactory extends Factory<IExcel> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 获取Excel实例
@@ -1,6 +1,7 @@
1
1
  import Factory from "../../factory/Factory";
2
2
  import IExplainer from "./IExplainer";
3
3
  declare class ExplainerFactory extends Factory<IExplainer> {
4
+ type: string;
4
5
  open(): void;
5
6
  }
6
7
  export default ExplainerFactory;
@@ -0,0 +1,9 @@
1
+ import IFeature from "./IFeature";
2
+ declare abstract class Feature implements IFeature {
3
+ type: string;
4
+ openAsync(conn?: string): Promise<void>;
5
+ abstract add(table: any, field: any, data: object, row: object): void;
6
+ abstract copy(table: any, field: any, data: object): void;
7
+ abstract insert(table: any, field: any, data: object, selectedRow: object, row: object): void;
8
+ }
9
+ export default Feature;
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * 特征工厂类
5
5
  */
6
6
  declare class FeatureFactory extends Factory<IFeature> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 获取指定特征实例
@@ -1,10 +1,9 @@
1
- import IFeature from "../IFeature";
1
+ import Feature from "../Feature";
2
2
  /**
3
3
  * 表达式特征
4
4
  */
5
- declare class ExpressionFeature implements IFeature {
5
+ declare class ExpressionFeature extends Feature {
6
6
  type: string;
7
- openAsync(param: string): void;
8
7
  add(table: any, field: any, data: {}, row: {}): void;
9
8
  insert(table: any, field: any, data: object, selectedRow: object, row: object): void;
10
9
  copy(table: any, field: any, data: object): void;
@@ -1,10 +1,9 @@
1
- import IFeature from "../IFeature";
1
+ import Feature from "../Feature";
2
2
  /**
3
3
  * 多语言特征
4
4
  */
5
- declare class I18NFeature implements IFeature {
5
+ declare class I18NFeature extends Feature {
6
6
  type: string;
7
- openAsync(param: string): void;
8
7
  add(table: any, field: any, data: {}, row: {}): void;
9
8
  insert(table: any, field: any, data: object, selectedRow: object, row: object): void;
10
9
  copy(table: any, field: any, data: object): void;
@@ -1,10 +1,9 @@
1
- import IFeature from "../IFeature";
1
+ import Feature from "../Feature";
2
2
  /**
3
3
  * 排序特征
4
4
  */
5
- declare class SortFeature implements IFeature {
5
+ declare class SortFeature extends Feature {
6
6
  type: string;
7
- openAsync(param: string): void;
8
7
  add(table: any, field: any, data: object, row: object): void;
9
8
  insert(table: any, field: any, data: object, selectedRow: object, row: object): void;
10
9
  copy(table: any, field: any, data: object): void;
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * 哈希工厂
5
5
  */
6
6
  declare class HasherFactory extends Factory<IHasher> {
7
+ type: string;
7
8
  open(): void;
8
9
  createAsync(type: string, conn?: string): Promise<IHasher>;
9
10
  /**
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * 请求器工厂类
5
5
  */
6
6
  declare class HttpFactory extends Factory<IHttp> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 获取默认请求器
@@ -4,6 +4,7 @@ import II18n from "./II18n";
4
4
  * 多语言工厂
5
5
  */
6
6
  declare class I18nFactory extends Factory<II18n> {
7
+ type: string;
7
8
  open(): void;
8
9
  }
9
10
  export default I18nFactory;
@@ -4,6 +4,7 @@ import IMessenger from "./IMessenger";
4
4
  * 消息工厂
5
5
  */
6
6
  declare class MessengerFactory extends Factory<IMessenger> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 获取控制台消息提示类型
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * 数据库提供程序工厂类
5
5
  */
6
6
  declare class ProviderFactory extends Factory<IProvider> {
7
+ type: string;
7
8
  open(): void;
8
9
  private _default;
9
10
  /**
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * 签名工厂类
5
5
  */
6
6
  declare class SignerFactory extends Factory<ISigner> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 获取指定签名实例
@@ -4,6 +4,7 @@ import ISocket from "./ISocket";
4
4
  * Socket工厂
5
5
  */
6
6
  declare class SocketFactory extends Factory<ISocket> {
7
+ type: string;
7
8
  open(): void;
8
9
  /**
9
10
  * 默认通信对象
@@ -4,6 +4,7 @@ import Factory from "../../factory/Factory";
4
4
  * SSO工厂类
5
5
  */
6
6
  declare class SsoFactory extends Factory<ISso> {
7
+ type: string;
7
8
  /**
8
9
  * 获取实例
9
10
  */
@@ -4,6 +4,7 @@ import ITask from "./ITask";
4
4
  * 任务工厂类
5
5
  */
6
6
  declare class TaskFactory extends Factory<ITask> {
7
+ type: string;
7
8
  open(): void;
8
9
  }
9
10
  export default TaskFactory;
@@ -4,6 +4,7 @@ import ITemplate from "./ITemplate";
4
4
  * 模板工厂
5
5
  */
6
6
  declare class TemplateFactory extends Factory<ITemplate> {
7
+ type: string;
7
8
  open(): void;
8
9
  }
9
10
  export default TemplateFactory;
@@ -1,10 +1,11 @@
1
1
  import Factory from "../../factory/Factory";
2
2
  import IUtil from "./IUtil";
3
- import { ArrayUtil, BrowserUtil, ComponentUtil, DictionaryUtil, DomUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, JsonUtil, MathUtil, MicroUtil, MountUtil, ObjectUtil, ScrollUtil, SignUtil, StringUtil, TaskUtil, TimeUtil, TreeUtil, TypeUtil, UrlUtil } from "./";
3
+ import { ArrayUtil, BrowserUtil, ComponentUtil, DictionaryUtil, DomUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, JsonUtil, MathUtil, MicroUtil, MountUtil, ObjectUtil, ScrollUtil, SignUtil, StringUtil, TaskUtil, TimeUtil, TreeUtil, UrlUtil } from "./";
4
4
  /**
5
5
  * 帮助类工厂
6
6
  */
7
7
  declare class UtilFactory extends Factory<IUtil> {
8
+ type: string;
8
9
  open(): void;
9
10
  get array(): ArrayUtil;
10
11
  get browser(): BrowserUtil;
@@ -23,7 +24,6 @@ declare class UtilFactory extends Factory<IUtil> {
23
24
  get scroll(): ScrollUtil;
24
25
  get string(): StringUtil;
25
26
  get task(): TaskUtil;
26
- get type(): TypeUtil;
27
27
  get time(): TimeUtil;
28
28
  get tree(): TreeUtil;
29
29
  get url(): UrlUtil;
@@ -4,6 +4,26 @@ import Util from "../Util";
4
4
  */
5
5
  declare class ObjectUtil extends Util {
6
6
  type: string;
7
+ /**
8
+ * 判断输入类型是否是字符串类型 null -> false
9
+ */
10
+ isString: (input: any) => boolean;
11
+ /**
12
+ * 判断输入类型是否是Object类型
13
+ */
14
+ isObject: (input: any) => boolean;
15
+ /**
16
+ * 判断输入类型是否是Array类型
17
+ */
18
+ isArray: (input: any) => boolean;
19
+ /**
20
+ * 判断输入类型是否是Number类型,null -> false
21
+ */
22
+ isNumber: (input: any) => boolean;
23
+ /**
24
+ * 判断输入类型是否是isBoolean类型
25
+ */
26
+ isBoolean: (input: any) => boolean;
7
27
  /**
8
28
  * 净化对象,只清除默认值属性
9
29
  */
@@ -13,7 +13,6 @@ import MountUtil from "./implements/MountUtil";
13
13
  import ObjectUtil from "./implements/ObjectUtil";
14
14
  import StringUtil from "./implements/StringUtil";
15
15
  import TaskUtil from "./implements/TaskUtil";
16
- import TypeUtil from "./implements/TypeUtil";
17
16
  import TimeUtil from "./implements/TimeUtil";
18
17
  import TreeUtil from "./implements/TreeUtil";
19
18
  import ScrollUtil from "./implements/ScrollUtil";
@@ -21,4 +20,4 @@ import JsonUtil from "./implements/JsonUtil";
21
20
  import BrowserUtil from "./implements/BrowserUtil";
22
21
  import UrlUtil from "./implements/UrlUtil";
23
22
  import SignUtil from "./implements/SignUtil";
24
- export { UtilFactory, ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil, TypeUtil, TimeUtil, TreeUtil, ScrollUtil, JsonUtil, BrowserUtil, UrlUtil, SignUtil };
23
+ export { UtilFactory, ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil, TimeUtil, TreeUtil, ScrollUtil, JsonUtil, BrowserUtil, UrlUtil, SignUtil };
@@ -11,6 +11,7 @@ import MouseUtility from "./implement/MouseUtility";
11
11
  * 工具类工厂
12
12
  */
13
13
  declare class UtilityFactory extends Factory<IUtility> {
14
+ type: string;
14
15
  /**
15
16
  * 创建固定工具
16
17
  */
@@ -1,6 +1,7 @@
1
1
  import Factory from "../../factory/Factory";
2
2
  import IVideo from "./IVideo";
3
3
  declare class VideoFactory extends Factory<IVideo> {
4
+ type: string;
4
5
  open(): void;
5
6
  }
6
7
  export default VideoFactory;
@@ -1,6 +1,7 @@
1
1
  import Factory from "../../factory/Factory";
2
2
  import { IVoice } from "./IVoice";
3
3
  declare class VoiceFactory extends Factory<IVoice> {
4
+ type: string;
4
5
  open(): void;
5
6
  }
6
7
  export default VoiceFactory;
@@ -6,16 +6,24 @@ import { Ref } from "../plugins";
6
6
  */
7
7
  declare abstract class Factory<T extends IDriver> implements IFactory<T> {
8
8
  /**
9
- * 当前驱动所有类型,用于使用时实例化
9
+ * 工厂类型,可用于异常提示
10
10
  */
11
- types: any[];
11
+ type: string;
12
+ /**
13
+ * 当前驱动子类型名称和子类型的映射关系,用于快速实例化
14
+ */
15
+ types: {
16
+ [name: string]: any;
17
+ };
12
18
  /**
13
19
  * 实例缓存集合
14
20
  * 或者使用:Record<string, string>
15
21
  */
16
22
  private created;
17
23
  open(): void;
18
- register(type: any): void;
24
+ register(types: {
25
+ [name: string]: any;
26
+ }): void;
19
27
  /**
20
28
  * 根据主键创建并开启驱动,并返回加载后的驱动信息
21
29
  */
@@ -4,21 +4,30 @@ import { Ref } from "../plugins";
4
4
  */
5
5
  interface IFactory<T> {
6
6
  /**
7
- * 当前驱动所有类型,用于使用时实例化
7
+ * 工厂类型,可用于异常提示
8
8
  */
9
- get types(): any[];
9
+ type: string;
10
+ /**
11
+ * 当前驱动所有类型,可根据key快速实例化
12
+ */
13
+ get types(): {
14
+ [name: string]: any;
15
+ };
10
16
  /**
11
17
  * 开启工厂
12
18
  */
13
19
  open(): void;
14
20
  /**
15
- * 注册新类型
21
+ * 使用key和类型 集合,注册多个新类型,必须有key,因为前端编译后,会丢失类名
16
22
  */
17
- register(type: any): any;
23
+ register(types: {
24
+ [name: string]: any;
25
+ }): void;
18
26
  /**
19
27
  * 根据主键创建驱动,并返回加载后的驱动信息
20
28
  */
21
29
  createByIdAsync(id: number, driverRef?: Ref<any>): Promise<T>;
30
+ createWithCache<S extends T>(type: string, name?: string, open?: (entity: T) => void): S;
22
31
  /**
23
32
  * 从缓存中获取指定类型的驱动,不存在则创建,用于Helper类等简单类型
24
33
  * 可以定义名称,实现同一类型,按照不同场景各自进行缓存
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halo-fe",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Halo front end sdk",
5
5
  "scripts": {
6
6
  "halo-fe:tsc": "vue-tsc",