@gct-paas/core-web 0.1.4-dev.8 → 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 (118) 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 -24962
  5. package/dist/index.min.cjs +1 -67
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.system.min.js +1 -67
  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/base-button/base-button.css +74 -0
  16. package/es/components/base-button/base-button.vue.d.ts +173 -0
  17. package/es/components/base-button/base-button.vue.mjs +7 -0
  18. package/es/components/base-button/base-button.vue3.mjs +179 -0
  19. package/es/components/basic-button/basic-button.css +25 -0
  20. package/es/components/basic-button/basic-button.vue.d.ts +100 -0
  21. package/es/components/basic-button/basic-button.vue.mjs +7 -0
  22. package/es/components/basic-button/basic-button.vue3.mjs +130 -0
  23. package/es/components/code-editor/code-editor.d.ts +1 -1
  24. package/es/components/index.d.ts +10 -1
  25. package/es/components/index.mjs +22 -0
  26. package/es/components/layout/flex-container/flex-container.mjs +94 -0
  27. package/es/components/layout/flex-item/flex-item.mjs +55 -0
  28. package/es/components/layout/grid-container/grid-container.mjs +51 -0
  29. package/es/components/layout/view-container/view-container.mjs +38 -0
  30. package/es/components/svg-icon/svg-icon.css +73 -0
  31. package/es/components/svg-icon/svg-icon.vue.d.ts +40 -0
  32. package/es/components/svg-icon/svg-icon.vue.mjs +50 -0
  33. package/es/components/svg-icon/svg-icon.vue3.mjs +6 -0
  34. package/es/create-app-vue.d.ts +9 -0
  35. package/es/create-app-vue.mjs +17 -0
  36. package/es/directives/drag-resize.d.ts +4 -0
  37. package/es/directives/drag-resize.mjs +42 -0
  38. package/es/directives/index.d.ts +8 -0
  39. package/es/directives/index.mjs +9 -0
  40. package/es/directives/target-loading.d.ts +4 -0
  41. package/es/directives/target-loading.mjs +40 -0
  42. package/es/hooks/index.d.ts +1 -0
  43. package/es/hooks/useDragLine.d.ts +6 -0
  44. package/es/hooks/useDragLine.mjs +79 -0
  45. package/es/index.d.ts +5 -4
  46. package/es/index.mjs +29 -13
  47. package/es/modules/code-editor/index.d.ts +163 -0
  48. package/es/modules/code-editor/index.mjs +8 -0
  49. package/es/modules/code-editor/monaco-editor.css +49 -0
  50. package/es/modules/code-editor/monaco-editor.vue.d.ts +143 -0
  51. package/es/modules/code-editor/monaco-editor.vue.mjs +7 -0
  52. package/es/modules/code-editor/monaco-editor.vue2.mjs +440 -0
  53. package/es/modules/code-editor/useEditorConsole.d.ts +54 -0
  54. package/es/modules/code-editor/useEditorConsole.mjs +194 -0
  55. package/es/modules/code-editor/useMonacoEditor.d.ts +26 -0
  56. package/es/modules/code-editor/useMonacoEditor.mjs +26 -0
  57. package/es/modules/color-picker/index.d.ts +2 -0
  58. package/es/modules/color-picker/src/ColorPicker.css +16 -0
  59. package/es/modules/color-picker/src/ColorPicker.vue.d.ts +49 -0
  60. package/es/modules/color-picker/src/ColorPicker.vue.mjs +8 -0
  61. package/es/modules/color-picker/src/ColorPicker.vue2.mjs +545 -0
  62. package/es/modules/color-picker/src/ColorPicker2.css +156 -0
  63. package/es/modules/gct-dnd/constants/index.d.ts +7 -9
  64. package/es/modules/gct-dnd/constants/index.mjs +18 -7
  65. package/es/modules/global-modal/index.d.ts +5 -0
  66. package/es/modules/global-modal/index.mjs +16 -0
  67. package/es/modules/global-modal/src/BasicModal.vue.d.ts +518 -0
  68. package/es/modules/global-modal/src/BasicModal.vue.mjs +221 -0
  69. package/es/modules/global-modal/src/BasicModal.vue2.mjs +5 -0
  70. package/es/modules/global-modal/src/components/GlboalModal.d.ts +251 -0
  71. package/es/modules/global-modal/src/components/GlboalModal.mjs +40 -0
  72. package/es/modules/global-modal/src/components/ModalClose.css +95 -0
  73. package/es/modules/global-modal/src/components/ModalClose.vue.d.ts +27 -0
  74. package/es/modules/global-modal/src/components/ModalClose.vue.mjs +79 -0
  75. package/es/modules/global-modal/src/components/ModalClose.vue3.mjs +6 -0
  76. package/es/modules/global-modal/src/components/ModalFooter.vue.d.ts +270 -0
  77. package/es/modules/global-modal/src/components/ModalFooter.vue.mjs +44 -0
  78. package/es/modules/global-modal/src/components/ModalFooter.vue2.mjs +5 -0
  79. package/es/modules/global-modal/src/components/ModalHeader.vue.d.ts +17 -0
  80. package/es/modules/global-modal/src/components/ModalHeader.vue.mjs +11 -0
  81. package/es/modules/global-modal/src/components/ModalHeader.vue2.mjs +13 -0
  82. package/es/modules/global-modal/src/components/ModalWrapper.vue.d.ts +95 -0
  83. package/es/modules/global-modal/src/components/ModalWrapper.vue.mjs +26 -0
  84. package/es/modules/global-modal/src/components/ModalWrapper.vue2.mjs +136 -0
  85. package/es/modules/global-modal/src/hooks/useModal.d.ts +6 -0
  86. package/es/modules/global-modal/src/hooks/useModal.mjs +120 -0
  87. package/es/modules/global-modal/src/hooks/useModalContext.d.ts +5 -0
  88. package/es/modules/global-modal/src/hooks/useModalContext.mjs +11 -0
  89. package/es/modules/global-modal/src/hooks/useModalDrag.d.ts +7 -0
  90. package/es/modules/global-modal/src/hooks/useModalDrag.mjs +82 -0
  91. package/es/modules/global-modal/src/hooks/useModalFullScreen.d.ts +11 -0
  92. package/es/modules/global-modal/src/hooks/useModalFullScreen.mjs +16 -0
  93. package/es/modules/global-modal/src/index.css +153 -0
  94. package/es/modules/global-modal/src/props.d.ts +156 -0
  95. package/es/modules/global-modal/src/props.mjs +57 -0
  96. package/es/modules/global-modal/src/typing.d.ts +174 -0
  97. package/es/modules/target-loading/index.d.ts +4 -0
  98. package/es/modules/target-loading/src/createLoading.d.ts +13 -0
  99. package/es/modules/target-loading/src/createLoading.mjs +57 -0
  100. package/es/modules/target-loading/src/target-loading.css +18 -0
  101. package/es/modules/target-loading/src/target-loading.vue.d.ts +57 -0
  102. package/es/modules/target-loading/src/target-loading.vue.mjs +52 -0
  103. package/es/modules/target-loading/src/target-loading.vue3.mjs +7 -0
  104. package/es/modules/target-loading/src/typing.d.ts +9 -0
  105. package/es/modules/target-loading/src/useLoading.d.ts +9 -0
  106. package/es/setup-app.d.ts +1 -0
  107. package/es/setup-app.mjs +4 -0
  108. package/es/types/index.d.ts +190 -0
  109. package/es/utils/index.d.ts +4 -1
  110. package/es/utils/message-util/message-util.d.ts +7 -0
  111. package/es/utils/message-util/message-util.mjs +26 -0
  112. package/es/utils/monaco-loader/monaco-loader.d.ts +59 -0
  113. package/es/utils/monaco-loader/monaco-loader.mjs +88 -0
  114. package/es/utils/overlay-controller/overlay-controller.d.ts +18 -0
  115. package/es/utils/overlay-controller/overlay-controller.mjs +23 -0
  116. package/es/widgets/gct-edit-form/gct-edit-form.d.ts +1 -1
  117. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +1 -1
  118. package/package.json +14 -6
@@ -0,0 +1,179 @@
1
+ import { defineComponent, useCssVars, computed, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, withCtx, toDisplayString, createCommentVNode, createBlock, normalizeStyle } from 'vue';
2
+ import { Modal } from 'ant-design-vue';
3
+ import { debounce } from 'lodash-es';
4
+ import { ButtonStyle, ButtonSize, t } from '@gct-paas/core';
5
+
6
+ const _hoisted_1 = { class: "inline-block align-middle" };
7
+ const _hoisted_2 = {
8
+ key: 0,
9
+ class: "btn-title gct-text-overflow whitespace-nowrap"
10
+ };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "base-button",
13
+ props: {
14
+ block: {
15
+ type: Boolean,
16
+ default: false
17
+ },
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false
21
+ },
22
+ loading: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ title: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ size: {
31
+ type: String,
32
+ default: "default"
33
+ },
34
+ icon: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ type: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ hasIcon: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ hasText: {
47
+ type: Boolean,
48
+ default: true
49
+ },
50
+ danger: {
51
+ type: Boolean,
52
+ default: false
53
+ },
54
+ buttonStyle: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ i18nConfig: {
59
+ type: String,
60
+ default: ""
61
+ },
62
+ hidden: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ confirm: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ confirmText: {
71
+ type: String,
72
+ default: ""
73
+ },
74
+ enableCustomColor: {
75
+ type: Boolean,
76
+ default: false
77
+ },
78
+ backgroundColor: {
79
+ type: String,
80
+ default: ""
81
+ },
82
+ fontColor: {
83
+ type: String,
84
+ default: ""
85
+ }
86
+ },
87
+ emits: ["click"],
88
+ setup(__props, { emit: __emit }) {
89
+ useCssVars((_ctx) => ({
90
+ "v8d035854": props.fontColor,
91
+ "e376d652": props.backgroundColor,
92
+ "v4ee5fd6d": props.type === "primary" ? props.backgroundColor : "transparent"
93
+ }));
94
+ const props = __props;
95
+ const emit = __emit;
96
+ const getVertivalAlign = computed(() => {
97
+ if (!props.hasText) return "text-top";
98
+ else return "text-top";
99
+ });
100
+ const debonceClick = debounce(function() {
101
+ emit("click");
102
+ }, 300);
103
+ const clickEvent = async (evt) => {
104
+ const isAppRun = /\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//.test(
105
+ location.pathname
106
+ );
107
+ let target = evt.target;
108
+ if (target.nodeName == "SPAN") {
109
+ target = target.parentNode;
110
+ }
111
+ target.blur();
112
+ if (props.confirm && isAppRun) {
113
+ await new Promise((res, rej) => {
114
+ Modal.confirm({
115
+ content: props.confirmText || t("sys.pageDesigner.confirmTodo"),
116
+ onOk() {
117
+ res("onOk");
118
+ },
119
+ onCancel() {
120
+ rej("onCancel");
121
+ }
122
+ });
123
+ });
124
+ emit("click");
125
+ return;
126
+ }
127
+ debonceClick();
128
+ };
129
+ return (_ctx, _cache) => {
130
+ const _component_IconNext = resolveComponent("IconNext");
131
+ const _component_a_button = resolveComponent("a-button");
132
+ return openBlock(), createElementBlock("div", _hoisted_1, [
133
+ createVNode(_component_a_button, {
134
+ size: __props.size,
135
+ type: __props.type,
136
+ danger: __props.danger,
137
+ loading: __props.loading,
138
+ block: __props.block,
139
+ disabled: __props.disabled,
140
+ class: normalizeClass([
141
+ __props.enableCustomColor && __props.fontColor ? "btn-font-color" : "",
142
+ __props.enableCustomColor && __props.backgroundColor ? "btn-bg-style" : "",
143
+ { square: __props.buttonStyle === unref(ButtonStyle).SQUARE }
144
+ ]),
145
+ title: __props.title,
146
+ onClick: clickEvent
147
+ }, {
148
+ icon: withCtx(() => [
149
+ __props.hasIcon ? (openBlock(), createBlock(_component_IconNext, {
150
+ key: 0,
151
+ size: __props.buttonStyle === unref(ButtonStyle).SQUARE ? 20 : 16,
152
+ value: __props.icon,
153
+ style: normalizeStyle({
154
+ "--color": "inherit",
155
+ lineHeight: "1",
156
+ verticalAlign: getVertivalAlign.value
157
+ })
158
+ }, null, 8, ["size", "value", "style"])) : createCommentVNode("", true),
159
+ __props.icon && __props.hasText ? (openBlock(), createElementBlock("div", {
160
+ key: 1,
161
+ class: normalizeClass({
162
+ "h-6px": __props.hasIcon && __props.hasText && __props.buttonStyle === unref(ButtonStyle).SQUARE && __props.size !== unref(ButtonSize).SMALL,
163
+ "h-4px": __props.hasIcon && __props.hasText && __props.buttonStyle === unref(ButtonStyle).SQUARE && __props.size === unref(ButtonSize).SMALL,
164
+ "w-6px": __props.hasIcon && __props.hasText && __props.buttonStyle === unref(ButtonStyle).ORDINARY && __props.size !== unref(ButtonSize).SMALL,
165
+ "w-4px": __props.hasIcon && __props.hasText && __props.buttonStyle === unref(ButtonStyle).ORDINARY && __props.size === unref(ButtonSize).SMALL
166
+ })
167
+ }, null, 2)) : createCommentVNode("", true)
168
+ ]),
169
+ default: withCtx(() => [
170
+ __props.hasText ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.hasText ? __props.title : ""), 1)) : createCommentVNode("", true)
171
+ ]),
172
+ _: 1
173
+ }, 8, ["size", "type", "danger", "loading", "block", "disabled", "class", "title"])
174
+ ]);
175
+ };
176
+ }
177
+ });
178
+
179
+ export { _sfc_main as default };
@@ -0,0 +1,25 @@
1
+ .square[data-v-1dbcb2fa] {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ min-width: 72px;
7
+ height: 72px;
8
+ padding: 0;
9
+ }
10
+ .squaref[data-v-1dbcb2fa] {
11
+ min-width: 72px;
12
+ height: 72px;
13
+ padding: 0;
14
+ }
15
+ .line[data-v-1dbcb2fa] {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ }
20
+ [data-v-1dbcb2fa] .group .ant-btn {
21
+ height: 100%;
22
+ }
23
+ [data-v-1dbcb2fa] .ant-btn-loading-icon {
24
+ height: 0;
25
+ }
@@ -0,0 +1,100 @@
1
+ import { PropType } from 'vue';
2
+ import { ButtonStyle as buttonEnum, ButtonColorType } from '@gct-paas/core';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ default?(_: {}): any;
8
+ icon?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
15
+ buttonType: {
16
+ type: PropType<ButtonColorType>;
17
+ default: string;
18
+ };
19
+ buttonTheme: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ disabled: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ loading: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
31
+ icon: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ iconColor: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ buttonStyle: {
40
+ type: PropType<buttonEnum>;
41
+ default: string;
42
+ };
43
+ dropdown: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
48
+ dropdown: (...args: any[]) => void;
49
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
50
+ buttonType: {
51
+ type: PropType<ButtonColorType>;
52
+ default: string;
53
+ };
54
+ buttonTheme: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ disabled: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
62
+ loading: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ icon: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ };
70
+ iconColor: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ buttonStyle: {
75
+ type: PropType<buttonEnum>;
76
+ default: string;
77
+ };
78
+ dropdown: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ }>> & Readonly<{
83
+ onDropdown?: ((...args: any[]) => any) | undefined;
84
+ }>, {
85
+ loading: boolean;
86
+ disabled: boolean;
87
+ icon: string;
88
+ buttonStyle: buttonEnum;
89
+ dropdown: boolean;
90
+ buttonType: ButtonColorType;
91
+ buttonTheme: string;
92
+ iconColor: string;
93
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
94
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
95
+ export default _default;
96
+ type __VLS_WithTemplateSlots<T, S> = T & {
97
+ new (): {
98
+ $slots: S;
99
+ };
100
+ };
@@ -0,0 +1,7 @@
1
+ import _sfc_main from './basic-button.vue3.mjs';
2
+ import './basic-button.css';/* empty css */
3
+ import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
4
+
5
+ const basicButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1dbcb2fa"]]);
6
+
7
+ export { basicButton as default };
@@ -0,0 +1,130 @@
1
+ import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, createBlock, createCommentVNode, createElementVNode, renderSlot, withModifiers } from 'vue';
2
+ import { ButtonStyle } from '@gct-paas/core';
3
+
4
+ const _hoisted_1 = { class: "inline-block align-middle" };
5
+ const _hoisted_2 = { class: "align-middle leading-none" };
6
+ const _hoisted_3 = { class: "align-middle leading-none" };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "basic-button",
9
+ props: {
10
+ buttonType: { type: String, default: "" },
11
+ buttonTheme: { type: String, default: "" },
12
+ disabled: {
13
+ type: Boolean,
14
+ default: false
15
+ },
16
+ loading: {
17
+ type: Boolean,
18
+ default: false
19
+ },
20
+ icon: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ iconColor: { type: String, default: "" },
25
+ buttonStyle: { type: String, default: "" },
26
+ dropdown: {
27
+ type: Boolean,
28
+ default: false
29
+ }
30
+ },
31
+ emits: ["dropdown"],
32
+ setup(__props, { emit: __emit }) {
33
+ const emit = __emit;
34
+ const props = __props;
35
+ const getButtonClass = computed(() => {
36
+ const { buttonTheme, buttonStyle } = props;
37
+ const className = [`ant-btn-${buttonTheme}`];
38
+ if (buttonStyle === ButtonStyle.SQUARE) {
39
+ className.push("square");
40
+ } else {
41
+ className.push("line");
42
+ }
43
+ return className;
44
+ });
45
+ const getDropdownClass = computed(() => {
46
+ const { buttonTheme } = props;
47
+ return `ant-btn-${buttonTheme}`;
48
+ });
49
+ function handel() {
50
+ emit("dropdown");
51
+ }
52
+ return (_ctx, _cache) => {
53
+ const _component_IconNext = resolveComponent("IconNext");
54
+ const _component_a_button = resolveComponent("a-button");
55
+ return openBlock(), createElementBlock("div", _hoisted_1, [
56
+ __props.dropdown ? (openBlock(), createElementBlock("div", {
57
+ key: 0,
58
+ class: normalizeClass(["inline-block ant-btn-group", __props.buttonStyle === unref(ButtonStyle).SQUARE ? "squaref group" : ""])
59
+ }, [
60
+ createVNode(_component_a_button, {
61
+ class: normalizeClass(getButtonClass.value),
62
+ disabled: __props.disabled,
63
+ type: __props.buttonType,
64
+ "ant-click-animating-without-extra-node": "false"
65
+ }, {
66
+ default: withCtx(() => [
67
+ __props.icon ? (openBlock(), createBlock(_component_IconNext, {
68
+ key: 0,
69
+ class: "align-middle",
70
+ value: __props.icon,
71
+ size: __props.buttonStyle === unref(ButtonStyle).SQUARE ? 20 : 14,
72
+ color: __props.iconColor
73
+ }, null, 8, ["value", "size", "color"])) : createCommentVNode("", true),
74
+ __props.icon ? (openBlock(), createElementBlock("div", {
75
+ key: 1,
76
+ class: normalizeClass({
77
+ "inline-block w2px": __props.buttonStyle === unref(ButtonStyle).ORDINARY,
78
+ "h-4px": __props.buttonStyle === unref(ButtonStyle).SQUARE
79
+ })
80
+ }, null, 2)) : createCommentVNode("", true),
81
+ createElementVNode("span", _hoisted_2, [
82
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
83
+ ])
84
+ ]),
85
+ _: 3
86
+ }, 8, ["class", "disabled", "type"]),
87
+ createVNode(_component_a_button, {
88
+ disabled: __props.disabled,
89
+ type: __props.buttonType,
90
+ class: normalizeClass(getDropdownClass.value),
91
+ onClick: withModifiers(handel, ["stop"])
92
+ }, {
93
+ icon: withCtx(() => [
94
+ renderSlot(_ctx.$slots, "icon", {}, void 0, true)
95
+ ]),
96
+ _: 3
97
+ }, 8, ["disabled", "type", "class"])
98
+ ], 2)) : (openBlock(), createBlock(_component_a_button, {
99
+ key: 1,
100
+ disabled: __props.disabled,
101
+ type: __props.buttonType,
102
+ class: normalizeClass(getButtonClass.value)
103
+ }, {
104
+ default: withCtx(() => [
105
+ __props.icon ? (openBlock(), createBlock(_component_IconNext, {
106
+ key: 0,
107
+ class: "align-middle",
108
+ value: __props.icon,
109
+ size: __props.buttonStyle === unref(ButtonStyle).SQUARE ? 20 : 14,
110
+ color: __props.iconColor
111
+ }, null, 8, ["value", "size", "color"])) : createCommentVNode("", true),
112
+ __props.icon ? (openBlock(), createElementBlock("div", {
113
+ key: 1,
114
+ class: normalizeClass({
115
+ "inline-block w3px": __props.buttonStyle === unref(ButtonStyle).ORDINARY,
116
+ "h-4px": __props.buttonStyle === unref(ButtonStyle).SQUARE
117
+ })
118
+ }, null, 2)) : createCommentVNode("", true),
119
+ createElementVNode("span", _hoisted_3, [
120
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
121
+ ])
122
+ ]),
123
+ _: 3
124
+ }, 8, ["disabled", "type", "class"]))
125
+ ]);
126
+ };
127
+ }
128
+ });
129
+
130
+ export { _sfc_main as default };
@@ -30,6 +30,6 @@ export declare const CodeEditor: import('vue').DefineComponent<import('vue').Ext
30
30
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
31
31
  }>, {
32
32
  value: string;
33
- config: editor.IStandaloneEditorConstructionOptions;
34
33
  language: string;
34
+ config: editor.IStandaloneEditorConstructionOptions;
35
35
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,6 +1,15 @@
1
- export { AssetsSvgIcon } from './assets-svg-icon/assets-svg-icon';
1
+ import { App } from 'vue';
2
+ import { default as SvgIcon } from './svg-icon/svg-icon.vue';
3
+ import { AssetsSvgIcon } from './assets-svg-icon/assets-svg-icon';
4
+ import { default as BaseButton } from './base-button/base-button.vue';
5
+ import { default as BasicButton } from './basic-button/basic-button.vue';
6
+ export { SvgIcon, AssetsSvgIcon, BaseButton, BasicButton };
2
7
  export { CodeEditor } from './code-editor/code-editor';
3
8
  export { FlexContainer } from './layout/flex-container/flex-container';
4
9
  export { FlexItem } from './layout/flex-item/flex-item';
5
10
  export { GridContainer } from './layout/grid-container/grid-container';
6
11
  export { ViewContainer } from './layout/view-container/view-container';
12
+ declare const _default: {
13
+ install(app: App): void;
14
+ };
15
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import _sfc_main from './svg-icon/svg-icon.vue.mjs';
2
+ import './layout/view-container/view-container.css';import './layout/flex-container/flex-container.css';import './code-editor/code-editor.css';import './basic-button/basic-button.css';import './base-button/base-button.css';import './svg-icon/svg-icon.css';/* empty css */
3
+ import { AssetsSvgIcon } from './assets-svg-icon/assets-svg-icon.mjs';
4
+ import 'vue';
5
+ import 'ant-design-vue';
6
+ import 'lodash-es';
7
+ import '@gct-paas/core';
8
+ /* empty css */
9
+ /* empty css */
10
+ import '@monaco-editor/loader';
11
+ /* empty css */
12
+ /* empty css */
13
+ /* empty css */
14
+
15
+ const Comps = {
16
+ install(app) {
17
+ app.component(AssetsSvgIcon.name, AssetsSvgIcon);
18
+ app.component(_sfc_main.name, _sfc_main);
19
+ }
20
+ };
21
+
22
+ export { AssetsSvgIcon, _sfc_main as SvgIcon, Comps as default };
@@ -0,0 +1,94 @@
1
+ import { defineComponent, createVNode, isVNode } from 'vue';
2
+ import { FlexItem } from '../flex-item/flex-item.mjs';
3
+ import { useNamespace } from '@gct-paas/core';
4
+ import './flex-container.css';/* empty css */
5
+
6
+ /* eslint-disable @typescript-eslint/no-explicit-any */
7
+
8
+ /**
9
+ * flex 布局容器
10
+ */
11
+ function _isSlot(s) {
12
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
13
+ }
14
+ const FlexContainer = /* @__PURE__ */ defineComponent({
15
+ name: 'FlexContainer',
16
+ props: {
17
+ layout: Object
18
+ },
19
+ setup(props) {
20
+ const ns = useNamespace('flex-container');
21
+ const getStyle = () => {
22
+ const style = {};
23
+ if (props.layout) {
24
+ const {
25
+ alignContent,
26
+ alignItems,
27
+ flexDirection,
28
+ flexWrap,
29
+ justifyContent
30
+ } = props.layout;
31
+ if (alignContent != null) {
32
+ style.alignContent = alignContent;
33
+ }
34
+ if (alignItems != null) {
35
+ style.alignItems = alignItems;
36
+ }
37
+ if (flexDirection != null) {
38
+ style.flexDirection = flexDirection;
39
+ }
40
+ if (flexWrap != null) {
41
+ style.flexWrap = flexWrap;
42
+ }
43
+ if (justifyContent != null) {
44
+ style.justifyContent = justifyContent;
45
+ }
46
+ }
47
+ return style;
48
+ };
49
+ const getItemStyle = model => {
50
+ const style = {};
51
+ if (model) {
52
+ const {
53
+ width,
54
+ height
55
+ } = model;
56
+ if (width != null) {
57
+ style.width = width;
58
+ }
59
+ if (height != null) {
60
+ style.height = height;
61
+ }
62
+ }
63
+ return style;
64
+ };
65
+ return {
66
+ ns,
67
+ getStyle,
68
+ getItemStyle
69
+ };
70
+ },
71
+ render() {
72
+ let items = this.$slots.default?.() || [];
73
+ if (items.length > 0) {
74
+ items = items[0].children || [];
75
+ }
76
+ return createVNode("div", {
77
+ "class": this.ns.b(),
78
+ "style": this.getStyle()
79
+ }, [items.map(item => {
80
+ if (!item) {
81
+ return null;
82
+ }
83
+ const model = item.props.model.flexItem;
84
+ return createVNode(FlexItem, {
85
+ "layout": model,
86
+ "style": this.getItemStyle(item.props.model)
87
+ }, _isSlot(item) ? item : {
88
+ default: () => [item]
89
+ });
90
+ })]);
91
+ }
92
+ });
93
+
94
+ export { FlexContainer };
@@ -0,0 +1,55 @@
1
+ import { defineComponent, createVNode } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+
4
+ /**
5
+ * flex 布局容器项
6
+ */
7
+ const FlexItem = /* @__PURE__ */ defineComponent({
8
+ name: 'FlexItem',
9
+ props: {
10
+ layout: Object
11
+ },
12
+ setup(props) {
13
+ const ns = useNamespace('flex-item');
14
+ const getStyle = () => {
15
+ const style = {};
16
+ if (props.layout) {
17
+ const {
18
+ order,
19
+ alignSelf,
20
+ flexBasis,
21
+ flexGrow,
22
+ flexShrink
23
+ } = props.layout;
24
+ if (order != null) {
25
+ style['order'] = order;
26
+ }
27
+ if (alignSelf != null) {
28
+ style['align-self'] = alignSelf;
29
+ }
30
+ if (flexBasis != null) {
31
+ style['flex-basis'] = flexBasis;
32
+ }
33
+ if (flexGrow != null) {
34
+ style['flex-grow'] = flexGrow;
35
+ }
36
+ if (flexShrink != null) {
37
+ style['flex-shrink'] = flexShrink;
38
+ }
39
+ }
40
+ return style;
41
+ };
42
+ return {
43
+ ns,
44
+ getStyle
45
+ };
46
+ },
47
+ render() {
48
+ return createVNode("div", {
49
+ "class": this.ns.b(),
50
+ "style": this.getStyle()
51
+ }, [this.$slots.default?.()]);
52
+ }
53
+ });
54
+
55
+ export { FlexItem };
@@ -0,0 +1,51 @@
1
+ import { defineComponent, createVNode, resolveComponent, isVNode } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+
6
+ /**
7
+ * 栅格布局
8
+ */
9
+ function _isSlot(s) {
10
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
11
+ }
12
+ const GridContainer = /* @__PURE__ */ defineComponent({
13
+ name: 'GridContainer',
14
+ props: {
15
+ layout: Object
16
+ },
17
+ setup() {
18
+ const ns = useNamespace('grid-container');
19
+ return {
20
+ ns
21
+ };
22
+ },
23
+ render() {
24
+ let _slot;
25
+ const l = this.layout || {};
26
+ let items = this.$slots.default?.() || [];
27
+ if (items.length > 0) {
28
+ items = items[0].children || [];
29
+ }
30
+ return createVNode(resolveComponent("a-row"), {
31
+ "class": this.ns.b(),
32
+ "wrap": true,
33
+ "gutter": l.gutter
34
+ }, _isSlot(_slot = items.map(item => {
35
+ if (!item) {
36
+ return null;
37
+ }
38
+ const model = item.props.model.gridItem;
39
+ return createVNode(resolveComponent("a-col"), {
40
+ "span": model ? model.span ?? 24 : 24,
41
+ "offset": model ? model.offset ?? 0 : 0
42
+ }, _isSlot(item) ? item : {
43
+ default: () => [item]
44
+ });
45
+ })) ? _slot : {
46
+ default: () => [_slot]
47
+ });
48
+ }
49
+ });
50
+
51
+ export { GridContainer };