shared.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. export const tasks = {
  2. trigger: {
  3. name: 'Trigger',
  4. icon: 'riFlashlightLine',
  5. component: 'BlockBasic',
  6. editComponent: 'EditTrigger',
  7. category: 'general',
  8. inputs: 0,
  9. outputs: 1,
  10. allowedInputs: [],
  11. maxConnection: 1,
  12. data: {
  13. description: '',
  14. type: 'manual',
  15. },
  16. },
  17. 'event-click': {
  18. name: 'Click element',
  19. icon: 'riCursorLine',
  20. component: 'BlockBasic',
  21. editComponent: 'EditInteractionBase',
  22. category: 'interaction',
  23. inputs: 1,
  24. outputs: 1,
  25. allowedInputs: [],
  26. maxConnection: 1,
  27. data: {
  28. description: '',
  29. selector: '',
  30. multiple: false,
  31. },
  32. },
  33. delay: {
  34. name: 'Delay',
  35. icon: 'riTimerLine',
  36. component: 'BlockDelay',
  37. editComponent: 'EditTrigger',
  38. category: 'general',
  39. inputs: 1,
  40. outputs: 1,
  41. allowedInputs: [],
  42. maxConnection: 1,
  43. data: {
  44. time: 500,
  45. },
  46. },
  47. 'get-text': {
  48. name: 'Get text',
  49. icon: 'riParagraph',
  50. component: 'BlockBasic',
  51. editComponent: 'EditGetText',
  52. category: 'interaction',
  53. inputs: 1,
  54. outputs: 1,
  55. allowedInputs: [],
  56. maxConnection: 1,
  57. data: {
  58. description: '',
  59. selector: '',
  60. multiple: false,
  61. regex: '',
  62. dataColumn: '',
  63. },
  64. },
  65. 'export-data': {
  66. name: 'Export data',
  67. icon: 'riDownloadLine',
  68. component: 'BlockExportData',
  69. editComponent: 'EditTrigger',
  70. category: 'general',
  71. inputs: 1,
  72. outputs: 1,
  73. allowedInputs: [],
  74. maxConnection: 1,
  75. data: {
  76. type: 'JSON',
  77. },
  78. },
  79. 'element-scroll': {
  80. name: 'Scroll element',
  81. icon: 'riMouseLine',
  82. component: 'BlockBasic',
  83. editComponent: 'EditScrollElement',
  84. category: 'interaction',
  85. inputs: 1,
  86. outputs: 1,
  87. allowedInputs: [],
  88. maxConnection: 1,
  89. data: {
  90. description: '',
  91. selector: '',
  92. multiple: false,
  93. scrollY: 0,
  94. scrollX: 0,
  95. },
  96. },
  97. 'get-attribute': {
  98. name: 'Get attribute',
  99. icon: 'riBracketsLine',
  100. component: 'BlockBasic',
  101. editComponent: 'EditTrigger',
  102. category: 'interaction',
  103. inputs: 1,
  104. outputs: 1,
  105. allowedInputs: [],
  106. maxConnection: 1,
  107. data: {
  108. description: '',
  109. selector: '',
  110. multiple: false,
  111. },
  112. },
  113. 'open-website': {
  114. name: 'Open website',
  115. icon: 'riGlobalLine',
  116. component: 'BlockOpenWebsite',
  117. editComponent: 'EditTrigger',
  118. category: 'general',
  119. inputs: 1,
  120. outputs: 1,
  121. allowedInputs: [],
  122. maxConnection: 1,
  123. data: {
  124. url: '',
  125. },
  126. },
  127. 'text-input': {
  128. name: 'Text input',
  129. icon: 'riInputCursorMove',
  130. component: 'BlockBasic',
  131. editComponent: 'EditTrigger',
  132. category: 'interaction',
  133. inputs: 1,
  134. outputs: 1,
  135. allowedInputs: [],
  136. maxConnection: 1,
  137. data: {
  138. description: '',
  139. selector: '',
  140. multiple: false,
  141. text: '',
  142. },
  143. },
  144. 'repeat-task': {
  145. name: 'Repeat task',
  146. icon: 'riRepeat2Line',
  147. component: 'BlockRepeatTask',
  148. editComponent: 'EditTrigger',
  149. category: 'general',
  150. inputs: 1,
  151. outputs: 2,
  152. allowedInputs: [],
  153. maxConnection: 1,
  154. data: {
  155. repeatFor: 1,
  156. },
  157. },
  158. 'reload-page': {
  159. name: 'Reload page',
  160. icon: 'riRestartLine',
  161. component: 'BlockBasic',
  162. category: 'interaction',
  163. inputs: 1,
  164. outputs: 1,
  165. allowedInputs: [],
  166. maxConnection: 1,
  167. disableEdit: true,
  168. data: {},
  169. },
  170. 'trigger-element-events': {
  171. name: 'Trigger element events',
  172. icon: 'riLightbulbFlashLine',
  173. component: 'BlockBasic',
  174. editComponent: 'EditTrigger',
  175. category: 'interaction',
  176. inputs: 1,
  177. outputs: 1,
  178. allowedInputs: [],
  179. maxConnection: 1,
  180. data: {
  181. description: '',
  182. selector: '',
  183. multiple: false,
  184. events: [],
  185. },
  186. },
  187. comparison: {
  188. name: 'Comparison',
  189. icon: 'riAB',
  190. component: 'BlockComparison',
  191. category: 'conditions',
  192. inputs: 1,
  193. outputs: 0,
  194. allowedInputs: [],
  195. maxConnection: false,
  196. data: {
  197. comparison: [],
  198. },
  199. },
  200. 'contains-text': {
  201. name: 'Contains text',
  202. icon: 'riTBoxLine',
  203. component: 'BlockComparison',
  204. category: 'conditions',
  205. inputs: 1,
  206. outputs: 0,
  207. allowedInputs: [],
  208. maxConnection: false,
  209. data: {
  210. contains: [],
  211. },
  212. },
  213. 'element-exists': {
  214. name: 'Element exists',
  215. icon: 'riFocus3Line',
  216. component: 'BlockElementExists',
  217. category: 'conditions',
  218. inputs: 1,
  219. outputs: 0,
  220. allowedInputs: [],
  221. maxConnection: false,
  222. data: {
  223. selector: '',
  224. },
  225. },
  226. };
  227. export const categories = {
  228. interaction: {
  229. name: 'Web interaction',
  230. color: 'bg-green-200',
  231. },
  232. general: {
  233. name: 'General',
  234. color: 'bg-yellow-200',
  235. },
  236. conditions: {
  237. name: 'Conditions',
  238. color: 'bg-blue-200',
  239. },
  240. };