@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.3 → 7.24.3-qa-elisee-7.32.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.
- package/.prettierrc +6 -8
- package/package.json +21 -9
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +78 -79
- package/src/assets/svgIcons/adjust_roof.svg +6 -0
- package/src/assets/svgIcons/copy.svg +10 -0
- package/src/assets/theme.js +3 -3
- package/src/components/addNewButton/AddNewButton.stories.js +2 -2
- package/src/components/addNewButton/index.vue +51 -48
- package/src/components/banner/actionBanner/index.vue +55 -54
- package/src/components/banner/banner/banner.stories.js +5 -5
- package/src/components/banner/banner/index.vue +159 -159
- package/src/components/banner/infoBanner/index.vue +53 -41
- package/src/components/buttons/buttonIcon/index.vue +122 -125
- package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
- package/src/components/buttons/closeButton/index.vue +49 -49
- package/src/components/buttons/mainButton/index.vue +119 -119
- package/src/components/card/index.vue +70 -70
- package/src/components/collapsableInfoText/index.vue +94 -96
- package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
- package/src/components/deleteIcon/index.vue +54 -54
- package/src/components/draggableInputHandle/index.vue +37 -37
- package/src/components/dropdown/Dropdown.stories.js +10 -9
- package/src/components/dropdown/index.vue +106 -106
- package/src/components/errorMessage/index.vue +52 -52
- package/src/components/filter/filterSettings.vue +433 -439
- package/src/components/filter/index.vue +135 -135
- package/src/components/filter/parentDropdown.vue +73 -73
- package/src/components/icon/Icons.stories.js +7 -7
- package/src/components/icon/iconCollection.vue +53 -53
- package/src/components/icon/index.vue +121 -121
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +26 -26
- package/src/components/infoText/index.vue +132 -133
- package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
- package/src/components/inputs/checkbox/index.vue +180 -190
- package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
- package/src/components/inputs/inputNumber/index.vue +644 -647
- package/src/components/inputs/inputNumberQuestion/index.vue +182 -185
- package/src/components/inputs/inputText/InputText.stories.js +22 -22
- package/src/components/inputs/inputText/index.vue +336 -337
- package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
- package/src/components/inputs/radioButton/index.vue +219 -221
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +126 -127
- package/src/components/inputs/select/index.vue +776 -778
- package/src/components/inputs/select/option/index.vue +124 -124
- package/src/components/inputs/select/select.stories.js +32 -31
- package/src/components/inputs/slider/index.vue +99 -99
- package/src/components/inputs/switchField/index.vue +222 -220
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
- package/src/components/inputs/textAreaInput/index.vue +173 -171
- package/src/components/inputs/toggle/Toggle.stories.js +14 -14
- package/src/components/inputs/toggle/index.vue +217 -214
- package/src/components/label/index.vue +82 -82
- package/src/components/markerItem/index.vue +66 -68
- package/src/components/modals/actionModal/index.vue +54 -54
- package/src/components/modals/infoModal/index.vue +36 -39
- package/src/components/modals/modal/index.vue +134 -134
- package/src/components/modals/modal/modal.stories.js +5 -5
- package/src/components/navigationTabs/index.vue +94 -96
- package/src/components/pageSubtitle/index.vue +49 -55
- package/src/components/pageTitle/index.vue +56 -56
- package/src/components/pagination/index.vue +89 -92
- package/src/components/progressBar/index.vue +107 -107
- package/src/components/projectMarker/index.vue +244 -246
- package/src/components/rangeSlider/Slider.vue +465 -491
- package/src/components/rangeSlider/index.vue +410 -410
- package/src/components/rangeSlider/utils/dom.js +5 -5
- package/src/components/selectedOptions/index.vue +119 -119
- package/src/components/sideMenu/index.vue +199 -199
- package/src/components/spinner/index.vue +57 -57
- package/src/components/tableDropdown/index.vue +520 -520
- package/src/components/tables/mainTable/index.vue +362 -366
- package/src/components/tables/viewTable/index.vue +171 -171
- package/src/components/threeDots/index.vue +334 -340
- package/src/components/videoThumbnail/index.vue +86 -86
- package/src/components/videoThumbnail/videoThumbnail.stories.js +16 -14
- package/src/helpers/numberConverter.js +2 -2
- package/src/helpers/translateLang.js +9 -9
- package/src/mixins/inputValidations.js +5 -5
- package/.eslintrc.js +0 -184
@@ -1,451 +1,447 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
:
|
4
|
-
:
|
2
|
+
<page-container
|
3
|
+
:tableHeight="tableHeight"
|
4
|
+
:shouldSetCustomHeight="doesTableContainDraggables"
|
5
5
|
>
|
6
|
-
<
|
6
|
+
<table-title v-if="titleText">
|
7
7
|
{{ titleText }}
|
8
|
-
</
|
9
|
-
<
|
8
|
+
</table-title>
|
9
|
+
<table-scroll
|
10
10
|
ref="tableRef"
|
11
|
-
:
|
11
|
+
:isPositionAbsolute="doesTableContainDraggables"
|
12
12
|
>
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<
|
16
|
-
</
|
17
|
-
<
|
13
|
+
<table-wrapper class="main-table-wrapper" :fullWidth="fullWidth">
|
14
|
+
<spinner-wrapper v-if="isLoading">
|
15
|
+
<spinner />
|
16
|
+
</spinner-wrapper>
|
17
|
+
<table-container
|
18
18
|
v-else
|
19
|
-
:
|
20
|
-
:
|
19
|
+
:cellPaddings="cellPaddings"
|
20
|
+
:tableCursor="tableCursor"
|
21
21
|
>
|
22
|
-
<slot
|
23
|
-
</
|
24
|
-
</
|
25
|
-
</
|
26
|
-
</
|
22
|
+
<slot />
|
23
|
+
</table-container>
|
24
|
+
</table-wrapper>
|
25
|
+
</table-scroll>
|
26
|
+
</page-container>
|
27
27
|
</template>
|
28
28
|
|
29
29
|
<script>
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
30
|
+
// ToDo: add this to storybook
|
31
|
+
// import MainTable from "@eturnity/eturnity_reusable_components/src/components/tables/mainTable"
|
32
|
+
import styled from 'vue3-styled-components'
|
33
|
+
import Spinner from '../../spinner'
|
34
|
+
import dragIconSvg from '../../../assets/icons/drag_icon.svg?url'
|
35
|
+
import subpositionIconSvg from '../../../assets/icons/subposition_icon.svg?url'
|
36
|
+
import arrowDownSvg from '../../../assets/icons/arrow_down.svg?url'
|
37
|
+
import arrowUpRedSvg from '../../../assets/icons/arrow_up_red.svg?url'
|
38
|
+
|
39
|
+
const pageContainerProps = {
|
40
|
+
tableHeight: String,
|
41
|
+
shouldSetCustomHeight: Boolean
|
42
|
+
}
|
43
|
+
const PageContainer = styled('div', pageContainerProps)`
|
44
|
+
position: relative;
|
45
|
+
height: ${(props) =>
|
46
|
+
props.shouldSetCustomHeight ? props.tableHeight : 'auto'};
|
47
|
+
`
|
48
|
+
|
49
|
+
const TableTitle = styled.div`
|
50
|
+
margin-bottom: 16px;
|
51
|
+
font-weight: bold;
|
52
|
+
font-size: 14px;
|
53
|
+
text-transform: uppercase;
|
54
|
+
`
|
55
|
+
|
56
|
+
const tableScrollProps = {
|
57
|
+
isPositionAbsolute: Boolean
|
58
|
+
}
|
59
|
+
|
60
|
+
const TableScroll = styled('div', tableScrollProps)`
|
61
|
+
max-width: 100%;
|
62
|
+
height: auto;
|
63
|
+
${(props) =>
|
64
|
+
props.isPositionAbsolute &&
|
65
|
+
`
|
66
66
|
position: absolute;
|
67
67
|
left: -20px;
|
68
68
|
`}
|
69
|
-
|
69
|
+
`
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
const wrapperAttrs = { fullWidth: Boolean }
|
72
|
+
const TableWrapper = styled('div', wrapperAttrs)`
|
73
|
+
width: ${(props) => (props.fullWidth ? '100%' : 'fit-content')};
|
74
|
+
max-width: 100%;
|
75
|
+
overflow-x: auto;
|
76
|
+
overflow-y: hidden;
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
78
|
+
::-webkit-scrollbar {
|
79
|
+
height: 10px; //height of the whole scrollbar area
|
80
|
+
}
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
::-webkit-scrollbar-track {
|
83
|
+
background: ${(props) => props.theme.colors.grey2};
|
84
|
+
border-radius: 4px;
|
85
|
+
}
|
86
86
|
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
::-webkit-scrollbar-thumb {
|
88
|
+
border-bottom: 10px solid ${(props) => props.theme.colors.brightBlue}; // width of the actual scrollbar
|
89
|
+
border-radius: 4px;
|
90
|
+
}
|
91
|
+
`
|
92
|
+
|
93
|
+
const SpinnerWrapper = styled.div`
|
94
|
+
height: 150px;
|
95
|
+
display: grid;
|
96
|
+
align-items: center;
|
97
|
+
justify-items: center;
|
98
|
+
`
|
99
|
+
|
100
|
+
const containerAttrs = {
|
101
|
+
cellPaddings: String,
|
102
|
+
tableCursor: String
|
103
|
+
}
|
104
|
+
|
105
|
+
const TableContainer = styled('table', containerAttrs)`
|
106
|
+
width: 100%;
|
107
|
+
border-collapse: collapse;
|
108
|
+
border: none;
|
109
|
+
font-size: 13px;
|
110
|
+
|
111
|
+
thead {
|
112
|
+
font-weight: bold;
|
113
|
+
|
114
|
+
tr {
|
115
|
+
border-bottom: none !important;
|
90
116
|
}
|
91
|
-
`
|
92
|
-
|
93
|
-
const SpinnerWrapper = styled.div`
|
94
|
-
height: 150px;
|
95
|
-
display: grid;
|
96
|
-
align-items: center;
|
97
|
-
justify-items: center;
|
98
|
-
`
|
99
|
-
|
100
|
-
const containerAttrs = {
|
101
|
-
cellPaddings: String,
|
102
|
-
tableCursor: String,
|
103
117
|
}
|
104
118
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
border: none;
|
109
|
-
font-size: 13px;
|
119
|
+
.collective-row-toggle {
|
120
|
+
cursor: pointer !important;
|
121
|
+
}
|
110
122
|
|
111
|
-
|
112
|
-
|
123
|
+
tbody {
|
124
|
+
tr {
|
125
|
+
&:hover {
|
126
|
+
background-color: ${(props) => props.theme.colors.white};
|
127
|
+
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
|
128
|
+
|
129
|
+
.select-button,
|
130
|
+
.arrow-container,
|
131
|
+
.input-placeholder,
|
132
|
+
.table-dropdown-item {
|
133
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
134
|
+
}
|
113
135
|
|
114
|
-
|
115
|
-
|
136
|
+
input {
|
137
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
td {
|
142
|
+
height: 40px;
|
116
143
|
}
|
117
144
|
}
|
145
|
+
}
|
118
146
|
|
119
|
-
|
120
|
-
|
147
|
+
th {
|
148
|
+
padding: 11px 15px;
|
149
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
150
|
+
cursor: auto;
|
151
|
+
height: 40px;
|
152
|
+
|
153
|
+
.ordering {
|
154
|
+
display: grid;
|
155
|
+
grid-template-columns: 1fr auto;
|
156
|
+
grid-gap: 6px;
|
121
157
|
}
|
158
|
+
}
|
122
159
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
cursor: ${(props) =>
|
128
|
-
props.tableCursor ? props.tableCursor : 'auto'};
|
129
|
-
|
130
|
-
.select-button,
|
131
|
-
.arrow-container,
|
132
|
-
.input-placeholder,
|
133
|
-
.table-dropdown-item {
|
134
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
135
|
-
}
|
136
|
-
|
137
|
-
input {
|
138
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
139
|
-
}
|
140
|
-
}
|
160
|
+
td {
|
161
|
+
padding: ${(props) =>
|
162
|
+
props.cellPaddings ? props.cellPaddings : '6px 6px 7px 4px'};
|
163
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
|
141
164
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
165
|
+
&.empty {
|
166
|
+
height: 100px;
|
167
|
+
text-align: center;
|
168
|
+
cursor: default;
|
169
|
+
background-color: #fff !important;
|
146
170
|
}
|
147
171
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
cursor: auto;
|
152
|
-
height: 40px;
|
172
|
+
&.no-border {
|
173
|
+
border-bottom: none;
|
174
|
+
}
|
153
175
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
176
|
+
.collective-container {
|
177
|
+
display: grid;
|
178
|
+
grid-template-columns: auto 1fr;
|
179
|
+
align-items: center;
|
180
|
+
grid-gap: 10px;
|
181
|
+
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'pointer')};
|
159
182
|
}
|
160
183
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
border-
|
184
|
+
.collective-box {
|
185
|
+
width: 22px;
|
186
|
+
height: 22px;
|
187
|
+
border-radius: 4px;
|
188
|
+
color: #fff;
|
189
|
+
background-color: ${(props) => props.theme.colors.grey3};
|
190
|
+
font-size: 13px;
|
191
|
+
font-weight: normal;
|
192
|
+
display: grid;
|
193
|
+
align-items: center;
|
194
|
+
justify-items: center;
|
165
195
|
|
166
|
-
&.
|
167
|
-
|
168
|
-
text-align: center;
|
169
|
-
cursor: default;
|
170
|
-
background-color: #fff !important;
|
196
|
+
&.open {
|
197
|
+
background-color: ${(props) => props.theme.colors.green};
|
171
198
|
}
|
199
|
+
}
|
200
|
+
}
|
172
201
|
|
173
|
-
|
174
|
-
|
202
|
+
td,
|
203
|
+
th {
|
204
|
+
white-space: nowrap;
|
205
|
+
text-align: left;
|
206
|
+
|
207
|
+
&.align {
|
208
|
+
&-left {
|
209
|
+
text-align: left;
|
175
210
|
}
|
176
211
|
|
177
|
-
|
178
|
-
|
179
|
-
grid-template-columns: auto 1fr;
|
180
|
-
align-items: center;
|
181
|
-
grid-gap: 10px;
|
182
|
-
cursor: ${(props) =>
|
183
|
-
props.tableCursor ? props.tableCursor : 'pointer'};
|
212
|
+
&-center {
|
213
|
+
text-align: center;
|
184
214
|
}
|
185
215
|
|
186
|
-
|
187
|
-
|
188
|
-
height: 22px;
|
189
|
-
border-radius: 4px;
|
190
|
-
color: #fff;
|
191
|
-
background-color: ${(props) => props.theme.colors.grey3};
|
192
|
-
font-size: 13px;
|
193
|
-
font-weight: normal;
|
194
|
-
display: grid;
|
195
|
-
align-items: center;
|
196
|
-
justify-items: center;
|
197
|
-
|
198
|
-
&.open {
|
199
|
-
background-color: ${(props) => props.theme.colors.green};
|
200
|
-
}
|
216
|
+
&-right {
|
217
|
+
text-align: right;
|
201
218
|
}
|
202
219
|
}
|
203
220
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
&.align {
|
210
|
-
&-left {
|
211
|
-
text-align: left;
|
212
|
-
}
|
213
|
-
|
214
|
-
&-center {
|
215
|
-
text-align: center;
|
216
|
-
}
|
221
|
+
&.checkbox {
|
222
|
+
padding: 7px 15px !important;
|
223
|
+
width: 40px;
|
224
|
+
}
|
217
225
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
226
|
+
&.checkbox-header {
|
227
|
+
min-width: 40px;
|
228
|
+
display: flex;
|
229
|
+
gap: 10px;
|
230
|
+
}
|
231
|
+
}
|
222
232
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
233
|
+
tr {
|
234
|
+
&.disabled {
|
235
|
+
cursor: not-allowed !important;
|
236
|
+
}
|
227
237
|
|
228
|
-
|
229
|
-
|
230
|
-
display: flex;
|
231
|
-
gap: 10px;
|
232
|
-
}
|
238
|
+
.arrow-dropdown {
|
239
|
+
visibility: hidden;
|
233
240
|
}
|
234
241
|
|
235
|
-
|
236
|
-
|
237
|
-
|
242
|
+
&.footer {
|
243
|
+
td {
|
244
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
245
|
+
/* border-top: 1px solid ${(props) => props.theme.colors.grey4}; */
|
238
246
|
}
|
239
247
|
|
240
|
-
.
|
241
|
-
|
248
|
+
.text {
|
249
|
+
cursor: auto !important;
|
242
250
|
}
|
251
|
+
}
|
243
252
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
253
|
+
.text {
|
254
|
+
padding: 10px 15px 10px 15px;
|
255
|
+
color: ${(props) => props.theme.colors.black};
|
256
|
+
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
|
257
|
+
}
|
249
258
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
}
|
259
|
+
.bold {
|
260
|
+
font-weight: bold;
|
261
|
+
}
|
254
262
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
263
|
+
.icons-container {
|
264
|
+
padding-right: 2px; // so that the icons are not cut off when hovering
|
265
|
+
width: 1%; // necessary so it doesn't take up too much white space
|
266
|
+
display: table-cell;
|
267
|
+
flex-wrap: nowrap;
|
268
|
+
background-color: #fff;
|
269
|
+
vertical-align: middle;
|
270
|
+
}
|
260
271
|
|
261
|
-
|
262
|
-
|
263
|
-
|
272
|
+
.arrow-container {
|
273
|
+
display: table-cell;
|
274
|
+
vertical-align: middle;
|
275
|
+
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'pointer')};
|
276
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
|
277
|
+
}
|
264
278
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
display: table-cell;
|
269
|
-
flex-wrap: nowrap;
|
270
|
-
background-color: #fff;
|
271
|
-
vertical-align: middle;
|
272
|
-
}
|
279
|
+
&.container-row td {
|
280
|
+
padding: 0;
|
281
|
+
}
|
273
282
|
|
283
|
+
&.no-border {
|
284
|
+
td,
|
274
285
|
.arrow-container {
|
275
|
-
|
276
|
-
vertical-align: middle;
|
277
|
-
cursor: ${(props) =>
|
278
|
-
props.tableCursor ? props.tableCursor : 'pointer'};
|
279
|
-
border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
|
286
|
+
border-bottom: none;
|
280
287
|
}
|
288
|
+
}
|
281
289
|
|
282
|
-
|
283
|
-
|
290
|
+
&:hover {
|
291
|
+
input:disabled {
|
292
|
+
background-color: ${(props) => props.theme.colors.grey5 + '!important'};
|
284
293
|
}
|
285
294
|
|
286
|
-
|
287
|
-
|
288
|
-
.arrow-container {
|
289
|
-
border-bottom: none;
|
290
|
-
}
|
295
|
+
.drag-icon {
|
296
|
+
visibility: visible;
|
291
297
|
}
|
292
298
|
|
293
|
-
|
294
|
-
|
295
|
-
background-color: ${(props) =>
|
296
|
-
props.theme.colors.grey5 + '!important'};
|
297
|
-
}
|
298
|
-
|
299
|
-
.drag-icon {
|
300
|
-
visibility: visible;
|
301
|
-
}
|
302
|
-
|
303
|
-
.drag-wrapper {
|
304
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
305
|
-
}
|
306
|
-
|
307
|
-
.arrow-dropdown {
|
308
|
-
visibility: visible;
|
309
|
-
}
|
299
|
+
.drag-wrapper {
|
300
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
310
301
|
}
|
311
302
|
|
312
|
-
.
|
313
|
-
|
314
|
-
width: 20px;
|
315
|
-
min-width: 20px;
|
316
|
-
height: 40px;
|
303
|
+
.arrow-dropdown {
|
304
|
+
visibility: visible;
|
317
305
|
}
|
306
|
+
}
|
318
307
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
border-radius: 4px;
|
326
|
-
}
|
308
|
+
.drag-container {
|
309
|
+
display: table-cell;
|
310
|
+
width: 20px;
|
311
|
+
min-width: 20px;
|
312
|
+
height: 40px;
|
313
|
+
}
|
327
314
|
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
&:active {
|
337
|
-
cursor: grabbing;
|
338
|
-
}
|
339
|
-
}
|
315
|
+
.drag-wrapper {
|
316
|
+
width: 16px;
|
317
|
+
height: 36px;
|
318
|
+
display: grid;
|
319
|
+
align-items: center;
|
320
|
+
justify-items: center;
|
321
|
+
border-radius: 4px;
|
322
|
+
}
|
340
323
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
}
|
324
|
+
.drag-icon {
|
325
|
+
visibility: hidden;
|
326
|
+
width: 10px;
|
327
|
+
height: 16px;
|
328
|
+
cursor: grab;
|
329
|
+
background-position: center;
|
330
|
+
background-image: ${() => `url(${dragIconSvg})`};
|
348
331
|
|
349
|
-
|
350
|
-
|
351
|
-
height: 11px;
|
352
|
-
background: no-repeat;
|
353
|
-
background-position: center;
|
354
|
-
background-image: ${() => `url(${arrowDownSvg})`};
|
332
|
+
&:active {
|
333
|
+
cursor: grabbing;
|
355
334
|
}
|
335
|
+
}
|
356
336
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
}
|
337
|
+
.subposition-icon {
|
338
|
+
width: 14px;
|
339
|
+
height: 11px;
|
340
|
+
background: no-repeat;
|
341
|
+
margin-left: 10px;
|
342
|
+
background-image: ${() => `url(${subpositionIconSvg})`};
|
364
343
|
}
|
365
344
|
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
background:
|
370
|
-
|
345
|
+
.arrow-down {
|
346
|
+
width: 14px;
|
347
|
+
height: 11px;
|
348
|
+
background: no-repeat;
|
349
|
+
background-position: center;
|
350
|
+
background-image: ${() => `url(${arrowDownSvg})`};
|
351
|
+
}
|
371
352
|
|
372
|
-
|
373
|
-
|
374
|
-
|
353
|
+
.arrow-up {
|
354
|
+
width: 14px;
|
355
|
+
height: 11px;
|
356
|
+
background: no-repeat;
|
357
|
+
background-position: center;
|
358
|
+
background-image: ${() => `url(${arrowUpRedSvg})`};
|
375
359
|
}
|
360
|
+
}
|
376
361
|
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
362
|
+
input {
|
363
|
+
font-size: 13px;
|
364
|
+
padding: 5px 10px;
|
365
|
+
background: #fff;
|
366
|
+
height: unset;
|
367
|
+
|
368
|
+
&:focus {
|
369
|
+
background: ${(props) => props.theme.colors.grey5};
|
382
370
|
}
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
},
|
409
|
-
titleText: {
|
410
|
-
required: false,
|
411
|
-
default: null,
|
412
|
-
},
|
413
|
-
tableCursor: {
|
414
|
-
required: false,
|
415
|
-
},
|
416
|
-
},
|
417
|
-
data() {
|
418
|
-
return {
|
419
|
-
tableHeight: 'auto',
|
420
|
-
doesTableContainDraggables: false,
|
421
|
-
}
|
371
|
+
}
|
372
|
+
|
373
|
+
.open-container {
|
374
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
375
|
+
border-radius: 4px;
|
376
|
+
margin-bottom: 5px;
|
377
|
+
cursor: auto;
|
378
|
+
}
|
379
|
+
`
|
380
|
+
|
381
|
+
export default {
|
382
|
+
name: 'main-table',
|
383
|
+
components: {
|
384
|
+
TableScroll,
|
385
|
+
TableWrapper,
|
386
|
+
SpinnerWrapper,
|
387
|
+
Spinner,
|
388
|
+
TableContainer,
|
389
|
+
PageContainer,
|
390
|
+
TableTitle
|
391
|
+
},
|
392
|
+
props: {
|
393
|
+
fullWidth: {
|
394
|
+
required: false,
|
395
|
+
default: true
|
422
396
|
},
|
423
|
-
|
424
|
-
|
397
|
+
cellPaddings: {
|
398
|
+
required: false,
|
399
|
+
default: ''
|
425
400
|
},
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
}
|
401
|
+
isLoading: {
|
402
|
+
required: false,
|
403
|
+
default: false
|
430
404
|
},
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
const tableElement = this.$refs.tableRef.$el
|
436
|
-
|
437
|
-
this.resizeObserver = new ResizeObserver(() => {
|
438
|
-
const newTableHeight = this.titleText
|
439
|
-
? tableElement.offsetHeight + 33
|
440
|
-
: tableElement.offsetHeight
|
441
|
-
this.tableHeight = `${newTableHeight}px`
|
442
|
-
this.doesTableContainDraggables = Boolean(
|
443
|
-
tableElement.querySelector('.drag-container')
|
444
|
-
)
|
445
|
-
})
|
446
|
-
|
447
|
-
this.resizeObserver.observe(tableElement)
|
448
|
-
},
|
405
|
+
titleText: {
|
406
|
+
required: false,
|
407
|
+
default: null
|
449
408
|
},
|
409
|
+
tableCursor: {
|
410
|
+
required: false
|
411
|
+
}
|
412
|
+
},
|
413
|
+
data() {
|
414
|
+
return {
|
415
|
+
tableHeight: 'auto',
|
416
|
+
doesTableContainDraggables: false
|
417
|
+
}
|
418
|
+
},
|
419
|
+
mounted() {
|
420
|
+
this.observeTableHeight()
|
421
|
+
},
|
422
|
+
beforeDestroy() {
|
423
|
+
if (this.resizeObserver) {
|
424
|
+
this.resizeObserver.disconnect()
|
425
|
+
}
|
426
|
+
},
|
427
|
+
methods: {
|
428
|
+
observeTableHeight() {
|
429
|
+
if (!this.$refs.tableRef) return
|
430
|
+
|
431
|
+
const tableElement = this.$refs.tableRef.$el
|
432
|
+
|
433
|
+
this.resizeObserver = new ResizeObserver(() => {
|
434
|
+
const newTableHeight = this.titleText
|
435
|
+
? tableElement.offsetHeight + 33
|
436
|
+
: tableElement.offsetHeight
|
437
|
+
this.tableHeight = `${newTableHeight}px`
|
438
|
+
this.doesTableContainDraggables = Boolean(
|
439
|
+
tableElement.querySelector('.drag-container')
|
440
|
+
)
|
441
|
+
})
|
442
|
+
|
443
|
+
this.resizeObserver.observe(tableElement)
|
444
|
+
}
|
450
445
|
}
|
446
|
+
}
|
451
447
|
</script>
|