@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,9 @@
1
+ const _export_sfc = (sfc, props) => {
2
+ const target = sfc.__vccOpts || sfc;
3
+ for (const [key, val] of props) {
4
+ target[key] = val;
5
+ }
6
+ return target;
7
+ };
8
+
9
+ export { _export_sfc as default };
@@ -0,0 +1,149 @@
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
+ /* 模态 start */
66
+ /* 模态 end */
67
+ .gct-modal {
68
+ --gct-modal-z-index: var(--gct-z-index-modal);
69
+ --gct-modal-background-color: var(--gct-color-bg-1);
70
+ }
71
+ .gct-modal__full-screen {
72
+ position: absolute;
73
+ top: 0;
74
+ right: 48px;
75
+ padding: 16px 8px;
76
+ color: #212528;
77
+ font-size: 16px;
78
+ line-height: 1;
79
+ line-height: 22px;
80
+ cursor: pointer;
81
+ }
82
+
83
+ .gct-modal.is-hidden-footer > .ant-modal-content > .ant-modal-footer {
84
+ display: none;
85
+ padding: 16px;
86
+ }
87
+
88
+ .gct-modal.is-hidden-close-btn > .ant-modal-content > .ant-modal-close {
89
+ display: none;
90
+ }
91
+
92
+ .gct-modal.is-hidden-cancel-btn > .ant-modal-content > .ant-modal-footer > button:first-child {
93
+ display: none;
94
+ }
95
+
96
+ .gct-modal.is-full-screen {
97
+ top: 0;
98
+ width: 100vw !important;
99
+ height: 100vh !important;
100
+ max-width: 100%;
101
+ max-height: fit-content;
102
+ margin: 0;
103
+ padding-bottom: 0;
104
+ }
105
+ .gct-modal.is-full-screen .ant-modal-content {
106
+ display: flex;
107
+ flex-direction: column;
108
+ width: 100vw;
109
+ max-width: 100vw;
110
+ height: 100vh;
111
+ max-height: 100vh;
112
+ }
113
+
114
+ .gct-modal > .ant-modal-content {
115
+ display: flex;
116
+ flex-direction: column;
117
+ width: 100%;
118
+ height: 100%;
119
+ max-height: 85vh;
120
+ }
121
+ .gct-modal > .ant-modal-content > .ant-modal-close > .ant-modal-close-x {
122
+ width: auto;
123
+ height: auto;
124
+ padding: 16px;
125
+ color: #212528;
126
+ line-height: 1;
127
+ line-height: 22px;
128
+ }
129
+ .gct-modal > .ant-modal-content > .ant-modal-header {
130
+ border-bottom: 1px solid #e0e3ea;
131
+ }
132
+ .gct-modal > .ant-modal-content > .ant-modal-footer {
133
+ border-top: 1px solid #e0e3ea;
134
+ }
135
+ .gct-modal > .ant-modal-content > .ant-modal-header,
136
+ .gct-modal > .ant-modal-content > .ant-modal-footer {
137
+ flex-shrink: 0;
138
+ padding: 16px;
139
+ }
140
+ .gct-modal > .ant-modal-content > .ant-modal-header .ant-modal-title {
141
+ color: #000;
142
+ font-weight: 600;
143
+ min-height: 22px;
144
+ }
145
+ .gct-modal > .ant-modal-content > .ant-modal-body {
146
+ flex-grow: 1;
147
+ padding: 0;
148
+ overflow: hidden auto;
149
+ }
@@ -0,0 +1,26 @@
1
+ import { PropType, VNode } from 'vue';
2
+ import { IModalOptions, IOverlayContainer } from '@gct-paas/core';
3
+ export declare const AppModalComponent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ opts: {
5
+ type: PropType<IModalOptions>;
6
+ default: () => {};
7
+ };
8
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ opts: {
10
+ type: PropType<IModalOptions>;
11
+ default: () => {};
12
+ };
13
+ }>> & Readonly<{}>, {
14
+ opts: IModalOptions;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
+ /**
17
+ * 创建模态框
18
+ *
19
+ * @author zhanghanrui
20
+ * @date 2024-03-19 21:03:37
21
+ * @export
22
+ * @param {() => VNode} render
23
+ * @param {(IModalOptions)} [opts]
24
+ * @return {*} {IOverlayContainer}
25
+ */
26
+ export declare function createModal(render: () => VNode, opts?: IModalOptions): IOverlayContainer;
@@ -0,0 +1,140 @@
1
+ import { defineComponent, ref, provide, createVNode, h, resolveComponent, isVNode } from 'vue';
2
+ import { ConfigProvider } from 'ant-design-vue';
3
+ import { OverlayContainer, useNamespace, Modal } from '@gct-paas/core';
4
+ import { DndProvider } from 'vue3-dnd';
5
+ import { HTML5Backend } from 'react-dnd-html5-backend';
6
+ import './app-modal-component.css';/* empty css */
7
+
8
+ function _isSlot(s) {
9
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
10
+ }
11
+ const AppModalComponent = /* @__PURE__ */ defineComponent({
12
+ props: {
13
+ opts: {
14
+ type: Object,
15
+ default: () => ({})
16
+ }
17
+ },
18
+ setup(props, ctx) {
19
+ const ns = useNamespace('modal');
20
+ const isShow = ref(false);
21
+ // 是否全屏
22
+ const isFullScreen = ref(props.opts.defaultFullscreen ? true : false);
23
+ const onFullScreen = () => {
24
+ isFullScreen.value = !isFullScreen.value;
25
+ };
26
+
27
+ // 合并options
28
+ const options = ref({});
29
+ if (props.opts) {
30
+ Object.assign(options.value, props.opts);
31
+ }
32
+ let data = null;
33
+ const modal = new Modal({
34
+ dismiss: result => {
35
+ isShow.value = false;
36
+ data = result;
37
+ ctx.emit('dismiss', data);
38
+ },
39
+ setOptions(opt) {
40
+ Object.assign(options.value, opt);
41
+ }
42
+ });
43
+ provide('modal', modal);
44
+ const dismiss = _data => {
45
+ return modal.dismiss(_data);
46
+ };
47
+ const present = () => {
48
+ isShow.value = true;
49
+ };
50
+ ctx.expose({
51
+ present,
52
+ dismiss
53
+ });
54
+ const isConfirmLoading = ref(false);
55
+ const ok = async () => {
56
+ if (modal.ok) {
57
+ try {
58
+ isConfirmLoading.value = true;
59
+ const result = await modal.ok();
60
+ isConfirmLoading.value = false;
61
+ if (result && (result.ok === true || result.close === true)) {
62
+ dismiss(result);
63
+ }
64
+ } finally {
65
+ isConfirmLoading.value = false;
66
+ }
67
+ } else {
68
+ console.warn('打开模态未实现ok方法');
69
+ }
70
+ };
71
+ const cancel = async () => {
72
+ if (modal.cancel) {
73
+ const bol = await modal.cancel();
74
+ if (bol === false) {
75
+ return;
76
+ }
77
+ }
78
+ dismiss();
79
+ };
80
+
81
+ // TODO: 需要注入 antd 的多语言,待实现
82
+ const locale = {
83
+ getAntdLocale: {
84
+ locale: {}
85
+ }
86
+ };
87
+ const {
88
+ getAntdLocale
89
+ } = locale;
90
+ return () => {
91
+ let _slot;
92
+ const slot = ctx.slots.default?.();
93
+ if (slot && slot.length > 0) {
94
+ slot[0].props.modal = modal;
95
+ }
96
+ return createVNode(ConfigProvider, {
97
+ "locale": getAntdLocale
98
+ }, {
99
+ default: () => [createVNode(DndProvider, {
100
+ "backend": HTML5Backend
101
+ }, _isSlot(_slot = h(resolveComponent('a-modal'), {
102
+ visible: isShow,
103
+ class: [ns.b(), options.value.placement && ns.m(options.value.placement), options.value.modalClass, ns.is('hidden-footer', options.value.showFooter === false), ns.is('hidden-close-btn', options.value.showCloseBtn === false), ns.is('hidden-cancel-btn', options.value.showCancelBtn === false), ns.is('full-screen', isFullScreen.value)],
104
+ centered: true,
105
+ onOk: ok,
106
+ confirmLoading: isConfirmLoading,
107
+ onCancel: cancel,
108
+ okText: '确认',
109
+ okButtonProps: {
110
+ disabled: modal.state.okDisabled
111
+ },
112
+ ...options.value
113
+ }, [options.value.canFullscreen !== false ? createVNode("div", {
114
+ "class": ns.e('full-screen'),
115
+ "onClick": onFullScreen
116
+ }, [createVNode("i", {
117
+ "class": `iconfont ${isFullScreen.value ? 'icon-tuichuquanping' : 'icon-quanping'}`
118
+ }, null)]) : null, slot])) ? _slot : {
119
+ default: () => [_slot]
120
+ })]
121
+ });
122
+ };
123
+ }
124
+ });
125
+
126
+ /**
127
+ * 创建模态框
128
+ *
129
+ * @author zhanghanrui
130
+ * @date 2024-03-19 21:03:37
131
+ * @export
132
+ * @param {() => VNode} render
133
+ * @param {(IModalOptions)} [opts]
134
+ * @return {*} {IOverlayContainer}
135
+ */
136
+ function createModal(render, opts) {
137
+ return new OverlayContainer(AppModalComponent, render, opts);
138
+ }
139
+
140
+ export { AppModalComponent, createModal };
@@ -0,0 +1,188 @@
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-assets-svg-icon {
66
+ display: inline-block;
67
+ width: 1em;
68
+ height: 1em;
69
+ contain: strict;
70
+ fill: currentcolor;
71
+ box-sizing: content-box !important;
72
+ }
73
+ .gct-assets-svg-icon .ionicon {
74
+ stroke: currentcolor;
75
+ }
76
+ .gct-assets-svg-icon .ionicon-fill-none {
77
+ fill: none;
78
+ }
79
+ .gct-assets-svg-icon .ionicon-stroke-width {
80
+ stroke-width: var(--ionicon-stroke-width, 32px);
81
+ }
82
+ .gct-assets-svg-icon .icon-inner,
83
+ .gct-assets-svg-icon .ionicon,
84
+ .gct-assets-svg-icon svg {
85
+ display: block;
86
+ height: 100%;
87
+ width: 100%;
88
+ }
89
+ .gct-assets-svg-icon {
90
+ /* Icon RTL
91
+ * -----------------------------------------------------------
92
+ */
93
+ /**
94
+ * Safari <16.4 incorrectly reports
95
+ * that it supports :dir(rtl) when it does not.
96
+ * This @supports statement lets us target
97
+ * WebKit browsers to apply the RTL fallback.
98
+ * -webkit-named-image only exists on WebKit.
99
+ * For WebKit browsers that do support :dir(rtl)
100
+ * (i.e. Safari >= 16.4) then the :dir(rtl)
101
+ * code farther down on the page will take
102
+ * effect and override this fallback.
103
+ */
104
+ }
105
+ @supports (background: -webkit-named-image(i)) {
106
+ .gct-assets-svg-icon.icon-rtl .icon-inner {
107
+ transform: scaleX(-1);
108
+ }
109
+ }
110
+ .gct-assets-svg-icon {
111
+ /**
112
+ * Fallback for browsers that support
113
+ * neither :host-context nor :dir.
114
+ * The icon will not react to dir
115
+ * changes, but it will at least
116
+ * respect the dir on component load.
117
+ */
118
+ }
119
+ .gct-assets-svg-icon.icon-rtl .icon-inner {
120
+ transform: scaleX(-1);
121
+ }
122
+ .gct-assets-svg-icon {
123
+ /* For Vue components, we use attribute selectors instead of :host-context */
124
+ }
125
+ .gct-assets-svg-icon.flip-rtl[dir=rtl] .icon-inner {
126
+ transform: scaleX(-1);
127
+ }
128
+ @supports selector(:dir(rtl)) {
129
+ .gct-assets-svg-icon.flip-rtl:dir(rtl) .icon-inner {
130
+ transform: scaleX(-1);
131
+ }
132
+ .gct-assets-svg-icon {
133
+ /**
134
+ * This is needed for WebKit otherwise the fallback
135
+ * will always cause the icon to be flipped if the document
136
+ * loads in RTL.
137
+ */
138
+ }
139
+ .gct-assets-svg-icon.flip-rtl:dir(ltr) .icon-inner {
140
+ transform: scaleX(1);
141
+ }
142
+ }
143
+ .gct-assets-svg-icon {
144
+ /* Icon Sizes
145
+ * -----------------------------------------------------------
146
+ */
147
+ }
148
+ .gct-assets-svg-icon.icon-small {
149
+ font-size: 1.125rem !important;
150
+ }
151
+ .gct-assets-svg-icon.icon-large {
152
+ font-size: 2rem !important;
153
+ }
154
+ .gct-assets-svg-icon {
155
+ /* Icon Colors
156
+ * -----------------------------------------------------------
157
+ */
158
+ }
159
+ .gct-assets-svg-icon.ion-color {
160
+ color: var(--ion-color-base) !important;
161
+ }
162
+ .gct-assets-svg-icon.ion-color-primary {
163
+ --ion-color-base: var(--ion-color-primary, #3880ff) !important;
164
+ }
165
+ .gct-assets-svg-icon.ion-color-secondary {
166
+ --ion-color-base: var(--ion-color-secondary, #3dc2ff) !important;
167
+ }
168
+ .gct-assets-svg-icon.ion-color-tertiary {
169
+ --ion-color-base: var(--ion-color-tertiary, #5260ff) !important;
170
+ }
171
+ .gct-assets-svg-icon.ion-color-success {
172
+ --ion-color-base: var(--ion-color-success, #2dd36f) !important;
173
+ }
174
+ .gct-assets-svg-icon.ion-color-warning {
175
+ --ion-color-base: var(--ion-color-warning, #ffc409) !important;
176
+ }
177
+ .gct-assets-svg-icon.ion-color-danger {
178
+ --ion-color-base: var(--ion-color-danger, #eb445a) !important;
179
+ }
180
+ .gct-assets-svg-icon.ion-color-light {
181
+ --ion-color-base: var(--ion-color-light, #f4f5f8) !important;
182
+ }
183
+ .gct-assets-svg-icon.ion-color-medium {
184
+ --ion-color-base: var(--ion-color-medium, #92949c) !important;
185
+ }
186
+ .gct-assets-svg-icon.ion-color-dark {
187
+ --ion-color-base: var(--ion-color-dark, #222428) !important;
188
+ }
@@ -0,0 +1,134 @@
1
+ /**
2
+ * SVG图标组件 - 简化版本 (仅浏览器环境)
3
+ *
4
+ * 此组件是基于Stencil ion-icon组件简化的Vue实现,
5
+ * 专门用于浏览器环境,仅支持通过src属性加载SVG。
6
+ *
7
+ * ## 功能
8
+ * - 支持通过直接URL加载SVG图标
9
+ * - 支持懒加载
10
+ * - 支持RTL文本方向自动翻转
11
+ * - 支持颜色和大小变化
12
+ * - 支持SVG内容安全检查
13
+ *
14
+ * ## 使用示例
15
+ *
16
+ * // 使用 src 属性
17
+ * <SvgIcon src="/path/to/icon.svg" />
18
+ *
19
+ * // 设置大小和颜色
20
+ * <SvgIcon src="/path/to/icon.svg" size="large" color="primary" />
21
+ *
22
+ * // RTL 支持
23
+ * <SvgIcon src="/path/to/icon.svg" flipRtl={true} />
24
+ *
25
+ * // 懒加载
26
+ * <SvgIcon src="/path/to/icon.svg" lazy={true} />
27
+ *
28
+ * // 禁用 SVG 清理
29
+ * <SvgIcon src="/path/to/icon.svg" sanitize={false} />
30
+ */
31
+ export declare const AssetsSvgIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
32
+ /**
33
+ * The color to use for the background of the item.
34
+ */
35
+ color: {
36
+ type: StringConstructor;
37
+ };
38
+ /**
39
+ * Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
40
+ */
41
+ flipRtl: {
42
+ type: BooleanConstructor;
43
+ };
44
+ /**
45
+ * Specifies the exact `src` of an SVG file to use.
46
+ */
47
+ src: {
48
+ type: StringConstructor;
49
+ required: true;
50
+ };
51
+ /**
52
+ * The size of the icon.
53
+ * Available options are: `"small"` and `"large"`.
54
+ */
55
+ size: {
56
+ type: StringConstructor;
57
+ };
58
+ /**
59
+ * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
60
+ * Default, `false`.
61
+ */
62
+ lazy: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ /**
67
+ * When set to `false`, SVG content that is HTTP fetched will not be checked
68
+ * if the response SVG content has any `<script>` elements, or any attributes
69
+ * that start with `on`, such as `onclick`.
70
+ * @default true
71
+ */
72
+ sanitize: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ }>, {
77
+ ns: import('@gct-paas/core').Namespace;
78
+ svgContent: import('vue').Ref<string | undefined, string | undefined>;
79
+ classes: import('vue').ComputedRef<{
80
+ [x: string]: boolean;
81
+ 'flip-rtl': boolean;
82
+ 'icon-rtl': boolean;
83
+ 'ion-color'?: boolean | undefined;
84
+ }>;
85
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
86
+ /**
87
+ * The color to use for the background of the item.
88
+ */
89
+ color: {
90
+ type: StringConstructor;
91
+ };
92
+ /**
93
+ * Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
94
+ */
95
+ flipRtl: {
96
+ type: BooleanConstructor;
97
+ };
98
+ /**
99
+ * Specifies the exact `src` of an SVG file to use.
100
+ */
101
+ src: {
102
+ type: StringConstructor;
103
+ required: true;
104
+ };
105
+ /**
106
+ * The size of the icon.
107
+ * Available options are: `"small"` and `"large"`.
108
+ */
109
+ size: {
110
+ type: StringConstructor;
111
+ };
112
+ /**
113
+ * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
114
+ * Default, `false`.
115
+ */
116
+ lazy: {
117
+ type: BooleanConstructor;
118
+ default: boolean;
119
+ };
120
+ /**
121
+ * When set to `false`, SVG content that is HTTP fetched will not be checked
122
+ * if the response SVG content has any `<script>` elements, or any attributes
123
+ * that start with `on`, such as `onclick`.
124
+ * @default true
125
+ */
126
+ sanitize: {
127
+ type: BooleanConstructor;
128
+ default: boolean;
129
+ };
130
+ }>> & Readonly<{}>, {
131
+ flipRtl: boolean;
132
+ lazy: boolean;
133
+ sanitize: boolean;
134
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;