shared.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. 'attribute-value': {
  98. name: 'Attribute value',
  99. icon: 'riBracketsLine',
  100. component: 'BlockBasic',
  101. editComponent: 'EditAttributeValue',
  102. category: 'interaction',
  103. inputs: 1,
  104. outputs: 1,
  105. allowedInputs: [],
  106. maxConnection: 1,
  107. data: {
  108. description: '',
  109. selector: '',
  110. multiple: false,
  111. attributeName: '',
  112. },
  113. },
  114. 'open-website': {
  115. name: 'Open website',
  116. icon: 'riGlobalLine',
  117. component: 'BlockOpenWebsite',
  118. editComponent: 'EditTrigger',
  119. category: 'general',
  120. inputs: 1,
  121. outputs: 1,
  122. allowedInputs: [],
  123. maxConnection: 1,
  124. data: {
  125. url: '',
  126. },
  127. },
  128. 'text-input': {
  129. name: 'Text input',
  130. icon: 'riInputCursorMove',
  131. component: 'BlockBasic',
  132. editComponent: 'EditTextInput',
  133. category: 'interaction',
  134. inputs: 1,
  135. outputs: 1,
  136. allowedInputs: [],
  137. maxConnection: 1,
  138. data: {
  139. description: '',
  140. selector: '',
  141. multiple: false,
  142. text: '',
  143. delay: 0,
  144. keyup: true,
  145. keydown: true,
  146. change: true,
  147. input: true,
  148. },
  149. },
  150. 'repeat-task': {
  151. name: 'Repeat task',
  152. icon: 'riRepeat2Line',
  153. component: 'BlockRepeatTask',
  154. editComponent: 'EditTrigger',
  155. category: 'general',
  156. inputs: 1,
  157. outputs: 2,
  158. allowedInputs: [],
  159. maxConnection: 1,
  160. data: {
  161. repeatFor: 1,
  162. },
  163. },
  164. 'reload-page': {
  165. name: 'Reload page',
  166. icon: 'riRestartLine',
  167. component: 'BlockBasic',
  168. category: 'interaction',
  169. inputs: 1,
  170. outputs: 1,
  171. allowedInputs: [],
  172. maxConnection: 1,
  173. disableEdit: true,
  174. data: {},
  175. },
  176. 'trigger-element-events': {
  177. name: 'Trigger element events',
  178. icon: 'riLightbulbFlashLine',
  179. component: 'BlockBasic',
  180. editComponent: 'EditTrigger',
  181. category: 'interaction',
  182. inputs: 1,
  183. outputs: 1,
  184. allowedInputs: [],
  185. maxConnection: 1,
  186. data: {
  187. description: '',
  188. selector: '',
  189. multiple: false,
  190. events: [],
  191. },
  192. },
  193. comparison: {
  194. name: 'Comparison',
  195. icon: 'riAB',
  196. component: 'BlockComparison',
  197. category: 'conditions',
  198. inputs: 1,
  199. outputs: 0,
  200. allowedInputs: [],
  201. maxConnection: false,
  202. data: {
  203. comparison: [],
  204. },
  205. },
  206. 'contains-text': {
  207. name: 'Contains text',
  208. icon: 'riTBoxLine',
  209. component: 'BlockComparison',
  210. category: 'conditions',
  211. inputs: 1,
  212. outputs: 0,
  213. allowedInputs: [],
  214. maxConnection: false,
  215. data: {
  216. contains: [],
  217. },
  218. },
  219. 'element-exists': {
  220. name: 'Element exists',
  221. icon: 'riFocus3Line',
  222. component: 'BlockElementExists',
  223. category: 'conditions',
  224. inputs: 1,
  225. outputs: 0,
  226. allowedInputs: [],
  227. maxConnection: false,
  228. data: {
  229. selector: '',
  230. },
  231. },
  232. };
  233. export const categories = {
  234. interaction: {
  235. name: 'Web interaction',
  236. color: 'bg-green-200',
  237. },
  238. general: {
  239. name: 'General',
  240. color: 'bg-yellow-200',
  241. },
  242. conditions: {
  243. name: 'Conditions',
  244. color: 'bg-blue-200',
  245. },
  246. };