@tmagic/element-plus-adapter 1.2.0-beta.3

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.
package/dist/index.js ADDED
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const element_plus_1 = require("element-plus");
4
+ const adapter = {
5
+ message: element_plus_1.ElMessage,
6
+ messageBox: element_plus_1.ElMessageBox,
7
+ components: {
8
+ button: {
9
+ component: element_plus_1.ElButton,
10
+ props: (props) => props,
11
+ },
12
+ card: {
13
+ component: element_plus_1.ElCard,
14
+ props: (props) => props,
15
+ },
16
+ cascader: {
17
+ component: element_plus_1.ElCascader,
18
+ props: (props) => props,
19
+ },
20
+ checkbox: {
21
+ component: element_plus_1.ElCheckbox,
22
+ props: (props) => props,
23
+ },
24
+ checkboxGroup: {
25
+ component: element_plus_1.ElCheckboxGroup,
26
+ props: (props) => props,
27
+ },
28
+ col: {
29
+ component: element_plus_1.ElCol,
30
+ props: (props) => props,
31
+ },
32
+ collapse: {
33
+ component: element_plus_1.ElCollapse,
34
+ props: (props) => props,
35
+ },
36
+ collapseItem: {
37
+ component: element_plus_1.ElCollapseItem,
38
+ props: (props) => props,
39
+ },
40
+ colorPicker: {
41
+ component: element_plus_1.ElColorPicker,
42
+ props: (props) => props,
43
+ },
44
+ datePicker: {
45
+ component: element_plus_1.ElDatePicker,
46
+ props: (props) => props,
47
+ },
48
+ dialog: {
49
+ component: element_plus_1.ElDialog,
50
+ props: (props) => props,
51
+ },
52
+ divider: {
53
+ component: element_plus_1.ElDivider,
54
+ props: (props) => props,
55
+ },
56
+ dropdown: {
57
+ component: element_plus_1.ElDropdown,
58
+ props: (props) => props,
59
+ },
60
+ dropdownItem: {
61
+ component: element_plus_1.ElDropdownItem,
62
+ props: (props) => props,
63
+ },
64
+ dropdownMenu: {
65
+ component: element_plus_1.ElDropdownMenu,
66
+ props: (props) => props,
67
+ },
68
+ form: {
69
+ component: element_plus_1.ElForm,
70
+ props: (props) => props,
71
+ },
72
+ formItem: {
73
+ component: element_plus_1.ElFormItem,
74
+ props: (props) => props,
75
+ },
76
+ icon: {
77
+ component: element_plus_1.ElIcon,
78
+ props: (props) => props,
79
+ },
80
+ input: {
81
+ component: element_plus_1.ElInput,
82
+ props: (props) => props,
83
+ },
84
+ inputNumber: {
85
+ component: element_plus_1.ElInputNumber,
86
+ props: (props) => props,
87
+ },
88
+ option: {
89
+ component: element_plus_1.ElOption,
90
+ props: (props) => props,
91
+ },
92
+ optionGroup: {
93
+ component: element_plus_1.ElOptionGroup,
94
+ props: (props) => props,
95
+ },
96
+ pagination: {
97
+ component: element_plus_1.ElPagination,
98
+ props: (props) => props,
99
+ },
100
+ popover: {
101
+ component: element_plus_1.ElPopover,
102
+ props: (props) => props,
103
+ },
104
+ radio: {
105
+ component: element_plus_1.ElRadio,
106
+ props: (props) => props,
107
+ },
108
+ radioGroup: {
109
+ component: element_plus_1.ElRadioGroup,
110
+ props: (props) => props,
111
+ },
112
+ row: {
113
+ component: element_plus_1.ElRow,
114
+ props: (props) => props,
115
+ },
116
+ scrollbar: {
117
+ component: element_plus_1.ElScrollbar,
118
+ props: (props) => props,
119
+ },
120
+ select: {
121
+ component: element_plus_1.ElSelect,
122
+ props: (props) => props,
123
+ },
124
+ step: {
125
+ component: element_plus_1.ElStep,
126
+ props: (props) => props,
127
+ },
128
+ steps: {
129
+ component: element_plus_1.ElSteps,
130
+ props: (props) => props,
131
+ },
132
+ switch: {
133
+ component: element_plus_1.ElSwitch,
134
+ props: (props) => props,
135
+ },
136
+ table: {
137
+ component: element_plus_1.ElTable,
138
+ props: (props) => props,
139
+ },
140
+ tableColumn: {
141
+ component: element_plus_1.ElTableColumn,
142
+ props: (props) => props,
143
+ },
144
+ tabPane: {
145
+ component: element_plus_1.ElTabPane,
146
+ props: (props) => props,
147
+ },
148
+ tabs: {
149
+ component: element_plus_1.ElTabs,
150
+ props: (props) => props,
151
+ },
152
+ tag: {
153
+ component: element_plus_1.ElTabs,
154
+ props: (props) => props,
155
+ },
156
+ timePicker: {
157
+ component: element_plus_1.ElTimePicker,
158
+ props: (props) => props,
159
+ },
160
+ tooltip: {
161
+ component: element_plus_1.ElTooltip,
162
+ props: (props) => props,
163
+ },
164
+ tree: {
165
+ component: element_plus_1.ElTree,
166
+ props: (props) => props,
167
+ },
168
+ upload: {
169
+ component: element_plus_1.ElUpload,
170
+ props: (props) => props,
171
+ },
172
+ },
173
+ };
174
+ exports.default = adapter;
175
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,+CA2CsB;AAEtB,MAAM,OAAO,GAAQ;IACnB,OAAO,EAAE,wBAAS;IAClB,UAAU,EAAE,2BAAY;IACxB,UAAU,EAAE;QACV,MAAM,EAAE;YACN,SAAS,EAAE,uBAAQ;YACnB,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK;SAC7B;QAED,IAAI,EAAE;YACJ,SAAS,EAAE,qBAAM;YACjB,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK;SAC7B;QAED,QAAQ,EAAE;YACR,SAAS,EAAE,yBAAU;YACrB,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK;SAC7B;QAED,QAAQ,EAAE;YACR,SAAS,EAAE,yBAAU;YACrB,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK;SAC7B;QAED,aAAa,EAAE;YACb,SAAS,EAAE,8BAAe;YAC1B,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK;SAC7B;QAED,GAAG,EAAE;YACH,SAAS,EAAE,oBAAK;YAChB,KAAK,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK;SAC7B;QAED,QAAQ,EAAE;YACR,SAAS,EAAE,yBAAU;YACrB,KAAK,EAAE,CAAC,KAAU,EAA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
+ "main": "dist/tmagic-element-plus-adapter.umd.js",
8
+ "module": "dist/tmagic-element-plus-adapter.mjs",
9
+ "types": "types/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/tmagic-element-plus-adapter.mjs",
13
+ "require": "./dist/tmagic-element-plus-adapter.umd.js"
14
+ },
15
+ "./*": "./*"
16
+ },
17
+ "license": "Apache-2.0",
18
+ "scripts": {
19
+ "build": "tsc -b tsconfig.build.json",
20
+ "clear:type": "rimraf ./types"
21
+ },
22
+ "engines": {
23
+ "node": ">=14"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/Tencent/tmagic-editor.git"
28
+ },
29
+ "homepage": "https://tencent.github.io/tmagic-editor/docs/",
30
+ "keywords": [
31
+ "design",
32
+ "vue",
33
+ "vue3",
34
+ "typescript"
35
+ ],
36
+ "dependencies": {
37
+ "element-plus": "^2.2.17",
38
+ "vue": "^3.2.37"
39
+ },
40
+ "peerDependencies": {
41
+ "element-plus": "^2.2.17",
42
+ "vue": "^3.2.37"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^15.12.4",
46
+ "rimraf": "^3.0.2",
47
+ "typescript": "^4.7.4",
48
+ "vite": "^3.1.3"
49
+ }
50
+ }
package/src/index.ts ADDED
@@ -0,0 +1,257 @@
1
+ import {
2
+ ElButton,
3
+ ElCard,
4
+ ElCascader,
5
+ ElCheckbox,
6
+ ElCheckboxGroup,
7
+ ElCol,
8
+ ElCollapse,
9
+ ElCollapseItem,
10
+ ElColorPicker,
11
+ ElDatePicker,
12
+ ElDialog,
13
+ ElDivider,
14
+ ElDropdown,
15
+ ElDropdownItem,
16
+ ElDropdownMenu,
17
+ ElForm,
18
+ ElFormItem,
19
+ ElIcon,
20
+ ElInput,
21
+ ElInputNumber,
22
+ ElMessage,
23
+ ElMessageBox,
24
+ ElOption,
25
+ ElOptionGroup,
26
+ ElPagination,
27
+ ElPopover,
28
+ ElRadio,
29
+ ElRadioGroup,
30
+ ElRow,
31
+ ElScrollbar,
32
+ ElSelect,
33
+ ElStep,
34
+ ElSteps,
35
+ ElSwitch,
36
+ ElTable,
37
+ ElTableColumn,
38
+ ElTabPane,
39
+ ElTabs,
40
+ ElTimePicker,
41
+ ElTooltip,
42
+ ElTree,
43
+ ElUpload,
44
+ } from 'element-plus';
45
+
46
+ const adapter: any = {
47
+ message: ElMessage,
48
+ messageBox: ElMessageBox,
49
+ components: {
50
+ button: {
51
+ component: ElButton,
52
+ props: (props: any) => props,
53
+ },
54
+
55
+ card: {
56
+ component: ElCard,
57
+ props: (props: any) => props,
58
+ },
59
+
60
+ cascader: {
61
+ component: ElCascader,
62
+ props: (props: any) => props,
63
+ },
64
+
65
+ checkbox: {
66
+ component: ElCheckbox,
67
+ props: (props: any) => props,
68
+ },
69
+
70
+ checkboxGroup: {
71
+ component: ElCheckboxGroup,
72
+ props: (props: any) => props,
73
+ },
74
+
75
+ col: {
76
+ component: ElCol,
77
+ props: (props: any) => props,
78
+ },
79
+
80
+ collapse: {
81
+ component: ElCollapse,
82
+ props: (props: any) => props,
83
+ },
84
+
85
+ collapseItem: {
86
+ component: ElCollapseItem,
87
+ props: (props: any) => props,
88
+ },
89
+
90
+ colorPicker: {
91
+ component: ElColorPicker,
92
+ props: (props: any) => props,
93
+ },
94
+
95
+ datePicker: {
96
+ component: ElDatePicker,
97
+ props: (props: any) => props,
98
+ },
99
+
100
+ dialog: {
101
+ component: ElDialog,
102
+ props: (props: any) => props,
103
+ },
104
+
105
+ divider: {
106
+ component: ElDivider,
107
+ props: (props: any) => props,
108
+ },
109
+
110
+ dropdown: {
111
+ component: ElDropdown,
112
+ props: (props: any) => props,
113
+ },
114
+
115
+ dropdownItem: {
116
+ component: ElDropdownItem,
117
+ props: (props: any) => props,
118
+ },
119
+
120
+ dropdownMenu: {
121
+ component: ElDropdownMenu,
122
+ props: (props: any) => props,
123
+ },
124
+
125
+ form: {
126
+ component: ElForm,
127
+ props: (props: any) => props,
128
+ },
129
+
130
+ formItem: {
131
+ component: ElFormItem,
132
+ props: (props: any) => props,
133
+ },
134
+
135
+ icon: {
136
+ component: ElIcon,
137
+ props: (props: any) => props,
138
+ },
139
+
140
+ input: {
141
+ component: ElInput,
142
+ props: (props: any) => props,
143
+ },
144
+
145
+ inputNumber: {
146
+ component: ElInputNumber,
147
+ props: (props: any) => props,
148
+ },
149
+
150
+ option: {
151
+ component: ElOption,
152
+ props: (props: any) => props,
153
+ },
154
+
155
+ optionGroup: {
156
+ component: ElOptionGroup,
157
+ props: (props: any) => props,
158
+ },
159
+
160
+ pagination: {
161
+ component: ElPagination,
162
+ props: (props: any) => props,
163
+ },
164
+
165
+ popover: {
166
+ component: ElPopover,
167
+ props: (props: any) => props,
168
+ },
169
+
170
+ radio: {
171
+ component: ElRadio,
172
+ props: (props: any) => props,
173
+ },
174
+
175
+ radioGroup: {
176
+ component: ElRadioGroup,
177
+ props: (props: any) => props,
178
+ },
179
+
180
+ row: {
181
+ component: ElRow,
182
+ props: (props: any) => props,
183
+ },
184
+
185
+ scrollbar: {
186
+ component: ElScrollbar,
187
+ props: (props: any) => props,
188
+ },
189
+
190
+ select: {
191
+ component: ElSelect,
192
+ props: (props: any) => props,
193
+ },
194
+
195
+ step: {
196
+ component: ElStep,
197
+ props: (props: any) => props,
198
+ },
199
+
200
+ steps: {
201
+ component: ElSteps,
202
+ props: (props: any) => props,
203
+ },
204
+
205
+ switch: {
206
+ component: ElSwitch,
207
+ props: (props: any) => props,
208
+ },
209
+
210
+ table: {
211
+ component: ElTable,
212
+ props: (props: any) => props,
213
+ },
214
+
215
+ tableColumn: {
216
+ component: ElTableColumn,
217
+ props: (props: any) => props,
218
+ },
219
+
220
+ tabPane: {
221
+ component: ElTabPane,
222
+ props: (props: any) => props,
223
+ },
224
+
225
+ tabs: {
226
+ component: ElTabs,
227
+ props: (props: any) => props,
228
+ },
229
+
230
+ tag: {
231
+ component: ElTabs,
232
+ props: (props: any) => props,
233
+ },
234
+
235
+ timePicker: {
236
+ component: ElTimePicker,
237
+ props: (props: any) => props,
238
+ },
239
+
240
+ tooltip: {
241
+ component: ElTooltip,
242
+ props: (props: any) => props,
243
+ },
244
+
245
+ tree: {
246
+ component: ElTree,
247
+ props: (props: any) => props,
248
+ },
249
+
250
+ upload: {
251
+ component: ElUpload,
252
+ props: (props: any) => props,
253
+ },
254
+ },
255
+ };
256
+
257
+ export default adapter;
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "declaration": true,
6
+ "declarationDir": "types",
7
+ "forceConsistentCasingInFileNames": true,
8
+ "paths": {},
9
+ "module": "CommonJS",
10
+ "rootDir": "./src",
11
+ "outDir": "./dist",
12
+ },
13
+ "include": [
14
+ "src"
15
+ ],
16
+ }
@@ -0,0 +1,2 @@
1
+ declare const adapter: any;
2
+ export default adapter;