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.
Files changed (117) hide show
  1. package/esm/component/TableViewEditor.d.ts +2 -2
  2. package/esm/locale/en-US.js +57 -1
  3. package/esm/locale/zh-CN.js +57 -1
  4. package/esm/plugin/CRUD.d.ts +3 -2
  5. package/esm/plugin/CRUD.js +157 -1
  6. package/esm/plugin/Dialog.d.ts +1 -1
  7. package/esm/plugin/Dialog.js +4 -4
  8. package/esm/plugin/Form/Combo.d.ts +5 -2
  9. package/esm/plugin/Form/Combo.js +34 -11
  10. package/esm/plugin/Form/Form.js +6 -2
  11. package/esm/plugin/Form/InputDateRange.js +4 -24
  12. package/esm/plugin/Form/InputRichText.d.ts +0 -1
  13. package/esm/plugin/Form/InputRichText.js +0 -1
  14. package/esm/plugin/Form/InputTable.d.ts +4 -1
  15. package/esm/plugin/Form/InputTable.js +100 -77
  16. package/esm/plugin/TableView.d.ts +2 -1
  17. package/esm/plugin/Tabs.d.ts +2 -1
  18. package/esm/renderer/APIAdaptorControl.d.ts +1 -1
  19. package/esm/renderer/APIControl.d.ts +4 -4
  20. package/esm/renderer/ActionApiControl.d.ts +3 -3
  21. package/esm/renderer/BadgeControl.d.ts +1 -1
  22. package/esm/renderer/ButtonGroupControl.d.ts +1 -1
  23. package/esm/renderer/ColumnControl.d.ts +1 -1
  24. package/esm/renderer/DataBindingControl.d.ts +2 -2
  25. package/esm/renderer/DataPickerControl.d.ts +1 -1
  26. package/esm/renderer/DateShortCutControl.d.ts +53 -29
  27. package/esm/renderer/DateShortCutControl.js +182 -140
  28. package/esm/renderer/ExpressionFormulaControl.d.ts +1 -1
  29. package/esm/renderer/FeatureControl.d.ts +2 -2
  30. package/esm/renderer/FlexSettingControl.d.ts +1 -1
  31. package/esm/renderer/FormulaControl.d.ts +8 -3
  32. package/esm/renderer/FormulaControl.js +76 -8
  33. package/esm/renderer/GoConfigControl.d.ts +1 -1
  34. package/esm/renderer/MapSourceControl.d.ts +3 -3
  35. package/esm/renderer/NavBadgeControl.d.ts +1 -1
  36. package/esm/renderer/NavSourceControl.d.ts +4 -4
  37. package/esm/renderer/OptionControl.d.ts +3 -3
  38. package/esm/renderer/RangePartsControl.d.ts +5 -5
  39. package/esm/renderer/StatusControl.d.ts +2 -2
  40. package/esm/renderer/SwitchMoreControl.d.ts +4 -4
  41. package/esm/renderer/TimelineItemControl.d.ts +4 -4
  42. package/esm/renderer/TplFormulaControl.d.ts +1 -1
  43. package/esm/renderer/TransferTableControl.d.ts +3 -3
  44. package/esm/renderer/TreeOptionControl.d.ts +3 -3
  45. package/esm/renderer/ValidationControl.d.ts +4 -4
  46. package/esm/renderer/ValidationItem.d.ts +3 -3
  47. package/esm/renderer/event-control/comp-action-select.d.ts +1 -1
  48. package/esm/renderer/event-control/index.d.ts +2 -2
  49. package/esm/renderer/style-control/Background.d.ts +1 -1
  50. package/esm/renderer/style-control/Border.d.ts +2 -2
  51. package/esm/renderer/style-control/BoxModel.d.ts +2 -2
  52. package/esm/renderer/style-control/BoxShadow.d.ts +2 -2
  53. package/esm/renderer/style-control/Display.d.ts +1 -1
  54. package/esm/renderer/style-control/Font.d.ts +1 -1
  55. package/esm/renderer/style-control/InsetBoxModel.d.ts +2 -2
  56. package/esm/renderer/style-control/ThemeCssCode.d.ts +1 -1
  57. package/esm/renderer/textarea-formula/TextareaFormulaControl.d.ts +1 -1
  58. package/esm/tpl/common.js +2 -1
  59. package/lib/component/TableViewEditor.d.ts +2 -2
  60. package/lib/locale/en-US.js +57 -1
  61. package/lib/locale/zh-CN.js +57 -1
  62. package/lib/plugin/CRUD.d.ts +3 -2
  63. package/lib/plugin/CRUD.js +157 -1
  64. package/lib/plugin/Dialog.d.ts +1 -1
  65. package/lib/plugin/Dialog.js +4 -4
  66. package/lib/plugin/Form/Combo.d.ts +5 -2
  67. package/lib/plugin/Form/Combo.js +32 -9
  68. package/lib/plugin/Form/Form.js +6 -2
  69. package/lib/plugin/Form/InputDateRange.js +4 -24
  70. package/lib/plugin/Form/InputRichText.d.ts +0 -1
  71. package/lib/plugin/Form/InputRichText.js +0 -1
  72. package/lib/plugin/Form/InputTable.d.ts +4 -1
  73. package/lib/plugin/Form/InputTable.js +99 -76
  74. package/lib/plugin/TableView.d.ts +2 -1
  75. package/lib/plugin/Tabs.d.ts +2 -1
  76. package/lib/renderer/APIAdaptorControl.d.ts +1 -1
  77. package/lib/renderer/APIControl.d.ts +4 -4
  78. package/lib/renderer/ActionApiControl.d.ts +3 -3
  79. package/lib/renderer/BadgeControl.d.ts +7 -7
  80. package/lib/renderer/ButtonGroupControl.d.ts +1 -1
  81. package/lib/renderer/ColumnControl.d.ts +1 -1
  82. package/lib/renderer/DataBindingControl.d.ts +2 -2
  83. package/lib/renderer/DataPickerControl.d.ts +1 -1
  84. package/lib/renderer/DateShortCutControl.d.ts +53 -29
  85. package/lib/renderer/DateShortCutControl.js +181 -139
  86. package/lib/renderer/ExpressionFormulaControl.d.ts +1 -1
  87. package/lib/renderer/FeatureControl.d.ts +2 -2
  88. package/lib/renderer/FlexSettingControl.d.ts +1 -1
  89. package/lib/renderer/FormulaControl.d.ts +8 -3
  90. package/lib/renderer/FormulaControl.js +76 -8
  91. package/lib/renderer/GoConfigControl.d.ts +1 -1
  92. package/lib/renderer/MapSourceControl.d.ts +3 -3
  93. package/lib/renderer/NavBadgeControl.d.ts +7 -7
  94. package/lib/renderer/NavSourceControl.d.ts +4 -4
  95. package/lib/renderer/OptionControl.d.ts +3 -3
  96. package/lib/renderer/RangePartsControl.d.ts +5 -5
  97. package/lib/renderer/StatusControl.d.ts +2 -2
  98. package/lib/renderer/SwitchMoreControl.d.ts +4 -4
  99. package/lib/renderer/TimelineItemControl.d.ts +4 -4
  100. package/lib/renderer/TplFormulaControl.d.ts +1 -1
  101. package/lib/renderer/TransferTableControl.d.ts +3 -3
  102. package/lib/renderer/TreeOptionControl.d.ts +3 -3
  103. package/lib/renderer/ValidationControl.d.ts +4 -4
  104. package/lib/renderer/ValidationItem.d.ts +3 -3
  105. package/lib/renderer/event-control/comp-action-select.d.ts +1 -1
  106. package/lib/renderer/event-control/index.d.ts +2 -2
  107. package/lib/renderer/style-control/Background.d.ts +1 -1
  108. package/lib/renderer/style-control/Border.d.ts +2 -2
  109. package/lib/renderer/style-control/BoxModel.d.ts +2 -2
  110. package/lib/renderer/style-control/BoxShadow.d.ts +2 -2
  111. package/lib/renderer/style-control/Display.d.ts +1 -1
  112. package/lib/renderer/style-control/Font.d.ts +1 -1
  113. package/lib/renderer/style-control/InsetBoxModel.d.ts +2 -2
  114. package/lib/renderer/style-control/ThemeCssCode.d.ts +1 -1
  115. package/lib/renderer/textarea-formula/TextareaFormulaControl.d.ts +1 -1
  116. package/lib/tpl/common.js +2 -1
  117. package/package.json +2 -2
@@ -22,8 +22,8 @@ var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
22
22
 
23
23
  var TableControlPlugin = /** @class */function (_super) {
24
24
  tslib.__extends(TableControlPlugin, _super);
25
- function TableControlPlugin() {
26
- var _this = _super !== null && _super.apply(this, arguments) || this;
25
+ function TableControlPlugin(manager) {
26
+ var _this = _super.call(this, manager) || this;
27
27
  // 关联渲染器名字
28
28
  _this.rendererName = 'input-table';
29
29
  _this.$schema = '/schemas/TableControlSchema.json';
@@ -103,253 +103,253 @@ var TableControlPlugin = /** @class */function (_super) {
103
103
  _this.panelTitle = i18nRuntime.i18n("13c250c68608118463871ce7cd8b292c");
104
104
  _this.events = [{
105
105
  eventName: 'add',
106
- eventLabel: '添加行',
107
- description: '点击左下角添加按钮 或 某一行右侧操作栏添加按钮时触发',
106
+ eventLabel: i18nRuntime.i18n("58477471b3bb8ad53fe9ab18a244868b"),
107
+ description: i18nRuntime.i18n("6070fdf451b08e4302a7dab560771222"),
108
108
  dataSchema: [{
109
109
  type: 'object',
110
110
  properties: {
111
111
  'event.data.value': {
112
112
  type: 'array',
113
- title: '列表记录'
113
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
114
114
  },
115
115
  'event.data.index': {
116
116
  type: 'array',
117
- title: '新增行记录索引'
117
+ title: i18nRuntime.i18n("7b25d5ff93da66fe95b5409731bb9838")
118
118
  }
119
119
  }
120
120
  }]
121
121
  }, {
122
122
  eventName: 'addConfirm',
123
- eventLabel: '确认添加',
124
- description: '开启”确认模式“,点击添加按钮,填入数据后点击“保存”按钮后触发',
123
+ eventLabel: i18nRuntime.i18n("5e3640e4bc8efbe00a7b7c6ba169560c"),
124
+ description: i18nRuntime.i18n("008ae858112dcc7739985045e4326f3a"),
125
125
  dataSchema: [{
126
126
  type: 'object',
127
127
  properties: {
128
128
  'event.data.value': {
129
129
  type: 'array',
130
- title: '列表记录'
130
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
131
131
  },
132
132
  'event.data.item': {
133
133
  type: 'object',
134
- title: '新增行记录'
134
+ title: i18nRuntime.i18n("1fb1cbe49c3e72c2b5f4e0151a4cb5d9")
135
135
  },
136
136
  'event.data.index': {
137
137
  type: 'number',
138
- title: '新增行记录索引'
138
+ title: i18nRuntime.i18n("7b25d5ff93da66fe95b5409731bb9838")
139
139
  }
140
140
  }
141
141
  }]
142
142
  }, {
143
143
  eventName: 'addSuccess',
144
- eventLabel: '添加成功',
145
- description: '开启”确认模式“并且配置”新增接口“,点击“保存”后成功添加时触发',
144
+ eventLabel: i18nRuntime.i18n("3fdaeadf0e8a3154ae62784f04138c28"),
145
+ description: i18nRuntime.i18n("bd4ef227fe8aae88ae6aa97236c0e9bb"),
146
146
  dataSchema: [{
147
147
  type: 'object',
148
148
  properties: {
149
149
  'event.data.value': {
150
150
  type: 'array',
151
- title: '列表记录'
151
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
152
152
  },
153
153
  'event.data.item': {
154
154
  type: 'object',
155
- title: '新增行记录'
155
+ title: i18nRuntime.i18n("1fb1cbe49c3e72c2b5f4e0151a4cb5d9")
156
156
  },
157
157
  'event.data.index': {
158
158
  type: 'number',
159
- title: '新增行记录索引'
159
+ title: i18nRuntime.i18n("7b25d5ff93da66fe95b5409731bb9838")
160
160
  }
161
161
  }
162
162
  }]
163
163
  }, {
164
164
  eventName: 'addFail',
165
- eventLabel: '添加失败',
166
- description: '开启”确认模式“并且配置”新增接口“,点击“保存”后调用接口失败时触发',
165
+ eventLabel: i18nRuntime.i18n("6452a05591d7402a8bcd9fadc950c449"),
166
+ description: i18nRuntime.i18n("bd7c39d10dbf6985d2be2d9a4fdcccf7"),
167
167
  dataSchema: [{
168
168
  type: 'object',
169
169
  properties: {
170
170
  'event.data.value': {
171
171
  type: 'array',
172
- title: '列表记录'
172
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
173
173
  },
174
174
  'event.data.item': {
175
175
  type: 'object',
176
- title: '新增行记录'
176
+ title: i18nRuntime.i18n("1fb1cbe49c3e72c2b5f4e0151a4cb5d9")
177
177
  },
178
178
  'event.data.index': {
179
179
  type: 'number',
180
- title: '新增行记录索引'
180
+ title: i18nRuntime.i18n("7b25d5ff93da66fe95b5409731bb9838")
181
181
  },
182
182
  'event.data.error': {
183
183
  type: 'object',
184
- title: '请求失败后接口返回的错误信息'
184
+ title: i18nRuntime.i18n("37122b9e4499da38258b3d51b09d68a1")
185
185
  }
186
186
  }
187
187
  }]
188
188
  }, {
189
189
  eventName: 'edit',
190
- eventLabel: '编辑行',
191
- description: '点击某一行右侧操作栏“编辑”按钮时触发',
190
+ eventLabel: i18nRuntime.i18n("88ebffeee507da0f0d039eb2d05f7e2c"),
191
+ description: i18nRuntime.i18n("daf24d1f83e1b4fce2f57a6b041ddba6"),
192
192
  dataSchema: [{
193
193
  type: 'object',
194
194
  properties: {
195
195
  'event.data.value': {
196
196
  type: 'array',
197
- title: '列表记录'
197
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
198
198
  },
199
199
  'event.data.item': {
200
200
  type: 'object',
201
- title: '所在行记录'
201
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
202
202
  },
203
203
  'event.data.index': {
204
204
  type: 'number',
205
- title: '所在行记录索引'
205
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
206
206
  }
207
207
  }
208
208
  }]
209
209
  }, {
210
210
  eventName: 'editConfirm',
211
- eventLabel: '确认编辑',
212
- description: '开启”确认模式“,点击“编辑”按钮,填入数据后点击“保存”按钮后触发',
211
+ eventLabel: i18nRuntime.i18n("4271f29faca65d7840ad6bb2c4a7b8c6"),
212
+ description: i18nRuntime.i18n("562f54a2fec7a68f85ff192a68cf69f2"),
213
213
  dataSchema: [{
214
214
  type: 'object',
215
215
  properties: {
216
216
  'event.data.value': {
217
217
  type: 'array',
218
- title: '列表记录'
218
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
219
219
  },
220
220
  'event.data.item': {
221
221
  type: 'object',
222
- title: '所在行记录'
222
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
223
223
  },
224
224
  'event.data.index': {
225
225
  type: 'number',
226
- title: '所在行记录索引'
226
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
227
227
  }
228
228
  }
229
229
  }]
230
230
  }, {
231
231
  eventName: 'editSuccess',
232
- eventLabel: '编辑成功',
233
- description: '开启”确认模式“并且配置”编辑接口“,点击“保存”后成功编辑时触发',
232
+ eventLabel: i18nRuntime.i18n("3bb47b67994cb374e601fab35f63bc8e"),
233
+ description: i18nRuntime.i18n("b394745a8a77179da0000293638e8a56"),
234
234
  dataSchema: [{
235
235
  type: 'object',
236
236
  properties: {
237
237
  'event.data.value': {
238
238
  type: 'array',
239
- title: '列表记录'
239
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
240
240
  },
241
241
  'event.data.item': {
242
242
  type: 'object',
243
- title: '所在行记录'
243
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
244
244
  },
245
245
  'event.data.index': {
246
246
  type: 'number',
247
- title: '所在行记录索引'
247
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
248
248
  }
249
249
  }
250
250
  }]
251
251
  }, {
252
252
  eventName: 'editFail',
253
- eventLabel: '编辑失败',
254
- description: '开启”确认模式“并且配置”编辑接口“,点击“保存”后调用接口失败时触发',
253
+ eventLabel: i18nRuntime.i18n("9304e8f4c324b5882b550caa971b64b8"),
254
+ description: i18nRuntime.i18n("b9d277c3ffab7d4b955ad10308c7ae0a"),
255
255
  dataSchema: [{
256
256
  type: 'object',
257
257
  properties: {
258
258
  'event.data.value': {
259
259
  type: 'array',
260
- title: '列表记录'
260
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
261
261
  },
262
262
  'event.data.item': {
263
263
  type: 'object',
264
- title: '所在行记录'
264
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
265
265
  },
266
266
  'event.data.index': {
267
267
  type: 'number',
268
- title: '所在行记录索引'
268
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
269
269
  },
270
270
  'event.data.error': {
271
271
  type: 'object',
272
- title: '请求错误后返回的错误信息'
272
+ title: i18nRuntime.i18n("650bccdd6f99fe5fc4ca6cb8788e7cb4")
273
273
  }
274
274
  }
275
275
  }]
276
276
  }, {
277
277
  eventName: 'delete',
278
- eventLabel: '删除行',
279
- description: '点击某一行右侧操作栏“删除”按钮时触发',
278
+ eventLabel: i18nRuntime.i18n("947fa341a6d676d7f25bae6bef8342cd"),
279
+ description: i18nRuntime.i18n("7508f6d66d920323d87a9f9d58487a40"),
280
280
  dataSchema: [{
281
281
  type: 'object',
282
282
  properties: {
283
283
  'event.data.value': {
284
284
  type: 'array',
285
- title: '列表记录'
285
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
286
286
  },
287
287
  'event.data.item': {
288
288
  type: 'object',
289
- title: '所在行记录'
289
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
290
290
  },
291
291
  'event.data.index': {
292
292
  type: 'object',
293
- title: '所在行记录索引'
293
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
294
294
  }
295
295
  }
296
296
  }]
297
297
  }, {
298
298
  eventName: 'deleteSuccess',
299
- eventLabel: '删除成功',
300
- description: '配置了“删除接口”,调用接口成功时触发',
299
+ eventLabel: i18nRuntime.i18n("0007d170de017dafc266aa03926d7f00"),
300
+ description: i18nRuntime.i18n("13640e78822f62b7b71bfabb4604025e"),
301
301
  dataSchema: [{
302
302
  type: 'object',
303
303
  properties: {
304
304
  'event.data.value': {
305
305
  type: 'array',
306
- title: '列表记录'
306
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
307
307
  },
308
308
  'event.data.item': {
309
309
  type: 'object',
310
- title: '所在行记录'
310
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
311
311
  },
312
312
  'event.data.index': {
313
313
  type: 'object',
314
- title: '所在行记录索引'
314
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
315
315
  }
316
316
  }
317
317
  }]
318
318
  }, {
319
319
  eventName: 'deleteFail',
320
- eventLabel: '删除失败',
321
- description: '配置了“删除接口”,调用接口失败时触发',
320
+ eventLabel: i18nRuntime.i18n("acf0664a54dc58d9d0377bb56e162092"),
321
+ description: i18nRuntime.i18n("14d36ca583bcbfc5516a000eb06ccedd"),
322
322
  dataSchema: [{
323
323
  type: 'object',
324
324
  properties: {
325
325
  'event.data.value': {
326
326
  type: 'array',
327
- title: '列表记录'
327
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
328
328
  },
329
329
  'event.data.item': {
330
330
  type: 'object',
331
- title: '所在行记录'
331
+ title: i18nRuntime.i18n("a9e009a9936bf5bcc9d4eabcb3e952e0")
332
332
  },
333
333
  'event.data.index': {
334
334
  type: 'object',
335
- title: '所在行记录索引'
335
+ title: i18nRuntime.i18n("e756ec22a0f897c4dd886c5f4a95b7a6")
336
336
  },
337
337
  'event.data.error': {
338
338
  type: 'object',
339
- title: '请求失败后接口返回的错误信息'
339
+ title: i18nRuntime.i18n("37122b9e4499da38258b3d51b09d68a1")
340
340
  }
341
341
  }
342
342
  }]
343
343
  }, {
344
344
  eventName: 'change',
345
345
  eventLabel: i18nRuntime.i18n("755955372bcc0c7ebf161a656bc389b3"),
346
- description: '表格数据发生改变时触发',
346
+ description: i18nRuntime.i18n("692dc28abc42931daca8fa12d69d5c99"),
347
347
  dataSchema: [{
348
348
  type: 'object',
349
349
  properties: {
350
350
  'event.data.value': {
351
351
  type: 'array',
352
- title: '列表记录'
352
+ title: i18nRuntime.i18n("c9f63503ee66082fc00c3e6eac57a95f")
353
353
  }
354
354
  }
355
355
  }]
@@ -360,8 +360,8 @@ var TableControlPlugin = /** @class */function (_super) {
360
360
  description: i18nRuntime.i18n("0310aa5a05fe07147d8b7ef20616f659")
361
361
  }, {
362
362
  actionType: 'addItem',
363
- actionLabel: '添加行',
364
- description: '添加行数据',
363
+ actionLabel: i18nRuntime.i18n("58477471b3bb8ad53fe9ab18a244868b"),
364
+ description: i18nRuntime.i18n("f8692d409bb7f122a374872e01efd03a"),
365
365
  innerArgs: ['item', 'index'],
366
366
  schema: helper.getArgsWrapper({
367
367
  type: 'container',
@@ -373,9 +373,9 @@ var TableControlPlugin = /** @class */function (_super) {
373
373
  leftFixed: 4 // 需要设置下leftFixed,否则这个字段的控件没有与其他字段的控件左对齐
374
374
  },
375
375
 
376
- label: '插入位置',
376
+ label: i18nRuntime.i18n("459fd144ee129b501545d19c169269e9"),
377
377
  size: 'lg',
378
- placeholder: '请输入行号,为空则在头部插入'
378
+ placeholder: i18nRuntime.i18n("196e71fa869b8410088b4ceb54aa7988")
379
379
  }, {
380
380
  type: 'combo',
381
381
  name: 'value',
@@ -388,7 +388,7 @@ var TableControlPlugin = /** @class */function (_super) {
388
388
  canAccessSuperData: true,
389
389
  mode: 'horizontal',
390
390
  size: 'lg',
391
- addButtonText: '新增一行',
391
+ addButtonText: i18nRuntime.i18n("a26858cccbc451fd53515416a5968550"),
392
392
  items: [{
393
393
  type: 'combo',
394
394
  name: 'item',
@@ -403,7 +403,7 @@ var TableControlPlugin = /** @class */function (_super) {
403
403
  className: 'm-l',
404
404
  size: 'lg',
405
405
  mode: 'horizontal',
406
- addButtonText: '新增字段',
406
+ addButtonText: i18nRuntime.i18n("c520ed9911d349c7974116d3d1e1423e"),
407
407
  items: [{
408
408
  name: 'key',
409
409
  type: 'input-text',
@@ -420,8 +420,8 @@ var TableControlPlugin = /** @class */function (_super) {
420
420
  })
421
421
  }, {
422
422
  actionType: 'deleteItem',
423
- actionLabel: '删除行',
424
- description: '删除某一行数据',
423
+ actionLabel: i18nRuntime.i18n("947fa341a6d676d7f25bae6bef8342cd"),
424
+ description: i18nRuntime.i18n("344c1c96f9cb3275f972929755b4e238"),
425
425
  innerArgs: ['condition', 'index'],
426
426
  schema: helper.getArgsWrapper({
427
427
  type: 'container',
@@ -430,7 +430,7 @@ var TableControlPlugin = /** @class */function (_super) {
430
430
  name: '__deleteType',
431
431
  inputClassName: 'event-action-radio',
432
432
  mode: 'horizontal',
433
- label: '删除方式',
433
+ label: i18nRuntime.i18n("8910acd418e45a30f01e7e531b90b61b"),
434
434
  pipeIn: function (value, store) {
435
435
  if (store.data.__deleteType === undefined) {
436
436
  var deleteType = store.data.condition ? 'conditionExpression' : 'rowIndex';
@@ -446,10 +446,10 @@ var TableControlPlugin = /** @class */function (_super) {
446
446
  },
447
447
 
448
448
  options: [{
449
- label: '指定行号',
449
+ label: i18nRuntime.i18n("ebf62450c3fb11c0b7e06da2d7535d6c"),
450
450
  value: 'rowIndex'
451
451
  }, {
452
- label: '条件表达式',
452
+ label: i18nRuntime.i18n("4bf7636a84714fac140e42b4cee242d4"),
453
453
  value: 'conditionExpression'
454
454
  }],
455
455
  onChange: function (value, oldVal, data, form) {
@@ -465,14 +465,14 @@ var TableControlPlugin = /** @class */function (_super) {
465
465
  },
466
466
 
467
467
  required: true,
468
- label: '删除范围',
468
+ label: i18nRuntime.i18n("7708fb1394ce722ee73326437a66c77a"),
469
469
  size: 'lg',
470
- placeholder: '请输入行号,输入多个则用英文逗号分隔',
470
+ placeholder: i18nRuntime.i18n("015f108b96c70bba6511091e159db0ac"),
471
471
  hiddenOn: 'data.__deleteType !== "rowIndex"'
472
472
  }, amisEditorCore.getSchemaTpl('formulaControl', {
473
473
  name: 'condition',
474
474
  variables: '${variables}',
475
- label: '删除条件',
475
+ label: i18nRuntime.i18n("63aeb2082d7cc0a316fc1e44913d7749"),
476
476
  hiddenOn: 'data.__deleteType !== "conditionExpression"',
477
477
  mode: 'horizontal',
478
478
  required: true,
@@ -492,7 +492,7 @@ var TableControlPlugin = /** @class */function (_super) {
492
492
  {
493
493
  actionType: 'clear',
494
494
  actionLabel: i18nRuntime.i18n("288f0c404c4e546aa3683ff5054e85e2"),
495
- description: '清空组件数据'
495
+ description: i18nRuntime.i18n("4622a4ce221f9b79aa3396cc461adc75")
496
496
  }];
497
497
  _this.panelBodyCreator = function (context) {
498
498
  context.schema.type === 'crud';
@@ -673,6 +673,7 @@ var TableControlPlugin = /** @class */function (_super) {
673
673
  }, helper.getEventControlConfig(_this.manager, context)))]
674
674
  }]);
675
675
  };
676
+ _this.dsBuilderManager = new amisEditorCore.DSBuilderManager('input-table', 'api');
676
677
  return _this;
677
678
  }
678
679
  Object.defineProperty(TableControlPlugin.prototype, "scaffoldForm", {
@@ -918,6 +919,28 @@ var TableControlPlugin = /** @class */function (_super) {
918
919
  });
919
920
  });
920
921
  };
922
+ TableControlPlugin.prototype.getAvailableContextFields = function (scopeNode, target, region) {
923
+ var _a, _b;
924
+ return tslib.__awaiter(this, void 0, void 0, function () {
925
+ var scope, builder;
926
+ return tslib.__generator(this, function (_c) {
927
+ if (target.parent.isRegion && target.parent.region === 'columns') {
928
+ scope = scopeNode.parent.parent;
929
+ builder = this.dsBuilderManager.resolveBuilderBySchema(scope.schema, 'api');
930
+ if (builder && scope.schema.api) {
931
+ return [2 /*return*/, builder.getAvailableContextFileds({
932
+ schema: scope.schema,
933
+ sourceKey: 'api',
934
+ feat: (_b = (_a = scope.schema) === null || _a === void 0 ? void 0 : _a.feat) !== null && _b !== void 0 ? _b : 'List',
935
+ scopeNode: scopeNode
936
+ }, target)];
937
+ }
938
+ }
939
+ return [2 /*return*/];
940
+ });
941
+ });
942
+ };
943
+
921
944
  return TableControlPlugin;
922
945
  }(amisEditorCore.BasePlugin);
923
946
  amisEditorCore.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 的情况
@@ -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
  }
@@ -68,26 +68,26 @@ export default class BadgeControl extends React.Component<BadgeControlProps, Bad
68
68
  normalizeBadgeValue(form: BadgeForm): {
69
69
  offset: number[];
70
70
  size?: any;
71
- text?: string | number | undefined;
72
71
  style?: {
73
72
  [propName: string]: any;
74
73
  } | undefined;
75
- mode?: "text" | "dot" | "ribbon" | undefined;
76
- visibleOn?: any;
74
+ text?: string | number | undefined;
77
75
  level?: any;
76
+ visibleOn?: any;
77
+ mode?: "text" | "dot" | "ribbon" | undefined;
78
78
  position?: "top-right" | "top-left" | "bottom-left" | "bottom-right" | undefined;
79
79
  animation?: boolean | undefined;
80
80
  overflowCount?: number | undefined;
81
81
  } | {
82
82
  offset: [number, number];
83
83
  size?: any;
84
- text?: string | number | undefined;
85
84
  style?: {
86
85
  [propName: string]: any;
87
86
  } | undefined;
88
- mode?: "text" | "dot" | "ribbon" | undefined;
89
- visibleOn?: any;
87
+ text?: string | number | undefined;
90
88
  level?: any;
89
+ visibleOn?: any;
90
+ mode?: "text" | "dot" | "ribbon" | undefined;
91
91
  position?: "top-right" | "top-left" | "bottom-left" | "bottom-right" | undefined;
92
92
  animation?: boolean | undefined;
93
93
  overflowCount?: number | undefined;
@@ -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
  }