@policystudio/policy-studio-ui-vue 1.1.24 → 1.1.27
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@policystudio/policy-studio-ui-vue",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"description": "Policy Studio UI",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Policy Studio Team",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"core-js": "^3.6.5",
|
|
27
|
+
"v-tooltip": "^2.1.3",
|
|
27
28
|
"vue": "^2.6.11"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
v-if="rightLabelFormatter"
|
|
37
37
|
class="psui-el-dropdown-menu-list-item-rigth-label"
|
|
38
38
|
>
|
|
39
|
-
{{ rightLabelFormatter(item.key,
|
|
39
|
+
{{ rightLabelFormatter(item.key, getStudyDataLevel[item.key], getStudyDataLevel) }}
|
|
40
40
|
</div>
|
|
41
41
|
<div
|
|
42
42
|
v-else
|
|
@@ -142,6 +142,9 @@ export default {
|
|
|
142
142
|
getItems() {
|
|
143
143
|
return this.items
|
|
144
144
|
},
|
|
145
|
+
getStudyDataLevel() {
|
|
146
|
+
return this.studyData?.data || this.studyData
|
|
147
|
+
},
|
|
145
148
|
},
|
|
146
149
|
methods: {
|
|
147
150
|
selectItem(item) {
|
|
@@ -50,18 +50,19 @@
|
|
|
50
50
|
@click.native="onCollapse(item)"
|
|
51
51
|
/>
|
|
52
52
|
|
|
53
|
-
<
|
|
53
|
+
<div
|
|
54
54
|
v-if="item.is_disabled || item.tooltip_text"
|
|
55
|
-
layout="gray"
|
|
56
|
-
position="top"
|
|
57
55
|
class="psui-inline-flex psui-cursor-default sticky"
|
|
58
56
|
:class="{ 'is-last-deep' : item.last_deep }"
|
|
57
|
+
v-tooltip="{
|
|
58
|
+
content: getTooltipContent(item),
|
|
59
|
+
classes : 'layout-gray'
|
|
60
|
+
}"
|
|
59
61
|
>
|
|
60
|
-
<
|
|
61
|
-
<div class="flex psui-items-center psui-relative ">
|
|
62
|
+
<div class="flex psui-items-center psui-relative ">
|
|
62
63
|
<PsIcon v-if="item.has_blocked_icon" icon="do_disturb_alt" size="14" icon-classes="psui-absolute psui--left-1 psui-text-gray-50"/>
|
|
63
64
|
<p class="title psui-text-gray-50 opacity-100-childrens-on-hover">
|
|
64
|
-
|
|
65
|
+
|
|
65
66
|
{{ item.title }}
|
|
66
67
|
|
|
67
68
|
<PsIcon
|
|
@@ -74,16 +75,8 @@
|
|
|
74
75
|
/>
|
|
75
76
|
</p>
|
|
76
77
|
</div>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<p
|
|
80
|
-
v-if="item.tooltip_text || item.is_disabled"
|
|
81
|
-
class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
|
|
82
|
-
>
|
|
83
|
-
{{ item.is_disabled ? item.title + ' buildings are not allowed.' : item.tooltip_text }}
|
|
84
|
-
</p>
|
|
85
|
-
</template>
|
|
86
|
-
</PsRichTooltip>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
87
80
|
<p
|
|
88
81
|
v-else
|
|
89
82
|
class="title opacity-100-childrens-on-hover"
|
|
@@ -485,8 +478,6 @@ export default {
|
|
|
485
478
|
}
|
|
486
479
|
},
|
|
487
480
|
checkRowIsVisible(item) {
|
|
488
|
-
console.log('item',item.index)
|
|
489
|
-
console.log('this.collapsedRows',this.collapsedRows)
|
|
490
481
|
return this.collapsedRows.indexOf(item.index) < 0
|
|
491
482
|
},
|
|
492
483
|
checkRowIsCollapsed(item) {
|
|
@@ -560,6 +551,15 @@ export default {
|
|
|
560
551
|
return tailwindConfig.theme.colors[value.replace('psui-bg-', '')]
|
|
561
552
|
}
|
|
562
553
|
return value || '#ffffff'
|
|
554
|
+
},
|
|
555
|
+
getTooltipContent(item) {
|
|
556
|
+
let content = ''
|
|
557
|
+
if (item.tooltip_text) {
|
|
558
|
+
content = `<p class="psui-font-bold psui-text-gray-80 psui-text-xsmall">${item.tooltip_text}</p>`
|
|
559
|
+
} else if (item.is_disabled) {
|
|
560
|
+
content = `<p class="psui-font-bold psui-text-gray-80 psui-text-xsmall">${item.title} buildings are <br>not allowed.</p>`
|
|
561
|
+
}
|
|
562
|
+
return content
|
|
563
563
|
}
|
|
564
564
|
},
|
|
565
565
|
}
|