@windward/core 0.12.0 → 0.12.1
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/CHANGELOG.md
CHANGED
|
@@ -83,6 +83,9 @@ export default {
|
|
|
83
83
|
ImageAssetViewer,
|
|
84
84
|
},
|
|
85
85
|
extends: BaseContentBlock,
|
|
86
|
+
data() {
|
|
87
|
+
return {}
|
|
88
|
+
},
|
|
86
89
|
beforeMount() {
|
|
87
90
|
this.block.body = this.$t(
|
|
88
91
|
'windward.core.shared.content_blocks.title.tab'
|
|
@@ -117,9 +120,6 @@ export default {
|
|
|
117
120
|
this.block.metadata.config.currentTab = 0
|
|
118
121
|
}
|
|
119
122
|
},
|
|
120
|
-
data() {
|
|
121
|
-
return {}
|
|
122
|
-
},
|
|
123
123
|
methods: {
|
|
124
124
|
async onBeforeSave() {
|
|
125
125
|
this.block.metadata.config.items.forEach((element) => {
|
|
@@ -128,12 +128,15 @@ export default {
|
|
|
128
128
|
this.block.metadata.config.currentTab = null
|
|
129
129
|
},
|
|
130
130
|
getImageWidth(item) {
|
|
131
|
-
if (item
|
|
131
|
+
if (item?.imageAsset?.display) {
|
|
132
132
|
return String(item.imageAsset.display.width) + '%'
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
getTextImageContainerClass(item) {
|
|
136
|
-
const { margin, width } = item
|
|
136
|
+
const { margin, width } = item?.imageAsset?.display || {
|
|
137
|
+
margin: null,
|
|
138
|
+
width: null,
|
|
139
|
+
}
|
|
137
140
|
// if full width set container to column
|
|
138
141
|
if (width === 100) {
|
|
139
142
|
return margin === 'top'
|
|
@@ -160,7 +163,7 @@ export default {
|
|
|
160
163
|
}
|
|
161
164
|
},
|
|
162
165
|
getImageOrder(item) {
|
|
163
|
-
const margin = item
|
|
166
|
+
const margin = item?.imageAsset?.display?.margin
|
|
164
167
|
// filter out tab blocks that were created before custom
|
|
165
168
|
// spacing was added to image asset settings
|
|
166
169
|
if (margin) {
|
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-
|
|
4
|
-
class="glossary-word"
|
|
5
|
-
:class="{ active: show }"
|
|
6
|
-
@click="show = !show"
|
|
7
|
-
>
|
|
8
|
-
<v-tooltip
|
|
2
|
+
<div class="glossary-word" :class="{ active: show }">
|
|
3
|
+
<v-menu
|
|
9
4
|
v-model="show"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
color="primary"
|
|
5
|
+
:close-on-content-click="false"
|
|
6
|
+
offset-y
|
|
13
7
|
max-width="768px"
|
|
14
|
-
z-index="10"
|
|
15
8
|
>
|
|
16
9
|
<template #activator="{ on }">
|
|
17
|
-
<span
|
|
10
|
+
<span
|
|
11
|
+
tabindex="0"
|
|
12
|
+
v-on="on"
|
|
13
|
+
@click.stop="show = !show"
|
|
14
|
+
>
|
|
18
15
|
<slot name="term"></slot>
|
|
19
16
|
</span>
|
|
20
17
|
</template>
|
|
21
|
-
<div>
|
|
22
|
-
<div v-if="$slots['definition']">
|
|
23
|
-
<h6 class="text-capitalize">
|
|
24
|
-
<slot name="term"></slot>
|
|
25
|
-
{{
|
|
26
|
-
$t(
|
|
27
|
-
'windward.core.components.utils.tiny_mce_wrapper.definition'
|
|
28
|
-
)
|
|
29
|
-
}}
|
|
30
|
-
:
|
|
31
|
-
</h6>
|
|
32
|
-
<p>
|
|
33
|
-
<slot name="definition"></slot>
|
|
34
|
-
</p>
|
|
35
|
-
</div>
|
|
36
|
-
<div v-if="$slots['alternate_forms']">
|
|
37
|
-
<h4 class="text-capitalize">
|
|
38
|
-
<slot name="term"></slot>
|
|
39
|
-
{{
|
|
40
|
-
$t(
|
|
41
|
-
'windward.core.components.utils.tiny_mce_wrapper.alternate_forms'
|
|
42
|
-
)
|
|
43
|
-
}}
|
|
44
|
-
:
|
|
45
|
-
</h4>
|
|
46
|
-
<p><slot name="alternate_forms"></slot></p>
|
|
47
|
-
</div>
|
|
48
18
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
19
|
+
<v-card>
|
|
20
|
+
<v-card-text>
|
|
21
|
+
<div v-if="$slots['definition']">
|
|
22
|
+
<h6 class="text-capitalize">
|
|
23
|
+
<slot name="term"></slot>
|
|
24
|
+
{{
|
|
25
|
+
$t(
|
|
26
|
+
'windward.core.components.utils.tiny_mce_wrapper.definition'
|
|
27
|
+
)
|
|
28
|
+
}}
|
|
29
|
+
:
|
|
30
|
+
</h6>
|
|
31
|
+
<p>
|
|
32
|
+
<slot name="definition"></slot>
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
<div v-if="$slots['alternate_forms']">
|
|
36
|
+
<h4 class="text-capitalize">
|
|
37
|
+
<slot name="term"></slot>
|
|
38
|
+
{{
|
|
39
|
+
$t(
|
|
40
|
+
'windward.core.components.utils.tiny_mce_wrapper.alternate_forms'
|
|
41
|
+
)
|
|
42
|
+
}}
|
|
43
|
+
:
|
|
44
|
+
</h4>
|
|
45
|
+
<p><slot name="alternate_forms"></slot></p>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div v-if="$slots['related_terms']">
|
|
49
|
+
<h4 class="text-capitalize">
|
|
50
|
+
{{
|
|
51
|
+
$t(
|
|
52
|
+
'windward.core.components.utils.tiny_mce_wrapper.related_terms'
|
|
53
|
+
)
|
|
54
|
+
}}
|
|
55
|
+
:
|
|
56
|
+
</h4>
|
|
57
|
+
<p><slot name="related_terms"></slot></p>
|
|
58
|
+
</div>
|
|
59
|
+
</v-card-text>
|
|
60
|
+
</v-card>
|
|
61
|
+
</v-menu>
|
|
62
62
|
</div>
|
|
63
63
|
</template>
|
|
64
64
|
|
|
@@ -67,14 +67,12 @@ export default {
|
|
|
67
67
|
name: 'GlossaryToolTip',
|
|
68
68
|
data() {
|
|
69
69
|
return {
|
|
70
|
-
show: false
|
|
70
|
+
show: false
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
},
|
|
73
|
+
beforeDestroy() {
|
|
74
|
+
this.show = false
|
|
75
|
+
}
|
|
78
76
|
}
|
|
79
77
|
</script>
|
|
80
78
|
|