@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,238 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wcl-search">
|
|
3
|
+
<b-input-group>
|
|
4
|
+
<label class="visually-hidden" for="site-search"
|
|
5
|
+
>Search by keyword (Typed keyword automatically filters below
|
|
6
|
+
results)</label
|
|
7
|
+
>
|
|
8
|
+
<b-form-input
|
|
9
|
+
id="site-search"
|
|
10
|
+
v-model="searchQuery"
|
|
11
|
+
aria-label="searchbar"
|
|
12
|
+
debounce="600"
|
|
13
|
+
autocomplete="off"
|
|
14
|
+
trim
|
|
15
|
+
@update="onChange"
|
|
16
|
+
></b-form-input>
|
|
17
|
+
<b-input-group-append>
|
|
18
|
+
<b-button size="sm" @click="onSearch"
|
|
19
|
+
><span class="not-extra-small-screen">Search</span>
|
|
20
|
+
<img alt="search icon" :src="searchIcon"
|
|
21
|
+
/></b-button>
|
|
22
|
+
</b-input-group-append>
|
|
23
|
+
</b-input-group>
|
|
24
|
+
<search-listing
|
|
25
|
+
v-if="searchResults || isLoading"
|
|
26
|
+
:class="{
|
|
27
|
+
[`wcl-search__typeahead`]: isTypeahead,
|
|
28
|
+
[`wcl-search__modal`]: isTypeahead
|
|
29
|
+
}"
|
|
30
|
+
:is-loading="isLoading"
|
|
31
|
+
:is-typeahead="isTypeahead"
|
|
32
|
+
:num-found="searchResults && searchResults.numFound"
|
|
33
|
+
:query="searchResults && searchResults.query"
|
|
34
|
+
:results="searchResults ? searchResults.results : []"
|
|
35
|
+
:offset="searchResults && searchResults.offset"
|
|
36
|
+
:page-limit="pageLimit"
|
|
37
|
+
:content-parser="contentParser"
|
|
38
|
+
@selected="$emit('selected')"
|
|
39
|
+
@pageChanged="pageChanged"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import searchIcon from '../../../assets/icons/search.svg?url'
|
|
46
|
+
import SearchListing from './SearchListing/index.vue'
|
|
47
|
+
import { BButton, BInputGroup, BFormInput, BInputGroupAppend } from 'bootstrap-vue-next'
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
components: { SearchListing, BButton, BInputGroup, BFormInput, BInputGroupAppend },
|
|
51
|
+
props: {
|
|
52
|
+
pageLimit: {
|
|
53
|
+
type: Number,
|
|
54
|
+
required: true
|
|
55
|
+
},
|
|
56
|
+
contentParser: {
|
|
57
|
+
type: Function,
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
isTypeahead: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
initialSearchQuery: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ''
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
searchIcon,
|
|
72
|
+
searchQuery: '',
|
|
73
|
+
searchResults: null,
|
|
74
|
+
isLoading: false,
|
|
75
|
+
field_language: '8671'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
mounted() {
|
|
79
|
+
if (this.initialSearchQuery) {
|
|
80
|
+
this.searchQuery = this.initialSearchQuery
|
|
81
|
+
this.onSearch()
|
|
82
|
+
}
|
|
83
|
+
if (this.isTypeahead && window) {
|
|
84
|
+
window.document.addEventListener('click', this.closeSearchResults)
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
beforeDestroy() {
|
|
88
|
+
if (this.isTypeahead && window) {
|
|
89
|
+
window.document.removeEventListener('click', this.closeSearchResults)
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
onSearch() {
|
|
94
|
+
this.resetSearchResults()
|
|
95
|
+
this.$emit('query', this.searchQuery)
|
|
96
|
+
this.performSearch(1, this.searchQuery, this.pageLimit)
|
|
97
|
+
},
|
|
98
|
+
resetSearchResults() {
|
|
99
|
+
this.searchResults = null
|
|
100
|
+
},
|
|
101
|
+
closeSearchResults(ev) {
|
|
102
|
+
if (
|
|
103
|
+
this.isTypeahead &&
|
|
104
|
+
this.searchResults &&
|
|
105
|
+
ev?.target?.id !== 'site-search'
|
|
106
|
+
) {
|
|
107
|
+
this.resetSearchResults()
|
|
108
|
+
this.searchQuery = null
|
|
109
|
+
this.$emit('query', null)
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
onChange() {
|
|
113
|
+
if (this.searchQuery && this.searchQuery.length > 2) {
|
|
114
|
+
this.onSearch()
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
pageChanged(newPageNumber) {
|
|
118
|
+
this.resetSearchResults()
|
|
119
|
+
this.performSearch(newPageNumber, this.searchQuery, this.pageLimit)
|
|
120
|
+
},
|
|
121
|
+
performSearch(pageNr = 1, searchQuery, pageLimit) {
|
|
122
|
+
if (searchQuery) {
|
|
123
|
+
this.$emit('loading', true)
|
|
124
|
+
this.isLoading = true
|
|
125
|
+
this.contentParser({
|
|
126
|
+
query: searchQuery,
|
|
127
|
+
start: pageNr > 1 ? (pageNr - 1) * pageLimit : 0,
|
|
128
|
+
rows: pageLimit,
|
|
129
|
+
field_language: this.field_language
|
|
130
|
+
}).then((res) => {
|
|
131
|
+
if (res.numFound) {
|
|
132
|
+
this.searchResults = {
|
|
133
|
+
offset: Number(res.offset),
|
|
134
|
+
numFound: Number(res.numFound),
|
|
135
|
+
query: searchQuery,
|
|
136
|
+
results: res.results
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
this.searchResults = {
|
|
140
|
+
offset: 0,
|
|
141
|
+
numFound: 0,
|
|
142
|
+
query: this.searchQuery ?? '',
|
|
143
|
+
results: []
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
this.$emit('loading', false)
|
|
147
|
+
this.isLoading = false
|
|
148
|
+
this.$emit('results', this.searchResults)
|
|
149
|
+
// wait for the page title to be updated and then fire the search event
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
const attrs = {
|
|
152
|
+
pageTitle: document.title,
|
|
153
|
+
pageURL: this.$route?.fullPath,
|
|
154
|
+
location:
|
|
155
|
+
this.$route?.path === '/'
|
|
156
|
+
? 'Homepage'
|
|
157
|
+
: this.$route?.path === '/search'
|
|
158
|
+
? 'Search Page'
|
|
159
|
+
: this.$route?.path,
|
|
160
|
+
label: this.searchQuery,
|
|
161
|
+
results: this.searchResults.numFound
|
|
162
|
+
}
|
|
163
|
+
if (this.$gtm) {
|
|
164
|
+
this.$gtm.push({ event: 'custom.search.site.submit', ...attrs })
|
|
165
|
+
}
|
|
166
|
+
}, 300)
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
</script>
|
|
173
|
+
<style lang="scss" scoped>
|
|
174
|
+
@import '../../../includes/scss/all';
|
|
175
|
+
|
|
176
|
+
.wcl-search {
|
|
177
|
+
position: relative;
|
|
178
|
+
|
|
179
|
+
&__typeahead {
|
|
180
|
+
margin-top: 8px;
|
|
181
|
+
width: 100%;
|
|
182
|
+
position: absolute;
|
|
183
|
+
z-index: 99;
|
|
184
|
+
box-shadow: 0 4px 30px rgb(0 0 0 / 18%);
|
|
185
|
+
background: $white;
|
|
186
|
+
border-bottom-left-radius: 4px;
|
|
187
|
+
border-bottom-right-radius: 4px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
input,
|
|
191
|
+
button {
|
|
192
|
+
height: 56px;
|
|
193
|
+
border: 1px solid $gray;
|
|
194
|
+
}
|
|
195
|
+
input {
|
|
196
|
+
border-radius: 8px 0px 0px 8px;
|
|
197
|
+
border: 1px solid $gray;
|
|
198
|
+
border-right: 0;
|
|
199
|
+
|
|
200
|
+
@media screen and (max-width: 320px) {
|
|
201
|
+
width: 220px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&:focus {
|
|
205
|
+
box-shadow: none;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
button.btn {
|
|
209
|
+
background: $orange;
|
|
210
|
+
color: $black;
|
|
211
|
+
border: none;
|
|
212
|
+
font-size: 16px;
|
|
213
|
+
font-weight: 700;
|
|
214
|
+
padding-right: 32px;
|
|
215
|
+
padding-left: 32px;
|
|
216
|
+
border-radius: 0px 8px 8px 0px;
|
|
217
|
+
|
|
218
|
+
@media screen and (max-width: 320px) {
|
|
219
|
+
padding-right: 16px;
|
|
220
|
+
padding-left: 16px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
img {
|
|
224
|
+
margin-left: 6px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:focus {
|
|
228
|
+
box-shadow: 0px;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@include mq('xs') {
|
|
233
|
+
.not-extra-small-screen {
|
|
234
|
+
display: none;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import SingleImage from './index.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'SubComponents/SingleImage',
|
|
5
|
+
component: SingleImage,
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: {
|
|
8
|
+
control: 'select',
|
|
9
|
+
options: ['page', 'content', 'half-content']
|
|
10
|
+
},
|
|
11
|
+
caption: {
|
|
12
|
+
control: 'text'
|
|
13
|
+
},
|
|
14
|
+
url: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
},
|
|
17
|
+
rtl: {
|
|
18
|
+
control: 'boolean'
|
|
19
|
+
},
|
|
20
|
+
presentation: {
|
|
21
|
+
control: 'boolean'
|
|
22
|
+
},
|
|
23
|
+
alt: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const SizeHalfContent = {
|
|
30
|
+
args: {
|
|
31
|
+
size: 'half-content',
|
|
32
|
+
url: 'https://picsum.photos/1110/625/?image=27',
|
|
33
|
+
caption: 'this is the half content example',
|
|
34
|
+
alt: 'some alt text',
|
|
35
|
+
rtl: false,
|
|
36
|
+
presentation: false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const SizePageContent = {
|
|
41
|
+
args: {
|
|
42
|
+
size: 'page',
|
|
43
|
+
url: 'https://picsum.photos/1110/625/?image=26',
|
|
44
|
+
caption: 'this is another caption',
|
|
45
|
+
alt: 'some alt text',
|
|
46
|
+
rtl: false,
|
|
47
|
+
presentation: false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const SizeContent = {
|
|
52
|
+
args: {
|
|
53
|
+
size: 'content',
|
|
54
|
+
url: 'https://picsum.photos/1110/625/?image=66',
|
|
55
|
+
caption: 'This is the size content example',
|
|
56
|
+
alt: 'some alt text',
|
|
57
|
+
rtl: false,
|
|
58
|
+
presentation: false
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section-group :size="size" :rtl="rtl" class="wcl-single-image">
|
|
3
|
+
<template v-slot:content>
|
|
4
|
+
<row :class="{ rtl }">
|
|
5
|
+
<column>
|
|
6
|
+
<img
|
|
7
|
+
:src="url"
|
|
8
|
+
:alt="alt"
|
|
9
|
+
:role="presentation ? 'presentation' : false"
|
|
10
|
+
class="wcl-single-image__image"
|
|
11
|
+
:class="{
|
|
12
|
+
[`wcl-single-image__image--withCaption`]:
|
|
13
|
+
caption && caption.length > 0,
|
|
14
|
+
['wcl-single-image__image--' + size]: true
|
|
15
|
+
}"
|
|
16
|
+
/>
|
|
17
|
+
<div
|
|
18
|
+
v-if="caption && caption.length > 0"
|
|
19
|
+
class="wcl-single-image__caption"
|
|
20
|
+
>
|
|
21
|
+
{{ caption }}
|
|
22
|
+
</div>
|
|
23
|
+
</column>
|
|
24
|
+
</row>
|
|
25
|
+
</template>
|
|
26
|
+
</section-group>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
import Row from './../../Containers/Row/index.vue'
|
|
30
|
+
import Column from './../../Containers/Column/index.vue'
|
|
31
|
+
import SectionGroup from './../../Containers/SectionGroup/index.vue'
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'SingleImage',
|
|
35
|
+
components: {
|
|
36
|
+
Row,
|
|
37
|
+
Column,
|
|
38
|
+
SectionGroup
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
// can be page, content, or half-content
|
|
42
|
+
size: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'page'
|
|
45
|
+
},
|
|
46
|
+
url: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ''
|
|
49
|
+
},
|
|
50
|
+
caption: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
alt: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
presentation: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
rtl: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
@import '../../../includes/scss/mixins/all';
|
|
72
|
+
.wcl-single-image {
|
|
73
|
+
&__image {
|
|
74
|
+
display: block;
|
|
75
|
+
border-radius: 6px;
|
|
76
|
+
width: 100%;
|
|
77
|
+
&--withCaption {
|
|
78
|
+
margin-bottom: 12px;
|
|
79
|
+
}
|
|
80
|
+
&--half-content {
|
|
81
|
+
max-width: 350px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
&__caption {
|
|
85
|
+
font-size: 16px;
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
line-height: 20px;
|
|
88
|
+
letter-spacing: 0px;
|
|
89
|
+
}
|
|
90
|
+
.rtl {
|
|
91
|
+
@include makeRTL();
|
|
92
|
+
}
|
|
93
|
+
// If image needs to be flipped as well on RTL
|
|
94
|
+
// .rtl-flip {
|
|
95
|
+
// @include makeRTLFlip();
|
|
96
|
+
// }
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Container from '../../Containers/Container/index.vue'
|
|
2
|
+
import Row from '../../Containers/Row/index.vue'
|
|
3
|
+
import Column from '../../Containers/Column/index.vue'
|
|
4
|
+
import VideoThumbnail from './index.vue'
|
|
5
|
+
|
|
6
|
+
const mockData = {
|
|
7
|
+
id: '3FLapMJUmZQ',
|
|
8
|
+
mediaTitle: 'Some video title',
|
|
9
|
+
provider: 'youtube',
|
|
10
|
+
transcriptTitle: 'Transcript',
|
|
11
|
+
transcript:
|
|
12
|
+
'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.',
|
|
13
|
+
thumbnailQuality: 'max',
|
|
14
|
+
fixWidth: false
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'SubComponents/VideoThumbnail',
|
|
19
|
+
component: { VideoThumbnail },
|
|
20
|
+
argTypes: {
|
|
21
|
+
video: {
|
|
22
|
+
control: 'object',
|
|
23
|
+
defaultValue: mockData
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const Template = (args, { argTypes }) => ({
|
|
29
|
+
components: { VideoThumbnail, Container, Row, Column },
|
|
30
|
+
props: Object.keys(argTypes),
|
|
31
|
+
template: `
|
|
32
|
+
<container>
|
|
33
|
+
<row>
|
|
34
|
+
<column md="5">
|
|
35
|
+
<video-thumbnail v-bind="$props" />
|
|
36
|
+
</column>
|
|
37
|
+
</row>
|
|
38
|
+
</container>
|
|
39
|
+
`
|
|
40
|
+
})
|
|
41
|
+
export const Default = Template.bind({})
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="videoThumbnail" class="wcl-video-thumbnail-wrapper">
|
|
3
|
+
<a href="#" @click.prevent="showModal = true">
|
|
4
|
+
<div class="video-thumbnail">
|
|
5
|
+
<img
|
|
6
|
+
:src="videoThumbnail"
|
|
7
|
+
alt="video thumbnail"
|
|
8
|
+
width="100%"
|
|
9
|
+
class="video-thumbnail__image"
|
|
10
|
+
/>
|
|
11
|
+
<img
|
|
12
|
+
:src="VideoPlay"
|
|
13
|
+
alt="Play button"
|
|
14
|
+
class="video-thumbnail__button"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</a>
|
|
18
|
+
<b-modal
|
|
19
|
+
:id="`wcl-video-modal`"
|
|
20
|
+
v-model="showModal"
|
|
21
|
+
scrollable
|
|
22
|
+
class="wcl-video-modal__modal"
|
|
23
|
+
>
|
|
24
|
+
<template #modal-header="{ close }">
|
|
25
|
+
<div class="modal-header__wrap">
|
|
26
|
+
<!-- Emulate built in modal header close button action -->
|
|
27
|
+
<a
|
|
28
|
+
href="#"
|
|
29
|
+
class="close-button"
|
|
30
|
+
:class="{ rtl: video.rtl }"
|
|
31
|
+
@click.prevent="close()"
|
|
32
|
+
>
|
|
33
|
+
<icon-close :src="IconClose" alt="close icon" class="close-icon" />
|
|
34
|
+
</a>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
<div class="wcl-video-modal__video">
|
|
38
|
+
<video-media
|
|
39
|
+
:media-title="video.mediaTitle"
|
|
40
|
+
:media-description="video.mediaDescription"
|
|
41
|
+
:video-id="video.id"
|
|
42
|
+
:provider="video.provider"
|
|
43
|
+
:transcript="video.transcript"
|
|
44
|
+
:transcript-title="video.transcriptTitle"
|
|
45
|
+
:fix-width="video.fixWidth"
|
|
46
|
+
:rtl="video.rtl"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</b-modal>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<script>
|
|
54
|
+
import VideoMedia from './../../Paragraphs/VideoPlayer/index.vue'
|
|
55
|
+
import VideoPlay from './../../../assets/icons/video-play.svg'
|
|
56
|
+
import IconClose from './../../../assets/icons/icon-close.svg'
|
|
57
|
+
|
|
58
|
+
export default {
|
|
59
|
+
name: 'VideoThumbnail',
|
|
60
|
+
components: {
|
|
61
|
+
VideoMedia,
|
|
62
|
+
IconClose
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
video: {
|
|
66
|
+
type: Object,
|
|
67
|
+
required: true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
VideoPlay,
|
|
73
|
+
IconClose,
|
|
74
|
+
showModal: false,
|
|
75
|
+
videoThumbnail: ''
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
mounted() {
|
|
79
|
+
this.getVideoThumbnail()
|
|
80
|
+
},
|
|
81
|
+
methods: {
|
|
82
|
+
async getVideoThumbnail() {
|
|
83
|
+
if (this.video.provider === 'youtube') {
|
|
84
|
+
this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/maxresdefault.jpg`
|
|
85
|
+
if (process.env.IS_STORYBOOK !== 'TRUE') {
|
|
86
|
+
let thumbnailAvailable = await this.$axios?.get(
|
|
87
|
+
`${window.location.origin}/api/v2/urlExists?url=${this.videoThumbnail}`
|
|
88
|
+
)
|
|
89
|
+
if (
|
|
90
|
+
thumbnailAvailable &&
|
|
91
|
+
thumbnailAvailable.data &&
|
|
92
|
+
thumbnailAvailable.data.valid === false
|
|
93
|
+
) {
|
|
94
|
+
this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/hqdefault.jpg`
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
} else if (this.video.provider === 'vimeo') {
|
|
98
|
+
this.getVimeoThumbnail()
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
async getVimeoThumbnail() {
|
|
102
|
+
let thumbnail = await this.$axios.get(
|
|
103
|
+
`https://vimeo.com/api/v2/video/${this.video.id}.json`
|
|
104
|
+
)
|
|
105
|
+
if (thumbnail.data) {
|
|
106
|
+
this.videoThumbnail = thumbnail.data[0].thumbnail_large
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</script>
|
|
112
|
+
<style lang="scss">
|
|
113
|
+
@import '../../../includes/scss/all';
|
|
114
|
+
// The modal styling
|
|
115
|
+
#wcl-video-modal {
|
|
116
|
+
.modal-dialog {
|
|
117
|
+
max-width: 1110px;
|
|
118
|
+
@media only screen and (max-width: 1150px) {
|
|
119
|
+
margin: {
|
|
120
|
+
left: 15px;
|
|
121
|
+
right: 15px;
|
|
122
|
+
top: 15px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.modal-content {
|
|
127
|
+
position: relative;
|
|
128
|
+
border-radius: 8px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.modal-header {
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 0;
|
|
134
|
+
height: 45px;
|
|
135
|
+
background: $white;
|
|
136
|
+
z-index: 1;
|
|
137
|
+
width: 100%;
|
|
138
|
+
|
|
139
|
+
&__wrap {
|
|
140
|
+
position: relative;
|
|
141
|
+
width: 100%;
|
|
142
|
+
a {
|
|
143
|
+
position: absolute;
|
|
144
|
+
right: 0;
|
|
145
|
+
z-index: 1;
|
|
146
|
+
&.rtl {
|
|
147
|
+
right: auto;
|
|
148
|
+
left: 0;
|
|
149
|
+
}
|
|
150
|
+
svg {
|
|
151
|
+
fill: $black;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
.modal-body {
|
|
157
|
+
padding: 32px;
|
|
158
|
+
margin-top: 16px;
|
|
159
|
+
.video-player {
|
|
160
|
+
@include fp(min-height, 250, 588);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.paragraph--video-media {
|
|
164
|
+
margin: 0;
|
|
165
|
+
.container {
|
|
166
|
+
padding: 0;
|
|
167
|
+
width: 100%;
|
|
168
|
+
}
|
|
169
|
+
h3 {
|
|
170
|
+
margin: 0;
|
|
171
|
+
font-style: normal;
|
|
172
|
+
font-weight: bold;
|
|
173
|
+
font-size: 28px;
|
|
174
|
+
line-height: 32px;
|
|
175
|
+
margin-bottom: 16px;
|
|
176
|
+
display: inline-block;
|
|
177
|
+
width: 98%;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
.section-group__block {
|
|
181
|
+
max-width: 100%;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
.modal-header,
|
|
185
|
+
.modal-footer {
|
|
186
|
+
border: none;
|
|
187
|
+
}
|
|
188
|
+
.modal-footer {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
</style>
|
|
194
|
+
<style lang="scss" scoped>
|
|
195
|
+
@import '../../../includes/scss/all';
|
|
196
|
+
// Outside wrapper style
|
|
197
|
+
.wcl-video-thumbnail-wrapper {
|
|
198
|
+
margin-bottom: 32px;
|
|
199
|
+
a {
|
|
200
|
+
display: block;
|
|
201
|
+
|
|
202
|
+
.video-thumbnail {
|
|
203
|
+
position: relative;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
min-height: 197px;
|
|
206
|
+
border-radius: 8px;
|
|
207
|
+
|
|
208
|
+
&__image {
|
|
209
|
+
border-radius: 6px;
|
|
210
|
+
display: block;
|
|
211
|
+
width: 100%;
|
|
212
|
+
height: auto;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&__button {
|
|
216
|
+
position: absolute;
|
|
217
|
+
top: 50%;
|
|
218
|
+
left: 50%;
|
|
219
|
+
//height: 68px;
|
|
220
|
+
//width: 68px;
|
|
221
|
+
@include fp('height', 65, 68);
|
|
222
|
+
@include fp('width', 65, 68);
|
|
223
|
+
-ms-transform: translate(-50%, -50%);
|
|
224
|
+
transform: translate(-50%, -50%);
|
|
225
|
+
|
|
226
|
+
@include mq('sm') {
|
|
227
|
+
height: 80px;
|
|
228
|
+
width: 80px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@include mq('xs') {
|
|
232
|
+
height: 64px;
|
|
233
|
+
width: 64px;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
</style>
|