@worksafevictoria/wcl7.5 1.0.0
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/.editorconfig +13 -0
- package/.env +4 -0
- package/.eslintrc.cjs +10 -0
- package/.eslintrc.js +25 -0
- package/.husky/commit-msg +4 -0
- package/.prettierrc +5 -0
- package/.prettierrc.json +8 -0
- package/.storybook/main.js +18 -0
- package/.storybook/preview.js +34 -0
- package/LICENSE +21 -0
- package/README.md +159 -0
- package/babel.config.js +8 -0
- package/bin/clean.sh +52 -0
- package/bin/deploy.sh +25 -0
- package/ci/build/Build_Validation.md +35 -0
- package/ci/build/build_validation.yml +47 -0
- package/ci/release/Release_Beta.md +39 -0
- package/ci/release/Release_Master.md +29 -0
- package/ci/release/beta.yml +69 -0
- package/ci/release/master.yml +39 -0
- package/commitlint.config.js +1 -0
- package/index.html +13 -0
- package/jest.config.js +21 -0
- package/lib/detect-browser.js +33 -0
- package/lib/utility.js +59 -0
- package/lib/utility.test.js +15 -0
- package/package.json +93 -0
- package/public/favicon.ico +0 -0
- package/src/assets/base.css +86 -0
- package/src/assets/fonts/VIC-Bold.eot +0 -0
- package/src/assets/fonts/VIC-Bold.ttf +0 -0
- package/src/assets/fonts/VIC-Bold.woff +0 -0
- package/src/assets/fonts/VIC-Bold.woff2 +0 -0
- package/src/assets/fonts/VIC-BoldItalic.eot +0 -0
- package/src/assets/fonts/VIC-BoldItalic.ttf +0 -0
- package/src/assets/fonts/VIC-BoldItalic.woff +0 -0
- package/src/assets/fonts/VIC-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-ExtraLight.eot +0 -0
- package/src/assets/fonts/VIC-ExtraLight.ttf +0 -0
- package/src/assets/fonts/VIC-ExtraLight.woff +0 -0
- package/src/assets/fonts/VIC-ExtraLight.woff2 +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.eot +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.ttf +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.woff +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-Italic.eot +0 -0
- package/src/assets/fonts/VIC-Italic.ttf +0 -0
- package/src/assets/fonts/VIC-Italic.woff +0 -0
- package/src/assets/fonts/VIC-Italic.woff2 +0 -0
- package/src/assets/fonts/VIC-Light.eot +0 -0
- package/src/assets/fonts/VIC-Light.ttf +0 -0
- package/src/assets/fonts/VIC-Light.woff +0 -0
- package/src/assets/fonts/VIC-Light.woff2 +0 -0
- package/src/assets/fonts/VIC-LightItalic.eot +0 -0
- package/src/assets/fonts/VIC-LightItalic.ttf +0 -0
- package/src/assets/fonts/VIC-LightItalic.woff +0 -0
- package/src/assets/fonts/VIC-LightItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-Medium.eot +0 -0
- package/src/assets/fonts/VIC-Medium.ttf +0 -0
- package/src/assets/fonts/VIC-Medium.woff +0 -0
- package/src/assets/fonts/VIC-Medium.woff2 +0 -0
- package/src/assets/fonts/VIC-MediumItalic.eot +0 -0
- package/src/assets/fonts/VIC-MediumItalic.ttf +0 -0
- package/src/assets/fonts/VIC-MediumItalic.woff +0 -0
- package/src/assets/fonts/VIC-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-Regular.eot +0 -0
- package/src/assets/fonts/VIC-Regular.ttf +0 -0
- package/src/assets/fonts/VIC-Regular.woff +0 -0
- package/src/assets/fonts/VIC-Regular.woff2 +0 -0
- package/src/assets/fonts/VIC-SemiBold.eot +0 -0
- package/src/assets/fonts/VIC-SemiBold.ttf +0 -0
- package/src/assets/fonts/VIC-SemiBold.woff +0 -0
- package/src/assets/fonts/VIC-SemiBold.woff2 +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.eot +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.woff +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.woff2 +0 -0
- package/src/assets/icons/AppFooter/australian-aboriginal-flag.svg +7 -0
- package/src/assets/icons/AppFooter/facebook-ws-footer.svg +58 -0
- package/src/assets/icons/AppFooter/facebook-ww-footer.svg +59 -0
- package/src/assets/icons/AppFooter/instagram-ww-footer.svg +70 -0
- package/src/assets/icons/AppFooter/linkedin-ws-footer.svg +59 -0
- package/src/assets/icons/AppFooter/linkedin-ww-footer.svg +60 -0
- package/src/assets/icons/AppFooter/logo-workwell-reversed.svg +45 -0
- package/src/assets/icons/AppFooter/pride-flag.svg +12 -0
- package/src/assets/icons/AppFooter/torres-strait-islanders-flag.svg +9 -0
- package/src/assets/icons/AppFooter/twitter-ws-footer.svg +58 -0
- package/src/assets/icons/AppFooter/twitter-ww-footer.svg +59 -0
- package/src/assets/icons/AppFooter/worksafe-footer-logo.svg +9 -0
- package/src/assets/icons/AppFooter/youtube-ws-footer.svg +55 -0
- package/src/assets/icons/AppFooter/youtube-ww-footer.svg +56 -0
- package/src/assets/icons/AppHeader/chev-down-16.svg +17 -0
- package/src/assets/icons/AppHeader/chev-left-24px.svg +13 -0
- package/src/assets/icons/AppHeader/chev-right-16px.svg +25 -0
- package/src/assets/icons/AppHeader/chev-right-24px.svg +13 -0
- package/src/assets/icons/AppHeader/close-32px.svg +15 -0
- package/src/assets/icons/AppHeader/menu-32px.svg +20 -0
- package/src/assets/icons/AppHeader/search-32px.svg +19 -0
- package/src/assets/icons/Email-circle-black.svg +4 -0
- package/src/assets/icons/Info-circle-fill.svg +10 -0
- package/src/assets/icons/Phone-circle-black.svg +4 -0
- package/src/assets/icons/SocialShare/bookmark-white.svg +3 -0
- package/src/assets/icons/SocialShare/bookmark-ww-footer.svg +57 -0
- package/src/assets/icons/SocialShare/bookmark.svg +56 -0
- package/src/assets/icons/SocialShare/email-white.svg +3 -0
- package/src/assets/icons/SocialShare/facebook-white.svg +3 -0
- package/src/assets/icons/SocialShare/facebook-ws-footer.svg +58 -0
- package/src/assets/icons/SocialShare/facebook-ww-footer.svg +59 -0
- package/src/assets/icons/SocialShare/facebook.svg +1 -0
- package/src/assets/icons/SocialShare/office-file-pdf.svg +1 -0
- package/src/assets/icons/SocialShare/print.svg +3 -0
- package/src/assets/icons/SocialShare/twitter-white.svg +3 -0
- package/src/assets/icons/SocialShare/twitter-ws-footer.svg +58 -0
- package/src/assets/icons/SocialShare/twitter-ww-footer.svg +59 -0
- package/src/assets/icons/SocialShare/twitter.svg +1 -0
- package/src/assets/icons/Strip/AlertDismiss.svg +4 -0
- package/src/assets/icons/Strip/Arrow right.svg +4 -0
- package/src/assets/icons/Strip/Chevron right.svg +3 -0
- package/src/assets/icons/Strip/Dismiss.svg +4 -0
- package/src/assets/icons/Strip/Exclamation triangle fill.svg +8 -0
- package/src/assets/icons/Strip/Info circle fill.svg +15 -0
- package/src/assets/icons/Strip/Information.svg +15 -0
- package/src/assets/icons/Strip/Warning.svg +8 -0
- package/src/assets/icons/arrow-left.svg +9 -0
- package/src/assets/icons/arrow-right.svg +9 -0
- package/src/assets/icons/bookmark.svg +56 -0
- package/src/assets/icons/brand-VicStateGov-logo-reversed.svg +72 -0
- package/src/assets/icons/bullet-empty.svg +3 -0
- package/src/assets/icons/bullet.svg +3 -0
- package/src/assets/icons/caret-down.svg +1 -0
- package/src/assets/icons/caret-left.svg +9 -0
- package/src/assets/icons/caret-right.svg +9 -0
- package/src/assets/icons/caret-up.svg +1 -0
- package/src/assets/icons/chev-down-white.svg +3 -0
- package/src/assets/icons/chev-down.svg +3 -0
- package/src/assets/icons/chev-left.svg +3 -0
- package/src/assets/icons/chev-right.svg +3 -0
- package/src/assets/icons/chev-up.svg +3 -0
- package/src/assets/icons/clock.svg +3 -0
- package/src/assets/icons/close.svg +1 -0
- package/src/assets/icons/cross.svg +3 -0
- package/src/assets/icons/document.svg +1 -0
- package/src/assets/icons/earth.svg +1 -0
- package/src/assets/icons/email.svg +6 -0
- package/src/assets/icons/external-link-16px.svg +18 -0
- package/src/assets/icons/external-link.svg +4 -0
- package/src/assets/icons/icon-close.svg +15 -0
- package/src/assets/icons/instagram.svg +3 -0
- package/src/assets/icons/key.svg +3 -0
- package/src/assets/icons/location.svg +10 -0
- package/src/assets/icons/phone.svg +3 -0
- package/src/assets/icons/refresh.svg +3 -0
- package/src/assets/icons/right-arrow.svg +3 -0
- package/src/assets/icons/search.svg +5 -0
- package/src/assets/icons/tick.svg +3 -0
- package/src/assets/icons/video-play.svg +4 -0
- package/src/assets/images/hero-header-chevron.svg +9 -0
- package/src/assets/images/hero-header-mask.png +0 -0
- package/src/assets/images/hero-header-mask.svg +3 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +35 -0
- package/src/assets/styles/button.scss +206 -0
- package/src/assets/styles/focus.scss +4 -0
- package/src/assets/styles/generated-icons.scss +374 -0
- package/src/assets/styles/modal.scss +12 -0
- package/src/assets/styles/rtl.scss +8 -0
- package/src/assets/styles/storybook.scss +9 -0
- package/src/assets/styles/stylesheet.scss +7 -0
- package/src/assets/styles/webfonts.css +155 -0
- package/src/components/Common/CardGrid/cardgrid.stories.js +269 -0
- package/src/components/Common/CardGrid/index.vue +321 -0
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +164 -0
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +163 -0
- package/src/components/Common/CardGridItem/index.vue +848 -0
- package/src/components/Common/FilterButton/index.vue +93 -0
- package/src/components/Containers/Column/index.stories.js +35 -0
- package/src/components/Containers/Column/index.vue +14 -0
- package/src/components/Containers/Container/index.stories.js +13 -0
- package/src/components/Containers/Container/index.vue +15 -0
- package/src/components/Containers/HomepageHeader/index.stories.js +78 -0
- package/src/components/Containers/HomepageHeader/index.vue +186 -0
- package/src/components/Containers/Row/index.stories.js +12 -0
- package/src/components/Containers/Row/index.vue +14 -0
- package/src/components/Containers/SectionGroup/index.stories.js +148 -0
- package/src/components/Containers/SectionGroup/index.vue +310 -0
- package/src/components/Containers/Subheader/index.stories.js +74 -0
- package/src/components/Containers/Subheader/index.vue +149 -0
- package/src/components/Global/AlertStrip/index.stories.js +13 -0
- package/src/components/Global/AlertStrip/index.vue +145 -0
- package/src/components/Global/AlertStrip/styles.scss +78 -0
- package/src/components/Global/AppFooter/FooterSocialShare/index.vue +105 -0
- package/src/components/Global/AppFooter/FooterSocialShare/styles.scss +41 -0
- package/src/components/Global/AppFooter/index.stories.js +24 -0
- package/src/components/Global/AppFooter/index.vue +632 -0
- package/src/components/Global/AppFooter/storiesConst.js +110 -0
- package/src/components/Global/AppFooter/styles.scss +393 -0
- package/src/components/Global/AppHeader/ModalSearch/index.vue +66 -0
- package/src/components/Global/AppHeader/ModalSearch/styles.scss +43 -0
- package/src/components/Global/AppHeader/includes.scss +68 -0
- package/src/components/Global/AppHeader/index.stories.js +82 -0
- package/src/components/Global/AppHeader/index.vue +878 -0
- package/src/components/Global/AppHeader/mobile.scss +240 -0
- package/src/components/Global/AppHeader/styles.scss +371 -0
- package/src/components/Global/BackToTop/index.stories.js +18 -0
- package/src/components/Global/BackToTop/index.vue +67 -0
- package/src/components/Global/BackToTop/styles.scss +46 -0
- package/src/components/Global/ContrastMode/index.stories.js +39 -0
- package/src/components/Global/ContrastMode/index.vue +308 -0
- package/src/components/Global/Cookies/Constants.js +72 -0
- package/src/components/Global/Cookies/index.storieshide.js +45 -0
- package/src/components/Global/Cookies/index.vue +453 -0
- package/src/components/Global/Cookies/styles.scss +259 -0
- package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +196 -0
- package/src/components/Global/DirectoryFilters/index.vue +176 -0
- package/src/components/Global/GlobalNotice/index.vue +266 -0
- package/src/components/Global/HeroHeader/index.stories.js +93 -0
- package/src/components/Global/HeroHeader/index.vue +343 -0
- package/src/components/Global/HeroHeader/styles.scss +480 -0
- package/src/components/Global/ProgressBar/index.stories.js +51 -0
- package/src/components/Global/ProgressBar/index.vue +58 -0
- package/src/components/Global/ProgressBar/styles.scss +116 -0
- package/src/components/Global/SocialShare/index.stories.js +18 -0
- package/src/components/Global/SocialShare/index.vue +318 -0
- package/src/components/Global/Strip/index.stories.js +70 -0
- package/src/components/Global/Strip/index.vue +357 -0
- package/src/components/HelloWorld.vue +44 -0
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +232 -0
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +274 -0
- package/src/components/Paragraphs/Accordion/index.stories.js +84 -0
- package/src/components/Paragraphs/Accordion/index.vue +202 -0
- package/src/components/Paragraphs/Breakout/index.stories.js +39 -0
- package/src/components/Paragraphs/Breakout/index.vue +115 -0
- package/src/components/Paragraphs/BrowseContent/index.stories.js +220 -0
- package/src/components/Paragraphs/BrowseContent/index.vue +298 -0
- package/src/components/Paragraphs/BrowseContent/switcher.vue +63 -0
- package/src/components/Paragraphs/Calculator/CardContainer/index.vue +278 -0
- package/src/components/Paragraphs/Calculator/CardContainer/styles.scss +152 -0
- package/src/components/Paragraphs/Calculator/Constants.js +246 -0
- package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +124 -0
- package/src/components/Paragraphs/Calculator/RiskLevel/styles.scss +73 -0
- package/src/components/Paragraphs/Calculator/index.stories.js +27 -0
- package/src/components/Paragraphs/Calculator/index.vue +284 -0
- package/src/components/Paragraphs/Calculator/styles.scss +49 -0
- package/src/components/Paragraphs/Directory/Records/CJ/index.vue +59 -0
- package/src/components/Paragraphs/Directory/Records/ISP/distance.js +46 -0
- package/src/components/Paragraphs/Directory/Records/ISP/index.vue +88 -0
- package/src/components/Paragraphs/Directory/Records/PRS/index.vue +59 -0
- package/src/components/Paragraphs/Directory/Records/PRS/recordContent.vue +91 -0
- package/src/components/Paragraphs/Directory/Records/PRS/recordDetails.vue +49 -0
- package/src/components/Paragraphs/Directory/Records/index.vue +203 -0
- package/src/components/Paragraphs/Directory/Records/styles.scss +129 -0
- package/src/components/Paragraphs/Directory/constants.js +79 -0
- package/src/components/Paragraphs/Directory/index.vue +334 -0
- package/src/components/Paragraphs/ListGroup/Constants.js +72 -0
- package/src/components/Paragraphs/ListGroup/Link/list-link.stories.js +71 -0
- package/src/components/Paragraphs/ListGroup/index.vue +333 -0
- package/src/components/Paragraphs/ListGroup/list-group.stories.js +64 -0
- package/src/components/Paragraphs/ListGroup/navigation-card.stories.js +66 -0
- package/src/components/Paragraphs/MarketingBanner/index.stories.js +65 -0
- package/src/components/Paragraphs/MarketingBanner/index.vue +118 -0
- package/src/components/Paragraphs/MarketingBanner/styles.scss +87 -0
- package/src/components/Paragraphs/ProofPoints/index.stories.js +173 -0
- package/src/components/Paragraphs/ProofPoints/index.vue +64 -0
- package/src/components/Paragraphs/RelatedInformation/index.stories.js +32 -0
- package/src/components/Paragraphs/RelatedInformation/index.vue +62 -0
- package/src/components/Paragraphs/RelatedInformation/styles.scss +50 -0
- package/src/components/Paragraphs/RichText/index.stories.js +393 -0
- package/src/components/Paragraphs/RichText/index.vue +113 -0
- package/src/components/Paragraphs/RichText/scss/base.scss +355 -0
- package/src/components/Paragraphs/RichText/scss/definition-list.scss +35 -0
- package/src/components/Paragraphs/RichText/scss/styled-list.scss +152 -0
- package/src/components/Paragraphs/RichText/scss/table.scss +85 -0
- package/src/components/Paragraphs/ScrollSpy/index.stories.js +184 -0
- package/src/components/Paragraphs/ScrollSpy/index.vue +147 -0
- package/src/components/Paragraphs/SelectableCards/Control/index.stories.js +29 -0
- package/src/components/Paragraphs/SelectableCards/cardbody.vue +25 -0
- package/src/components/Paragraphs/SelectableCards/cardtop.vue +113 -0
- package/src/components/Paragraphs/SelectableCards/index.stories.js +27 -0
- package/src/components/Paragraphs/SelectableCards/index.vue +116 -0
- package/src/components/Paragraphs/Statistics/index.stories.js +106 -0
- package/src/components/Paragraphs/Statistics/index.vue +95 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/cake-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/commute-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/fire_extinguisher-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/free_breakfast-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/portrait-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/storefront-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/tag_faces-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/index.stories.js +36 -0
- package/src/components/Paragraphs/TabbedCards/index.vue +393 -0
- package/src/components/Paragraphs/Tabs/index.stories.js +60 -0
- package/src/components/Paragraphs/Tabs/index.vue +127 -0
- package/src/components/Paragraphs/Tabs/styles.scss +150 -0
- package/src/components/Paragraphs/TabulatedData/Constants.js +158 -0
- package/src/components/Paragraphs/TabulatedData/index.stories.js +39 -0
- package/src/components/Paragraphs/TabulatedData/index.vue +145 -0
- package/src/components/Paragraphs/TaskFinder/index.stories.js +45 -0
- package/src/components/Paragraphs/TaskFinder/index.vue +192 -0
- package/src/components/Paragraphs/TaskFinder/pdf/index.vue +109 -0
- package/src/components/Paragraphs/TaskFinder/task-finder-column.vue +146 -0
- package/src/components/Paragraphs/TextMedia/MediaTypes/Image/index.vue +24 -0
- package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +29 -0
- package/src/components/Paragraphs/TextMedia/index.stories.js +94 -0
- package/src/components/Paragraphs/TextMedia/index.vue +150 -0
- package/src/components/Paragraphs/VideoGrid/index.stories.js +167 -0
- package/src/components/Paragraphs/VideoGrid/index.vue +124 -0
- package/src/components/Paragraphs/VideoPlayer/index.stories.js +95 -0
- package/src/components/Paragraphs/VideoPlayer/index.vue +110 -0
- package/src/components/Paragraphs/Webform/index.stories.js +70 -0
- package/src/components/Paragraphs/Webform/index.vue +103 -0
- package/src/components/SubComponents/Breadcrumb/constants.js +15 -0
- package/src/components/SubComponents/Breadcrumb/index.stories.js +22 -0
- package/src/components/SubComponents/Breadcrumb/index.vue +91 -0
- package/src/components/SubComponents/CardGroup/cardbody.vue +109 -0
- package/src/components/SubComponents/CardGroup/cardtop.vue +106 -0
- package/src/components/SubComponents/CardGroup/index.stories.js +145 -0
- package/src/components/SubComponents/CardGroup/index.vue +297 -0
- package/src/components/SubComponents/CtaButton/index.stories.js +357 -0
- package/src/components/SubComponents/CtaButton/index.vue +256 -0
- package/src/components/SubComponents/FormAddressPostcode/index.stories.js +43 -0
- package/src/components/SubComponents/FormAddressPostcode/index.vue +314 -0
- package/src/components/SubComponents/FormInstance/index.stories.js +8 -0
- package/src/components/SubComponents/FormInstance/index.vue +12 -0
- package/src/components/SubComponents/GoogleSearch/index.stories.js +8 -0
- package/src/components/SubComponents/GoogleSearch/index.vue +405 -0
- package/src/components/SubComponents/Icon/README.md +40 -0
- package/src/components/SubComponents/Icon/example.js +41 -0
- package/src/components/SubComponents/Icon/index.stories.js +84 -0
- package/src/components/SubComponents/Icon/index.vue +127 -0
- package/src/components/SubComponents/Icon/styles.scss +38 -0
- package/src/components/SubComponents/Loading/index.stories.js +9 -0
- package/src/components/SubComponents/Loading/index.vue +15 -0
- package/src/components/SubComponents/MediaPlayer/index.stories.js +58 -0
- package/src/components/SubComponents/MediaPlayer/index.vue +69 -0
- package/src/components/SubComponents/Pagination/index.stories.js +119 -0
- package/src/components/SubComponents/Pagination/index.vue +184 -0
- package/src/components/SubComponents/Pagination/pagination.js +58 -0
- package/src/components/SubComponents/ResourceGroup/List/index.stories.js +268 -0
- package/src/components/SubComponents/ResourceGroup/cardbody.vue +221 -0
- package/src/components/SubComponents/ResourceGroup/cardfooter.vue +61 -0
- package/src/components/SubComponents/ResourceGroup/cardtop.vue +94 -0
- package/src/components/SubComponents/ResourceGroup/index.stories.js +268 -0
- package/src/components/SubComponents/ResourceGroup/index.vue +575 -0
- package/src/components/SubComponents/ResourceGroup/styles.scss +317 -0
- package/src/components/SubComponents/ResourceGroup/switcher.vue +63 -0
- package/src/components/SubComponents/Search/SearchListing/index.vue +217 -0
- package/src/components/SubComponents/Search/index.stories.js +43 -0
- package/src/components/SubComponents/Search/index.vue +238 -0
- package/src/components/SubComponents/SingleImage/index.stories.js +60 -0
- package/src/components/SubComponents/SingleImage/index.vue +98 -0
- package/src/components/SubComponents/VideoThumbnail/index.stories.js +41 -0
- package/src/components/SubComponents/VideoThumbnail/index.vue +239 -0
- package/src/components/TheWelcome.vue +88 -0
- package/src/components/WelcomeItem.vue +87 -0
- package/src/components/icons/IconCommunity.vue +7 -0
- package/src/components/icons/IconDocumentation.vue +7 -0
- package/src/components/icons/IconEcosystem.vue +7 -0
- package/src/components/icons/IconSupport.vue +7 -0
- package/src/components/icons/IconTooling.vue +19 -0
- package/src/includes/scss/all.scss +2 -0
- package/src/includes/scss/mixins/all.scss +6 -0
- package/src/includes/scss/mixins/src/focus.scss +38 -0
- package/src/includes/scss/mixins/src/fp.scss +31 -0
- package/src/includes/scss/mixins/src/grid.scss +125 -0
- package/src/includes/scss/mixins/src/mq.scss +30 -0
- package/src/includes/scss/mixins/src/rtl.scss +8 -0
- package/src/includes/scss/mixins/src/units.scss +110 -0
- package/src/includes/scss/vars/all.scss +2 -0
- package/src/includes/scss/vars/src/breakpoints.scss +20 -0
- package/src/includes/scss/vars/src/colors.module.scss +53 -0
- package/src/includes/scss/vars/src/colors.scss +53 -0
- package/src/index.js +116 -0
- package/src/main.js +18 -0
- package/src/mock/accordion.js +104 -0
- package/src/mock/app-header.js +683 -0
- package/src/mock/control-selectable-cards.js +58 -0
- package/src/mock/jest.svgtransformer.js +7 -0
- package/src/mock/list-group.js +46 -0
- package/src/mock/proof-points.js +55 -0
- package/src/mock/related-info.js +44 -0
- package/src/mock/selectable-cards.js +48 -0
- package/src/mock/statistics.js +63 -0
- package/src/mock/styleMock.js +1 -0
- package/src/mock/tabbed-cards.js +197 -0
- package/src/mock/task-finder.js +68 -0
- package/src/mock/video-grid.js +409 -0
- package/src/mock/video-media.js +51 -0
- package/src/public/places/api/v1/geocode/json +69 -0
- package/src/public/places/api/v1/place/autocomplete/json +226 -0
- package/stylelint.config.js +63 -0
- package/vite.config.js +19 -0
- package/vitest.config.js +14 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<footer v-if="footerMenu" class="app-footer">
|
|
3
|
+
<div
|
|
4
|
+
v-if="changedDate"
|
|
5
|
+
id="feedbackQuery"
|
|
6
|
+
class="app-footer__page-info"
|
|
7
|
+
:class="{ 'app-footer__page-info--workwell': isWorkwell }"
|
|
8
|
+
>
|
|
9
|
+
<container>
|
|
10
|
+
<row>
|
|
11
|
+
<column>
|
|
12
|
+
<div class="mobilescreen">Reviewed on {{ updateDate }}</div>
|
|
13
|
+
<div v-if="!submitted">
|
|
14
|
+
<div style="margin-right:10px; display:inline">
|
|
15
|
+
<strong>Was this page helpful?</strong>
|
|
16
|
+
</div>
|
|
17
|
+
<input
|
|
18
|
+
id="frYes"
|
|
19
|
+
type="radio"
|
|
20
|
+
:aria-checked="isSet('Yes') ? 'true' : 'false'"
|
|
21
|
+
role="radio"
|
|
22
|
+
name="feedback-radio"
|
|
23
|
+
value="Yes"
|
|
24
|
+
@change="setResponse($event)"
|
|
25
|
+
/>
|
|
26
|
+
<label for="frYes" class="option">Yes</label>
|
|
27
|
+
<input
|
|
28
|
+
id="frNo"
|
|
29
|
+
type="radio"
|
|
30
|
+
:aria-checked="isSet('No') ? 'true' : 'false'"
|
|
31
|
+
role="radio"
|
|
32
|
+
name="feedback-radio"
|
|
33
|
+
value="No"
|
|
34
|
+
@change="setResponse($event)"
|
|
35
|
+
/>
|
|
36
|
+
<label for="frNo" class="option">No</label>
|
|
37
|
+
</div>
|
|
38
|
+
<div v-if="submitted">
|
|
39
|
+
<img class="feedback-tick" alt="" :src="Tick" />Thank you for your
|
|
40
|
+
feedback
|
|
41
|
+
</div>
|
|
42
|
+
</column>
|
|
43
|
+
<column
|
|
44
|
+
class="app-footer__page-info__reviewed-date fullscreen"
|
|
45
|
+
:xs="6"
|
|
46
|
+
>Reviewed on {{ updateDate }}</column
|
|
47
|
+
>
|
|
48
|
+
</row>
|
|
49
|
+
</container>
|
|
50
|
+
</div>
|
|
51
|
+
<div v-if="showForm" class="app-footer__feedback-form">
|
|
52
|
+
<container>
|
|
53
|
+
<row>
|
|
54
|
+
<column>
|
|
55
|
+
<div class="app-footer__feedback-form__feedback-content">
|
|
56
|
+
<div>
|
|
57
|
+
<div class="fullscreen">
|
|
58
|
+
<h4>Tell us more (optional)</h4>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="mobilescreen">
|
|
61
|
+
<strong>Tell us more (optional)</strong>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
We are unable to respond to questions via this form. If you
|
|
65
|
+
have a question and would like to receive a reply, please use
|
|
66
|
+
one of the
|
|
67
|
+
<a
|
|
68
|
+
class="feedback-link"
|
|
69
|
+
href="https://www.worksafe.vic.gov.au/contact-worksafe"
|
|
70
|
+
>contact options</a
|
|
71
|
+
>.
|
|
72
|
+
</div>
|
|
73
|
+
<textarea
|
|
74
|
+
id="feedbackMessage"
|
|
75
|
+
v-model="response.message"
|
|
76
|
+
class="feedback-textarea"
|
|
77
|
+
></textarea>
|
|
78
|
+
<div class="feedback-buttons">
|
|
79
|
+
<button
|
|
80
|
+
id="cancelBtn"
|
|
81
|
+
role="button"
|
|
82
|
+
class="feedback-buttons feedback-cancel"
|
|
83
|
+
aria-label="Cancel feedback"
|
|
84
|
+
@click="cancelFeedback()"
|
|
85
|
+
>
|
|
86
|
+
Cancel
|
|
87
|
+
</button>
|
|
88
|
+
<cta-button
|
|
89
|
+
style="float:right;"
|
|
90
|
+
:url="''"
|
|
91
|
+
:rtl="rtl"
|
|
92
|
+
@clicked="submitFeedback()"
|
|
93
|
+
>Submit</cta-button
|
|
94
|
+
>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</column>
|
|
99
|
+
</row>
|
|
100
|
+
</container>
|
|
101
|
+
</div>
|
|
102
|
+
<div
|
|
103
|
+
class="app-footer__main"
|
|
104
|
+
:class="{ 'app-footer__main--workwell': isWorkwell }"
|
|
105
|
+
>
|
|
106
|
+
<container>
|
|
107
|
+
<row valign="center" class="app-footer__main__social-share">
|
|
108
|
+
<column :xs="12" :sm="2"
|
|
109
|
+
><img
|
|
110
|
+
height="48"
|
|
111
|
+
:width="isWorkwell ? 99 : 101"
|
|
112
|
+
:src="isWorkwell ? WorkWellLogo : WorkSafeLogo"
|
|
113
|
+
:alt="
|
|
114
|
+
!isWorkwell
|
|
115
|
+
? 'Work Safe Victoria - Logo'
|
|
116
|
+
: 'Work Well Victoria - Logo'
|
|
117
|
+
"
|
|
118
|
+
/></column>
|
|
119
|
+
<column :xs="12" :sm="10">
|
|
120
|
+
<footer-social-share :is-workwell="isWorkwell" />
|
|
121
|
+
</column>
|
|
122
|
+
</row>
|
|
123
|
+
<row class="app-footer__main__menu">
|
|
124
|
+
<column
|
|
125
|
+
v-for="(menuItem, index) in menu"
|
|
126
|
+
:key="index"
|
|
127
|
+
:md="3"
|
|
128
|
+
:xs="12"
|
|
129
|
+
class="app-footer-menu"
|
|
130
|
+
>
|
|
131
|
+
<ul>
|
|
132
|
+
<li
|
|
133
|
+
class="app-footer-menu__title"
|
|
134
|
+
@click="handleMenuItemClick(menu, index)"
|
|
135
|
+
@keyup="handleMenuItemKeyup(menu, index, $event)"
|
|
136
|
+
>
|
|
137
|
+
<img
|
|
138
|
+
v-show="!menuItem.isOpen"
|
|
139
|
+
:src="CaretDown"
|
|
140
|
+
height="12"
|
|
141
|
+
width="17"
|
|
142
|
+
class="app-footer-menu__title__caret"
|
|
143
|
+
alt=""
|
|
144
|
+
/>
|
|
145
|
+
<img
|
|
146
|
+
v-show="menuItem.isOpen"
|
|
147
|
+
:src="CaretUp"
|
|
148
|
+
height="12"
|
|
149
|
+
width="17"
|
|
150
|
+
class="app-footer-menu__title__caret"
|
|
151
|
+
alt=""
|
|
152
|
+
/>
|
|
153
|
+
|
|
154
|
+
<a
|
|
155
|
+
v-if="menuItem.absolute === menuItem.relative"
|
|
156
|
+
:role="!menuItem.absolute ? 'button' : false"
|
|
157
|
+
:href="menuItem.absolute"
|
|
158
|
+
class="app-footer-menu__title--link dark"
|
|
159
|
+
:class="!menuItem.absolute ? 'nolink' : false"
|
|
160
|
+
target="_blank"
|
|
161
|
+
:aria-expanded="
|
|
162
|
+
isMobile ? (menuItem.isOpen ? 'true' : 'false') : false
|
|
163
|
+
"
|
|
164
|
+
@click.prevent="handleAbsoluteClick(menuItem)"
|
|
165
|
+
><h2>{{ menuItem.title }}</h2>
|
|
166
|
+
</a>
|
|
167
|
+
<nuxt-link
|
|
168
|
+
v-else
|
|
169
|
+
:to="menuItem.relative"
|
|
170
|
+
class="app-footer-menu__title--link dark"
|
|
171
|
+
>
|
|
172
|
+
<h2>{{ menuItem.title }}</h2>
|
|
173
|
+
</nuxt-link>
|
|
174
|
+
<ul
|
|
175
|
+
v-if="menuItem.below"
|
|
176
|
+
class="submenu"
|
|
177
|
+
:class="menuItem.isOpen ? 'isOpen' : false"
|
|
178
|
+
>
|
|
179
|
+
<li
|
|
180
|
+
v-for="(subItem, subIndex) in menuItem.below"
|
|
181
|
+
:key="subIndex"
|
|
182
|
+
class="app-footer-menu__item"
|
|
183
|
+
:class="{
|
|
184
|
+
'app-footer-menu__item--hide': !menuItem.isOpen
|
|
185
|
+
}"
|
|
186
|
+
>
|
|
187
|
+
<a
|
|
188
|
+
v-if="subItem.absolute === subItem.relative"
|
|
189
|
+
:href="subItem.absolute"
|
|
190
|
+
target="_blank"
|
|
191
|
+
class="app-footer-menu__item--link dark"
|
|
192
|
+
@click.prevent="handleAbsoluteClick(subItem)"
|
|
193
|
+
>{{ subItem.title
|
|
194
|
+
}}<img
|
|
195
|
+
:src="ExternalLink"
|
|
196
|
+
height="12"
|
|
197
|
+
width="12"
|
|
198
|
+
class="app-footer-menu__item--icon"
|
|
199
|
+
alt="external link"
|
|
200
|
+
/>
|
|
201
|
+
</a>
|
|
202
|
+
<nuxt-link
|
|
203
|
+
v-else
|
|
204
|
+
:to="subItem.relative"
|
|
205
|
+
class="app-footer-menu__item--link dark"
|
|
206
|
+
>
|
|
207
|
+
{{ subItem.title }}
|
|
208
|
+
</nuxt-link>
|
|
209
|
+
</li>
|
|
210
|
+
</ul>
|
|
211
|
+
</li>
|
|
212
|
+
</ul>
|
|
213
|
+
</column>
|
|
214
|
+
<column :md="3" :xs="12" class="app-footer-menu"
|
|
215
|
+
><ul>
|
|
216
|
+
<li
|
|
217
|
+
class="app-footer-menu__title"
|
|
218
|
+
@click="handleContactItemClick(menu)"
|
|
219
|
+
@keyup="handleContactItemKeyup(menu, $event)"
|
|
220
|
+
>
|
|
221
|
+
<a
|
|
222
|
+
:aria-expanded="
|
|
223
|
+
isMobile ? (contactMenuIsOpen ? 'true' : 'false') : false
|
|
224
|
+
"
|
|
225
|
+
role="button"
|
|
226
|
+
class="app-footer-menu__title--link dark nolink"
|
|
227
|
+
><h2>Contact</h2></a
|
|
228
|
+
>
|
|
229
|
+
<img
|
|
230
|
+
v-show="!contactMenuIsOpen"
|
|
231
|
+
:src="CaretDown"
|
|
232
|
+
height="12"
|
|
233
|
+
width="17"
|
|
234
|
+
class="app-footer-menu__title__caret"
|
|
235
|
+
alt=""
|
|
236
|
+
/>
|
|
237
|
+
<img
|
|
238
|
+
v-show="contactMenuIsOpen"
|
|
239
|
+
:src="CaretUp"
|
|
240
|
+
height="12"
|
|
241
|
+
width="17"
|
|
242
|
+
class="app-footer-menu__title__caret"
|
|
243
|
+
alt=""
|
|
244
|
+
/>
|
|
245
|
+
<ul
|
|
246
|
+
class="submenu"
|
|
247
|
+
:class="contactMenuIsOpen ? 'isOpen' : false"
|
|
248
|
+
>
|
|
249
|
+
<li
|
|
250
|
+
class="app-footer-menu__item app-footer-menu__address app-footer-menu__item--link"
|
|
251
|
+
:class="{
|
|
252
|
+
'app-footer-menu__item--hide': !contactMenuIsOpen
|
|
253
|
+
}"
|
|
254
|
+
>
|
|
255
|
+
<p>
|
|
256
|
+
WorkSafe Victoria <br />
|
|
257
|
+
1 Malop Street <br />
|
|
258
|
+
Geelong VIC 3220
|
|
259
|
+
</p>
|
|
260
|
+
</li>
|
|
261
|
+
<li
|
|
262
|
+
class="app-footer-menu__item app-footer-menu__item--link"
|
|
263
|
+
:class="{
|
|
264
|
+
'app-footer-menu__item--hide': !contactMenuIsOpen
|
|
265
|
+
}"
|
|
266
|
+
>
|
|
267
|
+
<a class="dark" href="tel:+611800136089">1800 136 089</a>
|
|
268
|
+
</li>
|
|
269
|
+
<li
|
|
270
|
+
class="app-footer-menu__item app-footer-menu__item--link"
|
|
271
|
+
:class="{
|
|
272
|
+
'app-footer-menu__item--hide': !contactMenuIsOpen
|
|
273
|
+
}"
|
|
274
|
+
>
|
|
275
|
+
<nuxt-link class="dark" to="/contact-worksafe"
|
|
276
|
+
>More contacts</nuxt-link
|
|
277
|
+
>
|
|
278
|
+
</li>
|
|
279
|
+
</ul>
|
|
280
|
+
</li>
|
|
281
|
+
</ul></column
|
|
282
|
+
>
|
|
283
|
+
</row>
|
|
284
|
+
<row class="app-footer__main__subscribe">
|
|
285
|
+
<column :xs="12" :md="7">
|
|
286
|
+
<img
|
|
287
|
+
:src="AboriginalFlag"
|
|
288
|
+
height="38"
|
|
289
|
+
width="64"
|
|
290
|
+
class="app-footer__main__subscribe__flag"
|
|
291
|
+
alt="Aboriginal Flag"
|
|
292
|
+
/>
|
|
293
|
+
<img
|
|
294
|
+
:src="TorresStraitFlag"
|
|
295
|
+
height="38"
|
|
296
|
+
width="64"
|
|
297
|
+
class="app-footer__main__subscribe__flag"
|
|
298
|
+
alt="Torres Strait Flag"
|
|
299
|
+
/>
|
|
300
|
+
<img
|
|
301
|
+
:src="PrideFlag"
|
|
302
|
+
height="38"
|
|
303
|
+
width="64"
|
|
304
|
+
class="app-footer__main__subscribe__flag"
|
|
305
|
+
alt="Pride Flag"
|
|
306
|
+
/>
|
|
307
|
+
<p>
|
|
308
|
+
WorkSafe Victoria acknowledges Aboriginal and Torres Strait
|
|
309
|
+
Islander people as the Traditional Custodians of the land and
|
|
310
|
+
acknowledges and pays respect to their Elders, past and present.
|
|
311
|
+
</p>
|
|
312
|
+
<p>
|
|
313
|
+
WorkSafe Victoria is committed to safe and inclusive work places,
|
|
314
|
+
policies and services for people of LGBTIQ communities and their
|
|
315
|
+
families.
|
|
316
|
+
</p>
|
|
317
|
+
</column>
|
|
318
|
+
<column :md="1" class="app-footer__main__empty-col" />
|
|
319
|
+
<column :xs="12" :md="4" class="app-footer__main__subscribe-col">
|
|
320
|
+
<img
|
|
321
|
+
v-if="isWorkwell"
|
|
322
|
+
:src="WorkSafeLogo"
|
|
323
|
+
height="48"
|
|
324
|
+
width="101"
|
|
325
|
+
class="app-footer__main__subscribe-col__worksafe-icon"
|
|
326
|
+
alt="Work Safe Victoria - Logo"
|
|
327
|
+
/>
|
|
328
|
+
<img
|
|
329
|
+
alt="Victoria State Government - Logo"
|
|
330
|
+
:src="VicGovLogo"
|
|
331
|
+
height="60"
|
|
332
|
+
width="106"
|
|
333
|
+
/>
|
|
334
|
+
<p class="app-footer__main__subscribe-col__text">
|
|
335
|
+
WorkSafe Victoria © {{ new Date().getFullYear() }}
|
|
336
|
+
</p>
|
|
337
|
+
<button
|
|
338
|
+
class="app-footer__main__subscribe-col__btn"
|
|
339
|
+
:class="{
|
|
340
|
+
'app-footer__main__subscribe-btn--workwell': isWorkwell
|
|
341
|
+
}"
|
|
342
|
+
@click="subscribe"
|
|
343
|
+
>
|
|
344
|
+
<span>Subscribe</span>
|
|
345
|
+
<span class="visually-hidden">External link</span>
|
|
346
|
+
<icon
|
|
347
|
+
width="24"
|
|
348
|
+
height="24"
|
|
349
|
+
class="app-footer__main__subscribe--icon"
|
|
350
|
+
:glyph="ExternalLinkRaw"
|
|
351
|
+
/>
|
|
352
|
+
</button>
|
|
353
|
+
</column>
|
|
354
|
+
</row>
|
|
355
|
+
</container>
|
|
356
|
+
</div>
|
|
357
|
+
</footer>
|
|
358
|
+
</template>
|
|
359
|
+
|
|
360
|
+
<script>
|
|
361
|
+
import Row from './../../Containers/Row/index.vue'
|
|
362
|
+
import Container from './../../Containers/Container/index.vue'
|
|
363
|
+
import Column from './../../Containers/Column/index.vue'
|
|
364
|
+
import FooterSocialShare from './FooterSocialShare/index.vue'
|
|
365
|
+
import CaretUp from './../../../assets/icons/caret-up.svg?url'
|
|
366
|
+
import CaretDown from './../../../assets/icons/caret-down.svg?url'
|
|
367
|
+
import WorkSafeLogo from './../../../assets/icons/AppFooter/worksafe-footer-logo.svg?url'
|
|
368
|
+
import VicGovLogo from './../../../assets/icons/brand-VicStateGov-logo-reversed.svg?url'
|
|
369
|
+
import ExternalLink from './../../../assets/icons/external-link-16px.svg?url'
|
|
370
|
+
import ExternalLinkRaw from './../../../assets/icons/external-link.svg?url'
|
|
371
|
+
import AboriginalFlag from './../../../assets/icons/AppFooter/australian-aboriginal-flag.svg?url'
|
|
372
|
+
import PrideFlag from './../../../assets/icons/AppFooter/pride-flag.svg?url'
|
|
373
|
+
import TorresStraitFlag from './../../../assets/icons/AppFooter/torres-strait-islanders-flag.svg?url'
|
|
374
|
+
import WorkWellLogo from './../../../assets/icons/AppFooter/logo-workwell-reversed.svg?url'
|
|
375
|
+
import { format } from 'date-fns'
|
|
376
|
+
import Icon from './../../SubComponents/Icon/index.vue'
|
|
377
|
+
import CtaButton from './../../SubComponents/CtaButton/index.vue'
|
|
378
|
+
import Tick from './../../../assets/icons/tick.svg?url'
|
|
379
|
+
|
|
380
|
+
export default {
|
|
381
|
+
name: 'AppFooter',
|
|
382
|
+
components: {
|
|
383
|
+
FooterSocialShare,
|
|
384
|
+
Column,
|
|
385
|
+
Container,
|
|
386
|
+
Row,
|
|
387
|
+
Icon,
|
|
388
|
+
CtaButton
|
|
389
|
+
},
|
|
390
|
+
props: {
|
|
391
|
+
footerMenu: {
|
|
392
|
+
type: Array,
|
|
393
|
+
required: true
|
|
394
|
+
},
|
|
395
|
+
changedDate: {
|
|
396
|
+
type: String,
|
|
397
|
+
required: true
|
|
398
|
+
},
|
|
399
|
+
isWorkwell: {
|
|
400
|
+
type: Boolean,
|
|
401
|
+
default: false
|
|
402
|
+
},
|
|
403
|
+
storybook: {
|
|
404
|
+
type: Boolean,
|
|
405
|
+
default: false
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
data() {
|
|
409
|
+
return {
|
|
410
|
+
contactMenuIsOpen: false,
|
|
411
|
+
Tick,
|
|
412
|
+
CaretUp,
|
|
413
|
+
CaretDown,
|
|
414
|
+
WorkSafeLogo,
|
|
415
|
+
VicGovLogo,
|
|
416
|
+
ExternalLink,
|
|
417
|
+
ExternalLinkRaw,
|
|
418
|
+
AboriginalFlag,
|
|
419
|
+
PrideFlag,
|
|
420
|
+
TorresStraitFlag,
|
|
421
|
+
WorkWellLogo,
|
|
422
|
+
menu: this.footerMenu,
|
|
423
|
+
windowWidth: 0,
|
|
424
|
+
rtl: false,
|
|
425
|
+
showForm: false,
|
|
426
|
+
submitted: false,
|
|
427
|
+
endpoint:
|
|
428
|
+
process.env.CONTENT_API_URL + '/webform_rest/submit?_format=json',
|
|
429
|
+
response: {
|
|
430
|
+
webform_id: 'page_feedback_form',
|
|
431
|
+
page_url: '',
|
|
432
|
+
was_the_information_on_this_page_helpful_: '',
|
|
433
|
+
message: ''
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
computed: {
|
|
438
|
+
updateDate() {
|
|
439
|
+
// https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
440
|
+
return format(new Date(this.changedDate), 'dd/MM/yyyy')
|
|
441
|
+
},
|
|
442
|
+
isMobile() {
|
|
443
|
+
return this.windowWidth < 768
|
|
444
|
+
},
|
|
445
|
+
processID() {
|
|
446
|
+
return `${Date.now()}-${Math.floor(Math.random() * 10000)}`
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
watch: {
|
|
450
|
+
$route() {
|
|
451
|
+
this.showForm = false
|
|
452
|
+
this.submitted = false
|
|
453
|
+
},
|
|
454
|
+
showForm: {
|
|
455
|
+
handler: function() {
|
|
456
|
+
this.initialiseFeedback()
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
mounted() {
|
|
461
|
+
this.$nextTick(() => {
|
|
462
|
+
window.addEventListener('resize', this.onResize)
|
|
463
|
+
})
|
|
464
|
+
this.onResize()
|
|
465
|
+
},
|
|
466
|
+
beforeDestroy() {
|
|
467
|
+
window.removeEventListener('resize', this.onResize)
|
|
468
|
+
},
|
|
469
|
+
methods: {
|
|
470
|
+
initialiseFeedback() {
|
|
471
|
+
if (!this.showForm) {
|
|
472
|
+
var rbY = document.getElementById('frYes')
|
|
473
|
+
rbY.checked = false
|
|
474
|
+
var rbN = document.getElementById('frNo')
|
|
475
|
+
rbN.checked = false
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
setResponse(event) {
|
|
479
|
+
var answer = event.target.value
|
|
480
|
+
this.response.was_the_information_on_this_page_helpful_ = answer
|
|
481
|
+
this.response.page_url = window.location.href
|
|
482
|
+
this.showForm = true
|
|
483
|
+
this.fireGtagHelpful()
|
|
484
|
+
},
|
|
485
|
+
cancelFeedback() {
|
|
486
|
+
this.showForm = false
|
|
487
|
+
},
|
|
488
|
+
async submitFeedback() {
|
|
489
|
+
if (this.$gtm) {
|
|
490
|
+
try {
|
|
491
|
+
const res = await this.$axios.post(this.endpoint, this.response)
|
|
492
|
+
if (res.data && res.data.sid) {
|
|
493
|
+
this.submitted = true
|
|
494
|
+
this.showForm = false
|
|
495
|
+
this.fireGtagFeedback()
|
|
496
|
+
}
|
|
497
|
+
} catch (e) {
|
|
498
|
+
// eslint-disable-next-line no-console
|
|
499
|
+
console.error('Error submitting webform')
|
|
500
|
+
}
|
|
501
|
+
} else {
|
|
502
|
+
this.submitted = true
|
|
503
|
+
this.showForm = false
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
isSet(ans) {
|
|
507
|
+
return this.response.was_the_information_on_this_page_helpful_ === ans
|
|
508
|
+
},
|
|
509
|
+
fireGtagHelpful() {
|
|
510
|
+
const attrs = {
|
|
511
|
+
event: 'custom.interaction.helpful',
|
|
512
|
+
label: this.response.was_the_information_on_this_page_helpful_,
|
|
513
|
+
title: this.$store?.state?.page?.content?.title
|
|
514
|
+
}
|
|
515
|
+
if (this.$gtm) {
|
|
516
|
+
this.$gtm.push({ event: 'custom.interaction.helpful', ...attrs })
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
fireGtagFeedback() {
|
|
520
|
+
const attrs = {
|
|
521
|
+
title: this.$store?.state?.page?.content?.title,
|
|
522
|
+
label: this.response.was_the_information_on_this_page_helpful_,
|
|
523
|
+
processID: this.processID
|
|
524
|
+
}
|
|
525
|
+
if (this.$gtm) {
|
|
526
|
+
this.$gtm.push({
|
|
527
|
+
event: 'custom.interaction.helpful.feedback',
|
|
528
|
+
...attrs
|
|
529
|
+
})
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
backToTop() {
|
|
533
|
+
if (!this.storybook) {
|
|
534
|
+
this.$nuxt.$emit('scrollToTop')
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
isAbsoluteUrl(uri) {
|
|
538
|
+
let r = new RegExp('^(?:[a-z]+:)?//', 'i')
|
|
539
|
+
return r.test(uri)
|
|
540
|
+
},
|
|
541
|
+
subscribe() {
|
|
542
|
+
window.location =
|
|
543
|
+
'https://comms.worksafe.vic.gov.au/link/id/zzzz5c2d405926ec7534Pzzzz4ff385a2d38d8616/page.html?prompt=1'
|
|
544
|
+
},
|
|
545
|
+
handleMenuItemClick(menuFooter, index) {
|
|
546
|
+
// splice is needed for vue to pick up that changes to the footerMenu array and re-render the screen
|
|
547
|
+
if (this.isMobile) {
|
|
548
|
+
for (let i = 0; i < menuFooter.length; i++) {
|
|
549
|
+
let newMenuItem = menuFooter[i]
|
|
550
|
+
this.contactMenuIsOpen = false
|
|
551
|
+
if (i === index) {
|
|
552
|
+
newMenuItem.isOpen = !newMenuItem.isOpen
|
|
553
|
+
} else {
|
|
554
|
+
newMenuItem.isOpen = false
|
|
555
|
+
}
|
|
556
|
+
menuFooter.splice(i, 1, newMenuItem)
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
handleContactItemClick(menuFooter) {
|
|
561
|
+
if (this.isMobile) {
|
|
562
|
+
for (let i = 0; i < menuFooter.length; i++) {
|
|
563
|
+
let newMenuItem = menuFooter[i]
|
|
564
|
+
this.contactMenuIsOpen = !this.contactMenuIsOpen
|
|
565
|
+
newMenuItem.isOpen = false
|
|
566
|
+
menuFooter.splice(i, 1, newMenuItem)
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
handleMenuItemKeyup(menuFooter, index, event) {
|
|
571
|
+
if (this.isMobile) {
|
|
572
|
+
if (event.keyCode === 32 || event.keyCode === 13) {
|
|
573
|
+
//splice is needed for vue to pick up that changes to the menuFooter array and re-render the screen
|
|
574
|
+
for (let i = 0; i < menuFooter.length; i++) {
|
|
575
|
+
let newMenuItem = menuFooter[i]
|
|
576
|
+
this.contactMenuIsOpen = false
|
|
577
|
+
if (i === index) {
|
|
578
|
+
newMenuItem.isOpen = !newMenuItem.isOpen
|
|
579
|
+
} else {
|
|
580
|
+
newMenuItem.isOpen = false
|
|
581
|
+
}
|
|
582
|
+
menuFooter.splice(i, 1, newMenuItem)
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
handleContactItemKeyup(menuFooter, event) {
|
|
588
|
+
if (this.isMobile) {
|
|
589
|
+
if (event.keyCode === 32 || event.keyCode === 13) {
|
|
590
|
+
for (let i = 0; i < menuFooter.length; i++) {
|
|
591
|
+
let newMenuItem = menuFooter[i]
|
|
592
|
+
this.contactMenuIsOpen = !this.contactMenuIsOpen
|
|
593
|
+
newMenuItem.isOpen = false
|
|
594
|
+
menuFooter.splice(i, 1, newMenuItem)
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
onResize() {
|
|
600
|
+
this.windowWidth = window.innerWidth
|
|
601
|
+
let titles = document.getElementsByClassName('app-footer-menu__title')
|
|
602
|
+
if (Array.isArray(titles)) {
|
|
603
|
+
if (this.isMobile) {
|
|
604
|
+
titles.forEach((t) => {
|
|
605
|
+
t.setAttribute('tabIndex', '0')
|
|
606
|
+
})
|
|
607
|
+
} else {
|
|
608
|
+
titles.forEach((t) => {
|
|
609
|
+
t.removeAttribute('tabIndex')
|
|
610
|
+
})
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
handleAbsoluteClick(item) {
|
|
615
|
+
if (item.absolute) {
|
|
616
|
+
if (this.$gtm) {
|
|
617
|
+
this.$gtm.push({
|
|
618
|
+
event: 'custom.interaction.outboundlink',
|
|
619
|
+
category: item.title,
|
|
620
|
+
label: item.absolute
|
|
621
|
+
})
|
|
622
|
+
}
|
|
623
|
+
window.open(item.absolute)
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
</script>
|
|
629
|
+
|
|
630
|
+
<style lang="scss" scoped>
|
|
631
|
+
@import './styles';
|
|
632
|
+
</style>
|