@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
package/.storybook/main.js
CHANGED
|
@@ -5,14 +5,16 @@ const config = {
|
|
|
5
5
|
'@storybook/addon-links',
|
|
6
6
|
'@storybook/addon-essentials',
|
|
7
7
|
'@storybook/addon-interactions',
|
|
8
|
-
'@storybook/addon-a11y'
|
|
8
|
+
'@storybook/addon-a11y',
|
|
9
|
+
'storybook-addon-deep-controls'
|
|
9
10
|
],
|
|
10
11
|
framework: {
|
|
11
12
|
name: '@storybook/vue3-vite',
|
|
12
13
|
options: {}
|
|
13
14
|
},
|
|
14
15
|
docs: {
|
|
15
|
-
autodocs: 'tag'
|
|
16
|
+
autodocs: 'tag',
|
|
17
|
+
defaultName: 'Documentation'
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
export default config
|
package/.storybook/preview.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worksafevictoria/wcl7.5",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.11",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
"bootstrap-vue": "^2.23.1",
|
|
46
46
|
"bootstrap-vue-next": "^0.15.5",
|
|
47
47
|
"date-fns": "^2.30.0",
|
|
48
|
+
"storybook-addon-deep-controls": "^0.6.2",
|
|
48
49
|
"vue": "^3.3.4",
|
|
50
|
+
"vue-google-charts": "^1.1.0",
|
|
49
51
|
"vue-formio": "^4.0.8",
|
|
50
52
|
"vue-scrollto": "^2.20.0"
|
|
51
53
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</template>
|
|
55
55
|
<script>
|
|
56
56
|
import Icon from './../../SubComponents/Icon/index.vue'
|
|
57
|
-
import arrowRight from './../../../assets/icons/right-arrow.svg?
|
|
57
|
+
import arrowRight from './../../../assets/icons/right-arrow.svg?component'
|
|
58
58
|
|
|
59
59
|
export default {
|
|
60
60
|
name: 'CardGridItemIcon',
|
|
@@ -67,9 +67,10 @@
|
|
|
67
67
|
}
|
|
68
68
|
]"
|
|
69
69
|
>
|
|
70
|
+
<div>
|
|
70
71
|
<b-card-title
|
|
71
72
|
v-if="cardHeaderTitle !== null && cardHeaderTitle !== undefined"
|
|
72
|
-
:
|
|
73
|
+
:tag="headerTag"
|
|
73
74
|
class="card-grid-item__header"
|
|
74
75
|
:class="{
|
|
75
76
|
[`card-grid-item__header--${headerSize}`]: true,
|
|
@@ -99,7 +100,9 @@
|
|
|
99
100
|
>
|
|
100
101
|
</card-grid-item-icon>
|
|
101
102
|
</b-card-title>
|
|
102
|
-
|
|
103
|
+
</div>
|
|
104
|
+
<div>
|
|
105
|
+
<card-grid-item-caret
|
|
103
106
|
v-if="caretPosition === 'top'"
|
|
104
107
|
:caret="caret"
|
|
105
108
|
:rtl="rtl"
|
|
@@ -125,7 +128,10 @@
|
|
|
125
128
|
:rtl="rtl"
|
|
126
129
|
>
|
|
127
130
|
</card-grid-item-icon>
|
|
131
|
+
|
|
128
132
|
<span v-if="pillText" class="visually-hidden">{{ pillText }}</span>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
129
135
|
</div>
|
|
130
136
|
<b-card-text
|
|
131
137
|
v-if="$slots.cardDescription || description"
|
|
@@ -200,7 +206,7 @@ import { BCard, BCardBody, BCardTitle, BCardText } from 'bootstrap-vue-next'
|
|
|
200
206
|
|
|
201
207
|
export default {
|
|
202
208
|
name: 'CardGridItem',
|
|
203
|
-
components: {
|
|
209
|
+
components: {CardGridItemIcon, CardGridItemCaret, RichText, BCard, BCardBody, BCardTitle, BCardText },
|
|
204
210
|
props: {
|
|
205
211
|
backgroundVariant: {
|
|
206
212
|
type: String,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
>
|
|
18
18
|
<search
|
|
19
19
|
ref="searchInputBox"
|
|
20
|
+
:google-search-flag="googleSearchFlag"
|
|
20
21
|
:initial-search-query="searchQuery"
|
|
21
22
|
:page-limit="pageLimit"
|
|
22
23
|
:page-number="pageNumber"
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
</template>
|
|
32
33
|
|
|
33
34
|
<script>
|
|
34
|
-
import Close from '../../../../assets/icons/close.svg'
|
|
35
|
+
import Close from '../../../../assets/icons/close.svg?url'
|
|
35
36
|
import Search from '../../../SubComponents/Search/index.vue'
|
|
36
37
|
|
|
37
38
|
export default {
|
|
@@ -45,6 +46,10 @@ export default {
|
|
|
45
46
|
contentParser: {
|
|
46
47
|
type: Function,
|
|
47
48
|
required: true
|
|
49
|
+
},
|
|
50
|
+
googleSearchFlag: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'googlerest'
|
|
48
53
|
}
|
|
49
54
|
},
|
|
50
55
|
data() {
|
|
@@ -18,45 +18,42 @@ const contentParser = () => {
|
|
|
18
18
|
export default {
|
|
19
19
|
title: 'Global/AppHeader',
|
|
20
20
|
component: AppHeader,
|
|
21
|
+
tags: ['autodocs'],
|
|
21
22
|
data() {
|
|
22
23
|
return {
|
|
23
24
|
appHeaderData
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
argTypes: {
|
|
27
|
-
headerMenu: {
|
|
28
|
-
control: 'object',
|
|
29
|
-
defaultValue: appHeaderData
|
|
30
|
-
},
|
|
31
28
|
contentParser: {
|
|
32
|
-
control: 'function',
|
|
33
|
-
defaultValue: contentParser,
|
|
34
29
|
table: { disable: true }
|
|
35
|
-
},
|
|
36
|
-
isWorkWell: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
defaultValue: false
|
|
39
|
-
},
|
|
40
|
-
authenticated: {
|
|
41
|
-
control: 'boolean',
|
|
42
|
-
defaultValue: false
|
|
43
30
|
}
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
headerMenu: appHeaderData,
|
|
34
|
+
contentParser: contentParser,
|
|
35
|
+
isWorkWell: false,
|
|
36
|
+
authenticated: false,
|
|
37
|
+
mainContent: 'Some dummy main content required for this example',
|
|
38
|
+
footerContent: 'Some dummy footer content required for this example'
|
|
44
39
|
}
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
const DefaultContent = (args
|
|
42
|
+
const DefaultContent = (args) => ({
|
|
48
43
|
components: { AppHeader },
|
|
49
|
-
|
|
44
|
+
setup() {
|
|
45
|
+
return { args }
|
|
46
|
+
},
|
|
50
47
|
template: `
|
|
51
48
|
<div>
|
|
52
49
|
<app-header
|
|
53
|
-
v-bind="
|
|
50
|
+
v-bind="args"
|
|
54
51
|
/>
|
|
55
52
|
<main>
|
|
56
53
|
<div class="container">
|
|
57
54
|
<div class="row">
|
|
58
55
|
<div class="col">
|
|
59
|
-
{{
|
|
56
|
+
{{args.mainContent}}
|
|
60
57
|
</div>
|
|
61
58
|
</div>
|
|
62
59
|
</div>
|
|
@@ -65,7 +62,7 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
65
62
|
<div class="container">
|
|
66
63
|
<div class="row">
|
|
67
64
|
<div class="col">
|
|
68
|
-
{{
|
|
65
|
+
{{args.footerContent}}
|
|
69
66
|
</div>
|
|
70
67
|
</div>
|
|
71
68
|
</div>
|
|
@@ -75,8 +72,3 @@ const DefaultContent = (args, { argTypes }) => ({
|
|
|
75
72
|
})
|
|
76
73
|
|
|
77
74
|
export const Default = DefaultContent.bind({})
|
|
78
|
-
|
|
79
|
-
Default.args = {
|
|
80
|
-
mainContent: 'Some dummy main content required for this example',
|
|
81
|
-
footerContent: 'Some dummy footer content required for this example'
|
|
82
|
-
}
|
|
@@ -416,14 +416,14 @@
|
|
|
416
416
|
|
|
417
417
|
<script>
|
|
418
418
|
import ModalSearch from './ModalSearch/index.vue'
|
|
419
|
-
import Close from './../../../assets/icons/close.svg'
|
|
420
|
-
import WorkSafeLogo from './../../../assets/icons/AppFooter/worksafe-footer-logo.svg'
|
|
421
|
-
import WorkWellLogo from './../../../assets/icons/AppFooter/logo-workwell-reversed.svg'
|
|
422
|
-
import CaretRight from './../../../assets/icons/caret-right.svg'
|
|
423
|
-
import CaretDown from './../../../assets/icons/caret-down.svg'
|
|
424
|
-
import SearchIcon from './../../../assets/icons/AppHeader/search-32px.svg'
|
|
425
|
-
import CaretLeft from './../../../assets/icons/caret-left.svg'
|
|
426
|
-
import MenuIcon from './../../../assets/icons/AppHeader/menu-32px.svg'
|
|
419
|
+
import Close from './../../../assets/icons/close.svg?component'
|
|
420
|
+
import WorkSafeLogo from './../../../assets/icons/AppFooter/worksafe-footer-logo.svg?url'
|
|
421
|
+
import WorkWellLogo from './../../../assets/icons/AppFooter/logo-workwell-reversed.svg?url'
|
|
422
|
+
import CaretRight from './../../../assets/icons/caret-right.svg?component'
|
|
423
|
+
import CaretDown from './../../../assets/icons/caret-down.svg?component'
|
|
424
|
+
import SearchIcon from './../../../assets/icons/AppHeader/search-32px.svg?component'
|
|
425
|
+
import CaretLeft from './../../../assets/icons/caret-left.svg?component'
|
|
426
|
+
import MenuIcon from './../../../assets/icons/AppHeader/menu-32px.svg?component'
|
|
427
427
|
|
|
428
428
|
export default {
|
|
429
429
|
components: {
|
|
@@ -527,6 +527,7 @@ export default {
|
|
|
527
527
|
this.windowWidth = window.innerWidth
|
|
528
528
|
},
|
|
529
529
|
firstLevelClick(item, ref) {
|
|
530
|
+
console.log('in first level click')
|
|
530
531
|
// Reset screen to fix whitespace
|
|
531
532
|
if (window && window.scrollTo && this.screen === 'desktop') {
|
|
532
533
|
window.scrollTo(0, 0)
|