@policystudio/policy-studio-ui-vue 1.1.89 → 1.1.90-beta.2
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/.eslintignore +1 -0
- package/.eslintrc.js +70 -67
- package/.github/workflows/deploy-storybook.yml +1 -1
- package/.storybook/eventBus.js +25 -2
- package/.storybook/main.js +17 -21
- package/babel.config.js +17 -3
- package/dist/css/psui_styles.css +4028 -110346
- package/package.json +37 -24
- package/postcss.config.js +1 -1
- package/scripts/kill-port.sh +12 -0
- package/src/assets/scss/base.scss +27 -23
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +3 -3
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +2 -63
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/components/accordion/PsAccordion.vue +20 -21
- package/src/components/accordion/PsAccordionItem.vue +30 -8
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +6 -3
- package/src/components/badges-and-tags/PsCardInfos.vue +3 -1
- package/src/components/badges-and-tags/PsChartLegend.vue +19 -5
- package/src/components/badges-and-tags/PsCostEffectBar.vue +4 -5
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
- package/src/components/badges-and-tags/PsTestimonialCard.vue +6 -4
- package/src/components/buttons/PsButton.vue +30 -11
- package/src/components/chips/PsChips.vue +5 -2
- package/src/components/controls/PsCheckbox.vue +5 -2
- package/src/components/controls/PsCheckboxSimple.vue +4 -4
- package/src/components/controls/PsDraggable.vue +70 -67
- package/src/components/controls/PsInlineSelector.vue +13 -14
- package/src/components/controls/PsRadioButton.vue +10 -5
- package/src/components/controls/PsRadioButtonSimple.vue +3 -3
- package/src/components/controls/PsSlider.vue +6 -6
- package/src/components/controls/PsSwitch.vue +13 -3
- package/src/components/controls/PsToggle.vue +14 -11
- package/src/components/data-graphics/PsBarChart.vue +4 -2
- package/src/components/datatable/PsDataTable.vue +14 -5
- package/src/components/datatable/PsDataTableItem.vue +17 -4
- package/src/components/forms/PsDropdown.vue +8 -5
- package/src/components/forms/PsDropdownList.vue +1 -1
- package/src/components/forms/PsInput.vue +30 -14
- package/src/components/forms/PsInputSelect.vue +33 -11
- package/src/components/forms/PsInputTextArea.vue +15 -4
- package/src/components/navigations/PsBreadcrumb.vue +1 -1
- package/src/components/notifications/PsDialog.vue +11 -5
- package/src/components/notifications/PsSimpleAlert.vue +22 -10
- package/src/components/notifications/PsToast.vue +8 -3
- package/src/components/playground/PsScrollBar.vue +122 -50
- package/src/components/table-results/PsTableResults.vue +67 -51
- package/src/components/table-results/PsTableResultsBody.vue +3 -1
- package/src/components/table-results/PsTableResultsHead.vue +27 -8
- package/src/components/table-results/PsTableResultsHeadComparison.vue +24 -8
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +18 -6
- package/src/components/table-results/PsTableResultsRow.vue +6 -2
- package/src/components/tabs/PsTabHeader.vue +19 -16
- package/src/components/tooltip/PsDialogTooltip.vue +18 -8
- package/src/components/tooltip/PsRichTooltip.vue +12 -5
- package/src/components/tooltip/PsTooltip.vue +17 -9
- package/src/components/ui/PsDotLoader.vue +5 -5
- package/src/components/ui/PsIcon.vue +6 -2
- package/src/index.js +0 -1
- package/src/stories/Button.stories.js +48 -130
- package/src/stories/Button.vue +59 -0
- package/src/stories/{ElevationSystem.stories.mdx → ElevationSystem.mdx} +1 -1
- package/src/stories/Header.stories.js +41 -0
- package/src/stories/Header.vue +77 -0
- package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +101 -101
- package/src/stories/{Typography.stories.mdx → Typography.mdx} +107 -105
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/tailwind.config.js +11 -2
- package/webpack.config.js +22 -0
- package/backup-package-lock.json +0 -37194
- /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"
|
|
16
|
+
<slot name="header" />
|
|
17
17
|
|
|
18
18
|
<tbody>
|
|
19
19
|
<tr
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
<td
|
|
41
41
|
:style="item.background_color ? `background-color: ${getBackgroundColor(item.background_color)}; transition: background-color 0.5s ease;` : ''"
|
|
42
42
|
>
|
|
43
|
-
|
|
44
43
|
<div class="psui-flex psui-relative">
|
|
45
44
|
<div
|
|
46
45
|
v-tooltip="{
|
|
@@ -49,13 +48,13 @@
|
|
|
49
48
|
}"
|
|
50
49
|
>
|
|
51
50
|
<PsIcon
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
+
/>
|
|
59
58
|
</div>
|
|
60
59
|
<div
|
|
61
60
|
class="psui-flex psui-items-center psui-space-x-3"
|
|
@@ -69,10 +68,10 @@
|
|
|
69
68
|
:icon-classes="item.is_disabled ? 'psui-text-gray-40' : getIconClasses(item)"
|
|
70
69
|
display="flex"
|
|
71
70
|
:class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90',
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
{ 'psui--rotate-90': item.is_disabled },
|
|
72
|
+
{ 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
|
|
74
73
|
]"
|
|
75
|
-
@click
|
|
74
|
+
@click="onCollapse(item, $event)"
|
|
76
75
|
/>
|
|
77
76
|
|
|
78
77
|
<div v-if="item.is_appended">
|
|
@@ -88,9 +87,16 @@
|
|
|
88
87
|
v-tooltip="getTooltipContent(item)"
|
|
89
88
|
>
|
|
90
89
|
<div class="flex psui-items-center psui-relative ">
|
|
91
|
-
<PsIcon
|
|
92
|
-
|
|
93
|
-
|
|
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
|
+
>
|
|
94
100
|
{{ item.title }}
|
|
95
101
|
|
|
96
102
|
<PsIcon
|
|
@@ -99,7 +105,7 @@
|
|
|
99
105
|
size="14"
|
|
100
106
|
class="psui-text-gray-40 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
|
|
101
107
|
display="flex"
|
|
102
|
-
@click
|
|
108
|
+
@click="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
|
|
103
109
|
/>
|
|
104
110
|
</p>
|
|
105
111
|
</div>
|
|
@@ -122,7 +128,7 @@
|
|
|
122
128
|
:class="[{'psui-text-gray-50': item.tooltip_text}, {'psui-text-blue-60': !item.tooltip_text}]"
|
|
123
129
|
class="psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
|
|
124
130
|
display="flex"
|
|
125
|
-
@click
|
|
131
|
+
@click="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
|
|
126
132
|
/>
|
|
127
133
|
</p>
|
|
128
134
|
|
|
@@ -144,18 +150,18 @@
|
|
|
144
150
|
layout="gray"
|
|
145
151
|
class="psui-inline-flex psui-cursor-default"
|
|
146
152
|
:class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
|
|
147
|
-
:
|
|
153
|
+
:ignore-dialog="getIgnoreDialogIcon(item)"
|
|
148
154
|
>
|
|
149
|
-
<template
|
|
155
|
+
<template #trigger>
|
|
150
156
|
<PsIcon
|
|
151
157
|
:icon="getIcon(item)"
|
|
152
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"
|
|
153
159
|
size="18"
|
|
154
160
|
display="flex"
|
|
155
|
-
@click
|
|
161
|
+
@click="executeCallback(item)"
|
|
156
162
|
/>
|
|
157
163
|
</template>
|
|
158
|
-
<template
|
|
164
|
+
<template #content>
|
|
159
165
|
<p
|
|
160
166
|
class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
|
|
161
167
|
>
|
|
@@ -170,7 +176,7 @@
|
|
|
170
176
|
:class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
|
|
171
177
|
position="custom"
|
|
172
178
|
>
|
|
173
|
-
<template
|
|
179
|
+
<template #dropdownTrigger>
|
|
174
180
|
<PsIcon
|
|
175
181
|
icon="more_horiz"
|
|
176
182
|
size="18"
|
|
@@ -178,7 +184,7 @@
|
|
|
178
184
|
display="flex"
|
|
179
185
|
/>
|
|
180
186
|
</template>
|
|
181
|
-
<template
|
|
187
|
+
<template #items>
|
|
182
188
|
<ul class="psui-w-full psui-font-bold psui-my-3">
|
|
183
189
|
<li
|
|
184
190
|
v-for="(action, index) in item.actions"
|
|
@@ -211,48 +217,54 @@
|
|
|
211
217
|
:class="column.isCenteredContent ? 'psui-justify-center' : 'psui-justify-end'"
|
|
212
218
|
>
|
|
213
219
|
<PsTooltip v-if="isSelectedRow(column,item)">
|
|
214
|
-
<template
|
|
220
|
+
<template #trigger>
|
|
215
221
|
<PsIcon
|
|
216
222
|
icon="close"
|
|
217
223
|
size="16"
|
|
218
224
|
class="psui-cursor-pointer"
|
|
219
225
|
icon-classes="psui-text-blue-60 psui-leading-none psui-transition"
|
|
220
226
|
display="flex"
|
|
221
|
-
@click
|
|
227
|
+
@click="onCloseSelectRow(item,column)"
|
|
222
228
|
/>
|
|
223
229
|
</template>
|
|
224
|
-
<template
|
|
230
|
+
<template #content>
|
|
225
231
|
Close projections
|
|
226
232
|
</template>
|
|
227
233
|
</PsTooltip>
|
|
228
234
|
|
|
229
|
-
<PsTooltip
|
|
230
|
-
column.hasProjections && item.
|
|
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'"
|
|
231
238
|
>
|
|
232
|
-
<template
|
|
239
|
+
<template #trigger>
|
|
233
240
|
<PsIcon
|
|
234
241
|
icon="bar_chart"
|
|
235
242
|
size="16"
|
|
236
243
|
class="psui-cursor-pointer"
|
|
237
244
|
icon-classes="psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
|
|
238
245
|
display="flex"
|
|
239
|
-
@click
|
|
246
|
+
@click="onSelectRow(item, column, $event)"
|
|
240
247
|
/>
|
|
241
248
|
</template>
|
|
242
|
-
<template
|
|
249
|
+
<template #content>
|
|
243
250
|
Show projections in the chart
|
|
244
251
|
</template>
|
|
245
252
|
</PsTooltip>
|
|
246
|
-
<p
|
|
253
|
+
<p
|
|
254
|
+
class="ps-table-cell-value"
|
|
255
|
+
v-if="!column.isSwitch"
|
|
256
|
+
>
|
|
247
257
|
<template v-if="column.hasScoreHelper">
|
|
248
258
|
<PsTooltip
|
|
249
259
|
layout="blue"
|
|
250
260
|
>
|
|
251
|
-
<template
|
|
261
|
+
<template #trigger>
|
|
252
262
|
{{ getItemContent(column, item) }}
|
|
253
263
|
</template>
|
|
254
|
-
<template
|
|
255
|
-
<p class="psui-text-xsmall psui-font-bold">
|
|
264
|
+
<template #content>
|
|
265
|
+
<p class="psui-text-xsmall psui-font-bold">
|
|
266
|
+
{{ column.hasScoreHelper.title }}
|
|
267
|
+
</p>
|
|
256
268
|
{{ column.hasScoreHelper.description }}
|
|
257
269
|
</template>
|
|
258
270
|
</PsTooltip>
|
|
@@ -281,20 +293,20 @@
|
|
|
281
293
|
classes: 'layout-blue'
|
|
282
294
|
}"
|
|
283
295
|
>
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
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
|
+
/>
|
|
298
310
|
</div>
|
|
299
311
|
</div>
|
|
300
312
|
</div>
|
|
@@ -314,7 +326,10 @@
|
|
|
314
326
|
:fill-width="getPsBarChartWidth(column.key, item.data[column.key])"
|
|
315
327
|
/>
|
|
316
328
|
|
|
317
|
-
<p
|
|
329
|
+
<p
|
|
330
|
+
class="ps-table-cell-value"
|
|
331
|
+
v-else-if="item.data[column.key] != 0"
|
|
332
|
+
>
|
|
318
333
|
{{ formatFunction(column.key, item.data[column.key], item.data) }}
|
|
319
334
|
</p>
|
|
320
335
|
</div>
|
|
@@ -323,6 +338,7 @@
|
|
|
323
338
|
</template>
|
|
324
339
|
</tr>
|
|
325
340
|
</tbody>
|
|
341
|
+
<slot name="footer" />
|
|
326
342
|
</table>
|
|
327
343
|
</div>
|
|
328
344
|
</template>
|
|
@@ -516,7 +532,7 @@ export default {
|
|
|
516
532
|
this.selectedRow = null
|
|
517
533
|
})
|
|
518
534
|
},
|
|
519
|
-
|
|
535
|
+
beforeUnmount() {
|
|
520
536
|
eventBus.$off('resetPolicyImpactItemSelected')
|
|
521
537
|
this.$refs.tableWrapper.removeEventListener('scroll', this.handleTableScroll)
|
|
522
538
|
},
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
<tr>
|
|
4
4
|
<th>
|
|
5
5
|
<div v-if="firstColumnTitle">
|
|
6
|
-
<p class="title">
|
|
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">
|
|
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
|
|
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
|
|
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
|
|
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
|
|
69
|
+
@click="$emit('click-column-helper', column, $event)"
|
|
61
70
|
/>
|
|
62
|
-
<p
|
|
71
|
+
<p
|
|
72
|
+
class="title"
|
|
73
|
+
v-if="column.title"
|
|
74
|
+
>
|
|
75
|
+
{{ column.title }}
|
|
76
|
+
</p>
|
|
63
77
|
</div>
|
|
64
|
-
<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">
|
|
6
|
+
<p class="title">
|
|
7
|
+
{{ firstColumnTitle }}
|
|
8
|
+
</p>
|
|
7
9
|
</div>
|
|
8
10
|
<div v-if="firstColumnDescription">
|
|
9
|
-
<p class="description">
|
|
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">
|
|
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
|
|
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
|
|
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
|
|
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
|
|
70
|
+
@click="$emit('click-order-column', column)"
|
|
60
71
|
/>
|
|
61
72
|
</div>
|
|
62
|
-
<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">
|
|
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
|
|
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
|
|
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
|
|
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
|
|
62
|
+
@click="$emit('click-order-column', column)"
|
|
56
63
|
/>
|
|
57
64
|
</div>
|
|
58
|
-
<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">
|
|
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">
|
|
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
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
32
|
+
<span>{{ item[keyLabel] }}</span>
|
|
30
33
|
</button>
|
|
31
34
|
</slot>
|
|
32
35
|
</template>
|
|
33
|
-
|
|
36
|
+
</div>
|
|
34
37
|
</template>
|
|
35
38
|
|
|
36
39
|
<script>
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
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=
|
|
15
|
+
<div class="psui-el-tooltip-wrapper">
|
|
8
16
|
<div
|
|
9
17
|
role="menu"
|
|
10
18
|
ref="dialog"
|
|
11
|
-
class=
|
|
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">
|
|
27
|
+
<h2 v-if="title">
|
|
28
|
+
{{ title }}
|
|
29
|
+
</h2>
|
|
20
30
|
<div class="psui-el-tooltip-content-wrapper">
|
|
21
|
-
<slot name="content"
|
|
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
|
-
|
|
102
|
+
beforeUnmount() {
|
|
93
103
|
document.removeEventListener('resize', this.updatePosition)
|
|
94
104
|
},
|
|
95
105
|
methods: {
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<PsTooltip
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<PsTooltip
|
|
3
|
+
:layout="layout"
|
|
4
|
+
:title="title"
|
|
5
|
+
:css-class="cssClass"
|
|
6
|
+
:position="position"
|
|
7
|
+
:ignore-dialog="ignoreDialog"
|
|
8
|
+
:custom-position="customPosition"
|
|
9
|
+
>
|
|
10
|
+
<template #trigger>
|
|
11
|
+
<slot name="trigger" />
|
|
5
12
|
</template>
|
|
6
|
-
<template
|
|
7
|
-
<slot name="content"
|
|
13
|
+
<template #content>
|
|
14
|
+
<slot name="content" />
|
|
8
15
|
</template>
|
|
9
16
|
</PsTooltip>
|
|
10
17
|
</template>
|