amis-editor 5.4.0 → 5.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/component/TableViewEditor.d.ts +2 -2
- package/esm/locale/en-US.js +57 -1
- package/esm/locale/zh-CN.js +57 -1
- package/esm/plugin/CRUD.d.ts +3 -2
- package/esm/plugin/CRUD.js +157 -1
- package/esm/plugin/Dialog.d.ts +1 -1
- package/esm/plugin/Dialog.js +4 -4
- package/esm/plugin/Form/Combo.d.ts +5 -2
- package/esm/plugin/Form/Combo.js +34 -11
- package/esm/plugin/Form/Form.js +6 -2
- package/esm/plugin/Form/InputDateRange.js +4 -24
- package/esm/plugin/Form/InputRichText.d.ts +0 -1
- package/esm/plugin/Form/InputRichText.js +0 -1
- package/esm/plugin/Form/InputTable.d.ts +4 -1
- package/esm/plugin/Form/InputTable.js +100 -77
- package/esm/plugin/TableView.d.ts +2 -1
- package/esm/plugin/Tabs.d.ts +2 -1
- package/esm/renderer/APIAdaptorControl.d.ts +1 -1
- package/esm/renderer/APIControl.d.ts +4 -4
- package/esm/renderer/ActionApiControl.d.ts +3 -3
- package/esm/renderer/BadgeControl.d.ts +1 -1
- package/esm/renderer/ButtonGroupControl.d.ts +1 -1
- package/esm/renderer/ColumnControl.d.ts +1 -1
- package/esm/renderer/DataBindingControl.d.ts +2 -2
- package/esm/renderer/DataPickerControl.d.ts +1 -1
- package/esm/renderer/DateShortCutControl.d.ts +53 -29
- package/esm/renderer/DateShortCutControl.js +182 -140
- package/esm/renderer/ExpressionFormulaControl.d.ts +1 -1
- package/esm/renderer/FeatureControl.d.ts +2 -2
- package/esm/renderer/FlexSettingControl.d.ts +1 -1
- package/esm/renderer/FormulaControl.d.ts +8 -3
- package/esm/renderer/FormulaControl.js +76 -8
- package/esm/renderer/GoConfigControl.d.ts +1 -1
- package/esm/renderer/MapSourceControl.d.ts +3 -3
- package/esm/renderer/NavBadgeControl.d.ts +1 -1
- package/esm/renderer/NavSourceControl.d.ts +4 -4
- package/esm/renderer/OptionControl.d.ts +3 -3
- package/esm/renderer/RangePartsControl.d.ts +5 -5
- package/esm/renderer/StatusControl.d.ts +2 -2
- package/esm/renderer/SwitchMoreControl.d.ts +4 -4
- package/esm/renderer/TimelineItemControl.d.ts +4 -4
- package/esm/renderer/TplFormulaControl.d.ts +1 -1
- package/esm/renderer/TransferTableControl.d.ts +3 -3
- package/esm/renderer/TreeOptionControl.d.ts +3 -3
- package/esm/renderer/ValidationControl.d.ts +4 -4
- package/esm/renderer/ValidationItem.d.ts +3 -3
- package/esm/renderer/event-control/comp-action-select.d.ts +1 -1
- package/esm/renderer/event-control/index.d.ts +2 -2
- package/esm/renderer/style-control/Background.d.ts +1 -1
- package/esm/renderer/style-control/Border.d.ts +2 -2
- package/esm/renderer/style-control/BoxModel.d.ts +2 -2
- package/esm/renderer/style-control/BoxShadow.d.ts +2 -2
- package/esm/renderer/style-control/Display.d.ts +1 -1
- package/esm/renderer/style-control/Font.d.ts +1 -1
- package/esm/renderer/style-control/InsetBoxModel.d.ts +2 -2
- package/esm/renderer/style-control/ThemeCssCode.d.ts +1 -1
- package/esm/renderer/textarea-formula/TextareaFormulaControl.d.ts +1 -1
- package/esm/tpl/common.js +2 -1
- package/lib/component/TableViewEditor.d.ts +2 -2
- package/lib/locale/en-US.js +57 -1
- package/lib/locale/zh-CN.js +57 -1
- package/lib/plugin/CRUD.d.ts +3 -2
- package/lib/plugin/CRUD.js +157 -1
- package/lib/plugin/Dialog.d.ts +1 -1
- package/lib/plugin/Dialog.js +4 -4
- package/lib/plugin/Form/Combo.d.ts +5 -2
- package/lib/plugin/Form/Combo.js +32 -9
- package/lib/plugin/Form/Form.js +6 -2
- package/lib/plugin/Form/InputDateRange.js +4 -24
- package/lib/plugin/Form/InputRichText.d.ts +0 -1
- package/lib/plugin/Form/InputRichText.js +0 -1
- package/lib/plugin/Form/InputTable.d.ts +4 -1
- package/lib/plugin/Form/InputTable.js +99 -76
- package/lib/plugin/TableView.d.ts +2 -1
- package/lib/plugin/Tabs.d.ts +2 -1
- package/lib/renderer/APIAdaptorControl.d.ts +1 -1
- package/lib/renderer/APIControl.d.ts +4 -4
- package/lib/renderer/ActionApiControl.d.ts +3 -3
- package/lib/renderer/BadgeControl.d.ts +7 -7
- package/lib/renderer/ButtonGroupControl.d.ts +1 -1
- package/lib/renderer/ColumnControl.d.ts +1 -1
- package/lib/renderer/DataBindingControl.d.ts +2 -2
- package/lib/renderer/DataPickerControl.d.ts +1 -1
- package/lib/renderer/DateShortCutControl.d.ts +53 -29
- package/lib/renderer/DateShortCutControl.js +181 -139
- package/lib/renderer/ExpressionFormulaControl.d.ts +1 -1
- package/lib/renderer/FeatureControl.d.ts +2 -2
- package/lib/renderer/FlexSettingControl.d.ts +1 -1
- package/lib/renderer/FormulaControl.d.ts +8 -3
- package/lib/renderer/FormulaControl.js +76 -8
- package/lib/renderer/GoConfigControl.d.ts +1 -1
- package/lib/renderer/MapSourceControl.d.ts +3 -3
- package/lib/renderer/NavBadgeControl.d.ts +7 -7
- package/lib/renderer/NavSourceControl.d.ts +4 -4
- package/lib/renderer/OptionControl.d.ts +3 -3
- package/lib/renderer/RangePartsControl.d.ts +5 -5
- package/lib/renderer/StatusControl.d.ts +2 -2
- package/lib/renderer/SwitchMoreControl.d.ts +4 -4
- package/lib/renderer/TimelineItemControl.d.ts +4 -4
- package/lib/renderer/TplFormulaControl.d.ts +1 -1
- package/lib/renderer/TransferTableControl.d.ts +3 -3
- package/lib/renderer/TreeOptionControl.d.ts +3 -3
- package/lib/renderer/ValidationControl.d.ts +4 -4
- package/lib/renderer/ValidationItem.d.ts +3 -3
- package/lib/renderer/event-control/comp-action-select.d.ts +1 -1
- package/lib/renderer/event-control/index.d.ts +2 -2
- package/lib/renderer/style-control/Background.d.ts +1 -1
- package/lib/renderer/style-control/Border.d.ts +2 -2
- package/lib/renderer/style-control/BoxModel.d.ts +2 -2
- package/lib/renderer/style-control/BoxShadow.d.ts +2 -2
- package/lib/renderer/style-control/Display.d.ts +1 -1
- package/lib/renderer/style-control/Font.d.ts +1 -1
- package/lib/renderer/style-control/InsetBoxModel.d.ts +2 -2
- package/lib/renderer/style-control/ThemeCssCode.d.ts +1 -1
- package/lib/renderer/textarea-formula/TextareaFormulaControl.d.ts +1 -1
- package/lib/tpl/common.js +2 -1
- package/package.json +2 -2
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
import { __extends, __assign, __awaiter, __generator, __values } from 'tslib';
|
7
|
-
import { getSchemaTpl, getI18nEnabled, tipedLabel, defaultValue, mockValue, repeatArray, BasePlugin, registerEditorPlugin } from 'amis-editor-core';
|
7
|
+
import { getSchemaTpl, getI18nEnabled, tipedLabel, defaultValue, DSBuilderManager, mockValue, repeatArray, BasePlugin, registerEditorPlugin } from 'amis-editor-core';
|
8
8
|
import { setVariable } from 'amis-core';
|
9
9
|
import { ValidatorTag } from '../../validator.js';
|
10
10
|
import { getArgsWrapper, getEventControlConfig } from '../../renderer/event-control/helper.js';
|
@@ -14,8 +14,8 @@ import { i18n } from 'i18n-runtime';
|
|
14
14
|
|
15
15
|
var TableControlPlugin = /** @class */function (_super) {
|
16
16
|
__extends(TableControlPlugin, _super);
|
17
|
-
function TableControlPlugin() {
|
18
|
-
var _this = _super
|
17
|
+
function TableControlPlugin(manager) {
|
18
|
+
var _this = _super.call(this, manager) || this;
|
19
19
|
// 关联渲染器名字
|
20
20
|
_this.rendererName = 'input-table';
|
21
21
|
_this.$schema = '/schemas/TableControlSchema.json';
|
@@ -95,253 +95,253 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
95
95
|
_this.panelTitle = i18n("13c250c68608118463871ce7cd8b292c");
|
96
96
|
_this.events = [{
|
97
97
|
eventName: 'add',
|
98
|
-
eventLabel:
|
99
|
-
description:
|
98
|
+
eventLabel: i18n("58477471b3bb8ad53fe9ab18a244868b"),
|
99
|
+
description: i18n("6070fdf451b08e4302a7dab560771222"),
|
100
100
|
dataSchema: [{
|
101
101
|
type: 'object',
|
102
102
|
properties: {
|
103
103
|
'event.data.value': {
|
104
104
|
type: 'array',
|
105
|
-
title:
|
105
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
106
106
|
},
|
107
107
|
'event.data.index': {
|
108
108
|
type: 'array',
|
109
|
-
title:
|
109
|
+
title: i18n("7b25d5ff93da66fe95b5409731bb9838")
|
110
110
|
}
|
111
111
|
}
|
112
112
|
}]
|
113
113
|
}, {
|
114
114
|
eventName: 'addConfirm',
|
115
|
-
eventLabel:
|
116
|
-
description:
|
115
|
+
eventLabel: i18n("5e3640e4bc8efbe00a7b7c6ba169560c"),
|
116
|
+
description: i18n("008ae858112dcc7739985045e4326f3a"),
|
117
117
|
dataSchema: [{
|
118
118
|
type: 'object',
|
119
119
|
properties: {
|
120
120
|
'event.data.value': {
|
121
121
|
type: 'array',
|
122
|
-
title:
|
122
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
123
123
|
},
|
124
124
|
'event.data.item': {
|
125
125
|
type: 'object',
|
126
|
-
title:
|
126
|
+
title: i18n("1fb1cbe49c3e72c2b5f4e0151a4cb5d9")
|
127
127
|
},
|
128
128
|
'event.data.index': {
|
129
129
|
type: 'number',
|
130
|
-
title:
|
130
|
+
title: i18n("7b25d5ff93da66fe95b5409731bb9838")
|
131
131
|
}
|
132
132
|
}
|
133
133
|
}]
|
134
134
|
}, {
|
135
135
|
eventName: 'addSuccess',
|
136
|
-
eventLabel:
|
137
|
-
description:
|
136
|
+
eventLabel: i18n("3fdaeadf0e8a3154ae62784f04138c28"),
|
137
|
+
description: i18n("bd4ef227fe8aae88ae6aa97236c0e9bb"),
|
138
138
|
dataSchema: [{
|
139
139
|
type: 'object',
|
140
140
|
properties: {
|
141
141
|
'event.data.value': {
|
142
142
|
type: 'array',
|
143
|
-
title:
|
143
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
144
144
|
},
|
145
145
|
'event.data.item': {
|
146
146
|
type: 'object',
|
147
|
-
title:
|
147
|
+
title: i18n("1fb1cbe49c3e72c2b5f4e0151a4cb5d9")
|
148
148
|
},
|
149
149
|
'event.data.index': {
|
150
150
|
type: 'number',
|
151
|
-
title:
|
151
|
+
title: i18n("7b25d5ff93da66fe95b5409731bb9838")
|
152
152
|
}
|
153
153
|
}
|
154
154
|
}]
|
155
155
|
}, {
|
156
156
|
eventName: 'addFail',
|
157
|
-
eventLabel:
|
158
|
-
description:
|
157
|
+
eventLabel: i18n("6452a05591d7402a8bcd9fadc950c449"),
|
158
|
+
description: i18n("bd7c39d10dbf6985d2be2d9a4fdcccf7"),
|
159
159
|
dataSchema: [{
|
160
160
|
type: 'object',
|
161
161
|
properties: {
|
162
162
|
'event.data.value': {
|
163
163
|
type: 'array',
|
164
|
-
title:
|
164
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
165
165
|
},
|
166
166
|
'event.data.item': {
|
167
167
|
type: 'object',
|
168
|
-
title:
|
168
|
+
title: i18n("1fb1cbe49c3e72c2b5f4e0151a4cb5d9")
|
169
169
|
},
|
170
170
|
'event.data.index': {
|
171
171
|
type: 'number',
|
172
|
-
title:
|
172
|
+
title: i18n("7b25d5ff93da66fe95b5409731bb9838")
|
173
173
|
},
|
174
174
|
'event.data.error': {
|
175
175
|
type: 'object',
|
176
|
-
title:
|
176
|
+
title: i18n("37122b9e4499da38258b3d51b09d68a1")
|
177
177
|
}
|
178
178
|
}
|
179
179
|
}]
|
180
180
|
}, {
|
181
181
|
eventName: 'edit',
|
182
|
-
eventLabel:
|
183
|
-
description:
|
182
|
+
eventLabel: i18n("88ebffeee507da0f0d039eb2d05f7e2c"),
|
183
|
+
description: i18n("daf24d1f83e1b4fce2f57a6b041ddba6"),
|
184
184
|
dataSchema: [{
|
185
185
|
type: 'object',
|
186
186
|
properties: {
|
187
187
|
'event.data.value': {
|
188
188
|
type: 'array',
|
189
|
-
title:
|
189
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
190
190
|
},
|
191
191
|
'event.data.item': {
|
192
192
|
type: 'object',
|
193
|
-
title:
|
193
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
194
194
|
},
|
195
195
|
'event.data.index': {
|
196
196
|
type: 'number',
|
197
|
-
title:
|
197
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
198
198
|
}
|
199
199
|
}
|
200
200
|
}]
|
201
201
|
}, {
|
202
202
|
eventName: 'editConfirm',
|
203
|
-
eventLabel:
|
204
|
-
description:
|
203
|
+
eventLabel: i18n("4271f29faca65d7840ad6bb2c4a7b8c6"),
|
204
|
+
description: i18n("562f54a2fec7a68f85ff192a68cf69f2"),
|
205
205
|
dataSchema: [{
|
206
206
|
type: 'object',
|
207
207
|
properties: {
|
208
208
|
'event.data.value': {
|
209
209
|
type: 'array',
|
210
|
-
title:
|
210
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
211
211
|
},
|
212
212
|
'event.data.item': {
|
213
213
|
type: 'object',
|
214
|
-
title:
|
214
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
215
215
|
},
|
216
216
|
'event.data.index': {
|
217
217
|
type: 'number',
|
218
|
-
title:
|
218
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
219
219
|
}
|
220
220
|
}
|
221
221
|
}]
|
222
222
|
}, {
|
223
223
|
eventName: 'editSuccess',
|
224
|
-
eventLabel:
|
225
|
-
description:
|
224
|
+
eventLabel: i18n("3bb47b67994cb374e601fab35f63bc8e"),
|
225
|
+
description: i18n("b394745a8a77179da0000293638e8a56"),
|
226
226
|
dataSchema: [{
|
227
227
|
type: 'object',
|
228
228
|
properties: {
|
229
229
|
'event.data.value': {
|
230
230
|
type: 'array',
|
231
|
-
title:
|
231
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
232
232
|
},
|
233
233
|
'event.data.item': {
|
234
234
|
type: 'object',
|
235
|
-
title:
|
235
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
236
236
|
},
|
237
237
|
'event.data.index': {
|
238
238
|
type: 'number',
|
239
|
-
title:
|
239
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
240
240
|
}
|
241
241
|
}
|
242
242
|
}]
|
243
243
|
}, {
|
244
244
|
eventName: 'editFail',
|
245
|
-
eventLabel:
|
246
|
-
description:
|
245
|
+
eventLabel: i18n("9304e8f4c324b5882b550caa971b64b8"),
|
246
|
+
description: i18n("b9d277c3ffab7d4b955ad10308c7ae0a"),
|
247
247
|
dataSchema: [{
|
248
248
|
type: 'object',
|
249
249
|
properties: {
|
250
250
|
'event.data.value': {
|
251
251
|
type: 'array',
|
252
|
-
title:
|
252
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
253
253
|
},
|
254
254
|
'event.data.item': {
|
255
255
|
type: 'object',
|
256
|
-
title:
|
256
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
257
257
|
},
|
258
258
|
'event.data.index': {
|
259
259
|
type: 'number',
|
260
|
-
title:
|
260
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
261
261
|
},
|
262
262
|
'event.data.error': {
|
263
263
|
type: 'object',
|
264
|
-
title:
|
264
|
+
title: i18n("650bccdd6f99fe5fc4ca6cb8788e7cb4")
|
265
265
|
}
|
266
266
|
}
|
267
267
|
}]
|
268
268
|
}, {
|
269
269
|
eventName: 'delete',
|
270
|
-
eventLabel:
|
271
|
-
description:
|
270
|
+
eventLabel: i18n("947fa341a6d676d7f25bae6bef8342cd"),
|
271
|
+
description: i18n("7508f6d66d920323d87a9f9d58487a40"),
|
272
272
|
dataSchema: [{
|
273
273
|
type: 'object',
|
274
274
|
properties: {
|
275
275
|
'event.data.value': {
|
276
276
|
type: 'array',
|
277
|
-
title:
|
277
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
278
278
|
},
|
279
279
|
'event.data.item': {
|
280
280
|
type: 'object',
|
281
|
-
title:
|
281
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
282
282
|
},
|
283
283
|
'event.data.index': {
|
284
284
|
type: 'object',
|
285
|
-
title:
|
285
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
286
286
|
}
|
287
287
|
}
|
288
288
|
}]
|
289
289
|
}, {
|
290
290
|
eventName: 'deleteSuccess',
|
291
|
-
eventLabel:
|
292
|
-
description:
|
291
|
+
eventLabel: i18n("0007d170de017dafc266aa03926d7f00"),
|
292
|
+
description: i18n("13640e78822f62b7b71bfabb4604025e"),
|
293
293
|
dataSchema: [{
|
294
294
|
type: 'object',
|
295
295
|
properties: {
|
296
296
|
'event.data.value': {
|
297
297
|
type: 'array',
|
298
|
-
title:
|
298
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
299
299
|
},
|
300
300
|
'event.data.item': {
|
301
301
|
type: 'object',
|
302
|
-
title:
|
302
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
303
303
|
},
|
304
304
|
'event.data.index': {
|
305
305
|
type: 'object',
|
306
|
-
title:
|
306
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
307
307
|
}
|
308
308
|
}
|
309
309
|
}]
|
310
310
|
}, {
|
311
311
|
eventName: 'deleteFail',
|
312
|
-
eventLabel:
|
313
|
-
description:
|
312
|
+
eventLabel: i18n("acf0664a54dc58d9d0377bb56e162092"),
|
313
|
+
description: i18n("14d36ca583bcbfc5516a000eb06ccedd"),
|
314
314
|
dataSchema: [{
|
315
315
|
type: 'object',
|
316
316
|
properties: {
|
317
317
|
'event.data.value': {
|
318
318
|
type: 'array',
|
319
|
-
title:
|
319
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
320
320
|
},
|
321
321
|
'event.data.item': {
|
322
322
|
type: 'object',
|
323
|
-
title:
|
323
|
+
title: i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
|
324
324
|
},
|
325
325
|
'event.data.index': {
|
326
326
|
type: 'object',
|
327
|
-
title:
|
327
|
+
title: i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
|
328
328
|
},
|
329
329
|
'event.data.error': {
|
330
330
|
type: 'object',
|
331
|
-
title:
|
331
|
+
title: i18n("37122b9e4499da38258b3d51b09d68a1")
|
332
332
|
}
|
333
333
|
}
|
334
334
|
}]
|
335
335
|
}, {
|
336
336
|
eventName: 'change',
|
337
337
|
eventLabel: i18n("755955372bcc0c7ebf161a656bc389b3"),
|
338
|
-
description:
|
338
|
+
description: i18n("692dc28abc42931daca8fa12d69d5c99"),
|
339
339
|
dataSchema: [{
|
340
340
|
type: 'object',
|
341
341
|
properties: {
|
342
342
|
'event.data.value': {
|
343
343
|
type: 'array',
|
344
|
-
title:
|
344
|
+
title: i18n("c9f63503ee66082fc00c3e6eac57a95f")
|
345
345
|
}
|
346
346
|
}
|
347
347
|
}]
|
@@ -352,8 +352,8 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
352
352
|
description: i18n("0310aa5a05fe07147d8b7ef20616f659")
|
353
353
|
}, {
|
354
354
|
actionType: 'addItem',
|
355
|
-
actionLabel:
|
356
|
-
description:
|
355
|
+
actionLabel: i18n("58477471b3bb8ad53fe9ab18a244868b"),
|
356
|
+
description: i18n("f8692d409bb7f122a374872e01efd03a"),
|
357
357
|
innerArgs: ['item', 'index'],
|
358
358
|
schema: getArgsWrapper({
|
359
359
|
type: 'container',
|
@@ -365,9 +365,9 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
365
365
|
leftFixed: 4 // 需要设置下leftFixed,否则这个字段的控件没有与其他字段的控件左对齐
|
366
366
|
},
|
367
367
|
|
368
|
-
label:
|
368
|
+
label: i18n("459fd144ee129b501545d19c169269e9"),
|
369
369
|
size: 'lg',
|
370
|
-
placeholder:
|
370
|
+
placeholder: i18n("196e71fa869b8410088b4ceb54aa7988")
|
371
371
|
}, {
|
372
372
|
type: 'combo',
|
373
373
|
name: 'value',
|
@@ -380,7 +380,7 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
380
380
|
canAccessSuperData: true,
|
381
381
|
mode: 'horizontal',
|
382
382
|
size: 'lg',
|
383
|
-
addButtonText:
|
383
|
+
addButtonText: i18n("a26858cccbc451fd53515416a5968550"),
|
384
384
|
items: [{
|
385
385
|
type: 'combo',
|
386
386
|
name: 'item',
|
@@ -395,7 +395,7 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
395
395
|
className: 'm-l',
|
396
396
|
size: 'lg',
|
397
397
|
mode: 'horizontal',
|
398
|
-
addButtonText:
|
398
|
+
addButtonText: i18n("c520ed9911d349c7974116d3d1e1423e"),
|
399
399
|
items: [{
|
400
400
|
name: 'key',
|
401
401
|
type: 'input-text',
|
@@ -412,8 +412,8 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
412
412
|
})
|
413
413
|
}, {
|
414
414
|
actionType: 'deleteItem',
|
415
|
-
actionLabel:
|
416
|
-
description:
|
415
|
+
actionLabel: i18n("947fa341a6d676d7f25bae6bef8342cd"),
|
416
|
+
description: i18n("344c1c96f9cb3275f972929755b4e238"),
|
417
417
|
innerArgs: ['condition', 'index'],
|
418
418
|
schema: getArgsWrapper({
|
419
419
|
type: 'container',
|
@@ -422,7 +422,7 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
422
422
|
name: '__deleteType',
|
423
423
|
inputClassName: 'event-action-radio',
|
424
424
|
mode: 'horizontal',
|
425
|
-
label:
|
425
|
+
label: i18n("8910acd418e45a30f01e7e531b90b61b"),
|
426
426
|
pipeIn: function (value, store) {
|
427
427
|
if (store.data.__deleteType === undefined) {
|
428
428
|
var deleteType = store.data.condition ? 'conditionExpression' : 'rowIndex';
|
@@ -438,10 +438,10 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
438
438
|
},
|
439
439
|
|
440
440
|
options: [{
|
441
|
-
label:
|
441
|
+
label: i18n("ebf62450c3fb11c0b7e06da2d7535d6c"),
|
442
442
|
value: 'rowIndex'
|
443
443
|
}, {
|
444
|
-
label:
|
444
|
+
label: i18n("4bf7636a84714fac140e42b4cee242d4"),
|
445
445
|
value: 'conditionExpression'
|
446
446
|
}],
|
447
447
|
onChange: function (value, oldVal, data, form) {
|
@@ -457,14 +457,14 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
457
457
|
},
|
458
458
|
|
459
459
|
required: true,
|
460
|
-
label:
|
460
|
+
label: i18n("7708fb1394ce722ee73326437a66c77a"),
|
461
461
|
size: 'lg',
|
462
|
-
placeholder:
|
462
|
+
placeholder: i18n("015f108b96c70bba6511091e159db0ac"),
|
463
463
|
hiddenOn: 'data.__deleteType !== "rowIndex"'
|
464
464
|
}, getSchemaTpl('formulaControl', {
|
465
465
|
name: 'condition',
|
466
466
|
variables: '${variables}',
|
467
|
-
label:
|
467
|
+
label: i18n("63aeb2082d7cc0a316fc1e44913d7749"),
|
468
468
|
hiddenOn: 'data.__deleteType !== "conditionExpression"',
|
469
469
|
mode: 'horizontal',
|
470
470
|
required: true,
|
@@ -484,7 +484,7 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
484
484
|
{
|
485
485
|
actionType: 'clear',
|
486
486
|
actionLabel: i18n("288f0c404c4e546aa3683ff5054e85e2"),
|
487
|
-
description:
|
487
|
+
description: i18n("4622a4ce221f9b79aa3396cc461adc75")
|
488
488
|
}];
|
489
489
|
_this.panelBodyCreator = function (context) {
|
490
490
|
context.schema.type === 'crud';
|
@@ -665,6 +665,7 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
665
665
|
}, getEventControlConfig(_this.manager, context)))]
|
666
666
|
}]);
|
667
667
|
};
|
668
|
+
_this.dsBuilderManager = new DSBuilderManager('input-table', 'api');
|
668
669
|
return _this;
|
669
670
|
}
|
670
671
|
Object.defineProperty(TableControlPlugin.prototype, "scaffoldForm", {
|
@@ -910,6 +911,28 @@ var TableControlPlugin = /** @class */function (_super) {
|
|
910
911
|
});
|
911
912
|
});
|
912
913
|
};
|
914
|
+
TableControlPlugin.prototype.getAvailableContextFields = function (scopeNode, target, region) {
|
915
|
+
var _a, _b;
|
916
|
+
return __awaiter(this, void 0, void 0, function () {
|
917
|
+
var scope, builder;
|
918
|
+
return __generator(this, function (_c) {
|
919
|
+
if (target.parent.isRegion && target.parent.region === 'columns') {
|
920
|
+
scope = scopeNode.parent.parent;
|
921
|
+
builder = this.dsBuilderManager.resolveBuilderBySchema(scope.schema, 'api');
|
922
|
+
if (builder && scope.schema.api) {
|
923
|
+
return [2 /*return*/, builder.getAvailableContextFileds({
|
924
|
+
schema: scope.schema,
|
925
|
+
sourceKey: 'api',
|
926
|
+
feat: (_b = (_a = scope.schema) === null || _a === void 0 ? void 0 : _a.feat) !== null && _b !== void 0 ? _b : 'List',
|
927
|
+
scopeNode: scopeNode
|
928
|
+
}, target)];
|
929
|
+
}
|
930
|
+
}
|
931
|
+
return [2 /*return*/];
|
932
|
+
});
|
933
|
+
});
|
934
|
+
};
|
935
|
+
|
913
936
|
return TableControlPlugin;
|
914
937
|
}(BasePlugin);
|
915
938
|
registerEditorPlugin(TableControlPlugin);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @file table view 组件的可视化编辑
|
3
3
|
*/
|
4
|
+
import React from 'react';
|
4
5
|
import { BaseEventContext, BasePlugin, BasicPanelItem, BasicToolbarItem, BuildPanelEventContext, RegionConfig, VRendererConfig } from 'amis-editor-core';
|
5
6
|
export declare class TableViewPlugin extends BasePlugin {
|
6
7
|
rendererName: string;
|
@@ -82,7 +83,7 @@ export declare class TableViewPlugin extends BasePlugin {
|
|
82
83
|
};
|
83
84
|
tdVRendererConfig: VRendererConfig;
|
84
85
|
trVRendererConfig: VRendererConfig;
|
85
|
-
renderRenderer(props: any): JSX.Element;
|
86
|
+
renderRenderer(props: any): React.JSX.Element;
|
86
87
|
buildEditorPanel(context: BuildPanelEventContext, panels: Array<BasicPanelItem>): void;
|
87
88
|
/**
|
88
89
|
* 插入行,需要处理前面有 rowspan 的情况
|
package/esm/plugin/Tabs.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { BaseEventContext, BasePlugin, BasicToolbarItem, PluginEvent, PreventClickEventContext, RegionConfig, VRendererConfig } from 'amis-editor-core';
|
2
3
|
export declare class TabsPlugin extends BasePlugin {
|
3
4
|
rendererName: string;
|
@@ -45,7 +46,7 @@ export declare class TabsPlugin extends BasePlugin {
|
|
45
46
|
actionLabel: string;
|
46
47
|
description: string;
|
47
48
|
config: string[];
|
48
|
-
descDetail: (info: any) => JSX.Element;
|
49
|
+
descDetail: (info: any) => React.JSX.Element;
|
49
50
|
schema: {
|
50
51
|
items: any[];
|
51
52
|
type: string;
|
@@ -86,7 +86,7 @@ export default class APIAdaptorControl extends React.Component<APIAdaptorControl
|
|
86
86
|
};
|
87
87
|
renderEditor(): any;
|
88
88
|
renderSwitch(): any;
|
89
|
-
render(): JSX.Element;
|
89
|
+
render(): React.JSX.Element;
|
90
90
|
}
|
91
91
|
export declare class APIAdaptorControlRenderer extends APIAdaptorControl {
|
92
92
|
}
|
@@ -123,14 +123,14 @@ export default class APIControl extends React.Component<APIControlProps, APICont
|
|
123
123
|
normalizeValue(value: any, callback: (value: any) => any): any;
|
124
124
|
handlePickerConfirm(value: any): void;
|
125
125
|
handlePickerClose(): void;
|
126
|
-
renderHeader(): JSX.Element;
|
127
|
-
renderPickerSchema(): JSX.Element | null;
|
126
|
+
renderHeader(): React.JSX.Element;
|
127
|
+
renderPickerSchema(): React.JSX.Element | null;
|
128
128
|
renderApiDialog(): {
|
129
129
|
label: string;
|
130
130
|
type: string;
|
131
131
|
acitonType: string;
|
132
132
|
size: string;
|
133
|
-
icon: JSX.Element;
|
133
|
+
icon: React.JSX.Element;
|
134
134
|
className: string;
|
135
135
|
actionType: string;
|
136
136
|
dialog: {
|
@@ -180,7 +180,7 @@ export default class APIControl extends React.Component<APIControlProps, APICont
|
|
180
180
|
}[];
|
181
181
|
}[];
|
182
182
|
};
|
183
|
-
render(): JSX.Element;
|
183
|
+
render(): React.JSX.Element;
|
184
184
|
}
|
185
185
|
export declare class APIControlRenderer extends APIControl {
|
186
186
|
}
|
@@ -80,8 +80,8 @@ export default class APIControl extends React.Component<APIControlProps, APICont
|
|
80
80
|
normalizeValue(value: any, callback: (value: any) => any): any;
|
81
81
|
handlePickerConfirm(value: any): void;
|
82
82
|
handlePickerClose(): void;
|
83
|
-
renderHeader(): JSX.Element | null;
|
84
|
-
renderPickerSchema(): JSX.Element | null;
|
83
|
+
renderHeader(): React.JSX.Element | null;
|
84
|
+
renderPickerSchema(): React.JSX.Element | null;
|
85
85
|
renderApiDialog(): {
|
86
86
|
label: string;
|
87
87
|
type: string;
|
@@ -780,7 +780,7 @@ export default class APIControl extends React.Component<APIControlProps, APICont
|
|
780
780
|
})[];
|
781
781
|
}[];
|
782
782
|
};
|
783
|
-
render(): JSX.Element;
|
783
|
+
render(): React.JSX.Element;
|
784
784
|
}
|
785
785
|
export declare class APIControlRenderer extends APIControl {
|
786
786
|
}
|
@@ -95,7 +95,7 @@ export default class BadgeControl extends React.Component<BadgeControlProps, Bad
|
|
95
95
|
handleSwitchChange(checked: boolean): void;
|
96
96
|
handleSubmit(form: BadgeForm, action: any): void;
|
97
97
|
renderBody(): any;
|
98
|
-
render(): JSX.Element;
|
98
|
+
render(): React.JSX.Element;
|
99
99
|
}
|
100
100
|
export declare class BadgeControlRenderer extends BadgeControl {
|
101
101
|
}
|
@@ -16,7 +16,7 @@ export interface ButtonGroupControlProps extends FormControlProps {
|
|
16
16
|
}
|
17
17
|
export default class ButtonGroupControl extends React.Component<ButtonGroupControlProps> {
|
18
18
|
constructor(props: any);
|
19
|
-
render(): JSX.Element;
|
19
|
+
render(): React.JSX.Element;
|
20
20
|
}
|
21
21
|
export declare class ButtonGroupControlRenderer extends ButtonGroupControl {
|
22
22
|
}
|
@@ -13,7 +13,7 @@ export default class ColumnControl extends React.Component<ColumnControlProps, C
|
|
13
13
|
constructor(props: any);
|
14
14
|
transformColumns(props: any): any;
|
15
15
|
onChange(value: Array<any>): void;
|
16
|
-
render(): JSX.Element;
|
16
|
+
render(): React.JSX.Element;
|
17
17
|
}
|
18
18
|
export declare class ColumnControlRenderer extends ColumnControl {
|
19
19
|
}
|
@@ -22,7 +22,7 @@ export declare class DataBindingControl extends React.Component<DataBindingProps
|
|
22
22
|
constructor(props: DataBindingProps);
|
23
23
|
handleConfirm(result: DSField): void;
|
24
24
|
handlePickerOpen(): Promise<void>;
|
25
|
-
render(): JSX.Element;
|
25
|
+
render(): React.JSX.Element;
|
26
26
|
}
|
27
27
|
export declare class DataBindingControlRenderer extends DataBindingControl {
|
28
28
|
}
|
@@ -37,7 +37,7 @@ export declare class SimpleDataBindingControl extends React.Component<SimpleData
|
|
37
37
|
handleSearchDebounced: import("lodash").DebouncedFunc<(keywords: string) => Promise<void>>;
|
38
38
|
handleSearch(keywords: string): Promise<void>;
|
39
39
|
handleSelect(): void;
|
40
|
-
render(): JSX.Element;
|
40
|
+
render(): React.JSX.Element;
|
41
41
|
}
|
42
42
|
export declare class SimpleDataBindingControlRenderer extends SimpleDataBindingControl {
|
43
43
|
}
|
@@ -6,7 +6,7 @@ declare class DataPickerControl extends React.Component<FormControlProps> {
|
|
6
6
|
variables: any;
|
7
7
|
variableMode: string;
|
8
8
|
}>;
|
9
|
-
render(): JSX.Element;
|
9
|
+
render(): React.JSX.Element;
|
10
10
|
}
|
11
11
|
export declare class DataPickerControlRenderer extends DataPickerControl {
|
12
12
|
}
|