@worksafevictoria/wcl7.5 1.1.9 → 1.1.10
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/package.json
CHANGED
|
@@ -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;
|