2021-04-02 04:16:26 +00:00
|
|
|
export const componentTypes = [
|
|
|
|
|
{
|
2021-04-08 10:44:52 +00:00
|
|
|
icon: 'https://www.svgrepo.com/show/243604/buy-click.svg',
|
2021-04-02 04:16:26 +00:00
|
|
|
name: 'Button',
|
2021-04-05 07:49:40 +00:00
|
|
|
description: 'Trigger actions: queries, alerts etc',
|
2021-04-02 04:16:26 +00:00
|
|
|
component: 'Button',
|
2021-04-09 09:39:28 +00:00
|
|
|
defaultSize: {
|
|
|
|
|
width: 120,
|
|
|
|
|
height: 60
|
|
|
|
|
},
|
2021-04-02 09:24:51 +00:00
|
|
|
properties: {
|
|
|
|
|
text: { type: 'string'} ,
|
|
|
|
|
// { 'style': { 'type': 'select', data: [{ name: 'Primary', value: 'primary' }, { name: 'Secondary', value: 'secondary' }] } },
|
|
|
|
|
visible: { type: 'string' }
|
|
|
|
|
},
|
2021-04-02 04:16:26 +00:00
|
|
|
events: [
|
|
|
|
|
'onClick'
|
|
|
|
|
],
|
2021-04-02 09:24:51 +00:00
|
|
|
styles: {
|
|
|
|
|
backgroundColor: { type: 'color'},
|
|
|
|
|
textColor: { type: 'color'}
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
|
|
|
|
'text': { value: 'Button' },
|
|
|
|
|
'visible': { value: true },
|
|
|
|
|
},
|
|
|
|
|
events: {
|
2021-04-04 13:11:17 +00:00
|
|
|
onClick: {
|
|
|
|
|
options: {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-02 09:24:51 +00:00
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
backgroundColor: { value: '#3c92dc' },
|
|
|
|
|
textColor: { value: '#fff' }
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-02 04:16:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: 'https://www.svgrepo.com/show/54455/table.svg',
|
|
|
|
|
name: 'Table',
|
2021-04-03 05:25:41 +00:00
|
|
|
description: 'Display paginated tabular data',
|
|
|
|
|
component: 'Table',
|
|
|
|
|
properties: {
|
2021-04-04 05:29:23 +00:00
|
|
|
title: { type: 'string'} ,
|
|
|
|
|
data: { type: 'json'},
|
2021-04-05 04:48:58 +00:00
|
|
|
visible: { type: 'string' },
|
2021-04-08 15:19:18 +00:00
|
|
|
loadingState: { type: 'string' },
|
2021-04-05 04:48:58 +00:00
|
|
|
columns: { type: 'array' }
|
2021-04-03 05:25:41 +00:00
|
|
|
},
|
2021-04-09 09:39:28 +00:00
|
|
|
defaultSize: {
|
|
|
|
|
width: 800,
|
|
|
|
|
height: 300
|
|
|
|
|
},
|
2021-04-03 05:25:41 +00:00
|
|
|
events: [
|
2021-04-05 07:49:40 +00:00
|
|
|
'onRowClicked'
|
2021-04-03 05:25:41 +00:00
|
|
|
],
|
|
|
|
|
styles: {
|
|
|
|
|
textColor: { type: 'color'}
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
2021-04-04 05:29:23 +00:00
|
|
|
'title': { value: 'Table' },
|
2021-04-03 05:25:41 +00:00
|
|
|
'visible': { value: true },
|
2021-04-08 15:19:18 +00:00
|
|
|
loadingState: { value: false },
|
2021-04-05 04:48:58 +00:00
|
|
|
'columns': { value: [
|
|
|
|
|
{ name: 'id' },
|
|
|
|
|
{ name: 'name' },
|
|
|
|
|
{ name: 'email' },
|
|
|
|
|
]}
|
2021-04-03 05:25:41 +00:00
|
|
|
},
|
|
|
|
|
events: {
|
2021-04-05 07:49:40 +00:00
|
|
|
onRowClicked: {
|
|
|
|
|
options: {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-03 05:25:41 +00:00
|
|
|
},
|
|
|
|
|
styles: {
|
2021-04-04 13:11:17 +00:00
|
|
|
textColor: { value: '' }
|
2021-04-03 05:25:41 +00:00
|
|
|
}
|
|
|
|
|
}
|
2021-04-02 04:16:26 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: 'https://www.svgrepo.com/show/38828/text.svg',
|
2021-04-04 13:11:17 +00:00
|
|
|
name: 'TextInput',
|
|
|
|
|
description: 'Text field for forms',
|
2021-04-02 04:16:26 +00:00
|
|
|
component: 'TextInput',
|
2021-04-09 09:39:28 +00:00
|
|
|
defaultSize: {
|
|
|
|
|
width: 100,
|
|
|
|
|
height: 60
|
|
|
|
|
},
|
2021-04-04 13:11:17 +00:00
|
|
|
properties: {
|
|
|
|
|
placeholder: { type: 'string'}
|
|
|
|
|
},
|
|
|
|
|
events: [
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
styles: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
|
|
|
|
'placeholder': { value: 'Placeholder text' }
|
|
|
|
|
},
|
|
|
|
|
events: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-02 04:16:26 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: 'https://www.svgrepo.com/show/219344/text.svg',
|
|
|
|
|
name: 'Text',
|
|
|
|
|
description: 'Display markdown or HTML',
|
|
|
|
|
component: 'Text',
|
2021-04-04 13:11:17 +00:00
|
|
|
properties: {
|
|
|
|
|
text: { type: 'string'} ,
|
|
|
|
|
visible: { type: 'string' }
|
|
|
|
|
},
|
2021-04-09 09:39:28 +00:00
|
|
|
defaultSize: {
|
|
|
|
|
width: 100,
|
|
|
|
|
height: 60
|
|
|
|
|
},
|
2021-04-04 13:11:17 +00:00
|
|
|
events: [
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
styles: {
|
|
|
|
|
textColor: { type: 'color'}
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
|
|
|
|
'text': { value: 'Text goes here !' },
|
|
|
|
|
'visible': { value: true },
|
|
|
|
|
},
|
|
|
|
|
events: {
|
|
|
|
|
onClick: { }
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
textColor: { value: '#000' }
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-02 04:16:26 +00:00
|
|
|
},
|
2021-04-05 07:49:40 +00:00
|
|
|
{
|
2021-04-08 10:44:52 +00:00
|
|
|
icon: 'https://www.svgrepo.com/show/35088/image.svg',
|
2021-04-05 07:49:40 +00:00
|
|
|
name: 'Image',
|
|
|
|
|
description: 'Display an Image',
|
2021-04-09 09:39:28 +00:00
|
|
|
defaultSize: {
|
|
|
|
|
width: 200,
|
|
|
|
|
height: 200
|
|
|
|
|
},
|
2021-04-05 07:49:40 +00:00
|
|
|
component: 'Image',
|
|
|
|
|
properties: {
|
|
|
|
|
source: { type: 'string'} ,
|
|
|
|
|
visible: { type: 'string' }
|
|
|
|
|
},
|
|
|
|
|
events: [
|
|
|
|
|
'onClick'
|
|
|
|
|
],
|
|
|
|
|
styles: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
|
|
|
|
'source': { value: 'https://www.svgrepo.com/show/34217/image.svg' },
|
|
|
|
|
'visible': { value: true },
|
|
|
|
|
},
|
|
|
|
|
events: {
|
|
|
|
|
onClick: { }
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
|
2021-04-06 10:01:05 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: 'https://www.svgrepo.com/show/46775/drop-down-list.svg',
|
|
|
|
|
name: 'Dropdown',
|
|
|
|
|
description: 'Select one value from options',
|
|
|
|
|
component: 'Dropdown',
|
|
|
|
|
properties: {
|
|
|
|
|
label: { type: 'string'} ,
|
|
|
|
|
values: { type: 'string' },
|
|
|
|
|
display_values: { type: 'string' }
|
|
|
|
|
},
|
|
|
|
|
events: [
|
|
|
|
|
'onSelect'
|
|
|
|
|
],
|
|
|
|
|
styles: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
|
|
|
|
'label': { value: 'Select' },
|
|
|
|
|
'values': [1,2,3],
|
|
|
|
|
'display_values': ["one", "two", "three"],
|
|
|
|
|
'visible': { value: true },
|
|
|
|
|
},
|
|
|
|
|
events: {
|
|
|
|
|
onSelect: { }
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
2021-04-08 10:44:52 +00:00
|
|
|
icon: 'https://www.svgrepo.com/show/16476/map.svg',
|
2021-04-06 10:01:05 +00:00
|
|
|
name: 'Map',
|
|
|
|
|
description: 'Display maps with markers.',
|
|
|
|
|
component: 'Map',
|
|
|
|
|
properties: {
|
|
|
|
|
label: { type: 'string'} ,
|
|
|
|
|
values: { type: 'string' },
|
|
|
|
|
display_values: { type: 'string' }
|
|
|
|
|
},
|
|
|
|
|
events: [
|
|
|
|
|
'onMarkerClick', 'onMarkerCreate'
|
|
|
|
|
],
|
|
|
|
|
styles: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
definition: {
|
|
|
|
|
properties: {
|
|
|
|
|
'label': { value: 'https://www.svgrepo.com/show/46775/drop-down-list.svg' },
|
|
|
|
|
'values': [1,2,3],
|
|
|
|
|
'display_values': ["one", "two", "three"],
|
|
|
|
|
'visible': { value: true },
|
|
|
|
|
},
|
|
|
|
|
events: {
|
|
|
|
|
onMarkerClick: { },
|
|
|
|
|
onMarkerCreate: { }
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
|
2021-04-05 07:49:40 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-02 04:16:26 +00:00
|
|
|
]
|