@gct-paas/core 0.1.4-dev.9 → 0.1.5-dev.1

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 (335) hide show
  1. package/dist/index.esm.min.js +1 -0
  2. package/dist/redirect-index-Ck5Ddtcb.js +1 -0
  3. package/es/constants/core.mjs +5 -4
  4. package/es/constants/default-date-type/default-date-type.d.ts +70 -0
  5. package/es/constants/default-date-type/default-date-type.mjs +74 -0
  6. package/es/constants/editor-register/editor-register.mjs +17 -5
  7. package/es/constants/expression-type/BuiltOperators.mjs +152 -144
  8. package/es/constants/expression-type/FunctionKeys.mjs +75 -79
  9. package/es/constants/expression-type/editor.mjs +10 -3
  10. package/es/constants/expression-type/function.mjs +602 -613
  11. package/es/constants/expression-type/index.mjs +111 -113
  12. package/es/constants/expression-type/modeCfg.mjs +256 -263
  13. package/es/constants/expression-type/variable.mjs +43 -39
  14. package/es/constants/form-container-type/form-container-type.mjs +17 -5
  15. package/es/constants/index.d.ts +7 -1
  16. package/es/constants/index.mjs +32 -10
  17. package/es/constants/page-designer/model.d.ts +4 -0
  18. package/es/constants/page-designer/model.mjs +17 -0
  19. package/es/constants/page-designer/regex.d.ts +2 -0
  20. package/es/constants/page-designer/regex.mjs +5 -0
  21. package/es/create-app-vue.mjs +15 -9
  22. package/es/enums/app-designer/index.d.ts +19 -0
  23. package/es/enums/app-designer/index.mjs +131 -63
  24. package/es/enums/appEnum.mjs +681 -360
  25. package/es/enums/appStateEnum.mjs +17 -10
  26. package/es/enums/authActionEnum.mjs +63 -51
  27. package/es/enums/breakpointEnum.mjs +27 -26
  28. package/es/enums/cacheEnum.d.ts +0 -1
  29. package/es/enums/cacheEnum.mjs +22 -22
  30. package/es/enums/designEnum.d.ts +7 -1
  31. package/es/enums/designEnum.mjs +110 -68
  32. package/es/enums/developer-center/integration.mjs +7 -6
  33. package/es/enums/exceptionEnum.mjs +21 -17
  34. package/es/enums/expressionEnum.d.ts +2 -2
  35. package/es/enums/expressionEnum.mjs +81 -74
  36. package/es/enums/globalEnum.d.ts +15 -0
  37. package/es/enums/globalEnum.mjs +60 -25
  38. package/es/enums/httpEnum.mjs +71 -61
  39. package/es/enums/index.mjs +44 -14
  40. package/es/enums/menuEnum.mjs +42 -38
  41. package/es/enums/page-designer/designer.d.ts +1 -8
  42. package/es/enums/page-designer/designer.mjs +403 -407
  43. package/es/enums/page-designer/index.d.ts +1 -0
  44. package/es/enums/page-designer/index.mjs +5 -0
  45. package/es/enums/page-designer/layout.d.ts +12 -0
  46. package/es/enums/page-designer/layout.mjs +17 -0
  47. package/es/enums/page-designer/panel.mjs +341 -213
  48. package/es/enums/page-designer/toolkit.mjs +13 -12
  49. package/es/enums/page-designer/widget.d.ts +5 -0
  50. package/es/enums/page-designer/widget.mjs +426 -334
  51. package/es/enums/pageEnum.mjs +14 -13
  52. package/es/enums/plugin-enum.d.ts +8 -4
  53. package/es/enums/plugin-enum.mjs +27 -7
  54. package/es/enums/processEnum.mjs +95 -60
  55. package/es/enums/roleEnum.mjs +7 -6
  56. package/es/enums/sizeEnum.d.ts +18 -0
  57. package/es/enums/sizeEnum.mjs +28 -8
  58. package/es/global/gct/gct.d.ts +240 -4
  59. package/es/global/gct/gct.mjs +98 -90
  60. package/es/global/index.mjs +1 -0
  61. package/es/hooks/index.d.ts +0 -2
  62. package/es/hooks/index.mjs +4 -0
  63. package/es/hooks/use-app-inst/use-app-inst.mjs +11 -5
  64. package/es/hooks/use-modal/use-modal.mjs +16 -10
  65. package/es/hooks/use-sub-app-utils/use-sub-app-utils.d.ts +8 -12
  66. package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +45 -25
  67. package/es/hooks/useCopyToClipboard.mjs +50 -50
  68. package/es/index.d.ts +2 -3
  69. package/es/index.mjs +129 -132
  70. package/es/interface/i-dictionary/i-dictionary-item.d.ts +6 -0
  71. package/es/interface/i-global-register/i-global-register.d.ts +8 -0
  72. package/es/interface/i-kit-info/i-kit-info.d.ts +20 -0
  73. package/es/interface/i-pinia-action/i-global-actions.d.ts +4 -6
  74. package/es/interface/i-pinia-getter/i-global-getters.d.ts +2 -0
  75. package/es/interface/i-pinia-state/i-global-state.d.ts +12 -12
  76. package/es/interface/index.d.ts +4 -6
  77. package/es/interface/model-designer/entity.d.ts +110 -0
  78. package/es/interface/provider/index.d.ts +0 -2
  79. package/es/locale/index.d.ts +11 -3
  80. package/es/locale/index.mjs +75 -57
  81. package/es/modules/env-manager/env-manager.const.mjs +16 -8
  82. package/es/modules/env-manager/env-manager.d.ts +2 -0
  83. package/es/modules/env-manager/env-manager.interface.d.ts +2 -0
  84. package/es/modules/env-manager/env-manager.interface.mjs +14 -7
  85. package/es/modules/env-manager/env-manager.mjs +108 -107
  86. package/es/modules/error-handler/error-handler.const.mjs +11 -16
  87. package/es/modules/error-handler/error-strategy.mjs +199 -175
  88. package/es/modules/error-handler/index.mjs +120 -106
  89. package/es/modules/mqtt/constants/mqtt.const.d.ts +33 -0
  90. package/es/modules/mqtt/constants/mqtt.const.mjs +24 -0
  91. package/es/modules/mqtt/enums/mqtt-status.enum.d.ts +20 -0
  92. package/es/modules/mqtt/enums/mqtt-status.enum.mjs +24 -0
  93. package/es/modules/mqtt/index.d.ts +5 -0
  94. package/es/modules/mqtt/index.mjs +4 -0
  95. package/es/modules/mqtt/interfaces/i-mqtt.d.ts +139 -0
  96. package/es/modules/mqtt/mqtt-client.d.ts +117 -0
  97. package/es/modules/mqtt/mqtt-client.mjs +229 -0
  98. package/es/modules/mqtt/mqtt-manager.d.ts +87 -0
  99. package/es/modules/mqtt/mqtt-manager.mjs +118 -0
  100. package/es/modules/platform-config/constants/index.mjs +4 -0
  101. package/es/modules/platform-config/constants/login.const.mjs +48 -45
  102. package/es/modules/platform-config/constants/org.const.mjs +57 -52
  103. package/es/modules/platform-config/constants/theme.const.mjs +11 -4
  104. package/es/modules/platform-config/constants/watermark.const.mjs +17 -12
  105. package/es/modules/platform-config/enums/deploy.enum.mjs +13 -6
  106. package/es/modules/platform-config/enums/login.enum.mjs +29 -15
  107. package/es/modules/platform-config/enums/platform.enum.d.ts +0 -15
  108. package/es/modules/platform-config/enums/platform.enum.mjs +17 -26
  109. package/es/modules/platform-config/index.d.ts +1 -1
  110. package/es/modules/platform-config/index.mjs +9 -0
  111. package/es/modules/platform-config/interfaces/index.d.ts +0 -1
  112. package/es/modules/platform-config/store.d.ts +5 -1
  113. package/es/modules/platform-config/store.mjs +68 -76
  114. package/es/modules/platform-config/useBasicSetting.mjs +47 -35
  115. package/es/modules/platform-config/useDeploySetting.mjs +29 -21
  116. package/es/modules/platform-config/useLoginSetting.mjs +151 -173
  117. package/es/modules/platform-config/useOrgSetting.mjs +63 -62
  118. package/es/modules/platform-config/useProjectSetting.mjs +14 -6
  119. package/es/modules/platform-config/useSecuritySetting.d.ts +1 -0
  120. package/es/modules/platform-config/useSecuritySetting.mjs +81 -56
  121. package/es/modules/platform-config/useThemeSetting.mjs +78 -59
  122. package/es/modules/platform-config/useWatermarkSetting.mjs +37 -23
  123. package/es/modules/user-stores/index.mjs +3 -0
  124. package/es/modules/user-stores/store/permission.store.mjs +27 -36
  125. package/es/modules/user-stores/store/tenant.store.mjs +20 -22
  126. package/es/modules/user-stores/store/user.store.d.ts +149 -1
  127. package/es/modules/user-stores/store/user.store.mjs +97 -101
  128. package/es/modules/user-stores/types/user.d.ts +1 -0
  129. package/es/router/index.d.ts +3 -0
  130. package/es/router/index.mjs +59 -29
  131. package/es/router/redirect/redirect-index.vue.d.ts +2 -0
  132. package/es/router/redirect/redirect-index.vue.mjs +5 -0
  133. package/es/router/redirect/redirect-index.vue_vue_type_script_setup_true_lang.mjs +28 -0
  134. package/es/setup-app.d.ts +1 -1
  135. package/es/setup-app.mjs +22 -28
  136. package/es/state/global-pinia-state/global-pinia-state.d.ts +15 -7
  137. package/es/state/global-pinia-state/global-pinia-state.mjs +43 -57
  138. package/es/state/index.d.ts +0 -9
  139. package/es/state/index.mjs +1 -0
  140. package/es/store/global-store.mjs +44 -57
  141. package/es/store/index.d.ts +8 -0
  142. package/es/store/index.mjs +35 -19
  143. package/es/store/storage-store.d.ts +9 -0
  144. package/es/store/storage-store.mjs +10 -0
  145. package/es/types/index.d.ts +18 -0
  146. package/es/utils/axios/interceptors.mjs +22 -17
  147. package/es/utils/cache-adapter/cache-adapter.mjs +61 -56
  148. package/es/utils/css-loader/css-loader.d.ts +36 -0
  149. package/es/utils/css-loader/css-loader.mjs +82 -0
  150. package/es/utils/design/design.d.ts +11 -0
  151. package/es/utils/design/design.mjs +21 -0
  152. package/es/utils/deviceFingerprint.mjs +77 -63
  153. package/es/utils/dictionary/dictionary.mjs +142 -145
  154. package/es/utils/file/base64Conver.d.ts +9 -0
  155. package/es/utils/file/base64Conver.mjs +40 -0
  156. package/es/utils/file/download.d.ts +44 -0
  157. package/es/utils/file/download.mjs +101 -0
  158. package/es/utils/file/parser.d.ts +3 -0
  159. package/es/utils/file/parser.mjs +29 -0
  160. package/es/utils/i18n/index.mjs +14 -3
  161. package/es/utils/index.d.ts +14 -4
  162. package/es/utils/index.mjs +34 -0
  163. package/es/utils/is-sort-filed/is-sort-filed.d.ts +10 -0
  164. package/es/utils/is-sort-filed/is-sort-filed.mjs +45 -0
  165. package/es/utils/kit-pkg-util/kit-pkg-util.d.ts +32 -0
  166. package/es/utils/kit-pkg-util/kit-pkg-util.mjs +73 -0
  167. package/es/utils/linked-list/linked-list.mjs +115 -118
  168. package/es/utils/linked-node/linked-node.mjs +41 -31
  169. package/es/utils/lowcode/utils.mjs +13 -18
  170. package/es/utils/lowcode/validate.mjs +20 -26
  171. package/es/utils/mitt/mitt.mjs +4 -4
  172. package/es/utils/model-loader/model-loader.mjs +288 -325
  173. package/es/utils/namespace/namespace.mjs +178 -164
  174. package/es/utils/openUtil/index.mjs +2 -0
  175. package/es/utils/openUtil/modal/modal.mjs +72 -79
  176. package/es/utils/openUtil/overlay-container/overlay-container.mjs +144 -138
  177. package/es/utils/permission.d.ts +19 -0
  178. package/es/utils/permission.mjs +34 -0
  179. package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +63 -0
  180. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +119 -0
  181. package/es/utils/plugin-static-resource/plugin-static-resource.d.ts +2 -27
  182. package/es/utils/plugin-static-resource/plugin-static-resource.mjs +19 -42
  183. package/es/utils/style/index.mjs +94 -138
  184. package/es/utils/tools/tools.d.ts +12 -10
  185. package/es/utils/tools/tools.mjs +128 -57
  186. package/es/utils/treeHelper/treeHelper.d.ts +3 -9
  187. package/es/utils/treeHelper/treeHelper.mjs +205 -233
  188. package/es/utils/uploader/uploader.d.ts +20 -0
  189. package/es/utils/uploader/uploader.mjs +86 -0
  190. package/es/utils/useUUid.d.ts +41 -0
  191. package/es/utils/useUUid.mjs +85 -0
  192. package/es/utils/util.mjs +55 -35
  193. package/es/utils/uuid/uuid.d.ts +2 -0
  194. package/es/utils/uuid/uuid.mjs +33 -43
  195. package/es/utils/validate.d.ts +5 -0
  196. package/es/utils/validate.mjs +21 -0
  197. package/es/utils/value-helper/value-helper.mjs +113 -98
  198. package/package.json +18 -27
  199. package/dist/index.esm.min.mjs +0 -7973
  200. package/dist/index.min.cjs +0 -386
  201. package/dist/index.system.min.js +0 -386
  202. package/es/constants/editor-type/editor-type.d.ts +0 -244
  203. package/es/constants/editor-type/editor-type.mjs +0 -63
  204. package/es/controller/edit-form/edit-form.controller.d.ts +0 -28
  205. package/es/controller/edit-form/edit-form.controller.mjs +0 -47
  206. package/es/controller/editor/color-editor.controller.d.ts +0 -13
  207. package/es/controller/editor/color-editor.controller.mjs +0 -6
  208. package/es/controller/editor/length-unit-editor.controller.d.ts +0 -13
  209. package/es/controller/editor/length-unit-editor.controller.mjs +0 -6
  210. package/es/controller/editor-item/editor-item.controller.d.ts +0 -14
  211. package/es/controller/editor-item/editor-item.controller.mjs +0 -8
  212. package/es/controller/form/form.controller.d.ts +0 -76
  213. package/es/controller/form/form.controller.mjs +0 -147
  214. package/es/controller/form-collapse/form-collapse.controller.d.ts +0 -18
  215. package/es/controller/form-collapse/form-collapse.controller.mjs +0 -14
  216. package/es/controller/form-collapse-pane/form-collapse-pane.controller.d.ts +0 -18
  217. package/es/controller/form-collapse-pane/form-collapse-pane.controller.mjs +0 -14
  218. package/es/controller/form-edit-item/form-edit-item.controller.d.ts +0 -27
  219. package/es/controller/form-edit-item/form-edit-item.controller.mjs +0 -74
  220. package/es/controller/form-group/form-group.controller.d.ts +0 -18
  221. package/es/controller/form-group/form-group.controller.mjs +0 -14
  222. package/es/controller/form-item/form-item.controller.d.ts +0 -21
  223. package/es/controller/form-item/form-item.controller.mjs +0 -43
  224. package/es/controller/form-item-basic/form-item-basic.controller.d.ts +0 -57
  225. package/es/controller/form-item-basic/form-item-basic.controller.mjs +0 -49
  226. package/es/controller/form-item-hidden/form-item-hidden.controller.d.ts +0 -17
  227. package/es/controller/form-item-hidden/form-item-hidden.controller.mjs +0 -7
  228. package/es/controller/form-tab/form-tab.controller.d.ts +0 -18
  229. package/es/controller/form-tab/form-tab.controller.mjs +0 -14
  230. package/es/controller/form-tab-pane/form-tab-pane.controller.d.ts +0 -18
  231. package/es/controller/form-tab-pane/form-tab-pane.controller.mjs +0 -14
  232. package/es/controller/gct-form/gct-form.controller.d.ts +0 -101
  233. package/es/controller/gct-form/gct-form.controller.mjs +0 -214
  234. package/es/controller/index.d.ts +0 -15
  235. package/es/hooks/use-form/use-form.d.ts +0 -10
  236. package/es/hooks/use-form/use-form.mjs +0 -8
  237. package/es/hooks/use-gct-form-value/use-gct-form-value.d.ts +0 -22
  238. package/es/hooks/use-gct-form-value/use-gct-form-value.mjs +0 -89
  239. package/es/hooks/use-overlay-scrollbars/use-overlay-scrollbars.d.ts +0 -11
  240. package/es/interface/controller/edit-form/edit-form.controller.d.ts +0 -26
  241. package/es/interface/controller/editor/i-color-editor.controller.d.ts +0 -11
  242. package/es/interface/controller/editor/i-length-unit-editor.controller.d.ts +0 -11
  243. package/es/interface/controller/editor-item/editor-item.controller.d.ts +0 -19
  244. package/es/interface/controller/form/form.controller.d.ts +0 -121
  245. package/es/interface/controller/form-collapse/form-collapse.controller.d.ts +0 -23
  246. package/es/interface/controller/form-collapse-pane/form-collapse-pane.controller.d.ts +0 -23
  247. package/es/interface/controller/form-edit-item/form-edit-item.controller.d.ts +0 -59
  248. package/es/interface/controller/form-group/form-group.controller.d.ts +0 -24
  249. package/es/interface/controller/form-hidden-item/form-hidden-item.controller.d.ts +0 -24
  250. package/es/interface/controller/form-item/form-item.controller.d.ts +0 -40
  251. package/es/interface/controller/form-item-basic/form-item-basic.controller.d.ts +0 -51
  252. package/es/interface/controller/form-tab/form-tab.controller.d.ts +0 -23
  253. package/es/interface/controller/form-tab-pane/form-tab-pane.controller.d.ts +0 -23
  254. package/es/interface/controller/index.d.ts +0 -14
  255. package/es/interface/events/form/i-form.event.d.ts +0 -11
  256. package/es/interface/events/index.d.ts +0 -1
  257. package/es/interface/form/i-editor/i-check-switch.d.ts +0 -29
  258. package/es/interface/form/i-editor/i-checkbox-editor.d.ts +0 -9
  259. package/es/interface/form/i-editor/i-color-editor.d.ts +0 -13
  260. package/es/interface/form/i-editor/i-editor-basic.d.ts +0 -87
  261. package/es/interface/form/i-editor/i-icon-select-editor.d.ts +0 -21
  262. package/es/interface/form/i-editor/i-info-editor.d.ts +0 -21
  263. package/es/interface/form/i-editor/i-length-unit-editor.d.ts +0 -13
  264. package/es/interface/form/i-editor/i-model-field-select-editor.d.ts +0 -18
  265. package/es/interface/form/i-editor/i-number-editor.d.ts +0 -21
  266. package/es/interface/form/i-editor/i-picker-editor.d.ts +0 -30
  267. package/es/interface/form/i-editor/i-radio-editor.d.ts +0 -21
  268. package/es/interface/form/i-editor/i-select-editor.d.ts +0 -14
  269. package/es/interface/form/i-editor/i-span-editor.d.ts +0 -30
  270. package/es/interface/form/i-editor/i-switch-editor.d.ts +0 -14
  271. package/es/interface/form/i-editor/i-text-editor.d.ts +0 -46
  272. package/es/interface/form/i-editor/i-textarea-editor.d.ts +0 -25
  273. package/es/interface/form/i-form/i-edit-form.d.ts +0 -48
  274. package/es/interface/form/i-form/i-form-collapse-pane.d.ts +0 -30
  275. package/es/interface/form/i-form/i-form-collapse.d.ts +0 -35
  276. package/es/interface/form/i-form/i-form-container.d.ts +0 -53
  277. package/es/interface/form/i-form/i-form-edit-item.d.ts +0 -140
  278. package/es/interface/form/i-form/i-form-group-container.d.ts +0 -24
  279. package/es/interface/form/i-form/i-form-group.d.ts +0 -35
  280. package/es/interface/form/i-form/i-form-hidden-item.d.ts +0 -11
  281. package/es/interface/form/i-form/i-form-item-basic.d.ts +0 -126
  282. package/es/interface/form/i-form/i-form-item.d.ts +0 -11
  283. package/es/interface/form/i-form/i-form-tab-pane.d.ts +0 -23
  284. package/es/interface/form/i-form/i-form-tab.d.ts +0 -21
  285. package/es/interface/form/i-form/i-form.d.ts +0 -79
  286. package/es/interface/form/index.d.ts +0 -29
  287. package/es/interface/layout/i-flex-layout/i-flex-container.d.ts +0 -75
  288. package/es/interface/layout/i-flex-layout/i-flex-item.d.ts +0 -51
  289. package/es/interface/layout/i-grid-layout/i-grid-container.d.ts +0 -29
  290. package/es/interface/layout/i-grid-layout/i-grid-item-span.d.ts +0 -54
  291. package/es/interface/layout/i-grid-layout/i-grid-item.d.ts +0 -37
  292. package/es/interface/layout/i-layout-basis/i-layout-container-basis.d.ts +0 -11
  293. package/es/interface/layout/index.d.ts +0 -6
  294. package/es/interface/provider/i-editor-provider/i-editor-provider.d.ts +0 -24
  295. package/es/interface/provider/i-form-item-provider/i-form-item-provider.d.ts +0 -44
  296. package/es/interface/state/form/form.state.d.ts +0 -53
  297. package/es/interface/state/form-collapse/form-collapse.state.d.ts +0 -11
  298. package/es/interface/state/form-collapse-pane/form-collapse-pane.state.d.ts +0 -11
  299. package/es/interface/state/form-edit-item/form-edit-item.state.d.ts +0 -38
  300. package/es/interface/state/form-group/form-group.state.d.ts +0 -21
  301. package/es/interface/state/form-hidden-item/form-hidden-item.state.d.ts +0 -5
  302. package/es/interface/state/form-item/form-item.state.d.ts +0 -20
  303. package/es/interface/state/form-item-basic/form-item-basic.state.d.ts +0 -63
  304. package/es/interface/state/form-tab/form-tab.state.d.ts +0 -19
  305. package/es/interface/state/form-tab-pane/form-tab-pane.state.d.ts +0 -11
  306. package/es/interface/state/index.d.ts +0 -10
  307. package/es/modules/platform-config/interfaces/global-setting.interface.d.ts +0 -7
  308. package/es/register/editor-register/editor-register.d.ts +0 -49
  309. package/es/register/editor-register/editor-register.mjs +0 -57
  310. package/es/register/form-item-register/form-item-register.d.ts +0 -36
  311. package/es/register/form-item-register/form-item-register.mjs +0 -42
  312. package/es/register/index.d.ts +0 -14
  313. package/es/state/form/form.state.d.ts +0 -24
  314. package/es/state/form/form.state.mjs +0 -16
  315. package/es/state/form-collapse/form-collapse.state.d.ts +0 -14
  316. package/es/state/form-collapse/form-collapse.state.mjs +0 -6
  317. package/es/state/form-collapse-pane/form-collapse-pane.state.d.ts +0 -14
  318. package/es/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -6
  319. package/es/state/form-edit-item/form-edit-item.state.d.ts +0 -17
  320. package/es/state/form-edit-item/form-edit-item.state.mjs +0 -10
  321. package/es/state/form-group/form-group.state.d.ts +0 -21
  322. package/es/state/form-group/form-group.state.mjs +0 -14
  323. package/es/state/form-item/form-item.state.d.ts +0 -14
  324. package/es/state/form-item/form-item.state.mjs +0 -6
  325. package/es/state/form-item-basic/form-item-basic.state.d.ts +0 -17
  326. package/es/state/form-item-basic/form-item-basic.state.mjs +0 -9
  327. package/es/state/form-tab/form-tab.state.d.ts +0 -15
  328. package/es/state/form-tab/form-tab.state.mjs +0 -7
  329. package/es/state/form-tab-pane/form-tab-pane.state.d.ts +0 -14
  330. package/es/state/form-tab-pane/form-tab-pane.state.mjs +0 -6
  331. package/es/utils/props/gct-form-item/gct-form-item.props.d.ts +0 -63
  332. package/es/utils/props/gct-form-item/gct-form-item.props.mjs +0 -66
  333. package/es/utils/props/index.d.ts +0 -1
  334. package/es/utils/width-install/width-install.d.ts +0 -17
  335. package/es/utils/width-install/width-install.mjs +0 -23
@@ -0,0 +1,85 @@
1
+ import { computed, unref } from "vue";
2
+ //#region src/utils/useUUid.ts
3
+ /**
4
+ * 生成随机串
5
+ * @param uuids 不可用的uuid
6
+ * @param opts
7
+ * @param opts.needPrefix 是否需要拼接前缀(默认不需要)
8
+ * @param opts.isString 随机串只能是字符串
9
+ * @param opts.prefix 前缀,默认前缀u_
10
+ * @param opts.length 即将生成的uuid位数(不包含前缀, 默认8位)
11
+ * @param opts.chars 类型
12
+ * @param opts.numPref 数字打头
13
+ */
14
+ var randomUUID = (uuids = [], opts) => {
15
+ const { needPrefix = false, isString = true, prefix = "u_", length = 8, chars = "", numPref = false } = opts || {};
16
+ let characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
17
+ if (chars === "capital&number") characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
18
+ else if (chars === "lowercase&number") characters = "abcdefghijklmnopqrstuvwxyz0123456789";
19
+ else if (chars === "lowercase") characters = "abcdefghijklmnopqrstuvwxyz";
20
+ let uuid;
21
+ while (!uuid) {
22
+ let id = "";
23
+ if (isString) {
24
+ if (numPref) id += Math.floor(Math.random() * 9) + 1;
25
+ for (let i = 0; i < length; i++) id += characters.charAt(Math.floor(Math.random() * characters.length));
26
+ } else id = `${needPrefix ? prefix : ""}${numPref ? Math.floor(Math.random() * 9) + 1 : ""}${Math.random().toString(36).substr(2, length)}`;
27
+ if (!uuids.includes(id)) uuid = id;
28
+ }
29
+ return uuid;
30
+ };
31
+ /**
32
+ * uuid生成器
33
+ * @param uuids 已有uuid
34
+ */
35
+ randomUUID.Generate = (uuids, opts) => {
36
+ const cloneUUids = Array.isArray(uuids) ? uuids.concat() : [];
37
+ return { next: () => {
38
+ const id = randomUUID(cloneUUids, opts);
39
+ cloneUUids.push(id);
40
+ return id;
41
+ } };
42
+ };
43
+ function useUUid(tableData, keyAttr, opts) {
44
+ const f_children = "children";
45
+ const f_key = "key";
46
+ const flatTableData = computed(() => {
47
+ return tableData.value.reduce((list, item) => {
48
+ list.push(item);
49
+ const nodes = item[f_children].map((ele) => {
50
+ return {
51
+ ...ele,
52
+ _pid_: item.id
53
+ };
54
+ });
55
+ list.push(...nodes);
56
+ return list;
57
+ }, []);
58
+ });
59
+ const oldUUids = computed(() => {
60
+ return flatTableData.value.map((data) => {
61
+ if (data._pid_) return data[f_key].replace(new RegExp(`^${unref(keyAttr)}_*`), "");
62
+ return null;
63
+ }).filter((i) => i);
64
+ });
65
+ function getUuid(uuidsProp, optsProp) {
66
+ return randomUUID([...unref(oldUUids), ...uuidsProp ?? []], {
67
+ ...opts,
68
+ ...optsProp
69
+ });
70
+ }
71
+ function getUuidGenerate(uuidsProp, optsProp) {
72
+ return randomUUID.Generate([...unref(oldUUids), ...uuidsProp ?? []], {
73
+ ...opts,
74
+ ...optsProp
75
+ });
76
+ }
77
+ return {
78
+ oldUUids,
79
+ flatTableData,
80
+ getUuid,
81
+ getUuidGenerate
82
+ };
83
+ }
84
+ //#endregion
85
+ export { randomUUID, useUUid };
package/es/utils/util.mjs CHANGED
@@ -1,40 +1,60 @@
1
+ //#region src/utils/util.ts
2
+ /**
3
+ * 替换url中的参数,格式为xxx/{aid}/xxx/{pid}/{bid?}
4
+ *
5
+ * @export
6
+ * @param {string} url - 原始 URL 字符串
7
+ * @param {IObject} data - 用于替换占位符的数据对象
8
+ * @return {string} 处理后的 URL 字符串
9
+ */
1
10
  function genUrl(url, data) {
2
- let result = url;
3
- Object.keys(data).forEach((key) => {
4
- result = result.replace(`{${key}}`, data[key] ?? "");
5
- result = result.replace(`{${key}?}`, data[key] ?? "");
6
- });
7
- result = result.replace(/\/\{[a-z]+\?\}/g, "");
8
- return result;
11
+ let result = url;
12
+ Object.keys(data).forEach((key) => {
13
+ result = result.replace(`{${key}}`, data[key] ?? "");
14
+ result = result.replace(`{${key}?}`, data[key] ?? "");
15
+ });
16
+ result = result.replace(/\/\{[a-z]+\?\}/g, "");
17
+ return result;
9
18
  }
19
+ /**
20
+ * 打开新窗口
21
+ *
22
+ * @export
23
+ * @param {string} url - 要打开的 URL
24
+ * @param {IOpenWindowOptions} [options] - 窗口配置选项
25
+ * @return {Window | null} 新打开的窗口对象,如果打开失败则返回 null
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * // 简单打开新窗口
30
+ * openWindow('https://example.com');
31
+ *
32
+ * // 使用 URL 参数替换
33
+ * openWindow('/user/{id}/profile', {
34
+ * genUrlData: { id: '123' }
35
+ * });
36
+ *
37
+ * // 完整配置
38
+ * openWindow('https://example.com', {
39
+ * target: '_blank',
40
+ * noopener: true,
41
+ * noreferrer: true,
42
+ * routePath: '/dashboard',
43
+ * optionStr: 'width=800,height=600'
44
+ * });
45
+ * ```
46
+ */
10
47
  function openWindow(url, options) {
11
- const {
12
- target = "_blank",
13
- noopener = true,
14
- noreferrer = true,
15
- genUrlData,
16
- routePath = "",
17
- optionStr = ""
18
- } = options || {};
19
- const features = [];
20
- if (noopener) {
21
- features.push("noopener=yes");
22
- }
23
- if (noreferrer) {
24
- features.push("noreferrer=yes");
25
- }
26
- let finalUrl = url;
27
- if (genUrlData) {
28
- finalUrl = genUrl(finalUrl, genUrlData);
29
- }
30
- if (routePath) {
31
- finalUrl += routePath;
32
- }
33
- let featuresStr = features.join(",");
34
- if (optionStr) {
35
- featuresStr = featuresStr ? `${featuresStr},${optionStr}` : optionStr;
36
- }
37
- return window.open(finalUrl, target, featuresStr);
48
+ const { target = "_blank", noopener = true, noreferrer = true, genUrlData, routePath = "", optionStr = "" } = options || {};
49
+ const features = [];
50
+ if (noopener) features.push("noopener=yes");
51
+ if (noreferrer) features.push("noreferrer=yes");
52
+ let finalUrl = url;
53
+ if (genUrlData) finalUrl = genUrl(finalUrl, genUrlData);
54
+ if (routePath) finalUrl += routePath;
55
+ let featuresStr = features.join(",");
56
+ if (optionStr) featuresStr = featuresStr ? `${featuresStr},${optionStr}` : optionStr;
57
+ return window.open(finalUrl, target, featuresStr);
38
58
  }
39
-
59
+ //#endregion
40
60
  export { genUrl, openWindow };
@@ -1,3 +1,5 @@
1
+ import { sha256 } from 'js-sha256';
1
2
  export declare function buildUUID(): string;
2
3
  export declare function buildShortUUID(prefix?: string): string;
3
4
  export declare const uuid2: (len: number, radix?: number) => string;
5
+ export { sha256 };
@@ -1,48 +1,38 @@
1
- const hexList = [];
2
- for (let i = 0; i <= 15; i++) {
3
- hexList[i] = i.toString(16);
4
- }
1
+ import { sha256 } from "js-sha256";
2
+ //#region src/utils/uuid/uuid.ts
3
+ var hexList = [];
4
+ for (let i = 0; i <= 15; i++) hexList[i] = i.toString(16);
5
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, "");
6
+ let uuid = "";
7
+ for (let i = 1; i <= 36; i++) if (i === 9 || i === 14 || i === 19 || i === 24) uuid += "-";
8
+ else if (i === 15) uuid += 4;
9
+ else if (i === 20) uuid += hexList[Math.random() * 4 | 8];
10
+ else uuid += hexList[Math.random() * 16 | 0];
11
+ return uuid.replace(/-/g, "");
19
12
  }
20
- let unique = 0;
13
+ var unique = 0;
21
14
  function buildShortUUID(prefix = "") {
22
- prefix = prefix.replaceAll("-", "");
23
- const random = Math.floor(Math.random() * 1e9);
24
- unique++;
25
- return prefix + "_" + random + unique;
15
+ prefix = prefix.replaceAll("-", "");
16
+ const random = Math.floor(Math.random() * 1e9);
17
+ unique++;
18
+ return prefix + "_" + random + unique;
26
19
  }
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("");
20
+ var uuid2 = (len, radix) => {
21
+ const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
22
+ const uuid = [];
23
+ let i;
24
+ radix = radix || chars.length;
25
+ if (len) for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
26
+ else {
27
+ let r;
28
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
29
+ uuid[14] = "4";
30
+ for (i = 0; i < 36; i++) if (!uuid[i]) {
31
+ r = 0 | Math.random() * 16;
32
+ uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
33
+ }
34
+ }
35
+ return uuid.join("");
46
36
  };
47
-
48
- export { buildShortUUID, buildUUID, uuid2 };
37
+ //#endregion
38
+ export { buildShortUUID, buildUUID, sha256, uuid2 };
@@ -0,0 +1,5 @@
1
+ export declare const validateEmoji: (value: string) => boolean;
2
+ export declare const hasEmojiAndSpecStr: (value: string) => boolean;
3
+ export declare const hasEmojiAndSpecStr1: (value: string) => boolean;
4
+ export declare const validateModelName: (_rule: unknown, value: string) => Promise<void>;
5
+ export declare const validateIsModelName: (_rule: unknown, value: string) => Promise<void>;
@@ -0,0 +1,21 @@
1
+ import { t } from "./i18n/index.mjs";
2
+ //#region src/utils/validate.ts
3
+ var validateEmoji = (value) => {
4
+ return /[\u{1F300}-\u{1F5FF}\u{1F600}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu.test(value) || /\u{1F91D}\u{1F3FB}-\u{1F3FF}/u.test(value);
5
+ };
6
+ var hasEmojiAndSpecStr = (value) => {
7
+ return validateEmoji(value) || /[*??::,,[\]【】#]/.test(value);
8
+ };
9
+ var hasEmojiAndSpecStr1 = (value) => {
10
+ return validateEmoji(value) || /[*??::,,[\]\\/【】#]/.test(value);
11
+ };
12
+ var validateModelName = (_rule, value) => {
13
+ if (hasEmojiAndSpecStr(value)) return Promise.reject(t("sys.model.modelNameError"));
14
+ return Promise.resolve();
15
+ };
16
+ var validateIsModelName = (_rule, value) => {
17
+ if (hasEmojiAndSpecStr1(value)) return Promise.reject(t("sys.model.notModelNameError"));
18
+ return Promise.resolve();
19
+ };
20
+ //#endregion
21
+ export { hasEmojiAndSpecStr, hasEmojiAndSpecStr1, validateEmoji, validateIsModelName, validateModelName };
@@ -1,111 +1,126 @@
1
- import { isRef, computed, ref, watch } from 'vue';
2
-
1
+ import { computed, isRef, ref, watch } from "vue";
2
+ //#region src/utils/value-helper/value-helper.ts
3
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;
4
+ return computed({
5
+ get: () => value.value,
6
+ set: (v) => {
7
+ value.value = v;
8
+ afterSet(v);
9
+ }
10
+ });
12
11
  }
13
12
  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;
13
+ const keys = Object.keys(isRef(object) ? object.value : object);
14
+ const result = {};
15
+ keys.forEach((key) => {
16
+ result[key] = computed({
17
+ get: () => {
18
+ return (isRef(object) ? object.value : object)[key];
19
+ },
20
+ set(v) {
21
+ (isRef(object) ? object.value : object)[key] = v;
22
+ afterSet(key, v);
23
+ }
24
+ });
25
+ });
26
+ return result;
29
27
  }
28
+ /**
29
+ * 属性修改的时候不修改并抛出事件
30
+ * @author lingxiaoming
31
+ * @date 2024-07-17 03:30:44
32
+ * @export
33
+ * @template T
34
+ * @param {(T | Ref<T>)} object (对象必须有该属性,即使是undefined,否则无法监控)
35
+ * @param {<F extends keyof T>(field: F, v: T[F], newObj: T) => void} emitSet newObj是将要修改成的完整数据
36
+ * @return {*} {ToRefs<T>}
37
+ */
30
38
  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;
39
+ const keys = Object.keys(isRef(object) ? object.value : object);
40
+ const result = {};
41
+ let cacheData = {};
42
+ keys.forEach((key) => {
43
+ result[key] = computed({
44
+ get: () => {
45
+ cacheData = {};
46
+ return (isRef(object) ? object.value : object)[key];
47
+ },
48
+ set(v) {
49
+ const objVal = isRef(object) ? object.value : object;
50
+ cacheData[key] = v;
51
+ emitSet(key, v, {
52
+ ...objVal,
53
+ ...cacheData
54
+ });
55
+ }
56
+ });
57
+ });
58
+ return result;
50
59
  }
60
+ /**
61
+ * 解析数值和单位
62
+ * @author lingxiaoming
63
+ * @date 2024-07-15 06:06:41
64
+ * @param {string} str
65
+ * @return {*} {({ value: number; unit: string } | null)}
66
+ */
51
67
  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");
68
+ if (str === "nullpx") return {
69
+ value: 0,
70
+ unit: "px"
71
+ };
72
+ const match = str.match(/^(\d+\.?\d*)([a-zA-Z%]+)$/);
73
+ if (match) return {
74
+ value: parseFloat(match[1]),
75
+ unit: match[2]
76
+ };
77
+ throw new Error("Invalid value");
67
78
  }
79
+ /**
80
+ * 增强computed,当属性变更时,自动调用set方法
81
+ * @author lingxiaoming
82
+ * @date 2024-08-26 10:19:01
83
+ * @export
84
+ * @param {{
85
+ * get: ComputedGetter<T>;
86
+ * set: ComputedSetter<T>;
87
+ * deep: boolean; //为true时,深层属性变更也会触发set
88
+ * }} opts
89
+ */
68
90
  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;
91
+ const result = ref();
92
+ let clear;
93
+ const watchDeep = () => {
94
+ if (!opts.deep) return;
95
+ clear = watch(() => result.value, (v) => {
96
+ console.info("computedEx:属性或者值修改", v);
97
+ opts.set(v);
98
+ }, { deep: true });
99
+ };
100
+ watch(() => opts.get(), (v) => {
101
+ if (clear) clear();
102
+ console.info("computedEx:获取新值,重新监听", v);
103
+ result.value = v;
104
+ watchDeep();
105
+ }, { immediate: true });
106
+ return result;
97
107
  }
108
+ /**
109
+ * 缓存函数返回值,下次相同参数调用时直接返回缓存值
110
+ * @export
111
+ * @template T
112
+ * @param cb
113
+ * @return {*}
114
+ */
98
115
  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
- };
116
+ const cacheReturn = /* @__PURE__ */ new Map();
117
+ return function(...args) {
118
+ const key = JSON.stringify(args);
119
+ if (cacheReturn.has(key)) return cacheReturn.get(key);
120
+ const result = cb(...args);
121
+ cacheReturn.set(key, result);
122
+ return result;
123
+ };
109
124
  }
110
-
125
+ //#endregion
111
126
  export { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit };
package/package.json CHANGED
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "0.1.4-dev.9",
3
+ "version": "0.1.5-dev.1",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
- "main": "dist/index.min.cjs",
7
- "module": "es/index.mjs",
6
+ "loader": "dist/index.esm.min.js",
8
7
  "types": "es/index.d.ts",
9
- "system": "dist/index.system.min.js",
10
8
  "exports": {
11
9
  ".": {
12
10
  "types": "./es/index.d.ts",
13
- "import": "./es/index.mjs",
14
- "require": "./dist/index.min.cjs"
11
+ "import": "./es/index.mjs"
15
12
  },
16
13
  "./types": {
17
14
  "types": "./es/types/index.d.ts"
@@ -48,8 +45,9 @@
48
45
  "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
49
46
  },
50
47
  "dependencies": {
51
- "@fingerprintjs/fingerprintjs": "^5.0.1",
52
- "@gct-paas/api": "0.1.0-dev.8",
48
+ "@fingerprintjs/fingerprintjs": "^5.1.0",
49
+ "@gct-paas/api": "^0.1.2-dev.3",
50
+ "@module-federation/runtime": "^2.2.3",
53
51
  "@vueuse/core": "^14.1.0",
54
52
  "async-validator": "^4.2.5",
55
53
  "axios": "^1.13.2",
@@ -57,33 +55,26 @@
57
55
  "js-sha256": "^0.11.1",
58
56
  "lodash-es": "^4.17.23",
59
57
  "mitt": "^3.0.1",
58
+ "mqtt": "^5.15.0",
60
59
  "overlayscrollbars": "^2.14.0",
61
- "path-browserify": "^1.0.1",
62
60
  "pinia": "^3.0.4",
63
- "qs": "^6.14.1",
61
+ "qs": "^6.15.0",
64
62
  "qx-util": "^0.4.8",
65
- "systemjs": "^6.15.1",
66
- "vue": "3.5.27",
67
- "vue-i18n": "11.2.8",
63
+ "vue": "^3.5.30",
64
+ "vue-i18n": "11.3.0",
68
65
  "vue-router": "^4.6.4",
69
66
  "wujie": "^1.0.29"
70
67
  },
71
68
  "devDependencies": {
72
- "@gct-paas/build": "^0.1.5-dev.8",
73
- "@types/lodash-es": "^4.17.12",
74
- "@types/path-browserify": "^1.0.3",
75
- "@types/qs": "^6.14.0",
76
- "@vitejs/plugin-vue": "^6.0.3",
77
- "@vitejs/plugin-vue-jsx": "^5.1.3",
78
- "@vitest/browser": "^4.0.18",
79
- "@vitest/coverage-istanbul": "^4.0.18",
80
- "@vitest/coverage-v8": "^4.0.18",
81
- "@vitest/ui": "^4.0.18",
82
69
  "@vue/test-utils": "^2.4.6",
83
70
  "fs-extra": "^11.3.3",
84
- "playwright": "^1.58.0",
85
- "vite": "^7.3.1",
86
- "vitest": "^4.0.18"
71
+ "playwright": "^1.58.0"
87
72
  },
88
- "gitHead": "c51d9883f7d287433d2def4d7338a06773804fbf"
73
+ "peerDependencies": {
74
+ "@gct-paas/api": "^0.1.2-dev.3",
75
+ "vue": ">=3",
76
+ "vue-i18n": ">=11",
77
+ "vue-router": ">=4"
78
+ },
79
+ "gitHead": "d554696d0991c1d14dd5a2a43b277bafe3976371"
89
80
  }