@tmagic/editor 1.4.8 → 1.4.10

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 (166) hide show
  1. package/dist/style.css +26 -0
  2. package/dist/tmagic-editor.js +3213 -2820
  3. package/dist/tmagic-editor.umd.cjs +3237 -2839
  4. package/package.json +14 -12
  5. package/src/Editor.vue +212 -0
  6. package/src/components/CodeBlockEditor.vue +268 -0
  7. package/src/components/CodeParams.vue +60 -0
  8. package/src/components/ContentMenu.vue +193 -0
  9. package/src/components/FloatingBox.vue +178 -0
  10. package/src/components/Icon.vue +27 -0
  11. package/src/components/Resizer.vue +23 -0
  12. package/src/components/ScrollBar.vue +151 -0
  13. package/src/components/ScrollViewer.vue +128 -0
  14. package/src/components/SearchInput.vue +37 -0
  15. package/src/components/SplitView.vue +186 -0
  16. package/src/components/ToolButton.vue +138 -0
  17. package/src/components/Tree.vue +71 -0
  18. package/src/components/TreeNode.vue +150 -0
  19. package/src/editorProps.ts +120 -0
  20. package/src/fields/Code.vue +50 -0
  21. package/src/fields/CodeLink.vue +80 -0
  22. package/src/fields/CodeSelect.vue +132 -0
  23. package/src/fields/CodeSelectCol.vue +139 -0
  24. package/src/fields/CondOpSelect.vue +87 -0
  25. package/src/fields/DataSourceFieldSelect/FieldSelect.vue +152 -0
  26. package/src/fields/DataSourceFieldSelect/Index.vue +168 -0
  27. package/src/fields/DataSourceFields.vue +329 -0
  28. package/src/fields/DataSourceInput.vue +339 -0
  29. package/src/fields/DataSourceMethodSelect.vue +153 -0
  30. package/src/fields/DataSourceMethods.vue +104 -0
  31. package/src/fields/DataSourceMocks.vue +255 -0
  32. package/src/fields/DataSourceSelect.vue +98 -0
  33. package/src/fields/DisplayConds.vue +145 -0
  34. package/src/fields/EventSelect.vue +375 -0
  35. package/src/fields/KeyValue.vue +137 -0
  36. package/src/fields/PageFragmentSelect.vue +63 -0
  37. package/src/fields/UISelect.vue +135 -0
  38. package/src/hooks/index.ts +24 -0
  39. package/src/hooks/use-code-block-edit.ts +83 -0
  40. package/src/hooks/use-data-source-edit.ts +46 -0
  41. package/src/hooks/use-data-source-method.ts +100 -0
  42. package/src/hooks/use-editor-content-height.ts +26 -0
  43. package/src/hooks/use-filter.ts +55 -0
  44. package/src/hooks/use-float-box.ts +76 -0
  45. package/src/hooks/use-getso.ts +35 -0
  46. package/src/hooks/use-next-float-box-position.ts +29 -0
  47. package/src/hooks/use-node-status.ts +48 -0
  48. package/src/hooks/use-stage.ts +129 -0
  49. package/src/hooks/use-window-rect.ts +20 -0
  50. package/src/icons/AppManageIcon.vue +15 -0
  51. package/src/icons/CenterIcon.vue +13 -0
  52. package/src/icons/CodeIcon.vue +28 -0
  53. package/src/icons/FolderMinusIcon.vue +22 -0
  54. package/src/icons/PinIcon.vue +25 -0
  55. package/src/icons/PinnedIcon.vue +25 -0
  56. package/src/index.ts +124 -0
  57. package/src/initService.ts +448 -0
  58. package/src/layouts/AddPageBox.vue +55 -0
  59. package/src/layouts/CodeEditor.vue +226 -0
  60. package/src/layouts/Framework.vue +165 -0
  61. package/src/layouts/NavMenu.vue +200 -0
  62. package/src/layouts/PropsPanel.vue +131 -0
  63. package/src/layouts/page-bar/AddButton.vue +48 -0
  64. package/src/layouts/page-bar/PageBar.vue +165 -0
  65. package/src/layouts/page-bar/PageBarScrollContainer.vue +192 -0
  66. package/src/layouts/page-bar/PageList.vue +55 -0
  67. package/src/layouts/page-bar/SwitchTypeButton.vue +45 -0
  68. package/src/layouts/sidebar/ComponentListPanel.vue +134 -0
  69. package/src/layouts/sidebar/Sidebar.vue +278 -0
  70. package/src/layouts/sidebar/code-block/CodeBlockList.vue +160 -0
  71. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +70 -0
  72. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +84 -0
  73. package/src/layouts/sidebar/data-source/DataSourceList.vue +172 -0
  74. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +106 -0
  75. package/src/layouts/sidebar/layer/LayerMenu.vue +128 -0
  76. package/src/layouts/sidebar/layer/LayerNodeTool.vue +32 -0
  77. package/src/layouts/sidebar/layer/LayerPanel.vue +119 -0
  78. package/src/layouts/sidebar/layer/use-click.ts +113 -0
  79. package/src/layouts/sidebar/layer/use-drag.ts +167 -0
  80. package/src/layouts/sidebar/layer/use-keybinding.ts +54 -0
  81. package/src/layouts/sidebar/layer/use-node-status.ts +114 -0
  82. package/src/layouts/workspace/Breadcrumb.vue +35 -0
  83. package/src/layouts/workspace/Workspace.vue +46 -0
  84. package/src/layouts/workspace/viewer/NodeListMenu.vue +115 -0
  85. package/src/layouts/workspace/viewer/Stage.vue +246 -0
  86. package/src/layouts/workspace/viewer/StageOverlay.vue +68 -0
  87. package/src/layouts/workspace/viewer/ViewerMenu.vue +145 -0
  88. package/src/services/BaseService.ts +230 -0
  89. package/src/services/codeBlock.ts +327 -0
  90. package/src/services/componentList.ts +58 -0
  91. package/src/services/dataSource.ts +216 -0
  92. package/src/services/dep.ts +152 -0
  93. package/src/services/editor.ts +1135 -0
  94. package/src/services/events.ts +93 -0
  95. package/src/services/history.ts +126 -0
  96. package/src/services/keybinding.ts +220 -0
  97. package/src/services/props.ts +286 -0
  98. package/src/services/stageOverlay.ts +212 -0
  99. package/src/services/storage.ts +155 -0
  100. package/src/services/ui.ts +157 -0
  101. package/src/shims-vue.d.ts +6 -0
  102. package/src/theme/breadcrumb.scss +6 -0
  103. package/src/theme/code-block.scss +6 -0
  104. package/src/theme/code-editor.scss +38 -0
  105. package/src/theme/common/var.scss +14 -0
  106. package/src/theme/component-list-panel.scss +95 -0
  107. package/src/theme/content-menu.scss +76 -0
  108. package/src/theme/data-source-field-select.scss +16 -0
  109. package/src/theme/data-source-field.scss +12 -0
  110. package/src/theme/data-source-fields.scss +13 -0
  111. package/src/theme/data-source-input.scss +18 -0
  112. package/src/theme/data-source-methods.scss +13 -0
  113. package/src/theme/data-source.scss +28 -0
  114. package/src/theme/event.scss +37 -0
  115. package/src/theme/floating-box.scss +32 -0
  116. package/src/theme/framework.scss +69 -0
  117. package/src/theme/icon.scss +12 -0
  118. package/src/theme/index.scss +10 -0
  119. package/src/theme/key-value.scss +20 -0
  120. package/src/theme/layer-panel.scss +26 -0
  121. package/src/theme/layout.scss +9 -0
  122. package/src/theme/nav-menu.scss +78 -0
  123. package/src/theme/page-bar.scss +102 -0
  124. package/src/theme/page-fragment-select.scss +14 -0
  125. package/src/theme/props-panel.scss +55 -0
  126. package/src/theme/resizer.scss +66 -0
  127. package/src/theme/ruler.scss +38 -0
  128. package/src/theme/search-input.scss +14 -0
  129. package/src/theme/sidebar.scss +79 -0
  130. package/src/theme/stage.scss +76 -0
  131. package/src/theme/theme.scss +28 -0
  132. package/src/theme/tree.scss +89 -0
  133. package/src/theme/workspace.scss +9 -0
  134. package/src/type.ts +780 -0
  135. package/src/utils/compose.ts +52 -0
  136. package/src/utils/config.ts +29 -0
  137. package/src/utils/content-menu.ts +95 -0
  138. package/src/utils/data-source/formConfigs/base.ts +30 -0
  139. package/src/utils/data-source/formConfigs/http.ts +60 -0
  140. package/src/utils/data-source/index.ts +249 -0
  141. package/src/utils/editor.ts +313 -0
  142. package/src/utils/idle-task.ts +72 -0
  143. package/src/utils/index.ts +24 -0
  144. package/src/utils/keybinding-config.ts +125 -0
  145. package/src/utils/logger.ts +47 -0
  146. package/src/utils/monaco-editor.ts +8 -0
  147. package/src/utils/operator.ts +106 -0
  148. package/src/utils/props.ts +407 -0
  149. package/src/utils/scroll-viewer.ts +165 -0
  150. package/src/utils/tree.ts +15 -0
  151. package/src/utils/undo-redo.ts +76 -0
  152. package/types/editorProps.d.ts +3 -1
  153. package/types/fields/CondOpSelect.vue.d.ts +17 -0
  154. package/types/fields/DataSourceFieldSelect/FieldSelect.vue.d.ts +36 -0
  155. package/types/fields/{DataSourceFieldSelect.vue.d.ts → DataSourceFieldSelect/Index.vue.d.ts} +1 -1
  156. package/types/fields/DisplayConds.vue.d.ts +32 -0
  157. package/types/index.d.ts +3 -1
  158. package/types/layouts/Framework.vue.d.ts +3 -1
  159. package/types/layouts/PropsPanel.vue.d.ts +21 -21
  160. package/types/layouts/page-bar/PageBar.vue.d.ts +6 -0
  161. package/types/layouts/page-bar/PageBarScrollContainer.vue.d.ts +3 -0
  162. package/types/layouts/page-bar/PageList.vue.d.ts +25 -0
  163. package/types/services/ui.d.ts +1 -0
  164. package/types/type.d.ts +30 -4
  165. package/types/utils/data-source/index.d.ts +1 -0
  166. package/types/utils/props.d.ts +12 -0
@@ -0,0 +1,157 @@
1
+ /*
2
+ * Tencent is pleased to support the open source community by making TMagicEditor available.
3
+ *
4
+ * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { reactive } from 'vue';
20
+ import type { Writable } from 'type-fest';
21
+
22
+ import { convertToNumber } from '@tmagic/utils';
23
+
24
+ import editorService from '@editor/services/editor';
25
+ import type { AsyncHookPlugin, StageRect, UiState } from '@editor/type';
26
+
27
+ import BaseService from './BaseService';
28
+
29
+ const state = reactive<UiState>({
30
+ uiSelectMode: false,
31
+ showSrc: false,
32
+ zoom: 1,
33
+ stageContainerRect: {
34
+ width: 0,
35
+ height: 0,
36
+ },
37
+ stageRect: {
38
+ width: 375,
39
+ height: 817,
40
+ },
41
+ columnWidth: {
42
+ left: 0,
43
+ right: 0,
44
+ center: 0,
45
+ },
46
+ showGuides: true,
47
+ showRule: true,
48
+ propsPanelSize: 'small',
49
+ showAddPageButton: true,
50
+ showPageListButton: true,
51
+ hideSlideBar: false,
52
+ sideBarItems: [],
53
+ navMenuRect: {
54
+ left: 0,
55
+ top: 0,
56
+ width: 0,
57
+ height: 0,
58
+ },
59
+ frameworkRect: {
60
+ width: 0,
61
+ height: 0,
62
+ left: 0,
63
+ top: 0,
64
+ },
65
+ });
66
+
67
+ const canUsePluginMethods = {
68
+ async: ['zoom', 'calcZoom'] as const,
69
+ sync: [] as const,
70
+ };
71
+
72
+ type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
73
+
74
+ class Ui extends BaseService {
75
+ constructor() {
76
+ super(canUsePluginMethods.async.map((methodName) => ({ name: methodName, isAsync: true })));
77
+ }
78
+
79
+ public set<K extends keyof UiState, T extends UiState[K]>(name: K, value: T) {
80
+ const mask = editorService.get('stage')?.mask;
81
+
82
+ if (name === 'stageRect') {
83
+ this.setStageRect(value as unknown as StageRect);
84
+ return;
85
+ }
86
+
87
+ if (name === 'showGuides') {
88
+ mask?.showGuides(value as unknown as boolean);
89
+ }
90
+
91
+ if (name === 'showRule') {
92
+ mask?.showRule(value as unknown as boolean);
93
+ }
94
+
95
+ state[name] = value;
96
+ }
97
+
98
+ public get<K extends keyof UiState>(name: K) {
99
+ return state[name];
100
+ }
101
+
102
+ public async zoom(zoom: number) {
103
+ this.set('zoom', (this.get('zoom') * 100 + zoom * 100) / 100);
104
+ if (this.get('zoom') < 0.1) this.set('zoom', 0.1);
105
+ }
106
+
107
+ public async calcZoom() {
108
+ const { stageRect, stageContainerRect } = state;
109
+ const { height, width } = stageContainerRect;
110
+ if (!width || !height) return 1;
111
+
112
+ let stageWidth: number = convertToNumber(stageRect.width, width);
113
+ let stageHeight: number = convertToNumber(stageRect.height, height);
114
+
115
+ // 30为标尺的大小
116
+ stageWidth = stageWidth + 30;
117
+ stageHeight = stageHeight + 30;
118
+
119
+ if (width > stageWidth && height > stageHeight) {
120
+ return 1;
121
+ }
122
+ // 60/80是为了不要让画布太过去贴住四周(这样好看些)
123
+ return Math.min((width - 60) / stageWidth || 1, (height - 80) / stageHeight || 1);
124
+ }
125
+
126
+ public resetState() {
127
+ this.set('showSrc', false);
128
+ this.set('uiSelectMode', false);
129
+ this.set('zoom', 1);
130
+ this.set('stageContainerRect', {
131
+ width: 0,
132
+ height: 0,
133
+ });
134
+ }
135
+
136
+ public destroy() {
137
+ this.resetState();
138
+ this.removeAllListeners();
139
+ this.removeAllPlugins();
140
+ }
141
+
142
+ public usePlugin(options: AsyncHookPlugin<AsyncMethodName, Ui>): void {
143
+ super.usePlugin(options);
144
+ }
145
+
146
+ private async setStageRect(value: StageRect) {
147
+ state.stageRect = {
148
+ ...state.stageRect,
149
+ ...value,
150
+ };
151
+ state.zoom = await this.calcZoom();
152
+ }
153
+ }
154
+
155
+ export type UiService = Ui;
156
+
157
+ export default new Ui();
@@ -0,0 +1,6 @@
1
+ declare module '*.vue' {
2
+ import { DefineComponent } from 'vue';
3
+
4
+ const component: DefineComponent<{}, {}, any>;
5
+ export default component;
6
+ }
@@ -0,0 +1,6 @@
1
+ .m-editor-breadcrumb {
2
+ position: absolute;
3
+ left: 5px;
4
+ top: 5px;
5
+ z-index: 10;
6
+ }
@@ -0,0 +1,6 @@
1
+ .m-fields-code-select {
2
+ width: 100%;
3
+ .el-card__header {
4
+ display: none;
5
+ }
6
+ }
@@ -0,0 +1,38 @@
1
+ .m-container-vs-code {
2
+ .el-form-item {
3
+ margin-bottom: 0;
4
+ }
5
+ }
6
+
7
+ .magic-code-editor {
8
+ width: 100%;
9
+ }
10
+
11
+ .magic-code-editor-wrapper {
12
+ width: 100%;
13
+ height: 100%;
14
+ position: relative;
15
+
16
+ &.full-screen {
17
+ position: fixed;
18
+ z-index: 10000;
19
+ top: 0;
20
+ left: 0;
21
+ }
22
+
23
+ .magic-code-editor-content {
24
+ width: 100%;
25
+ height: 100%;
26
+
27
+ .margin {
28
+ margin: 0;
29
+ }
30
+ }
31
+
32
+ .magic-code-editor-full-screen-icon {
33
+ position: absolute;
34
+ top: 5px;
35
+ right: 0;
36
+ z-index: 11;
37
+ }
38
+ }
@@ -0,0 +1,14 @@
1
+ $--theme-color: #2882e0;
2
+
3
+ $--font-color: #313a40;
4
+ $--border-color: #d9dbdd;
5
+ $--hover-color: #f3f5f9;
6
+
7
+ $--nav-height: 35px;
8
+ $--nav-color: #313a40;
9
+ $--nav--background-color: #ffffff;
10
+
11
+ $--sidebar-heder-background-color: $--theme-color;
12
+ $--sidebar-content-background-color: #ffffff;
13
+
14
+ $--page-bar-height: 32px;
@@ -0,0 +1,95 @@
1
+ .ui-component-panel {
2
+ &.tmagic-design-collapse {
3
+ border-top: 0 !important;
4
+ margin-top: 48px;
5
+ background-color: $--sidebar-content-background-color;
6
+
7
+ .tmagic-design-collapse-item {
8
+ > div:first-of-type {
9
+ border-bottom: 1px solid $--border-color;
10
+ margin-bottom: 10px;
11
+ }
12
+ }
13
+
14
+ .el-collapse-item__header,
15
+ .t-collapse-panel__header {
16
+ background: $--sidebar-content-background-color;
17
+ color: $--font-color;
18
+ height: 25px;
19
+ line-height: 25px;
20
+ padding-left: 10px;
21
+ font-size: 12px;
22
+
23
+ i {
24
+ margin-right: 5px;
25
+ font-size: 14px;
26
+ }
27
+ }
28
+
29
+ .el-collapse-item__wrap,
30
+ .t-collapse-panel__body {
31
+ background: $--sidebar-content-background-color;
32
+ border-bottom: 0;
33
+
34
+ .el-collapse-item__content,
35
+ .t-collapse-panel__content {
36
+ padding: 10px;
37
+ display: flex;
38
+ flex-wrap: wrap;
39
+ }
40
+
41
+ .component-item {
42
+ display: flex;
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ margin: 5px 10px;
46
+ box-sizing: border-box;
47
+ color: $--font-color;
48
+ flex-direction: column;
49
+ width: 42px;
50
+ cursor: pointer;
51
+
52
+ i {
53
+ font-size: 20px;
54
+ background: #fff;
55
+ height: 40px;
56
+ width: 40px;
57
+ line-height: 40px;
58
+ border-radius: 5px;
59
+ color: #909090;
60
+ border: 1px solid $--border-color;
61
+ display: flex;
62
+ justify-content: space-evenly;
63
+ align-items: center;
64
+ margin-bottom: 5px;
65
+
66
+ &:hover {
67
+ background: #2882e0;
68
+ color: #fff;
69
+ border-color: #4e8be1;
70
+ }
71
+ }
72
+
73
+ span {
74
+ font-size: 12px;
75
+ text-align: center;
76
+ }
77
+
78
+ .el-tooltip {
79
+ width: 50px;
80
+ height: 30px;
81
+ line-height: 15px;
82
+ display: block;
83
+ white-space: normal;
84
+ margin: 0;
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ .t-collapse {
91
+ margin-top: 0;
92
+ padding-top: 48px;
93
+ position: relative;
94
+ }
95
+ }
@@ -0,0 +1,76 @@
1
+ .magic-editor-content-menu {
2
+ position: fixed;
3
+ font-size: 12px;
4
+ background: #fff;
5
+ box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);
6
+ z-index: 1000;
7
+ transform-origin: 0% 0%;
8
+ font-weight: 600;
9
+ padding: 4px 0px;
10
+ overflow: auto;
11
+ max-height: 80%;
12
+ min-width: 180px;
13
+
14
+ .menu-item {
15
+ color: #333;
16
+ display: flex;
17
+ -webkit-box-align: center;
18
+ align-items: center;
19
+ cursor: pointer;
20
+ min-width: 140px;
21
+ transition: all 0.2s ease 0s;
22
+ padding: 5px 14px;
23
+ border-left: 2px solid transparent;
24
+
25
+ .el-button {
26
+ width: 100%;
27
+ justify-content: flex-start;
28
+ }
29
+
30
+ .el-button--text,
31
+ i {
32
+ color: $--font-color;
33
+ }
34
+
35
+ .magic-editor-icon {
36
+ margin-right: 5px;
37
+ }
38
+
39
+ &.divider {
40
+ padding: 0 14px;
41
+
42
+ .el-divider {
43
+ margin: 0;
44
+ }
45
+ }
46
+
47
+ &.button {
48
+ &:hover {
49
+ background-color: $--hover-color;
50
+ .tmagic-design-button,
51
+ .tmagic-design-button:active,
52
+ .tmagic-design-button:focus {
53
+ color: $--font-color;
54
+ }
55
+
56
+ &.menu-item i {
57
+ color: $--font-color;
58
+ }
59
+ }
60
+
61
+ &.active {
62
+ background-color: $--theme-color;
63
+ .tmagic-design-button,
64
+ .tmagic-design-button:active,
65
+ .tmagic-design-button:focus {
66
+ color: #fff;
67
+ background-color: transparent;
68
+ }
69
+
70
+ &.menu-item i {
71
+ color: #fff;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,16 @@
1
+ .m-fields-data-source-field-select {
2
+ width: 100%;
3
+ .m-editor-data-source-field-select {
4
+ display: flex;
5
+ width: 100%;
6
+
7
+ .tmagic-design-select {
8
+ flex: 1;
9
+ margin-right: 10px;
10
+ }
11
+
12
+ .tmagic-design-cascader {
13
+ flex: 2;
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,12 @@
1
+ .m-fields-data-source-select,
2
+ .m-fields-data-source-field-select,
3
+ .m-fields-data-source-method-select .data-source-method-select-container,
4
+ .m-fields-code-select-col .code-select-container {
5
+ width: 100%;
6
+ display: flex;
7
+ align-items: center;
8
+
9
+ .m-fields-select-action-button {
10
+ margin-left: 5px;
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ .m-editor-data-source-fields {
2
+ width: 100%;
3
+
4
+ .tmagic-design-table {
5
+ width: 100%;
6
+ }
7
+
8
+ .m-editor-data-source-fields-footer {
9
+ display: flex;
10
+ justify-content: flex-end;
11
+ margin-top: 15px;
12
+ }
13
+ }
@@ -0,0 +1,18 @@
1
+ .tmagic-data-source-input-text {
2
+ .el-input__wrapper.tmagic-data-source-input-text-wrapper {
3
+ overflow: hidden;
4
+ padding-right: 30px;
5
+ }
6
+
7
+ .el-input__inner {
8
+ display: flex;
9
+ align-items: center;
10
+ overflow: hidden;
11
+ white-space: nowrap;
12
+ }
13
+
14
+ .tmagic-data-source-input-icon {
15
+ position: absolute;
16
+ right: 7px;
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ .m-editor-data-source-methods {
2
+ width: 100%;
3
+
4
+ .tmagic-design-table {
5
+ width: 100%;
6
+ }
7
+
8
+ .m-editor-data-source-methods-footer {
9
+ display: flex;
10
+ justify-content: flex-end;
11
+ margin-top: 15px;
12
+ }
13
+ }
@@ -0,0 +1,28 @@
1
+ .data-source-list-panel {
2
+ .list-container {
3
+ .list-item {
4
+ .codeIcon {
5
+ width: 22px;
6
+ height: 22px;
7
+ margin-right: 5px;
8
+ }
9
+
10
+ .compIcon {
11
+ width: 22px;
12
+ height: 22px;
13
+ margin-right: 5px;
14
+ }
15
+ }
16
+ }
17
+ }
18
+
19
+ .data-source-list-panel-add-menu {
20
+ .tmagic-design-button {
21
+ width: 100%;
22
+ text-align: left;
23
+
24
+ span {
25
+ width: 100%;
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,37 @@
1
+ .m-fields-event-select {
2
+ width: 100%;
3
+ .fullWidth {
4
+ width: 100%;
5
+ }
6
+
7
+ .event-select-code {
8
+ margin-left: 20px;
9
+ width: auto;
10
+ }
11
+
12
+ .m-form-panel {
13
+ margin: 10px 0px;
14
+ }
15
+
16
+ .el-card.is-always-shadow {
17
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.12);
18
+ }
19
+ }
20
+ .m-fields-code-select-col,
21
+ .m-fields-data-source-method-select {
22
+ width: 100%;
23
+ }
24
+
25
+ .code-select-container,
26
+ .data-source-method-select-container {
27
+ display: flex;
28
+ align-items: center;
29
+ .select {
30
+ flex: 10 0 100px;
31
+ }
32
+ .icon {
33
+ flex: 1 0 20px;
34
+ cursor: pointer;
35
+ margin-right: 5px;
36
+ }
37
+ }
@@ -0,0 +1,32 @@
1
+ .m-editor-float-box {
2
+ position: absolute;
3
+ background-color: #fff;
4
+ z-index: 100;
5
+ border: 1px solid $--border-color;
6
+ display: flex;
7
+ flex-direction: column;
8
+ max-height: 100%;
9
+ max-width: 100%;
10
+
11
+ .m-editor-float-box-title {
12
+ text-align: center;
13
+ font-size: 14px;
14
+ font-weight: 600;
15
+ padding: 5px;
16
+ cursor: move;
17
+ display: flex;
18
+ justify-content: space-between;
19
+ align-items: center;
20
+ border-bottom: 1px solid $--border-color;
21
+ }
22
+
23
+ .m-editor-float-box-body {
24
+ overflow: auto;
25
+ flex: 1;
26
+ padding: 0 16px;
27
+ }
28
+ }
29
+
30
+ .m-editor-floating-box-moveable {
31
+ opacity: 0;
32
+ }
@@ -0,0 +1,69 @@
1
+ .m-editor {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+
6
+ &-content {
7
+ height: calc(100% - #{$--nav-height});
8
+ }
9
+
10
+ &-framework-center {
11
+ position: relative;
12
+ transform: translateZ(0);
13
+ flex: 1;
14
+ }
15
+
16
+ &-framework-left {
17
+ background-color: $--sidebar-content-background-color;
18
+ }
19
+
20
+ &-framework-center .el-scrollbar__view {
21
+ height: 100%;
22
+ min-height: 100%;
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ }
27
+
28
+ &-empty {
29
+ &-panel {
30
+ display: flex;
31
+ flex: 1;
32
+ justify-content: center;
33
+ align-items: center;
34
+ flex-direction: column;
35
+ height: calc(100% - #{$--page-bar-height});
36
+ }
37
+
38
+ &-content {
39
+ display: flex;
40
+ justify-content: space-evenly;
41
+ flex-direction: row;
42
+ width: 100%;
43
+ }
44
+
45
+ &-button {
46
+ border: 3px solid rgba(0, 0, 0, 0.2);
47
+ padding: 10px 40px;
48
+ color: rgba(0, 0, 0, 0.6);
49
+ cursor: pointer;
50
+
51
+ i {
52
+ height: 180px;
53
+ line-height: 180px;
54
+ font-size: 100px;
55
+ }
56
+
57
+ p {
58
+ text-align: center;
59
+ font-size: 20px;
60
+ margin-top: 5px;
61
+ }
62
+
63
+ &:hover {
64
+ border-color: $--theme-color;
65
+ color: $--theme-color;
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,12 @@
1
+ .tmagic-design-icon {
2
+ --color: inherit;
3
+ height: 1em;
4
+ width: 1em;
5
+ position: relative;
6
+ fill: currentColor;
7
+
8
+ img {
9
+ max-width: 100%;
10
+ max-height: 100%;
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ @import "./common/var.scss";
2
+ @import "./theme.scss";
3
+
4
+ .fade-enter-active,
5
+ .fade-leave-active {
6
+ transition: opacity 0.5s;
7
+ }
8
+ .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
9
+ opacity: 0;
10
+ }
@@ -0,0 +1,20 @@
1
+ .m-fields-key-value {
2
+ display: flex;
3
+ justify-items: center;
4
+ align-items: top;
5
+ width: 100%;
6
+ }
7
+
8
+ .m-fields-key-value-item {
9
+ display: flex;
10
+ margin-bottom: 10px;
11
+ align-items: center;
12
+ }
13
+
14
+ .m-fileds-key-value-delimiter {
15
+ margin: 0 10px;
16
+ }
17
+
18
+ .m-fileds-key-value-delete {
19
+ margin-left: 10px;
20
+ }