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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/index-BghCpvxN.js +76 -0
  2. package/dist/index-PLrMc0gl.cjs +76 -0
  3. package/dist/index-oVPMi6Ep.js +29160 -0
  4. package/dist/index.esm.min.mjs +34 -7924
  5. package/dist/index.min.cjs +1 -20
  6. package/dist/index.min.css +1 -0
  7. package/dist/index.system.min.js +1 -20
  8. package/dist/monaco-editor-B8X-ou0h.js +20245 -0
  9. package/dist/monaco-editor-Bdgpd_KL.cjs +19 -0
  10. package/dist/monaco-editor-NIWDtQNB.js +19 -0
  11. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  12. package/es/components/app-modal/app-modal-component.css +149 -0
  13. package/es/components/app-modal/app-modal-component.d.ts +26 -0
  14. package/es/components/app-modal/app-modal-component.mjs +140 -0
  15. package/es/components/assets-svg-icon/assets-svg-icon.css +188 -0
  16. package/es/components/assets-svg-icon/assets-svg-icon.d.ts +134 -0
  17. package/es/components/assets-svg-icon/assets-svg-icon.mjs +238 -0
  18. package/es/components/assets-svg-icon/request.d.ts +2 -0
  19. package/es/components/assets-svg-icon/request.mjs +51 -0
  20. package/es/components/assets-svg-icon/utils.d.ts +9 -0
  21. package/es/components/assets-svg-icon/utils.mjs +21 -0
  22. package/es/components/assets-svg-icon/validate.d.ts +4 -0
  23. package/es/components/assets-svg-icon/validate.mjs +43 -0
  24. package/es/components/base-button/base-button.css +74 -0
  25. package/es/components/base-button/base-button.vue.d.ts +173 -0
  26. package/es/components/base-button/base-button.vue.mjs +7 -0
  27. package/es/components/base-button/base-button.vue3.mjs +179 -0
  28. package/es/components/basic-button/basic-button.css +25 -0
  29. package/es/components/basic-button/basic-button.vue.d.ts +100 -0
  30. package/es/components/basic-button/basic-button.vue.mjs +7 -0
  31. package/es/components/basic-button/basic-button.vue3.mjs +130 -0
  32. package/es/components/code-editor/code-editor.css +67 -0
  33. package/es/components/code-editor/code-editor.d.ts +1 -1
  34. package/es/components/code-editor/code-editor.mjs +9 -10
  35. package/es/components/index.d.ts +10 -0
  36. package/es/components/index.mjs +21 -6
  37. package/es/components/layout/flex-container/flex-container.css +67 -0
  38. package/es/components/layout/flex-container/flex-container.mjs +13 -9
  39. package/es/components/layout/flex-item/flex-item.mjs +11 -9
  40. package/es/components/layout/grid-container/grid-container.mjs +11 -7
  41. package/es/components/layout/view-container/view-container.css +83 -0
  42. package/es/components/layout/view-container/view-container.mjs +6 -7
  43. package/es/components/svg-icon/svg-icon.css +73 -0
  44. package/es/components/svg-icon/svg-icon.vue.d.ts +40 -0
  45. package/es/components/svg-icon/svg-icon.vue.mjs +50 -0
  46. package/es/components/svg-icon/svg-icon.vue3.mjs +6 -0
  47. package/es/create-app-vue.d.ts +9 -0
  48. package/es/create-app-vue.mjs +17 -0
  49. package/es/directives/drag-resize.d.ts +4 -0
  50. package/es/directives/drag-resize.mjs +42 -0
  51. package/es/directives/index.d.ts +8 -0
  52. package/es/directives/index.mjs +9 -0
  53. package/es/directives/target-loading.d.ts +4 -0
  54. package/es/directives/target-loading.mjs +40 -0
  55. package/es/editor/gct-form-check-switch/gct-form-check-switch.d.ts +1 -1
  56. package/es/editor/gct-form-i18n/gct-form-i18n.d.ts +1 -1
  57. package/es/editor/gct-form-info/gct-form-info.d.ts +1 -1
  58. package/es/editor/gct-form-length-unit/gct-form-length-unit.d.ts +1 -1
  59. package/es/editor/gct-form-number/gct-form-number.d.ts +1 -1
  60. package/es/editor/gct-form-radio/gct-form-radio.d.ts +1 -1
  61. package/es/editor/gct-form-select/gct-form-select.d.ts +1 -1
  62. package/es/editor/gct-form-switch/gct-form-switch.d.ts +1 -1
  63. package/es/editor/gct-form-textarea/gct-form-textarea.d.ts +1 -1
  64. package/es/hooks/index.d.ts +3 -0
  65. package/es/hooks/useDragLine.d.ts +6 -0
  66. package/es/hooks/useDragLine.mjs +79 -0
  67. package/es/hooks/useLocale.d.ts +4 -0
  68. package/es/hooks/useLocale.mjs +32 -0
  69. package/es/hooks/useTheme.d.ts +8 -0
  70. package/es/hooks/useTheme.mjs +20 -0
  71. package/es/index.d.ts +7 -7
  72. package/es/index.mjs +35 -24
  73. package/es/modules/code-editor/index.d.ts +163 -0
  74. package/es/modules/code-editor/index.mjs +8 -0
  75. package/es/modules/code-editor/monaco-editor.css +49 -0
  76. package/es/modules/code-editor/monaco-editor.vue.d.ts +143 -0
  77. package/es/modules/code-editor/monaco-editor.vue.mjs +7 -0
  78. package/es/modules/code-editor/monaco-editor.vue2.mjs +440 -0
  79. package/es/modules/code-editor/useEditorConsole.d.ts +54 -0
  80. package/es/modules/code-editor/useEditorConsole.mjs +194 -0
  81. package/es/modules/code-editor/useMonacoEditor.d.ts +26 -0
  82. package/es/modules/code-editor/useMonacoEditor.mjs +26 -0
  83. package/es/modules/color-picker/index.d.ts +2 -0
  84. package/es/modules/color-picker/src/ColorPicker.css +16 -0
  85. package/es/modules/color-picker/src/ColorPicker.vue.d.ts +49 -0
  86. package/es/modules/color-picker/src/ColorPicker.vue.mjs +8 -0
  87. package/es/modules/color-picker/src/ColorPicker.vue2.mjs +545 -0
  88. package/es/modules/color-picker/src/ColorPicker2.css +156 -0
  89. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.css +72 -0
  90. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.d.ts +37 -0
  91. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs +195 -0
  92. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.css +79 -0
  93. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.d.ts +29 -0
  94. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs +98 -0
  95. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.css +70 -0
  96. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.d.ts +50 -0
  97. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs +239 -0
  98. package/es/modules/gct-dnd/constants/index.d.ts +22 -0
  99. package/es/modules/gct-dnd/constants/index.mjs +20 -0
  100. package/es/modules/gct-dnd/index.d.ts +5 -0
  101. package/es/modules/gct-dnd/interface/i-gct-dnd-config.d.ts +101 -0
  102. package/es/modules/gct-dnd/interface/i-gct-dnd-data.d.ts +14 -0
  103. package/es/modules/gct-dnd/interface/i-gct-dnd-render-item-options.d.ts +28 -0
  104. package/es/modules/gct-dnd/interface/i-gct-drag-collect.d.ts +24 -0
  105. package/es/modules/gct-dnd/interface/i-gct-drag-dnd-data.d.ts +51 -0
  106. package/es/modules/gct-dnd/interface/i-gct-drop-collect.d.ts +32 -0
  107. package/es/modules/gct-dnd/interface/i-gct-drop-result.d.ts +47 -0
  108. package/es/modules/gct-dnd/interface/index.d.ts +7 -0
  109. package/es/modules/global-modal/index.d.ts +5 -0
  110. package/es/modules/global-modal/index.mjs +16 -0
  111. package/es/modules/global-modal/src/BasicModal.vue.d.ts +518 -0
  112. package/es/modules/global-modal/src/BasicModal.vue.mjs +221 -0
  113. package/es/modules/global-modal/src/BasicModal.vue2.mjs +5 -0
  114. package/es/modules/global-modal/src/components/GlboalModal.d.ts +251 -0
  115. package/es/modules/global-modal/src/components/GlboalModal.mjs +40 -0
  116. package/es/modules/global-modal/src/components/ModalClose.css +95 -0
  117. package/es/modules/global-modal/src/components/ModalClose.vue.d.ts +27 -0
  118. package/es/modules/global-modal/src/components/ModalClose.vue.mjs +79 -0
  119. package/es/modules/global-modal/src/components/ModalClose.vue3.mjs +6 -0
  120. package/es/modules/global-modal/src/components/ModalFooter.vue.d.ts +270 -0
  121. package/es/modules/global-modal/src/components/ModalFooter.vue.mjs +44 -0
  122. package/es/modules/global-modal/src/components/ModalFooter.vue2.mjs +5 -0
  123. package/es/modules/global-modal/src/components/ModalHeader.vue.d.ts +17 -0
  124. package/es/modules/global-modal/src/components/ModalHeader.vue.mjs +11 -0
  125. package/es/modules/global-modal/src/components/ModalHeader.vue2.mjs +13 -0
  126. package/es/modules/global-modal/src/components/ModalWrapper.vue.d.ts +95 -0
  127. package/es/modules/global-modal/src/components/ModalWrapper.vue.mjs +26 -0
  128. package/es/modules/global-modal/src/components/ModalWrapper.vue2.mjs +136 -0
  129. package/es/modules/global-modal/src/hooks/useModal.d.ts +6 -0
  130. package/es/modules/global-modal/src/hooks/useModal.mjs +120 -0
  131. package/es/modules/global-modal/src/hooks/useModalContext.d.ts +5 -0
  132. package/es/modules/global-modal/src/hooks/useModalContext.mjs +11 -0
  133. package/es/modules/global-modal/src/hooks/useModalDrag.d.ts +7 -0
  134. package/es/modules/global-modal/src/hooks/useModalDrag.mjs +82 -0
  135. package/es/modules/global-modal/src/hooks/useModalFullScreen.d.ts +11 -0
  136. package/es/modules/global-modal/src/hooks/useModalFullScreen.mjs +16 -0
  137. package/es/modules/global-modal/src/index.css +153 -0
  138. package/es/modules/global-modal/src/props.d.ts +156 -0
  139. package/es/modules/global-modal/src/props.mjs +57 -0
  140. package/es/modules/global-modal/src/typing.d.ts +174 -0
  141. package/es/modules/target-loading/index.d.ts +4 -0
  142. package/es/modules/target-loading/src/createLoading.d.ts +13 -0
  143. package/es/modules/target-loading/src/createLoading.mjs +57 -0
  144. package/es/modules/target-loading/src/target-loading.css +18 -0
  145. package/es/modules/target-loading/src/target-loading.vue.d.ts +57 -0
  146. package/es/modules/target-loading/src/target-loading.vue.mjs +52 -0
  147. package/es/modules/target-loading/src/target-loading.vue3.mjs +7 -0
  148. package/es/modules/target-loading/src/typing.d.ts +9 -0
  149. package/es/modules/target-loading/src/useLoading.d.ts +9 -0
  150. package/es/setup-app.d.ts +1 -0
  151. package/es/setup-app.mjs +4 -0
  152. package/es/types/index.d.ts +190 -0
  153. package/es/utils/index.d.ts +4 -1
  154. package/es/utils/message-util/message-util.d.ts +7 -0
  155. package/es/utils/message-util/message-util.mjs +26 -0
  156. package/es/utils/monaco-loader/monaco-loader.d.ts +59 -0
  157. package/es/utils/monaco-loader/monaco-loader.mjs +88 -0
  158. package/es/utils/overlay-controller/overlay-controller.d.ts +18 -0
  159. package/es/utils/overlay-controller/overlay-controller.mjs +23 -0
  160. package/es/utils/with-install.mjs +0 -1
  161. package/es/widgets/gct-edit-form/gct-edit-form.d.ts +1 -1
  162. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +1 -1
  163. package/package.json +19 -8
  164. package/dist/index.min.css.css +0 -1
  165. package/es/components/code-editor/code-editor.scss +0 -3
  166. package/es/components/layout/flex-container/flex-container.scss +0 -3
  167. package/es/components/layout/flex-item/flex-item.scss +0 -17
  168. package/es/components/layout/view-container/view-container.scss +0 -19
  169. package/es/editor/gct-form-check-switch/gct-form-check-switch.mjs +0 -53
  170. package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +0 -6
  171. package/es/editor/gct-form-check-switch/gct-form-check-switch.scss +0 -10
  172. package/es/editor/gct-form-check-switch/index.mjs +0 -12
  173. package/es/editor/gct-form-checkbox/gct-form-checkbox.mjs +0 -70
  174. package/es/editor/gct-form-checkbox/gct-form-checkbox.scss +0 -56
  175. package/es/editor/gct-form-checkbox/index.mjs +0 -19
  176. package/es/editor/gct-form-color/gct-form-color.mjs +0 -45
  177. package/es/editor/gct-form-color/gct-form-color.provider.mjs +0 -6
  178. package/es/editor/gct-form-color/gct-form-color.scss +0 -3
  179. package/es/editor/gct-form-color/index.mjs +0 -17
  180. package/es/editor/gct-form-field-select/gct-form-field-select.mjs +0 -48
  181. package/es/editor/gct-form-field-select/gct-form-field-select.provider.mjs +0 -6
  182. package/es/editor/gct-form-field-select/gct-form-field-select.scss +0 -7
  183. package/es/editor/gct-form-field-select/gct-model-select.vue +0 -70
  184. package/es/editor/gct-form-field-select/index.mjs +0 -12
  185. package/es/editor/gct-form-i18n/gct-form-i18n.mjs +0 -62
  186. package/es/editor/gct-form-i18n/gct-form-i18n.provider.mjs +0 -6
  187. package/es/editor/gct-form-i18n/index.mjs +0 -12
  188. package/es/editor/gct-form-icon-select/gct-form-icon-select.mjs +0 -74
  189. package/es/editor/gct-form-icon-select/gct-form-icon-select.scss +0 -14
  190. package/es/editor/gct-form-icon-select/index.mjs +0 -14
  191. package/es/editor/gct-form-info/gct-form-info.mjs +0 -40
  192. package/es/editor/gct-form-info/gct-form-info.scss +0 -8
  193. package/es/editor/gct-form-info/index.mjs +0 -14
  194. package/es/editor/gct-form-length-unit/gct-form-length-unit.mjs +0 -43
  195. package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +0 -6
  196. package/es/editor/gct-form-length-unit/index.mjs +0 -12
  197. package/es/editor/gct-form-modal-select/gct-form-modal-select.mjs +0 -99
  198. package/es/editor/gct-form-modal-select/gct-form-modal-select.provider.mjs +0 -6
  199. package/es/editor/gct-form-modal-select/gct-form-modal-select.scss +0 -7
  200. package/es/editor/gct-form-modal-select/index.mjs +0 -12
  201. package/es/editor/gct-form-number/gct-form-number.mjs +0 -44
  202. package/es/editor/gct-form-number/gct-form-number.provider.mjs +0 -6
  203. package/es/editor/gct-form-number/gct-form-number.scss +0 -3
  204. package/es/editor/gct-form-number/index.mjs +0 -17
  205. package/es/editor/gct-form-picker/gct-form-picker.mjs +0 -92
  206. package/es/editor/gct-form-picker/gct-form-picker.provider.mjs +0 -6
  207. package/es/editor/gct-form-picker/index.mjs +0 -12
  208. package/es/editor/gct-form-radio/gct-form-radio.mjs +0 -70
  209. package/es/editor/gct-form-radio/gct-form-radio.scss +0 -68
  210. package/es/editor/gct-form-radio/index.mjs +0 -19
  211. package/es/editor/gct-form-select/gct-form-select.mjs +0 -50
  212. package/es/editor/gct-form-select/gct-form-select.provider.mjs +0 -6
  213. package/es/editor/gct-form-select/index.mjs +0 -12
  214. package/es/editor/gct-form-span/gct-form-span.mjs +0 -89
  215. package/es/editor/gct-form-span/gct-form-span.provider.mjs +0 -6
  216. package/es/editor/gct-form-span/gct-form-span.scss +0 -10
  217. package/es/editor/gct-form-span/index.mjs +0 -12
  218. package/es/editor/gct-form-switch/gct-form-switch.mjs +0 -35
  219. package/es/editor/gct-form-switch/gct-form-switch.provider.mjs +0 -6
  220. package/es/editor/gct-form-switch/index.mjs +0 -17
  221. package/es/editor/gct-form-text/gct-form-text.mjs +0 -45
  222. package/es/editor/gct-form-text/gct-form-text.provider.mjs +0 -6
  223. package/es/editor/gct-form-text/index.mjs +0 -17
  224. package/es/editor/gct-form-textarea/gct-form-textarea.mjs +0 -40
  225. package/es/editor/gct-form-textarea/gct-form-textarea.provider.mjs +0 -6
  226. package/es/editor/gct-form-textarea/index.mjs +0 -12
  227. package/es/editor/index.mjs +0 -51
  228. package/es/utils/index.mjs +0 -3
  229. package/es/vite-env.d.ts +0 -1
  230. package/es/widgets/gct-edit-form/gct-edit-form.mjs +0 -126
  231. package/es/widgets/gct-edit-form/index.mjs +0 -10
  232. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +0 -73
  233. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +0 -11
  234. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.scss +0 -62
  235. package/es/widgets/gct-form/gct-form-collapse/index.mjs +0 -15
  236. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +0 -71
  237. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +0 -13
  238. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.scss +0 -23
  239. package/es/widgets/gct-form/gct-form-collapse-pane/index.mjs +0 -15
  240. package/es/widgets/gct-form/gct-form-group/gct-form-group.mjs +0 -88
  241. package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +0 -11
  242. package/es/widgets/gct-form/gct-form-group/gct-form-group.scss +0 -28
  243. package/es/widgets/gct-form/gct-form-group/index.mjs +0 -15
  244. package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +0 -13
  245. package/es/widgets/gct-form/gct-form-item/gct-form-item.mjs +0 -141
  246. package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +0 -11
  247. package/es/widgets/gct-form/gct-form-item/gct-form-item.scss +0 -115
  248. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +0 -53
  249. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +0 -11
  250. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.scss +0 -63
  251. package/es/widgets/gct-form/gct-form-tab/index.mjs +0 -12
  252. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +0 -65
  253. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +0 -11
  254. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.scss +0 -16
  255. package/es/widgets/gct-form/gct-form-tab-pane/index.mjs +0 -15
  256. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +0 -71
  257. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +0 -11
  258. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.scss +0 -25
  259. package/es/widgets/gct-form/gct-form-title-group/index.mjs +0 -16
  260. package/es/widgets/gct-form/gct-form.mjs +0 -112
  261. package/es/widgets/gct-form/gct-form.scss +0 -11
  262. package/es/widgets/gct-form/index.mjs +0 -31
@@ -0,0 +1,156 @@
1
+ .color-picker__popover .ant-popover-inner-content {
2
+ padding: 0;
3
+ }
4
+ .color-picker__popover .color-picker {
5
+ z-index: 9;
6
+ width: var(--w);
7
+ padding: 10px;
8
+ background: #fff;
9
+ box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1);
10
+ user-select: none;
11
+ /* 饱和度和亮度 */
12
+ /* 色调 透明度 */
13
+ /* 颜色方块 */
14
+ /* 颜色的值 hex rgba */
15
+ }
16
+ .color-picker__popover .color-picker-saturation {
17
+ position: relative;
18
+ width: 100%;
19
+ height: 200px;
20
+ margin-bottom: 10px;
21
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
22
+ cursor: pointer;
23
+ /* 圆圈 */
24
+ }
25
+ .color-picker__popover .color-picker-saturation div {
26
+ position: absolute;
27
+ top: 0;
28
+ left: 0;
29
+ width: 100%;
30
+ height: 100%;
31
+ }
32
+ .color-picker__popover .color-picker-saturation .point {
33
+ position: absolute;
34
+ z-index: 9;
35
+ box-sizing: border-box;
36
+ width: 6px;
37
+ height: 6px;
38
+ transform: translate(-50%, -50%);
39
+ border: 2px solid #ccc;
40
+ border-radius: 50%;
41
+ background-color: transparent;
42
+ }
43
+ .color-picker__popover .color-picker-saturation-t {
44
+ background: linear-gradient(to right, white, #fff0);
45
+ }
46
+ .color-picker__popover .color-picker-saturation-h {
47
+ background: linear-gradient(to top, black, #fff0);
48
+ }
49
+ .color-picker__popover .color-picker-middle {
50
+ display: flex;
51
+ width: 100%;
52
+ margin-bottom: 10px;
53
+ /* 色调滑块条 */
54
+ /* 透明度滑块条 */
55
+ /* 滑块 */
56
+ }
57
+ .color-picker__popover .color-picker-middle .hue-slider {
58
+ position: relative;
59
+ height: 10px;
60
+ margin-bottom: 6px;
61
+ background: linear-gradient(90deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
62
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
63
+ }
64
+ .color-picker__popover .color-picker-middle .alpha-slider {
65
+ position: relative;
66
+ height: 10px;
67
+ background: #fff url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAWElEQVRIiWM8fubkfwYygKWJOSM5+mCAhRLNoxaPWjxq8ajFoxbTyeL/DAfJ0Xjs3Cl7Siwmu4Yht1aDgZEYx6MWj1o8avGoxaMWD3qLya5X//4nqx6HAQC7RBGFzolqTAAAAABJRU5ErkJggg==');
68
+ background-size: 10px 10px;
69
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
70
+ }
71
+ .color-picker__popover .color-picker-middle .slider {
72
+ position: absolute;
73
+ box-sizing: border-box;
74
+ width: 6px;
75
+ height: 100%;
76
+ background-color: #fff;
77
+ box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
78
+ cursor: pointer;
79
+ }
80
+ .color-picker__popover .color-picker-diamond {
81
+ position: relative;
82
+ width: 26px;
83
+ height: 26px;
84
+ margin-left: 5px;
85
+ overflow: hidden;
86
+ border-radius: 3px;
87
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAWElEQVRIiWM8fubkfwYygKWJOSM5+mCAhRLNoxaPWjxq8ajFoxbTyeL/DAfJ0Xjs3Cl7Siwmu4Yht1aDgZEYx6MWj1o8avGoxaMWD3qLya5X//4nqx6HAQC7RBGFzolqTAAAAABJRU5ErkJggg==');
88
+ background-size: 10px 10px;
89
+ }
90
+ .color-picker__popover .color-picker-value {
91
+ display: flex;
92
+ justify-content: space-between;
93
+ width: 100%;
94
+ }
95
+ .color-picker__popover .color-picker-value div {
96
+ padding: 0 3px;
97
+ text-align: center;
98
+ }
99
+ .color-picker__popover .color-picker-value input {
100
+ box-sizing: border-box;
101
+ width: 34px;
102
+ height: 24px;
103
+ margin: 0;
104
+ padding: 0;
105
+ border: 1px solid #ccc;
106
+ border-radius: 3px;
107
+ outline: none;
108
+ font-size: 12px;
109
+ text-align: center;
110
+ }
111
+ .color-picker__popover .color-picker-value p {
112
+ margin: 3px 0 0;
113
+ font-size: 12px;
114
+ }
115
+ .color-picker__popover .color-picker-value .rgba-a {
116
+ padding-right: 0;
117
+ }
118
+ .color-picker__popover .color-picker-value .hex {
119
+ flex: 1;
120
+ padding-left: 0;
121
+ }
122
+ .color-picker__popover .color-picker-value .hex input {
123
+ width: 100%;
124
+ height: 24px;
125
+ }
126
+ .color-picker__popover .color-picker .presetColor {
127
+ /* 预设颜色 */
128
+ }
129
+ .color-picker__popover .color-picker .presetColor .title {
130
+ margin-bottom: 10px;
131
+ padding-top: 8px;
132
+ border-top: 1px solid #eaeaea;
133
+ font-size: 12px;
134
+ }
135
+ .color-picker__popover .color-picker .presetColor .preset {
136
+ display: flex;
137
+ flex-wrap: wrap;
138
+ justify-content: flex-start;
139
+ width: 100%;
140
+ margin: 10px 0 0;
141
+ padding: 0;
142
+ list-style: none;
143
+ }
144
+ .color-picker__popover .color-picker .presetColor .preset li {
145
+ width: 20px;
146
+ height: 20px;
147
+ margin-right: 6px;
148
+ margin-bottom: 6px;
149
+ border: 1px solid #ccc;
150
+ border-radius: 6px;
151
+ cursor: pointer;
152
+ }
153
+ .color-picker__popover .color-value .color-value .color-value .hex input {
154
+ width: 100%;
155
+ height: 24px;
156
+ }
@@ -0,0 +1,72 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-dnd-container {
66
+ border: 1px dashed transparent;
67
+ border-radius: var(--gct-border-radius-s);
68
+ }
69
+ .gct-dnd-container.is-over {
70
+ border-color: var(--gct-color-border-hover);
71
+ background-color: var(--gct-color-primary-light);
72
+ }
@@ -0,0 +1,37 @@
1
+ import { PropType } from 'vue';
2
+ import { IGctDndConfig, IGctDndData, IGctDropCollect } from '../../interface';
3
+ import { GCT_DND_INSERT_POS } from '../../constants';
4
+ export declare const GctDndContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ config: {
6
+ type: PropType<IGctDndConfig>;
7
+ default: () => IGctDndConfig;
8
+ };
9
+ items: {
10
+ type: PropType<IGctDndData[]>;
11
+ default: () => never[];
12
+ };
13
+ }>, {
14
+ ns: import('@gct-paas/core').Namespace;
15
+ rootRef: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
16
+ dropLineState: {
17
+ activeKey: string;
18
+ isBeforeHover: boolean;
19
+ };
20
+ collect: import('vue').Ref<IGctDropCollect, IGctDropCollect>;
21
+ onDrop: (insertPos: GCT_DND_INSERT_POS, data: IGctDndData, insertIndex?: number) => void;
22
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:items"[], "update:items", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
23
+ config: {
24
+ type: PropType<IGctDndConfig>;
25
+ default: () => IGctDndConfig;
26
+ };
27
+ items: {
28
+ type: PropType<IGctDndData[]>;
29
+ default: () => never[];
30
+ };
31
+ }>> & Readonly<{
32
+ "onUpdate:items"?: ((...args: any[]) => any) | undefined;
33
+ }>, {
34
+ config: IGctDndConfig;
35
+ items: IGctDndData[];
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
+ export default GctDndContainer;
@@ -0,0 +1,195 @@
1
+ import { defineComponent, createVNode, ref, reactive, provide, toRef, watch } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+ import { useDrop } from 'vue3-dnd';
4
+ import { cloneDeep } from 'lodash-es';
5
+ import { GctDndItem } from '../gct-dnd-item/gct-dnd-item.mjs';
6
+ import { GctDndDropLine } from '../gct-dnd-drop-line/gct-dnd-drop-line.mjs';
7
+ import { GCT_DND_INSERT_POS } from '../../constants/index.mjs';
8
+ import './gct-dnd-container.css';/* empty css */
9
+
10
+ const GctDndContainer = /* @__PURE__ */ defineComponent({
11
+ name: 'GctDndContainer',
12
+ props: {
13
+ config: {
14
+ type: Object,
15
+ default: () => {
16
+ return {
17
+ group: 'GctDnd',
18
+ insertPos: GCT_DND_INSERT_POS.LAST
19
+ };
20
+ }
21
+ },
22
+ items: {
23
+ type: Array,
24
+ default: () => []
25
+ }
26
+ },
27
+ emits: ['update:items'],
28
+ setup(props, {
29
+ emit
30
+ }) {
31
+ const {
32
+ config
33
+ } = props;
34
+ const ns = useNamespace('dnd-container');
35
+ const rootRef = ref(null);
36
+ // 拖拽线状态
37
+ const dropLineState = reactive({
38
+ activeKey: '',
39
+ isBeforeHover: false
40
+ });
41
+ provide('vue3-dnd-drop-line-state', dropLineState);
42
+ const items = toRef(props.items);
43
+ const [collect, drop] = useDrop({
44
+ accept: config.group,
45
+ collect(monitor) {
46
+ return {
47
+ handlerId: monitor.getHandlerId(),
48
+ isOver: monitor.isOver(),
49
+ canDrop: monitor.canDrop(),
50
+ isShallowOver: monitor.isOver({
51
+ shallow: true
52
+ })
53
+ };
54
+ },
55
+ canDrop(item) {
56
+ if (config.isDrop === false) {
57
+ return false;
58
+ }
59
+ if (config.canDrop) {
60
+ return config.canDrop(item);
61
+ }
62
+ return true;
63
+ },
64
+ drop: (item, monitor) => {
65
+ if (collect.value.isShallowOver !== true || monitor.canDrop() === false) {
66
+ return;
67
+ }
68
+ const callback = async () => {
69
+ let data = item.data;
70
+ if (config.drop) {
71
+ data = await config.drop(item);
72
+ if (!data) {
73
+ return {
74
+ group: config.group,
75
+ success: false,
76
+ cfg: cloneDeep(props.config)
77
+ };
78
+ }
79
+ }
80
+ const i = items.value.findIndex(_ => _.id === item.data.id);
81
+ // 数据不存在才可以从容器拖入
82
+ if (i === -1) {
83
+ onDrop(props.config.insertPos, data);
84
+ }
85
+ emit('update:items', items.value);
86
+ return {
87
+ group: config.group,
88
+ success: true,
89
+ cfg: cloneDeep(props.config),
90
+ data
91
+ };
92
+ };
93
+ return {
94
+ asyncDrop: callback
95
+ };
96
+ }
97
+ });
98
+ if (config.isDrop !== false) {
99
+ drop(rootRef);
100
+ }
101
+ watch(collect, () => {
102
+ if (collect.value.isOver !== true) {
103
+ dropLineState.activeKey = '';
104
+ }
105
+ });
106
+
107
+ /**
108
+ * 拖拽结束放置逻辑
109
+ *
110
+ * @param {GCT_DND_INSERT_POS} insertPos
111
+ * @param {IGctDndData} data
112
+ * @param {number} [insertIndex=-1] 指定放置前后时,需要指定插入谁的前后
113
+ */
114
+ function onDrop(insertPos, data, insertIndex = -1) {
115
+ if (!data) {
116
+ console.error('data is required');
117
+ return;
118
+ }
119
+ if (insertPos === GCT_DND_INSERT_POS.FIRST) {
120
+ items.value.unshift(data);
121
+ } else if (insertPos === GCT_DND_INSERT_POS.LAST) {
122
+ items.value.push(data);
123
+ } else {
124
+ if (insertIndex === -1) {
125
+ console.error('insertIndex is required');
126
+ return;
127
+ }
128
+ const i = items.value.findIndex(item => item.id === data.id);
129
+ // 在原本位置不做任何操作
130
+ if (i === insertIndex) {
131
+ return;
132
+ }
133
+ // 新位置在前,先删除,再插入
134
+ if (i !== -1 && insertIndex < i) {
135
+ items.value.splice(i, 1);
136
+ }
137
+ if (insertPos === GCT_DND_INSERT_POS.AFTER) {
138
+ // 插入后,在指定位置 + 1
139
+ items.value.splice(insertIndex + 1, 0, data);
140
+ } else {
141
+ // 插入前,在指定位置
142
+ items.value.splice(insertIndex, 0, data);
143
+ }
144
+ // 新位置在后,先插入,再删除
145
+ if (i !== -1 && insertIndex > i) {
146
+ items.value.splice(i, 1);
147
+ }
148
+ }
149
+ emit('update:items', items.value);
150
+ }
151
+ return {
152
+ ns,
153
+ rootRef,
154
+ dropLineState,
155
+ collect,
156
+ onDrop
157
+ };
158
+ },
159
+ render() {
160
+ const last = this.items[this.items.length - 1];
161
+ return createVNode("div", {
162
+ "ref": "rootRef",
163
+ "class": [this.collect.handlerId, this.ns.b(), this.ns.is('over', this.collect.isOver && this.collect.canDrop), this.ns.is('not-drop', this.collect.canDrop === false && this.collect.isOver), this.ns.is('shallow-over', this.collect.isShallowOver && this.collect.canDrop)]
164
+ }, [this.$slots.before?.(), this.items.map((item, i) => {
165
+ const before = this.items[i - 1];
166
+ const contents = [];
167
+ if (this.config.isDrop !== false) {
168
+ contents.push(createVNode(GctDndDropLine, {
169
+ "key": item.id + '___line',
170
+ "config": this.config,
171
+ "active": this.dropLineState.isBeforeHover === true && this.dropLineState.activeKey === item.id || before && this.dropLineState.activeKey === before.id && this.dropLineState.isBeforeHover === false,
172
+ "onDrop": data => this.onDrop(GCT_DND_INSERT_POS.BEFORE, data, i)
173
+ }, null));
174
+ }
175
+ contents.push(createVNode(GctDndItem, {
176
+ "key": item.id,
177
+ "config": this.config,
178
+ "index": i,
179
+ "data": item,
180
+ "last": i === this.items.length - 1,
181
+ "onDrop": (pos, data) => this.onDrop(pos, data, i)
182
+ }, {
183
+ default: this.$slots.default
184
+ }));
185
+ return contents;
186
+ }), last ? createVNode(GctDndDropLine, {
187
+ "key": last.id + '___last-line',
188
+ "config": this.config,
189
+ "active": this.dropLineState.activeKey === last.id && this.dropLineState.isBeforeHover === false,
190
+ "onDrop": data => this.onDrop(GCT_DND_INSERT_POS.AFTER, data, this.items.length - 1)
191
+ }, null) : null, this.$slots.after?.()]);
192
+ }
193
+ });
194
+
195
+ export { GctDndContainer };
@@ -0,0 +1,79 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-dnd-drop-line {
66
+ background-color: transparent;
67
+ padding: var(--gct-padding-1) 0;
68
+ }
69
+ .gct-dnd-drop-line__line {
70
+ border-top: 1px solid transparent;
71
+ }
72
+
73
+ .gct-dnd-drop-line.is-shallow-over .gct-dnd-drop-line__line {
74
+ border-color: var(--gct-color-primary);
75
+ }
76
+
77
+ .gct-dnd-drop-line.is-active .gct-dnd-drop-line__line {
78
+ border-color: var(--gct-color-primary);
79
+ }
@@ -0,0 +1,29 @@
1
+ import { PropType } from 'vue';
2
+ import { IGctDndConfig, IGctDropCollect } from '../../interface';
3
+ export declare const GctDndDropLine: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ config: {
5
+ type: PropType<IGctDndConfig>;
6
+ required: true;
7
+ };
8
+ active: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ }>, {
13
+ ns: import('@gct-paas/core').Namespace;
14
+ rootRef: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
15
+ collect: import('vue').Ref<IGctDropCollect, IGctDropCollect>;
16
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "drop"[], "drop", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
17
+ config: {
18
+ type: PropType<IGctDndConfig>;
19
+ required: true;
20
+ };
21
+ active: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ }>> & Readonly<{
26
+ onDrop?: ((...args: any[]) => any) | undefined;
27
+ }>, {
28
+ active: boolean;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,98 @@
1
+ import { defineComponent, createVNode, ref } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+ import { useDrop } from 'vue3-dnd';
4
+ import { cloneDeep } from 'lodash-es';
5
+ import './gct-dnd-drop-line.css';/* empty css */
6
+
7
+ const GctDndDropLine = /* @__PURE__ */ defineComponent({
8
+ name: 'GctDndDropLine',
9
+ props: {
10
+ config: {
11
+ type: Object,
12
+ required: true
13
+ },
14
+ // 特殊指定当前线激活
15
+ active: {
16
+ type: Boolean,
17
+ default: false
18
+ }
19
+ },
20
+ emits: ['drop'],
21
+ setup(props, {
22
+ emit
23
+ }) {
24
+ const {
25
+ config
26
+ } = props;
27
+ const ns = useNamespace('dnd-drop-line');
28
+ const rootRef = ref(null);
29
+ const [collect, drop] = useDrop({
30
+ accept: props.config.group,
31
+ collect: monitor => {
32
+ return {
33
+ handlerId: monitor.getHandlerId(),
34
+ isOver: monitor.isOver(),
35
+ canDrop: monitor.canDrop(),
36
+ isShallowOver: monitor.isOver({
37
+ shallow: true
38
+ })
39
+ };
40
+ },
41
+ canDrop(item) {
42
+ if (config.isDrop === false) {
43
+ return false;
44
+ }
45
+ if (config.canDrop) {
46
+ return config.canDrop(item);
47
+ }
48
+ return true;
49
+ },
50
+ drop: (item, monitor) => {
51
+ if (collect.value.isShallowOver !== true || monitor.canDrop() === false) {
52
+ return;
53
+ }
54
+ const callback = async () => {
55
+ let data = item.data;
56
+ if (config.drop) {
57
+ data = await config.drop(item);
58
+ if (!data) {
59
+ return {
60
+ group: config.group,
61
+ cfg: cloneDeep(props.config),
62
+ success: false
63
+ };
64
+ }
65
+ }
66
+ emit('drop', data);
67
+ return {
68
+ group: config.group,
69
+ success: true,
70
+ cfg: cloneDeep(props.config),
71
+ data
72
+ };
73
+ };
74
+ return {
75
+ asyncDrop: callback
76
+ };
77
+ }
78
+ });
79
+ if (config.isDrop !== false) {
80
+ drop(rootRef);
81
+ }
82
+ return {
83
+ ns,
84
+ rootRef,
85
+ collect
86
+ };
87
+ },
88
+ render() {
89
+ return createVNode("div", {
90
+ "ref": "rootRef",
91
+ "class": [this.collect.handlerId, this.ns.b(), this.ns.is('over', this.collect.isOver && this.collect.canDrop), this.ns.is('shallow-over', this.collect.isShallowOver && this.collect.canDrop), this.ns.is('not-drop', this.collect.canDrop === false && this.collect.isShallowOver), this.ns.is('active', this.active)]
92
+ }, [createVNode("div", {
93
+ "class": this.ns.e('line')
94
+ }, null)]);
95
+ }
96
+ });
97
+
98
+ export { GctDndDropLine };