@worksafevictoria/wcl7.5 1.1.0-beta.1 → 1.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +4 -2
- package/.storybook/preview.js +5 -0
- package/ci/build/build_validation.yml +2 -0
- package/package.json +3 -1
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
- package/src/components/Common/CardGridItem/index.vue +9 -3
- package/src/components/Global/AppHeader/ModalSearch/index.vue +6 -1
- package/src/components/Global/AppHeader/index.stories.js +16 -24
- package/src/components/Global/AppHeader/index.vue +9 -8
- package/src/components/Paragraphs/Chart/Constants.js +4790 -0
- package/src/components/Paragraphs/Chart/index.mdx +61 -0
- package/src/components/Paragraphs/Chart/index.stories.js +31 -0
- package/src/components/Paragraphs/Chart/index.vue +331 -0
- package/src/components/Paragraphs/ListGroup/Link/list-link.stories.js +34 -39
- package/src/components/Paragraphs/ListGroup/list-group.stories.js +34 -31
- package/src/components/Paragraphs/ListGroup/navigation-card.stories.js +33 -30
- package/src/components/Paragraphs/RelatedInformation/index.stories.js +5 -23
- package/src/components/Paragraphs/RelatedInformation/index.vue +12 -6
- package/src/components/Paragraphs/RelatedInformation/styles.scss +1 -3
- package/src/components/Paragraphs/ScrollSpy/index.stories.js +18 -26
- package/src/components/Paragraphs/ScrollSpy/index.vue +2 -1
- package/src/components/Paragraphs/TaskFinder/index.stories.js +10 -33
- package/src/components/Paragraphs/TaskFinder/pdf/index.vue +1 -1
- package/src/components/Paragraphs/TextMedia/index.stories.js +12 -61
- package/src/components/Paragraphs/VideoGrid/index.stories.js +16 -32
- package/src/components/SubComponents/FormInstance/index.vue +3 -1
- package/src/components/SubComponents/Search/GoogleREST/index.stories.js +50 -0
- package/src/components/SubComponents/Search/GoogleSearch/index.stories.js +23 -0
- package/src/components/SubComponents/Search/SearchListing/index.vue +69 -9
- package/src/components/SubComponents/Search/index.stories.js +19 -16
- package/src/components/SubComponents/Search/index.vue +563 -59
- package/src/includes/scss/vars/src/colors.scss +29 -1
- package/src/index.js +42 -40
- package/src/components/SubComponents/GoogleSearch/index.stories.js +0 -8
- package/src/components/SubComponents/GoogleSearch/index.vue +0 -405
|
@@ -5,50 +5,53 @@ export default {
|
|
|
5
5
|
title: 'Paragraphs/NavigationCards',
|
|
6
6
|
component: ListGroup,
|
|
7
7
|
argTypes: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
items: {
|
|
13
|
-
control: 'object',
|
|
14
|
-
defaultValue: storyData.links
|
|
15
|
-
},
|
|
16
|
-
rtlItems: {
|
|
17
|
-
control: 'object',
|
|
18
|
-
defaultValue: storyDataAr.links
|
|
19
|
-
},
|
|
20
|
-
rtl: {
|
|
21
|
-
control: 'boolean',
|
|
22
|
-
defaultValue: false
|
|
8
|
+
list: {
|
|
9
|
+
table: {
|
|
10
|
+
disable: true
|
|
11
|
+
}
|
|
23
12
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
title: {
|
|
14
|
+
table: {
|
|
15
|
+
disable: true
|
|
16
|
+
}
|
|
27
17
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
role: {
|
|
19
|
+
table: {
|
|
20
|
+
disable: true
|
|
21
|
+
}
|
|
31
22
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
subHeading: {
|
|
24
|
+
table: {
|
|
25
|
+
disable: true
|
|
26
|
+
}
|
|
35
27
|
},
|
|
36
|
-
|
|
28
|
+
footerHeading: {
|
|
37
29
|
table: {
|
|
38
30
|
disable: true
|
|
39
31
|
}
|
|
40
32
|
},
|
|
41
|
-
|
|
33
|
+
showListLink: {
|
|
42
34
|
table: {
|
|
43
35
|
disable: true
|
|
44
36
|
}
|
|
45
37
|
}
|
|
38
|
+
},
|
|
39
|
+
args: {
|
|
40
|
+
darkBackground: true,
|
|
41
|
+
items: storyData.links,
|
|
42
|
+
rtlItems: storyDataAr.links,
|
|
43
|
+
rtl: false,
|
|
44
|
+
titleTag: 'h2',
|
|
45
|
+
showListItemNavigationArrow: true,
|
|
46
|
+
showLargeSpacing: false
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
const Template = (args, { argTypes }) => ({
|
|
50
51
|
components: { ListGroup },
|
|
51
|
-
|
|
52
|
+
setup () {
|
|
53
|
+
return { args }
|
|
54
|
+
},
|
|
52
55
|
data() {
|
|
53
56
|
return {
|
|
54
57
|
storyData,
|
|
@@ -56,9 +59,9 @@ const Template = (args, { argTypes }) => ({
|
|
|
56
59
|
}
|
|
57
60
|
},
|
|
58
61
|
template: `<list-group
|
|
59
|
-
v-bind="
|
|
60
|
-
:list="rtl ? rtlItems : items"
|
|
61
|
-
:title="(rtl ? storyDataAr.title : storyData.title)"
|
|
62
|
+
v-bind="args"
|
|
63
|
+
:list="args.rtl ? args.rtlItems : args.items"
|
|
64
|
+
:title="(args.rtl ? storyDataAr.title : storyData.title)"
|
|
62
65
|
/>
|
|
63
66
|
`
|
|
64
67
|
})
|
|
@@ -4,29 +4,11 @@ import { taxonomyTagsList } from '../../../mock/related-info'
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Paragraphs/RelatedInformation',
|
|
6
6
|
component: RelatedInformation,
|
|
7
|
-
|
|
8
|
-
showTaxonomies:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
showTaxonomyHeading: {
|
|
13
|
-
control: 'boolean',
|
|
14
|
-
defaultValue: true
|
|
15
|
-
},
|
|
16
|
-
taxonomies: {
|
|
17
|
-
control: 'array',
|
|
18
|
-
defaultValue: taxonomyTagsList
|
|
19
|
-
}
|
|
7
|
+
args: {
|
|
8
|
+
showTaxonomies: true,
|
|
9
|
+
showTaxonomyHeading: true,
|
|
10
|
+
taxonomies: taxonomyTagsList
|
|
20
11
|
}
|
|
21
12
|
}
|
|
22
13
|
|
|
23
|
-
const
|
|
24
|
-
components: { RelatedInformation },
|
|
25
|
-
props: Object.keys(argTypes),
|
|
26
|
-
template: `
|
|
27
|
-
<related-information
|
|
28
|
-
v-bind="$props"
|
|
29
|
-
/> `
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
export const Default = Template.bind({})
|
|
14
|
+
export const Default = {}
|
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
<row v-if="showTaxonomyHeading">
|
|
7
7
|
<h2>Related information</h2>
|
|
8
8
|
</row>
|
|
9
|
-
<row
|
|
9
|
+
<row>
|
|
10
|
+
<div class="related-info-tags">
|
|
10
11
|
<button
|
|
11
12
|
v-for="(taxonomy, i) in taxonomies"
|
|
12
13
|
:key="i"
|
|
13
|
-
class="related-info-tag"
|
|
14
|
+
class="related-info-tag btn text-nowrap"
|
|
14
15
|
role="button"
|
|
15
16
|
@click="
|
|
16
17
|
goToCollectionPage(
|
|
17
|
-
taxonomy
|
|
18
|
+
taxonomy
|
|
18
19
|
)
|
|
19
20
|
"
|
|
20
21
|
>
|
|
21
22
|
<strong>{{ taxonomy.name }}</strong>
|
|
22
23
|
</button>
|
|
24
|
+
</div>
|
|
23
25
|
</row>
|
|
24
26
|
</container>
|
|
25
27
|
</template>
|
|
@@ -49,9 +51,13 @@ export default {
|
|
|
49
51
|
}
|
|
50
52
|
},
|
|
51
53
|
methods: {
|
|
52
|
-
goToCollectionPage(
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
goToCollectionPage(taxonomy) {
|
|
55
|
+
if (process.env.IS_STORYBOOK === 'TRUE') {
|
|
56
|
+
alert('Will go to Collection Page at : ' + taxonomy.url )
|
|
57
|
+
} else {
|
|
58
|
+
this.$router.push(taxonomy.field_term_link_to_collection_pg.path.alias)
|
|
59
|
+
this.$emit('goToCollectionPage')
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
}
|
|
@@ -15,15 +15,13 @@ h2 {
|
|
|
15
15
|
position: relative;
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
|
-
align-items: flex-start;
|
|
19
18
|
|
|
20
19
|
.related-info-tags {
|
|
21
20
|
display: flex;
|
|
22
|
-
|
|
21
|
+
flex-wrap: wrap;
|
|
23
22
|
gap: 12px;
|
|
24
23
|
}
|
|
25
24
|
.related-info-tag {
|
|
26
|
-
position: relative;
|
|
27
25
|
text-decoration: none;
|
|
28
26
|
font-style: normal;
|
|
29
27
|
font-size: 16px;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ScrollSpy from './index.vue'
|
|
2
|
+
import { BCol, BRow, BContainer } from 'bootstrap-vue-next'
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
+
const englishItemList = [
|
|
4
5
|
{
|
|
5
6
|
text: 'Section one heading',
|
|
6
7
|
id: 'item-1'
|
|
@@ -42,30 +43,22 @@ export default {
|
|
|
42
43
|
title: 'Paragraphs/ScrollSpy',
|
|
43
44
|
component: ScrollSpy,
|
|
44
45
|
argTypes: {
|
|
45
|
-
title: {
|
|
46
|
-
control: 'text',
|
|
47
|
-
defaultValue: 'On this page'
|
|
48
|
-
},
|
|
49
46
|
itemList: {
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
itemListArabic:
|
|
57
|
-
|
|
58
|
-
defaultValue: arabicItemList
|
|
59
|
-
},
|
|
60
|
-
rtl: {
|
|
61
|
-
control: 'boolean',
|
|
62
|
-
defaultValue: false
|
|
47
|
+
table: {disable: true}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
args: {
|
|
51
|
+
title: 'On this page',
|
|
52
|
+
itemListEnglish: englishItemList,
|
|
53
|
+
itemListArabic: arabicItemList,
|
|
54
|
+
rtl: false
|
|
63
55
|
}
|
|
64
|
-
}
|
|
65
56
|
}
|
|
66
|
-
const DefaultContent = (args
|
|
67
|
-
components: { ScrollSpy },
|
|
68
|
-
|
|
57
|
+
const DefaultContent = (args) => ({
|
|
58
|
+
components: { ScrollSpy, BCol, BRow, BContainer },
|
|
59
|
+
setup() {
|
|
60
|
+
return { args }
|
|
61
|
+
},
|
|
69
62
|
data() {
|
|
70
63
|
return {
|
|
71
64
|
text: `
|
|
@@ -79,7 +72,7 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
79
72
|
ipsum commodo tempor sunt in proident.
|
|
80
73
|
`,
|
|
81
74
|
arabicText: `هنالك العديد من الأنواع المتوفرة لنصوص لوريم إيبسوم، ولكن الغالبية تم تعديلها بشكل ما عبر إدخال بعض النوادر أو الكلمات العشوائية إلى النص. إن كنت تريد أن تستخدم نص لوريم إيبسوم ما، عليك أن تتحقق أولاً أن ليس هناك أي كلمات أو عبارات محرجة أو غير لائقة مخبأة في هذا النص. بينما تعمل جميع مولّدات نصوص لوريم إيبسوم على الإنترنت على إعادة تكرار مقاطع من نص لوريم إيبسوم نفسه عدة مرات بما تتطلبه الحاجة، يقوم مولّدنا هذا باستخدام كلمات من قاموس يحوي على أكثر من 200 كلمة لا تينية، مضاف إليها مجموعة من الجمل النموذجية، لتكوين نص لوريم إيبسوم ذو شكل منطقي قريب إلى النص الحقيقي. وبالتالي يكون النص الناتح خالي من التكرار، أو أي كلمات أو عبارات غير لائقة أو ما شابه. وهذا ما يجعله أول مولّد نص لوريم إيبسوم حقيقي على الإنترنت.`,
|
|
82
|
-
|
|
75
|
+
englishItemList,
|
|
83
76
|
arabicItemList
|
|
84
77
|
}
|
|
85
78
|
},
|
|
@@ -126,7 +119,7 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
126
119
|
</div>
|
|
127
120
|
</b-col>
|
|
128
121
|
<b-col cols="4">
|
|
129
|
-
<scroll-spy v-bind="
|
|
122
|
+
<scroll-spy v-bind="args" :item-list="args.itemListEnglish" />
|
|
130
123
|
</b-col>
|
|
131
124
|
</b-row>
|
|
132
125
|
|
|
@@ -174,11 +167,10 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
174
167
|
</div>
|
|
175
168
|
</b-col>
|
|
176
169
|
<b-col cols="4">
|
|
177
|
-
<scroll-spy v-bind="
|
|
170
|
+
<scroll-spy v-bind="args" :item-list="args.arabicItemList" />
|
|
178
171
|
</b-col>
|
|
179
172
|
</b-row>
|
|
180
173
|
</b-container>`
|
|
181
174
|
})
|
|
182
175
|
|
|
183
176
|
export const Default = DefaultContent.bind({})
|
|
184
|
-
Default.parameters = { controls: { exclude: ['itemList'] } }
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
24
|
import SectionGroup from '../../Containers/SectionGroup/index.vue'
|
|
25
|
+
import { BNavbar, BListGroup, BListGroupItem } from 'bootstrap-vue-next'
|
|
25
26
|
|
|
26
27
|
export default {
|
|
27
28
|
name: 'ScrollSpy',
|
|
28
|
-
components: { SectionGroup },
|
|
29
|
+
components: { SectionGroup, BNavbar, BListGroup, BListGroupItem },
|
|
29
30
|
props: {
|
|
30
31
|
title: {
|
|
31
32
|
type: String,
|
|
@@ -8,38 +8,15 @@ import {
|
|
|
8
8
|
export default {
|
|
9
9
|
title: 'Paragraphs/TaskFinder',
|
|
10
10
|
component: TaskFinder,
|
|
11
|
-
|
|
12
|
-
taskList:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
text: {
|
|
21
|
-
control: 'text',
|
|
22
|
-
defaultValue: taskFinderTempText
|
|
23
|
-
},
|
|
24
|
-
headingTag: {
|
|
25
|
-
control: 'text',
|
|
26
|
-
defaultValue: 'h2'
|
|
27
|
-
},
|
|
28
|
-
rtl: {
|
|
29
|
-
control: 'boolean',
|
|
30
|
-
defaultValue: false
|
|
31
|
-
},
|
|
32
|
-
workwell: {
|
|
33
|
-
control: 'boolean',
|
|
34
|
-
defaultValue: false
|
|
35
|
-
}
|
|
36
|
-
}
|
|
11
|
+
args: {
|
|
12
|
+
taskList: taskFinderTempData,
|
|
13
|
+
title: taskFinderTempTitle,
|
|
14
|
+
text: taskFinderTempText,
|
|
15
|
+
headingTag: 'h2',
|
|
16
|
+
rtl: false,
|
|
17
|
+
workwell: false
|
|
18
|
+
},
|
|
19
|
+
template: '<task-finder v-bind="args" :storybook="true"/>'
|
|
37
20
|
}
|
|
38
21
|
|
|
39
|
-
const
|
|
40
|
-
components: { TaskFinder },
|
|
41
|
-
props: Object.keys(argTypes),
|
|
42
|
-
template: '<task-finder v-bind="$props" :storybook="true"/>'
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
export const Default = DefaultContent.bind({})
|
|
22
|
+
export const Default = {}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<script>
|
|
27
27
|
import { isAbsoluteUrl } from '../../../../../lib/utility'
|
|
28
|
-
import Row from './../../../Containers/
|
|
28
|
+
import Row from './../../../Containers/Row/index.vue'
|
|
29
29
|
import Container from './../../../Containers/Container/index.vue'
|
|
30
30
|
import Column from './../../../Containers/Column/index.vue'
|
|
31
31
|
import RichText from './../../../Paragraphs/RichText/index.vue'
|
|
@@ -19,75 +19,26 @@ const MockVideo = {
|
|
|
19
19
|
export default {
|
|
20
20
|
title: 'Paragraphs/Text + Media',
|
|
21
21
|
component: TextMedia,
|
|
22
|
-
|
|
23
|
-
content:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
titleTag: {
|
|
33
|
-
control: 'text',
|
|
34
|
-
defaultValue: 'h3'
|
|
35
|
-
},
|
|
36
|
-
hasBgColor: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
defaultValue: false
|
|
39
|
-
},
|
|
40
|
-
flip: {
|
|
41
|
-
control: 'boolean',
|
|
42
|
-
defaultValue: false
|
|
43
|
-
},
|
|
44
|
-
rtl: {
|
|
45
|
-
control: 'boolean',
|
|
46
|
-
defaultValue: false
|
|
47
|
-
},
|
|
48
|
-
workwell: {
|
|
49
|
-
control: 'boolean',
|
|
50
|
-
defaultValue: false
|
|
51
|
-
},
|
|
52
|
-
video: {
|
|
53
|
-
control: 'object'
|
|
54
|
-
},
|
|
55
|
-
image: {
|
|
56
|
-
control: 'object'
|
|
57
|
-
},
|
|
58
|
-
mediaType: {
|
|
59
|
-
control: 'text'
|
|
60
|
-
},
|
|
61
|
-
storybook: {
|
|
62
|
-
control: 'boolean',
|
|
63
|
-
defaultValue: true
|
|
64
|
-
},
|
|
65
|
-
hideImageMob: {
|
|
66
|
-
control: 'boolean',
|
|
67
|
-
defaultValue: false
|
|
68
|
-
}
|
|
22
|
+
args: {
|
|
23
|
+
content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>',
|
|
24
|
+
titleText: 'A sample media item',
|
|
25
|
+
titleTag: 'h3',
|
|
26
|
+
hasBgColor: false,
|
|
27
|
+
flip: false,
|
|
28
|
+
rtl: false,
|
|
29
|
+
workwell: false,
|
|
30
|
+
storybook: true,
|
|
31
|
+
hideImageMob: false
|
|
69
32
|
}
|
|
70
33
|
}
|
|
71
34
|
|
|
72
|
-
const
|
|
73
|
-
components: { TextMedia },
|
|
74
|
-
props: Object.keys(argTypes),
|
|
75
|
-
template: `<text-media v-bind="$props" />`
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
export const TextWithImage = TextWithImageDefault.bind({})
|
|
35
|
+
export const TextWithImage = {}
|
|
79
36
|
TextWithImage.args = {
|
|
80
37
|
mediaType: 'image',
|
|
81
38
|
image: MockImage
|
|
82
39
|
}
|
|
83
40
|
|
|
84
|
-
const
|
|
85
|
-
components: { TextMedia },
|
|
86
|
-
props: Object.keys(argTypes),
|
|
87
|
-
template: `<text-media v-bind="$props" />`
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
export const TextWithVideo = TextWithVideoDefault.bind({})
|
|
41
|
+
export const TextWithVideo = {}
|
|
91
42
|
TextWithVideo.args = {
|
|
92
43
|
mediaType: 'video',
|
|
93
44
|
video: MockVideo
|
|
@@ -107,45 +107,28 @@ export default {
|
|
|
107
107
|
title: 'Paragraphs/VideoGrid',
|
|
108
108
|
component: { VideoGrid, Container, Row, Column },
|
|
109
109
|
argTypes: {
|
|
110
|
-
gridTitle: {
|
|
111
|
-
control: 'text',
|
|
112
|
-
defaultValue: mockData.title
|
|
113
|
-
},
|
|
114
110
|
titleTag: {
|
|
115
111
|
control: 'select',
|
|
116
|
-
options: ['h2', 'h3']
|
|
117
|
-
defaultValue: 'h2'
|
|
118
|
-
},
|
|
119
|
-
gridDescription: {
|
|
120
|
-
control: 'text',
|
|
121
|
-
defaultValue: mockData.description
|
|
122
|
-
},
|
|
123
|
-
videoList: {
|
|
124
|
-
control: 'object',
|
|
125
|
-
defaultValue: mockData.videos
|
|
126
|
-
},
|
|
127
|
-
rtl: {
|
|
128
|
-
control: 'boolean',
|
|
129
|
-
defaultValue: mockData.rtl
|
|
130
|
-
},
|
|
131
|
-
threeColumns: {
|
|
132
|
-
control: 'boolean',
|
|
133
|
-
defaultValue: mockData.threeColumns
|
|
134
|
-
},
|
|
135
|
-
greyBackground: {
|
|
136
|
-
control: 'boolean',
|
|
137
|
-
defaultValue: mockData.greyBackground
|
|
138
|
-
},
|
|
139
|
-
cta: {
|
|
140
|
-
control: 'object',
|
|
141
|
-
defaultValue: mockData.cta
|
|
112
|
+
options: ['h2', 'h3']
|
|
142
113
|
}
|
|
114
|
+
},
|
|
115
|
+
args: {
|
|
116
|
+
gridTitle: mockData.title,
|
|
117
|
+
titleTag: 'h2',
|
|
118
|
+
gridDescription: mockData.description,
|
|
119
|
+
videoList: mockData.videos,
|
|
120
|
+
rtl: mockData.rtl,
|
|
121
|
+
threeColumns: mockData.threeColumns,
|
|
122
|
+
greyBackground: mockData.greyBackground,
|
|
123
|
+
cta: mockData.cta
|
|
143
124
|
}
|
|
144
125
|
}
|
|
145
126
|
|
|
146
127
|
const YoutubeContent = (args, { argTypes }) => ({
|
|
147
128
|
components: { VideoGrid, Container, Row, Column },
|
|
148
|
-
|
|
129
|
+
setup() {
|
|
130
|
+
return { args };
|
|
131
|
+
},
|
|
149
132
|
data() {
|
|
150
133
|
return {
|
|
151
134
|
videos: mockData.videos
|
|
@@ -156,7 +139,7 @@ const YoutubeContent = (args, { argTypes }) => ({
|
|
|
156
139
|
<row>
|
|
157
140
|
<column>
|
|
158
141
|
<video-grid
|
|
159
|
-
v-bind="
|
|
142
|
+
v-bind="args"
|
|
160
143
|
/>
|
|
161
144
|
</column>
|
|
162
145
|
</row>
|
|
@@ -165,3 +148,4 @@ const YoutubeContent = (args, { argTypes }) => ({
|
|
|
165
148
|
})
|
|
166
149
|
|
|
167
150
|
export const Youtube = YoutubeContent.bind({})
|
|
151
|
+
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div>
|
|
3
|
+
<h1>Form Instance</h1>
|
|
3
4
|
<p>
|
|
4
5
|
The .vue and .stories.js files for SubComponents/FormInstance (displayed in Storybook under Form) must be copied from current Storybook 6 branch when time to upgrade them. They are causing errors preventing Storybook from being rendered and therefore tested.
|
|
5
6
|
</p>
|
|
7
|
+
</div>
|
|
6
8
|
</template>
|
|
7
9
|
|
|
8
10
|
<script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import Search from './../index.vue'
|
|
2
|
+
|
|
3
|
+
const contentParser = () => {
|
|
4
|
+
return Promise.resolve({
|
|
5
|
+
results: [
|
|
6
|
+
{
|
|
7
|
+
title: 'Content title 1',
|
|
8
|
+
description: 'Content description 2'
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
offset: 0,
|
|
12
|
+
numFound: 1000
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'SubComponents/Search',
|
|
18
|
+
component: { Search },
|
|
19
|
+
tags: ['autodocs'],
|
|
20
|
+
argTypes: {
|
|
21
|
+
contentParser: {
|
|
22
|
+
table: { disable: true }
|
|
23
|
+
},
|
|
24
|
+
googleSearchFlag: {
|
|
25
|
+
table: { disable: true }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
args: {
|
|
29
|
+
pageLimit: 10,
|
|
30
|
+
contentParser: contentParser,
|
|
31
|
+
isTypeahead: false,
|
|
32
|
+
initialSearchQuery: 'Mental Health',
|
|
33
|
+
googleSearchFlag: 'googlerest',
|
|
34
|
+
visibleSearchList: true
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const DefaultSearch = (args) => ({
|
|
40
|
+
components: { Search },
|
|
41
|
+
setup () {
|
|
42
|
+
return { args }
|
|
43
|
+
},
|
|
44
|
+
template: `<search
|
|
45
|
+
v-bind="args"
|
|
46
|
+
:search-type="googleSearchFlag"
|
|
47
|
+
ref="googlerest" />`
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
export const GoogleREST = DefaultSearch.bind({})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Search from './../index.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'SubComponents/Search',
|
|
5
|
+
component: { Search },
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
googleSearchFlag: 'google'
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const DefaultSearch = (args) => ({
|
|
13
|
+
components: { Search },
|
|
14
|
+
setup () {
|
|
15
|
+
return { args }
|
|
16
|
+
},
|
|
17
|
+
template: `<search
|
|
18
|
+
v-bind="args"
|
|
19
|
+
:google-search-flag="googleSearchFlag"
|
|
20
|
+
ref="googlerest" />`
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export const GoogleSearch = DefaultSearch.bind({})
|