123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- /* screenshot, assets, tab loaded, and close tab block? */
- export const tasks = {
- trigger: {
- name: 'Trigger',
- icon: 'riFlashlightLine',
- component: 'BlockBasic',
- editComponent: 'EditTrigger',
- category: 'general',
- inputs: 0,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- type: 'manual',
- },
- },
- 'event-click': {
- name: 'Click element',
- icon: 'riCursorLine',
- component: 'BlockBasic',
- editComponent: 'EditInteractionBase',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: '',
- multiple: false,
- },
- },
- delay: {
- name: 'Delay',
- icon: 'riTimerLine',
- component: 'BlockDelay',
- editComponent: 'EditTrigger',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- time: 500,
- },
- },
- 'get-text': {
- name: 'Get text',
- icon: 'riParagraph',
- component: 'BlockBasic',
- editComponent: 'EditGetText',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: '',
- multiple: false,
- regex: '',
- regexExp: ['g'],
- dataColumn: '',
- },
- },
- 'export-data': {
- name: 'Export data',
- icon: 'riDownloadLine',
- component: 'BlockExportData',
- editComponent: 'EditTrigger',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- name: '',
- type: 'json',
- },
- },
- 'element-scroll': {
- name: 'Scroll element',
- icon: 'riMouseLine',
- component: 'BlockBasic',
- editComponent: 'EditScrollElement',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: 'html',
- multiple: false,
- scrollY: 0,
- scrollX: 0,
- },
- },
- link: {
- name: 'Link',
- icon: 'riLink',
- component: 'BlockBasic',
- editComponent: 'EditInteractionBase',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: '',
- disableMultiple: true,
- },
- },
- 'attribute-value': {
- name: 'Attribute value',
- icon: 'riBracketsLine',
- component: 'BlockBasic',
- editComponent: 'EditAttributeValue',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: '',
- multiple: false,
- attributeName: '',
- dataColumn: '',
- },
- },
- 'open-website': {
- name: 'Open website',
- icon: 'riGlobalLine',
- component: 'BlockOpenWebsite',
- editComponent: 'EditTrigger',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- url: '',
- active: true,
- },
- },
- forms: {
- name: 'Forms',
- icon: 'riInputCursorMove',
- component: 'BlockBasic',
- editComponent: 'EditForms',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: '',
- multiple: false,
- selected: true,
- type: 'text-field',
- value: '',
- delay: 0,
- events: [],
- },
- },
- 'repeat-task': {
- name: 'Repeat task',
- icon: 'riRepeat2Line',
- component: 'BlockRepeatTask',
- editComponent: 'EditTrigger',
- category: 'general',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- repeatFor: 1,
- },
- },
- // 'reload-page': {
- // name: 'Reload page',
- // icon: 'riRestartLine',
- // component: 'BlockBasic',
- // category: 'interaction',
- // inputs: 1,
- // outputs: 1,
- // allowedInputs: true,
- // maxConnection: 1,
- // disableEdit: true,
- // data: {},
- // },
- 'trigger-event': {
- name: 'Trigger event',
- icon: 'riLightbulbFlashLine',
- component: 'BlockBasic',
- editComponent: 'EditTriggerEvent',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- description: '',
- selector: '',
- multiple: false,
- eventName: '',
- eventType: '',
- eventParams: { bubbles: true, cancelable: false },
- },
- },
- conditions: {
- name: 'Conditions',
- icon: 'riAB',
- component: 'BlockConditions',
- category: 'conditions',
- inputs: 1,
- outputs: 0,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- conditions: [],
- },
- },
- 'element-exists': {
- name: 'Element exists',
- icon: 'riFocus3Line',
- component: 'BlockElementExists',
- category: 'conditions',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- selector: '',
- },
- },
- };
- export const categories = {
- interaction: {
- name: 'Web interaction',
- color: 'bg-green-200',
- },
- general: {
- name: 'General',
- color: 'bg-yellow-200',
- },
- conditions: {
- name: 'Conditions',
- color: 'bg-blue-200',
- },
- };
- export const eventList = [
- { id: 'click', name: 'Click', type: 'mouse-event' },
- { id: 'dblclick', name: 'Double Click', type: 'mouse-event' },
- { id: 'mouseup', name: 'Mouseup', type: 'mouse-event' },
- { id: 'mousedown', name: 'Mousedown', type: 'mouse-event' },
- { id: 'focus', name: 'Focus', type: 'focus-event' },
- { id: 'blur', name: 'Blur', type: 'focus-event' },
- { id: 'touchstart', name: 'Touch start', type: 'touch-event' },
- { id: 'touchend', name: 'Touch end', type: 'touch-event' },
- { id: 'touchmove', name: 'Touch move', type: 'touch-event' },
- { id: 'touchcancel', name: 'Touch cancel', type: 'touch-event' },
- { id: 'keydown', name: 'Keydown', type: 'keyboard-event' },
- { id: 'keyup', name: 'Keyup', type: 'keyboard-event' },
- { id: 'keypress', name: 'Keypress', type: 'keyboard-event' },
- { id: 'submit', name: 'Submit', type: 'submit-event' },
- { id: 'wheel', name: 'Wheel', type: 'wheel-event' },
- ];
|