Skip to content

Commit

Permalink
fix: lint stories
Browse files Browse the repository at this point in the history
  • Loading branch information
caro3801 committed Jul 15, 2024
1 parent e67b9fb commit ba536f5
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 106 deletions.
14 changes: 7 additions & 7 deletions src/stories/components/FiltersPanel/FiltersPanel.stories.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import FiltersPanelToggler from '@/components/FiltersPanel/FiltersPanelToggler.vue'
import FiltersPanelSearch from '@/components/FiltersPanel/FiltersPanelSearch.vue'
import FiltersPanelSection from '@/components/FiltersPanel/FiltersPanelSection.vue'
import FiltersPanelSectionTitle from '@/components/FiltersPanel/FiltersPanelSectionTitle.vue'
import FiltersPanelSectionFilter from '@/components/FiltersPanel/FiltersPanelSectionFilter.vue'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry.vue'
import FiltersPanelSectionFilterFooter from '@/components/FiltersPanel/FiltersPanelSectionFilterFooter.vue'
import FiltersPanelToggler from '@/components/FiltersPanel/FiltersPanelToggler'
import FiltersPanelSearch from '@/components/FiltersPanel/FiltersPanelSearch'
import FiltersPanelSection from '@/components/FiltersPanel/FiltersPanelSection'
import FiltersPanelSectionTitle from '@/components/FiltersPanel/FiltersPanelSectionTitle'
import FiltersPanelSectionFilter from '@/components/FiltersPanel/FiltersPanelSectionFilter'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry'
import FiltersPanelSectionFilterFooter from '@/components/FiltersPanel/FiltersPanelSectionFilterFooter'

export default {
title: 'Components/FiltersPanel',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FiltersPanelSearch from '@/components/FiltersPanel/FiltersPanelSearch.vue'
import FiltersPanelSearch from '@/components/FiltersPanel/FiltersPanelSearch'

export default {
title: 'Components/FiltersPanel/FiltersPanelSearch',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FiltersPanelSection from '@/components/FiltersPanel/FiltersPanelSection.vue'
import FiltersPanelSectionFilter from '@/components/FiltersPanel/FiltersPanelSectionFilter.vue'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry.vue'
import FiltersPanelSection from '@/components/FiltersPanel/FiltersPanelSection'
import FiltersPanelSectionFilter from '@/components/FiltersPanel/FiltersPanelSectionFilter'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry'

export default {
title: 'Components/FiltersPanel/FiltersPanelSection',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FiltersPanelSectionFilter from '@/components/FiltersPanel/FiltersPanelSectionFilter.vue'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry.vue'
import FiltersPanelSectionFilter from '@/components/FiltersPanel/FiltersPanelSectionFilter'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry'

export default {
title: 'Components/FiltersPanel/FiltersPanelSectionFilter',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry.vue'
import FiltersPanelSectionFilterEntry from '@/components/FiltersPanel/FiltersPanelSectionFilterEntry'

export default {
title: 'Components/FiltersPanel/FiltersPanelSectionFilterEntry',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FiltersPanelSectionTitle from '@/components/FiltersPanel/FiltersPanelSectionTitle.vue'
import FiltersPanelSectionTitle from '@/components/FiltersPanel/FiltersPanelSectionTitle'

export default {
title: 'Components/FiltersPanel/FiltersPanelSectionTitle',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FiltersPanelToggler from '@/components/FiltersPanel/FiltersPanelToggler.vue'
import FiltersPanelToggler from '@/components/FiltersPanel/FiltersPanelToggler'

export default {
title: 'Components/FiltersPanel/FiltersPanelToggler',
Expand Down
133 changes: 70 additions & 63 deletions src/stories/components/PageSettings/PageSettings.stories.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import PageSettings from '@/components/PageSettings/PageSettings.vue'
import PageSettingsSection from '@/components/PageSettings/PageSettingsSection.vue'
import {BCloseButton} from 'bootstrap-vue-next'

import { BCloseButton } from 'bootstrap-vue-next'
import { fn } from '@storybook/test'

import PageSettings from '@/components/PageSettings/PageSettings'
import PageSettingsSection from '@/components/PageSettings/PageSettingsSection'

export default {
title: 'Components/PageSettings',
tags: ['autodocs'],
render: (args) => ({
components: {
PageSettings,PageSettingsSection,BCloseButton
PageSettings,
PageSettingsSection,
BCloseButton
},
setup: () => {
return {args}
return { args }
},
template: `
<page-settings title="Page settings">
Expand Down Expand Up @@ -48,98 +51,102 @@ export default {

const example = {
label: 'Show in document details',
name:'document-details',
type:"radio",
modelValue:'less-relevant',
open:false,
options:[
{text:"Most relevant",value:'most-relevant'},
{text:"Less relevant",value:'less-relevant'},
{text:"Creation date (new)",value:'creation-date-new'},
{text:"Creation date (old)",value:'creation-date-old'},
{text:"Size (decreasing)",value:'size-decreasing'},
{text:"Size (increasing)",value:'size-increasing'},
{text:"File path (A to Z)",value:'file-path'},
{text:"File path (Z to A)",value:'file-path'},
{text:"Indexing date (new)",value:'indexing-date-new'},
{text:"Indexing date (old)",value:'indexing-date-old'},
]}
name: 'document-details',
type: 'radio',
modelValue: 'less-relevant',
open: false,
options: [
{ text: 'Most relevant', value: 'most-relevant' },
{ text: 'Less relevant', value: 'less-relevant' },
{ text: 'Creation date (new)', value: 'creation-date-new' },
{ text: 'Creation date (old)', value: 'creation-date-old' },
{ text: 'Size (decreasing)', value: 'size-decreasing' },
{ text: 'Size (increasing)', value: 'size-increasing' },
{ text: 'File path (A to Z)', value: 'file-path' },
{ text: 'File path (Z to A)', value: 'file-path' },
{ text: 'Indexing date (new)', value: 'indexing-date-new' },
{ text: 'Indexing date (old)', value: 'indexing-date-old' }
]
}
const props2 = {
label: 'Documents per page',
name:'test',
type:"radio",
modelValue:'30',
open:true,
options:[
name: 'test',
type: 'radio',
modelValue: '30',
open: true,
options: [
{
value: "10",
text: "10",
value: '10',
text: '10'
},
{
value: "20",
text: "20",
value: '20',
text: '20'
},
{
value: "30",
text: "30",
},
]}
value: '30',
text: '30'
}
]
}
const props3 = {
label: 'View',
name:'view',
type:"radio",
modelValue:'grid',
open:true,
options:[
name: 'view',
type: 'radio',
modelValue: 'grid',
open: true,
options: [
{
value: "grid",
text: "Grid",
value: 'grid',
text: 'Grid',
icon: 'image-square'
},
{
value: "list",
text: "List",
value: 'list',
text: 'List',
icon: 'tree-structure'
},
{
value: "table",
text: "Table",
value: 'table',
text: 'Table',
icon: 'calendar-blank'
}
]}
]
}
const props4 = {
label: 'Document details',
name:'document-details',
type:"checkbox",
modelValue:["thumbnail","creation-date"],
open:true,
options:[
name: 'document-details',
type: 'checkbox',
modelValue: ['thumbnail', 'creation-date'],
open: true,
options: [
{
value: "thumbnail",
text: "Thumbnail",
value: 'thumbnail',
text: 'Thumbnail',
icon: 'image-square'
},
{
value: "path",
text: "Path",
value: 'path',
text: 'Path',
icon: 'tree-structure'
},
{
value: "creation-date",
text: "Creation date",
value: 'creation-date',
text: 'Creation date',
icon: 'calendar-blank'
},
{
value: "highlight",
text: "Highlight",
value: 'highlight',
text: 'Highlight',
icon: 'quotes'
}
]}
]
}

const sections = [props2, props3,props4]
const sections = [props2, props3, props4]
export const Default = {
args: {
title:"Page settings",
title: 'Page settings',
example,
sections,
onCloseButtonClick: fn()
Expand Down
12 changes: 6 additions & 6 deletions src/stories/components/PageSettings/PageSettingsEntry.stories.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PageSettingsEntry from '@/components/PageSettings/PageSettingsEntry.vue'
import PageSettingsEntry from '@/components/PageSettings/PageSettingsEntry'

export default {
title: 'Components/PageSettings/Entry',
Expand All @@ -15,16 +15,16 @@ export default {
}
export const Default = {
args: {
text: "Path",
value: "path",
text: 'Path',
value: 'path',
icon: 'tree-structure'
}
}
export const Checked = {
args: {
text: "Path",
value: "path",
text: 'Path',
value: 'path',
icon: 'tree-structure',
class:"page-settings-entry-checked"
class: 'page-settings-entry-checked'
}
}
47 changes: 26 additions & 21 deletions src/stories/components/PageSettings/PageSettingsSection.stories.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import PageSettingsSectionGroup from '@/components/PageSettings/PageSettingsSectionGroup.vue'
import PageSettingsSection from '@/components/PageSettings/PageSettingsSection.vue'
import PageSettingsSectionGroup from '@/components/PageSettings/PageSettingsSectionGroup'
import PageSettingsSection from '@/components/PageSettings/PageSettingsSection'

export default {
title: 'Components/PageSettings/Section',
tags: ['autodocs'],
argTypes: {
type: {
control: { type: 'radio' },
options: ['radio','checkbox']
},
options: ['radio', 'checkbox']
}
},
render: (args) => ({
components: {
PageSettingsSection,PageSettingsSectionGroup
PageSettingsSection,
PageSettingsSectionGroup
},
setup: () => {
return {args}
return { args }
},
template: `
<page-settings-section v-bind="args" v-model:open="args.open"></page-settings-section>
Expand All @@ -27,38 +28,42 @@ export default {
}
const props = {
label: 'Show in document details',
name:'document-details',
type:"checkbox",
open:true,
options:[
name: 'document-details',
type: 'checkbox',
open: true,
options: [
{
value: "thumbnail",
text: "Thumbnail",
value: 'thumbnail',
text: 'Thumbnail',
icon: 'image-square'
},
{
value: "path",
text: "Path",
value: 'path',
text: 'Path',
icon: 'tree-structure'
},
{
value: "creation-date",
text: "Creation date",
value: 'creation-date',
text: 'Creation date',
icon: 'calendar-blank'
},
{
value: "highlight",
text: "Highlight",
value: 'highlight',
text: 'Highlight',
icon: 'quotes'
}
]}
]
}
export const Default = {
args: {
...props,modelValue:[]
...props,
modelValue: []
}
}
export const Radio = {
args: {
...props,type:"radio",modelValue:''
...props,
type: 'radio',
modelValue: ''
}
}

0 comments on commit ba536f5

Please sign in to comment.