@gct-paas/core 0.1.4-dev.7 → 0.1.4-dev.9

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 (276) hide show
  1. package/dist/index.esm.min.mjs +6520 -18715
  2. package/dist/index.min.cjs +386 -2
  3. package/dist/index.system.min.js +386 -2
  4. package/es/constants/core.mjs +0 -1
  5. package/es/constants/editor-register/editor-register.mjs +0 -1
  6. package/es/constants/editor-type/editor-type.d.ts +65 -1
  7. package/es/constants/editor-type/editor-type.mjs +14 -1
  8. package/es/constants/expression-type/BuiltOperators.d.ts +20 -0
  9. package/es/constants/expression-type/BuiltOperators.mjs +148 -0
  10. package/es/constants/expression-type/FunctionKeys.d.ts +1 -0
  11. package/es/constants/expression-type/FunctionKeys.mjs +81 -0
  12. package/es/constants/expression-type/editor.d.ts +8 -0
  13. package/es/constants/expression-type/editor.mjs +4 -0
  14. package/es/constants/expression-type/function.d.ts +7 -0
  15. package/es/constants/expression-type/function.mjs +875 -0
  16. package/es/constants/expression-type/index.d.ts +42 -0
  17. package/es/constants/expression-type/index.mjs +120 -0
  18. package/es/constants/expression-type/modeCfg.d.ts +30 -0
  19. package/es/constants/expression-type/modeCfg.mjs +268 -0
  20. package/es/constants/expression-type/variable.d.ts +12 -0
  21. package/es/constants/expression-type/variable.mjs +42 -0
  22. package/es/constants/form-container-type/form-container-type.mjs +0 -1
  23. package/es/constants/index.d.ts +5 -0
  24. package/es/constants/index.mjs +6 -6
  25. package/es/controller/edit-form/edit-form.controller.mjs +0 -1
  26. package/es/controller/editor/color-editor.controller.mjs +0 -1
  27. package/es/controller/editor/length-unit-editor.controller.mjs +0 -1
  28. package/es/controller/editor-item/editor-item.controller.mjs +0 -1
  29. package/es/controller/form/form.controller.mjs +5 -4
  30. package/es/controller/form-collapse/form-collapse.controller.mjs +4 -3
  31. package/es/controller/form-collapse-pane/form-collapse-pane.controller.mjs +4 -3
  32. package/es/controller/form-edit-item/form-edit-item.controller.d.ts +1 -0
  33. package/es/controller/form-edit-item/form-edit-item.controller.mjs +6 -2
  34. package/es/controller/form-group/form-group.controller.mjs +4 -3
  35. package/es/controller/form-item/form-item.controller.d.ts +1 -0
  36. package/es/controller/form-item/form-item.controller.mjs +7 -3
  37. package/es/controller/form-item-basic/form-item-basic.controller.mjs +3 -2
  38. package/es/controller/form-item-hidden/form-item-hidden.controller.mjs +0 -1
  39. package/es/controller/form-tab/form-tab.controller.mjs +4 -3
  40. package/es/controller/form-tab-pane/form-tab-pane.controller.mjs +4 -3
  41. package/es/controller/gct-form/gct-form.controller.mjs +5 -4
  42. package/es/create-app-vue.mjs +3 -9
  43. package/es/enums/app-designer/index.d.ts +13 -1
  44. package/es/enums/app-designer/index.mjs +8 -2
  45. package/es/enums/appEnum.d.ts +22 -66
  46. package/es/enums/appEnum.mjs +24 -15
  47. package/es/enums/appStateEnum.mjs +0 -1
  48. package/es/enums/authActionEnum.mjs +0 -1
  49. package/es/enums/breakpointEnum.mjs +0 -1
  50. package/es/enums/cacheEnum.mjs +0 -1
  51. package/es/enums/designEnum.d.ts +2 -2
  52. package/es/enums/designEnum.mjs +31 -32
  53. package/es/enums/developer-center/index.d.ts +1 -0
  54. package/es/enums/developer-center/integration.d.ts +4 -0
  55. package/es/enums/developer-center/integration.mjs +7 -0
  56. package/es/enums/exceptionEnum.mjs +0 -1
  57. package/es/enums/expressionEnum.d.ts +130 -0
  58. package/es/enums/expressionEnum.mjs +75 -0
  59. package/es/enums/globalEnum.d.ts +38 -0
  60. package/es/enums/globalEnum.mjs +25 -0
  61. package/es/enums/httpEnum.mjs +0 -1
  62. package/es/enums/index.d.ts +19 -0
  63. package/es/enums/index.mjs +13 -16
  64. package/es/enums/menuEnum.mjs +0 -1
  65. package/es/enums/page-designer/designer.d.ts +23 -3
  66. package/es/enums/page-designer/designer.mjs +90 -6
  67. package/es/enums/page-designer/panel.d.ts +78 -7
  68. package/es/enums/page-designer/panel.mjs +22 -4
  69. package/es/enums/page-designer/toolkit.mjs +0 -1
  70. package/es/enums/page-designer/widget.d.ts +2 -1
  71. package/es/enums/page-designer/widget.mjs +3 -3
  72. package/es/enums/pageEnum.mjs +0 -1
  73. package/es/enums/plugin-enum.mjs +0 -1
  74. package/es/enums/processEnum.d.ts +54 -0
  75. package/es/enums/processEnum.mjs +36 -2
  76. package/es/enums/roleEnum.mjs +0 -1
  77. package/es/enums/sizeEnum.mjs +0 -1
  78. package/es/global/gct/gct.d.ts +11 -28
  79. package/es/global/gct/gct.mjs +29 -32
  80. package/es/hooks/index.d.ts +2 -1
  81. package/es/hooks/use-app-inst/use-app-inst.d.ts +8 -0
  82. package/es/hooks/use-app-inst/use-app-inst.mjs +8 -0
  83. package/es/hooks/use-form/use-form.mjs +0 -1
  84. package/es/hooks/use-gct-form-value/use-gct-form-value.d.ts +1 -1
  85. package/es/hooks/use-gct-form-value/use-gct-form-value.mjs +0 -4
  86. package/es/hooks/use-modal/use-modal.mjs +0 -1
  87. package/es/hooks/use-overlay-scrollbars/use-overlay-scrollbars.d.ts +11 -0
  88. package/es/hooks/use-sub-app-utils/use-sub-app-utils.d.ts +31 -0
  89. package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +30 -0
  90. package/es/hooks/useCopyToClipboard.mjs +0 -1
  91. package/es/index.d.ts +6 -8
  92. package/es/index.mjs +98 -64
  93. package/es/interface/controller/form-edit-item/form-edit-item.controller.d.ts +5 -0
  94. package/es/interface/controller/index.d.ts +0 -1
  95. package/es/interface/form/i-editor/i-editor-basic.d.ts +2 -2
  96. package/es/interface/form/i-editor/i-model-field-select-editor.d.ts +18 -0
  97. package/es/interface/form/i-form/i-form-collapse-pane.d.ts +4 -0
  98. package/es/interface/form/i-form/i-form-item-basic.d.ts +1 -1
  99. package/es/interface/form/i-form/i-form-tab-pane.d.ts +4 -0
  100. package/es/interface/form/index.d.ts +1 -0
  101. package/es/interface/i-app-context/i-app-context.d.ts +34 -0
  102. package/es/interface/i-field-code-chain/i-field-code-chain.d.ts +17 -0
  103. package/es/interface/i-global-var/i-global-var.d.ts +15 -0
  104. package/es/interface/i-mobile-home-menu-item/i-mobile-home-menu-item.d.ts +94 -0
  105. package/es/interface/i-pinia-action/i-global-actions.d.ts +8 -20
  106. package/es/interface/i-pinia-getter/i-global-getters.d.ts +1 -1
  107. package/es/interface/i-pinia-state/i-global-state.d.ts +7 -14
  108. package/es/interface/index.d.ts +5 -5
  109. package/es/interface/open-util/i-message-util/i-message-util.d.ts +54 -0
  110. package/es/interface/{i-modal → open-util/i-modal}/i-modal.d.ts +9 -10
  111. package/es/interface/{i-modal-data → open-util/i-modal-data}/i-modal-data.d.ts +6 -0
  112. package/es/interface/open-util/i-modal-options/i-modal-options.d.ts +12 -0
  113. package/es/interface/open-util/i-open-window-options/i-open-window-options.d.ts +59 -0
  114. package/es/interface/open-util/i-overlay-container/i-overlay-container.d.ts +36 -0
  115. package/es/interface/open-util/i-overlay-controller/i-overlay-controller.d.ts +36 -0
  116. package/es/interface/open-util/index.d.ts +7 -0
  117. package/es/interface/state/index.d.ts +0 -1
  118. package/es/locale/index.mjs +2 -2
  119. package/es/modules/env-manager/env-manager.const.mjs +0 -1
  120. package/es/modules/env-manager/env-manager.interface.mjs +0 -1
  121. package/es/modules/env-manager/env-manager.mjs +7 -8
  122. package/es/modules/error-handler/error-handler.const.mjs +1 -30
  123. package/es/modules/error-handler/error-strategy.mjs +0 -1
  124. package/es/modules/error-handler/index.mjs +0 -1
  125. package/es/modules/platform-config/constants/index.d.ts +7 -0
  126. package/es/modules/platform-config/constants/login.const.d.ts +15 -0
  127. package/es/modules/platform-config/constants/login.const.mjs +50 -0
  128. package/es/modules/platform-config/constants/org.const.d.ts +9 -0
  129. package/es/modules/platform-config/constants/org.const.mjs +54 -0
  130. package/es/modules/platform-config/constants/theme.const.d.ts +9 -0
  131. package/es/modules/platform-config/constants/theme.const.mjs +5 -0
  132. package/es/modules/platform-config/constants/watermark.const.d.ts +16 -0
  133. package/es/modules/platform-config/constants/watermark.const.mjs +14 -0
  134. package/es/modules/platform-config/enums/deploy.enum.d.ts +10 -0
  135. package/es/modules/platform-config/enums/deploy.enum.mjs +7 -0
  136. package/es/modules/platform-config/enums/index.d.ts +6 -0
  137. package/es/modules/platform-config/{constants.d.ts → enums/login.enum.d.ts} +3 -7
  138. package/es/modules/platform-config/enums/login.enum.mjs +16 -0
  139. package/es/modules/platform-config/enums/platform.enum.d.ts +27 -0
  140. package/es/modules/platform-config/enums/platform.enum.mjs +26 -0
  141. package/es/modules/platform-config/index.d.ts +6 -17
  142. package/es/modules/platform-config/interfaces/global-setting.interface.d.ts +7 -0
  143. package/es/modules/platform-config/interfaces/index.d.ts +7 -0
  144. package/es/modules/platform-config/interfaces/login-config.interface.d.ts +17 -0
  145. package/es/modules/platform-config/interfaces/platform-map.interface.d.ts +8 -0
  146. package/es/modules/platform-config/interfaces/theme-setting.interface.d.ts +30 -0
  147. package/es/modules/platform-config/store.d.ts +221 -0
  148. package/es/modules/platform-config/store.mjs +78 -0
  149. package/es/modules/platform-config/useBasicSetting.d.ts +6 -2
  150. package/es/modules/platform-config/useBasicSetting.mjs +39 -0
  151. package/es/modules/platform-config/useDeploySetting.d.ts +9 -4
  152. package/es/modules/platform-config/useDeploySetting.mjs +27 -0
  153. package/es/modules/platform-config/useLoginSetting.d.ts +4 -14
  154. package/es/modules/platform-config/useLoginSetting.mjs +177 -0
  155. package/es/modules/platform-config/useOrgSetting.d.ts +5 -1
  156. package/es/modules/platform-config/useOrgSetting.mjs +66 -0
  157. package/es/modules/platform-config/useProjectSetting.d.ts +12 -0
  158. package/es/modules/platform-config/useProjectSetting.mjs +11 -0
  159. package/es/modules/platform-config/useSecuritySetting.d.ts +5 -1
  160. package/es/modules/platform-config/useSecuritySetting.mjs +60 -0
  161. package/es/modules/platform-config/useThemeSetting.d.ts +6 -3
  162. package/es/modules/platform-config/useThemeSetting.mjs +64 -0
  163. package/es/modules/platform-config/useWatermarkSetting.d.ts +4 -1
  164. package/es/modules/platform-config/useWatermarkSetting.mjs +26 -0
  165. package/es/modules/user-stores/index.d.ts +3 -0
  166. package/es/modules/user-stores/store/permission.store.d.ts +21 -0
  167. package/es/modules/user-stores/store/permission.store.mjs +38 -0
  168. package/es/modules/user-stores/store/tenant.store.d.ts +9 -0
  169. package/es/modules/user-stores/store/tenant.store.mjs +24 -0
  170. package/es/modules/user-stores/store/user.store.d.ts +154 -0
  171. package/es/modules/user-stores/store/user.store.mjs +107 -0
  172. package/es/modules/user-stores/types/permission.d.ts +1 -0
  173. package/es/modules/user-stores/types/tenant.d.ts +1 -0
  174. package/es/modules/user-stores/types/user.d.ts +14 -0
  175. package/es/register/editor-register/editor-register.d.ts +5 -13
  176. package/es/register/editor-register/editor-register.mjs +8 -17
  177. package/es/register/form-item-register/form-item-register.d.ts +4 -15
  178. package/es/register/form-item-register/form-item-register.mjs +7 -17
  179. package/es/register/index.d.ts +12 -2
  180. package/es/router/index.mjs +0 -1
  181. package/es/setup-app.d.ts +8 -0
  182. package/es/setup-app.mjs +30 -0
  183. package/es/state/form/form.state.mjs +0 -1
  184. package/es/state/form-collapse/form-collapse.state.mjs +0 -1
  185. package/es/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -1
  186. package/es/state/form-edit-item/form-edit-item.state.mjs +0 -1
  187. package/es/state/form-group/form-group.state.mjs +0 -1
  188. package/es/state/form-item/form-item.state.mjs +0 -1
  189. package/es/state/form-item-basic/form-item-basic.state.mjs +0 -1
  190. package/es/state/form-tab/form-tab.state.mjs +0 -1
  191. package/es/state/form-tab-pane/form-tab-pane.state.mjs +0 -1
  192. package/es/state/global-pinia-state/global-pinia-state.d.ts +8 -25
  193. package/es/state/global-pinia-state/global-pinia-state.mjs +30 -16
  194. package/es/store/global-store.d.ts +1 -0
  195. package/es/store/global-store.mjs +40 -37
  196. package/es/store/index.d.ts +2 -3
  197. package/es/store/index.mjs +0 -1
  198. package/es/types/index.d.ts +18 -1
  199. package/es/utils/axios/interceptors.mjs +2 -23
  200. package/es/utils/cache-adapter/cache-adapter.d.ts +2 -0
  201. package/es/utils/cache-adapter/cache-adapter.mjs +59 -0
  202. package/es/utils/deviceFingerprint.d.ts +17 -0
  203. package/es/utils/deviceFingerprint.mjs +73 -0
  204. package/es/utils/dictionary/dictionary.mjs +0 -1
  205. package/es/utils/i18n/index.d.ts +2 -1
  206. package/es/utils/i18n/index.mjs +3 -4
  207. package/es/utils/index.d.ts +17 -3
  208. package/es/utils/linked-list/linked-list.d.ts +72 -0
  209. package/es/utils/linked-list/linked-list.mjs +119 -0
  210. package/es/utils/linked-node/linked-node.d.ts +31 -0
  211. package/es/utils/linked-node/linked-node.mjs +32 -0
  212. package/es/utils/lowcode/utils.d.ts +1 -0
  213. package/es/utils/lowcode/utils.mjs +20 -0
  214. package/es/utils/lowcode/validate.d.ts +13 -0
  215. package/es/utils/lowcode/validate.mjs +29 -0
  216. package/es/utils/mitt/mitt.d.ts +1 -0
  217. package/es/utils/mitt/mitt.mjs +5 -0
  218. package/es/utils/model-loader/model-loader.d.ts +118 -0
  219. package/es/utils/model-loader/model-loader.mjs +326 -0
  220. package/es/utils/namespace/namespace.d.ts +8 -0
  221. package/es/utils/namespace/namespace.mjs +4 -2
  222. package/es/utils/openUtil/index.d.ts +2 -0
  223. package/es/utils/openUtil/modal/modal.d.ts +61 -0
  224. package/es/utils/openUtil/modal/modal.mjs +80 -0
  225. package/es/utils/openUtil/overlay-container/overlay-container.d.ts +100 -0
  226. package/es/utils/openUtil/overlay-container/overlay-container.mjs +139 -0
  227. package/es/utils/plugin-static-resource/plugin-static-resource.mjs +0 -1
  228. package/es/utils/props/gct-form-item/gct-form-item.props.d.ts +63 -0
  229. package/es/utils/props/gct-form-item/gct-form-item.props.mjs +66 -0
  230. package/es/utils/props/index.d.ts +1 -0
  231. package/es/utils/style/index.d.ts +16 -0
  232. package/es/utils/style/index.mjs +141 -0
  233. package/es/utils/tools/tools.d.ts +13 -10
  234. package/es/utils/tools/tools.mjs +23 -11
  235. package/es/utils/treeHelper/treeHelper.d.ts +124 -0
  236. package/es/utils/treeHelper/treeHelper.mjs +234 -0
  237. package/es/utils/util.d.ts +39 -0
  238. package/es/utils/util.mjs +40 -0
  239. package/es/utils/uuid/uuid.d.ts +3 -0
  240. package/es/utils/uuid/uuid.mjs +48 -0
  241. package/es/utils/value-helper/value-helper.d.ts +49 -0
  242. package/es/utils/value-helper/value-helper.mjs +111 -0
  243. package/es/utils/width-install/width-install.mjs +4 -2
  244. package/package.json +13 -16
  245. package/es/controller/index.mjs +0 -17
  246. package/es/enums/page-designer/index.mjs +0 -6
  247. package/es/global/index.mjs +0 -3
  248. package/es/hooks/index.mjs +0 -7
  249. package/es/hooks/use-namespace/use-namespace.d.ts +0 -9
  250. package/es/hooks/use-namespace/use-namespace.mjs +0 -9
  251. package/es/interface/controller/i-designer-controller.d.ts +0 -116
  252. package/es/interface/hooks/i-designer-hooks.d.ts +0 -26
  253. package/es/interface/hooks/index.d.ts +0 -1
  254. package/es/interface/i-message-util/i-message-util.d.ts +0 -78
  255. package/es/interface/index.mjs +0 -1
  256. package/es/interface/low-code-types/index.d.ts +0 -4
  257. package/es/interface/low-code-types/modal-types.d.ts +0 -67
  258. package/es/interface/low-code-types/model/index.d.ts +0 -5338
  259. package/es/interface/low-code-types/schema/index.d.ts +0 -12
  260. package/es/interface/low-code-types/widget-basic-types.d.ts +0 -667
  261. package/es/interface/state/i-designer-state.d.ts +0 -27
  262. package/es/modules/env-manager/index.mjs +0 -5
  263. package/es/modules/platform-config/index.mjs +0 -17
  264. package/es/modules/platform-config/types.d.ts +0 -67
  265. package/es/provider/i-designer-provider/i-designer-provider.d.ts +0 -102
  266. package/es/provider/index.d.ts +0 -1
  267. package/es/provider/index.mjs +0 -1
  268. package/es/register/designer-register/designer-register.d.ts +0 -53
  269. package/es/register/designer-register/designer-register.mjs +0 -68
  270. package/es/register/index.mjs +0 -6
  271. package/es/register/render-register/render-register.d.ts +0 -59
  272. package/es/register/render-register/render-register.mjs +0 -64
  273. package/es/state/index.mjs +0 -12
  274. package/es/utils/index.mjs +0 -10
  275. package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +0 -96
  276. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +0 -260
@@ -1,5 +1,6 @@
1
1
  import { StateTree } from 'pinia';
2
2
  import { ProjectName } from '../../enums';
3
+ import { IAppContext } from '../i-app-context/i-app-context';
3
4
  /**
4
5
  * 全局 store 状态
5
6
  *
@@ -7,6 +8,12 @@ import { ProjectName } from '../../enums';
7
8
  * @interface IGlobalState
8
9
  */
9
10
  export interface IGlobalState extends StateTree {
11
+ /**
12
+ * 应用上下文
13
+ *
14
+ * @type {IAppContext}
15
+ */
16
+ context: IAppContext;
10
17
  /**
11
18
  * 项目名称
12
19
  *
@@ -18,30 +25,16 @@ export interface IGlobalState extends StateTree {
18
25
  *
19
26
  * @type {string}
20
27
  */
21
- tenantId: string;
22
28
  /**
23
29
  * 多语言环境
24
30
  *
25
31
  * @default zh-CN
26
32
  * @type {string}
27
33
  */
28
- lang: string;
29
34
  /**
30
35
  * 应用信息, todo: 等 api 包完成后,实际类型从 api 导入
31
36
  *
32
37
  * @type {IObject}
33
38
  */
34
39
  appInfo: IObject;
35
- /**
36
- * 用户信息
37
- *
38
- * @type {IObject}
39
- */
40
- userInfo: IObject;
41
- /**
42
- * 租户用户信息
43
- *
44
- * @type {IObject}
45
- */
46
- tenantUserInfo: IObject;
47
40
  }
@@ -1,18 +1,18 @@
1
1
  export type * from './controller';
2
2
  export type * from './events';
3
3
  export type * from './form';
4
- export type * from './hooks';
4
+ export type * from './i-app-context/i-app-context';
5
5
  export type { IDictionary } from './i-dictionary/i-dictionary';
6
6
  export type { IDictionaryItem } from './i-dictionary/i-dictionary-item';
7
- export type { IMessageParams, IMessageUtil, } from './i-message-util/i-message-util';
8
- export type { IModal } from './i-modal/i-modal';
9
- export type { IModalData } from './i-modal-data/i-modal-data';
7
+ export type { IFieldCodeChain } from './i-field-code-chain/i-field-code-chain';
8
+ export type { GlobalVar } from './i-global-var/i-global-var';
9
+ export type { IMobileHomeMenuItem } from './i-mobile-home-menu-item/i-mobile-home-menu-item';
10
10
  export type { IStyleIMportMap } from './i-import-style-map/i-import-style-map';
11
11
  export type { IGlobalActions } from './i-pinia-action/i-global-actions';
12
12
  export type { IGlobalGetters } from './i-pinia-getter/i-global-getters';
13
13
  export type { IGlobalState } from './i-pinia-state/i-global-state';
14
+ export type * from './open-util';
14
15
  export type * from './layout';
15
- export type * from './low-code-types';
16
16
  export type * from './provider';
17
17
  export type * from './state';
18
18
  export type * from './style';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * 消息参数
3
+ *
4
+ * @export
5
+ * @interface IMessageParams
6
+ */
7
+ export interface IMessageParams {
8
+ /**
9
+ * 持续时间,单位:秒,默认:1.5
10
+ *
11
+ * @type {number}
12
+ */
13
+ duration?: number;
14
+ }
15
+ /**
16
+ * 顶部居中显示,并自动消失
17
+ *
18
+ * @export
19
+ * @interface IMessageUtil
20
+ */
21
+ export interface IMessageUtil {
22
+ /**
23
+ * 普通消息
24
+ *
25
+ * @param {string} msg
26
+ * @param {IMessageParams} [params]
27
+ * @return {*} {Promise<void>}
28
+ */
29
+ info(msg: string, params?: IMessageParams): Promise<void>;
30
+ /**
31
+ * 成功消息
32
+ *
33
+ * @param {string} msg
34
+ * @param {IMessageParams} [params]
35
+ * @return {*} {Promise<void>}
36
+ */
37
+ success(msg: string, params?: IMessageParams): Promise<void>;
38
+ /**
39
+ * 警告消息
40
+ *
41
+ * @param {string} msg
42
+ * @param {IMessageParams} [params]
43
+ * @return {*} {Promise<void>}
44
+ */
45
+ warning(msg: string, params?: IMessageParams): Promise<void>;
46
+ /**
47
+ * 错误消息
48
+ *
49
+ * @param {string} msg
50
+ * @param {IMessageParams} [params]
51
+ * @return {*} {Promise<void>}
52
+ */
53
+ error(msg: string, params?: IMessageParams): Promise<void>;
54
+ }
@@ -1,6 +1,6 @@
1
1
  import { AsyncSeriesHook } from 'qx-util';
2
2
  import { IModalData } from '../i-modal-data/i-modal-data';
3
- interface ModalHooks {
3
+ export interface IModalHooks {
4
4
  shouldDismiss: AsyncSeriesHook<[
5
5
  ], {
6
6
  allowClose?: boolean;
@@ -29,22 +29,22 @@ export interface IModal {
29
29
  *
30
30
  * @author zhanghanrui
31
31
  * @date 2024-03-19 21:03:55
32
- * @type {ModalHooks}
32
+ * @type {IModalHooks}
33
33
  */
34
- hooks: ModalHooks;
34
+ hooks: IModalHooks;
35
35
  /**
36
36
  * 统一关闭入口
37
37
  *
38
- * @author zhanghanrui
39
- * @date 2024-03-19 21:03:04
38
+ * @param {IModalData} [data]
39
+ * @return {*} {Promise<boolean>}
40
40
  */
41
- dismiss: (data?: IModalData) => Promise<boolean>;
41
+ dismiss(data?: IModalData): Promise<boolean>;
42
42
  /**
43
43
  * 设置模态框属性
44
- * @param options
45
- * @returns
44
+ *
45
+ * @param {object} options
46
46
  */
47
- setOptions: (options: object) => void;
47
+ setOptions?(options: object): void;
48
48
  /**
49
49
  * 确认操作
50
50
  *
@@ -68,4 +68,3 @@ export interface IModal {
68
68
  */
69
69
  cancel?: () => Promise<boolean>;
70
70
  }
71
- export {};
@@ -15,6 +15,12 @@ export interface IModalData {
15
15
  * @type {boolean}
16
16
  */
17
17
  ok: boolean;
18
+ /**
19
+ * 是否关闭模态窗(当 close 为 true 时,ok=false 也会关闭模态窗)
20
+ *
21
+ * @type {boolean}
22
+ */
23
+ close?: boolean;
18
24
  /**
19
25
  * 返回的数据
20
26
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 模态打开参数,此为具体端实现,具体扩充参数由各端定义
3
+ *
4
+ * @export
5
+ * @interface IModalOptions
6
+ */
7
+ export interface IModalOptions {
8
+ [key: string]: any;
9
+ title?: string;
10
+ width?: string | number;
11
+ zIndex?: number;
12
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * openWindow 函数的配置选项接口
3
+ *
4
+ * @export
5
+ * @interface IOpenWindowOptions
6
+ */
7
+ export interface IOpenWindowOptions {
8
+ /**
9
+ * 窗口打开方式
10
+ *
11
+ * @type {HTMLAnchorElement['target']}
12
+ * @memberof IOpenWindowOptions
13
+ * @default '_blank'
14
+ */
15
+ target?: HTMLAnchorElement['target'];
16
+ /**
17
+ * 是否启用 noopener 特性
18
+ * 防止新页面访问 window.opener
19
+ *
20
+ * @type {boolean}
21
+ * @memberof IOpenWindowOptions
22
+ * @default true
23
+ */
24
+ noopener?: boolean;
25
+ /**
26
+ * 是否启用 noreferrer 特性
27
+ * 防止新页面获取来源页面信息
28
+ *
29
+ * @type {boolean}
30
+ * @memberof IOpenWindowOptions
31
+ * @default true
32
+ */
33
+ noreferrer?: boolean;
34
+ /**
35
+ * URL 参数数据
36
+ * 用于替换 URL 中的占位符,格式如 /path/{id}/{name?}
37
+ *
38
+ * @type {IObject}
39
+ * @memberof IOpenWindowOptions
40
+ */
41
+ genUrlData?: IObject;
42
+ /**
43
+ * 路由路径
44
+ * 将附加到 URL 末尾
45
+ *
46
+ * @type {string}
47
+ * @memberof IOpenWindowOptions
48
+ * @default ''
49
+ */
50
+ routePath?: string;
51
+ /**
52
+ * 额外的 window.open 特性字符串
53
+ * 如: 'width=800,height=600'
54
+ *
55
+ * @type {string}
56
+ * @memberof IOpenWindowOptions
57
+ */
58
+ optionStr?: string;
59
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 全局呈现容器
3
+ *
4
+ * @author zhanghanrui
5
+ * @date 2024-03-19 18:03:21
6
+ * @export
7
+ * @interface IOverlayContainer
8
+ */
9
+ export interface IOverlayContainer {
10
+ /**
11
+ * 展示容器
12
+ *
13
+ * @author zhanghanrui
14
+ * @date 2024-03-19 18:03:02
15
+ * @return {*} {Promise<void>}
16
+ */
17
+ present(): Promise<void>;
18
+ /**
19
+ * 关闭容器
20
+ *
21
+ * @author zhanghanrui
22
+ * @date 2024-03-19 18:03:08
23
+ * @param {unknown} [data]
24
+ * @return {*} {Promise<void>}
25
+ */
26
+ dismiss(data?: unknown): Promise<void>;
27
+ /**
28
+ * 等待容器关闭并返回返回值
29
+ *
30
+ * @author zhanghanrui
31
+ * @date 2024-03-19 18:03:12
32
+ * @template T
33
+ * @return {*} {Promise<T>}
34
+ */
35
+ onWillDismiss<T = unknown>(): Promise<T>;
36
+ }
@@ -0,0 +1,36 @@
1
+ import { IOverlayContainer } from '../i-overlay-container/i-overlay-container';
2
+ import { IModalOptions } from '../i-modal-options/i-modal-options';
3
+ import { IModalData } from '../i-modal-data/i-modal-data';
4
+ /**
5
+ * 全局呈现容器控制器
6
+ *
7
+ * @author zhanghanrui
8
+ * @date 2024-03-19 19:03:18
9
+ * @export
10
+ * @interface IOverlayController
11
+ */
12
+ export interface IOverlayController {
13
+ /**
14
+ * 模态打开组件
15
+ *
16
+ * @author zhanghanrui
17
+ * @date 2024-03-19 19:03:42
18
+ * @template T
19
+ * @param {unknown} component 组件名称,组件对象,或者绘制函数
20
+ * @param {IParams} [props] 组件props
21
+ * @param {IModalOptions} [opts]
22
+ * @return {*} {Promise<T>}
23
+ */
24
+ modal<T = IModalData>(component: unknown, props?: IParams, opts?: IModalOptions): Promise<T>;
25
+ /**
26
+ * 创建全局模态容器
27
+ *
28
+ * @author zhanghanrui
29
+ * @date 2024-03-19 19:03:04
30
+ * @param {unknown} component 组件名称,组件对象,或者绘制函数
31
+ * @param {IParams} [props] 组件props
32
+ * @param {IModalOptions} [opts]
33
+ * @return {*} {IOverlayContainer}
34
+ */
35
+ createModal(component: unknown, props?: IParams, opts?: IModalOptions): IOverlayContainer;
36
+ }
@@ -0,0 +1,7 @@
1
+ export type { IMessageParams, IMessageUtil, } from './i-message-util/i-message-util';
2
+ export type { IModal } from './i-modal/i-modal';
3
+ export type { IModalData } from './i-modal-data/i-modal-data';
4
+ export type { IModalOptions } from './i-modal-options/i-modal-options';
5
+ export type { IOpenWindowOptions } from './i-open-window-options/i-open-window-options';
6
+ export type { IOverlayContainer } from './i-overlay-container/i-overlay-container';
7
+ export type { IOverlayController } from './i-overlay-controller/i-overlay-controller';
@@ -1,4 +1,3 @@
1
- export type { IDesignerState } from './i-designer-state';
2
1
  export type { IFormState } from './form/form.state';
3
2
  export type { IFormCollapsePaneState } from './form-collapse-pane/form-collapse-pane.state';
4
3
  export type { IFormCollapseState } from './form-collapse/form-collapse.state';
@@ -1,8 +1,8 @@
1
1
  import { createI18n } from 'vue-i18n';
2
2
 
3
- "use strict";
4
3
  class LocaleUtil {
5
4
  i18n = createI18n({
5
+ legacy: false,
6
6
  locale: "zh-CN",
7
7
  fallbackLocale: "en",
8
8
  messages: {
@@ -13,7 +13,7 @@ class LocaleUtil {
13
13
  },
14
14
  ja: {
15
15
  message: {
16
- hello: "\u3053\u3093\u306B\u3061\u306F\u3001\u4E16\u754C"
16
+ hello: "こんにちは、世界"
17
17
  }
18
18
  }
19
19
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  const IP_REG = /^http:\/\/\d{1,3}(\.\d{1,3}){3}:(\d{1,5})$/;
3
2
  const HOST_REG = /^https?:\/\/([a-z0-9]+)-test\./;
4
3
  const APP_RUN_PATH_REG = /\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var EnvironmentType = /* @__PURE__ */ ((EnvironmentType2) => {
3
2
  EnvironmentType2["DEV"] = "dev";
4
3
  EnvironmentType2["TEST"] = "test";
@@ -1,7 +1,6 @@
1
1
  import { EnvironmentType } from './env-manager.interface.mjs';
2
2
  import { HOST_REG, APP_RUN_PATH_REG, APP_PROD_PATH_REG, APP_PREVIEW_PATH_REG, DEV_SINGLE_PATH_REG, TEST_SINGLE_PATH_REG, IP_REG } from './env-manager.const.mjs';
3
3
 
4
- "use strict";
5
4
  class EnvironmentManager {
6
5
  /** 测试环境标识 */
7
6
  _testEnv = false;
@@ -12,7 +11,7 @@ class EnvironmentManager {
12
11
  /** 域名访问模式标识 */
13
12
  _isHostMode = false;
14
13
  constructor() {
15
- this._platformOrigin = (import.meta.env.DEV ? import.meta.env.VITE_GLOBAL_HOST : location.origin) || "";
14
+ this._platformOrigin = (location.origin) || "";
16
15
  this._isHostMode = HOST_REG.test(this._platformOrigin);
17
16
  }
18
17
  /**
@@ -72,21 +71,21 @@ class EnvironmentManager {
72
71
  matches = this._platformOrigin.match(HOST_REG);
73
72
  this._testEnv = !!(matches && matches[1]);
74
73
  if (this._testEnv) {
75
- const res = await _api.platform.tenant.getInfoByPortOrDomain({
74
+ const data = await _api.platform.tenant.getInfoByPortOrDomain({
76
75
  domain: matches[1]
77
76
  });
78
- Object.assign(this._testTenantData, res.data);
77
+ Object.assign(this._testTenantData, data);
79
78
  }
80
79
  } else {
81
80
  matches = this._platformOrigin.match(IP_REG);
82
81
  const port = matches && matches[2];
83
82
  if (port) {
84
- const res = await _api.platform.tenant.getInfoByPortOrDomain({
83
+ const data = await _api.platform.tenant.getInfoByPortOrDomain({
85
84
  port
86
85
  });
87
- if (res.data) {
88
- Object.assign(this._testTenantData, res.data);
89
- this._testEnv = res.data.testEnvPort === port;
86
+ if (data) {
87
+ Object.assign(this._testTenantData, data);
88
+ this._testEnv = data.testEnvPort === port;
90
89
  }
91
90
  }
92
91
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  const HTTP_STATUS_CODE = {
3
2
  /** 未授权 */
4
3
  UNAUTHORIZED: 401,
@@ -15,33 +14,5 @@ const HTTP_STATUS_CODE = {
15
14
  /** 网关超时 */
16
15
  GATEWAY_TIMEOUT: 504
17
16
  };
18
- const ERROR_LOG_TEMPLATE = {
19
- /** JavaScript 错误模板 */
20
- SCRIPT_ERROR: "[SCRIPT ERROR]",
21
- /** Vue 组件错误模板 */
22
- VUE_ERROR: "[VUE ERROR]",
23
- /** 资源加载错误模板 */
24
- RESOURCE_ERROR: "[RESOURCE ERROR]",
25
- /** Ajax 请求错误模板 */
26
- AJAX_ERROR: "[AJAX ERROR]",
27
- /** Promise 异常模板 */
28
- PROMISE_ERROR: "[PROMISE ERROR]"
29
- };
30
- const NETWORK_STATUS_MESSAGE = {
31
- /** 网络连接丢失 */
32
- CONNECTION_LOST: "Network connection lost",
33
- /** 网络连接恢复 */
34
- CONNECTION_RESTORED: "Network connection restored"
35
- };
36
- const ERROR_EVENT_NAMES = {
37
- /** JavaScript 错误事件 */
38
- ERROR: "error",
39
- /** Promise 拒绝事件 */
40
- UNHANDLED_REJECTION: "unhandledrejection",
41
- /** 网络离线事件 */
42
- OFFLINE: "offline",
43
- /** 网络在线事件 */
44
- ONLINE: "online"
45
- };
46
17
 
47
- export { ERROR_EVENT_NAMES, ERROR_LOG_TEMPLATE, HTTP_STATUS_CODE, NETWORK_STATUS_MESSAGE };
18
+ export { HTTP_STATUS_CODE };
@@ -1,7 +1,6 @@
1
1
  import { HTTP_STATUS_CODE } from './error-handler.const.mjs';
2
2
  import { ErrorTypeEnum } from '../../enums/exceptionEnum.mjs';
3
3
 
4
- "use strict";
5
4
  class JavaScriptErrorStrategy {
6
5
  /**
7
6
  * 处理 JavaScript 错误
@@ -1,7 +1,6 @@
1
1
  import { ErrorStrategyFactory } from './error-strategy.mjs';
2
2
  import { ErrorTypeEnum } from '../../enums/exceptionEnum.mjs';
3
3
 
4
- "use strict";
5
4
  class ErrorHandler {
6
5
  static _instance;
7
6
  /**
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 常量导出模块
3
+ */
4
+ export * from './login.const';
5
+ export * from './org.const';
6
+ export * from './theme.const';
7
+ export * from './watermark.const';
@@ -0,0 +1,15 @@
1
+ import { LoginTypeEnum } from '../enums/login.enum';
2
+ /** 系统登录方式的 key 数组 */
3
+ export declare const SYSTEM_LOGIN_KEYS: LoginTypeEnum[];
4
+ /** 第三方登录方式的 key 数组 */
5
+ export declare const OTHER_LOGIN_KEYS: LoginTypeEnum[];
6
+ /**
7
+ * 根据登录类型 key 获取登录选项配置
8
+ * @param keys - 登录类型 key 数组
9
+ * @returns 包含登录选项信息的数组
10
+ */
11
+ export declare const getLoginTypeOptions: (keys: string[]) => {
12
+ id: string;
13
+ label: string;
14
+ value: string;
15
+ }[];
@@ -0,0 +1,50 @@
1
+ import { LoginTypeEnum } from '../enums/login.enum.mjs';
2
+
3
+ const LOGIN_TYPE_INFO = {
4
+ [LoginTypeEnum.ACCOUNT]: {
5
+ icon: "icon-a-Accountnumber",
6
+ color: "#0E81EC"
7
+ },
8
+ [LoginTypeEnum.DOMAIN_ACCOUNT]: {
9
+ icon: "icon-a-Domainaccount",
10
+ color: "#FFAB06"
11
+ },
12
+ [LoginTypeEnum.MOBILE]: {
13
+ icon: "icon-a-Cellphone",
14
+ color: "#6A70FE"
15
+ },
16
+ [LoginTypeEnum.DINGDING]: {
17
+ icon: "DingdingIcon"
18
+ },
19
+ [LoginTypeEnum.FEISHU]: {
20
+ icon: "FeishuIcon"
21
+ },
22
+ [LoginTypeEnum.QIYEWEIXIN]: {
23
+ icon: "QiyeweixinIcon"
24
+ }
25
+ };
26
+ const SYSTEM_LOGIN_KEYS = [
27
+ LoginTypeEnum.ACCOUNT,
28
+ LoginTypeEnum.DOMAIN_ACCOUNT,
29
+ LoginTypeEnum.MOBILE
30
+ ];
31
+ const OTHER_LOGIN_KEYS = [
32
+ LoginTypeEnum.DINGDING,
33
+ LoginTypeEnum.FEISHU,
34
+ LoginTypeEnum.QIYEWEIXIN
35
+ ];
36
+ const getLoginTypeOptions = (keys) => {
37
+ if (!keys) {
38
+ return [];
39
+ }
40
+ return keys.map((key) => {
41
+ return {
42
+ id: key,
43
+ label: key,
44
+ value: key,
45
+ ...LOGIN_TYPE_INFO[key]
46
+ };
47
+ });
48
+ };
49
+
50
+ export { OTHER_LOGIN_KEYS, SYSTEM_LOGIN_KEYS, getLoginTypeOptions };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 组织相关常量定义
3
+ */
4
+ /** 关联字段配置列表 */
5
+ export declare const RELATION_FIELDS: {
6
+ label: string;
7
+ value: string;
8
+ type: number;
9
+ }[];
@@ -0,0 +1,54 @@
1
+ const RELATION_FIELDS = [
2
+ {
3
+ label: "extString0_",
4
+ value: "ext0",
5
+ type: 1
6
+ },
7
+ {
8
+ label: "extString1_",
9
+ value: "ext1",
10
+ type: 1
11
+ },
12
+ {
13
+ label: "extString2_",
14
+ value: "ext2",
15
+ type: 1
16
+ },
17
+ {
18
+ label: "extString3_",
19
+ value: "ext3",
20
+ type: 1
21
+ },
22
+ {
23
+ label: "extString4_",
24
+ value: "ext4",
25
+ type: 1
26
+ },
27
+ {
28
+ label: "extInt5_",
29
+ value: "ext5",
30
+ type: 0
31
+ },
32
+ {
33
+ label: "extInt6_",
34
+ value: "ext6",
35
+ type: 0
36
+ },
37
+ {
38
+ label: "extInt7_",
39
+ value: "ext7",
40
+ type: 0
41
+ },
42
+ {
43
+ label: "extInt8_",
44
+ value: "ext8",
45
+ type: 0
46
+ },
47
+ {
48
+ label: "extInt9_",
49
+ value: "ext9",
50
+ type: 0
51
+ }
52
+ ];
53
+
54
+ export { RELATION_FIELDS };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 主题相关常量定义
3
+ */
4
+ /** 菜单折叠时的宽度 */
5
+ export declare const MENU_COLLAPSED_WIDTH = 46;
6
+ /** 菜单宽度范围 */
7
+ export declare const MENU_WIDTH_RANGE: number[];
8
+ /** 可选的主题颜色列表 */
9
+ export declare const THEME_COLORS: string[];
@@ -0,0 +1,5 @@
1
+ const MENU_COLLAPSED_WIDTH = 46;
2
+ const MENU_WIDTH_RANGE = [100, 1e3];
3
+ const THEME_COLORS = ["#026AC8", "#0DAA9C"];
4
+
5
+ export { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 水印相关常量定义
3
+ */
4
+ /** 水印初始化数据 */
5
+ export declare const WATERMARK_INIT_DATA: {
6
+ openWatermark: boolean;
7
+ watermarkContent: string;
8
+ fontSize: number;
9
+ color: string;
10
+ verticalAlign: string;
11
+ textAlign: string;
12
+ text: string;
13
+ transparent: number;
14
+ width: number;
15
+ height: number;
16
+ };
@@ -0,0 +1,14 @@
1
+ const WATERMARK_INIT_DATA = {
2
+ openWatermark: false,
3
+ watermarkContent: "custom",
4
+ fontSize: 16,
5
+ color: "#000000",
6
+ verticalAlign: "middle",
7
+ textAlign: "center",
8
+ text: "${username}",
9
+ transparent: 15,
10
+ width: 1600,
11
+ height: 1080
12
+ };
13
+
14
+ export { WATERMARK_INIT_DATA };