@rpascene/visualizer 0.30.12 → 0.30.13

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.
@@ -423,6 +423,11 @@
423
423
  color: #2b83ff;
424
424
  }
425
425
 
426
+ .more-apis-dropdown-overlay > ul {
427
+ max-height: 60vh;
428
+ overflow-y: auto;
429
+ }
430
+
426
431
  body {
427
432
  margin: 0;
428
433
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
@@ -389,3 +389,8 @@
389
389
  color: #2b83ff;
390
390
  }
391
391
 
392
+ .more-apis-dropdown-overlay > ul {
393
+ max-height: 60vh;
394
+ overflow-y: auto;
395
+ }
396
+
@@ -646,6 +646,8 @@ const PromptInput = (param)=>{
646
646
  'click'
647
647
  ],
648
648
  disabled: !runButtonEnabled,
649
+ overlayClassName: "more-apis-dropdown-overlay",
650
+ getPopupContainer: ()=>document.getElementById("playground-container"),
649
651
  children: /*#__PURE__*/ jsxs(Button, {
650
652
  className: `more-apis-button ${!defaultMainButtons.includes(selectedType) ? 'selected-from-dropdown' : ''}`,
651
653
  children: [
@@ -30,8 +30,11 @@ function ErrorMessage(param) {
30
30
  children: error
31
31
  }),
32
32
  overlayStyle: {
33
- maxWidth: '100vw'
33
+ maxWidth: '98%',
34
+ maxHeight: '70%',
35
+ overflow: 'auto'
34
36
  },
37
+ getPopupContainer: ()=>document.getElementById("playground-container"),
35
38
  children: [
36
39
  "Error: ",
37
40
  error.split('\n')[0]
@@ -142,6 +145,7 @@ function UniversalPlayground(param) {
142
145
  handleStop
143
146
  ]);
144
147
  return /*#__PURE__*/ jsx("div", {
148
+ id: "playground-container",
145
149
  className: `playground-container ${layout}-mode ${className}`.trim(),
146
150
  ref: ref,
147
151
  children: /*#__PURE__*/ jsxs(Form, {
@@ -312,7 +316,7 @@ function UniversalPlayground(param) {
312
316
  /*#__PURE__*/ jsx("ul", {
313
317
  className: "action-result-list",
314
318
  children: item.actionTasks.map((data, index)=>{
315
- var _commandMap_data_subType, _data_param, _data_param1;
319
+ var _commandMap_data_subType, _data_param, _data_param1, _data_param2, _data_param3, _data_param4, _data_param_from, _data_param5, _data_param_to, _data_param6;
316
320
  return /*#__PURE__*/ jsxs("li", {
317
321
  title: data.locate,
318
322
  children: [
@@ -323,18 +327,56 @@ function UniversalPlayground(param) {
323
327
  (null == (_commandMap_data_subType = commandMap[data.subType]) ? void 0 : _commandMap_data_subType.DisplayName) || data.subType
324
328
  ]
325
329
  }),
326
- (null == data ? void 0 : null == (_data_param = data.param) ? void 0 : _data_param.value) && /*#__PURE__*/ jsxs("div", {
330
+ (null == data ? void 0 : null == (_data_param = data.param) ? void 0 : _data_param.timeMs) && /*#__PURE__*/ jsxs("div", {
331
+ className: "action-result-command",
332
+ children: [
333
+ "\u6682\u505C\u65F6\u95F4\uFF1A",
334
+ data.param.timeMs
335
+ ]
336
+ }),
337
+ (null == data ? void 0 : null == (_data_param1 = data.param) ? void 0 : _data_param1.url) && /*#__PURE__*/ jsxs("div", {
338
+ className: "action-result-command",
339
+ children: [
340
+ "\u7F51\u5740\uFF1A",
341
+ data.param.url
342
+ ]
343
+ }),
344
+ (null == data ? void 0 : null == (_data_param2 = data.param) ? void 0 : _data_param2.keyName) && /*#__PURE__*/ jsxs("div", {
345
+ className: "action-result-command",
346
+ children: [
347
+ "\u6309\u952E\uFF1A",
348
+ data.param.keyName
349
+ ]
350
+ }),
351
+ (null == data ? void 0 : null == (_data_param3 = data.param) ? void 0 : _data_param3.value) && /*#__PURE__*/ jsxs("div", {
327
352
  className: "action-result-command",
328
353
  children: [
329
354
  "\u503C\uFF1A",
330
- (null == data ? void 0 : null == (_data_param1 = data.param) ? void 0 : _data_param1.value) || (null == data ? void 0 : data.param.keyName)
355
+ null == data ? void 0 : null == (_data_param4 = data.param) ? void 0 : _data_param4.value
331
356
  ]
332
357
  }),
333
- /*#__PURE__*/ jsxs("div", {
358
+ (null == (_data_param5 = data.param) ? void 0 : null == (_data_param_from = _data_param5.from) ? void 0 : _data_param_from.locateDescription) && (null == (_data_param6 = data.param) ? void 0 : null == (_data_param_to = _data_param6.to) ? void 0 : _data_param_to.locateDescription) && /*#__PURE__*/ jsxs("div", {
359
+ className: "action-result-locate",
360
+ children: [
361
+ /*#__PURE__*/ jsx("span", {
362
+ children: "\u62D6\u62FD\u5143\u7D20\uFF1A"
363
+ }),
364
+ /*#__PURE__*/ jsx("span", {
365
+ children: data.param.from.locateDescription
366
+ }),
367
+ /*#__PURE__*/ jsx("span", {
368
+ children: "\u76EE\u6807\u5143\u7D20\uFF1A"
369
+ }),
370
+ /*#__PURE__*/ jsx("span", {
371
+ children: data.param.to.locateDescription
372
+ })
373
+ ]
374
+ }),
375
+ data.locateDescription && /*#__PURE__*/ jsxs("div", {
334
376
  className: "action-result-locate",
335
377
  children: [
336
378
  "\u5143\u7D20\uFF1A",
337
- data.locate
379
+ data.locateDescription
338
380
  ]
339
381
  })
340
382
  ]
@@ -116,8 +116,52 @@ function usePlaygroundExecution(playgroundSDK, storage, actionSpace, loading, se
116
116
  console.error('Failed to save result:', error);
117
117
  }
118
118
  if (showHumanUse && result && result.dump && (null == (_result_dump_executions = result.dump.executions) ? void 0 : null == (_result_dump_executions_ = _result_dump_executions[0]) ? void 0 : _result_dump_executions_.tasks)) {
119
- var _result_dump_executions__tasks_filter, _result_dump_executions__tasks, _result_dump_executions_1, _result_dump_executions1, _result_dump;
119
+ var _result_dump_executions_1, _result_dump_executions1, _result_dump;
120
120
  const thisRunningId = Date.now();
121
+ const tasks = (null == result ? void 0 : null == (_result_dump = result.dump) ? void 0 : null == (_result_dump_executions1 = _result_dump.executions) ? void 0 : null == (_result_dump_executions_1 = _result_dump_executions1[0]) ? void 0 : _result_dump_executions_1.tasks) || [];
122
+ const actionTasks = tasks.map((item, index)=>{
123
+ if ('Action' === item.type) {
124
+ var _tasks__param, _tasks_;
125
+ if ('DragAndDrop' === item.subType) {
126
+ var _tasks__param1, _tasks_1, _tasks__param2, _tasks_2;
127
+ const from = (null == (_tasks_1 = tasks[index - 2]) ? void 0 : null == (_tasks__param1 = _tasks_1.param) ? void 0 : _tasks__param1.prompt) || '';
128
+ const to = (null == (_tasks_2 = tasks[index - 1]) ? void 0 : null == (_tasks__param2 = _tasks_2.param) ? void 0 : _tasks__param2.prompt) || '';
129
+ return {
130
+ ...item,
131
+ param: {
132
+ ...item.param,
133
+ from: {
134
+ ...item.param.from,
135
+ locateDescription: from
136
+ },
137
+ to: {
138
+ ...item.param.to,
139
+ locateDescription: to
140
+ }
141
+ },
142
+ output: {
143
+ ...item.output,
144
+ param: {
145
+ ...item.output.param,
146
+ from: {
147
+ ...item.output.param.from,
148
+ locateDescription: from
149
+ },
150
+ to: {
151
+ ...item.output.param.to,
152
+ locateDescription: to
153
+ }
154
+ }
155
+ }
156
+ };
157
+ }
158
+ return {
159
+ ...item,
160
+ locateDescription: (null == (_tasks_ = tasks[index - 1]) ? void 0 : null == (_tasks__param = _tasks_.param) ? void 0 : _tasks__param.prompt) || ''
161
+ };
162
+ }
163
+ return item;
164
+ });
121
165
  const systemItem = {
122
166
  id: `system-${thisRunningId}`,
123
167
  type: 'system',
@@ -125,13 +169,7 @@ function usePlaygroundExecution(playgroundSDK, storage, actionSpace, loading, se
125
169
  timestamp: new Date(),
126
170
  loading: false,
127
171
  loadingProgressText: '',
128
- actionTasks: null == result ? void 0 : null == (_result_dump = result.dump) ? void 0 : null == (_result_dump_executions1 = _result_dump.executions) ? void 0 : null == (_result_dump_executions_1 = _result_dump_executions1[0]) ? void 0 : null == (_result_dump_executions__tasks = _result_dump_executions_1.tasks) ? void 0 : null == (_result_dump_executions__tasks_filter = _result_dump_executions__tasks.filter((item)=>'Action' === item.type)) ? void 0 : _result_dump_executions__tasks_filter.map((item, index)=>{
129
- var _result_result_yamlFlow_index, _result_result_yamlFlow, _result_result, _value_params, _value_params1;
130
- return {
131
- ...item,
132
- locate: (null == result ? void 0 : null == (_result_result = result.result) ? void 0 : null == (_result_result_yamlFlow = _result_result.yamlFlow) ? void 0 : null == (_result_result_yamlFlow_index = _result_result_yamlFlow[index]) ? void 0 : _result_result_yamlFlow_index.locate) || (null == value ? void 0 : null == (_value_params = value.params) ? void 0 : _value_params.locate) || (null == value ? void 0 : null == (_value_params1 = value.params) ? void 0 : _value_params1.prompt) || ''
133
- };
134
- })
172
+ actionTasks: actionTasks.filter((item)=>'Action' === item.type)
135
173
  };
136
174
  setInfoList((prev)=>[
137
175
  ...prev,
@@ -423,6 +423,11 @@
423
423
  color: #2b83ff;
424
424
  }
425
425
 
426
+ .more-apis-dropdown-overlay > ul {
427
+ max-height: 60vh;
428
+ overflow-y: auto;
429
+ }
430
+
426
431
  body {
427
432
  margin: 0;
428
433
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
@@ -389,3 +389,8 @@
389
389
  color: #2b83ff;
390
390
  }
391
391
 
392
+ .more-apis-dropdown-overlay > ul {
393
+ max-height: 60vh;
394
+ overflow-y: auto;
395
+ }
396
+
@@ -684,6 +684,8 @@ const PromptInput = (param)=>{
684
684
  'click'
685
685
  ],
686
686
  disabled: !runButtonEnabled,
687
+ overlayClassName: "more-apis-dropdown-overlay",
688
+ getPopupContainer: ()=>document.getElementById("playground-container"),
687
689
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Button, {
688
690
  className: `more-apis-button ${!constants_js_namespaceObject.defaultMainButtons.includes(selectedType) ? 'selected-from-dropdown' : ''}`,
689
691
  children: [
@@ -70,8 +70,11 @@ function ErrorMessage(param) {
70
70
  children: error
71
71
  }),
72
72
  overlayStyle: {
73
- maxWidth: '100vw'
73
+ maxWidth: '98%',
74
+ maxHeight: '70%',
75
+ overflow: 'auto'
74
76
  },
77
+ getPopupContainer: ()=>document.getElementById("playground-container"),
75
78
  children: [
76
79
  "Error: ",
77
80
  error.split('\n')[0]
@@ -182,6 +185,7 @@ function UniversalPlayground(param) {
182
185
  handleStop
183
186
  ]);
184
187
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
188
+ id: "playground-container",
185
189
  className: `playground-container ${layout}-mode ${className}`.trim(),
186
190
  ref: ref,
187
191
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Form, {
@@ -352,7 +356,7 @@ function UniversalPlayground(param) {
352
356
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
353
357
  className: "action-result-list",
354
358
  children: item.actionTasks.map((data, index)=>{
355
- var _commandMap_data_subType, _data_param, _data_param1;
359
+ var _commandMap_data_subType, _data_param, _data_param1, _data_param2, _data_param3, _data_param4, _data_param_from, _data_param5, _data_param_to, _data_param6;
356
360
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("li", {
357
361
  title: data.locate,
358
362
  children: [
@@ -363,18 +367,56 @@ function UniversalPlayground(param) {
363
367
  (null == (_commandMap_data_subType = constants_namespaceObject.commandMap[data.subType]) ? void 0 : _commandMap_data_subType.DisplayName) || data.subType
364
368
  ]
365
369
  }),
366
- (null == data ? void 0 : null == (_data_param = data.param) ? void 0 : _data_param.value) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
370
+ (null == data ? void 0 : null == (_data_param = data.param) ? void 0 : _data_param.timeMs) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
371
+ className: "action-result-command",
372
+ children: [
373
+ "\u6682\u505C\u65F6\u95F4\uFF1A",
374
+ data.param.timeMs
375
+ ]
376
+ }),
377
+ (null == data ? void 0 : null == (_data_param1 = data.param) ? void 0 : _data_param1.url) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
378
+ className: "action-result-command",
379
+ children: [
380
+ "\u7F51\u5740\uFF1A",
381
+ data.param.url
382
+ ]
383
+ }),
384
+ (null == data ? void 0 : null == (_data_param2 = data.param) ? void 0 : _data_param2.keyName) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
385
+ className: "action-result-command",
386
+ children: [
387
+ "\u6309\u952E\uFF1A",
388
+ data.param.keyName
389
+ ]
390
+ }),
391
+ (null == data ? void 0 : null == (_data_param3 = data.param) ? void 0 : _data_param3.value) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
367
392
  className: "action-result-command",
368
393
  children: [
369
394
  "\u503C\uFF1A",
370
- (null == data ? void 0 : null == (_data_param1 = data.param) ? void 0 : _data_param1.value) || (null == data ? void 0 : data.param.keyName)
395
+ null == data ? void 0 : null == (_data_param4 = data.param) ? void 0 : _data_param4.value
371
396
  ]
372
397
  }),
373
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
398
+ (null == (_data_param5 = data.param) ? void 0 : null == (_data_param_from = _data_param5.from) ? void 0 : _data_param_from.locateDescription) && (null == (_data_param6 = data.param) ? void 0 : null == (_data_param_to = _data_param6.to) ? void 0 : _data_param_to.locateDescription) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
399
+ className: "action-result-locate",
400
+ children: [
401
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
402
+ children: "\u62D6\u62FD\u5143\u7D20\uFF1A"
403
+ }),
404
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
405
+ children: data.param.from.locateDescription
406
+ }),
407
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
408
+ children: "\u76EE\u6807\u5143\u7D20\uFF1A"
409
+ }),
410
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
411
+ children: data.param.to.locateDescription
412
+ })
413
+ ]
414
+ }),
415
+ data.locateDescription && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
374
416
  className: "action-result-locate",
375
417
  children: [
376
418
  "\u5143\u7D20\uFF1A",
377
- data.locate
419
+ data.locateDescription
378
420
  ]
379
421
  })
380
422
  ]
@@ -144,8 +144,52 @@ function usePlaygroundExecution(playgroundSDK, storage, actionSpace, loading, se
144
144
  console.error('Failed to save result:', error);
145
145
  }
146
146
  if (showHumanUse && result && result.dump && (null == (_result_dump_executions = result.dump.executions) ? void 0 : null == (_result_dump_executions_ = _result_dump_executions[0]) ? void 0 : _result_dump_executions_.tasks)) {
147
- var _result_dump_executions__tasks_filter, _result_dump_executions__tasks, _result_dump_executions_1, _result_dump_executions1, _result_dump;
147
+ var _result_dump_executions_1, _result_dump_executions1, _result_dump;
148
148
  const thisRunningId = Date.now();
149
+ const tasks = (null == result ? void 0 : null == (_result_dump = result.dump) ? void 0 : null == (_result_dump_executions1 = _result_dump.executions) ? void 0 : null == (_result_dump_executions_1 = _result_dump_executions1[0]) ? void 0 : _result_dump_executions_1.tasks) || [];
150
+ const actionTasks = tasks.map((item, index)=>{
151
+ if ('Action' === item.type) {
152
+ var _tasks__param, _tasks_;
153
+ if ('DragAndDrop' === item.subType) {
154
+ var _tasks__param1, _tasks_1, _tasks__param2, _tasks_2;
155
+ const from = (null == (_tasks_1 = tasks[index - 2]) ? void 0 : null == (_tasks__param1 = _tasks_1.param) ? void 0 : _tasks__param1.prompt) || '';
156
+ const to = (null == (_tasks_2 = tasks[index - 1]) ? void 0 : null == (_tasks__param2 = _tasks_2.param) ? void 0 : _tasks__param2.prompt) || '';
157
+ return {
158
+ ...item,
159
+ param: {
160
+ ...item.param,
161
+ from: {
162
+ ...item.param.from,
163
+ locateDescription: from
164
+ },
165
+ to: {
166
+ ...item.param.to,
167
+ locateDescription: to
168
+ }
169
+ },
170
+ output: {
171
+ ...item.output,
172
+ param: {
173
+ ...item.output.param,
174
+ from: {
175
+ ...item.output.param.from,
176
+ locateDescription: from
177
+ },
178
+ to: {
179
+ ...item.output.param.to,
180
+ locateDescription: to
181
+ }
182
+ }
183
+ }
184
+ };
185
+ }
186
+ return {
187
+ ...item,
188
+ locateDescription: (null == (_tasks_ = tasks[index - 1]) ? void 0 : null == (_tasks__param = _tasks_.param) ? void 0 : _tasks__param.prompt) || ''
189
+ };
190
+ }
191
+ return item;
192
+ });
149
193
  const systemItem = {
150
194
  id: `system-${thisRunningId}`,
151
195
  type: 'system',
@@ -153,13 +197,7 @@ function usePlaygroundExecution(playgroundSDK, storage, actionSpace, loading, se
153
197
  timestamp: new Date(),
154
198
  loading: false,
155
199
  loadingProgressText: '',
156
- actionTasks: null == result ? void 0 : null == (_result_dump = result.dump) ? void 0 : null == (_result_dump_executions1 = _result_dump.executions) ? void 0 : null == (_result_dump_executions_1 = _result_dump_executions1[0]) ? void 0 : null == (_result_dump_executions__tasks = _result_dump_executions_1.tasks) ? void 0 : null == (_result_dump_executions__tasks_filter = _result_dump_executions__tasks.filter((item)=>'Action' === item.type)) ? void 0 : _result_dump_executions__tasks_filter.map((item, index)=>{
157
- var _result_result_yamlFlow_index, _result_result_yamlFlow, _result_result, _value_params, _value_params1;
158
- return {
159
- ...item,
160
- locate: (null == result ? void 0 : null == (_result_result = result.result) ? void 0 : null == (_result_result_yamlFlow = _result_result.yamlFlow) ? void 0 : null == (_result_result_yamlFlow_index = _result_result_yamlFlow[index]) ? void 0 : _result_result_yamlFlow_index.locate) || (null == value ? void 0 : null == (_value_params = value.params) ? void 0 : _value_params.locate) || (null == value ? void 0 : null == (_value_params1 = value.params) ? void 0 : _value_params1.prompt) || ''
161
- };
162
- })
200
+ actionTasks: actionTasks.filter((item)=>'Action' === item.type)
163
201
  };
164
202
  setInfoList((prev)=>[
165
203
  ...prev,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpascene/visualizer",
3
- "version": "0.30.12",
3
+ "version": "0.30.13",
4
4
  "description": "RPA visualizer",
5
5
  "repository": "",
6
6
  "homepage": "",
@@ -72,10 +72,10 @@
72
72
  "antd": "^5.21.6",
73
73
  "buffer": "6.0.3",
74
74
  "dayjs": "^1.11.11",
75
- "@rpascene/shared": "0.30.12",
76
- "@rpascene/web": "0.30.12",
77
- "@rpascene/playground": "0.30.12",
78
- "@rpascene/core": "0.30.12"
75
+ "@rpascene/playground": "0.30.13",
76
+ "@rpascene/shared": "0.30.13",
77
+ "@rpascene/web": "0.30.13",
78
+ "@rpascene/core": "0.30.13"
79
79
  },
80
80
  "license": "MIT",
81
81
  "scripts": {