@policystudio/policy-studio-ui-vue 1.1.17 → 1.1.19

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.
@@ -2037,6 +2037,7 @@ video {
2037
2037
  .psui-el-table-results.layout-results tbody tr .title {
2038
2038
  display: flex;
2039
2039
  align-items: center;
2040
+ line-height: 24px;
2040
2041
  }
2041
2042
 
2042
2043
  .psui-el-table-results.layout-results tbody tr td {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -83,6 +83,7 @@
83
83
 
84
84
  .title {
85
85
  @apply psui-flex psui-items-center;
86
+ line-height: 24px;
86
87
  }
87
88
 
88
89
  td {
@@ -43,7 +43,7 @@
43
43
  size="24"
44
44
  class="actions-button psui-transition psui-transform psui-cursor-pointer"
45
45
  :icon-classes="item.is_disabled ? 'psui-text-gray-40' : getIconClasses(item)"
46
- :style="{ display: 'flex' }"
46
+ display="flex"
47
47
  :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90', { 'psui-pointer-events-none' : item.is_disabled }]"
48
48
  @click.native="onCollapse(item)"
49
49
  />
@@ -56,7 +56,18 @@
56
56
  :class="{ 'is-last-deep' : item.last_deep }"
57
57
  >
58
58
  <template v-slot:trigger>
59
- <p class="title psui-text-gray-50">{{ item.title }}</p>
59
+ <p class="title psui-text-gray-50 opacity-100-childrens-on-hover">
60
+ {{ item.title }}
61
+
62
+ <PsIcon
63
+ v-if="item.has_helper"
64
+ icon="info"
65
+ size="14"
66
+ class="psui-text-gray-40 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
67
+ display="flex"
68
+ @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
69
+ />
70
+ </p>
60
71
  </template>
61
72
  <template v-slot:content>
62
73
  <p
@@ -88,7 +99,7 @@
88
99
  icon="info"
89
100
  size="14"
90
101
  class="psui-text-blue-60 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
91
- :style="{ display: 'flex' }"
102
+ display="flex"
92
103
  @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
93
104
  />
94
105
  </p>
@@ -98,7 +109,7 @@
98
109
  :icon="item.has_badge"
99
110
  size="20"
100
111
  class="badge psui-text-green-70 psui-leading-none psui-ml-0"
101
- :style="{ display: 'flex' }"
112
+ display="flex"
102
113
  />
103
114
  </div>
104
115
  <div
@@ -118,7 +129,7 @@
118
129
  :icon="getIcon(item)"
119
130
  class="psui-flex psui-text-gray-40 psui-cursor-pointer leading-none hover:psui-text-blue-60 psui-gap-3 psui-px-5 psui-py-1 transition-all"
120
131
  size="18"
121
- :style="{ display: 'flex' }"
132
+ display="flex"
122
133
  @click.native="executeCallback(item)"
123
134
  />
124
135
  </template>
@@ -141,7 +152,7 @@
141
152
  icon="more_horiz"
142
153
  size="18"
143
154
  class="psui-flex psui-text-gray-40 psui-cursor-pointer leading-none hover:psui-text-blue-60 psui-gap-3 psui-px-5 psui-py-1 transition-all"
144
- :style="{ display: 'flex' }"
155
+ display="flex"
145
156
  />
146
157
  </template>
147
158
  <template v-slot:items>
@@ -171,35 +182,35 @@
171
182
  v-if="layout != 'comparison'"
172
183
  class="psui-space-x-2 psui-show-childrens-on-hover"
173
184
  >
174
- <PsTooltip v-if="column.hasProjections && !item.is_disabled && selectedRow != item.id">
185
+ <PsTooltip v-if="column.hasProjections && !item.is_disabled && selectedRow == item.id && columnSelectedKey == column.key">
175
186
  <template v-slot:trigger>
176
187
  <PsIcon
177
- icon="bar_chart"
188
+ icon="close"
178
189
  size="16"
179
190
  class="psui-cursor-pointer"
180
- icon-classes="psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
181
- :style="{ display: 'flex' }"
182
- @click.native="onSelectRow(item, column)"
191
+ icon-classes="psui-text-blue-60 psui-leading-none psui-transition"
192
+ display="flex"
193
+ @click.native="onCloseSelectRow(item)"
183
194
  />
184
195
  </template>
185
196
  <template v-slot:content>
186
- Show projections in the chart
197
+ Close projections
187
198
  </template>
188
199
  </PsTooltip>
189
200
 
190
- <PsTooltip v-if="column.hasProjections && !item.is_disabled && selectedRow == item.id && columnSelectedKey == column.key">
201
+ <PsTooltip v-else>
191
202
  <template v-slot:trigger>
192
203
  <PsIcon
193
- icon="close"
204
+ icon="bar_chart"
194
205
  size="16"
195
206
  class="psui-cursor-pointer"
196
- icon-classes="psui-text-blue-60 psui-leading-none psui-transition"
197
- :style="{ display: 'flex' }"
198
- @click.native="onCloseSelectRow(item)"
207
+ icon-classes="psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
208
+ display="flex"
209
+ @click.native="onSelectRow(item, column)"
199
210
  />
200
211
  </template>
201
212
  <template v-slot:content>
202
- Close projections
213
+ Show projections in the chart
203
214
  </template>
204
215
  </PsTooltip>
205
216
 
@@ -425,6 +436,13 @@ export default {
425
436
  },
426
437
  mounted () {
427
438
  this.setCollapsedRows()
439
+ this.$eventBus.$on('resetPolicyImpactItemSelected', (item) => {
440
+ this.$eventBus.$emit('setPolicyItemSelected', { item, columnSelectedKey: 'forecast_emissions_savings' })
441
+ this.selectedRow = null
442
+ })
443
+ },
444
+ beforeDestroy() {
445
+ this.$eventBus.$off('resetPolicyImpactItemSelected')
428
446
  },
429
447
  methods: {
430
448
  setCollapsedRows() {
@@ -516,8 +534,7 @@ export default {
516
534
  this.$emit('policy-selected', { item: item, column: column })
517
535
  },
518
536
  onCloseSelectRow(item) {
519
- this.$eventBus.$emit('setPolicyItemSelected', { item, columnSelectedKey: 'forecast_emissions_savings' })
520
- this.selectedRow = null
537
+ this.$eventBus.$emit('resetPolicyImpactItemSelected', item)
521
538
  }
522
539
  },
523
540
  }