shared.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. export const tasks = {
  2. trigger: {
  3. name: 'Trigger',
  4. icon: 'riFlashlightLine',
  5. component: 'BlockBase',
  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: 'BlockBase',
  21. editComponent: 'EditTrigger',
  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: 'BlockBase',
  51. editComponent: 'EditTrigger',
  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. },
  63. },
  64. 'export-data': {
  65. name: 'Export data',
  66. icon: 'riDownloadLine',
  67. component: 'BlockBase',
  68. editComponent: 'EditTrigger',
  69. category: 'general',
  70. inputs: 1,
  71. outputs: 1,
  72. allowedInputs: [],
  73. maxConnection: 1,
  74. data: {
  75. description: '',
  76. type: 'JSON',
  77. },
  78. },
  79. 'element-scroll': {
  80. name: 'Scroll element',
  81. icon: 'riMouseLine',
  82. component: 'BlockBase',
  83. editComponent: 'EditTrigger',
  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: 'BlockBase',
  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: 'BlockBase',
  117. editComponent: 'EditTrigger',
  118. category: 'general',
  119. inputs: 1,
  120. outputs: 1,
  121. allowedInputs: [],
  122. maxConnection: 1,
  123. data: {
  124. description: '',
  125. url: '',
  126. },
  127. },
  128. 'text-input': {
  129. name: 'Text input',
  130. icon: 'riInputCursorMove',
  131. component: 'BlockBase',
  132. editComponent: 'EditTrigger',
  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. },
  144. },
  145. 'repeat-task': {
  146. name: 'Repeat tasks',
  147. icon: 'riRepeat2Line',
  148. component: 'BlockBase',
  149. editComponent: 'EditTrigger',
  150. category: 'general',
  151. inputs: 1,
  152. outputs: 1,
  153. allowedInputs: [],
  154. maxConnection: 1,
  155. data: {
  156. description: '',
  157. from: '',
  158. for: 1,
  159. },
  160. },
  161. 'reload-page': {
  162. name: 'Reload page',
  163. icon: 'riRestartLine',
  164. component: 'BlockBase',
  165. category: 'interaction',
  166. inputs: 1,
  167. outputs: 1,
  168. allowedInputs: [],
  169. maxConnection: 1,
  170. disableEdit: true,
  171. data: {},
  172. },
  173. 'trigger-element-events': {
  174. name: 'Trigger element events',
  175. icon: 'riLightbulbFlashLine',
  176. component: 'BlockBase',
  177. editComponent: 'EditTrigger',
  178. category: 'interaction',
  179. inputs: 1,
  180. outputs: 1,
  181. allowedInputs: [],
  182. maxConnection: 1,
  183. data: {
  184. description: '',
  185. selector: '',
  186. multiple: false,
  187. events: [],
  188. },
  189. },
  190. comparison: {
  191. name: 'Comparison',
  192. icon: 'riAB',
  193. component: 'BlockComparison',
  194. category: 'conditions',
  195. inputs: 1,
  196. outputs: 0,
  197. allowedInputs: [],
  198. maxConnection: false,
  199. data: {
  200. comparison: [],
  201. },
  202. },
  203. 'contains-text': {
  204. name: 'Contains text',
  205. icon: 'riTBoxLine',
  206. component: 'BlockComparison',
  207. category: 'conditions',
  208. inputs: 1,
  209. outputs: 0,
  210. allowedInputs: [],
  211. maxConnection: false,
  212. data: {
  213. contains: [],
  214. },
  215. },
  216. 'element-exists': {
  217. name: 'Element exists',
  218. icon: 'riFocus3Line',
  219. component: 'BlockElementExists',
  220. category: 'conditions',
  221. inputs: 1,
  222. outputs: 0,
  223. allowedInputs: [],
  224. maxConnection: false,
  225. data: {
  226. selector: '',
  227. },
  228. },
  229. };
  230. export const categories = {
  231. interaction: {
  232. name: 'Web interaction',
  233. color: 'bg-green-200',
  234. },
  235. general: {
  236. name: 'General',
  237. color: 'bg-yellow-200',
  238. },
  239. conditions: {
  240. name: 'Conditions',
  241. color: 'bg-blue-200',
  242. },
  243. };