@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.90-beta.51
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/.eslintrc.js +2 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6639 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js +35 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/directives.d.ts +1 -0
- package/dist/util/directives.js +22 -0
- package/dist/util/directives.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/doc/.nvmrc +1 -0
- package/{.storybook → doc/.storybook}/main.ts +8 -2
- package/{.storybook → doc/.storybook}/preview.ts +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/{src → doc}/shims-vue.d.ts +0 -5
- package/{src → doc/src}/stories/Accordion.stories.ts +2 -3
- package/{src → doc/src}/stories/BadgeWithIcon.stories.ts +1 -1
- package/{src → doc/src}/stories/BarChart.stories.ts +1 -1
- package/{src → doc/src}/stories/Breadcrumb.stories.ts +1 -1
- package/doc/src/stories/Button.stories.ts +130 -0
- package/{src → doc/src}/stories/CardInfos.stories.ts +1 -1
- package/{src → doc/src}/stories/ChartLegend.stories.ts +1 -1
- package/{src → doc/src}/stories/Checkbox.stories.ts +1 -1
- package/{src → doc/src}/stories/CheckboxSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/Chips.stories.ts +1 -4
- package/{src → doc/src}/stories/ClimateZoneBadge.stories.ts +2 -1
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src → doc/src}/stories/CostEffectBar.stories.ts +2 -1
- package/{src → doc/src}/stories/Datatable.stories.ts +5 -2
- package/{src → doc/src}/stories/DateCardInfo.stories.ts +1 -1
- package/{src → doc/src}/stories/Dialog.stories.ts +2 -2
- package/{src → doc/src}/stories/Draggable.stories.ts +3 -2
- package/{src → doc/src}/stories/Dropdown.stories.ts +4 -3
- package/{src → doc/src}/stories/DropdownList.stories.ts +4 -2
- package/{src → doc/src}/stories/HighlightRippleDot.stories.ts +3 -2
- package/{src → doc/src}/stories/Icon.stories.ts +3 -1
- package/{src → doc/src}/stories/InlineSelector.stories.ts +1 -1
- package/{src → doc/src}/stories/Input.stories.ts +7 -4
- package/{src → doc/src}/stories/InputSelect.stories.ts +3 -2
- package/{src → doc/src}/stories/InputTextArea.stories.ts +1 -1
- package/{src → doc/src}/stories/MiniTag.stories.ts +9 -2
- package/{src → doc/src}/stories/ProgressBar.stories.ts +3 -2
- package/{src → doc/src}/stories/RadioButton.stories.ts +2 -2
- package/{src → doc/src}/stories/RadioButtonSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/SimpleAlert.stories.ts +3 -2
- package/{src → doc/src}/stories/Slider.stories.ts +6 -2
- package/{src → doc/src}/stories/Switch.stories.ts +2 -2
- package/{src → doc/src}/stories/TabHeader.stories.ts +6 -1
- package/{src → doc/src}/stories/TableResults.stories.ts +11 -7
- package/{src → doc/src}/stories/TagScope.stories.ts +3 -2
- package/{src → doc/src}/stories/TestimonialCard.stories.ts +3 -3
- package/{src → doc/src}/stories/Toast.stories.ts +2 -2
- package/{src → doc/src}/stories/Toggle.stories.ts +6 -3
- package/{src → doc/src}/stories/Tooltip.stories.ts +3 -3
- package/doc/tsconfig.json +17 -0
- package/package.json +13 -28
- package/scripts/gulp.js +11 -0
- package/src/assets/scss/base.scss +3 -34
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +9 -3
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +28 -1
- package/src/assets/scss/components/PsTooltip.scss +2 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- package/src/components/badges-and-tags/PsCardInfos.vue +39 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +46 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
- package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
- package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
- package/src/components/badges-and-tags/PsTagScope.vue +17 -22
- package/src/components/badges-and-tags/PsTestimonialCard.vue +19 -26
- package/src/components/buttons/PsButton.vue +61 -62
- package/src/components/chips/PsChips.vue +112 -101
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +84 -84
- package/src/components/controls/PsCheckboxSimple.vue +95 -95
- package/src/components/controls/PsDraggable.vue +53 -55
- package/src/components/controls/PsInlineSelector.vue +98 -99
- package/src/components/controls/PsRadioButton.vue +65 -58
- package/src/components/controls/PsRadioButtonSimple.vue +79 -75
- package/src/components/controls/PsSlider.vue +185 -176
- package/src/components/controls/PsSwitch.vue +51 -52
- package/src/components/controls/PsToggle.vue +52 -50
- package/src/components/data-graphics/PsBarChart.vue +18 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +13 -28
- package/src/components/forms/PsDropdown.vue +166 -162
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +154 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +70 -71
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +27 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +461 -468
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +70 -67
- package/src/components/table-results/PsTableResultsHeadComparison.vue +67 -64
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +94 -67
- package/src/components/table-results/PsTableResultsRow.vue +55 -56
- package/src/components/tabs/PsTabHeader.vue +106 -100
- package/src/components/tooltip/PsDialogTooltip.vue +96 -101
- package/src/components/tooltip/PsRichTooltip.vue +41 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +143 -132
- package/src/index.ts +60 -67
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +12 -3
- package/src/util/directives.ts +24 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -0
- package/tailwind.config.js +1 -1
- package/tsconfig.json +18 -13
- package/.storybook/eventBus.ts +0 -26
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.ts +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
- /package/{.storybook → doc/.storybook}/PolicyStudio.ts +0 -0
- /package/{.storybook → doc/.storybook}/manager.ts +0 -0
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src → doc/src}/contents/ComparisonData.ts +0 -0
- /package/{src → doc/src}/contents/FlexibleData.ts +0 -0
- /package/{src → doc/src}/contents/ResultsData.ts +0 -0
- /package/{src → doc/src}/stories/Colors.mdx +0 -0
- /package/{src → doc/src}/stories/ElevationSystem.mdx +0 -0
- /package/{src → doc/src}/stories/Introduction.mdx +0 -0
- /package/{src → doc/src}/stories/Typography.mdx +0 -0
- /package/{src → doc/src}/stories/assets/code-brackets.svg +0 -0
- /package/{src → doc/src}/stories/assets/colors.svg +0 -0
- /package/{src → doc/src}/stories/assets/comments.svg +0 -0
- /package/{src → doc/src}/stories/assets/direction.svg +0 -0
- /package/{src → doc/src}/stories/assets/flow.svg +0 -0
- /package/{src → doc/src}/stories/assets/plugin.svg +0 -0
- /package/{src → doc/src}/stories/assets/repo.svg +0 -0
- /package/{src → doc/src}/stories/assets/stackalt.svg +0 -0
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
</td>
|
|
12
12
|
|
|
13
|
-
<template
|
|
14
|
-
v-for="(columnGroup, indexColumn) of columnGroups"
|
|
15
|
-
>
|
|
13
|
+
<template v-for="(columnGroup, indexColumn) of columnGroups">
|
|
16
14
|
<td
|
|
17
15
|
v-for="column of columnGroup.columns"
|
|
18
16
|
:key="indexColumn + '-' + columnGroup.key + '-' + column.key"
|
|
@@ -24,76 +22,77 @@
|
|
|
24
22
|
</tbody>
|
|
25
23
|
</template>
|
|
26
24
|
|
|
27
|
-
<script>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* It sets the values which will be use to render the body.
|
|
42
|
-
*/
|
|
43
|
-
columnGroups: {
|
|
44
|
-
type: Array,
|
|
45
|
-
default() {
|
|
46
|
-
return []
|
|
47
|
-
}
|
|
25
|
+
<script setup>
|
|
26
|
+
import { computed } from 'vue'
|
|
27
|
+
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
/**
|
|
30
|
+
* It sets the values which will be use to render the body.
|
|
31
|
+
*/
|
|
32
|
+
summaryData: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default() {
|
|
35
|
+
return []
|
|
48
36
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* It sets the values which will be use to render the body.
|
|
40
|
+
*/
|
|
41
|
+
columnGroups: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default() {
|
|
44
|
+
return []
|
|
57
45
|
},
|
|
58
|
-
/**
|
|
59
|
-
* It sets additional styling if needed.
|
|
60
|
-
*/
|
|
61
|
-
cssStyle: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: 'psui-text-gray-60'
|
|
64
|
-
}
|
|
65
46
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
/**
|
|
48
|
+
* It sets the values which will be use to render the body.
|
|
49
|
+
*/
|
|
50
|
+
rows: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default() {
|
|
53
|
+
return []
|
|
71
54
|
},
|
|
72
|
-
getRows() {
|
|
73
|
-
const rows = []
|
|
74
|
-
for (let index = 0; index < this.summaryData.length; index++) {
|
|
75
|
-
const item = this.summaryData[index]
|
|
76
|
-
this.addRow(item, 0, `${index}`, rows)
|
|
77
|
-
}
|
|
78
|
-
return rows
|
|
79
|
-
}
|
|
80
55
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
56
|
+
/**
|
|
57
|
+
* It sets additional styling if needed.
|
|
58
|
+
*/
|
|
59
|
+
cssStyle: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'psui-text-gray-60',
|
|
62
|
+
},
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const cssAlign = computed(() => {
|
|
66
|
+
if (props.align === 'right') return `psui-text-right ${props.cssStyle}`
|
|
67
|
+
if (props.align === 'center') return `psui-text-center ${props.cssStyle}`
|
|
68
|
+
return `psui-text-left ${props.cssStyle}`
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const addRow = (item, deep = 0, index, rows) => {
|
|
72
|
+
item.deep = deep
|
|
73
|
+
item.index = index
|
|
74
|
+
rows.push(item)
|
|
75
|
+
item.last_deep = item.items ? false : true
|
|
76
|
+
if (item.items) {
|
|
77
|
+
const items_child = [...item.items]
|
|
78
|
+
for (let indexChild = 0; indexChild < items_child.length; indexChild++) {
|
|
79
|
+
const item_child = items_child[indexChild]
|
|
80
|
+
item_child.is_last = indexChild + 1 === items_child.length ? true : false
|
|
81
|
+
addRow(item_child, deep + 1, `${index}-${indexChild}`, rows)
|
|
95
82
|
}
|
|
96
83
|
}
|
|
97
84
|
}
|
|
85
|
+
|
|
86
|
+
const getRows = computed(() => {
|
|
87
|
+
const rows = []
|
|
88
|
+
for (let index = 0; index < props.summaryData.length; index++) {
|
|
89
|
+
const item = props.summaryData[index]
|
|
90
|
+
addRow(item, 0, `${index}`, rows)
|
|
91
|
+
}
|
|
92
|
+
return rows
|
|
93
|
+
})
|
|
98
94
|
</script>
|
|
99
|
-
|
|
95
|
+
|
|
96
|
+
<style>
|
|
97
|
+
/* Please, use the file src/assets/scss/components/PsTableResults.scss */
|
|
98
|
+
</style>
|
|
@@ -8,23 +8,22 @@
|
|
|
8
8
|
</p>
|
|
9
9
|
</div>
|
|
10
10
|
</th>
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
<th
|
|
13
13
|
v-for="columnGroup of header"
|
|
14
14
|
:key="columnGroup.key"
|
|
15
|
-
:colspan="columnGroup.columns.reduce(
|
|
15
|
+
:colspan="columnGroup.columns.reduce((prev, cur) => (cur.isActive ? prev + 1 : prev), 0)"
|
|
16
16
|
>
|
|
17
17
|
<div class="psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
|
|
18
18
|
<p class="title">
|
|
19
19
|
{{ columnGroup.title }}
|
|
20
20
|
</p>
|
|
21
21
|
<PsIcon
|
|
22
|
-
icon="
|
|
23
|
-
size="
|
|
24
|
-
class="psui-cursor-pointer"
|
|
25
|
-
icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
|
|
22
|
+
icon="info_outline"
|
|
23
|
+
size="16"
|
|
24
|
+
class="psui-cursor-pointer psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
|
|
26
25
|
:style="{ display: 'flex' }"
|
|
27
|
-
@click="
|
|
26
|
+
@click="emit('click-column-group-helper', columnGroup, $event)"
|
|
28
27
|
/>
|
|
29
28
|
</div>
|
|
30
29
|
</th>
|
|
@@ -43,9 +42,9 @@
|
|
|
43
42
|
</th>
|
|
44
43
|
|
|
45
44
|
<template v-for="columnGroup of header">
|
|
46
|
-
<th
|
|
47
|
-
v-for="column of columnGroup.columns"
|
|
48
|
-
:key="`${columnGroup.key}-${column.key}`"
|
|
45
|
+
<th
|
|
46
|
+
v-for="column of columnGroup.columns"
|
|
47
|
+
:key="`${columnGroup.key}-${column.key}`"
|
|
49
48
|
>
|
|
50
49
|
<div class="psui-flex psui-flex-col">
|
|
51
50
|
<div class="psui-flex psui-flex-row psui-space-x-1 psui-items-center psui-justify-end psui-show-childrens-on-hover psui-mb-px">
|
|
@@ -54,19 +53,17 @@
|
|
|
54
53
|
:icon="orderDirection == 'asc' ? 'arrow_downward' : 'arrow_upward'"
|
|
55
54
|
:type="orderDirection == 'asc' ? 'arrow_upward' : 'arrow_upward'"
|
|
56
55
|
size="16"
|
|
57
|
-
class="psui-cursor-pointer
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@click="$emit('click-order-column', column)"
|
|
56
|
+
class="helper psui-cursor-pointer psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
|
|
57
|
+
:style="{ display: 'flex', marginTop: '1px' }"
|
|
58
|
+
@click="emit('click-order-column', column)"
|
|
61
59
|
/>
|
|
62
60
|
|
|
63
61
|
<PsIcon
|
|
64
|
-
icon="
|
|
62
|
+
icon="info_outline"
|
|
65
63
|
size="16"
|
|
66
|
-
class="psui-cursor-pointer
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@click="$emit('click-column-helper', column, $event)"
|
|
64
|
+
class="helper psui-cursor-pointer psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
|
|
65
|
+
:style="{ display: 'flex', marginTop: '1px' }"
|
|
66
|
+
@click="emit('click-column-helper', column, $event)"
|
|
70
67
|
/>
|
|
71
68
|
<p
|
|
72
69
|
class="title"
|
|
@@ -88,55 +85,61 @@
|
|
|
88
85
|
</thead>
|
|
89
86
|
</template>
|
|
90
87
|
|
|
91
|
-
<script>
|
|
88
|
+
<script setup>
|
|
92
89
|
import PsIcon from '../ui/PsIcon.vue'
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
default: ''
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* It sets the description for the first column.
|
|
106
|
-
*/
|
|
107
|
-
firstColumnDescription: {
|
|
108
|
-
type: String,
|
|
109
|
-
default: ''
|
|
110
|
-
},
|
|
111
|
-
/**
|
|
112
|
-
* It sets the values which will be use to render the header.
|
|
113
|
-
*/
|
|
114
|
-
header: {
|
|
115
|
-
type: Array,
|
|
116
|
-
required: true,
|
|
117
|
-
default: () => {
|
|
118
|
-
return []
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
/**
|
|
122
|
-
* this sets whether sorting will be displayed.
|
|
123
|
-
*/
|
|
124
|
-
showOrder: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
default: false
|
|
127
|
-
}
|
|
90
|
+
import { computed, getCurrentInstance } from 'vue'
|
|
91
|
+
|
|
92
|
+
defineProps({
|
|
93
|
+
/**
|
|
94
|
+
* It sets the title for the first column.
|
|
95
|
+
*/
|
|
96
|
+
firstColumnTitle: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: '',
|
|
128
99
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
100
|
+
/**
|
|
101
|
+
* It sets the description for the first column.
|
|
102
|
+
*/
|
|
103
|
+
firstColumnDescription: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: '',
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* It sets the values which will be use to render the header.
|
|
109
|
+
*/
|
|
110
|
+
header: {
|
|
111
|
+
type: Array,
|
|
112
|
+
required: true,
|
|
113
|
+
default: () => {
|
|
114
|
+
return []
|
|
138
115
|
},
|
|
139
|
-
}
|
|
140
|
-
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* this sets whether sorting will be displayed.
|
|
119
|
+
*/
|
|
120
|
+
showOrder: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: false,
|
|
123
|
+
},
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
const emit = defineEmits(['click-column-group-helper', 'click-order-column', 'click-column-helper'])
|
|
127
|
+
|
|
128
|
+
const parent = getCurrentInstance().proxy.$parent
|
|
129
|
+
|
|
130
|
+
const columnsSelectedForStudy = computed(() => {
|
|
131
|
+
return parent.columnsSelectedForStudy
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
const orderColumn = computed(() => {
|
|
135
|
+
return parent.orderColumn
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
const orderDirection = computed(() => {
|
|
139
|
+
return parent.orderDirection
|
|
140
|
+
})
|
|
141
141
|
</script>
|
|
142
|
-
|
|
142
|
+
|
|
143
|
+
<style>
|
|
144
|
+
/* Please, use the file src/assets/scss/components/PsTableResults.scss */
|
|
145
|
+
</style>
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
</div>
|
|
15
15
|
</th>
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
<th
|
|
18
18
|
v-for="columnGroup of header"
|
|
19
19
|
:key="columnGroup.key"
|
|
20
|
-
:colspan="columnGroup.columns.reduce(
|
|
20
|
+
:colspan="columnGroup.columns.reduce((prev, cur) => (cur.isActive ? prev + 1 : prev), 0)"
|
|
21
21
|
>
|
|
22
22
|
<div class="psui-flex psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
|
|
23
23
|
<p class="title">
|
|
@@ -26,10 +26,9 @@
|
|
|
26
26
|
<PsIcon
|
|
27
27
|
icon="info"
|
|
28
28
|
size="18"
|
|
29
|
-
class="psui-cursor-pointer"
|
|
30
|
-
icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
|
|
29
|
+
class="psui-cursor-pointer psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
|
|
31
30
|
:style="{ display: 'flex' }"
|
|
32
|
-
@click="
|
|
31
|
+
@click="emit('click-column-group-helper', columnGroup, $event)"
|
|
33
32
|
/>
|
|
34
33
|
</div>
|
|
35
34
|
</th>
|
|
@@ -37,8 +36,8 @@
|
|
|
37
36
|
|
|
38
37
|
<tr>
|
|
39
38
|
<template v-for="columnGroup of header">
|
|
40
|
-
<th
|
|
41
|
-
v-for="column of columnGroup.columns"
|
|
39
|
+
<th
|
|
40
|
+
v-for="column of columnGroup.columns"
|
|
42
41
|
:key="`${columnGroup.key}-${column.key}`"
|
|
43
42
|
>
|
|
44
43
|
<div class="psui-flex psui-flex-col psui-justify-center psui-items-center psui-text-center">
|
|
@@ -53,21 +52,19 @@
|
|
|
53
52
|
<PsIcon
|
|
54
53
|
icon="info"
|
|
55
54
|
size="16"
|
|
56
|
-
class="psui-cursor-pointer
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@click="$emit('click-column-helper', column, $event)"
|
|
55
|
+
class="helper psui-cursor-pointer psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
|
|
56
|
+
:style="{ display: 'flex', marginTop: '1px' }"
|
|
57
|
+
@click="emit('click-column-helper', column, $event)"
|
|
60
58
|
/>
|
|
61
|
-
|
|
59
|
+
|
|
62
60
|
<PsIcon
|
|
63
61
|
v-if="showOrder"
|
|
64
62
|
:icon="orderDirection == 'asc' ? 'arrow_downward' : 'arrow_upward'"
|
|
65
63
|
:type="orderDirection == 'asc' ? 'arrow_upward' : 'arrow_upward'"
|
|
66
64
|
size="16"
|
|
67
|
-
class="psui-cursor-pointer
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@click="$emit('click-order-column', column)"
|
|
65
|
+
class="helper psui-cursor-pointer psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
|
|
66
|
+
:style="{ display: 'flex', marginTop: '1px' }"
|
|
67
|
+
@click="emit('click-order-column', column)"
|
|
71
68
|
/>
|
|
72
69
|
</div>
|
|
73
70
|
<p
|
|
@@ -83,55 +80,61 @@
|
|
|
83
80
|
</thead>
|
|
84
81
|
</template>
|
|
85
82
|
|
|
86
|
-
<script>
|
|
83
|
+
<script setup>
|
|
87
84
|
import PsIcon from '../ui/PsIcon.vue'
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
default: ''
|
|
98
|
-
},
|
|
99
|
-
/**
|
|
100
|
-
* It sets the description for the first column.
|
|
101
|
-
*/
|
|
102
|
-
firstColumnDescription: {
|
|
103
|
-
type: String,
|
|
104
|
-
default: ''
|
|
105
|
-
},
|
|
106
|
-
/**
|
|
107
|
-
* It sets the values which will be use to render the header.
|
|
108
|
-
*/
|
|
109
|
-
header: {
|
|
110
|
-
type: Array,
|
|
111
|
-
required: true,
|
|
112
|
-
default: () => {
|
|
113
|
-
return []
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
/**
|
|
117
|
-
* this sets whether sorting will be displayed.
|
|
118
|
-
*/
|
|
119
|
-
showOrder: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: false
|
|
122
|
-
}
|
|
85
|
+
import { computed, getCurrentInstance } from 'vue'
|
|
86
|
+
|
|
87
|
+
defineProps({
|
|
88
|
+
/**
|
|
89
|
+
* It sets the title for the first column.
|
|
90
|
+
*/
|
|
91
|
+
firstColumnTitle: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: '',
|
|
123
94
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
95
|
+
/**
|
|
96
|
+
* It sets the description for the first column.
|
|
97
|
+
*/
|
|
98
|
+
firstColumnDescription: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: '',
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* It sets the values which will be use to render the header.
|
|
104
|
+
*/
|
|
105
|
+
header: {
|
|
106
|
+
type: Array,
|
|
107
|
+
required: true,
|
|
108
|
+
default: () => {
|
|
109
|
+
return []
|
|
133
110
|
},
|
|
134
|
-
}
|
|
135
|
-
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* this sets whether sorting will be displayed.
|
|
114
|
+
*/
|
|
115
|
+
showOrder: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
const emit = defineEmits(['click-column-group-helper', 'click-column-helper', 'click-order-column'])
|
|
122
|
+
|
|
123
|
+
const parent = getCurrentInstance().proxy.$parent
|
|
124
|
+
|
|
125
|
+
const columnsSelectedForStudy = computed(() => {
|
|
126
|
+
return parent.columnsSelectedForStudy
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
const orderColumn = computed(() => {
|
|
130
|
+
return parent.orderColumn
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
const orderDirection = computed(() => {
|
|
134
|
+
return parent.orderDirection
|
|
135
|
+
})
|
|
136
136
|
</script>
|
|
137
|
-
|
|
137
|
+
|
|
138
|
+
<style>
|
|
139
|
+
/* Please, use the file src/assets/scss/components/PsTableResults.scss */
|
|
140
|
+
</style>
|