halo-fe 1.0.18 → 1.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/dist/main.js +984 -980
  2. package/esm/@types/CreateFeOptions.d.ts +25 -0
  3. package/esm/@types/index.d.ts +2 -0
  4. package/esm/coms/@types/ScrollerProps.d.ts +15 -0
  5. package/esm/coms/@types/index.d.ts +2 -0
  6. package/esm/coms/Scroller.vue.d.ts +1 -1
  7. package/esm/coms/conditions/@types/ConditionGroupProps.d.ts +11 -0
  8. package/esm/coms/conditions/@types/ConditionProps.d.ts +18 -0
  9. package/esm/coms/conditions/@types/index.d.ts +3 -0
  10. package/esm/coms/conditions/Condition.vue.d.ts +1 -1
  11. package/esm/coms/conditions/Index.vue.d.ts +1 -1
  12. package/esm/coms/{types → controls/@types}/CodeEmit.d.ts +1 -1
  13. package/esm/coms/controls/@types/CodeProps.d.ts +28 -0
  14. package/esm/coms/controls/@types/Range.d.ts +26 -0
  15. package/esm/coms/controls/@types/index.d.ts +6 -0
  16. package/esm/coms/controls/Code.vue.d.ts +1 -1
  17. package/esm/coms/controls/RichText.vue.d.ts +1 -1
  18. package/esm/coms/controls/index.d.ts +1 -1
  19. package/esm/coms/index.d.ts +1 -1
  20. package/esm/coms/layouts/@types/index.d.ts +2 -0
  21. package/esm/coms/layouts/Row.vue.d.ts +1 -1
  22. package/esm/coms/layouts/index.d.ts +1 -1
  23. package/esm/coms/progresses/@types/SocketProgressProps.d.ts +23 -0
  24. package/esm/coms/progresses/@types/index.d.ts +2 -0
  25. package/esm/coms/progresses/SocketProgress.vue.d.ts +1 -1
  26. package/esm/coms/tabs/@types/TabProps.d.ts +7 -0
  27. package/esm/coms/tabs/@types/index.d.ts +2 -0
  28. package/esm/coms/tabs/Tab.vue.d.ts +1 -1
  29. package/esm/drivers/@types/IDispose.d.ts +10 -0
  30. package/esm/drivers/@types/IOpen.d.ts +10 -0
  31. package/esm/drivers/@types/index.d.ts +4 -0
  32. package/esm/drivers/bridges/IBridge.d.ts +1 -1
  33. package/esm/drivers/builders/IBuilder.d.ts +1 -1
  34. package/esm/drivers/builders/types/ProviderTable.d.ts +6 -0
  35. package/esm/drivers/builders/types/index.d.ts +2 -0
  36. package/esm/drivers/cdns/ICdn.d.ts +1 -1
  37. package/esm/drivers/excels/IExcel.d.ts +1 -1
  38. package/esm/drivers/explainers/IExplainer.d.ts +1 -1
  39. package/esm/drivers/features/IFeature.d.ts +1 -1
  40. package/esm/drivers/https/IHttp.d.ts +1 -1
  41. package/esm/drivers/i18ns/I18n.d.ts +38 -0
  42. package/esm/drivers/i18ns/I18nFactory.d.ts +13 -0
  43. package/esm/drivers/i18ns/II18n.d.ts +72 -0
  44. package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +13 -0
  45. package/esm/drivers/i18ns/index.d.ts +3 -0
  46. package/esm/drivers/index.d.ts +2 -1
  47. package/esm/drivers/messengers/IMessenger.d.ts +1 -1
  48. package/esm/drivers/providers/IProvider.d.ts +1 -1
  49. package/esm/drivers/ssos/ISso.d.ts +1 -1
  50. package/esm/drivers/tasks/ITask.d.ts +1 -1
  51. package/esm/drivers/templates/ITemplate.d.ts +1 -1
  52. package/esm/drivers/videos/IVideo.d.ts +1 -1
  53. package/esm/drivers/voices/IVoice.d.ts +1 -1
  54. package/esm/factorying/Factories.d.ts +15 -11
  55. package/esm/factorying/Factory.d.ts +1 -1
  56. package/esm/factorying/index.d.ts +17 -5
  57. package/esm/helpers/@types/JsonConfig.d.ts +10 -0
  58. package/esm/helpers/@types/TreeNodeProp.d.ts +9 -0
  59. package/esm/helpers/@types/index.d.ts +3 -0
  60. package/esm/helpers/JsonHelper.d.ts +6 -2
  61. package/esm/main.d.ts +2 -2
  62. package/esm/repos/IRepo.d.ts +4 -0
  63. package/esm/repos/RepoFactory.d.ts +5 -0
  64. package/esm/repos/implements/SettingRepo.d.ts +15 -0
  65. package/esm/repos/index.d.ts +1 -1
  66. package/esm/svcs/@types/Dictionary.d.ts +4 -0
  67. package/esm/svcs/@types/index.d.ts +2 -0
  68. package/esm/svcs/implement/ConfigSvc.d.ts +1 -1
  69. package/esm/svcs/implement/I18nSvc.d.ts +1 -1
  70. package/esm/svcs/implement/LogSvc.d.ts +3 -0
  71. package/esm/svcs/implement/index.d.ts +1 -2
  72. package/esm/svcs/index.d.ts +2 -8
  73. package/esm/types/CreateFeOptions.d.ts +6 -5
  74. package/esm/utilities/@types/DragEvent.d.ts +11 -0
  75. package/esm/utilities/@types/DragOptions.d.ts +28 -0
  76. package/esm/utilities/@types/Position.d.ts +15 -0
  77. package/esm/utilities/@types/Rect.d.ts +10 -0
  78. package/esm/utilities/@types/index.d.ts +5 -0
  79. package/esm/utilities/EventUtility.d.ts +1 -1
  80. package/esm/utilities/SaveUtility.d.ts +15 -0
  81. package/esm/utilities/index.d.ts +3 -2
  82. package/package.json +2 -3
  83. package/dist/assets/@intlify-BISCQg1h.js +0 -2189
  84. package/dist/assets/@vue-aVYGocXp.js +0 -93
  85. package/dist/assets/vue-i18n-CLr3brPz.js +0 -1670
  86. package/esm/coms/Code.vue.d.ts +0 -41
  87. package/esm/coms/Col.vue.d.ts +0 -11
  88. package/esm/coms/Compare.vue.d.ts +0 -40
  89. package/esm/coms/Container.vue.d.ts +0 -23
  90. package/esm/coms/RichText.vue.d.ts +0 -24
  91. package/esm/coms/Row.vue.d.ts +0 -21
  92. package/esm/coms/types/CodeProps.d.ts +0 -18
  93. package/esm/drivers/cdns/implements/BootCdn.d.ts +0 -12
  94. package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +0 -15
  95. package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +0 -21
  96. package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +0 -12
  97. package/esm/drivers/factories/DriverFactory.d.ts +0 -64
  98. package/esm/drivers/factories/Factory.d.ts +0 -18
  99. package/esm/drivers/factories/IFactory.d.ts +0 -18
  100. package/esm/drivers/factories/index.d.ts +0 -42
  101. package/esm/drivers/providers/implements/StorageHelper.d.ts +0 -34
  102. package/esm/helpers/ScriptHelper.d.ts +0 -19
  103. package/esm/helpers/array-helper.d.ts +0 -97
  104. package/esm/helpers/component-helper.d.ts +0 -18
  105. package/esm/helpers/cookie-helper.d.ts +0 -6
  106. package/esm/helpers/dictionary-helper.d.ts +0 -18
  107. package/esm/helpers/dom-helper.d.ts +0 -86
  108. package/esm/helpers/event-helper.d.ts +0 -30
  109. package/esm/helpers/file-helper.d.ts +0 -22
  110. package/esm/helpers/html-helper.d.ts +0 -10
  111. package/esm/helpers/i18n-helper.d.ts +0 -14
  112. package/esm/helpers/image-helper.d.ts +0 -10
  113. package/esm/helpers/json-helper.d.ts +0 -39
  114. package/esm/helpers/math-helper.d.ts +0 -46
  115. package/esm/helpers/micro-helper.d.ts +0 -10
  116. package/esm/helpers/mount-helper.d.ts +0 -14
  117. package/esm/helpers/object-helper.d.ts +0 -38
  118. package/esm/helpers/script-helper.d.ts +0 -31
  119. package/esm/helpers/scroll-helper.d.ts +0 -14
  120. package/esm/helpers/sign-helper.d.ts +0 -14
  121. package/esm/helpers/storage-helper.d.ts +0 -34
  122. package/esm/helpers/string-helper.d.ts +0 -94
  123. package/esm/helpers/task-helper.d.ts +0 -26
  124. package/esm/helpers/time-helper.d.ts +0 -66
  125. package/esm/helpers/tree-helper.d.ts +0 -54
  126. package/esm/helpers/type-helper.d.ts +0 -26
  127. package/esm/helpers/url-helper.d.ts +0 -96
  128. package/esm/plugins/HtmlTransform.d.ts +0 -6
  129. package/esm/plugins/types/IMessager.d.ts +0 -34
  130. package/esm/plugins/types/index.d.ts +0 -7
  131. package/esm/services/ConfigService.d.ts +0 -66
  132. package/esm/services/DriverService.d.ts +0 -36
  133. package/esm/services/EnvService.d.ts +0 -14
  134. package/esm/services/LogService.d.ts +0 -19
  135. package/esm/services/SettingService.d.ts +0 -42
  136. package/esm/services/SocketService.d.ts +0 -23
  137. package/esm/services/UserService.d.ts +0 -47
  138. package/esm/services/index.d.ts +0 -15
  139. package/esm/services/types/IMessage.d.ts +0 -14
  140. package/esm/services/types/IMessager.d.ts +0 -34
  141. package/esm/services/types/index.d.ts +0 -2
  142. package/esm/servs/ConfigServ.d.ts +0 -66
  143. package/esm/servs/DriverServ.d.ts +0 -36
  144. package/esm/servs/EnvServ.d.ts +0 -14
  145. package/esm/servs/IServ.d.ts +0 -6
  146. package/esm/servs/LogServ.d.ts +0 -19
  147. package/esm/servs/Serv.d.ts +0 -4
  148. package/esm/servs/ServFactory.d.ts +0 -11
  149. package/esm/servs/SettingServ.d.ts +0 -42
  150. package/esm/servs/SocketServ.d.ts +0 -38
  151. package/esm/servs/UserServ.d.ts +0 -47
  152. package/esm/servs/implement/ConfigServ.d.ts +0 -66
  153. package/esm/servs/implement/DriverServ.d.ts +0 -36
  154. package/esm/servs/implement/EnvServ.d.ts +0 -14
  155. package/esm/servs/implement/LogServ.d.ts +0 -19
  156. package/esm/servs/implement/SettingServ.d.ts +0 -42
  157. package/esm/servs/implement/SocketServ.d.ts +0 -38
  158. package/esm/servs/implement/UserServ.d.ts +0 -47
  159. package/esm/servs/index.d.ts +0 -15
  160. package/esm/stores/config.d.ts +0 -63
  161. package/esm/stores/driver.d.ts +0 -37
  162. package/esm/stores/env.d.ts +0 -12
  163. package/esm/stores/index.d.ts +0 -8
  164. package/esm/stores/log.d.ts +0 -20
  165. package/esm/stores/setting.d.ts +0 -43
  166. package/esm/stores/socket.d.ts +0 -27
  167. package/esm/stores/user.d.ts +0 -40
  168. package/esm/types/CreateOptions.d.ts +0 -18
  169. /package/esm/coms/{types → controls/@types}/RichTextOptions.d.ts +0 -0
  170. /package/esm/coms/{types → controls/@types}/RichTextProps.d.ts +0 -0
  171. /package/esm/coms/{types → layouts/@types}/RowProps.d.ts +0 -0
  172. /package/esm/drivers/{IDriver.d.ts → @types/IDriver.d.ts} +0 -0
@@ -0,0 +1,25 @@
1
+ import { IMessenger } from "../drivers";
2
+ /**
3
+ * 初始化选项
4
+ */
5
+ declare class CreateFeOptions {
6
+ /**
7
+ * 消息发送对象
8
+ */
9
+ messenger: IMessenger;
10
+ /**
11
+ * 基准请求地址
12
+ */
13
+ baseUrl: string;
14
+ /**
15
+ * 自定义语言包
16
+ */
17
+ lang: {
18
+ [key: string]: any;
19
+ };
20
+ /**
21
+ * CDN类型
22
+ */
23
+ cdn: 'Local' | "Third" | string;
24
+ }
25
+ export default CreateFeOptions;
@@ -0,0 +1,2 @@
1
+ import CreateFeOptions from "./CreateFeOptions";
2
+ export { CreateFeOptions };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 滚动条选项
3
+ */
4
+ interface ScrollerProps {
5
+ /**
6
+ * 选项配置
7
+ */
8
+ options: {
9
+ /**
10
+ * 滚动条距顶部距离
11
+ */
12
+ scrollTop?: number;
13
+ };
14
+ }
15
+ export default ScrollerProps;
@@ -0,0 +1,2 @@
1
+ import ScrollerProps from "./ScrollerProps";
2
+ export { type ScrollerProps };
@@ -1,4 +1,4 @@
1
- import ScrollerProps from "./types/ScrollerProps";
1
+ import ScrollerProps from "./@types/ScrollerProps";
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -0,0 +1,11 @@
1
+ import ConditionProps from "./ConditionProps";
2
+ /**
3
+ * 条件组类型
4
+ */
5
+ interface ConditionGroupProps {
6
+ /**
7
+ * 条件集合
8
+ */
9
+ conditions: ConditionProps[];
10
+ }
11
+ export default ConditionGroupProps;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 条件属性
3
+ */
4
+ interface ConditionProps {
5
+ /**
6
+ * 字段名
7
+ */
8
+ name: string;
9
+ /**
10
+ * 操作符
11
+ */
12
+ operator: string;
13
+ /**
14
+ * 值
15
+ */
16
+ value: string;
17
+ }
18
+ export default ConditionProps;
@@ -0,0 +1,3 @@
1
+ import ConditionGroupProps from "./ConditionGroupProps";
2
+ import ConditionProps from "./ConditionProps";
3
+ export { type ConditionGroupProps, type ConditionProps };
@@ -1,4 +1,4 @@
1
- import { ConditionProps } from "./types";
1
+ import { ConditionProps } from "./@types";
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<ConditionProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<ConditionProps>>>, {}, {}>;
3
3
  export default _default;
4
4
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,4 +1,4 @@
1
- import { ConditionGroupProps } from "./types";
1
+ import { ConditionGroupProps } from "./@types";
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<ConditionGroupProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<ConditionGroupProps>>>, {}, {}>;
3
3
  export default _default;
4
4
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,4 +1,4 @@
1
- import { Monaco } from "../../plugins";
1
+ import { Monaco } from "../../../plugins";
2
2
  /**
3
3
  * 代码控件事件
4
4
  */
@@ -0,0 +1,28 @@
1
+ import Range from "./Range";
2
+ /**
3
+ * 代码属性
4
+ */
5
+ interface CodeProps {
6
+ /**
7
+ * 配置
8
+ */
9
+ config?: {
10
+ readonly?: boolean;
11
+ lineNumbers?: string;
12
+ minimap?: boolean;
13
+ category?: string;
14
+ schema?: any;
15
+ language?: string;
16
+ scrollTop?: number;
17
+ selection?: Range;
18
+ };
19
+ /**
20
+ * 是否显示边框
21
+ */
22
+ border?: boolean;
23
+ /**
24
+ * 值
25
+ */
26
+ modelValue?: string;
27
+ }
28
+ export default CodeProps;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 范围
3
+ */
4
+ declare class Range {
5
+ /**
6
+ * 起始行号
7
+ */
8
+ startLine: number;
9
+ /**
10
+ * 结束行号
11
+ */
12
+ endLine: number;
13
+ /**
14
+ * 起始列
15
+ */
16
+ startColumn: number;
17
+ /**
18
+ * 结束列
19
+ */
20
+ endColumn: number;
21
+ /**
22
+ * 初始化
23
+ */
24
+ constructor(startLine: number, endLine: number, startColumn: number, endColumn: number);
25
+ }
26
+ export default Range;
@@ -0,0 +1,6 @@
1
+ import CodeEmit from "./CodeEmit";
2
+ import CodeProps from "./CodeProps";
3
+ import Range from "./Range";
4
+ import RichTextOptions from "./RichTextOptions";
5
+ import RichTextProps from "./RichTextProps";
6
+ export { type CodeEmit, type CodeProps, Range, type RichTextOptions, type RichTextProps, };
@@ -1,5 +1,5 @@
1
1
  import { type Monaco } from "../../plugins";
2
- import { CodeProps } from "./types";
2
+ import { CodeProps } from "./@types";
3
3
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<CodeProps>, {
4
4
  config: any;
5
5
  }>, {
@@ -1,4 +1,4 @@
1
- import { RichTextProps } from "./types";
1
+ import { RichTextProps } from "./@types";
2
2
  declare let __VLS_typeProps: RichTextProps;
3
3
  type __VLS_PublicProps = {
4
4
  modelValue?: string;
@@ -3,5 +3,5 @@ import HaCompare from "./Compare.vue";
3
3
  import HaOption from "./Option.vue";
4
4
  import HaRichText from "./RichText.vue";
5
5
  import HaSelect from "./Select.vue";
6
- export * from "./types";
6
+ export * from "./@types";
7
7
  export { HaCode, HaCompare, HaOption, HaRichText, HaSelect };
@@ -8,5 +8,5 @@ export * from "./layouts";
8
8
  export * from "./progresses";
9
9
  export * from "./tables";
10
10
  export * from "./tabs";
11
- export * from "./types";
11
+ export * from "./@types";
12
12
  export { HaEmpty, HaFill, HaScroller, HaTimer };
@@ -0,0 +1,2 @@
1
+ import RowProps from "./RowProps";
2
+ export { type RowProps };
@@ -1,4 +1,4 @@
1
- import { RowProps } from "./types";
1
+ import { RowProps } from "./@types";
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import HaCol from "./Col.vue";
2
2
  import HaContainer from "./Container.vue";
3
3
  import HaRow from "./Row.vue";
4
- export * from "./types";
4
+ export * from "./@types";
5
5
  export { HaCol, HaContainer, HaRow, };
@@ -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 };
@@ -1,4 +1,4 @@
1
- import { SocketProgressProps } from "./types";
1
+ import { SocketProgressProps } from "./@types";
2
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
3
  export default _default;
4
4
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,7 @@
1
+ interface TabProps {
2
+ /**
3
+ * 是否在切换Tab时自动销毁数据
4
+ */
5
+ destroy: boolean;
6
+ }
7
+ export default TabProps;
@@ -0,0 +1,2 @@
1
+ import TabProps from "./TabProps";
2
+ export { type TabProps };
@@ -1,4 +1,4 @@
1
- import { TabProps } from "./types";
1
+ import { TabProps } from "./@types";
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<TabProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<TabProps>>>, {}, {}>;
3
3
  export default _default;
4
4
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 可释放接口
3
+ */
4
+ interface IDispose {
5
+ /**
6
+ * 资源释放
7
+ */
8
+ dispose(): void;
9
+ }
10
+ export default IDispose;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 开启接口
3
+ */
4
+ interface IOpen {
5
+ /**
6
+ * 开启
7
+ */
8
+ open(conn?: string): Promise<void>;
9
+ }
10
+ export default IOpen;
@@ -0,0 +1,4 @@
1
+ import IDispose from "./IDispose";
2
+ import IDriver from "./IDriver";
3
+ import IOpen from "./IOpen";
4
+ export { type IDispose, type IDriver, type IOpen };
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  /**
3
3
  * Android/IOS 操作系统通信桥
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  import { ProviderTable } from "./entities";
3
3
  /**
4
4
  * 构建器接口
@@ -0,0 +1,6 @@
1
+ interface ProviderTable {
2
+ name: string;
3
+ columns: any[];
4
+ rows: any[];
5
+ }
6
+ export default ProviderTable;
@@ -0,0 +1,2 @@
1
+ import ProviderTable from "./ProviderTable";
2
+ export { type ProviderTable };
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  /**
3
3
  * CDN接口
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver, IOpen } from "../types";
1
+ import { IDriver, IOpen } from "../@types";
2
2
  /**
3
3
  * Excel操作接口
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  interface IExplainer extends IDriver {
3
3
  }
4
4
  export default IExplainer;
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  /**
3
3
  * 特征接口
4
4
  */
@@ -1,6 +1,6 @@
1
1
  import HttpRequest from "./entities/HttpRequest";
2
2
  import HttpResponse from "./entities/HttpResponse";
3
- import { IDriver, IOpen } from "../types";
3
+ import { IDriver, IOpen } from "../@types";
4
4
  /**
5
5
  * 请求器接口
6
6
  */
@@ -0,0 +1,38 @@
1
+ import II18n from "./II18n";
2
+ declare abstract class I18n implements II18n {
3
+ type: string;
4
+ lang: string;
5
+ messages: {
6
+ [key: string]: any;
7
+ };
8
+ open(conn?: string): Promise<void>;
9
+ t: (key: string, params?: any) => string;
10
+ abstract translate(key: string, params: any): string;
11
+ abstract t_exists(key: string): boolean;
12
+ t_menu: (key: string) => string;
13
+ t_module: (type: string, key: string) => string;
14
+ t_table: (table: string) => string;
15
+ t_field: (table: string, field: string) => string;
16
+ t_enum: (name: string, value: string) => string;
17
+ t_field_placeholder: (table: string, field: string) => string;
18
+ t_field_choose_placeholder: (table: string, field: string) => string;
19
+ t_sys: (key: string) => string;
20
+ t_title: () => string;
21
+ /**
22
+ * 根据key设置多语言标题
23
+ */
24
+ setI18nTitle: (key: string) => void;
25
+ /**
26
+ * 设置标题
27
+ */
28
+ setTitle: (title?: string, env?: string) => void;
29
+ addMessages: (messages: {
30
+ [key: string]: string;
31
+ }) => void;
32
+ abstract loadI18n(lang: string): Promise<void>;
33
+ /**
34
+ * 切换语言,自动加载菜单
35
+ */
36
+ switchI18n: (lang: string) => Promise<void>;
37
+ }
38
+ export default I18n;
@@ -0,0 +1,13 @@
1
+ import Factory from "../../factorying/Factory";
2
+ import II18n from "./II18n";
3
+ /**
4
+ * 多语言工厂
5
+ */
6
+ declare class I18nFactory extends Factory<II18n> {
7
+ open(): void;
8
+ /**
9
+ * 获取默认多语言
10
+ */
11
+ getDefault(): Promise<II18n>;
12
+ }
13
+ export default I18nFactory;
@@ -0,0 +1,72 @@
1
+ import { IDriver, IOpen } from "../@types";
2
+ /**
3
+ * 多语言翻译接口
4
+ */
5
+ interface II18n extends IDriver, IOpen {
6
+ /**
7
+ * 当前语言
8
+ */
9
+ lang: string;
10
+ /**
11
+ * 多语言翻译文案
12
+ */
13
+ messages: {
14
+ [key: string]: any;
15
+ };
16
+ /**
17
+ * 翻译指定key,不存在使用默认值
18
+ */
19
+ t(key: string, params?: any): string;
20
+ /**
21
+ * 判断指定key是否存在
22
+ */
23
+ t_exists(key: any): boolean;
24
+ /**
25
+ * 业务翻译:菜单多语言、多个窗口的多语言同时切换,而不用重载接口
26
+ */
27
+ t_menu(key: string): string;
28
+ /**
29
+ * 模块业务翻译
30
+ */
31
+ t_module(type: string, key: string): string;
32
+ /**
33
+ * 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
34
+ */
35
+ t_table(table: string): string;
36
+ /**
37
+ * 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
38
+ * 注意:如果结果返回未完毕},则vue编译异常
39
+ */
40
+ t_field(table: string, field: string): string;
41
+ /**
42
+ * 枚举翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
43
+ */
44
+ t_enum(name: string, value: string): string;
45
+ /**
46
+ * 字段占位符翻译
47
+ */
48
+ t_field_placeholder(table: string, field: string): string;
49
+ /**
50
+ * 字段占位符翻译
51
+ */
52
+ t_field_choose_placeholder(table: string, field: string): string;
53
+ /**
54
+ * 系统翻译
55
+ */
56
+ t_sys(key: string): string;
57
+ /**
58
+ * 系统标题
59
+ */
60
+ t_title(): string;
61
+ /**
62
+ * 添加自定义多语言包
63
+ */
64
+ addMessages(messages: {
65
+ [key: string]: string;
66
+ }): void;
67
+ /**
68
+ * 加载指定语言包
69
+ */
70
+ loadI18n(lang?: string): Promise<void>;
71
+ }
72
+ export default II18n;
@@ -0,0 +1,13 @@
1
+ import I18n from "../I18n";
2
+ /**
3
+ * 默认翻译
4
+ * 不用vue-i18n的原因:对json内容的翻译报错无法消除,如:驱动Conn的多语言提示
5
+ */
6
+ declare class DefaultI18n extends I18n {
7
+ type: string;
8
+ open(conn?: string): Promise<void>;
9
+ translate: (key: string, params?: any) => string;
10
+ t_exists: (key: string) => boolean;
11
+ loadI18n: (lang: string) => Promise<void>;
12
+ }
13
+ export default DefaultI18n;
@@ -0,0 +1,3 @@
1
+ import II18n from "./II18n";
2
+ import I18nFactory from "./I18nFactory";
3
+ export { type II18n, I18nFactory };
@@ -1,3 +1,4 @@
1
+ export * from "./@types";
1
2
  export * from "./bridges";
2
3
  export * from "./builders";
3
4
  export * from "./cdns";
@@ -7,12 +8,12 @@ export * from "./explainers";
7
8
  export * from "./features";
8
9
  export * from "./hashers";
9
10
  export * from "./https";
11
+ export * from "./i18ns";
10
12
  export * from "./messengers";
11
13
  export * from "./providers";
12
14
  export * from "./signers";
13
15
  export * from "./ssos";
14
16
  export * from "./tasks";
15
17
  export * from "./templates";
16
- export * from "./types";
17
18
  export * from "./videos";
18
19
  export * from "./voices";
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  /**
3
3
  * 消息提示接口,下游自己定义
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  /**
3
3
  * 数据库提供程序接口
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  import SsoUser from "./entities/SsoUser";
3
3
  /**
4
4
  * SSO接口
@@ -1,4 +1,4 @@
1
- import { IDriver, IDispose } from "../types";
1
+ import { IDriver, IDispose } from "../@types";
2
2
  /**
3
3
  * 任务接口
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  /**
3
3
  * 模板引擎接口
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  interface IVideo extends IDriver {
3
3
  }
4
4
  export default IVideo;
@@ -1,4 +1,4 @@
1
- import { IDriver } from "../types";
1
+ import { IDriver } from "../@types";
2
2
  export interface IVoice extends IDriver {
3
3
  /**
4
4
  * 开始录音
@@ -1,19 +1,9 @@
1
- import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SsoFactory, TaskFactory, TemplateFactory } from "../drivers";
1
+ import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SsoFactory, TaskFactory, TemplateFactory } from "../drivers";
2
2
  import { SvcFactory } from "../svcs";
3
3
  /**
4
4
  * 驱动工厂类
5
5
  */
6
6
  declare class Factories {
7
- /**
8
- * 工厂缓存
9
- */
10
- static mappings: {
11
- [key: string]: any;
12
- };
13
- /**
14
- * 并缓存工厂实例
15
- */
16
- static create<T>(type: any): T;
17
7
  /**
18
8
  * Builder工厂
19
9
  */
@@ -46,6 +36,10 @@ declare class Factories {
46
36
  * Http请求工厂
47
37
  */
48
38
  static get http(): HttpFactory;
39
+ /**
40
+ * 多语言工厂
41
+ */
42
+ static get i18n(): I18nFactory;
49
43
  /**
50
44
  * 消息提示请求工厂
51
45
  */
@@ -74,5 +68,15 @@ declare class Factories {
74
68
  * 服务工厂
75
69
  */
76
70
  static get svc(): SvcFactory;
71
+ /**
72
+ * 工厂缓存
73
+ */
74
+ static mappings: {
75
+ [key: string]: any;
76
+ };
77
+ /**
78
+ * 并缓存工厂实例
79
+ */
80
+ static create<T>(type: any): T;
77
81
  }
78
82
  export default Factories;