@worksafevictoria/wcl7.5 1.1.22 → 1.2.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/README.md CHANGED
@@ -44,18 +44,18 @@ This repo is based on Vue 3 in Vite, and Storybook 7. It contains all the commo
44
44
 
45
45
  ### Usage Instructions - Yarn - recommended
46
46
 
47
- yarn add @worksafevictoria/wcl
47
+ yarn add @worksafevictoria/wcl7.5
48
48
 
49
49
  ### Usage Instructions - npm
50
50
 
51
- npm i @worksafevictoria/wcl
51
+ npm i @worksafevictoria/wcl7.5
52
52
 
53
53
  ### Nuxt - if you have errors after importing
54
54
 
55
55
  # nuxt.config.js
56
56
 
57
57
  build {
58
- transpile: ['@worksafevictoria/wcl', 'xxx', 'xxx', 'xxx']
58
+ transpile: ['@worksafevictoria/wcl7.5', 'xxx', 'xxx', 'xxx']
59
59
  }
60
60
 
61
61
  #### Usage Instructions - environment variables
@@ -83,7 +83,7 @@ This repo is based on Vue 3 in Vite, and Storybook 7. It contains all the commo
83
83
  </template>
84
84
 
85
85
  <script>
86
- import { Container, Column, Row, CtaButton } from '@worksafevictoria/wcl'
86
+ import { Container, Column, Row, CtaButton } from '@worksafevictoria/wcl7.5'
87
87
  export default {
88
88
  components: { Container, Column, Row, CtaButton }
89
89
  }
@@ -4,7 +4,7 @@
4
4
  # Project: Worksafe Public Website - Front End
5
5
  # Description: Build Validation for Pull Requests
6
6
  ########################################################
7
- trigger: none
7
+ trigger: none
8
8
 
9
9
  pr:
10
10
  autoCancel: true
@@ -13,7 +13,7 @@ pr:
13
13
  include:
14
14
  - master
15
15
  - beta
16
-
16
+
17
17
  variables:
18
18
  - group: Public Websites - Front End
19
19
 
@@ -1,14 +1,15 @@
1
1
  #######################################################
2
- # Author: Yavisht Katgara
3
- # Email: yavisht_katgara@worksafe.vic.gov.au
2
+ # Original Author: Yavisht Katgara
3
+ # Email: WSV-DigitalOperations@worksafetac.onmicrosoft.com
4
4
  # Project: Worksafe Public Website - Front End
5
5
  # Description: Publish beta release to NPM
6
6
  #######################################################
7
7
 
8
- trigger:
8
+ trigger:
9
9
  branches:
10
10
  include:
11
11
  - beta
12
+ pr: none
12
13
 
13
14
  variables:
14
15
  - group: Public Websites - Front End
@@ -1,14 +1,15 @@
1
1
  #######################################################
2
- # Author: Yavisht Katgara
3
- # Email: yavisht_katgara@worksafe.vic.gov.au
2
+ # Original Author: Yavisht Katgara
3
+ # Email: WSV-DigitalOperations@worksafetac.onmicrosoft.com
4
4
  # Project: Worksafe Public Website - Front End
5
5
  # Description: Publish latest release to NPM
6
6
  #######################################################
7
7
 
8
- trigger:
8
+ trigger:
9
9
  branches:
10
10
  include:
11
11
  - master
12
+ pr: none
12
13
 
13
14
  variables:
14
15
  - group: Public Websites - Front End
package/jest.config.js CHANGED
@@ -15,7 +15,7 @@ module.exports = {
15
15
  },
16
16
  transform: {
17
17
  '.*\\.vue$': '@vue/vue3-jest',
18
- '^.+\\.js$': 'babel-jest',
18
+ '^.+\\.[t|j]sx?$': 'babel-jest',
19
19
  '.+\\.(svg)$': '<rootDir>/src/mock/jest.svgtransformer.js'
20
20
  },
21
21
  transformIgnorePatterns: ['!node_modules/'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.1.22",
3
+ "version": "1.2.0",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -58,7 +58,8 @@
58
58
  "devDependencies": {
59
59
  "@babel/core": "^7.24.6",
60
60
  "@babel/plugin-transform-private-property-in-object": "^7.24.6",
61
- "@babel/preset-env": "^7.24.6",
61
+ "@babel/preset-env": "^7.25.3",
62
+ "@babel/preset-react": "^7.24.7",
62
63
  "@rushstack/eslint-patch": "^1.3.3",
63
64
  "@storybook/addon-a11y": "^7.6.3",
64
65
  "@storybook/addon-essentials": "^7.5.1",
@@ -72,7 +73,8 @@
72
73
  "@vue/eslint-config-prettier": "^8.0.0",
73
74
  "@vue/test-utils": "^2.4.6",
74
75
  "@vue/vue3-jest": "^29.2.6",
75
- "babel-jest": "^29.2.6",
76
+ "babel-jest": "^29.7.0",
77
+ "babel-preset-vite": "^1.1.3",
76
78
  "dotenv-webpack": "^8.1.0",
77
79
  "eslint": "^8.49.0",
78
80
  "eslint-plugin-storybook": "^0.6.15",
@@ -212,5 +212,5 @@ Default.args = {
212
212
  cardPadding: 'small',
213
213
  borderType: 'thin',
214
214
  contentClass: 'Content Class',
215
- cardDescription: 'Card description slot. text 123 Sample text. You can also use description prop.',
215
+ cardDescription: 'Card Description slot. text 123 Sample text. You can also use description prop.',
216
216
  }
@@ -14,7 +14,7 @@
14
14
  class="homepage-header"
15
15
  >
16
16
  <template v-slot:top>
17
- <slot />
17
+ <slot></slot>
18
18
  </template>
19
19
 
20
20
  <template v-slot:description>
@@ -31,7 +31,6 @@ const heroTitle = 'HeroHeader hero example'
31
31
  export default {
32
32
  title: 'Global/HeroHeader',
33
33
  component: HeroHeader,
34
- tags: ['autodocs'],
35
34
  argTypes: {
36
35
  type: {
37
36
  control: 'string',
@@ -43,10 +42,9 @@ export default {
43
42
  title: 'HeroHeader default example',
44
43
  description: '<p class="intro">The page subtitle goes in here... The page subtitle goes in here... The page subtitle goes in here...</p><p><a href="#" class="cta-button">class cta-button</a></p>',
45
44
  image: {
46
- url:
47
- 'https://content-v2.api.worksafe.vic.gov.au/sites/default/files/2020-04/Topic-Coronavirus-COVID-19.jpg',
48
- alt: 'Some alt text'
49
- },
45
+ url: process.env.CONTENT_API_URL + '/sites/default/files/2020-04/Topic-Coronavirus-COVID-19.jpg',
46
+ alt: 'Some alt text'
47
+ },
50
48
  cta: cta_content,
51
49
  bgColor: false,
52
50
  breadcrumbItems: breadcrumb_content,
@@ -98,7 +98,7 @@
98
98
  >
99
99
  </column>
100
100
  </row>
101
- <social-share v-show="showSocial && type !== 'hero'" :rtl="rtl" />
101
+ <social-share v-show="showSocial && type !== 'hero'" :rtl="rtl" />
102
102
  </container>
103
103
  </div>
104
104
  <!-- Type Default -->
@@ -137,7 +137,8 @@ export default {
137
137
  }
138
138
  },
139
139
  mounted() {
140
- if (process.client) {
140
+ let winHref = window.location.href
141
+ if (winHref.toLowerCase().includes("worksafe")) {
141
142
  this.url = window.location.href;
142
143
  }
143
144
  },