@gct-paas/design 0.1.4-dev.8 → 0.1.5-dev.0

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 (566) hide show
  1. package/dist/index.min.css +2 -1
  2. package/dist/loader.esm.min.js +1 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +7 -8
  4. package/es/_virtual/_rolldown/runtime.mjs +13 -0
  5. package/es/components/design-icon-button/design-icon-button.d.ts +2 -4
  6. package/es/components/design-icon-button/design-icon-button.mjs +95 -148
  7. package/es/components/design-save-tip/design-save-tip.mjs +76 -102
  8. package/es/components/design-step-check/design-step-check.mjs +92 -118
  9. package/es/components/design-view-layout/{design-view-layout.module.css → design-view-layout.css} +28 -25
  10. package/es/components/design-view-layout/design-view-layout.mjs +135 -204
  11. package/es/components/editor/index.mjs +13 -15
  12. package/es/components/editor/style/border-editor/border-box.vue.mjs +7 -7
  13. package/es/components/editor/style/border-editor/border-box.vue_vue_type_script_setup_true_name_border-box_lang.mjs +245 -0
  14. package/es/components/editor/style/border-editor/border-editor.vue.mjs +7 -7
  15. package/es/components/editor/style/border-editor/border-editor.vue_vue_type_script_setup_true_lang.mjs +57 -0
  16. package/es/components/editor/style/border-editor/border-radius.vue.mjs +7 -7
  17. package/es/components/editor/style/border-editor/border-radius.vue_vue_type_script_setup_true_lang.mjs +177 -0
  18. package/es/components/editor/style/border-editor/util.mjs +48 -70
  19. package/es/components/editor/style/font-editor/align-group.vue.mjs +7 -7
  20. package/es/components/editor/style/font-editor/align-group.vue_vue_type_script_setup_true_name_align-group_lang.mjs +54 -0
  21. package/es/components/editor/style/font-editor/font-editor.vue.mjs +5 -72
  22. package/es/components/editor/style/font-editor/font-editor.vue_vue_type_script_setup_true_name_font-editor_lang.mjs +61 -0
  23. package/es/components/editor/style/font-editor/font-style-group.vue.mjs +7 -7
  24. package/es/components/editor/style/font-editor/font-style-group.vue_vue_type_script_setup_true_lang.mjs +72 -0
  25. package/es/components/editor/style/font-editor/util.mjs +10 -10
  26. package/es/components/editor/style/position-editor/position-editor.vue.mjs +7 -7
  27. package/es/components/editor/style/position-editor/position-editor.vue_vue_type_script_setup_true_name_position-editor_lang.mjs +193 -0
  28. package/es/components/editor/style/spacing-editor/spacing-editor.vue.mjs +7 -7
  29. package/es/components/editor/style/spacing-editor/spacing-editor.vue_vue_type_script_setup_true_lang.mjs +262 -0
  30. package/es/components/field-cascader/index.d.ts +2 -0
  31. package/es/components/field-cascader/index.mjs +1 -0
  32. package/es/components/field-cascader/src/FieldCascader.vue.d.ts +87 -0
  33. package/es/components/field-cascader/src/FieldCascader.vue.mjs +6 -0
  34. package/es/components/field-cascader/src/FieldCascader.vue_vue_type_script_setup_true_lang.mjs +115 -0
  35. package/es/components/field-cascader/src/FieldCascader.vue_vue_type_style_index_0_lang.css +69 -0
  36. package/es/components/field-cascader/src/SearchInput.vue.d.ts +11 -0
  37. package/es/components/field-cascader/src/SearchInput.vue.mjs +7 -0
  38. package/es/components/field-cascader/src/SearchInput.vue_vue_type_script_setup_true_lang.mjs +38 -0
  39. package/es/components/field-cascader/src/SearchInput.vue_vue_type_style_index_0_scoped_512c4b38_lang.css +9 -0
  40. package/es/components/field-cascader/src/hooks.d.ts +129 -0
  41. package/es/components/field-cascader/src/hooks.mjs +163 -0
  42. package/es/components/field-transfer/components/Cascader/FieldCascader.d.ts +25 -0
  43. package/es/components/field-transfer/components/Cascader/FieldCascader.mjs +150 -0
  44. package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.d.ts +46 -0
  45. package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.mjs +45 -0
  46. package/es/components/field-transfer/components/Transfer/AdvancedTransfer.d.ts +39 -0
  47. package/es/components/field-transfer/components/Transfer/AdvancedTransfer.mjs +124 -0
  48. package/es/components/field-transfer/components/Transfer/FieldTransfer.d.ts +83 -0
  49. package/es/components/field-transfer/components/Transfer/FieldTransfer.mjs +112 -0
  50. package/es/components/field-transfer/components/Transfer/TransferTree.d.ts +62 -0
  51. package/es/components/field-transfer/components/Transfer/TransferTree.mjs +84 -0
  52. package/es/components/field-transfer/components/Transfer/TreeItem.d.ts +17 -0
  53. package/es/components/field-transfer/components/Transfer/TreeItem.mjs +25 -0
  54. package/es/components/field-transfer/components/field-transfer-modal.vue.d.ts +43 -0
  55. package/es/components/field-transfer/components/field-transfer-modal.vue.mjs +7 -0
  56. package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_script_setup_true_name_field-transfer-modal_lang.mjs +166 -0
  57. package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_0c9dd8a1_lang.css +5 -0
  58. package/es/components/field-transfer/components/modal-wrapper.vue.d.ts +19 -0
  59. package/es/components/field-transfer/components/modal-wrapper.vue.mjs +5 -0
  60. package/es/components/field-transfer/components/modal-wrapper.vue_vue_type_script_setup_true_name_modal-wrapper_lang.mjs +27 -0
  61. package/es/components/field-transfer/hooks/useTreeData.d.ts +139 -0
  62. package/es/components/field-transfer/hooks/useTreeData.mjs +136 -0
  63. package/es/components/field-transfer/index.d.ts +21 -0
  64. package/es/components/field-transfer/index.mjs +1 -0
  65. package/es/components/field-transfer/less/AdvancedTransfer.css +60 -0
  66. package/es/components/field-transfer/less/FieldCascader.css +57 -0
  67. package/es/components/field-transfer/less/TransferTree.css +86 -0
  68. package/es/components/field-transfer/less/TreeItem.css +29 -0
  69. package/es/components/field-transfer/useFieldTransfer.d.ts +47 -0
  70. package/es/components/field-transfer/useFieldTransfer.mjs +48 -0
  71. package/es/components/field-transfer/utils/tree-tool.d.ts +6 -0
  72. package/es/components/field-transfer/utils/tree-tool.mjs +62 -0
  73. package/es/components/icon/downleft-icon.vue.mjs +21 -25
  74. package/es/components/icon/downleft-icon.vue_vue_type_script_lang.mjs +9 -0
  75. package/es/components/icon/downright-icon.vue.mjs +21 -25
  76. package/es/components/icon/downright-icon.vue_vue_type_script_lang.mjs +9 -0
  77. package/es/components/icon/upleft-icon.vue.mjs +21 -25
  78. package/es/components/icon/upleft-icon.vue_vue_type_script_lang.mjs +9 -0
  79. package/es/components/icon/upright-icon.vue.mjs +21 -25
  80. package/es/components/icon/upright-icon.vue_vue_type_script_lang.mjs +9 -0
  81. package/es/components/index.d.ts +3 -0
  82. package/es/components/index.mjs +23 -25
  83. package/es/components/mobile-container/mobile-container.d.ts +3 -0
  84. package/es/components/mobile-container/mobile-container.mjs +39 -78
  85. package/es/components/modal-name-editor/modal-name-editor.d.ts +2 -2
  86. package/es/components/modal-name-editor/modal-name-editor.mjs +132 -171
  87. package/es/components/user-occupy/index.d.ts +4 -0
  88. package/es/components/user-occupy/index.mjs +3 -0
  89. package/es/components/user-occupy/occupy.const.d.ts +4 -0
  90. package/es/components/user-occupy/occupy.const.mjs +7 -0
  91. package/es/components/user-occupy/useUserOccupy.d.ts +38 -0
  92. package/es/components/user-occupy/useUserOccupy.mjs +162 -0
  93. package/es/components/user-occupy/user-lock.vue.d.ts +2 -0
  94. package/es/components/user-occupy/user-lock.vue.mjs +7 -0
  95. package/es/components/user-occupy/user-lock.vue_vue_type_script_setup_true_lang.mjs +16 -0
  96. package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_b40d46ff_lang.css +29 -0
  97. package/es/components/user-occupy/user-occupy.vue.d.ts +2 -0
  98. package/es/components/user-occupy/user-occupy.vue.mjs +7 -0
  99. package/es/components/user-occupy/user-occupy.vue_vue_type_script_setup_true_lang.mjs +34 -0
  100. package/es/components/user-occupy/user-occupy.vue_vue_type_style_index_0_scoped_24cb9749_lang.css +25 -0
  101. package/es/constant/design-editor-type.mjs +53 -14
  102. package/es/constant/index.d.ts +0 -26
  103. package/es/constant/index.mjs +241 -72
  104. package/es/constant/page-designer.d.ts +1 -12
  105. package/es/constant/page-designer.mjs +58 -51
  106. package/es/create-app-vue.d.ts +8 -0
  107. package/es/create-app-vue.mjs +13 -0
  108. package/es/data/design-container-node/design-container-node.d.ts +1 -1
  109. package/es/data/design-container-node/design-container-node.mjs +15 -5
  110. package/es/data/design-editor-node/design-editor-node.d.ts +1 -1
  111. package/es/data/design-editor-node/design-editor-node.mjs +18 -7
  112. package/es/data/design-node/design-node.d.ts +1 -1
  113. package/es/data/design-node/design-node.mjs +60 -65
  114. package/es/data/index.mjs +3 -0
  115. package/es/hooks/design-view/constants/style-editor.const.d.ts +24 -0
  116. package/es/hooks/design-view/constants/style-editor.const.mjs +63 -0
  117. package/es/hooks/design-view/design-state.d.ts +2586 -0
  118. package/es/hooks/design-view/design-state.mjs +103 -0
  119. package/es/hooks/design-view/designer/useDesignCache.d.ts +4 -0
  120. package/es/hooks/design-view/designer/useDesignCache.mjs +48 -0
  121. package/es/hooks/design-view/designer/useDesignHistory.d.ts +16 -0
  122. package/es/hooks/design-view/designer/useDesignHistory.mjs +110 -0
  123. package/es/hooks/design-view/designer/useDesignModal.d.ts +3150 -0
  124. package/es/hooks/design-view/designer/useDesignModal.mjs +109 -0
  125. package/es/hooks/design-view/designer/useDesignPreview.d.ts +11 -0
  126. package/es/hooks/design-view/designer/useDesignPreview.mjs +117 -0
  127. package/es/hooks/design-view/designer/useDesignSave.d.ts +12 -0
  128. package/es/hooks/design-view/designer/useDesignSave.mjs +225 -0
  129. package/es/hooks/design-view/{usePropEditor.d.ts → editor/usePropEditor.d.ts} +3 -3
  130. package/es/hooks/design-view/editor/usePropEditor.mjs +93 -0
  131. package/es/hooks/design-view/{useStyle.d.ts → editor/useStyle.d.ts} +2 -2
  132. package/es/hooks/design-view/editor/useStyle.mjs +39 -0
  133. package/es/hooks/design-view/editor/useStyleEditor.d.ts +30 -0
  134. package/es/hooks/design-view/editor/useStyleEditor.mjs +84 -0
  135. package/es/hooks/design-view/{useGlobal.d.ts → global/useGlobal.d.ts} +200 -108
  136. package/es/hooks/design-view/global/useGlobal.mjs +77 -0
  137. package/es/hooks/design-view/{useScope.d.ts → layout/useScope.d.ts} +3 -3
  138. package/es/hooks/design-view/layout/useScope.mjs +83 -0
  139. package/es/hooks/design-view/{useToolkit.d.ts → layout/useToolkit.d.ts} +63 -33
  140. package/es/hooks/design-view/layout/useToolkit.mjs +304 -0
  141. package/es/hooks/design-view/{usePage.d.ts → page/usePage.d.ts} +1 -3
  142. package/es/hooks/design-view/page/usePage.mjs +161 -0
  143. package/es/hooks/design-view/page/usePageOccupy.d.ts +33 -0
  144. package/es/hooks/design-view/page/usePageOccupy.mjs +98 -0
  145. package/es/hooks/design-view/useDesigner.d.ts +1651 -337
  146. package/es/hooks/design-view/useDesigner.mjs +123 -819
  147. package/es/hooks/design-view/utils/color.util.d.ts +21 -0
  148. package/es/hooks/design-view/utils/color.util.mjs +56 -0
  149. package/es/hooks/design-view/utils/field-schema.util.d.ts +55 -0
  150. package/es/hooks/design-view/utils/field-schema.util.mjs +93 -0
  151. package/es/hooks/design-view/widget/useSelectedWidget.d.ts +53 -0
  152. package/es/hooks/design-view/widget/useSelectedWidget.mjs +228 -0
  153. package/es/hooks/design-view/{useWidget.d.ts → widget/useWidget.d.ts} +12 -13
  154. package/es/hooks/design-view/widget/useWidget.mjs +97 -0
  155. package/es/hooks/design-view/widget/useWidgetQuery.d.ts +13 -0
  156. package/es/hooks/design-view/widget/useWidgetQuery.mjs +106 -0
  157. package/es/hooks/design-view/widget/useWidgetRegistry.d.ts +11 -0
  158. package/es/hooks/design-view/widget/useWidgetRegistry.mjs +89 -0
  159. package/es/hooks/designer.hooks.mjs +17 -11
  160. package/es/hooks/develop/useCacheHistory.mjs +129 -152
  161. package/es/hooks/develop/useKeyParser.mjs +76 -68
  162. package/es/hooks/index.d.ts +22 -11
  163. package/es/hooks/index.mjs +28 -0
  164. package/es/hooks/use-model-field/use-model-field.d.ts +32 -0
  165. package/es/hooks/use-model-field/use-model-field.mjs +269 -0
  166. package/es/hooks/widgets/useAsyncFields.d.ts +17 -0
  167. package/es/hooks/widgets/useAsyncFields.mjs +143 -0
  168. package/es/hooks/widgets/useFileAttrsHooks.d.ts +28 -0
  169. package/es/hooks/widgets/useFileAttrsHooks.mjs +37 -0
  170. package/es/index.d.ts +3 -8
  171. package/es/index.mjs +95 -52
  172. package/es/interface/actions/i-design-view.actions.d.ts +1 -1
  173. package/es/interface/controller/i-design-view.controller.d.ts +1 -1
  174. package/es/interface/design/i-model-field-node-data/i-model-field-node-data.d.ts +1 -1
  175. package/es/interface/design/index.d.ts +0 -8
  176. package/es/interface/designer/i-designer-provider.d.ts +2 -85
  177. package/es/interface/designer/i-designer-state.d.ts +14 -0
  178. package/es/interface/designer/index.d.ts +0 -2
  179. package/es/interface/i-drag-item/i-drag-item.d.ts +1 -1
  180. package/es/interface/index.d.ts +0 -2
  181. package/es/interface/state/i-design-view.state.d.ts +1 -1
  182. package/es/loader.d.ts +1 -0
  183. package/es/props/index.d.ts +1 -1
  184. package/es/props/index.mjs +55 -52
  185. package/es/register/designer-register/designer-register.d.ts +29 -0
  186. package/es/register/designer-register/designer-register.mjs +111 -66
  187. package/es/register/index.d.ts +0 -1
  188. package/es/register/index.mjs +2 -0
  189. package/es/register/material/material.register.mjs +131 -133
  190. package/es/schema/begin-drag/begin-drag.d.ts +13 -0
  191. package/es/schema/begin-drag/begin-drag.mjs +108 -0
  192. package/es/schema/common-config/autofill-editor-config.d.ts +5 -0
  193. package/es/schema/common-config/autofill-editor-config.mjs +34 -0
  194. package/es/schema/common-config/base-button-config.d.ts +3 -0
  195. package/es/schema/common-config/base-button-config.mjs +76 -0
  196. package/es/schema/common-config/button-editor-config.d.ts +4 -0
  197. package/es/schema/common-config/button-editor-config.mjs +134 -0
  198. package/es/schema/common-config/button-props-func.d.ts +5 -0
  199. package/es/schema/common-config/button-props-func.mjs +11 -0
  200. package/es/schema/common-config/column-editor-config.d.ts +6 -0
  201. package/es/schema/common-config/column-editor-config.mjs +28 -0
  202. package/es/schema/common-config/common-event-config.d.ts +6 -0
  203. package/es/schema/common-config/common-event-config.mjs +16 -0
  204. package/es/schema/common-config/common-field-editor-config.d.ts +49 -0
  205. package/es/schema/common-config/common-field-editor-config.mjs +292 -0
  206. package/es/schema/common-config/common-style.d.ts +3 -0
  207. package/es/schema/common-config/common-style.mjs +85 -0
  208. package/es/schema/common-config/display-editor-config.d.ts +3 -0
  209. package/es/schema/common-config/display-editor-config.mjs +70 -0
  210. package/es/schema/common-config/formItem-editor-config.d.ts +2 -0
  211. package/es/schema/common-config/formItem-editor-config.mjs +20 -0
  212. package/es/schema/common-config/permission-editor-config.d.ts +2 -0
  213. package/es/schema/common-config/permission-editor-config.mjs +13 -0
  214. package/es/schema/field/card-list-field.d.ts +4 -0
  215. package/es/schema/field/card-list-field.mjs +269 -0
  216. package/es/schema/field/data-table-column.d.ts +81 -0
  217. package/es/schema/field/data-table-column.mjs +269 -0
  218. package/es/schema/field/descriptions-field.d.ts +3 -0
  219. package/es/schema/field/index.d.ts +14 -0
  220. package/es/schema/field/index.mjs +65 -0
  221. package/es/schema/index.d.ts +18 -0
  222. package/es/schema/index.mjs +17 -0
  223. package/es/schema/modal/modal-body.d.ts +2 -0
  224. package/es/schema/modal/modal-body.mjs +9 -0
  225. package/es/schema/modal/modal-footer.d.ts +2 -0
  226. package/es/schema/modal/modal-footer.mjs +9 -0
  227. package/es/schema/modal/modal.d.ts +8 -0
  228. package/es/schema/modal/modal.mjs +173 -0
  229. package/es/schema/search/BaseDate.d.ts +143 -0
  230. package/es/schema/search/BaseDate.mjs +114 -0
  231. package/es/schema/search/BaseSearch.d.ts +141 -0
  232. package/es/schema/search/BaseSearch.mjs +155 -0
  233. package/es/schema/utils.d.ts +8 -0
  234. package/es/schema/utils.mjs +76 -0
  235. package/es/setup-app.d.ts +1 -0
  236. package/es/setup-app.mjs +11 -0
  237. package/es/utils/design-interceptors/design-interceptors.d.ts +8 -0
  238. package/es/utils/design-interceptors/design-interceptors.mjs +23 -0
  239. package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.d.ts +28 -0
  240. package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.mjs +57 -0
  241. package/es/utils/design-view/index.d.ts +9 -0
  242. package/es/utils/design-view/index.mjs +20 -0
  243. package/es/utils/field-attrs/basicAttrs.mjs +577 -721
  244. package/es/utils/field-attrs/index.mjs +10 -6
  245. package/es/utils/field-filter/index.d.ts +4 -0
  246. package/es/utils/field-filter/index.mjs +68 -0
  247. package/es/utils/find-deep-types/find-deep-types.mjs +34 -24
  248. package/es/utils/flatten.d.ts +12 -0
  249. package/es/utils/flatten.mjs +32 -0
  250. package/es/utils/formula-editor-design/formula-editor-design.d.ts +9 -0
  251. package/es/utils/formula-editor-design/formula-editor-design.mjs +31 -0
  252. package/es/utils/index.d.ts +10 -4
  253. package/es/utils/index.mjs +13 -0
  254. package/es/utils/init-widget-info/init-widget-info.d.ts +16 -0
  255. package/es/utils/init-widget-info/init-widget-info.mjs +53 -0
  256. package/es/utils/schema/index.d.ts +10 -0
  257. package/es/utils/schema/index.mjs +18 -0
  258. package/es/utils/transform-js/index.d.ts +1 -0
  259. package/es/utils/transform-js/index.mjs +1 -0
  260. package/es/utils/transform-js/transform-js.d.ts +14 -0
  261. package/es/utils/transform-js/transform-js.mjs +76 -0
  262. package/package.json +27 -18
  263. package/dist/index.esm.min.mjs +0 -25068
  264. package/dist/index.min.cjs +0 -70
  265. package/dist/index.system.min.js +0 -70
  266. package/es/components/design/design-content/design-content.css +0 -76
  267. package/es/components/design/design-content/design-content.d.ts +0 -191
  268. package/es/components/design/design-content/design-content.mjs +0 -361
  269. package/es/components/design/design-drag-item/design-drag-item.css +0 -179
  270. package/es/components/design/design-drag-item/design-drag-item.d.ts +0 -55
  271. package/es/components/design/design-drag-item/design-drag-item.mjs +0 -293
  272. package/es/components/design/design-drop-container/design-drop-container.css +0 -103
  273. package/es/components/design/design-drop-container/design-drop-container.d.ts +0 -87
  274. package/es/components/design/design-drop-container/design-drop-container.mjs +0 -217
  275. package/es/components/design/design-drop-line/design-drop-line.css +0 -165
  276. package/es/components/design/design-drop-line/design-drop-line.d.ts +0 -72
  277. package/es/components/design/design-drop-line/design-drop-line.mjs +0 -174
  278. package/es/components/design/design-item-actions/design-item-actions.css +0 -97
  279. package/es/components/design/design-item-actions/design-item-actions.d.ts +0 -42
  280. package/es/components/design/design-item-actions/design-item-actions.mjs +0 -195
  281. package/es/components/design/design-item-highlighter/design-item-highlighter.css +0 -70
  282. package/es/components/design/design-item-highlighter/design-item-highlighter.d.ts +0 -168
  283. package/es/components/design/design-item-highlighter/design-item-highlighter.mjs +0 -164
  284. package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.css +0 -85
  285. package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.d.ts +0 -53
  286. package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.mjs +0 -223
  287. package/es/components/design/design-item-hover-title/design-item-hover-title.css +0 -12
  288. package/es/components/design/design-item-hover-title/design-item-hover-title.d.ts +0 -60
  289. package/es/components/design/design-item-hover-title/design-item-hover-title.mjs +0 -74
  290. package/es/components/design/design-item-preview/design-item-preview.css +0 -91
  291. package/es/components/design/design-item-preview/design-item-preview.d.ts +0 -1
  292. package/es/components/design/design-item-preview/design-item-preview.mjs +0 -50
  293. package/es/components/design/design-not-drag-item/design-not-drag-item.css +0 -67
  294. package/es/components/design/design-not-drag-item/design-not-drag-item.d.ts +0 -49
  295. package/es/components/design/design-not-drag-item/design-not-drag-item.mjs +0 -85
  296. package/es/components/design/design-not-found/design-not-found.css +0 -68
  297. package/es/components/design/design-not-found/design-not-found.d.ts +0 -14
  298. package/es/components/design/design-not-found/design-not-found.mjs +0 -26
  299. package/es/components/design/index.d.ts +0 -6
  300. package/es/components/design/index.mjs +0 -22
  301. package/es/components/design-view-layout/design-view-layout.module.scss.mjs +0 -27
  302. package/es/components/editor/style/border-editor/border-box.vue2.mjs +0 -305
  303. package/es/components/editor/style/border-editor/border-editor.vue2.mjs +0 -60
  304. package/es/components/editor/style/border-editor/border-radius.vue2.mjs +0 -212
  305. package/es/components/editor/style/font-editor/align-group.vue2.mjs +0 -66
  306. package/es/components/editor/style/font-editor/font-editor.vue2.mjs +0 -5
  307. package/es/components/editor/style/font-editor/font-style-group.vue2.mjs +0 -105
  308. package/es/components/editor/style/position-editor/position-editor.vue2.mjs +0 -242
  309. package/es/components/editor/style/spacing-editor/spacing-editor.vue2.mjs +0 -311
  310. package/es/components/icon/downleft-icon.vue2.mjs +0 -11
  311. package/es/components/icon/downright-icon.vue2.mjs +0 -11
  312. package/es/components/icon/upleft-icon.vue2.mjs +0 -11
  313. package/es/components/icon/upright-icon.vue2.mjs +0 -11
  314. package/es/components/material/index.d.ts +0 -5
  315. package/es/components/material/index.mjs +0 -9
  316. package/es/components/material/material-content/material-content.css +0 -86
  317. package/es/components/material/material-content/material-content.d.ts +0 -179
  318. package/es/components/material/material-content/material-content.mjs +0 -59
  319. package/es/components/material/material-module/material-module.css +0 -104
  320. package/es/components/material/material-module/material-module.d.ts +0 -68
  321. package/es/components/material/material-module/material-module.mjs +0 -108
  322. package/es/components/material/material-module-drag-container/material-module-drag-container.css +0 -69
  323. package/es/components/material/material-module-drag-container/material-module-drag-container.d.ts +0 -58
  324. package/es/components/material/material-module-drag-container/material-module-drag-container.mjs +0 -32
  325. package/es/components/material/material-module-drag-item/material-module-drag-item.css +0 -83
  326. package/es/components/material/material-module-drag-item/material-module-drag-item.d.ts +0 -17
  327. package/es/components/material/material-module-drag-item/material-module-drag-item.mjs +0 -101
  328. package/es/components/material/material-outline-tree/material-outline-tree.css +0 -81
  329. package/es/components/material/material-outline-tree/material-outline-tree.d.ts +0 -1
  330. package/es/components/material/material-outline-tree/material-outline-tree.mjs +0 -87
  331. package/es/components/material/material-tab-pane/material-tab-pane.css +0 -68
  332. package/es/components/material/material-tab-pane/material-tab-pane.d.ts +0 -13
  333. package/es/components/material/material-tab-pane/material-tab-pane.mjs +0 -26
  334. package/es/components/material/material-tabs/material-tabs.css +0 -105
  335. package/es/components/material/material-tabs/material-tabs.d.ts +0 -99
  336. package/es/components/material/material-tabs/material-tabs.mjs +0 -69
  337. package/es/components/panel/index.d.ts +0 -5
  338. package/es/components/panel/index.mjs +0 -9
  339. package/es/components/panel/panel-content/panel-content.css +0 -183
  340. package/es/components/panel/panel-content/panel-content.d.ts +0 -19
  341. package/es/components/panel/panel-content/panel-content.mjs +0 -71
  342. package/es/components/panel/panel-form/panel-form.css +0 -67
  343. package/es/components/panel/panel-form/panel-form.d.ts +0 -62
  344. package/es/components/panel/panel-form/panel-form.mjs +0 -73
  345. package/es/components/panel/panel-path/panel-path.css +0 -89
  346. package/es/components/panel/panel-path/panel-path.d.ts +0 -35
  347. package/es/components/panel/panel-path/panel-path.mjs +0 -72
  348. package/es/controller/index.d.ts +0 -1
  349. package/es/controller/view/design-view.controller.d.ts +0 -47
  350. package/es/controller/view/design-view.controller.mjs +0 -184
  351. package/es/dictionary/tab-type/tab-type.mjs +0 -24
  352. package/es/editor/child-list-editor/child-list-editor.css +0 -76
  353. package/es/editor/child-list-editor/child-list-editor.d.ts +0 -163
  354. package/es/editor/child-list-editor/child-list-editor.mjs +0 -143
  355. package/es/editor/child-list-editor/child-list-editor.provider.d.ts +0 -13
  356. package/es/editor/child-list-editor/child-list-editor.provider.mjs +0 -5
  357. package/es/editor/child-list-editor/components/child-list-item-editor.css +0 -112
  358. package/es/editor/child-list-editor/components/child-list-item-editor.d.ts +0 -133
  359. package/es/editor/child-list-editor/components/child-list-item-editor.mjs +0 -238
  360. package/es/editor/child-list-editor/index.d.ts +0 -4
  361. package/es/editor/child-list-editor/index.mjs +0 -13
  362. package/es/editor/content-tag-style/content-tag-style.css +0 -164
  363. package/es/editor/content-tag-style/content-tag-style.d.ts +0 -112
  364. package/es/editor/content-tag-style/content-tag-style.mjs +0 -103
  365. package/es/editor/content-tag-style/index.d.ts +0 -8
  366. package/es/editor/content-tag-style/index.mjs +0 -15
  367. package/es/editor/custom-exp-menu-editor/components/custom-exp-menu-item.css +0 -156
  368. package/es/editor/custom-exp-menu-editor/components/custom-exp-menu-item.d.ts +0 -29
  369. package/es/editor/custom-exp-menu-editor/components/custom-exp-menu-item.mjs +0 -134
  370. package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.css +0 -76
  371. package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.d.ts +0 -38
  372. package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.mjs +0 -163
  373. package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.provider.d.ts +0 -13
  374. package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.provider.mjs +0 -5
  375. package/es/editor/custom-exp-menu-editor/i-custom-exp-menu-model.d.ts +0 -23
  376. package/es/editor/custom-exp-menu-editor/index.d.ts +0 -5
  377. package/es/editor/custom-exp-menu-editor/index.mjs +0 -13
  378. package/es/editor/custom-exp-menu-editor/modal/exp-menu.modal.d.ts +0 -37
  379. package/es/editor/field-info-editor/field-info-editor.css +0 -125
  380. package/es/editor/field-info-editor/field-info-editor.d.ts +0 -111
  381. package/es/editor/field-info-editor/field-info-editor.mjs +0 -60
  382. package/es/editor/field-info-editor/index.d.ts +0 -8
  383. package/es/editor/field-info-editor/index.mjs +0 -13
  384. package/es/editor/index.d.ts +0 -5
  385. package/es/editor/index.mjs +0 -27
  386. package/es/editor/model-field-select/index.d.ts +0 -8
  387. package/es/editor/model-field-select/index.mjs +0 -13
  388. package/es/editor/model-field-select/model-field-select.css +0 -141
  389. package/es/editor/model-field-select/model-field-select.d.ts +0 -42
  390. package/es/editor/model-field-select/model-field-select.mjs +0 -312
  391. package/es/editor/style-border/index.d.ts +0 -8
  392. package/es/editor/style-border/index.mjs +0 -15
  393. package/es/editor/style-border/style-border.d.ts +0 -38
  394. package/es/editor/style-border/style-border.mjs +0 -45
  395. package/es/editor/style-font/index.d.ts +0 -8
  396. package/es/editor/style-font/index.mjs +0 -15
  397. package/es/editor/style-font/style-font.css +0 -86
  398. package/es/editor/style-font/style-font.d.ts +0 -38
  399. package/es/editor/style-font/style-font.mjs +0 -45
  400. package/es/editor/style-position/index.d.ts +0 -8
  401. package/es/editor/style-position/index.mjs +0 -15
  402. package/es/editor/style-position/style-position.d.ts +0 -38
  403. package/es/editor/style-position/style-position.mjs +0 -44
  404. package/es/editor/style-spacing/index.d.ts +0 -8
  405. package/es/editor/style-spacing/index.mjs +0 -15
  406. package/es/editor/style-spacing/style-spacing.d.ts +0 -40
  407. package/es/editor/style-spacing/style-spacing.mjs +0 -69
  408. package/es/editor/system-page-select/i-system-page-select.d.ts +0 -23
  409. package/es/editor/system-page-select/index.d.ts +0 -9
  410. package/es/editor/system-page-select/index.mjs +0 -15
  411. package/es/editor/system-page-select/system-page-select.css +0 -119
  412. package/es/editor/system-page-select/system-page-select.d.ts +0 -38
  413. package/es/editor/system-page-select/system-page-select.mjs +0 -82
  414. package/es/hooks/design-view/getFieldSchema.d.ts +0 -26
  415. package/es/hooks/design-view/getFieldSchema.mjs +0 -78
  416. package/es/hooks/design-view/useGlobal.mjs +0 -74
  417. package/es/hooks/design-view/usePage.mjs +0 -171
  418. package/es/hooks/design-view/usePageOccupy.d.ts +0 -13
  419. package/es/hooks/design-view/usePageOccupy.mjs +0 -69
  420. package/es/hooks/design-view/usePropEditor.mjs +0 -99
  421. package/es/hooks/design-view/useScope.mjs +0 -92
  422. package/es/hooks/design-view/useSelectedWidget.d.ts +0 -53
  423. package/es/hooks/design-view/useSelectedWidget.mjs +0 -249
  424. package/es/hooks/design-view/useStyle.mjs +0 -30
  425. package/es/hooks/design-view/useStyleEditor.d.ts +0 -27
  426. package/es/hooks/design-view/useToolkit.mjs +0 -299
  427. package/es/hooks/design-view/useWidget.mjs +0 -124
  428. package/es/hooks/use-design-view-controller/use-design-view-controller.d.ts +0 -11
  429. package/es/hooks/use-design-view-controller/use-design-view-controller.mjs +0 -26
  430. package/es/hooks/web/useUUid.d.ts +0 -41
  431. package/es/hooks/web/useUUid.mjs +0 -93
  432. package/es/interface/design/i-design-container-node.d.ts +0 -13
  433. package/es/interface/design/i-design-data.d.ts +0 -44
  434. package/es/interface/design/i-design-editor-data.d.ts +0 -20
  435. package/es/interface/design/i-design-editor-node.d.ts +0 -15
  436. package/es/interface/design/i-design-node-data.d.ts +0 -19
  437. package/es/interface/design/i-design-node.d.ts +0 -80
  438. package/es/interface/design/i-design-page-node-data.d.ts +0 -15
  439. package/es/interface/design/i-design-tree-item.d.ts +0 -26
  440. package/es/interface/designer/i-designer-dnd-item-hooks.d.ts +0 -21
  441. package/es/interface/designer/i-designer-schema-exports.d.ts +0 -13
  442. package/es/interface/editor/child-list-editor/child-list-editor.d.ts +0 -114
  443. package/es/interface/editor/index.d.ts +0 -9
  444. package/es/interface/editor/style-border/i-style-border.controller.d.ts +0 -11
  445. package/es/interface/editor/style-border/i-style-border.d.ts +0 -22
  446. package/es/interface/editor/style-font/i-style-font.controller.d.ts +0 -11
  447. package/es/interface/editor/style-font/i-style-font.d.ts +0 -13
  448. package/es/interface/editor/style-position/i-style-position.controller.d.ts +0 -11
  449. package/es/interface/editor/style-position/i-style-position.d.ts +0 -13
  450. package/es/interface/editor/style-spacing/i-style-spacing.controller.d.ts +0 -11
  451. package/es/interface/editor/style-spacing/i-style-spacing.d.ts +0 -22
  452. package/es/interface/provider/i-node-provider.d.ts +0 -142
  453. package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu-component.css +0 -87
  454. package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu.component.d.ts +0 -9
  455. package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu.component.mjs +0 -106
  456. package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.data.d.ts +0 -51
  457. package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.data.mjs +0 -89
  458. package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.provider.d.ts +0 -23
  459. package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.provider.mjs +0 -159
  460. package/es/plugins/design-editor/index.d.ts +0 -5
  461. package/es/plugins/design-editor/index.mjs +0 -13
  462. package/es/plugins/design-editor/upload-file/index.d.ts +0 -4
  463. package/es/plugins/design-editor/upload-file/index.mjs +0 -12
  464. package/es/plugins/design-editor/upload-file/upload-file.css +0 -124
  465. package/es/plugins/design-editor/upload-file/upload-file.d.ts +0 -46
  466. package/es/plugins/design-editor/upload-file/upload-file.mjs +0 -51
  467. package/es/plugins/design-editor/upload-image/index.d.ts +0 -4
  468. package/es/plugins/design-editor/upload-image/index.mjs +0 -12
  469. package/es/plugins/design-editor/upload-image/upload-image.css +0 -79
  470. package/es/plugins/design-editor/upload-image/upload-image.d.ts +0 -46
  471. package/es/plugins/design-editor/upload-image/upload-image.mjs +0 -23
  472. package/es/plugins/design-editor/user-signature/index.d.ts +0 -4
  473. package/es/plugins/design-editor/user-signature/index.mjs +0 -12
  474. package/es/plugins/design-editor/user-signature/user-signature.css +0 -79
  475. package/es/plugins/design-editor/user-signature/user-signature.d.ts +0 -46
  476. package/es/plugins/design-editor/user-signature/user-signature.mjs +0 -23
  477. package/es/plugins/design-grid/components/design-grid.component.css +0 -68
  478. package/es/plugins/design-grid/components/design-grid.component.d.ts +0 -39
  479. package/es/plugins/design-grid/components/design-grid.component.mjs +0 -57
  480. package/es/plugins/design-grid/design-grid.data.d.ts +0 -34
  481. package/es/plugins/design-grid/design-grid.data.mjs +0 -17
  482. package/es/plugins/design-grid/design-grid.provider.d.ts +0 -26
  483. package/es/plugins/design-grid/design-grid.provider.mjs +0 -240
  484. package/es/plugins/design-grid-item/components/design-grid-item.component.d.ts +0 -38
  485. package/es/plugins/design-grid-item/components/design-grid-item.component.mjs +0 -36
  486. package/es/plugins/design-grid-item/design-grid-item.data.d.ts +0 -26
  487. package/es/plugins/design-grid-item/design-grid-item.data.mjs +0 -17
  488. package/es/plugins/design-grid-item/design-grid-item.provider.d.ts +0 -25
  489. package/es/plugins/design-grid-item/design-grid-item.provider.mjs +0 -172
  490. package/es/plugins/design-menu-list/components/design-menu-list.component.css +0 -131
  491. package/es/plugins/design-menu-list/components/design-menu-list.component.d.ts +0 -18
  492. package/es/plugins/design-menu-list/components/design-menu-list.component.mjs +0 -110
  493. package/es/plugins/design-menu-list/design-menu-list.data.d.ts +0 -62
  494. package/es/plugins/design-menu-list/design-menu-list.data.mjs +0 -21
  495. package/es/plugins/design-menu-list/design-menu-list.provider.d.ts +0 -23
  496. package/es/plugins/design-menu-list/design-menu-list.provider.mjs +0 -265
  497. package/es/plugins/design-page/design-page.data.d.ts +0 -15
  498. package/es/plugins/design-page/design-page.data.mjs +0 -17
  499. package/es/plugins/design-page/design-page.provider.d.ts +0 -23
  500. package/es/plugins/design-page/design-page.provider.mjs +0 -109
  501. package/es/plugins/design-panel/components/design-panel-component.css +0 -108
  502. package/es/plugins/design-panel/components/design-panel.component.d.ts +0 -39
  503. package/es/plugins/design-panel/components/design-panel.component.mjs +0 -49
  504. package/es/plugins/design-panel/design-panel.data.d.ts +0 -64
  505. package/es/plugins/design-panel/design-panel.data.mjs +0 -27
  506. package/es/plugins/design-panel/design-panel.provider.d.ts +0 -23
  507. package/es/plugins/design-panel/design-panel.provider.mjs +0 -298
  508. package/es/plugins/design-personal-center/components/design-personal-center.component.css +0 -48
  509. package/es/plugins/design-personal-center/components/design-personal-center.component.vue.d.ts +0 -36
  510. package/es/plugins/design-personal-center/components/design-personal-center.component.vue.mjs +0 -7
  511. package/es/plugins/design-personal-center/components/design-personal-center.component.vue2.mjs +0 -97
  512. package/es/plugins/design-personal-center/design-personal-center.data.d.ts +0 -27
  513. package/es/plugins/design-personal-center/design-personal-center.data.mjs +0 -21
  514. package/es/plugins/design-personal-center/design-personal-center.provider.d.ts +0 -13
  515. package/es/plugins/design-personal-center/design-personal-center.provider.mjs +0 -144
  516. package/es/plugins/design-select-component/components/design-select-component.component.css +0 -107
  517. package/es/plugins/design-select-component/components/design-select-component.component.d.ts +0 -41
  518. package/es/plugins/design-select-component/components/design-select-component.component.mjs +0 -57
  519. package/es/plugins/design-select-component/design-select-component.data.d.ts +0 -57
  520. package/es/plugins/design-select-component/design-select-component.data.mjs +0 -18
  521. package/es/plugins/design-select-component/design-select-component.provider.d.ts +0 -23
  522. package/es/plugins/design-select-component/design-select-component.provider.mjs +0 -207
  523. package/es/plugins/design-tab-item/components/design-tab-item.component.d.ts +0 -38
  524. package/es/plugins/design-tab-item/components/design-tab-item.component.mjs +0 -36
  525. package/es/plugins/design-tab-item/design-tab-item.data.d.ts +0 -35
  526. package/es/plugins/design-tab-item/design-tab-item.data.mjs +0 -22
  527. package/es/plugins/design-tab-item/design-tab-item.provider.d.ts +0 -25
  528. package/es/plugins/design-tab-item/design-tab-item.provider.mjs +0 -185
  529. package/es/plugins/design-tabs/components/design-tabs.component.css +0 -105
  530. package/es/plugins/design-tabs/components/design-tabs.component.d.ts +0 -40
  531. package/es/plugins/design-tabs/components/design-tabs.component.mjs +0 -82
  532. package/es/plugins/design-tabs/design-tabs.data.d.ts +0 -66
  533. package/es/plugins/design-tabs/design-tabs.data.mjs +0 -19
  534. package/es/plugins/design-tabs/design-tabs.provider.d.ts +0 -26
  535. package/es/plugins/design-tabs/design-tabs.provider.mjs +0 -261
  536. package/es/plugins/index.d.ts +0 -5
  537. package/es/plugins/index.mjs +0 -116
  538. package/es/plugins/install-material.d.ts +0 -8
  539. package/es/plugins/install-material.mjs +0 -55
  540. package/es/provider/design-editor-node/design-editor-node.provider.d.ts +0 -40
  541. package/es/provider/design-editor-node/design-editor-node.provider.mjs +0 -44
  542. package/es/provider/index.d.ts +0 -2
  543. package/es/provider/node-base/node-base.provider.d.ts +0 -25
  544. package/es/provider/node-base/node-base.provider.mjs +0 -26
  545. package/es/register/node/node.register.d.ts +0 -113
  546. package/es/register/node/node.register.mjs +0 -134
  547. package/es/store/index.d.ts +0 -1
  548. package/es/store/view/design-view.store.d.ts +0 -5
  549. package/es/store/view/design-view.store.mjs +0 -412
  550. package/es/utils/can-drop/can-drop.d.ts +0 -12
  551. package/es/utils/can-drop/can-drop.mjs +0 -56
  552. package/es/utils/design-install/design-install.d.ts +0 -16
  553. package/es/utils/design-install/design-install.mjs +0 -22
  554. package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +0 -97
  555. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +0 -266
  556. package/es/views/design-view.css +0 -218
  557. package/es/views/design-view.d.ts +0 -87
  558. package/es/views/design-view.mjs +0 -343
  559. package/es/views/index.d.ts +0 -1
  560. /package/es/components/editor/style/border-editor/{border-box.css → border-box.vue_vue_type_style_index_0_scoped_a5616984_lang.css} +0 -0
  561. /package/es/components/editor/style/border-editor/{border-editor.css → border-editor.vue_vue_type_style_index_0_scoped_f973ba6b_lang.css} +0 -0
  562. /package/es/components/editor/style/border-editor/{border-radius.css → border-radius.vue_vue_type_style_index_0_scoped_1cb5bbdc_lang.css} +0 -0
  563. /package/es/components/editor/style/font-editor/{align-group.css → align-group.vue_vue_type_style_index_0_scoped_afcacb4b_lang.css} +0 -0
  564. /package/es/components/editor/style/font-editor/{font-style-group.css → font-style-group.vue_vue_type_style_index_0_scoped_7df87cdb_lang.css} +0 -0
  565. /package/es/components/editor/style/position-editor/{position-editor.css → position-editor.vue_vue_type_style_index_0_scoped_cc7cb9d8_lang.css} +0 -0
  566. /package/es/components/editor/style/spacing-editor/{spacing-editor.css → spacing-editor.vue_vue_type_style_index_0_scoped_18c72ccf_lang.css} +0 -0
@@ -0,0 +1,13 @@
1
+ import { ComTypeMap } from '@gct-paas/schema';
2
+ import { ComputedRef } from 'vue';
3
+ export declare function useWidgetQuery(): {
4
+ allWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
5
+ allFormWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
6
+ excludeSubTableFormWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
7
+ allSubTableWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
8
+ allListWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
9
+ allTableWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
10
+ allDeptWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
11
+ allRefSelectWidget: ComputedRef<import('@gct-paas/schema').IBasicSchema[]>;
12
+ getWidgetByScope: <K extends keyof ComTypeMap>(type: K) => ComTypeMap[K][];
13
+ };
@@ -0,0 +1,106 @@
1
+ import { useScope } from "../layout/useScope.mjs";
2
+ import { FIELD_TYPE, FormComponents, TreeHelper } from "@gct-paas/core";
3
+ import { computed } from "vue";
4
+ import { getCompPos } from "@gct-paas/schema";
5
+ //#region src/hooks/design-view/widget/useWidgetQuery.ts
6
+ /**
7
+ * 组件查询 Hook
8
+ *
9
+ * 在当前作用域内查找各类型组件,提供类型安全的组件查询能力。
10
+ */
11
+ function useWidgetQuery() {
12
+ /** 获取作用域内所有组件 */
13
+ const allWidget = computed(() => {
14
+ const { scopeData } = useScope();
15
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
16
+ return !!widget;
17
+ });
18
+ });
19
+ /**
20
+ * 在作用域中找到所有Form表单
21
+ * 注:如果是模态框状态下,则查找范围应该为modalBody+modalFooter 因为footer中的按钮需要关联到body中的表单
22
+ */
23
+ const allFormWidget = computed(() => {
24
+ const { scopeData } = useScope();
25
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
26
+ return [
27
+ FormComponents.Form,
28
+ FormComponents.RdoForm,
29
+ FormComponents.MedProRdoForm,
30
+ FormComponents.FormProcess
31
+ ].includes(widget.type);
32
+ });
33
+ });
34
+ /** 排除子表的表单 */
35
+ const excludeSubTableFormWidget = computed(() => {
36
+ const { scopeData } = useScope();
37
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
38
+ if ([
39
+ FormComponents.RdoForm,
40
+ FormComponents.MedProRdoForm,
41
+ FormComponents.FormProcess
42
+ ].includes(widget.type)) return true;
43
+ return widget.type === FormComponents.Form && !getCompPos(widget, FIELD_TYPE.MASTERSLAVE, FormComponents.Form);
44
+ });
45
+ });
46
+ /** 所有子表组件 */
47
+ const allSubTableWidget = computed(() => {
48
+ const { scopeData } = useScope();
49
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
50
+ return widget.type === FormComponents.SubTable;
51
+ });
52
+ });
53
+ /** 所有列表包括rdo的 */
54
+ const allListWidget = computed(() => {
55
+ const { scopeData } = useScope();
56
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
57
+ return widget.type === FormComponents.DataList || widget.type === FormComponents.RdoDataList;
58
+ });
59
+ });
60
+ /** 所有表格组件 */
61
+ const allTableWidget = computed(() => {
62
+ const { scopeData } = useScope();
63
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
64
+ return widget.type === FormComponents.DataTable || widget.type === FormComponents.DataVTable || widget.type === FormComponents.RefDataTable;
65
+ });
66
+ });
67
+ /** 所有部门组件 */
68
+ const allDeptWidget = computed(() => {
69
+ const { scopeData } = useScope();
70
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
71
+ return widget.type === FormComponents.Department;
72
+ });
73
+ });
74
+ /** 所有引用选择组件 */
75
+ const allRefSelectWidget = computed(() => {
76
+ const { scopeData } = useScope();
77
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
78
+ return widget.type === FormComponents.Select && widget.props.fieldType === FIELD_TYPE.REF;
79
+ });
80
+ });
81
+ /**
82
+ * 在作用域中找到所需要的组件类型
83
+ *
84
+ * @param {K} type 组件类型
85
+ * @returns {ComTypeMap[K][]} 查找结果
86
+ */
87
+ function getWidgetByScope(type) {
88
+ const { scopeData } = useScope();
89
+ return TreeHelper.findNodeAll(scopeData.value, (widget) => {
90
+ return widget.type === type;
91
+ });
92
+ }
93
+ return {
94
+ allWidget,
95
+ allFormWidget,
96
+ excludeSubTableFormWidget,
97
+ allSubTableWidget,
98
+ allListWidget,
99
+ allTableWidget,
100
+ allDeptWidget,
101
+ allRefSelectWidget,
102
+ getWidgetByScope
103
+ };
104
+ }
105
+ //#endregion
106
+ export { useWidgetQuery };
@@ -0,0 +1,11 @@
1
+ import { IDesignerItemHooks, LowCodeWidget } from '@gct-paas/schema';
2
+ import { Component } from 'vue';
3
+ export declare function useWidgetRegistry(): {
4
+ getAsyncWidget: (widget: string | LowCodeWidget.BasicSchema) => Component | undefined;
5
+ getWidgetHooks: (type: string) => IDesignerItemHooks;
6
+ widgetEntry: import('vue').ComputedRef<string>;
7
+ pluginConfigs: import('vue').ComputedRef<IObject[]>;
8
+ getWhiteList: (type: string) => (string | RegExp)[];
9
+ getBlackList: (type: string) => (string | RegExp)[];
10
+ setPluginConfigs: (configs: IObject[]) => void;
11
+ };
@@ -0,0 +1,89 @@
1
+ import { designRegister, platform } from "../../../utils/design-view/index.mjs";
2
+ import { pluginConfigs, widgetInfo } from "../design-state.mjs";
3
+ import { Platform } from "@gct-paas/core";
4
+ import { computed } from "vue";
5
+ //#region src/hooks/design-view/widget/useWidgetRegistry.ts
6
+ /**
7
+ * 组件注册查询 Hook
8
+ *
9
+ * 提供设计器中异步组件获取、钩子查询、白黑名单获取等组件注册相关功能。
10
+ */
11
+ function useWidgetRegistry() {
12
+ /** 组件钩子集合 */
13
+ const allComHooks = computed(() => {
14
+ return widgetInfo.value.hooks;
15
+ });
16
+ /** 白名单集合 */
17
+ const allWhiteList = computed(() => {
18
+ return widgetInfo.value.whiteList;
19
+ });
20
+ /** 黑名单集合 */
21
+ const allBlackList = computed(() => {
22
+ return widgetInfo.value.blackList;
23
+ });
24
+ /** 插件配置(computed 包装,对外保持只读语义) */
25
+ const pluginConfigsComputed = computed(() => {
26
+ return pluginConfigs.value;
27
+ });
28
+ /**
29
+ * 设置插件配置
30
+ *
31
+ * @param {IObject[]} configs 插件配置列表
32
+ */
33
+ function setPluginConfigs(configs) {
34
+ pluginConfigs.value = configs;
35
+ }
36
+ /**
37
+ * 获取异步组件
38
+ *
39
+ * @param {string | LowCodeWidget.BasicSchema} widget 组件类型字符串或组件schema
40
+ * @returns {*} 异步组件
41
+ */
42
+ const getAsyncWidget = (widget) => {
43
+ if (typeof widget === "string") return designRegister.value.getComponentByType(widget);
44
+ if (widget._plugin) return designRegister.value.getComponentByPluginTag(widget._plugin.key);
45
+ return designRegister.value.getComponentByType(widget.type);
46
+ };
47
+ /**
48
+ * 获取组件拖拽钩子
49
+ *
50
+ * @param {string} type 组件类型
51
+ * @returns {*} 组件钩子
52
+ */
53
+ const getWidgetHooks = (type) => {
54
+ return allComHooks.value[type] ?? {};
55
+ };
56
+ /**
57
+ * 获取组件白名单
58
+ *
59
+ * @param {string} type 组件类型
60
+ * @returns {(string | RegExp)[]} 白名单
61
+ */
62
+ const getWhiteList = (type) => {
63
+ return allWhiteList.value[type] ?? [];
64
+ };
65
+ /**
66
+ * 获取组件黑名单
67
+ *
68
+ * @param {string} type 组件类型
69
+ * @returns {(string | RegExp)[]} 黑名单
70
+ */
71
+ const getBlackList = (type) => {
72
+ return allBlackList.value[type] ?? [];
73
+ };
74
+ return {
75
+ getAsyncWidget,
76
+ getWidgetHooks,
77
+ widgetEntry: computed(() => {
78
+ if (platform.value === Platform.MOBILE) return "widget-mobile-entry";
79
+ else if (platform.value === Platform.PAD) return "widget-pad-entry";
80
+ else return "widget-entry";
81
+ }),
82
+ pluginConfigs: pluginConfigsComputed,
83
+ getWhiteList,
84
+ getBlackList,
85
+ setPluginConfigs
86
+ };
87
+ }
88
+ //#endregion
89
+ export { useWidgetRegistry };
@@ -1,12 +1,18 @@
1
- import { SyncSeriesHook } from 'qx-util';
2
-
3
- class DesignViewHooks {
4
- /**
5
- * 触发执行设计容器扩容展示
6
- *
7
- * @static
8
- */
9
- expansion = new SyncSeriesHook();
10
- }
11
-
1
+ import { SyncSeriesHook } from "qx-util";
2
+ //#region src/hooks/designer.hooks.ts
3
+ /**
4
+ * 设计界面钩子
5
+ *
6
+ * @export
7
+ * @class DesignViewHooks
8
+ */
9
+ var DesignViewHooks = class {
10
+ /**
11
+ * 触发执行设计容器扩容展示
12
+ *
13
+ * @static
14
+ */
15
+ expansion = new SyncSeriesHook();
16
+ };
17
+ //#endregion
12
18
  export { DesignViewHooks };
@@ -1,157 +1,134 @@
1
- import { ref, unref, watch } from 'vue';
2
- import { useUUid } from '../web/useUUid.mjs';
3
-
4
- const cacheHistoryMap = ref(/* @__PURE__ */ new Map());
1
+ import { useUUid } from "@gct-paas/core";
2
+ import { ref, unref, watch } from "vue";
3
+ //#region src/hooks/develop/useCacheHistory.ts
4
+ var cacheHistoryMap = ref(/* @__PURE__ */ new Map());
5
5
  function useCacheHistory() {
6
- const historyKeys = [...unref(cacheHistoryMap).keys()];
7
- const { getUuidGenerate } = useUUid(ref([]), ref(""), {
8
- needPrefix: true,
9
- isString: false,
10
- prefix: "h_"
11
- });
12
- const uuidGenerate = getUuidGenerate(historyKeys);
13
- class historyUtils {
14
- /**
15
- * 获取唯一id
16
- */
17
- static getUniqueHistoryId() {
18
- return uuidGenerate.next();
19
- }
20
- /** 初始化 */
21
- static init(props) {
22
- if (this.isHistoryInfoExist(props.historyId)) {
23
- console.warn("唯一key重复了");
24
- return;
25
- }
26
- cacheHistoryMap.value.set(props.historyId, {
27
- pasts: [],
28
- futures: [],
29
- max: props.max ?? 30
30
- });
31
- }
32
- /** 是否存在所属唯一id的历史记录信息 */
33
- static isHistoryInfoExist(historyId) {
34
- return unref(cacheHistoryMap).has(historyId);
35
- }
36
- /** 根据唯一id获取历史记录 */
37
- static getHistoryInfo(historyId) {
38
- return unref(cacheHistoryMap).get(historyId);
39
- }
40
- /** 根据唯一id获取删除指定历史记录 */
41
- static deleteHistoryInfo(historyId) {
42
- cacheHistoryMap.value.delete(historyId);
43
- }
44
- /** 清空全部历史记录Map */
45
- static clearCacheHistory() {
46
- cacheHistoryMap.value.clear();
47
- }
48
- /** 清空全部历史记录Map */
49
- static resetHistoryById(id) {
50
- const history = historyUtils.getHistoryInfo(id);
51
- if (!history) return;
52
- history.futures.length = 0;
53
- history.pasts.length = 0;
54
- }
55
- static getCacheHistoryMap() {
56
- return cacheHistoryMap.value;
57
- }
58
- /** 新增一条历史记录到指定唯一id中 */
59
- static addHistory({
60
- historyId,
61
- replaceHistory,
62
- past
63
- }) {
64
- if (this.isHistoryInfoExist(historyId)) {
65
- const historyInfo = this.getHistoryInfo(historyId);
66
- if (!replaceHistory && historyInfo?.pasts.length > historyInfo?.max + 1) {
67
- historyInfo?.pasts.shift();
68
- }
69
- if (replaceHistory) {
70
- historyInfo?.pasts.splice(-1, 1, past);
71
- } else {
72
- historyInfo?.pasts.push(past);
73
- }
74
- historyInfo.futures.length = 0;
75
- } else {
76
- console.warn("不存在,插入历史记录失败");
77
- }
78
- }
79
- /** 撤销一条历史记录 */
80
- static undoHistory(historyId) {
81
- if (this.isHistoryInfoExist(historyId)) {
82
- const historyInfo = this.getHistoryInfo(historyId);
83
- const len = historyInfo.pasts.length;
84
- if (len > 1) {
85
- historyInfo.futures.push(historyInfo.pasts.pop());
86
- return historyInfo.pasts[historyInfo.pasts.length - 1];
87
- }
88
- } else {
89
- console.warn("不存在,撤销历史记录失败");
90
- }
91
- return null;
92
- }
93
- /** 重做一条历史记录 */
94
- static restoreHistory(historyId) {
95
- if (this.isHistoryInfoExist(historyId)) {
96
- const historyInfo = this.getHistoryInfo(historyId);
97
- const len = historyInfo.futures.length;
98
- if (len > 0) {
99
- const current = historyInfo.futures.pop();
100
- historyInfo.pasts.push(current);
101
- return current;
102
- }
103
- } else {
104
- console.warn("不存在,重做历史记录失败");
105
- }
106
- return null;
107
- }
108
- }
109
- return { historyUtils };
6
+ const historyKeys = [...unref(cacheHistoryMap).keys()];
7
+ const { getUuidGenerate } = useUUid(ref([]), ref(""), {
8
+ needPrefix: true,
9
+ isString: false,
10
+ prefix: "h_"
11
+ });
12
+ const uuidGenerate = getUuidGenerate(historyKeys);
13
+ class historyUtils {
14
+ /**
15
+ * 获取唯一id
16
+ */
17
+ static getUniqueHistoryId() {
18
+ return uuidGenerate.next();
19
+ }
20
+ /** 初始化 */
21
+ static init(props) {
22
+ if (this.isHistoryInfoExist(props.historyId)) {
23
+ console.warn("唯一key重复了");
24
+ return;
25
+ }
26
+ cacheHistoryMap.value.set(props.historyId, {
27
+ pasts: [],
28
+ futures: [],
29
+ max: props.max ?? 30
30
+ });
31
+ }
32
+ /** 是否存在所属唯一id的历史记录信息 */
33
+ static isHistoryInfoExist(historyId) {
34
+ return unref(cacheHistoryMap).has(historyId);
35
+ }
36
+ /** 根据唯一id获取历史记录 */
37
+ static getHistoryInfo(historyId) {
38
+ return unref(cacheHistoryMap).get(historyId);
39
+ }
40
+ /** 根据唯一id获取删除指定历史记录 */
41
+ static deleteHistoryInfo(historyId) {
42
+ cacheHistoryMap.value.delete(historyId);
43
+ }
44
+ /** 清空全部历史记录Map */
45
+ static clearCacheHistory() {
46
+ cacheHistoryMap.value.clear();
47
+ }
48
+ /** 清空全部历史记录Map */
49
+ static resetHistoryById(id) {
50
+ const history = historyUtils.getHistoryInfo(id);
51
+ if (!history) return;
52
+ history.futures.length = 0;
53
+ history.pasts.length = 0;
54
+ }
55
+ static getCacheHistoryMap() {
56
+ return cacheHistoryMap.value;
57
+ }
58
+ /** 新增一条历史记录到指定唯一id中 */
59
+ static addHistory({ historyId, replaceHistory, past }) {
60
+ if (this.isHistoryInfoExist(historyId)) {
61
+ const historyInfo = this.getHistoryInfo(historyId);
62
+ if (!replaceHistory && historyInfo?.pasts.length > historyInfo?.max + 1) historyInfo?.pasts.shift();
63
+ if (replaceHistory) historyInfo?.pasts.splice(-1, 1, past);
64
+ else historyInfo?.pasts.push(past);
65
+ historyInfo.futures.length = 0;
66
+ } else console.warn("不存在,插入历史记录失败");
67
+ }
68
+ /** 撤销一条历史记录 */
69
+ static undoHistory(historyId) {
70
+ if (this.isHistoryInfoExist(historyId)) {
71
+ const historyInfo = this.getHistoryInfo(historyId);
72
+ if (historyInfo.pasts.length > 1) {
73
+ historyInfo.futures.push(historyInfo.pasts.pop());
74
+ return historyInfo.pasts[historyInfo.pasts.length - 1];
75
+ }
76
+ } else console.warn("不存在,撤销历史记录失败");
77
+ return null;
78
+ }
79
+ /** 重做一条历史记录 */
80
+ static restoreHistory(historyId) {
81
+ if (this.isHistoryInfoExist(historyId)) {
82
+ const historyInfo = this.getHistoryInfo(historyId);
83
+ if (historyInfo.futures.length > 0) {
84
+ const current = historyInfo.futures.pop();
85
+ historyInfo.pasts.push(current);
86
+ return current;
87
+ }
88
+ } else console.warn("不存在,重做历史记录失败");
89
+ return null;
90
+ }
91
+ }
92
+ return { historyUtils };
110
93
  }
111
94
  function useCacheHistoryInner(props) {
112
- const { historyUtils } = useCacheHistory();
113
- const undoDisabled = ref(true);
114
- const restoreDisabled = ref(true);
115
- watch(
116
- () => historyUtils.getHistoryInfo(unref(props.historyIdRef))?.pasts,
117
- (value) => {
118
- undoDisabled.value = (unref(value) ?? []).length <= 1;
119
- },
120
- { deep: true, immediate: true }
121
- );
122
- watch(
123
- () => historyUtils.getHistoryInfo(unref(props.historyIdRef))?.futures,
124
- (value) => {
125
- restoreDisabled.value = !(unref(value) ?? []).length;
126
- },
127
- { deep: true, immediate: true }
128
- );
129
- function onUndo() {
130
- if (unref(undoDisabled)) {
131
- return;
132
- }
133
- const content = historyUtils.undoHistory(unref(props.historyIdRef));
134
- if (props.callback && typeof props.callback === "function" && content !== null) {
135
- props.callback(content);
136
- }
137
- return content;
138
- }
139
- function onRestore() {
140
- if (unref(restoreDisabled)) {
141
- return;
142
- }
143
- const content = historyUtils.restoreHistory(unref(props.historyIdRef));
144
- if (props.callback && typeof props.callback === "function" && content !== null) {
145
- props.callback(content);
146
- }
147
- return content;
148
- }
149
- return {
150
- undoDisabled,
151
- restoreDisabled,
152
- onUndo,
153
- onRestore
154
- };
95
+ const { historyUtils } = useCacheHistory();
96
+ /** 撤销状态 */
97
+ const undoDisabled = ref(true);
98
+ /** 重做状态 */
99
+ const restoreDisabled = ref(true);
100
+ watch(() => historyUtils.getHistoryInfo(unref(props.historyIdRef))?.pasts, (value) => {
101
+ undoDisabled.value = (unref(value) ?? []).length <= 1;
102
+ }, {
103
+ deep: true,
104
+ immediate: true
105
+ });
106
+ watch(() => historyUtils.getHistoryInfo(unref(props.historyIdRef))?.futures, (value) => {
107
+ restoreDisabled.value = !(unref(value) ?? []).length;
108
+ }, {
109
+ deep: true,
110
+ immediate: true
111
+ });
112
+ /** 撤销 */
113
+ function onUndo() {
114
+ if (unref(undoDisabled)) return;
115
+ const content = historyUtils.undoHistory(unref(props.historyIdRef));
116
+ if (props.callback && typeof props.callback === "function" && content !== null) props.callback(content);
117
+ return content;
118
+ }
119
+ /** 重做 */
120
+ function onRestore() {
121
+ if (unref(restoreDisabled)) return;
122
+ const content = historyUtils.restoreHistory(unref(props.historyIdRef));
123
+ if (props.callback && typeof props.callback === "function" && content !== null) props.callback(content);
124
+ return content;
125
+ }
126
+ return {
127
+ undoDisabled,
128
+ restoreDisabled,
129
+ onUndo,
130
+ onRestore
131
+ };
155
132
  }
156
-
133
+ //#endregion
157
134
  export { useCacheHistory, useCacheHistoryInner };