@policystudio/policy-studio-ui-vue 1.1.88 → 1.1.90-beta.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 (67) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +70 -67
  3. package/.github/workflows/deploy-storybook.yml +1 -1
  4. package/.storybook/eventBus.js +25 -2
  5. package/.storybook/main.js +17 -21
  6. package/babel.config.js +17 -3
  7. package/dist/css/psui_styles.css +0 -1
  8. package/package.json +36 -23
  9. package/scripts/kill-port.sh +12 -0
  10. package/src/assets/scss/components/PsTableResults.scss +3 -2
  11. package/src/components/accordion/PsAccordion.vue +20 -21
  12. package/src/components/accordion/PsAccordionItem.vue +30 -8
  13. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +6 -3
  14. package/src/components/badges-and-tags/PsCardInfos.vue +3 -1
  15. package/src/components/badges-and-tags/PsChartLegend.vue +19 -5
  16. package/src/components/badges-and-tags/PsCostEffectBar.vue +4 -5
  17. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
  18. package/src/components/badges-and-tags/PsTestimonialCard.vue +6 -4
  19. package/src/components/buttons/PsButton.vue +30 -11
  20. package/src/components/chips/PsChips.vue +5 -2
  21. package/src/components/controls/PsCheckbox.vue +5 -2
  22. package/src/components/controls/PsCheckboxSimple.vue +4 -4
  23. package/src/components/controls/PsDraggable.vue +70 -67
  24. package/src/components/controls/PsInlineSelector.vue +13 -14
  25. package/src/components/controls/PsRadioButton.vue +10 -5
  26. package/src/components/controls/PsRadioButtonSimple.vue +3 -3
  27. package/src/components/controls/PsSlider.vue +6 -6
  28. package/src/components/controls/PsSwitch.vue +13 -3
  29. package/src/components/controls/PsToggle.vue +14 -11
  30. package/src/components/data-graphics/PsBarChart.vue +4 -2
  31. package/src/components/datatable/PsDataTable.vue +14 -5
  32. package/src/components/datatable/PsDataTableItem.vue +17 -4
  33. package/src/components/forms/PsDropdown.vue +8 -5
  34. package/src/components/forms/PsDropdownList.vue +1 -1
  35. package/src/components/forms/PsInput.vue +30 -14
  36. package/src/components/forms/PsInputSelect.vue +33 -11
  37. package/src/components/forms/PsInputTextArea.vue +15 -4
  38. package/src/components/navigations/PsBreadcrumb.vue +1 -1
  39. package/src/components/notifications/PsDialog.vue +11 -5
  40. package/src/components/notifications/PsSimpleAlert.vue +22 -10
  41. package/src/components/notifications/PsToast.vue +8 -3
  42. package/src/components/playground/PsScrollBar.vue +122 -50
  43. package/src/components/table-results/PsTableResults.vue +79 -58
  44. package/src/components/table-results/PsTableResultsBody.vue +3 -1
  45. package/src/components/table-results/PsTableResultsHead.vue +27 -8
  46. package/src/components/table-results/PsTableResultsHeadComparison.vue +24 -8
  47. package/src/components/table-results/PsTableResultsHeadFlexible.vue +18 -6
  48. package/src/components/table-results/PsTableResultsRow.vue +6 -2
  49. package/src/components/tabs/PsTabHeader.vue +19 -16
  50. package/src/components/tooltip/PsDialogTooltip.vue +18 -8
  51. package/src/components/tooltip/PsRichTooltip.vue +12 -5
  52. package/src/components/tooltip/PsTooltip.vue +17 -9
  53. package/src/components/ui/PsDotLoader.vue +5 -5
  54. package/src/components/ui/PsIcon.vue +6 -2
  55. package/src/index.js +0 -1
  56. package/src/stories/Button.stories.js +48 -130
  57. package/src/stories/Button.vue +59 -0
  58. package/src/stories/{ElevationSystem.stories.mdx → ElevationSystem.mdx} +1 -1
  59. package/src/stories/Header.stories.js +41 -0
  60. package/src/stories/Header.vue +77 -0
  61. package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +101 -101
  62. package/src/stories/{Typography.stories.mdx → Typography.mdx} +107 -105
  63. package/src/stories/button.css +30 -0
  64. package/src/stories/header.css +32 -0
  65. package/webpack.config.js +22 -0
  66. package/backup-package-lock.json +0 -37194
  67. /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
@@ -13,7 +13,7 @@
13
13
  { 'is-sticky': isSticky }
14
14
  ]"
15
15
  >
16
- <slot name="header"></slot>
16
+ <slot name="header" />
17
17
 
18
18
  <tbody>
19
19
  <tr
@@ -24,10 +24,11 @@
24
24
  {
25
25
  'is-disabled' : item.is_disabled,
26
26
  'is-first' : item.deep == 0,
27
- 'psui-hidden' : checkRowIsCollapsed(item),
27
+ 'psui-hidden' : checkRowIsCollapsed(item) || item.not_visible,
28
28
  'is-last' : item.is_last,
29
29
  'is-active' : selectedRow == item.id,
30
- 'removed-class' : (item.slug == 'removed_measures' || item.is_excluded) && layout == 'flexible'
30
+ 'removed-class' : (item.slug == 'removed_measures' || item.is_excluded) && layout == 'flexible',
31
+ 'appended-row' : item.is_appended,
31
32
  },
32
33
  `${item.type}`
33
34
  ]"
@@ -39,7 +40,6 @@
39
40
  <td
40
41
  :style="item.background_color ? `background-color: ${getBackgroundColor(item.background_color)}; transition: background-color 0.5s ease;` : ''"
41
42
  >
42
-
43
43
  <div class="psui-flex psui-relative">
44
44
  <div
45
45
  v-tooltip="{
@@ -48,42 +48,55 @@
48
48
  }"
49
49
  >
50
50
  <PsIcon
51
- v-if="item.remove_add_button"
52
- :icon="item.remove_add_button_icon"
53
- class="psui-flex psui-text-gray-40 pl-4 psui-cursor-pointer leading-none hover:psui-text-blue-60 transition-all"
54
- size="15"
55
- display="flex"
56
- @click.native="$emit('removeOrAddButtonChange', item, $event)"
57
- />
51
+ v-if="item.remove_add_button"
52
+ :icon="item.remove_add_button_icon"
53
+ class="psui-flex psui-text-gray-40 pl-4 psui-cursor-pointer leading-none hover:psui-text-blue-60 transition-all"
54
+ size="15"
55
+ display="flex"
56
+ @click="$emit('removeOrAddButtonChange', item, $event)"
57
+ />
58
58
  </div>
59
59
  <div
60
60
  class="psui-flex psui-items-center psui-space-x-3"
61
61
  :style="{paddingLeft: `${item.deep * 16}px`}"
62
- >
62
+ >
63
63
  <PsIcon
64
- v-if="!item.last_deep || item.type === 'total'"
64
+ v-if="(!item.last_deep || item.type === 'total') && !item.is_appended"
65
65
  icon="expand_more"
66
66
  size="24"
67
67
  class="actions-button psui-transition psui-transform psui-cursor-pointer"
68
68
  :icon-classes="item.is_disabled ? 'psui-text-gray-40' : getIconClasses(item)"
69
69
  display="flex"
70
70
  :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90',
71
- { 'psui--rotate-90': item.is_disabled },
72
- { 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
71
+ { 'psui--rotate-90': item.is_disabled },
72
+ { 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
73
73
  ]"
74
- @click.native="onCollapse(item, $event)"
74
+ @click="onCollapse(item, $event)"
75
75
  />
76
76
 
77
+ <div v-if="item.is_appended">
78
+ <span class="psui-text-small psui-font-bold psui-text-blue-60 psui-ml-2">
79
+ {{ item.title }}
80
+ </span>
81
+ </div>
82
+
77
83
  <div
78
- v-if="item.is_disabled || item.tooltip_text"
84
+ v-else-if="item.is_disabled || item.tooltip_text"
79
85
  class="psui-inline-flex psui-cursor-default sticky"
80
86
  :class="{ 'is-last-deep' : item.last_deep }"
81
87
  v-tooltip="getTooltipContent(item)"
82
88
  >
83
89
  <div class="flex psui-items-center psui-relative ">
84
- <PsIcon v-if="item.has_blocked_icon" icon="do_disturb_alt" size="14" icon-classes="psui-absolute psui--left-1 psui-text-gray-50"/>
85
- <p class="title psui-text-gray-50 opacity-100-childrens-on-hover" :style='item.text_color ? `color: ${item.text_color};` : ""'>
86
-
90
+ <PsIcon
91
+ v-if="item.has_blocked_icon"
92
+ icon="do_disturb_alt"
93
+ size="14"
94
+ icon-classes="psui-absolute psui--left-1 psui-text-gray-50"
95
+ />
96
+ <p
97
+ class="title psui-text-gray-50 opacity-100-childrens-on-hover"
98
+ :style="item.text_color ? `color: ${item.text_color};` : ''"
99
+ >
87
100
  {{ item.title }}
88
101
 
89
102
  <PsIcon
@@ -92,7 +105,7 @@
92
105
  size="14"
93
106
  class="psui-text-gray-40 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
94
107
  display="flex"
95
- @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
108
+ @click="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
96
109
  />
97
110
  </p>
98
111
  </div>
@@ -115,7 +128,7 @@
115
128
  :class="[{'psui-text-gray-50': item.tooltip_text}, {'psui-text-blue-60': !item.tooltip_text}]"
116
129
  class="psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
117
130
  display="flex"
118
- @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
131
+ @click="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
119
132
  />
120
133
  </p>
121
134
 
@@ -137,18 +150,18 @@
137
150
  layout="gray"
138
151
  class="psui-inline-flex psui-cursor-default"
139
152
  :class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
140
- :ignoreDialog="getIgnoreDialogIcon(item)"
153
+ :ignore-dialog="getIgnoreDialogIcon(item)"
141
154
  >
142
- <template v-slot:trigger>
155
+ <template #trigger>
143
156
  <PsIcon
144
157
  :icon="getIcon(item)"
145
158
  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"
146
159
  size="18"
147
160
  display="flex"
148
- @click.native="executeCallback(item)"
161
+ @click="executeCallback(item)"
149
162
  />
150
163
  </template>
151
- <template v-slot:content>
164
+ <template #content>
152
165
  <p
153
166
  class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
154
167
  >
@@ -163,7 +176,7 @@
163
176
  :class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
164
177
  position="custom"
165
178
  >
166
- <template v-slot:dropdownTrigger>
179
+ <template #dropdownTrigger>
167
180
  <PsIcon
168
181
  icon="more_horiz"
169
182
  size="18"
@@ -171,7 +184,7 @@
171
184
  display="flex"
172
185
  />
173
186
  </template>
174
- <template v-slot:items>
187
+ <template #items>
175
188
  <ul class="psui-w-full psui-font-bold psui-my-3">
176
189
  <li
177
190
  v-for="(action, index) in item.actions"
@@ -204,48 +217,54 @@
204
217
  :class="column.isCenteredContent ? 'psui-justify-center' : 'psui-justify-end'"
205
218
  >
206
219
  <PsTooltip v-if="isSelectedRow(column,item)">
207
- <template v-slot:trigger>
220
+ <template #trigger>
208
221
  <PsIcon
209
222
  icon="close"
210
223
  size="16"
211
224
  class="psui-cursor-pointer"
212
225
  icon-classes="psui-text-blue-60 psui-leading-none psui-transition"
213
226
  display="flex"
214
- @click.native="onCloseSelectRow(item,column)"
227
+ @click="onCloseSelectRow(item,column)"
215
228
  />
216
229
  </template>
217
- <template v-slot:content>
230
+ <template #content>
218
231
  Close projections
219
232
  </template>
220
233
  </PsTooltip>
221
234
 
222
- <PsTooltip v-else-if="column.hasProjections && !item.is_disabled && item.disable_projection_select !== true && layout != 'flexible' ||
223
- column.hasProjections && item.disable_projection_select != true && item.deep != 0 && layout == 'flexible'"
235
+ <PsTooltip
236
+ v-else-if="column.hasProjections && !item.is_disabled && item.disable_projection_select !== true && layout != 'flexible' ||
237
+ column.hasProjections && item.disable_projection_select != true && item.deep != 0 && layout == 'flexible'"
224
238
  >
225
- <template v-slot:trigger>
239
+ <template #trigger>
226
240
  <PsIcon
227
241
  icon="bar_chart"
228
242
  size="16"
229
243
  class="psui-cursor-pointer"
230
244
  icon-classes="psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
231
245
  display="flex"
232
- @click.native="onSelectRow(item, column, $event)"
246
+ @click="onSelectRow(item, column, $event)"
233
247
  />
234
248
  </template>
235
- <template v-slot:content>
249
+ <template #content>
236
250
  Show projections in the chart
237
251
  </template>
238
252
  </PsTooltip>
239
- <p class="ps-table-cell-value" v-if="!column.isSwitch">
253
+ <p
254
+ class="ps-table-cell-value"
255
+ v-if="!column.isSwitch"
256
+ >
240
257
  <template v-if="column.hasScoreHelper">
241
258
  <PsTooltip
242
259
  layout="blue"
243
260
  >
244
- <template v-slot:trigger>
261
+ <template #trigger>
245
262
  {{ getItemContent(column, item) }}
246
263
  </template>
247
- <template v-slot:content>
248
- <p class="psui-text-xsmall psui-font-bold">{{ column.hasScoreHelper.title }}</p>
264
+ <template #content>
265
+ <p class="psui-text-xsmall psui-font-bold">
266
+ {{ column.hasScoreHelper.title }}
267
+ </p>
249
268
  {{ column.hasScoreHelper.description }}
250
269
  </template>
251
270
  </PsTooltip>
@@ -274,20 +293,20 @@
274
293
  classes: 'layout-blue'
275
294
  }"
276
295
  >
277
- <div class="flex psui-items-center psui-relative">
278
- <span
279
- v-if="item.has_flag"
280
- class="psui-w-2 psui-h-2 psui-bg-yellow-20 psui-absolute psui--right-2 psui--top-2 psui-rounded-md"
281
- />
282
- <PsSwitch
283
- :disabled="item.data.is_disabled || item.is_excluded"
284
- :value="item.data[column.key]"
285
- :background-color="switchButtonBackgroundColor"
286
- class="psui-justify-self-center"
287
- :class="{'psui-pointer-events-none':preventClickOnSwitchButtons}"
288
- size="small"
289
- @change="$emit('switchButtonItemChanged', item, $event)"
290
- />
296
+ <div class="flex psui-items-center psui-relative">
297
+ <span
298
+ v-if="item.has_flag"
299
+ class="psui-w-2 psui-h-2 psui-bg-yellow-20 psui-absolute psui--right-2 psui--top-2 psui-rounded-md"
300
+ />
301
+ <PsSwitch
302
+ :disabled="item.data.is_disabled || item.is_excluded"
303
+ :value="item.data[column.key]"
304
+ :background-color="switchButtonBackgroundColor"
305
+ class="psui-justify-self-center"
306
+ :class="{'psui-pointer-events-none':preventClickOnSwitchButtons}"
307
+ size="small"
308
+ @change="$emit('switchButtonItemChanged', item, $event)"
309
+ />
291
310
  </div>
292
311
  </div>
293
312
  </div>
@@ -307,7 +326,10 @@
307
326
  :fill-width="getPsBarChartWidth(column.key, item.data[column.key])"
308
327
  />
309
328
 
310
- <p class="ps-table-cell-value" v-else-if="item.data[column.key] != 0">
329
+ <p
330
+ class="ps-table-cell-value"
331
+ v-else-if="item.data[column.key] != 0"
332
+ >
311
333
  {{ formatFunction(column.key, item.data[column.key], item.data) }}
312
334
  </p>
313
335
  </div>
@@ -316,8 +338,7 @@
316
338
  </template>
317
339
  </tr>
318
340
  </tbody>
319
-
320
- <!-- <slot name="footer"></slot> -->
341
+ <slot name="footer" />
321
342
  </table>
322
343
  </div>
323
344
  </template>
@@ -511,7 +532,7 @@ export default {
511
532
  this.selectedRow = null
512
533
  })
513
534
  },
514
- beforeDestroy() {
535
+ beforeUnmount() {
515
536
  eventBus.$off('resetPolicyImpactItemSelected')
516
537
  this.$refs.tableWrapper.removeEventListener('scroll', this.handleTableScroll)
517
538
  },
@@ -5,7 +5,9 @@
5
5
  :key="index"
6
6
  >
7
7
  <td>
8
- <p class="title">{{ row.title }}</p>
8
+ <p class="title">
9
+ {{ row.title }}
10
+ </p>
9
11
  </td>
10
12
 
11
13
  <template
@@ -3,7 +3,9 @@
3
3
  <tr>
4
4
  <th>
5
5
  <div v-if="firstColumnTitle">
6
- <p class="title">{{ firstColumnTitle }}</p>
6
+ <p class="title">
7
+ {{ firstColumnTitle }}
8
+ </p>
7
9
  </div>
8
10
  </th>
9
11
 
@@ -13,14 +15,16 @@
13
15
  :colspan="columnGroup.columns.reduce( (prev, cur) => cur.isActive ? prev + 1 : prev, 0 )"
14
16
  >
15
17
  <div class="psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
16
- <p class="title">{{ columnGroup.title }}</p>
18
+ <p class="title">
19
+ {{ columnGroup.title }}
20
+ </p>
17
21
  <PsIcon
18
22
  icon="info"
19
23
  size="18"
20
24
  class="psui-cursor-pointer"
21
25
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
22
26
  :style="{ display: 'flex' }"
23
- @click.native="$emit('click-column-group-helper', columnGroup, $event)"
27
+ @click="$emit('click-column-group-helper', columnGroup, $event)"
24
28
  />
25
29
  </div>
26
30
  </th>
@@ -29,7 +33,12 @@
29
33
  <tr>
30
34
  <th>
31
35
  <div>
32
- <p v-if="firstColumnDescription" class="description">{{ firstColumnDescription }}</p>
36
+ <p
37
+ v-if="firstColumnDescription"
38
+ class="description"
39
+ >
40
+ {{ firstColumnDescription }}
41
+ </p>
33
42
  </div>
34
43
  </th>
35
44
 
@@ -48,7 +57,7 @@
48
57
  class="psui-cursor-pointer helper"
49
58
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
50
59
  :style="{ display: 'flex' }"
51
- @click.native="$emit('click-order-column', column)"
60
+ @click="$emit('click-order-column', column)"
52
61
  />
53
62
 
54
63
  <PsIcon
@@ -57,11 +66,21 @@
57
66
  class="psui-cursor-pointer helper"
58
67
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
59
68
  :style="{ display: 'flex' }"
60
- @click.native="$emit('click-column-helper', column, $event)"
69
+ @click="$emit('click-column-helper', column, $event)"
61
70
  />
62
- <p class="title" v-if="column.title">{{ column.title }}</p>
71
+ <p
72
+ class="title"
73
+ v-if="column.title"
74
+ >
75
+ {{ column.title }}
76
+ </p>
63
77
  </div>
64
- <p class="description" v-if="column.description">{{ column.description }}</p>
78
+ <p
79
+ class="description"
80
+ v-if="column.description"
81
+ >
82
+ {{ column.description }}
83
+ </p>
65
84
  </div>
66
85
  </th>
67
86
  </template>
@@ -3,10 +3,14 @@
3
3
  <tr>
4
4
  <th rowspan="2">
5
5
  <div v-if="firstColumnTitle">
6
- <p class="title">{{ firstColumnTitle }}</p>
6
+ <p class="title">
7
+ {{ firstColumnTitle }}
8
+ </p>
7
9
  </div>
8
10
  <div v-if="firstColumnDescription">
9
- <p class="description">{{ firstColumnDescription }}</p>
11
+ <p class="description">
12
+ {{ firstColumnDescription }}
13
+ </p>
10
14
  </div>
11
15
  </th>
12
16
 
@@ -16,14 +20,16 @@
16
20
  :colspan="columnGroup.columns.reduce( (prev, cur) => cur.isActive ? prev + 1 : prev, 0 )"
17
21
  >
18
22
  <div class="psui-flex psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
19
- <p class="title">{{ columnGroup.title }}</p>
23
+ <p class="title">
24
+ {{ columnGroup.title }}
25
+ </p>
20
26
  <PsIcon
21
27
  icon="info"
22
28
  size="18"
23
29
  class="psui-cursor-pointer"
24
30
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
25
31
  :style="{ display: 'flex' }"
26
- @click.native="$emit('click-column-group-helper', columnGroup, $event)"
32
+ @click="$emit('click-column-group-helper', columnGroup, $event)"
27
33
  />
28
34
  </div>
29
35
  </th>
@@ -37,7 +43,12 @@
37
43
  >
38
44
  <div class="psui-flex psui-flex-col psui-justify-center psui-items-center psui-text-center">
39
45
  <div class="psui-show-childrens-on-hover absolute-childrens psui-mb-px">
40
- <p class="title" v-if="column.title">{{ column.title }}</p>
46
+ <p
47
+ class="title"
48
+ v-if="column.title"
49
+ >
50
+ {{ column.title }}
51
+ </p>
41
52
 
42
53
  <PsIcon
43
54
  icon="info"
@@ -45,7 +56,7 @@
45
56
  class="psui-cursor-pointer helper"
46
57
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
47
58
  :style="{ display: 'flex' }"
48
- @click.native="$emit('click-column-helper', column, $event)"
59
+ @click="$emit('click-column-helper', column, $event)"
49
60
  />
50
61
 
51
62
  <PsIcon
@@ -56,10 +67,15 @@
56
67
  class="psui-cursor-pointer helper"
57
68
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
58
69
  :style="{ display: 'flex' }"
59
- @click.native="$emit('click-order-column', column)"
70
+ @click="$emit('click-order-column', column)"
60
71
  />
61
72
  </div>
62
- <p class="description" v-if="column.description">{{ column.description }}</p>
73
+ <p
74
+ class="description"
75
+ v-if="column.description"
76
+ >
77
+ {{ column.description }}
78
+ </p>
63
79
  </div>
64
80
  </th>
65
81
  </template>
@@ -7,14 +7,16 @@
7
7
  :colspan="columnGroup.columns.reduce( (prev, cur) => cur.isActive ? prev + 1 : prev, 0 )"
8
8
  >
9
9
  <div class="psui-flex psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
10
- <p class="title">{{ columnGroup.title }}</p>
10
+ <p class="title">
11
+ {{ columnGroup.title }}
12
+ </p>
11
13
  <PsIcon
12
14
  icon="info"
13
15
  size="18"
14
16
  class="psui-cursor-pointer"
15
17
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
16
18
  :style="{ display: 'flex' }"
17
- @click.native="$emit('click-column-group-helper', columnGroup, $event)"
19
+ @click="$emit('click-column-group-helper', columnGroup, $event)"
18
20
  />
19
21
  </div>
20
22
  </th>
@@ -33,7 +35,12 @@
33
35
  :data-index="columnGroupIndex"
34
36
  >
35
37
  <div class="psui-show-childrens-on-hover absolute-childrens psui-mb-px">
36
- <p class="title" v-if="column.title">{{ column.title }}</p>
38
+ <p
39
+ class="title"
40
+ v-if="column.title"
41
+ >
42
+ {{ column.title }}
43
+ </p>
37
44
 
38
45
  <PsIcon
39
46
  icon="info"
@@ -41,7 +48,7 @@
41
48
  class="psui-cursor-pointer helper"
42
49
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
43
50
  :style="{ display: 'flex' }"
44
- @click.native="$emit('click-column-helper', column, $event)"
51
+ @click="$emit('click-column-helper', column, $event)"
45
52
  />
46
53
 
47
54
  <PsIcon
@@ -52,10 +59,15 @@
52
59
  class="psui-cursor-pointer helper"
53
60
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
54
61
  :style="{ display: 'flex' }"
55
- @click.native="$emit('click-order-column', column)"
62
+ @click="$emit('click-order-column', column)"
56
63
  />
57
64
  </div>
58
- <p class="description" v-if="column.description">{{ column.description }}</p>
65
+ <p
66
+ class="description"
67
+ v-if="column.description"
68
+ >
69
+ {{ column.description }}
70
+ </p>
59
71
  </div>
60
72
  </th>
61
73
  </template>
@@ -5,7 +5,9 @@
5
5
  :key="index"
6
6
  >
7
7
  <td>
8
- <p class="title">{{ row.title }}</p>
8
+ <p class="title">
9
+ {{ row.title }}
10
+ </p>
9
11
  </td>
10
12
 
11
13
  <template
@@ -15,7 +17,9 @@
15
17
  v-for="column of columnGroup.columns"
16
18
  :key="indexColumn + '-' + columnGroup.key + '-' + column.key"
17
19
  >
18
- <p class="ps-table-cell-value">{{ row.data[column.key] }}</p>
20
+ <p class="ps-table-cell-value">
21
+ {{ row.data[column.key] }}
22
+ </p>
19
23
  </td>
20
24
  </template>
21
25
  </tr>
@@ -4,21 +4,24 @@
4
4
  :class="[getComponentClass, `layout-${layout}`]"
5
5
  role="group"
6
6
  >
7
-
8
7
  <template v-for="(item, index) in getItems">
9
- <slot v-bind:item="item" >
10
- <PsRichTooltip v-if="item.tooltip" :title="item.tooltip" layout="blue">
11
- <template v-slot:trigger>
12
- <button
13
- :key="item[keyValue] + index"
14
- type="button"
15
- @click="selectTab(item)"
16
- :class="getButtonClass(item)"
17
- >
18
- <span>{{ item[keyLabel] }}</span>
19
- </button>
20
- </template>
21
- </PsRichTooltip>
8
+ <slot :item="item">
9
+ <PsRichTooltip
10
+ v-if="item.tooltip"
11
+ :title="item.tooltip"
12
+ layout="blue"
13
+ >
14
+ <template #trigger>
15
+ <button
16
+ :key="item[keyValue] + index"
17
+ type="button"
18
+ @click="selectTab(item)"
19
+ :class="getButtonClass(item)"
20
+ >
21
+ <span>{{ item[keyLabel] }}</span>
22
+ </button>
23
+ </template>
24
+ </PsRichTooltip>
22
25
  <button
23
26
  v-else
24
27
  :key="item[keyValue] + index"
@@ -26,11 +29,11 @@
26
29
  @click="selectTab(item)"
27
30
  :class="getButtonClass(item)"
28
31
  >
29
- <span>{{ item[keyLabel] }}</span>
32
+ <span>{{ item[keyLabel] }}</span>
30
33
  </button>
31
34
  </slot>
32
35
  </template>
33
- </div>
36
+ </div>
34
37
  </template>
35
38
 
36
39
  <script>
@@ -1,14 +1,22 @@
1
1
  <template>
2
- <div @mouseenter="open" v-click-outside="close" ref="tooltip" class='psui-el-tooltip'>
3
- <div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
4
- <slot name="trigger"></slot>
2
+ <div
3
+ @mouseenter="open"
4
+ v-click-outside="close"
5
+ ref="tooltip"
6
+ class="psui-el-tooltip"
7
+ >
8
+ <div
9
+ ref="tooltiptrigger"
10
+ class="psui-el-tooltip-trigger"
11
+ >
12
+ <slot name="trigger" />
5
13
  </div>
6
14
 
7
- <div class='psui-el-tooltip-wrapper'>
15
+ <div class="psui-el-tooltip-wrapper">
8
16
  <div
9
17
  role="menu"
10
18
  ref="dialog"
11
- class='psui-el-tooltip-dialog'
19
+ class="psui-el-tooltip-dialog"
12
20
  :class="cssClass"
13
21
  >
14
22
  <div
@@ -16,9 +24,11 @@
16
24
  aria-orientation="vertical"
17
25
  :class="getComponentClass"
18
26
  >
19
- <h2 v-if="title">{{ title}}</h2>
27
+ <h2 v-if="title">
28
+ {{ title }}
29
+ </h2>
20
30
  <div class="psui-el-tooltip-content-wrapper">
21
- <slot name="content"></slot>
31
+ <slot name="content" />
22
32
  <button
23
33
  v-if="buttonText"
24
34
  @click="onClick"
@@ -89,7 +99,7 @@ export default {
89
99
  mounted() {
90
100
  document.addEventListener('resize', this.updatePosition)
91
101
  },
92
- beforeDestroy() {
102
+ beforeUnmount() {
93
103
  document.removeEventListener('resize', this.updatePosition)
94
104
  },
95
105
  methods: {