diff --git a/stories/data-viewer.js b/stories/data-viewer.js index 0bad28c102..7fd343a06e 100644 --- a/stories/data-viewer.js +++ b/stories/data-viewer.js @@ -1,10 +1,29 @@ import { storiesOf } from '@storybook/vue'; +import Vuex from 'vuex'; +import Vue from 'vue'; + +import { DataViewer, registerModule } from '../dist/storybook/components'; -import { DataViewer, setupStore } from '../dist/storybook/components'; const stories = storiesOf('DataViewer', module); +Vue.use(Vuex) stories.add('empty', () => ({ - store: setupStore({}, [], true), + store: new Vuex.Store({}), + created: function() { + registerModule(this.$store, { + dataset: { + headers:[], + data: [], + paginationContext: { + pagesize: 50, + pageno: 1, + totalCount: 0, + }, + }, + currentPipelineName: "test", + pipelines: {test: []} + }) + }, components: { DataViewer }, template: ` @@ -13,28 +32,36 @@ stories.add('empty', () => ({ })); stories.add('simple', () => ({ - store: setupStore({ - dataset: { - headers: - [ - { name: 'columnA' }, - { name: 'columnB' }, - { name: 'columnC' }, + store: new Vuex.Store({}), + created: function() { + registerModule(this.$store, { + dataset: { + headers: + [ + { name: 'columnA', type: 'string' }, + { name: 'columnB', type: 'date' }, + { name: 'columnC', type: 'integer' }, + ], + data: [ + ['value1', 'value2', 'value3'], + ['value4', 'value5', 'value6'], + ['value7', 'value8', 'value9'], + ['value10', 'value11', 'value12'], + ['value10', { obj: 'value14' }, null], ], - data: [ - ['value1', 'value2', 'value3'], - ['value4', 'value5', 'value6'], - ['value7', 'value8', 'value9'], - ['value10', 'value11', 'value12'], - ['value10', { obj: 'value14' }, null], - ] - }, - }, [], true), + paginationContext: { + pagesize: 50, + pageno: 1, + totalCount: 0, + }, + }, + currentPipelineName: "test", + pipelines: {test: []} + }); + }, components: { DataViewer }, template: ` - + `, })); diff --git a/stories/form-rename-step.js b/stories/form-rename-step.js deleted file mode 100644 index 4a9e25bcfa..0000000000 --- a/stories/form-rename-step.js +++ /dev/null @@ -1,38 +0,0 @@ -import { - storiesOf -} from '@storybook/vue'; - -import { - RenameStepForm, - setupStore -} from '../dist/storybook/components'; - -const stories = storiesOf('RenameStepForm', module); - -stories.add('simple', () => ({ - components: { - RenameStepForm - }, - store: setupStore({ - dataset: { - headers: [{ - name: 'columnA' - }, { - name: 'columnB' - }, { - name: 'columnC' - }], - data: [ - ['value1', 'value2', 'value3'], - ['value4', 'value5', 'value6'], - ['value7', 'value8', 'value9'], - ['value10', 'value11', 'value12'], - ['value13', 'value14', 'value15'], - ], - }, - }, [], true), - template: ` - - - `, -})); diff --git a/stories/index.js b/stories/index.js index 82d8946c2e..42267f1341 100644 --- a/stories/index.js +++ b/stories/index.js @@ -63,7 +63,6 @@ stories })); import './data-viewer'; -import './form-rename-step'; import './resizable-panel'; import './filter-editor'; import './list-unique-values';