shared.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. /* to-do execute multiple blocks simultaneously, keyboard shortcut */
  2. import { nanoid } from 'nanoid';
  3. export const tasks = {
  4. trigger: {
  5. name: 'Trigger',
  6. description: 'Block where workflow will start executing',
  7. icon: 'riFlashlightLine',
  8. component: 'BlockBasic',
  9. editComponent: 'EditTrigger',
  10. category: 'general',
  11. inputs: 0,
  12. docs: true,
  13. outputs: 1,
  14. allowedInputs: true,
  15. maxConnection: 1,
  16. data: {
  17. description: '',
  18. type: 'manual',
  19. interval: 60,
  20. delay: 5,
  21. date: '',
  22. time: '00:00',
  23. url: '',
  24. shortcut: '',
  25. activeInInput: false,
  26. isUrlRegex: false,
  27. days: [],
  28. },
  29. },
  30. 'execute-workflow': {
  31. name: 'Execute workflow',
  32. description: '',
  33. icon: 'riFlowChart',
  34. component: 'BlockBasic',
  35. category: 'general',
  36. editComponent: 'EditExecuteWorkflow',
  37. inputs: 1,
  38. outputs: 1,
  39. allowedInputs: true,
  40. maxConnection: 1,
  41. data: {
  42. workflowId: '',
  43. globalData: '',
  44. },
  45. },
  46. 'active-tab': {
  47. name: 'Active tab',
  48. description: "Set current tab that you're in as an active tab",
  49. icon: 'riWindowLine',
  50. component: 'BlockBasic',
  51. category: 'browser',
  52. disableEdit: true,
  53. inputs: 1,
  54. outputs: 1,
  55. allowedInputs: true,
  56. maxConnection: 1,
  57. data: {},
  58. },
  59. 'new-tab': {
  60. name: 'New tab',
  61. description: 'Create a new tab',
  62. icon: 'riGlobalLine',
  63. component: 'BlockBasic',
  64. editComponent: 'EditNewTab',
  65. category: 'browser',
  66. inputs: 1,
  67. outputs: 1,
  68. allowedInputs: true,
  69. maxConnection: 1,
  70. data: {
  71. description: '',
  72. url: '',
  73. active: true,
  74. inGroup: false,
  75. updatePrevTab: false,
  76. },
  77. },
  78. 'new-window': {
  79. name: 'New window',
  80. description: 'Create a new window',
  81. icon: 'riWindow2Line',
  82. component: 'BlockBasic',
  83. editComponent: 'EditNewWindow',
  84. category: 'browser',
  85. inputs: 1,
  86. outputs: 1,
  87. allowedInputs: true,
  88. maxConnection: 1,
  89. data: {
  90. description: '',
  91. incognito: false,
  92. windowState: 'normal',
  93. },
  94. },
  95. proxy: {
  96. name: 'Proxy',
  97. description: 'Set the proxy of the browser',
  98. icon: 'riShieldKeyholeLine',
  99. component: 'BlockBasic',
  100. category: 'browser',
  101. editComponent: 'EditProxy',
  102. inputs: 1,
  103. outputs: 1,
  104. maxConnection: 1,
  105. allowedInputs: true,
  106. data: {
  107. scheme: 'https',
  108. host: '',
  109. port: 443,
  110. bypassList: '',
  111. clearProxy: false,
  112. },
  113. },
  114. 'go-back': {
  115. name: 'Go back',
  116. description: 'Go back to the previous page',
  117. icon: 'riArrowGoBackLine',
  118. component: 'BlockBasic',
  119. category: 'browser',
  120. inputs: 1,
  121. outputs: 1,
  122. maxConnection: 1,
  123. disableEdit: true,
  124. allowedInputs: true,
  125. data: {},
  126. },
  127. 'forward-page': {
  128. name: 'Go forward',
  129. description: 'Go forward to the next page',
  130. icon: 'riArrowGoForwardLine',
  131. component: 'BlockBasic',
  132. category: 'browser',
  133. inputs: 1,
  134. outputs: 1,
  135. maxConnection: 1,
  136. disableEdit: true,
  137. allowedInputs: true,
  138. data: {},
  139. },
  140. 'close-tab': {
  141. name: 'Close tab/window',
  142. icon: 'riCloseCircleLine',
  143. component: 'BlockBasic',
  144. category: 'browser',
  145. editComponent: 'EditCloseTab',
  146. inputs: 1,
  147. outputs: 1,
  148. maxConnection: 1,
  149. allowedInputs: true,
  150. data: {
  151. url: '',
  152. activeTab: true,
  153. closeType: 'tab',
  154. allWindows: false,
  155. },
  156. },
  157. 'take-screenshot': {
  158. name: 'Take screenshot',
  159. description: 'Take a screenshot of current active tab',
  160. icon: 'riImageLine',
  161. component: 'BlockBasic',
  162. category: 'browser',
  163. editComponent: 'EditTakeScreenshot',
  164. inputs: 1,
  165. outputs: 1,
  166. maxConnection: 1,
  167. allowedInputs: true,
  168. data: {
  169. fileName: '',
  170. ext: 'png',
  171. quality: 100,
  172. dataColumn: '',
  173. saveToColumn: false,
  174. saveToComputer: true,
  175. captureActiveTab: true,
  176. },
  177. },
  178. 'event-click': {
  179. name: 'Click element',
  180. icon: 'riCursorLine',
  181. component: 'BlockBasic',
  182. editComponent: 'EditInteractionBase',
  183. category: 'interaction',
  184. inputs: 1,
  185. outputs: 1,
  186. allowedInputs: true,
  187. maxConnection: 1,
  188. data: {
  189. description: '',
  190. findBy: 'cssSelector',
  191. selector: '',
  192. markEl: false,
  193. multiple: false,
  194. },
  195. },
  196. delay: {
  197. name: 'Delay',
  198. description: 'Add delay before executing the next block',
  199. icon: 'riTimerLine',
  200. component: 'BlockDelay',
  201. editComponent: 'EditTrigger',
  202. category: 'general',
  203. inputs: 1,
  204. outputs: 1,
  205. allowedInputs: true,
  206. maxConnection: 1,
  207. data: {
  208. time: 500,
  209. },
  210. },
  211. 'get-text': {
  212. name: 'Get text',
  213. description: 'Get text from an element',
  214. icon: 'riParagraph',
  215. component: 'BlockBasic',
  216. editComponent: 'EditGetText',
  217. category: 'interaction',
  218. inputs: 1,
  219. outputs: 1,
  220. allowedInputs: true,
  221. maxConnection: 1,
  222. data: {
  223. description: '',
  224. findBy: 'cssSelector',
  225. selector: '',
  226. markEl: false,
  227. multiple: false,
  228. regex: '',
  229. prefixText: '',
  230. suffixText: '',
  231. regexExp: ['g'],
  232. dataColumn: '',
  233. saveData: true,
  234. addExtraRow: false,
  235. extraRowValue: '',
  236. extraRowDataColumn: '',
  237. },
  238. },
  239. 'export-data': {
  240. name: 'Export data',
  241. icon: 'riDownloadLine',
  242. component: 'BlockBasic',
  243. editComponent: 'EditExportData',
  244. category: 'general',
  245. inputs: 1,
  246. outputs: 1,
  247. allowedInputs: true,
  248. maxConnection: 1,
  249. data: {
  250. name: '',
  251. refKey: '',
  252. type: 'json',
  253. description: '',
  254. dataToExport: 'data-columns',
  255. },
  256. },
  257. 'element-scroll': {
  258. name: 'Scroll element',
  259. icon: 'riMouseLine',
  260. component: 'BlockBasic',
  261. editComponent: 'EditScrollElement',
  262. category: 'interaction',
  263. inputs: 1,
  264. outputs: 1,
  265. allowedInputs: true,
  266. maxConnection: 1,
  267. data: {
  268. description: '',
  269. findBy: 'cssSelector',
  270. selector: 'html',
  271. markEl: false,
  272. multiple: false,
  273. scrollY: 0,
  274. scrollX: 0,
  275. incX: false,
  276. incY: false,
  277. smooth: false,
  278. scrollIntoView: false,
  279. },
  280. },
  281. link: {
  282. name: 'Link',
  283. description: 'Open link element',
  284. icon: 'riLink',
  285. component: 'BlockBasic',
  286. editComponent: 'EditInteractionBase',
  287. category: 'interaction',
  288. inputs: 1,
  289. outputs: 1,
  290. allowedInputs: true,
  291. maxConnection: 1,
  292. data: {
  293. description: '',
  294. findBy: 'cssSelector',
  295. selector: '',
  296. markEl: false,
  297. disableMultiple: true,
  298. },
  299. },
  300. 'attribute-value': {
  301. name: 'Attribute value',
  302. description: 'Get attribute value of an element',
  303. icon: 'riBracketsLine',
  304. component: 'BlockBasic',
  305. editComponent: 'EditAttributeValue',
  306. category: 'interaction',
  307. inputs: 1,
  308. outputs: 1,
  309. allowedInputs: true,
  310. maxConnection: 1,
  311. data: {
  312. description: '',
  313. findBy: 'cssSelector',
  314. selector: '',
  315. markEl: false,
  316. multiple: false,
  317. attributeName: '',
  318. dataColumn: '',
  319. saveData: true,
  320. addExtraRow: false,
  321. extraRowValue: '',
  322. extraRowDataColumn: '',
  323. },
  324. },
  325. forms: {
  326. name: 'Forms',
  327. icon: 'riInputCursorMove',
  328. description: 'Manipulate form(input, select, checkbox, and radio) element',
  329. component: 'BlockBasic',
  330. editComponent: 'EditForms',
  331. category: 'interaction',
  332. inputs: 1,
  333. outputs: 1,
  334. allowedInputs: true,
  335. maxConnection: 1,
  336. data: {
  337. description: '',
  338. findBy: 'cssSelector',
  339. selector: '',
  340. markEl: false,
  341. multiple: false,
  342. selected: true,
  343. clearValue: true,
  344. getValue: false,
  345. saveData: true,
  346. dataColumn: '',
  347. type: 'text-field',
  348. value: '',
  349. delay: 0,
  350. events: [],
  351. },
  352. },
  353. 'repeat-task': {
  354. name: 'Repeat task',
  355. icon: 'riRepeat2Line',
  356. component: 'BlockRepeatTask',
  357. editComponent: 'EditTrigger',
  358. category: 'general',
  359. inputs: 1,
  360. outputs: 2,
  361. allowedInputs: true,
  362. maxConnection: 1,
  363. data: {
  364. repeatFor: 1,
  365. },
  366. },
  367. // 'reload-page': {
  368. // name: 'Reload page',
  369. // icon: 'riRestartLine',
  370. // component: 'BlockBasic',
  371. // category: 'interaction',
  372. // inputs: 1,
  373. // outputs: 1,
  374. // allowedInputs: true,
  375. // maxConnection: 1,
  376. // disableEdit: true,
  377. // data: {},
  378. // },
  379. 'javascript-code': {
  380. name: 'JavaScript code',
  381. description: 'Execute your custom javascript code in a webpage',
  382. icon: 'riCodeSSlashLine',
  383. component: 'BlockBasic',
  384. editComponent: 'EditJavascriptCode',
  385. category: 'interaction',
  386. inputs: 1,
  387. outputs: 1,
  388. docs: true,
  389. allowedInputs: true,
  390. maxConnection: 1,
  391. data: {
  392. description: '',
  393. timeout: 20000,
  394. code: 'console.log("Hello world!");\nautomaNextBlock()',
  395. preloadScripts: [],
  396. },
  397. },
  398. 'trigger-event': {
  399. name: 'Trigger event',
  400. description: 'Trigger event',
  401. icon: 'riLightbulbFlashLine',
  402. component: 'BlockBasic',
  403. editComponent: 'EditTriggerEvent',
  404. category: 'interaction',
  405. inputs: 1,
  406. outputs: 1,
  407. allowedInputs: true,
  408. maxConnection: 1,
  409. data: {
  410. description: '',
  411. findBy: 'cssSelector',
  412. selector: '',
  413. markEl: false,
  414. multiple: false,
  415. eventName: '',
  416. eventType: '',
  417. eventParams: { bubbles: true, cancelable: false },
  418. },
  419. },
  420. 'google-sheets': {
  421. name: 'Google sheets',
  422. description: 'Read Google Sheets data',
  423. icon: 'mdiGoogleSheet',
  424. component: 'BlockBasic',
  425. editComponent: 'EditGoogleSheets',
  426. category: 'onlineServices',
  427. inputs: 1,
  428. outputs: 1,
  429. docs: true,
  430. allowedInputs: true,
  431. maxConnection: 1,
  432. data: {
  433. description: '',
  434. spreadsheetId: '',
  435. type: 'get',
  436. range: '',
  437. firstRowAsKey: false,
  438. refKey: '',
  439. },
  440. },
  441. conditions: {
  442. name: 'Conditions',
  443. description: 'Conditional block',
  444. icon: 'riAB',
  445. component: 'BlockConditions',
  446. editComponent: 'EditConditions',
  447. category: 'conditions',
  448. inputs: 1,
  449. outputs: 0,
  450. allowedInputs: true,
  451. maxConnection: 1,
  452. data: {
  453. conditions: [],
  454. },
  455. },
  456. 'element-exists': {
  457. name: 'Element exists',
  458. description: 'Check if an element is exists',
  459. icon: 'riFocus3Line',
  460. component: 'BlockElementExists',
  461. editComponent: 'EditElementExists',
  462. category: 'conditions',
  463. inputs: 1,
  464. outputs: 2,
  465. allowedInputs: true,
  466. maxConnection: 1,
  467. data: {
  468. findBy: 'cssSelector',
  469. selector: '',
  470. tryCount: 1,
  471. timeout: 500,
  472. markEl: false,
  473. },
  474. },
  475. webhook: {
  476. name: 'Webhook',
  477. description: 'Webhook allow external service to be notified',
  478. icon: 'webhookIcon',
  479. component: 'BlockBasic',
  480. editComponent: 'EditWebhook',
  481. category: 'general',
  482. inputs: 1,
  483. outputs: 1,
  484. allowedInputs: true,
  485. maxConnection: 1,
  486. data: {
  487. description: '',
  488. url: '',
  489. contentType: 'json',
  490. timeout: 10000,
  491. headers: [{ name: '', value: '' }],
  492. body: '{}',
  493. },
  494. },
  495. 'loop-data': {
  496. name: 'Loop data',
  497. icon: 'riRefreshLine',
  498. component: 'BlockBasic',
  499. editComponent: 'EditLoopData',
  500. category: 'general',
  501. docs: true,
  502. inputs: 1,
  503. outputs: 1,
  504. allowedInputs: true,
  505. maxConnection: 1,
  506. data: {
  507. loopId: '',
  508. maxLoop: 0,
  509. fromNumber: 1,
  510. toNumber: 10,
  511. loopData: '[]',
  512. description: '',
  513. referenceKey: '',
  514. loopThrough: 'data-columns',
  515. },
  516. },
  517. 'loop-breakpoint': {
  518. name: 'Loop breakpoint',
  519. description: 'To tell where loop data must stop',
  520. icon: 'riStopLine',
  521. component: 'BlockLoopBreakpoint',
  522. category: 'general',
  523. disableEdit: true,
  524. docs: true,
  525. inputs: 1,
  526. outputs: 1,
  527. allowedInputs: true,
  528. maxConnection: 1,
  529. data: {
  530. loopId: '',
  531. },
  532. },
  533. 'blocks-group': {
  534. name: 'Blocks group',
  535. description: 'Grouping blocks',
  536. icon: 'riFolderZipLine',
  537. component: 'BlockGroup',
  538. category: 'general',
  539. disableEdit: true,
  540. inputs: 1,
  541. outputs: 1,
  542. allowedInputs: true,
  543. maxConnection: 1,
  544. data: {
  545. name: '',
  546. blocks: [],
  547. },
  548. },
  549. 'switch-to': {
  550. name: 'Switch frame',
  551. description: 'Switch between main window and iframe',
  552. icon: 'riArrowUpDownLine',
  553. component: 'BlockBasic',
  554. editComponent: 'EditSwitchTo',
  555. category: 'interaction',
  556. inputs: 1,
  557. outputs: 1,
  558. allowedInputs: true,
  559. maxConnection: 1,
  560. data: {
  561. findBy: 'cssSelector',
  562. selector: '',
  563. windowType: 'main-window',
  564. },
  565. },
  566. };
  567. export const categories = {
  568. interaction: {
  569. name: 'Web interaction',
  570. color: 'bg-green-200',
  571. },
  572. browser: {
  573. name: 'Browser',
  574. color: 'bg-orange-200',
  575. },
  576. general: {
  577. name: 'General',
  578. color: 'bg-yellow-200',
  579. },
  580. onlineServices: {
  581. name: 'Online services',
  582. color: 'bg-red-200',
  583. },
  584. conditions: {
  585. name: 'Conditions',
  586. color: 'bg-blue-200',
  587. },
  588. };
  589. export const eventList = [
  590. { id: 'click', name: 'Click', type: 'mouse-event' },
  591. { id: 'dblclick', name: 'Double Click', type: 'mouse-event' },
  592. { id: 'mouseup', name: 'Mouseup', type: 'mouse-event' },
  593. { id: 'mousedown', name: 'Mousedown', type: 'mouse-event' },
  594. { id: 'mouseenter', name: 'Mouseenter', type: 'mouse-event' },
  595. { id: 'mouseleave', name: 'Mouseleave', type: 'mouse-event' },
  596. { id: 'mouseover', name: 'Mouseover', type: 'mouse-event' },
  597. { id: 'mouseout', name: 'Mouseout', type: 'mouse-event' },
  598. { id: 'mousemove', name: 'Mousemove', type: 'mouse-event' },
  599. { id: 'focus', name: 'Focus', type: 'focus-event' },
  600. { id: 'blur', name: 'Blur', type: 'focus-event' },
  601. { id: 'input', name: 'Input', type: 'input-event' },
  602. { id: 'change', name: 'Change', type: 'event' },
  603. { id: 'touchstart', name: 'Touch start', type: 'touch-event' },
  604. { id: 'touchend', name: 'Touch end', type: 'touch-event' },
  605. { id: 'touchmove', name: 'Touch move', type: 'touch-event' },
  606. { id: 'touchcancel', name: 'Touch cancel', type: 'touch-event' },
  607. { id: 'keydown', name: 'Keydown', type: 'keyboard-event' },
  608. { id: 'keyup', name: 'Keyup', type: 'keyboard-event' },
  609. { id: 'submit', name: 'Submit', type: 'submit-event' },
  610. { id: 'wheel', name: 'Wheel', type: 'wheel-event' },
  611. ];
  612. export const dataExportTypes = [
  613. { name: 'JSON', id: 'json' },
  614. { name: 'CSV', id: 'csv' },
  615. { name: 'Plain text', id: 'plain-text' },
  616. ];
  617. export const firstWorkflows = [
  618. {
  619. id: nanoid(),
  620. name: 'Google search',
  621. createdAt: Date.now(),
  622. drawflow: `{"drawflow":{"Home":{"data":{"d634ff22-5dfe-44dc-83d2-842412bd9fbf":{"id":"d634ff22-5dfe-44dc-83d2-842412bd9fbf","name":"trigger","data":{"type":"manual","interval":10},"class":"trigger","html":"BlockBasic","typenode":"vue","inputs":{},"outputs":{"output_1":{"connections":[{"node":"b9e7e0d4-e86a-4635-a352-31c63723fef4","output":"input_1"}]}},"pos_x":50,"pos_y":300},"b9e7e0d4-e86a-4635-a352-31c63723fef4":{"id":"b9e7e0d4-e86a-4635-a352-31c63723fef4","name":"new-tab","data":{"url":"https://google.com","active":true},"class":"new-tab","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"d634ff22-5dfe-44dc-83d2-842412bd9fbf","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"09f3a14c-0514-4287-93b0-aa92b0064fba","output":"input_1"}]}},"pos_x":278,"pos_y":268},"09f3a14c-0514-4287-93b0-aa92b0064fba":{"id":"09f3a14c-0514-4287-93b0-aa92b0064fba","name":"forms","data":{"description":"Type query","selector":"[name='q']","markEl":false,"multiple":false,"selected":true,"type":"text-field","value":"Stackoverflow","delay":"120","events":[]},"class":"forms","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"b9e7e0d4-e86a-4635-a352-31c63723fef4","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"5f76370d-aa3d-4258-8319-230fcfc49a3a","output":"input_1"}]}},"pos_x":551,"pos_y":290},"5f76370d-aa3d-4258-8319-230fcfc49a3a":{"id":"5f76370d-aa3d-4258-8319-230fcfc49a3a","name":"event-click","data":{"description":"Click search","selector":"center:nth-child(1) > .gNO89b","markEl":false,"multiple":false},"class":"event-click","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"09f3a14c-0514-4287-93b0-aa92b0064fba","input":"output_1"}]}},"outputs":{"output_1":{"connections":[]}},"pos_x":794,"pos_y":308}}}}}`,
  623. },
  624. {
  625. id: nanoid(),
  626. name: 'Generate lorem ipsum',
  627. createdAt: Date.now(),
  628. drawflow:
  629. '{"drawflow":{"Home":{"data":{"c5774692-0be4-457f-82be-d5e4b3344ad7":{"id":"c5774692-0be4-457f-82be-d5e4b3344ad7","name":"trigger","data":{"type":"manual"},"class":"trigger","html":"BlockBasic","typenode":"vue","inputs":{},"outputs":{"output_1":{"connections":[{"node":"10a0429e-b8c4-4c04-9ea3-df169cea78e4","output":"input_1"}]}},"pos_x":50,"pos_y":300},"10a0429e-b8c4-4c04-9ea3-df169cea78e4":{"id":"10a0429e-b8c4-4c04-9ea3-df169cea78e4","name":"new-tab","data":{"url":"http://lipsum.com","active":true},"class":"new-tab","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"c5774692-0be4-457f-82be-d5e4b3344ad7","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"24bdec44-1e80-4cee-9139-00545b8d33d9","output":"input_1"}]}},"pos_x":285,"pos_y":282},"df24edcc-4c29-49f5-8a29-0e572a4bc6ae":{"id":"df24edcc-4c29-49f5-8a29-0e572a4bc6ae","name":"delay","data":{"time":4000},"class":"delay","html":"BlockDelay","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"24bdec44-1e80-4cee-9139-00545b8d33d9","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"2d93c1de-42ca-4f39-8e61-e3e55529fbba","output":"input_1"}]}},"pos_x":833,"pos_y":297},"24bdec44-1e80-4cee-9139-00545b8d33d9":{"id":"24bdec44-1e80-4cee-9139-00545b8d33d9","name":"element-scroll","data":{"description":"","selector":"#amount","markEl":false,"multiple":false,"scrollY":0,"scrollX":0,"incX":false,"incY":false,"smooth":true,"scrollIntoView":true},"class":"element-scroll","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"10a0429e-b8c4-4c04-9ea3-df169cea78e4","input":"output_1"},{"node":"2f5fec61-a318-4e2b-b7d3-bc7328bd282c","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"df24edcc-4c29-49f5-8a29-0e572a4bc6ae","output":"input_1"}]}},"pos_x":566,"pos_y":317},"2d93c1de-42ca-4f39-8e61-e3e55529fbba":{"id":"2d93c1de-42ca-4f39-8e61-e3e55529fbba","name":"forms","data":{"description":"Lipsum length","selector":"#amount","markEl":false,"multiple":false,"selected":true,"type":"text-field","value":"3","delay":0,"events":[]},"class":"forms","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"df24edcc-4c29-49f5-8a29-0e572a4bc6ae","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"0f3e2baa-8d6d-4323-8ac7-362f1be39ecb","output":"input_1"}]}},"pos_x":1058,"pos_y":327},"0f3e2baa-8d6d-4323-8ac7-362f1be39ecb":{"id":"0f3e2baa-8d6d-4323-8ac7-362f1be39ecb","name":"event-click","data":{"description":"Generate button","selector":"#generate","markEl":false,"multiple":false},"class":"event-click","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"2d93c1de-42ca-4f39-8e61-e3e55529fbba","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"fb9be12f-8995-4876-8bfe-79323769474b","output":"input_1"}]}},"pos_x":1309,"pos_y":329},"fb9be12f-8995-4876-8bfe-79323769474b":{"id":"fb9be12f-8995-4876-8bfe-79323769474b","name":"delay","data":{"time":2000},"class":"delay","html":"BlockDelay","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"0f3e2baa-8d6d-4323-8ac7-362f1be39ecb","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"7205fcf2-deda-445e-9690-4e36adb52585","output":"input_1"}]}},"pos_x":1566,"pos_y":310},"7205fcf2-deda-445e-9690-4e36adb52585":{"id":"7205fcf2-deda-445e-9690-4e36adb52585","name":"get-text","data":{"description":"Get text result","selector":"#lipsum","markEl":false,"multiple":false,"regex":"","regexExp":["g"],"dataColumn":"","saveData":true},"class":"get-text","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"fb9be12f-8995-4876-8bfe-79323769474b","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"3d3e8fac-97fa-4c3d-84bc-a3db18740184","output":"input_1"}]}},"pos_x":1823,"pos_y":337},"3d3e8fac-97fa-4c3d-84bc-a3db18740184":{"id":"3d3e8fac-97fa-4c3d-84bc-a3db18740184","name":"repeat-task","data":{"repeatFor":2},"class":"repeat-task","html":"BlockRepeatTask","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"7205fcf2-deda-445e-9690-4e36adb52585","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"4d39ecd5-f33f-4e57-b11d-2f26b1076334","output":"input_1"}]},"output_2":{"connections":[{"node":"2f5fec61-a318-4e2b-b7d3-bc7328bd282c","output":"input_1","points":[{"pos_x":2290.2500152587886,"pos_y":542.0000076293943},{"pos_x":1125.2500152587886,"pos_y":552.0000076293943}]}]}},"pos_x":2073,"pos_y":293.5},"2f5fec61-a318-4e2b-b7d3-bc7328bd282c":{"id":"2f5fec61-a318-4e2b-b7d3-bc7328bd282c","name":"go-back","data":{},"class":"go-back","html":"BlockBasic","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"3d3e8fac-97fa-4c3d-84bc-a3db18740184","input":"output_2"}]}},"outputs":{"output_1":{"connections":[{"node":"24bdec44-1e80-4cee-9139-00545b8d33d9","output":"input_1","points":[{"pos_x":1305.2500152587886,"pos_y":829.5000076293943},{"pos_x":545.250015258789,"pos_y":834.499988555908}]}]}},"pos_x":1135.5,"pos_y":628},"4d39ecd5-f33f-4e57-b11d-2f26b1076334":{"id":"4d39ecd5-f33f-4e57-b11d-2f26b1076334","name":"export-data","data":{"name":"Lipsum","type":"plain-text"},"class":"export-data","html":"BlockExportData","typenode":"vue","inputs":{"input_1":{"connections":[{"node":"3d3e8fac-97fa-4c3d-84bc-a3db18740184","input":"output_1"}]}},"outputs":{"output_1":{"connections":[]}},"pos_x":2409.75,"pos_y":289}}}}}',
  630. },
  631. ];
  632. export const contentTypes = [
  633. { name: 'application/json', value: 'json' },
  634. { name: 'application/x-www-form-urlencoded', value: 'form' },
  635. ];
  636. export const supportLocales = [
  637. { id: 'en', name: 'English' },
  638. { id: 'zh', name: '简体中文' },
  639. { id: 'zh-tw', name: '繁體中文' },
  640. { id: 'vi', name: 'Tiếng Việt' },
  641. { id: 'fr', name: 'Français' },
  642. ];