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