@gct-paas/core 0.1.4-dev.11 → 0.1.4-dev.12

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 (130) hide show
  1. package/dist/index.esm.min.js +21679 -0
  2. package/es/constants/core.mjs +5 -4
  3. package/es/constants/default-date-type/default-date-type.mjs +73 -21
  4. package/es/constants/editor-register/editor-register.mjs +17 -5
  5. package/es/constants/expression-type/BuiltOperators.mjs +152 -147
  6. package/es/constants/expression-type/FunctionKeys.mjs +75 -79
  7. package/es/constants/expression-type/editor.mjs +10 -3
  8. package/es/constants/expression-type/function.mjs +602 -613
  9. package/es/constants/expression-type/index.mjs +111 -113
  10. package/es/constants/expression-type/modeCfg.mjs +256 -263
  11. package/es/constants/expression-type/variable.mjs +43 -39
  12. package/es/constants/form-container-type/form-container-type.mjs +17 -5
  13. package/es/constants/index.mjs +30 -10
  14. package/es/constants/page-designer/model.mjs +15 -5
  15. package/es/create-app-vue.mjs +15 -9
  16. package/es/enums/app-designer/index.d.ts +19 -0
  17. package/es/enums/app-designer/index.mjs +131 -63
  18. package/es/enums/appEnum.mjs +681 -360
  19. package/es/enums/appStateEnum.mjs +17 -10
  20. package/es/enums/authActionEnum.mjs +63 -51
  21. package/es/enums/breakpointEnum.mjs +27 -26
  22. package/es/enums/cacheEnum.mjs +22 -21
  23. package/es/enums/designEnum.mjs +110 -71
  24. package/es/enums/developer-center/integration.mjs +7 -6
  25. package/es/enums/exceptionEnum.mjs +21 -17
  26. package/es/enums/expressionEnum.d.ts +1 -1
  27. package/es/enums/expressionEnum.mjs +81 -74
  28. package/es/enums/globalEnum.mjs +59 -36
  29. package/es/enums/httpEnum.mjs +71 -61
  30. package/es/enums/index.mjs +43 -14
  31. package/es/enums/menuEnum.mjs +42 -38
  32. package/es/enums/page-designer/designer.mjs +403 -407
  33. package/es/enums/page-designer/index.mjs +4 -0
  34. package/es/enums/page-designer/panel.mjs +341 -213
  35. package/es/enums/page-designer/toolkit.mjs +13 -12
  36. package/es/enums/page-designer/widget.mjs +425 -338
  37. package/es/enums/pageEnum.mjs +14 -13
  38. package/es/enums/plugin-enum.mjs +23 -7
  39. package/es/enums/processEnum.mjs +95 -60
  40. package/es/enums/roleEnum.mjs +7 -6
  41. package/es/enums/sizeEnum.d.ts +18 -0
  42. package/es/enums/sizeEnum.mjs +28 -8
  43. package/es/global/gct/gct.mjs +84 -96
  44. package/es/global/index.mjs +1 -0
  45. package/es/hooks/index.mjs +4 -0
  46. package/es/hooks/use-app-inst/use-app-inst.mjs +11 -5
  47. package/es/hooks/use-modal/use-modal.mjs +16 -10
  48. package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +43 -23
  49. package/es/hooks/useCopyToClipboard.mjs +50 -50
  50. package/es/index.mjs +122 -114
  51. package/es/locale/index.mjs +43 -57
  52. package/es/modules/env-manager/env-manager.const.mjs +16 -8
  53. package/es/modules/env-manager/env-manager.interface.mjs +14 -7
  54. package/es/modules/env-manager/env-manager.mjs +104 -107
  55. package/es/modules/error-handler/error-handler.const.mjs +11 -16
  56. package/es/modules/error-handler/error-strategy.mjs +199 -175
  57. package/es/modules/error-handler/index.mjs +120 -106
  58. package/es/modules/mqtt/constants/mqtt.const.mjs +21 -24
  59. package/es/modules/mqtt/enums/mqtt-status.enum.mjs +23 -9
  60. package/es/modules/mqtt/index.mjs +4 -0
  61. package/es/modules/mqtt/mqtt-client.mjs +228 -261
  62. package/es/modules/mqtt/mqtt-manager.mjs +117 -77
  63. package/es/modules/platform-config/constants/index.mjs +4 -0
  64. package/es/modules/platform-config/constants/login.const.mjs +48 -45
  65. package/es/modules/platform-config/constants/org.const.mjs +57 -52
  66. package/es/modules/platform-config/constants/theme.const.mjs +11 -4
  67. package/es/modules/platform-config/constants/watermark.const.mjs +17 -12
  68. package/es/modules/platform-config/enums/deploy.enum.mjs +13 -6
  69. package/es/modules/platform-config/enums/login.enum.mjs +29 -15
  70. package/es/modules/platform-config/enums/platform.enum.mjs +16 -13
  71. package/es/modules/platform-config/index.mjs +9 -0
  72. package/es/modules/platform-config/store.mjs +68 -79
  73. package/es/modules/platform-config/useBasicSetting.mjs +47 -35
  74. package/es/modules/platform-config/useDeploySetting.mjs +29 -21
  75. package/es/modules/platform-config/useLoginSetting.mjs +151 -173
  76. package/es/modules/platform-config/useOrgSetting.mjs +63 -62
  77. package/es/modules/platform-config/useProjectSetting.mjs +14 -6
  78. package/es/modules/platform-config/useSecuritySetting.mjs +68 -56
  79. package/es/modules/platform-config/useThemeSetting.mjs +78 -59
  80. package/es/modules/platform-config/useWatermarkSetting.mjs +37 -23
  81. package/es/modules/user-stores/index.mjs +3 -0
  82. package/es/modules/user-stores/store/permission.store.mjs +27 -36
  83. package/es/modules/user-stores/store/tenant.store.mjs +20 -22
  84. package/es/modules/user-stores/store/user.store.mjs +94 -117
  85. package/es/router/index.mjs +25 -28
  86. package/es/setup-app.mjs +23 -39
  87. package/es/state/global-pinia-state/global-pinia-state.mjs +49 -71
  88. package/es/state/index.mjs +1 -0
  89. package/es/store/global-store.mjs +50 -72
  90. package/es/store/index.mjs +25 -19
  91. package/es/types/index.d.ts +7 -0
  92. package/es/utils/axios/interceptors.mjs +21 -17
  93. package/es/utils/cache-adapter/cache-adapter.mjs +61 -56
  94. package/es/utils/design/design.mjs +18 -12
  95. package/es/utils/deviceFingerprint.mjs +74 -63
  96. package/es/utils/dictionary/dictionary.mjs +142 -145
  97. package/es/utils/file/base64Conver.mjs +35 -30
  98. package/es/utils/file/download.mjs +94 -98
  99. package/es/utils/file/parser.d.ts +3 -0
  100. package/es/utils/file/parser.mjs +29 -0
  101. package/es/utils/i18n/index.mjs +14 -3
  102. package/es/utils/index.d.ts +1 -0
  103. package/es/utils/index.mjs +31 -0
  104. package/es/utils/is-sort-filed/is-sort-filed.mjs +42 -37
  105. package/es/utils/linked-list/linked-list.mjs +115 -118
  106. package/es/utils/linked-node/linked-node.mjs +41 -31
  107. package/es/utils/lowcode/utils.mjs +13 -18
  108. package/es/utils/lowcode/validate.mjs +20 -26
  109. package/es/utils/mitt/mitt.mjs +4 -4
  110. package/es/utils/model-loader/model-loader.mjs +280 -325
  111. package/es/utils/namespace/namespace.mjs +178 -164
  112. package/es/utils/openUtil/index.mjs +2 -0
  113. package/es/utils/openUtil/modal/modal.mjs +72 -79
  114. package/es/utils/openUtil/overlay-container/overlay-container.mjs +144 -138
  115. package/es/utils/permission.mjs +33 -37
  116. package/es/utils/plugin-static-resource/plugin-static-resource.mjs +46 -42
  117. package/es/utils/style/index.mjs +94 -138
  118. package/es/utils/tools/tools.mjs +86 -54
  119. package/es/utils/treeHelper/treeHelper.mjs +205 -233
  120. package/es/utils/uploader/uploader.mjs +81 -115
  121. package/es/utils/useUUid.mjs +79 -87
  122. package/es/utils/util.mjs +55 -35
  123. package/es/utils/uuid/uuid.d.ts +1 -0
  124. package/es/utils/uuid/uuid.mjs +36 -43
  125. package/es/utils/validate.mjs +15 -19
  126. package/es/utils/value-helper/value-helper.mjs +113 -98
  127. package/package.json +12 -13
  128. package/dist/index.esm.min.mjs +0 -18322
  129. package/dist/index.min.cjs +0 -393
  130. package/dist/index.system.min.js +0 -393
@@ -1,119 +1,116 @@
1
- import { LinkedNode } from '../linked-node/linked-node.mjs';
2
-
3
- class LinkedList {
4
- /**
5
- * 当前激活节点
6
- *
7
- * @author zhanghanrui
8
- * @date 2024-07-31 15:07:02
9
- * @type {(LinkedNode<T> | null)}
10
- */
11
- active = null;
12
- /**
13
- * 新增节点
14
- *
15
- * @author zhanghanrui
16
- * @date 2024-07-31 15:07:45
17
- * @param {T} data
18
- */
19
- add(data) {
20
- if (!this.active) {
21
- this.active = new LinkedNode(data);
22
- } else {
23
- if (this.active.next) {
24
- let next = this.active.next;
25
- while (next) {
26
- next = next.next;
27
- if (next) {
28
- next.clear();
29
- }
30
- }
31
- }
32
- const node = new LinkedNode(data, null, this.active);
33
- this.active.next = node;
34
- this.active = node;
35
- }
36
- }
37
- /**
38
- * 删除节点
39
- *
40
- * @author zhanghanrui
41
- * @date 2024-07-31 15:07:11
42
- * @param {LinkedNode<T>} node
43
- */
44
- delete(node) {
45
- const { prev, next } = node;
46
- if (prev) {
47
- prev.next = next;
48
- }
49
- if (next) {
50
- next.prev = prev;
51
- }
52
- node.clear();
53
- }
54
- /**
55
- * 上一个节点
56
- *
57
- * @author zhanghanrui
58
- * @date 2024-07-31 16:07:41
59
- */
60
- prev() {
61
- if (this.active && this.active.prev) {
62
- this.active = this.active.prev;
63
- }
64
- }
65
- /**
66
- * 下一个节点
67
- *
68
- * @author zhanghanrui
69
- * @date 2024-07-31 16:07:57
70
- */
71
- next() {
72
- if (this.active && this.active.next) {
73
- this.active = this.active.next;
74
- }
75
- }
76
- /**
77
- * 清理所有缓存
78
- *
79
- * @author zhanghanrui
80
- * @date 2024-07-31 16:07:43
81
- */
82
- clearAll() {
83
- if (this.active) {
84
- let prev = this.active.prev;
85
- let next = this.active.next;
86
- while (prev) {
87
- prev.clear();
88
- prev = prev.prev;
89
- }
90
- while (next) {
91
- next.clear();
92
- next = next.next;
93
- }
94
- this.active.clear();
95
- }
96
- }
97
- /**
98
- * 是否可以撤销
99
- *
100
- * @author zhanghanrui
101
- * @date 2024-08-21 15:08:57
102
- * @return {*} {boolean}
103
- */
104
- canUndo() {
105
- return !!this.active && !!this.active.prev;
106
- }
107
- /**
108
- * 是否可以重做
109
- *
110
- * @author zhanghanrui
111
- * @date 2024-08-21 15:08:33
112
- * @return {*} {boolean}
113
- */
114
- canRedo() {
115
- return !!this.active && !!this.active.next;
116
- }
117
- }
118
-
1
+ import { LinkedNode } from "../linked-node/linked-node.mjs";
2
+ //#region src/utils/linked-list/linked-list.ts
3
+ /**
4
+ * 链表列表
5
+ *
6
+ * @author zhanghanrui
7
+ * @date 2024-07-31 15:07:37
8
+ * @export
9
+ * @class LinkedList
10
+ */
11
+ var LinkedList = class {
12
+ /**
13
+ * 当前激活节点
14
+ *
15
+ * @author zhanghanrui
16
+ * @date 2024-07-31 15:07:02
17
+ * @type {(LinkedNode<T> | null)}
18
+ */
19
+ active = null;
20
+ /**
21
+ * 新增节点
22
+ *
23
+ * @author zhanghanrui
24
+ * @date 2024-07-31 15:07:45
25
+ * @param {T} data
26
+ */
27
+ add(data) {
28
+ if (!this.active) this.active = new LinkedNode(data);
29
+ else {
30
+ if (this.active.next) {
31
+ let next = this.active.next;
32
+ while (next) {
33
+ next = next.next;
34
+ if (next) next.clear();
35
+ }
36
+ }
37
+ const node = new LinkedNode(data, null, this.active);
38
+ this.active.next = node;
39
+ this.active = node;
40
+ }
41
+ }
42
+ /**
43
+ * 删除节点
44
+ *
45
+ * @author zhanghanrui
46
+ * @date 2024-07-31 15:07:11
47
+ * @param {LinkedNode<T>} node
48
+ */
49
+ delete(node) {
50
+ const { prev, next } = node;
51
+ if (prev) prev.next = next;
52
+ if (next) next.prev = prev;
53
+ node.clear();
54
+ }
55
+ /**
56
+ * 上一个节点
57
+ *
58
+ * @author zhanghanrui
59
+ * @date 2024-07-31 16:07:41
60
+ */
61
+ prev() {
62
+ if (this.active && this.active.prev) this.active = this.active.prev;
63
+ }
64
+ /**
65
+ * 下一个节点
66
+ *
67
+ * @author zhanghanrui
68
+ * @date 2024-07-31 16:07:57
69
+ */
70
+ next() {
71
+ if (this.active && this.active.next) this.active = this.active.next;
72
+ }
73
+ /**
74
+ * 清理所有缓存
75
+ *
76
+ * @author zhanghanrui
77
+ * @date 2024-07-31 16:07:43
78
+ */
79
+ clearAll() {
80
+ if (this.active) {
81
+ let prev = this.active.prev;
82
+ let next = this.active.next;
83
+ while (prev) {
84
+ prev.clear();
85
+ prev = prev.prev;
86
+ }
87
+ while (next) {
88
+ next.clear();
89
+ next = next.next;
90
+ }
91
+ this.active.clear();
92
+ }
93
+ }
94
+ /**
95
+ * 是否可以撤销
96
+ *
97
+ * @author zhanghanrui
98
+ * @date 2024-08-21 15:08:57
99
+ * @return {*} {boolean}
100
+ */
101
+ canUndo() {
102
+ return !!this.active && !!this.active.prev;
103
+ }
104
+ /**
105
+ * 是否可以重做
106
+ *
107
+ * @author zhanghanrui
108
+ * @date 2024-08-21 15:08:33
109
+ * @return {*} {boolean}
110
+ */
111
+ canRedo() {
112
+ return !!this.active && !!this.active.next;
113
+ }
114
+ };
115
+ //#endregion
119
116
  export { LinkedList };
@@ -1,32 +1,42 @@
1
- class LinkedNode {
2
- data;
3
- next;
4
- prev;
5
- /**
6
- * Creates an instance of LinkedNode.
7
- *
8
- * @author zhanghanrui
9
- * @date 2024-07-31 15:07:43
10
- * @param {T} data 当前节点数据
11
- * @param {(LinkedNode | null)} [next=null] 下一个节点
12
- * @param {(LinkedNode | null)} [prev=null] 上一个节点
13
- */
14
- constructor(data, next = null, prev = null) {
15
- this.data = data;
16
- this.next = next;
17
- this.prev = prev;
18
- }
19
- /**
20
- * 清理链表,避免内存泄漏
21
- *
22
- * @author zhanghanrui
23
- * @date 2024-07-31 15:07:34
24
- */
25
- clear() {
26
- this.data = null;
27
- this.next = null;
28
- this.prev = null;
29
- }
30
- }
31
-
1
+ //#region src/utils/linked-node/linked-node.ts
2
+ /**
3
+ * 链表节点
4
+ *
5
+ * @author zhanghanrui
6
+ * @date 2024-07-31 15:07:21
7
+ * @export
8
+ * @class LinkedNode
9
+ * @template T
10
+ */
11
+ var LinkedNode = class {
12
+ data;
13
+ next;
14
+ prev;
15
+ /**
16
+ * Creates an instance of LinkedNode.
17
+ *
18
+ * @author zhanghanrui
19
+ * @date 2024-07-31 15:07:43
20
+ * @param {T} data 当前节点数据
21
+ * @param {(LinkedNode | null)} [next=null] 下一个节点
22
+ * @param {(LinkedNode | null)} [prev=null] 上一个节点
23
+ */
24
+ constructor(data, next = null, prev = null) {
25
+ this.data = data;
26
+ this.next = next;
27
+ this.prev = prev;
28
+ }
29
+ /**
30
+ * 清理链表,避免内存泄漏
31
+ *
32
+ * @author zhanghanrui
33
+ * @date 2024-07-31 15:07:34
34
+ */
35
+ clear() {
36
+ this.data = null;
37
+ this.next = null;
38
+ this.prev = null;
39
+ }
40
+ };
41
+ //#endregion
32
42
  export { LinkedNode };
@@ -1,20 +1,15 @@
1
- import { isEmpty } from 'lodash-es';
2
-
3
- const insertCustomCssToHead = function(cssCode, modalId = "") {
4
- const head = document.getElementsByTagName("head")[0];
5
- const oldStyle = document.getElementById("gct-custom-css" + modalId);
6
- if (oldStyle) {
7
- head.removeChild(oldStyle);
8
- }
9
- const newStyle = document.createElement("style");
10
- newStyle.id = "gct-custom-css" + modalId;
11
- newStyle.type = "text/css";
12
- if (isEmpty(modalId)) {
13
- newStyle.innerHTML = cssCode;
14
- } else {
15
- newStyle.innerHTML = `#${modalId}{${cssCode}}`;
16
- }
17
- head.appendChild(newStyle);
1
+ import { isEmpty } from "lodash-es";
2
+ //#region src/utils/lowcode/utils.ts
3
+ var insertCustomCssToHead = function(cssCode, modalId = "") {
4
+ const head = document.getElementsByTagName("head")[0];
5
+ const oldStyle = document.getElementById("gct-custom-css" + modalId);
6
+ if (oldStyle) head.removeChild(oldStyle);
7
+ const newStyle = document.createElement("style");
8
+ newStyle.id = "gct-custom-css" + modalId;
9
+ newStyle.type = "text/css";
10
+ if (isEmpty(modalId)) newStyle.innerHTML = cssCode;
11
+ else newStyle.innerHTML = `#${modalId}{${cssCode}}`;
12
+ head.appendChild(newStyle);
18
13
  };
19
-
14
+ //#endregion
20
15
  export { insertCustomCssToHead };
@@ -1,29 +1,23 @@
1
- import { t } from '../i18n/index.mjs';
2
-
1
+ import { t } from "../i18n/index.mjs";
2
+ //#region src/utils/lowcode/validate.ts
3
3
  function buildItemRules(validation) {
4
- const rules = [];
5
- if (validation.required) {
6
- rules.push({
7
- required: true,
8
- message: t("sys.notNull")
9
- });
10
- }
11
- if (validation.reg) {
12
- const { reg, regHint } = validation;
13
- const regExg = new RegExp(reg);
14
- const validator = (val) => regExg.test(val);
15
- rules.push({
16
- validator,
17
- message: regHint ?? t("sys.regError")
18
- });
19
- }
20
- const validateEvent = validation.validateFn;
21
- if (validateEvent) {
22
- rules.push({
23
- validator: validateEvent
24
- });
25
- }
26
- return rules;
4
+ const rules = [];
5
+ if (validation.required) rules.push({
6
+ required: true,
7
+ message: t("sys.notNull")
8
+ });
9
+ if (validation.reg) {
10
+ const { reg, regHint } = validation;
11
+ const regExg = new RegExp(reg);
12
+ const validator = (val) => regExg.test(val);
13
+ rules.push({
14
+ validator,
15
+ message: regHint ?? t("sys.regError")
16
+ });
17
+ }
18
+ const validateEvent = validation.validateFn;
19
+ if (validateEvent) rules.push({ validator: validateEvent });
20
+ return rules;
27
21
  }
28
-
22
+ //#endregion
29
23
  export { buildItemRules };
@@ -1,5 +1,5 @@
1
- import Mitt from 'mitt';
2
-
3
- const mitt = Mitt();
4
-
1
+ import Mitt from "mitt";
2
+ //#region src/utils/mitt/mitt.ts
3
+ var mitt = Mitt();
4
+ //#endregion
5
5
  export { mitt };