@worksafevictoria/wcl7.5 1.4.0 → 1.6.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.
Files changed (86) hide show
  1. package/.storybook/preview.js +20 -13
  2. package/bin/deploy.sh +1 -1
  3. package/lib/utility.js +10 -8
  4. package/package.json +4 -5
  5. package/src/assets/icons/AppFooter/x-ws-footer.svg +10 -0
  6. package/src/assets/icons/AppFooter/x-ww-footer.svg +28 -0
  7. package/src/assets/icons/SocialShare/x-icon-white.svg +28 -0
  8. package/src/assets/styles/modal.scss +51 -0
  9. package/src/components/Common/CardGrid/index.vue +69 -49
  10. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +7 -4
  11. package/src/components/Common/CardGridItem/index.vue +95 -71
  12. package/src/components/Containers/Carousel/index.vue +14 -7
  13. package/src/components/Containers/HomepageHeader/index.stories.js +60 -36
  14. package/src/components/Containers/HomepageHeader/index.vue +2 -26
  15. package/src/components/Containers/HomepageHeaderNew/index.stories.js +15 -15
  16. package/src/components/Containers/HomepageHeaderNew/index.vue +97 -68
  17. package/src/components/Containers/SectionGroup/index.vue +1 -1
  18. package/src/components/Containers/Subheader/index.vue +5 -1
  19. package/src/components/Global/AppFooter/FooterSocialShare/index.vue +1 -1
  20. package/src/components/Global/AppFooter/index.vue +14 -7
  21. package/src/components/Global/AppHeaderNew/index.vue +304 -233
  22. package/src/components/Global/AppHeaderNew/styles.scss +29 -8
  23. package/src/components/Global/BackToTop/index.vue +8 -8
  24. package/src/components/Global/ContrastMode/index.vue +1 -1
  25. package/src/components/Global/Cookies/index.stories.js +16 -10
  26. package/src/components/Global/Cookies/index.vue +281 -237
  27. package/src/components/Global/Cookies/styles.scss +54 -54
  28. package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +50 -133
  29. package/src/components/Global/GlobalNotice/index.vue +79 -100
  30. package/src/components/Global/SocialShare/index.vue +1 -1
  31. package/src/components/Global/Strip/index.vue +1 -1
  32. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +8 -4
  33. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +23 -23
  34. package/src/components/Paragraphs/Accordion/index.stories.js +21 -18
  35. package/src/components/Paragraphs/Accordion/index.vue +52 -48
  36. package/src/components/Paragraphs/BrowseContent/index.vue +1 -1
  37. package/src/components/Paragraphs/BrowseContent/setup.vue +284 -0
  38. package/src/components/Paragraphs/Chart/Constants.js +485 -485
  39. package/src/components/Paragraphs/Chart/index.vue +232 -241
  40. package/src/components/Paragraphs/Directory/Records/HSCP/index.stories.js +33 -0
  41. package/src/components/Paragraphs/Directory/Records/HSCP/index.vue +334 -0
  42. package/src/components/Paragraphs/Directory/Records/ISP/index.vue +2 -2
  43. package/src/components/Paragraphs/Directory/Records/index.vue +63 -27
  44. package/src/components/Paragraphs/Directory/Records/styles.scss +1 -0
  45. package/src/components/Paragraphs/Directory/constants.js +23 -5
  46. package/src/components/Paragraphs/Directory/index.vue +14 -14
  47. package/src/components/Paragraphs/ListGroup/index.vue +5 -1
  48. package/src/components/Paragraphs/ScrollSpy/index.vue +23 -14
  49. package/src/components/Paragraphs/SelectableCards/index.vue +15 -12
  50. package/src/components/Paragraphs/TabbedCards/index.vue +13 -14
  51. package/src/components/Paragraphs/Tabs/index.vue +19 -17
  52. package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +9 -9
  53. package/src/components/Paragraphs/TextMedia/index.vue +20 -16
  54. package/src/components/Paragraphs/VideoGrid/index.stories.js +43 -19
  55. package/src/components/Paragraphs/VideoGrid/index.vue +13 -13
  56. package/src/components/Paragraphs/Webform/index.stories.js +82 -69
  57. package/src/components/SubComponents/CardGroup/index.vue +5 -1
  58. package/src/components/SubComponents/FormAddressPostcode/index.vue +35 -37
  59. package/src/components/SubComponents/FormInstance/components/handler/index.vue +25 -29
  60. package/src/components/SubComponents/FormInstance/components/renderer/index.vue +63 -28
  61. package/src/components/SubComponents/FormInstance/models/overrides/file.js +33 -40
  62. package/src/components/SubComponents/FormInstance/services/form-submit-parser.js +22 -15
  63. package/src/components/SubComponents/FormInstance/services/registry-factory.js +1 -1
  64. package/src/components/SubComponents/FormInstance/stories/fileupload.stories.js +57 -0
  65. package/src/components/SubComponents/FormInstance/stories/mocks/fileupload.json +25 -0
  66. package/src/components/SubComponents/FormInstance/style.scss +2 -2
  67. package/src/components/SubComponents/FormInstance/tests/address.test.js +4 -4
  68. package/src/components/SubComponents/FormInstance/tests/checkboxes.test.js +7 -7
  69. package/src/components/SubComponents/FormInstance/tests/customcomposite.test.js +15 -15
  70. package/src/components/SubComponents/FormInstance/tests/date.test.js +8 -8
  71. package/src/components/SubComponents/FormInstance/tests/form-test-utils.js +9 -9
  72. package/src/components/SubComponents/FormInstance/tests/multiple.test.js +13 -13
  73. package/src/components/SubComponents/FormInstance/tests/rule-visible.test.js +120 -120
  74. package/src/components/SubComponents/FormInstance/tests/scale.test.js +6 -6
  75. package/src/components/SubComponents/FormInstance/tests/url.test.js +13 -10
  76. package/src/components/SubComponents/Pagination/index.vue +19 -18
  77. package/src/components/SubComponents/ResourceGroup/index.vue +5 -1
  78. package/src/components/SubComponents/Search/SearchListing/index.vue +20 -20
  79. package/src/components/SubComponents/Search/index.vue +35 -33
  80. package/src/components/SubComponents/VideoThumbnail/index.vue +48 -133
  81. package/src/includes/scss/mixins/src/units.scss +25 -4
  82. package/src/includes/scss/vars/src/colors.module.scss +28 -1
  83. package/src/index.js +21 -3
  84. package/src/main.js +2 -10
  85. package/src/mock/app-header-new.js +27 -15
  86. package/src/mock/carousel-items.js +71 -46
@@ -1,9 +1,13 @@
1
1
  /** @type { import('@storybook/vue3').Preview } */
2
2
  import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
3
- import 'bootstrap/dist/css/bootstrap.min.css'
4
- import './../src/assets/styles/stylesheet.scss'
5
3
  import { setup } from '@storybook/vue3'
6
4
 
5
+ import { createBootstrap } from 'bootstrap-vue-next'
6
+
7
+ // Add the necessary CSS
8
+ import 'bootstrap/dist/css/bootstrap.css'
9
+ import 'bootstrap-vue-next/dist/bootstrap-vue-next.css'
10
+
7
11
  //Custom fonts
8
12
  import './../src/assets/styles/webfonts.css'
9
13
 
@@ -12,38 +16,41 @@ import './../src/assets/styles/stylesheet.scss'
12
16
 
13
17
  // Storybook css
14
18
  import './../src/assets/styles/storybook.scss'
15
-
19
+ import 'bootstrap/dist/css/bootstrap.min.css'
20
+ import './../src/assets/styles/stylesheet.scss'
16
21
 
17
22
  setup((app) => {
18
23
  app.component('NuxtLink', {
19
24
  props: {
20
25
  to: {
21
26
  type: String,
22
- required: true
23
- }
27
+ required: true,
28
+ },
24
29
  },
25
- template: '<a target="_blank" :href="`https://ws-ui.wsvdigital.com.au${this.to}`"><slot></slot></a>'
30
+ template:
31
+ '<a target="_blank" :href="`https://ws-ui.wsvdigital.com.au${this.to}`"><slot></slot></a>',
26
32
  })
33
+ app.use(createBootstrap())
27
34
  })
28
35
 
29
36
  const preview = {
30
37
  parameters: {
31
38
  options: {
32
39
  storySort: {
33
- method: 'alphabetical'
34
- }
40
+ method: 'alphabetical',
41
+ },
35
42
  },
36
43
  actions: { argTypesRegex: '^on[A-Z].*' },
37
44
  controls: {
38
45
  matchers: {
39
46
  color: /(background|color)$/i,
40
- date: /Date$/i
41
- }
47
+ date: /Date$/i,
48
+ },
42
49
  },
43
50
  viewport: {
44
- viewports: INITIAL_VIEWPORTS
45
- }
46
- }
51
+ viewports: INITIAL_VIEWPORTS,
52
+ },
53
+ },
47
54
  }
48
55
 
49
56
  export default preview
package/bin/deploy.sh CHANGED
@@ -22,4 +22,4 @@ cd storybook-static
22
22
 
23
23
  # Deploy to GH-Pages
24
24
  cd ..
25
- node node_modules/gh-pages/bin/gh-pages.js -d storybook-static -t true
25
+ node node_modules/gh-pages/bin/gh-pages.js -d storybook-static
package/lib/utility.js CHANGED
@@ -34,23 +34,25 @@ function isGovSite(url) {
34
34
  }
35
35
  }
36
36
 
37
- function navigateToPath(path, newTab) {
37
+ function navigateToPath(path, newTab, nuxtRouter) {
38
38
  const url = String(path).startsWith('www.') ? `http://${path}` : path
39
39
  const isAbsolute = isAbsoluteUrl(url)
40
- if (!isAbsolute && this.$router && !newTab) {
41
- this.$router.push({
42
- path: url
40
+ const router = nuxtRouter ? nuxtRouter : this.$router
41
+ if (!isAbsolute && router && !newTab) {
42
+ router.push({
43
+ path: url,
43
44
  })
44
- } else if (!isAbsolute && this.$router && newTab) {
45
+ } else if (!isAbsolute && router && newTab) {
45
46
  const hrefTag = Object.assign(document.createElement('a'), {
46
47
  target: '_blank',
47
- href: url
48
+ href: url,
48
49
  })
49
50
  hrefTag.click()
50
51
  } else {
51
52
  const hrefTag = Object.assign(document.createElement('a'), {
52
- target: isAbsolute ? '_blank' : '_self',
53
- href: url
53
+ // target: newTab ? '_blank' : '_self',
54
+ target: '_blank',
55
+ href: url,
54
56
  })
55
57
  hrefTag.click()
56
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,8 +43,7 @@
43
43
  "@storybook/cli": "^7.6.20",
44
44
  "axios": "^1.6.0",
45
45
  "bootstrap": "^5.3.2",
46
- "bootstrap-vue": "^2.23.1",
47
- "bootstrap-vue-next": "^0.25.10",
46
+ "bootstrap-vue-next": "^0.26.18",
48
47
  "date-fns": "^2.30.0",
49
48
  "formiojs": "4.13.13",
50
49
  "storybook-addon-deep-controls": "^0.6.2",
@@ -88,7 +87,6 @@
88
87
  "react": "^18.2.0",
89
88
  "react-dom": "^18.2.0",
90
89
  "sass": "1.77.6",
91
- "sass-loader": "^13.3.2",
92
90
  "semantic-release": "^19.0.3",
93
91
  "storybook": "^7.5.1",
94
92
  "stylelint": "^15.11.0",
@@ -99,5 +97,6 @@
99
97
  "vite-svg-loader": "^5.1.0",
100
98
  "vitest": "^0.34.6",
101
99
  "vue-jest": "^3.0.7"
102
- }
100
+ },
101
+ "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
103
102
  }
@@ -0,0 +1,10 @@
1
+ <svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1024_13)">
3
+ <path d="M11.8946 8.04107L18.8121 0H17.1729L11.1664 6.98195L6.36901 0H0.835815L8.09038 10.5579L0.835815 18.9902H2.47514L8.81815 11.6171L13.8845 18.9902H19.4177L11.8942 8.04107H11.8946ZM9.64929 10.651L8.91425 9.59963L3.06581 1.23406H5.58372L10.3035 7.98534L11.0385 9.03668L17.1736 17.8123H14.6557L9.64929 10.6514V10.651Z" fill="black"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_1024_13">
7
+ <rect width="18.5819" height="19" fill="white" transform="translate(0.835815)"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18.58 19">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: none;
7
+ }
8
+
9
+ .cls-2 {
10
+ fill: #356041;
11
+ }
12
+
13
+ .cls-3 {
14
+ clip-path: url(#clippath);
15
+ }
16
+ </style>
17
+ <clipPath id="clippath">
18
+ <rect class="cls-1" width="18.58" height="19"/>
19
+ </clipPath>
20
+ </defs>
21
+ <g id="Layer_2-2" data-name="Layer_2">
22
+ <g id="Layer_1-2">
23
+ <g class="cls-3">
24
+ <path class="cls-2" d="M11.06,8.04L17.98,0h-1.64l-6.01,6.98L5.53,0H0l7.25,10.56L0,18.99h1.64l6.34-7.37,5.07,7.37h5.53l-7.52-10.95h0ZM8.81,10.65l-.74-1.05L2.23,1.23h2.52l4.72,6.75.73,1.05,6.14,8.78h-2.52l-5.01-7.16h0Z"/>
25
+ </g>
26
+ </g>
27
+ </g>
28
+ </svg>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18.58 19">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: #fff;
7
+ }
8
+
9
+ .cls-2 {
10
+ fill: none;
11
+ }
12
+
13
+ .cls-3 {
14
+ clip-path: url(#clippath);
15
+ }
16
+ </style>
17
+ <clipPath id="clippath">
18
+ <rect class="cls-2" width="18.58" height="19"/>
19
+ </clipPath>
20
+ </defs>
21
+ <g id="Layer_2-2" data-name="Layer_2">
22
+ <g id="Layer_1-2">
23
+ <g class="cls-3">
24
+ <path class="cls-1" d="M11.06,8.04L17.98,0h-1.64l-6.01,6.98L5.53,0H0l7.25,10.56L0,18.99h1.64l6.34-7.37,5.07,7.37h5.53l-7.52-10.95h0ZM8.81,10.65l-.74-1.05L2.23,1.23h2.52l4.72,6.75.73,1.05,6.14,8.78h-2.52l-5.01-7.16h0Z"/>
25
+ </g>
26
+ </g>
27
+ </g>
28
+ </svg>
@@ -10,3 +10,54 @@
10
10
  border: none !important;
11
11
  }
12
12
  }
13
+
14
+ .modal-dialog {
15
+ .modal-content {
16
+ .modal-body {
17
+ .section-group__block {
18
+ max-width: 100%;
19
+ }
20
+ }
21
+ border-radius: 8px;
22
+ }
23
+ .modal-body {
24
+ padding: 32px;
25
+ fieldset {
26
+ display: flex;
27
+ flex-direction: row;
28
+ flex-wrap: wrap;
29
+ legend {
30
+ font-size: 28px;
31
+ font-weight: 700;
32
+ line-height: 32px;
33
+ letter-spacing: 0px;
34
+ margin-bottom: 32px;
35
+ }
36
+ .option {
37
+ margin-bottom: 32px;
38
+ flex-basis: 50%;
39
+ display: flex;
40
+ @media screen and (max-width: 600px) {
41
+ flex-basis: 100%;
42
+ }
43
+ input[type='checkbox'] {
44
+ height: 24px;
45
+ border: 1px solid #bababa;
46
+ width: 24px;
47
+ cursor: pointer;
48
+ }
49
+ label {
50
+ margin: 0px;
51
+ width: 80%;
52
+ position: relative;
53
+ left: 16px;
54
+ cursor: pointer;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ .modal-footer,
60
+ .modal-header {
61
+ border: none;
62
+ }
63
+ }
@@ -11,9 +11,8 @@
11
11
  :title-tag="titleTag"
12
12
  class="card-grid"
13
13
  :content-class="contentClass"
14
- :class="{
15
- [uniqueClass]: true
16
- }"
14
+ :class="`cardGrid-${gridId}`"
15
+ :card-browse-content="cardBrowseContent"
17
16
  >
18
17
  <template v-if="$slots.gridHeaderRight" v-slot:headerRight>
19
18
  <slot name="gridHeaderRight"></slot>
@@ -26,12 +25,12 @@
26
25
  ref="cardRow"
27
26
  :class="{
28
27
  ['card-grid__row--' + rowSpacing]: true,
29
- ['card-grid__row--' + rowClasses]: true
28
+ ['card-grid__row--' + rowClasses]: true,
30
29
  }"
31
30
  >
32
31
  <column
33
32
  v-for="(item, index) in cards"
34
- :key="`${redrawCounter}-${index}-${$options._uid}`"
33
+ :key="`${redrawCounter}-${index}-${gridId}`"
35
34
  ref="cardColumns"
36
35
  :lg="largeViewPort"
37
36
  :md="mediumViewPort"
@@ -39,7 +38,7 @@
39
38
  cols="12"
40
39
  class="card-grid__column"
41
40
  :class="{
42
- ['card-grid__column--' + columnSpacing]: true
41
+ ['card-grid__column--' + columnSpacing]: true,
43
42
  }"
44
43
  >
45
44
  <slot name="cardItem" :card="item" :index="index"></slot>
@@ -56,7 +55,7 @@
56
55
  import Row from './../../Containers/Row/index.vue'
57
56
  import Column from './../../Containers/Column/index.vue'
58
57
  import SectionGroup from './../../Containers/SectionGroup/index.vue'
59
- import debounce from 'lodash/debounce'
58
+ import { debounce } from 'lodash-es'
60
59
 
61
60
  export default {
62
61
  name: 'CardGrid',
@@ -64,52 +63,52 @@ export default {
64
63
  props: {
65
64
  title: {
66
65
  type: String,
67
- default: null
66
+ default: null,
68
67
  },
69
68
  subHeading: {
70
69
  type: String,
71
- default: null
70
+ default: null,
72
71
  },
73
72
  titleTag: {
74
73
  type: String,
75
- default: 'h2'
74
+ default: 'h2',
76
75
  },
77
76
  cards: {
78
77
  type: Array,
79
- default: () => []
78
+ default: () => [],
80
79
  },
81
80
  rtl: {
82
81
  type: Boolean,
83
- default: false
82
+ default: false,
84
83
  },
85
84
  columnsPerRow: {
86
85
  type: Number,
87
- default: 3
86
+ default: 3,
88
87
  },
89
88
  forceLgColumnsPerRow: {
90
89
  type: Number,
91
- default: undefined
90
+ default: undefined,
92
91
  },
93
92
  forceMdColumnsPerRow: {
94
93
  type: Number,
95
- default: undefined
94
+ default: undefined,
96
95
  },
97
96
  forceSmColumnsPerRow: {
98
97
  type: Number,
99
- default: undefined
98
+ default: undefined,
100
99
  },
101
100
  size: {
102
101
  type: String,
103
102
  default: 'page',
104
103
  validator: (value) =>
105
- ['half-content', 'content', 'page', 'full'].indexOf(value) >= 0
104
+ ['half-content', 'content', 'page', 'full'].indexOf(value) >= 0,
106
105
  },
107
106
  isSelectable: {
108
- type: Boolean
107
+ type: Boolean,
109
108
  },
110
109
  cardIdPrefix: {
111
110
  type: String,
112
- default: null
111
+ default: null,
113
112
  },
114
113
  backgroundVariant: {
115
114
  type: String,
@@ -122,45 +121,53 @@ export default {
122
121
  'grey',
123
122
  'yellow',
124
123
  'white',
125
- 'lightblue'
126
- ].indexOf(value) >= 0
124
+ 'lightblue',
125
+ ].indexOf(value) >= 0,
127
126
  },
128
127
  applyBackgroundOn: {
129
128
  type: String,
130
129
  default: 'section',
131
130
  validator: (value) =>
132
- ['content', 'block', 'container', 'section'].indexOf(value) >= 0
131
+ ['content', 'block', 'container', 'section'].indexOf(value) >= 0,
133
132
  },
134
133
  noPaddingTop: {
135
- type: Boolean
134
+ type: Boolean,
136
135
  },
137
136
  noPaddingBottom: {
138
- type: Boolean
137
+ type: Boolean,
139
138
  },
140
139
  rowSpacing: {
141
140
  type: String,
142
141
  default: 'large',
143
- validator: (value) => ['none', 'small', 'large'].indexOf(value) >= 0
142
+ validator: (value) => ['none', 'small', 'large'].indexOf(value) >= 0,
144
143
  },
145
144
  rowClasses: {
146
145
  type: String,
147
- default: null
146
+ default: null,
148
147
  },
149
148
  columnSpacing: {
150
149
  type: String,
151
150
  default: 'default',
152
- validator: (value) => ['default', 'none'].indexOf(value) >= 0
151
+ validator: (value) => ['default', 'none'].indexOf(value) >= 0,
153
152
  },
154
153
  contentClass: {
155
154
  type: String,
156
- default: ''
157
- }
155
+ default: '',
156
+ },
157
+ cardBrowseContent: {
158
+ type: Boolean,
159
+ default: false,
160
+ },
161
+ gridId: {
162
+ type: String,
163
+ default: 'default',
164
+ },
158
165
  },
159
166
  data() {
160
167
  return {
161
168
  childCards: [],
162
169
  redrawCounter: 0,
163
- setColumnSizeDebounce: debounce(this.setColumnSize, 500)
170
+ setColumnSizeDebounce: debounce(this.setColumnSize, 500),
164
171
  }
165
172
  },
166
173
  computed: {
@@ -187,38 +194,35 @@ export default {
187
194
  }
188
195
  return 6
189
196
  },
190
- uniqueClass() {
191
- return `cardGrid-${this.$options._uid}`
192
- }
193
197
  },
194
198
  watch: {
195
199
  cards: {
196
- handler: function() {
200
+ handler: function () {
197
201
  this.redrawCounter += 1
198
202
  this.setColumnSizeDebounce()
199
203
  },
200
- deep: true
204
+ deep: true,
201
205
  },
202
206
  columnsPerRow: {
203
- handler: function() {
207
+ handler: function () {
204
208
  this.setColumnSizeDebounce()
205
- }
209
+ },
206
210
  },
207
211
  forceSmColumnsPerRow: {
208
- handler: function() {
212
+ handler: function () {
209
213
  this.setColumnSizeDebounce()
210
- }
214
+ },
211
215
  },
212
216
  forceMdColumnsPerRow: {
213
- handler: function() {
217
+ handler: function () {
214
218
  this.setColumnSizeDebounce()
215
- }
219
+ },
216
220
  },
217
221
  forceLgColumnsPerRow: {
218
- handler: function() {
222
+ handler: function () {
219
223
  this.setColumnSizeDebounce()
220
- }
221
- }
224
+ },
225
+ },
222
226
  },
223
227
  mounted() {
224
228
  window.addEventListener('resize', this.setColumnSizeDebounce)
@@ -228,16 +232,32 @@ export default {
228
232
  window.removeEventListener('resize', this.setColumnSizeDebounce)
229
233
  },
230
234
  methods: {
235
+ cardTitleSelected(selectedCard, ev) {
236
+ this.clearCards()
237
+ selectedCard.selected = !!!selectedCard.selected
238
+ const selectedCardModelIndex = this.getChildIndex(selectedCard)
239
+
240
+ this.$emit('selected-title', {
241
+ selectedCard: selectedCard.selected
242
+ ? this.cards[selectedCardModelIndex]
243
+ : null,
244
+ selectedCardModelIndex,
245
+ ev,
246
+ })
247
+ },
231
248
  cardSelected(selectedCard, ev) {
232
249
  this.clearCards()
233
250
  selectedCard.selected = !!!selectedCard.selected
234
251
  const selectedCardModelIndex = this.getChildIndex(selectedCard)
252
+
235
253
  this.$emit('selected', {
236
254
  selectedCard: selectedCard.selected
237
- ? this.cards[selectedCardModelIndex]
255
+ ? this.cardBrowseContent
256
+ ? this.childCards[selectedCardModelIndex]
257
+ : this.cards[selectedCardModelIndex]
238
258
  : null,
239
259
  selectedCardModelIndex,
240
- ev
260
+ ev,
241
261
  })
242
262
  },
243
263
  clearCards(selectedCard) {
@@ -277,15 +297,15 @@ export default {
277
297
  this.$emit('isMobileOrTabletView', isMobileView || isTabletView)
278
298
  this.$emit('gridColumnSize', gridColumnSize)
279
299
  this.childCards.forEach((card) =>
280
- card.setGridMetaData(gridColumnSize, isMobileView, isTabletView)
300
+ card.setGridMetaData(gridColumnSize, isMobileView, isTabletView),
281
301
  )
282
302
  }
283
303
  })
284
304
  },
285
305
  handleFocus(ev) {
286
306
  this.$emit('focussed', ev)
287
- }
288
- }
307
+ },
308
+ },
289
309
  }
290
310
  </script>
291
311
 
@@ -23,6 +23,7 @@
23
23
  </template>
24
24
 
25
25
  <script>
26
+ import { getCurrentInstance } from 'vue'
26
27
  import Icon from './../../SubComponents/Icon/index.vue'
27
28
  import ChevUp from './../../../assets/icons/chev-up.svg?raw'
28
29
  import CaretUp from './../../../assets/icons/caret-up.svg?url'
@@ -71,11 +72,13 @@ export default {
71
72
  },
72
73
  //Identify if this is a tabbed card WSV2-374
73
74
  isTabbedCard() {
74
- const TabCardClassList = this.$parent.$el.classList
75
- if (TabCardClassList.contains('tabbed-card')) {
76
- return true
75
+ const instance = getCurrentInstance();
76
+ const parentEl = instance?.parent?.proxy?.$el.parentNode;
77
+
78
+ if (parentEl && parentEl.classList.contains('tabbed-card')) {
79
+ return true;
77
80
  } else {
78
- return false
81
+ return false;
79
82
  }
80
83
  },
81
84
  //If isTabbedCard, then supportive text must be displayed for up and down carets. WSV2-374