@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
@@ -0,0 +1,48 @@
1
+ const hexList = [];
2
+ for (let i = 0; i <= 15; i++) {
3
+ hexList[i] = i.toString(16);
4
+ }
5
+ function buildUUID() {
6
+ let uuid = "";
7
+ for (let i = 1; i <= 36; i++) {
8
+ if (i === 9 || i === 14 || i === 19 || i === 24) {
9
+ uuid += "-";
10
+ } else if (i === 15) {
11
+ uuid += 4;
12
+ } else if (i === 20) {
13
+ uuid += hexList[Math.random() * 4 | 8];
14
+ } else {
15
+ uuid += hexList[Math.random() * 16 | 0];
16
+ }
17
+ }
18
+ return uuid.replace(/-/g, "");
19
+ }
20
+ let unique = 0;
21
+ function buildShortUUID(prefix = "") {
22
+ prefix = prefix.replaceAll("-", "");
23
+ const random = Math.floor(Math.random() * 1e9);
24
+ unique++;
25
+ return prefix + "_" + random + unique;
26
+ }
27
+ const uuid2 = (len, radix) => {
28
+ const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
29
+ const uuid = [];
30
+ let i;
31
+ radix = radix || chars.length;
32
+ if (len) {
33
+ for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
34
+ } else {
35
+ let r;
36
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
37
+ uuid[14] = "4";
38
+ for (i = 0; i < 36; i++) {
39
+ if (!uuid[i]) {
40
+ r = 0 | Math.random() * 16;
41
+ uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
42
+ }
43
+ }
44
+ }
45
+ return uuid.join("");
46
+ };
47
+
48
+ export { buildShortUUID, buildUUID, uuid2 };
@@ -0,0 +1,49 @@
1
+ import { Ref, ToRefs, ComputedGetter, ComputedSetter } from 'vue';
2
+ export declare function afterValueSet<U>(value: Ref<U>, afterSet: (i: U) => void): Ref<U>;
3
+ export declare function afterFieldSet<T extends object>(object: T | Ref<T>, afterSet: <F extends keyof T>(field: F, v: T[F]) => void): ToRefs<T>;
4
+ /**
5
+ * 属性修改的时候不修改并抛出事件
6
+ * @author lingxiaoming
7
+ * @date 2024-07-17 03:30:44
8
+ * @export
9
+ * @template T
10
+ * @param {(T | Ref<T>)} object (对象必须有该属性,即使是undefined,否则无法监控)
11
+ * @param {<F extends keyof T>(field: F, v: T[F], newObj: T) => void} emitSet newObj是将要修改成的完整数据
12
+ * @return {*} {ToRefs<T>}
13
+ */
14
+ export declare function emitFieldSet<T extends object>(object: T | Ref<T>, emitSet: <F extends keyof T>(field: F, v: T[F], newObj: T) => void): ToRefs<T>;
15
+ /**
16
+ * 解析数值和单位
17
+ * @author lingxiaoming
18
+ * @date 2024-07-15 06:06:41
19
+ * @param {string} str
20
+ * @return {*} {({ value: number; unit: string } | null)}
21
+ */
22
+ export declare function parseValueUnit(str: string): {
23
+ value: number;
24
+ unit: string;
25
+ };
26
+ /**
27
+ * 增强computed,当属性变更时,自动调用set方法
28
+ * @author lingxiaoming
29
+ * @date 2024-08-26 10:19:01
30
+ * @export
31
+ * @param {{
32
+ * get: ComputedGetter<T>;
33
+ * set: ComputedSetter<T>;
34
+ * deep: boolean; //为true时,深层属性变更也会触发set
35
+ * }} opts
36
+ */
37
+ export declare function computedEx<T>(opts: {
38
+ get: ComputedGetter<T>;
39
+ set: ComputedSetter<T>;
40
+ deep?: boolean;
41
+ }): Ref<T, T>;
42
+ /**
43
+ * 缓存函数返回值,下次相同参数调用时直接返回缓存值
44
+ * @export
45
+ * @template T
46
+ * @param cb
47
+ * @return {*}
48
+ */
49
+ export declare function cacheFnReturn<T extends Function>(cb: T): T;
@@ -0,0 +1,111 @@
1
+ import { isRef, computed, ref, watch } from 'vue';
2
+
3
+ function afterValueSet(value, afterSet) {
4
+ const newVal = computed({
5
+ get: () => value.value,
6
+ set: (v) => {
7
+ value.value = v;
8
+ afterSet(v);
9
+ }
10
+ });
11
+ return newVal;
12
+ }
13
+ function afterFieldSet(object, afterSet) {
14
+ const keys = Object.keys(isRef(object) ? object.value : object);
15
+ const result = {};
16
+ keys.forEach((key) => {
17
+ result[key] = computed({
18
+ get: () => {
19
+ return (isRef(object) ? object.value : object)[key];
20
+ },
21
+ set(v) {
22
+ (isRef(object) ? object.value : object)[key] = v;
23
+ afterSet(key, v);
24
+ }
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ });
27
+ });
28
+ return result;
29
+ }
30
+ function emitFieldSet(object, emitSet) {
31
+ const keys = Object.keys(isRef(object) ? object.value : object);
32
+ const result = {};
33
+ let cacheData = {};
34
+ keys.forEach((key) => {
35
+ result[key] = computed({
36
+ get: () => {
37
+ cacheData = {};
38
+ return (isRef(object) ? object.value : object)[key];
39
+ },
40
+ set(v) {
41
+ const objVal = isRef(object) ? object.value : object;
42
+ cacheData[key] = v;
43
+ const newObj = { ...objVal, ...cacheData };
44
+ emitSet(key, v, newObj);
45
+ }
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ });
48
+ });
49
+ return result;
50
+ }
51
+ function parseValueUnit(str) {
52
+ if (str === "nullpx") {
53
+ return {
54
+ value: 0,
55
+ unit: "px"
56
+ };
57
+ }
58
+ const regex = /^(\d+\.?\d*)([a-zA-Z%]+)$/;
59
+ const match = str.match(regex);
60
+ if (match) {
61
+ return {
62
+ value: parseFloat(match[1]),
63
+ unit: match[2]
64
+ };
65
+ }
66
+ throw new Error("Invalid value");
67
+ }
68
+ function computedEx(opts) {
69
+ const result = ref();
70
+ let clear;
71
+ const watchDeep = () => {
72
+ if (!opts.deep) {
73
+ return;
74
+ }
75
+ clear = watch(
76
+ () => result.value,
77
+ (v) => {
78
+ console.info("computedEx:属性或者值修改", v);
79
+ opts.set(v);
80
+ },
81
+ { deep: true }
82
+ );
83
+ };
84
+ watch(
85
+ () => opts.get(),
86
+ (v) => {
87
+ if (clear) {
88
+ clear();
89
+ }
90
+ console.info("computedEx:获取新值,重新监听", v);
91
+ result.value = v;
92
+ watchDeep();
93
+ },
94
+ { immediate: true }
95
+ );
96
+ return result;
97
+ }
98
+ function cacheFnReturn(cb) {
99
+ const cacheReturn = /* @__PURE__ */ new Map();
100
+ return function(...args) {
101
+ const key = JSON.stringify(args);
102
+ if (cacheReturn.has(key)) {
103
+ return cacheReturn.get(key);
104
+ }
105
+ const result = cb(...args);
106
+ cacheReturn.set(key, result);
107
+ return result;
108
+ };
109
+ }
110
+
111
+ export { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit };
@@ -1,7 +1,9 @@
1
- import '../../constants/index.mjs';
1
+ import '../../constants/expression-type/modeCfg.mjs';
2
+ import '../../constants/expression-type/BuiltOperators.mjs';
3
+ import '../../constants/expression-type/function.mjs';
4
+ import '../../constants/expression-type/variable.mjs';
2
5
  import { EditorRegisterConst } from '../../constants/editor-register/editor-register.mjs';
3
6
 
4
- "use strict";
5
7
  function widthEditorInstall(providerTag, provider, com, comName) {
6
8
  return {
7
9
  install(app) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "0.1.4-dev.7",
3
+ "version": "0.1.4-dev.9",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.min.cjs",
@@ -34,8 +34,9 @@
34
34
  "license": "MIT",
35
35
  "author": "gct",
36
36
  "scripts": {
37
- "dev": "rollup -c -w --environment=NODE_ENV:development",
38
- "build": "npm run lint && rollup -c --environment=NODE_ENV:production && vite build --mode production --config vite.config.ts",
37
+ "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
38
+ "es:build": "vite build --config vite.dev.config.ts",
39
+ "build": "npm run lint && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
39
40
  "lint": "eslint src/",
40
41
  "test": "vitest",
41
42
  "test:run": "vitest run",
@@ -44,19 +45,19 @@
44
45
  "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
45
46
  "publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
46
47
  "publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
47
- "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/",
48
- "gen-api": "npm run gen-api:apaas && npm run gen-api:platform",
49
- "gen-api:apaas": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=apaas -t ../cli/hbs-temp -o ./src/service/gct-apaas && prettier './src/service/gct-apaas' --write",
50
- "gen-api:platform": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=platform -t ../cli/hbs-temp -o ./src/service/gct-platform && prettier './src/service/gct-platform' --write"
48
+ "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
51
49
  },
52
50
  "dependencies": {
53
- "@gct-paas/api": "0.1.0-dev.4",
51
+ "@fingerprintjs/fingerprintjs": "^5.0.1",
52
+ "@gct-paas/api": "0.1.0-dev.8",
54
53
  "@vueuse/core": "^14.1.0",
55
54
  "async-validator": "^4.2.5",
56
55
  "axios": "^1.13.2",
57
56
  "dayjs": "^1.11.19",
58
57
  "js-sha256": "^0.11.1",
59
58
  "lodash-es": "^4.17.23",
59
+ "mitt": "^3.0.1",
60
+ "overlayscrollbars": "^2.14.0",
60
61
  "path-browserify": "^1.0.1",
61
62
  "pinia": "^3.0.4",
62
63
  "qs": "^6.14.1",
@@ -64,11 +65,11 @@
64
65
  "systemjs": "^6.15.1",
65
66
  "vue": "3.5.27",
66
67
  "vue-i18n": "11.2.8",
67
- "vue-router": "^4.6.4"
68
+ "vue-router": "^4.6.4",
69
+ "wujie": "^1.0.29"
68
70
  },
69
71
  "devDependencies": {
70
- "@gct-paas/build": "^0.1.4",
71
- "@gct-paas/cli": "^0.1.4",
72
+ "@gct-paas/build": "^0.1.5-dev.8",
72
73
  "@types/lodash-es": "^4.17.12",
73
74
  "@types/path-browserify": "^1.0.3",
74
75
  "@types/qs": "^6.14.0",
@@ -84,9 +85,5 @@
84
85
  "vite": "^7.3.1",
85
86
  "vitest": "^4.0.18"
86
87
  },
87
- "peerDependencies": {
88
- "@gct-paas/api": "*",
89
- "vue": "^3.x"
90
- },
91
- "gitHead": "331b60348593f6afa0ccaa54fcdd52435b7876fa"
88
+ "gitHead": "c51d9883f7d287433d2def4d7338a06773804fbf"
92
89
  }
@@ -1,17 +0,0 @@
1
- export { EditFormController, useEditFormController } from './edit-form/edit-form.controller.mjs';
2
- export { EditorController } from './editor-item/editor-item.controller.mjs';
3
- export { FormController, useFormController } from './form/form.controller.mjs';
4
- export { GctFormController } from './gct-form/gct-form.controller.mjs';
5
- export { FormCollapsePaneController } from './form-collapse-pane/form-collapse-pane.controller.mjs';
6
- export { FormCollapseController } from './form-collapse/form-collapse.controller.mjs';
7
- export { FormTabController } from './form-tab/form-tab.controller.mjs';
8
- export { FormTabPaneController } from './form-tab-pane/form-tab-pane.controller.mjs';
9
- export { FormGroupController } from './form-group/form-group.controller.mjs';
10
- export { FormEditItemController } from './form-edit-item/form-edit-item.controller.mjs';
11
- export { FormItemController } from './form-item/form-item.controller.mjs';
12
- export { FormItemBasicController, useFormItemController } from './form-item-basic/form-item-basic.controller.mjs';
13
- export { FormHiddenItemController } from './form-item-hidden/form-item-hidden.controller.mjs';
14
- export { LengthUnitEditorController } from './editor/length-unit-editor.controller.mjs';
15
- export { ColorEditorController } from './editor/color-editor.controller.mjs';
16
-
17
- "use strict";
@@ -1,6 +0,0 @@
1
- export { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, DisplayType, EventCategory, GLOBAL_TYPE, GLOBAL_VAR_TYPE, INNER_EVENT, PanelEnum, Postion, ProgressTypeEnum, PropGroup, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, StyleGroup, TagTypeEnum, TextAlign, TextDecoration, VERIFICATIONCONDITIONS_TYPE, tagEnum } from './panel.mjs';
2
- export { ToolkitEnum } from './toolkit.mjs';
3
- export { BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonSize, ButtonStyle, ButtonType, ButtonTypeGroup, ButtonType_vant, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CategoryTypeEnum, DatasourceTypeEnum, DateRangeEnums, DisplayEnums, KeyMode, ListTreeSearchTypeEnum, Platform, PrintModeEnums, ResetRuleType, RowSelectionTypeEnums, SelectPickerEnums, SignatureTypeEnum, StatisticalMethodEnums, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TransactionMode, WidgetInScopeEnum, openWindowEnums, operateSysEnums } from './widget.mjs';
4
- export { BindCmpStyleEnum, BindCmpStyleTypeEnum, Ch_BindCmpStyleEnum, FormComponents, SCOPE, SearchComponents, bindCmpStyleMap, buttonShowType, controlConfigEnum, fixedAlignENUM, searchListByFieldType, sortTypeEnum, statisticalMethodEnum, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, transformBindCmp2CmpType } from './designer.mjs';
5
-
6
- "use strict";
@@ -1,3 +0,0 @@
1
- export { GctGlobal } from './gct/gct.mjs';
2
-
3
- "use strict";
@@ -1,7 +0,0 @@
1
- export { useForm } from './use-form/use-form.mjs';
2
- export { useGctFormValue, useGctFormValueByText } from './use-gct-form-value/use-gct-form-value.mjs';
3
- export { useModal } from './use-modal/use-modal.mjs';
4
- export { useNamespace } from './use-namespace/use-namespace.mjs';
5
- export { copyTextToClipboard, isDef, useCopyToClipboard } from './useCopyToClipboard.mjs';
6
-
7
- "use strict";
@@ -1,9 +0,0 @@
1
- import { Namespace } from '../../utils';
2
- /**
3
- * 获取 bem 操作类
4
- *
5
- * @export
6
- * @param {string} block 当前实命名块
7
- * @returns {*} {Namespace}
8
- */
9
- export declare function useNamespace(block: string): Namespace;
@@ -1,9 +0,0 @@
1
- import '../../utils/index.mjs';
2
- import { Namespace } from '../../utils/namespace/namespace.mjs';
3
-
4
- "use strict";
5
- function useNamespace(block) {
6
- return new Namespace(block);
7
- }
8
-
9
- export { useNamespace };
@@ -1,116 +0,0 @@
1
- import { IDesignerHooks } from '../hooks';
2
- import { LowCodeWidget } from '../low-code-types';
3
- import { IDesignerState } from '../state';
4
- /**
5
- * 设计界面控制器接口
6
- *
7
- * @author zhanghanrui
8
- * @date 2024-05-09 14:05:12
9
- * @export
10
- * @interface IDesignerController
11
- */
12
- export interface IDesignerController {
13
- /**
14
- * 设计界面状态
15
- *
16
- * @author zhanghanrui
17
- * @date 2024-05-09 14:05:19
18
- */
19
- readonly state: IDesignerState;
20
- /**
21
- * 设计界面钩子
22
- *
23
- * @type {IDesignerHooks}
24
- */
25
- readonly hooks: IDesignerHooks;
26
- /**
27
- * 鼠标悬浮元素清单
28
- *
29
- * @author zhanghanrui
30
- * @date 2024-05-10 10:05:47
31
- * @type {HTMLDivElement[]}
32
- */
33
- readonly hoverStack: HTMLDivElement[];
34
- /**
35
- * 拖拽设计区容器
36
- *
37
- * @author zhanghanrui
38
- * @date 2024-05-10 13:05:46
39
- * @type {HTMLDivElement}
40
- */
41
- stageContainer: HTMLDivElement;
42
- /**
43
- * 拖拽展开定时器
44
- *
45
- * @type {(number | null)}
46
- */
47
- expansionTimer: number | null;
48
- /**
49
- * 设置拖拽数据
50
- *
51
- * @author zhanghanrui
52
- * @date 2024-05-09 14:05:31
53
- * @param {(IData | null)} data
54
- */
55
- setDragData(data: IData | null): void;
56
- /**
57
- * 获取当前拖拽数据
58
- *
59
- * @author zhanghanrui
60
- * @date 2024-05-09 14:05:49
61
- * @return {*} {(IData | null)}
62
- */
63
- getDragData(): IData | null;
64
- /**
65
- * 新增鼠标悬浮堆栈
66
- *
67
- * @author zhanghanrui
68
- * @date 2024-05-10 10:05:02
69
- * @param {HTMLDivElement} el
70
- */
71
- pushStack(el: HTMLDivElement): void;
72
- /**
73
- * 删除鼠标悬浮堆栈
74
- *
75
- * @author zhanghanrui
76
- * @date 2024-05-08 11:05:53
77
- * @param {HTMLDivElement} el
78
- */
79
- popStack(el: HTMLDivElement): void;
80
- /**
81
- * 重置悬浮缓存
82
- *
83
- * @author zhanghanrui
84
- * @date 2024-05-15 11:05:51
85
- */
86
- resetStack(): void;
87
- /**
88
- * 添加展开容器
89
- *
90
- * @param {LowCodeWidget.BasicSchema[]} widgets
91
- * @returns {*} {void}
92
- */
93
- setExpansion(widgets: LowCodeWidget.BasicSchema[]): void;
94
- /**
95
- * 取消展开容器
96
- */
97
- cancelExpansion(): void;
98
- /**
99
- * 强制设计界面重绘
100
- */
101
- force(): void;
102
- /**
103
- * 重新计算选中高亮
104
- */
105
- changeSelectHighlight(): void;
106
- /**
107
- * 重新计算悬浮高亮
108
- */
109
- changeHoverHighlight(): void;
110
- /**
111
- * 设置选中
112
- *
113
- * @param {string} key
114
- */
115
- setSelect(key: string): void;
116
- }
@@ -1,26 +0,0 @@
1
- import { SyncSeriesHook } from 'qx-util';
2
- import { LowCodeWidget } from '../low-code-types';
3
- /**
4
- * 设计界面钩子接口
5
- *
6
- * @export
7
- * @interface IDesignerHooks
8
- */
9
- export interface IDesignerHooks {
10
- /**
11
- * 触发执行设计容器扩容展示
12
- */
13
- expansion: SyncSeriesHook<[], LowCodeWidget.BasicSchema[]>;
14
- /**
15
- * 触发选中项重选
16
- */
17
- selectHighlightChange: SyncSeriesHook<[]>;
18
- /**
19
- * 触发悬浮项重选
20
- */
21
- hoverHighlightChange: SyncSeriesHook<[]>;
22
- /**
23
- * 设置选中项
24
- */
25
- setSelect: SyncSeriesHook<[key: string]>;
26
- }
@@ -1 +0,0 @@
1
- export type { IDesignerHooks } from './i-designer-hooks';
@@ -1,78 +0,0 @@
1
- /**
2
- * 消息参数
3
- *
4
- * @export
5
- * @interface IMessageParams
6
- */
7
- export interface IMessageParams {
8
- /**
9
- * 类型(默认info)
10
- *
11
- * @type {('success' | 'info' | 'warning' | 'error')}
12
- */
13
- type?: 'success' | 'info' | 'warning' | 'error';
14
- /**
15
- * 消息内容
16
- *
17
- * @type {string}
18
- */
19
- message: string;
20
- /**
21
- * 持续时间,单位:秒,默认:1.5
22
- *
23
- * @type {number}
24
- */
25
- duration?: number;
26
- /**
27
- * 显示关闭按钮,默认:false
28
- *
29
- * @type {boolean}
30
- */
31
- showClose?: boolean;
32
- /**
33
- * 预置的样式类型
34
- *
35
- * @type {'alert'}
36
- */
37
- styleType?: 'alert';
38
- }
39
- /**
40
- * 顶部居中显示,并自动消失
41
- *
42
- * @export
43
- * @interface IMessageUtil
44
- */
45
- export interface IMessageUtil {
46
- /**
47
- * 普通信息
48
- *
49
- * @param {string} msg
50
- * @param {number} [duration] 持续时间,单位:秒,默认:1.5
51
- * @returns {*} {Promise<void>}
52
- */
53
- info(msg: string, duration?: number): Promise<void>;
54
- /**
55
- * 成功消息
56
- *
57
- * @param {string} msg
58
- * @param {number} [duration] 持续时间,单位:秒,默认:1.5
59
- * @returns {*} {Promise<void>}
60
- */
61
- success(msg: string, duration?: number): Promise<void>;
62
- /**
63
- * 警告消息
64
- *
65
- * @param {string} msg
66
- * @param {number} [duration] 持续时间,单位:秒,默认:1.5
67
- * @returns {*} {Promise<void>}
68
- */
69
- warning(msg: string, duration?: number): Promise<void>;
70
- /**
71
- * 错误消息
72
- *
73
- * @param {string} msg
74
- * @param {number} [duration] 持续时间,单位:秒,默认:1.5
75
- * @returns {*} {Promise<void>}
76
- */
77
- error(msg: string, duration?: number): Promise<void>;
78
- }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,4 +0,0 @@
1
- export * from './model';
2
- export * from './schema';
3
- export * from './modal-types';
4
- export type { LowCodeWidget, IVue3DndItemHooks, fieldWidgetSchema, validateRule, } from './widget-basic-types';
@@ -1,67 +0,0 @@
1
- import { BuiltinType, Platform } from '../../enums';
2
- import { LowCodeWidget } from './widget-basic-types';
3
- export declare namespace LowCodeModal {
4
- interface Modal {
5
- id: string;
6
- /**系统用的name */
7
- alias: string;
8
- name: string;
9
- /**默认是WEB 添加的时候会根据当前环境改变 */
10
- platform: Platform;
11
- /**用户新建编辑的name */
12
- modalName: string;
13
- /**自定义展示组件的名字 */
14
- compName?: string;
15
- /**自定义展示组件key的名字 */
16
- compKey?: string;
17
- type: BuiltinType.MODAL;
18
- js: string;
19
- css: string;
20
- children: [ModalBody, ModalFooter, ModalBottomButton];
21
- props: ModalProps;
22
- events: LowCodeWidget.BasicEvents;
23
- i18n?: Record<string, string>;
24
- /** 样式 */
25
- style: Partial<LowCodeWidget.BasicStyle>;
26
- /**运行时需要的Js Code */
27
- runJs?: string;
28
- los?: Record<string, IData>;
29
- icon: string;
30
- /** 是否是字段类型 */
31
- isField: boolean;
32
- }
33
- interface ModalBody {
34
- id: string;
35
- type: BuiltinType.MODAL_BODY;
36
- children: LowCodeWidget.BasicSchema[];
37
- }
38
- interface ModalFooter {
39
- id: string;
40
- type: BuiltinType.MODAL_FOOTER;
41
- children: LowCodeWidget.BasicSchema[];
42
- }
43
- interface ModalBottomButton {
44
- id: string;
45
- type: BuiltinType.BottomButtonContainer;
46
- children: LowCodeWidget.BasicSchema[];
47
- }
48
- interface ModalProps extends LowCodeWidget.CommonProps {
49
- modalTitle?: string;
50
- /** web端弹框宽度单位 */
51
- unitType: 'px' | '%';
52
- /** web端弹框宽度 */
53
- modalWidth: number;
54
- /** mobile端弹框宽度单位 */
55
- mUnitType: '%';
56
- /** mobile端弹框宽度 */
57
- mModalWidth: number;
58
- /** 是否子表下的模态框 */
59
- isSubTableModal?: boolean;
60
- /** 关联子表 id */
61
- bindSubTableId?: string;
62
- /** 子表弹框新建标题名称 */
63
- createModalTitle?: string;
64
- /** 子表弹框编辑标题名称 */
65
- editModalTitle?: string;
66
- }
67
- }