@worksafevictoria/wcl7.5 1.8.0-beta.12 → 1.8.0-beta.14
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/package.json
CHANGED
|
@@ -11,13 +11,11 @@
|
|
|
11
11
|
:is-selectable="true"
|
|
12
12
|
:row-spacing="isSingleColumn && !singleLineCards ? 'large' : 'small'"
|
|
13
13
|
@selected="selectedCard"
|
|
14
|
-
@gridColumnSize="
|
|
15
|
-
(gridColumnSize) => (isSingleColumn = gridColumnSize === 1)
|
|
16
|
-
"
|
|
14
|
+
@gridColumnSize="(gridColumnSize) => (isSingleColumn = gridColumnSize === 1)"
|
|
17
15
|
>
|
|
18
16
|
<template v-slot:cardItem="{ card }">
|
|
19
17
|
<card-grid-item
|
|
20
|
-
v-if="card.description
|
|
18
|
+
v-if="card.description"
|
|
21
19
|
:show-divider="!singleLineCards"
|
|
22
20
|
:card-header-title="singleLineCards ? null : card.title"
|
|
23
21
|
:header-size="card.titleSize"
|
|
@@ -39,10 +37,7 @@
|
|
|
39
37
|
[`w-100 text-left`]: alignLeft,
|
|
40
38
|
}"
|
|
41
39
|
>
|
|
42
|
-
<strong
|
|
43
|
-
v-if="singleLineCards && card.title"
|
|
44
|
-
v-html="card.title + ': '"
|
|
45
|
-
>
|
|
40
|
+
<strong v-if="singleLineCards && card.title" v-html="card.title + ': '">
|
|
46
41
|
</strong>
|
|
47
42
|
<span v-html="card.description"></span>
|
|
48
43
|
</div>
|
|
@@ -52,12 +47,12 @@
|
|
|
52
47
|
</card-grid>
|
|
53
48
|
</template>
|
|
54
49
|
<script>
|
|
55
|
-
import { navigateToPath, isGovSite } from
|
|
56
|
-
import CardGrid from
|
|
57
|
-
import CardGridItem from
|
|
50
|
+
import { navigateToPath, isGovSite } from "../../../../lib/utility";
|
|
51
|
+
import CardGrid from "../../Common/CardGrid/index.vue";
|
|
52
|
+
import CardGridItem from "../../Common/CardGridItem/index.vue";
|
|
58
53
|
|
|
59
54
|
export default {
|
|
60
|
-
name:
|
|
55
|
+
name: "Subheader",
|
|
61
56
|
components: { CardGrid, CardGridItem },
|
|
62
57
|
props: {
|
|
63
58
|
itemList: {
|
|
@@ -73,11 +68,11 @@ export default {
|
|
|
73
68
|
},
|
|
74
69
|
background: {
|
|
75
70
|
type: String,
|
|
76
|
-
default:
|
|
71
|
+
default: "none",
|
|
77
72
|
},
|
|
78
73
|
heading: {
|
|
79
74
|
type: String,
|
|
80
|
-
default:
|
|
75
|
+
default: "",
|
|
81
76
|
},
|
|
82
77
|
alignLeft: {
|
|
83
78
|
type: Boolean,
|
|
@@ -92,56 +87,50 @@ export default {
|
|
|
92
87
|
},
|
|
93
88
|
type: {
|
|
94
89
|
type: String,
|
|
95
|
-
default:
|
|
90
|
+
default: "",
|
|
96
91
|
},
|
|
97
92
|
},
|
|
98
93
|
data() {
|
|
99
94
|
return {
|
|
100
95
|
isSingleColumn: false,
|
|
101
|
-
}
|
|
96
|
+
};
|
|
102
97
|
},
|
|
103
98
|
methods: {
|
|
104
99
|
selectedCard(card) {
|
|
105
100
|
// Some custom logic for gov caretaker logic
|
|
106
101
|
if (
|
|
107
|
-
(this.$config
|
|
108
|
-
? this.$config.public.caretaker
|
|
109
|
-
: process.env.CARETAKER) === 'true'
|
|
102
|
+
(this.$config ? this.$config.public.caretaker : process.env.CARETAKER) === "true"
|
|
110
103
|
) {
|
|
111
104
|
if (!isGovSite(card?.selectedCard?.linkHref)) {
|
|
112
105
|
// this.$store.commit('page/SET_CARETAKER_REF', 'subheader')
|
|
113
106
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.linkHref)
|
|
114
107
|
if (this.$pageStore) {
|
|
115
|
-
this.$pageStore.caretaker.referrer =
|
|
108
|
+
this.$pageStore.caretaker.referrer = "subheader";
|
|
116
109
|
}
|
|
117
110
|
if (this.$bus) {
|
|
118
|
-
this.$bus.$emit(
|
|
111
|
+
this.$bus.$emit("caretaker-open", card?.selectedCard?.linkHref);
|
|
119
112
|
}
|
|
120
113
|
} else {
|
|
121
114
|
navigateToPath.call(
|
|
122
115
|
this,
|
|
123
116
|
card?.selectedCard?.linkHref,
|
|
124
|
-
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
125
|
-
)
|
|
117
|
+
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
118
|
+
);
|
|
126
119
|
}
|
|
127
120
|
} else {
|
|
128
121
|
navigateToPath.call(
|
|
129
122
|
this,
|
|
130
123
|
card?.selectedCard?.linkHref,
|
|
131
|
-
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
132
|
-
)
|
|
124
|
+
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
125
|
+
);
|
|
133
126
|
}
|
|
134
127
|
},
|
|
135
128
|
},
|
|
136
|
-
}
|
|
129
|
+
};
|
|
137
130
|
</script>
|
|
138
131
|
<style lang="scss" scoped>
|
|
139
132
|
.subheader {
|
|
140
|
-
|
|
141
133
|
&--resource {
|
|
142
|
-
:deep(.card-grid__column) {
|
|
143
|
-
width: auto;
|
|
144
|
-
}
|
|
145
134
|
:deep(.card-grid-item__description--withIcon) {
|
|
146
135
|
align-items: center;
|
|
147
136
|
}
|
|
@@ -284,7 +284,8 @@ export default {
|
|
|
284
284
|
this.type === "paragraph--resource_group" ||
|
|
285
285
|
this.type === "paragraph--resource_list"
|
|
286
286
|
) {
|
|
287
|
-
allCards.cards = this.sortByDate(allCards.cards);
|
|
287
|
+
// allCards.cards = this.sortByDate(allCards.cards);
|
|
288
|
+
allCards.cards = allCards.cards;
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
291
|
return allCards;
|