Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fliplet/fliplet-widget-data-source-query
Data Source Query Provider
https://github.com/fliplet/fliplet-widget-data-source-query
data provider widget
Last synced: about 4 hours ago
JSON representation
Data Source Query Provider
- Host: GitHub
- URL: https://github.com/fliplet/fliplet-widget-data-source-query
- Owner: Fliplet
- Created: 2017-03-02T09:49:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T22:24:46.000Z (almost 2 years ago)
- Last Synced: 2023-08-02T02:34:09.193Z (over 1 year ago)
- Topics: data, provider, widget
- Language: JavaScript
- Homepage:
- Size: 400 KB
- Stars: 0
- Watchers: 4
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fliplet Data Source Query Provider
**Please note: this widget requires you to run the gulp watcher during development to compile the source files as you save.**
To develop widgets, please follow our [widget development guide](http://developers.fliplet.com).
---
Install dependencies:
```
$ npm install fliplet-cli -g
```---
Clone and run for development:
```
$ git clone https://github.com/Fliplet/fliplet-widget-data-source-query.git
$ cd fliplet-widget-data-source-query$ fliplet run
```Installing gulp and its plugins:
```
$ npm install
```**Running gulp to continuously build ES6 into JS**:
```
$ npm run watch
```---
## How to call the provider
```js
var sampleData = {
settings: {
dataSourceLabel: 'Select a data source',
modesDescription: 'How do you want your data to be plotted?',
modes: [
{
label: 'Plot my data as it is',
columns: [
{
key: 'bar',
label: 'Select the value for Bar',
type: 'single'
},
{
key: 'foobar',
label: 'Select the value for Foobar',
type: 'single'
}
]
},
{
label: 'Summarise my data',
filters: false,
columns: [
{
key: 'foo',
label: 'Select the value for Foo',
type: 'single'
}
]
}
]
}
};Fliplet.Widget.open('com.fliplet.data-source-query', {
data: sampleData,
onEvent: function (event, data) {
if (event === 'mode-changed') {
console.log('mode index', data.value)
}// return true to stop propagation up to studio or parent components
}
});
```