@worksafevictoria/wcl7.5 1.0.0 → 1.1.0-beta.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/.env +4 -2
- package/.eslintrc.cjs +1 -1
- package/.eslintrc.js +2 -1
- package/.husky/pre-commit +4 -0
- package/.storybook/main.js +4 -2
- package/.storybook/preview.js +15 -0
- package/README.md +14 -0
- package/babel.config.js +7 -6
- package/bin/deploy.sh +3 -3
- package/ci/build/build_validation.yml +11 -6
- package/ci/release/beta.yml +6 -5
- package/ci/release/master.yml +6 -5
- package/jest.config.js +3 -1
- package/package.json +16 -9
- package/public/.nojekyll +1 -0
- 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/Global/Cookies/{index.storieshide.js → index.stories.js} +5 -16
- package/src/components/Global/Cookies/index.vue +122 -136
- package/src/components/Global/Cookies/styles.scss +10 -2
- package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +53 -47
- package/src/components/Global/GlobalNotice/index.stories.js +8 -0
- package/src/components/Global/GlobalNotice/index.vue +71 -137
- package/src/components/Global/HeroHeader/styles.scss +2 -1
- package/src/components/Paragraphs/BrowseContent/index.stories.js +39 -57
- 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/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/FormInstance/stories/mocks/checkbox.json +21 -0
- 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/components/SubComponents/VideoThumbnail/index.stories.js +9 -4
- package/src/components/SubComponents/VideoThumbnail/index.vue +93 -96
- package/src/includes/scss/vars/src/colors.scss +29 -1
- package/src/index.js +42 -40
- package/vite.config.js +5 -1
- package/src/components/SubComponents/GoogleSearch/index.stories.js +0 -8
- package/src/components/SubComponents/GoogleSearch/index.vue +0 -405
package/.env
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
CONTENT_API_URL=https://content-staging-v2.api.worksafe.vic.gov.au
|
|
2
2
|
IS_STORYBOOK=TRUE
|
|
3
|
-
SHOW_COOKIE=
|
|
4
|
-
GOOGLE__URL=https://cse.google.com/cse.js?cx=53b1506aa03c64160
|
|
3
|
+
SHOW_COOKIE=true
|
|
4
|
+
GOOGLE__URL=https://cse.google.com/cse.js?cx=53b1506aa03c64160
|
|
5
|
+
CARETAKER=false
|
|
6
|
+
SHOW_GLOBAL_NOTICE=true
|
package/.eslintrc.cjs
CHANGED
|
@@ -3,7 +3,7 @@ require('@rushstack/eslint-patch/modern-module-resolution')
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
root: true,
|
|
6
|
-
'extends': ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-prettier/skip-formatting', 'plugin:storybook/recommended'],
|
|
6
|
+
'extends': ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-prettier/skip-formatting', 'plugin:storybook/recommended', '@babel/plugin-transform-private-property-in-object'],
|
|
7
7
|
parserOptions: {
|
|
8
8
|
ecmaVersion: 'latest'
|
|
9
9
|
}
|
package/.eslintrc.js
CHANGED
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
|
@@ -4,6 +4,16 @@ import 'bootstrap/dist/css/bootstrap.min.css'
|
|
|
4
4
|
import './../src/assets/styles/stylesheet.scss'
|
|
5
5
|
import { setup } from '@storybook/vue3'
|
|
6
6
|
|
|
7
|
+
//Custom fonts
|
|
8
|
+
import './../src/assets/styles/webfonts.css'
|
|
9
|
+
|
|
10
|
+
// Global Styles
|
|
11
|
+
import './../src/assets/styles/stylesheet.scss'
|
|
12
|
+
|
|
13
|
+
// Storybook css
|
|
14
|
+
import './../src/assets/styles/storybook.scss'
|
|
15
|
+
|
|
16
|
+
|
|
7
17
|
setup((app) => {
|
|
8
18
|
app.component('NuxtLink', {
|
|
9
19
|
props: {
|
|
@@ -18,6 +28,11 @@ setup((app) => {
|
|
|
18
28
|
|
|
19
29
|
const preview = {
|
|
20
30
|
parameters: {
|
|
31
|
+
options: {
|
|
32
|
+
storySort: {
|
|
33
|
+
method: 'alphabetical'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
21
36
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
22
37
|
controls: {
|
|
23
38
|
matchers: {
|
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ This repo is based on Vue 3 in Vite, and Storybook 7. It contains all the commo
|
|
|
27
27
|
|
|
28
28
|
yarn build-storybook
|
|
29
29
|
|
|
30
|
+
Note: When building storybook, there is a dependency on a .nojekyll file in order for Storybook to display stories.
|
|
31
|
+
|
|
30
32
|
## Deploy
|
|
31
33
|
|
|
32
34
|
chmod +x bin/deploy.sh
|
|
@@ -56,6 +58,18 @@ This repo is based on Vue 3 in Vite, and Storybook 7. It contains all the commo
|
|
|
56
58
|
transpile: ['@worksafevictoria/wcl', 'xxx', 'xxx', 'xxx']
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
#### Usage Instructions - environment variables
|
|
62
|
+
|
|
63
|
+
For environment variables to be recognised, they must be added to the vite.config.js to the existing list under 'define', eg
|
|
64
|
+
|
|
65
|
+
.env:
|
|
66
|
+
|
|
67
|
+
IS_STORYBOOK=TRUE
|
|
68
|
+
|
|
69
|
+
.vite.config.js:
|
|
70
|
+
|
|
71
|
+
'process.env.IS_STORYBOOK': `"${process.env.IS_STORYBOOK}"`,
|
|
72
|
+
|
|
59
73
|
#### Import example
|
|
60
74
|
|
|
61
75
|
<template>
|
package/babel.config.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
env: {
|
|
3
|
+
test: {
|
|
4
|
+
presets: [
|
|
5
|
+
'@babel/preset-env',
|
|
6
|
+
],
|
|
7
|
+
}
|
|
8
|
+
}
|
|
8
9
|
}
|
package/bin/deploy.sh
CHANGED
|
@@ -14,12 +14,12 @@ rm -rf ../storybook-static
|
|
|
14
14
|
|
|
15
15
|
# Build
|
|
16
16
|
cd ..
|
|
17
|
-
yarn build
|
|
17
|
+
yarn build-storybook
|
|
18
18
|
|
|
19
19
|
# Add CNAME to build
|
|
20
20
|
cd storybook-static
|
|
21
|
-
echo "ws-ui-
|
|
21
|
+
# echo "ws-ui-sb-7.wsvdigital.com.au" > ../storybook-static/CNAME
|
|
22
22
|
|
|
23
23
|
# Deploy to GH-Pages
|
|
24
24
|
cd ..
|
|
25
|
-
node node_modules/gh-pages/bin/gh-pages.js -d storybook-static
|
|
25
|
+
node node_modules/gh-pages/bin/gh-pages.js -d storybook-static -t true
|
|
@@ -4,14 +4,19 @@
|
|
|
4
4
|
# Project: Worksafe Public Website - Front End
|
|
5
5
|
# Description: Build Validation for Pull Requests
|
|
6
6
|
########################################################
|
|
7
|
+
trigger: none
|
|
7
8
|
|
|
9
|
+
pr:
|
|
10
|
+
autoCancel: true
|
|
11
|
+
drafts: false
|
|
12
|
+
branches:
|
|
13
|
+
include:
|
|
14
|
+
- master
|
|
15
|
+
- beta
|
|
16
|
+
|
|
8
17
|
variables:
|
|
9
18
|
- group: Public Websites - Front End
|
|
10
|
-
|
|
11
|
-
repositories:
|
|
12
|
-
- repository: self
|
|
13
|
-
type: git
|
|
14
|
-
ref: refs/heads/beta
|
|
19
|
+
|
|
15
20
|
jobs:
|
|
16
21
|
- job: Build_Test_Dryrun
|
|
17
22
|
displayName: Build - Test - DryRun
|
|
@@ -35,7 +40,7 @@ jobs:
|
|
|
35
40
|
- task: CmdLine@2
|
|
36
41
|
displayName: Build
|
|
37
42
|
inputs:
|
|
38
|
-
script: yarn build
|
|
43
|
+
script: yarn build-storybook
|
|
39
44
|
- task: CmdLine@2
|
|
40
45
|
displayName: Unit Test
|
|
41
46
|
inputs:
|
package/ci/release/beta.yml
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
# Description: Publish beta release to NPM
|
|
6
6
|
#######################################################
|
|
7
7
|
|
|
8
|
+
trigger:
|
|
9
|
+
branches:
|
|
10
|
+
include:
|
|
11
|
+
- beta
|
|
12
|
+
|
|
8
13
|
variables:
|
|
9
14
|
- group: Public Websites - Front End
|
|
10
|
-
|
|
11
|
-
repositories:
|
|
12
|
-
- repository: self
|
|
13
|
-
type: git
|
|
14
|
-
ref: refs/heads/beta
|
|
15
|
+
|
|
15
16
|
stages:
|
|
16
17
|
- stage: publish_npm_beta
|
|
17
18
|
jobs:
|
package/ci/release/master.yml
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
# Description: Publish latest release to NPM
|
|
6
6
|
#######################################################
|
|
7
7
|
|
|
8
|
+
trigger:
|
|
9
|
+
branches:
|
|
10
|
+
include:
|
|
11
|
+
- master
|
|
12
|
+
|
|
8
13
|
variables:
|
|
9
14
|
- group: Public Websites - Front End
|
|
10
|
-
|
|
11
|
-
repositories:
|
|
12
|
-
- repository: self
|
|
13
|
-
type: git
|
|
14
|
-
ref: refs/heads/master
|
|
15
|
+
|
|
15
16
|
stages:
|
|
16
17
|
- stage: publish_npm_beta
|
|
17
18
|
jobs:
|
package/jest.config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
testEnvironment: "jsdom",
|
|
2
3
|
moduleFileExtensions: [
|
|
3
4
|
'js',
|
|
4
5
|
'json',
|
|
@@ -11,10 +12,11 @@ module.exports = {
|
|
|
11
12
|
},
|
|
12
13
|
transform: {
|
|
13
14
|
// process `*.vue` files with `vue-jest`
|
|
14
|
-
'.*\\.(vue)$': 'vue-jest',
|
|
15
|
+
'.*\\.(vue)$': '@vue/vue3-jest',
|
|
15
16
|
'^.+\\.js$': 'babel-jest',
|
|
16
17
|
'.+\\.(svg)$': '<rootDir>/src/mock/jest.svgtransformer.js'
|
|
17
18
|
},
|
|
19
|
+
transformIgnorePatterns: [],
|
|
18
20
|
collectCoverage: true,
|
|
19
21
|
collectCoverageFrom: ['<rootDir>/src/**/*.vue'],
|
|
20
22
|
coverageReporters: ['text-summary', 'html', 'lcov', 'clover']
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worksafevictoria/wcl7.5",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-beta.10",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,14 +20,7 @@
|
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": "^16.16.x"
|
|
25
|
-
},
|
|
26
23
|
"scripts": {
|
|
27
|
-
"dev": "vite",
|
|
28
|
-
"build": "vite build",
|
|
29
|
-
"preview": "vite preview",
|
|
30
|
-
"test:unit": "vitest",
|
|
31
24
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
|
|
32
25
|
"format": "prettier --write src/",
|
|
33
26
|
"storybook": "storybook dev -p 6006",
|
|
@@ -39,7 +32,7 @@
|
|
|
39
32
|
"deploy": "bin/deploy.sh",
|
|
40
33
|
"test": "jest",
|
|
41
34
|
"test:watch": "yarn test --watch",
|
|
42
|
-
"_postinstall": "husky
|
|
35
|
+
"_postinstall": "husky init",
|
|
43
36
|
"prepublishOnly": "pinst --disable",
|
|
44
37
|
"postpublish": "pinst --enable",
|
|
45
38
|
"generate-svgs": "svgpack src/assets/icons/* > src/assets/styles/generated-icons.scss"
|
|
@@ -52,7 +45,9 @@
|
|
|
52
45
|
"bootstrap-vue": "^2.23.1",
|
|
53
46
|
"bootstrap-vue-next": "^0.15.5",
|
|
54
47
|
"date-fns": "^2.30.0",
|
|
48
|
+
"storybook-addon-deep-controls": "^0.6.2",
|
|
55
49
|
"vue": "^3.3.4",
|
|
50
|
+
"vue-google-charts": "^1.1.0",
|
|
56
51
|
"vue-formio": "^4.0.8",
|
|
57
52
|
"vue-scrollto": "^2.20.0"
|
|
58
53
|
},
|
|
@@ -60,6 +55,9 @@
|
|
|
60
55
|
"formiojs": "4.13.13"
|
|
61
56
|
},
|
|
62
57
|
"devDependencies": {
|
|
58
|
+
"@babel/core": "^7.24.6",
|
|
59
|
+
"@babel/plugin-transform-private-property-in-object": "^7.24.6",
|
|
60
|
+
"@babel/preset-env": "^7.24.6",
|
|
63
61
|
"@rushstack/eslint-patch": "^1.3.3",
|
|
64
62
|
"@storybook/addon-a11y": "^7.6.3",
|
|
65
63
|
"@storybook/addon-essentials": "^7.5.1",
|
|
@@ -71,21 +69,30 @@
|
|
|
71
69
|
"@storybook/vue3-vite": "^7.5.1",
|
|
72
70
|
"@vitejs/plugin-vue": "^4.4.0",
|
|
73
71
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
72
|
+
"@vue/vue3-jest": "^29.2.6",
|
|
73
|
+
"@vue/test-utils": "^2.4.6",
|
|
74
|
+
"babel-jest": "^29.2.6",
|
|
75
|
+
"dotenv-webpack": "^8.1.0",
|
|
74
76
|
"eslint": "^8.49.0",
|
|
75
77
|
"eslint-plugin-storybook": "^0.6.15",
|
|
76
78
|
"eslint-plugin-vue": "^9.17.0",
|
|
79
|
+
"gh-pages": "^6.1.1",
|
|
80
|
+
"husky": "^8.0.3",
|
|
77
81
|
"jest": "^29.7.0",
|
|
82
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
78
83
|
"jsdom": "^22.1.0",
|
|
79
84
|
"prettier": "^3.0.3",
|
|
80
85
|
"react": "^18.2.0",
|
|
81
86
|
"react-dom": "^18.2.0",
|
|
82
87
|
"sass": "^1.69.5",
|
|
83
88
|
"sass-loader": "^13.3.2",
|
|
89
|
+
"semantic-release": "^19.0.3",
|
|
84
90
|
"storybook": "^7.5.1",
|
|
85
91
|
"stylelint": "^15.11.0",
|
|
86
92
|
"stylelint-config-recommended": "^13.0.0",
|
|
87
93
|
"stylelint-config-standard": "^34.0.0",
|
|
88
94
|
"stylelint-scss": "^5.3.0",
|
|
95
|
+
"vue-jest": "^3.0.7",
|
|
89
96
|
"vite": "^4.4.11",
|
|
90
97
|
"vite-svg-loader": "^5.1.0",
|
|
91
98
|
"vitest": "^0.34.6"
|
package/public/.nojekyll
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
From Public
|
|
@@ -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)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Cookies from './index.vue'
|
|
2
|
+
|
|
2
3
|
const defaultValue = {
|
|
3
4
|
header: 'field_cookie_heading',
|
|
4
5
|
content: {
|
|
@@ -24,22 +25,10 @@ const defaultValue = {
|
|
|
24
25
|
export default {
|
|
25
26
|
title: 'Global/Cookies',
|
|
26
27
|
component: Cookies,
|
|
27
|
-
|
|
28
|
-
cookieHeader:
|
|
29
|
-
|
|
30
|
-
defaultValue: 'Accept and Reject Cookies'
|
|
31
|
-
},
|
|
32
|
-
cookieContent: {
|
|
33
|
-
control: 'object',
|
|
34
|
-
defaultValue: defaultValue
|
|
28
|
+
args: {
|
|
29
|
+
cookieHeader: 'Accept and Reject Cookies',
|
|
30
|
+
cookieContent: defaultValue
|
|
35
31
|
}
|
|
36
32
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const DefaultCookies = (args, { argTypes }) => ({
|
|
40
|
-
components: { Cookies },
|
|
41
|
-
props: Object.keys(argTypes),
|
|
42
|
-
template: '<cookies v-bind="$props" />'
|
|
43
|
-
})
|
|
44
33
|
|
|
45
|
-
export const Default =
|
|
34
|
+
export const Default = {}
|