@eturnity/eturnity_reusable_components 1.0.81 → 1.0.85
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/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -12,22 +12,15 @@
|
|
|
12
12
|
</thead>
|
|
13
13
|
<tbody>
|
|
14
14
|
<tr>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<toggle
|
|
25
|
-
@on-toggle-change="onInputChange($event)"
|
|
26
|
-
:isChecked="isChecked"
|
|
27
|
-
labelAlign="right"
|
|
28
|
-
:disabled="true"
|
|
29
|
-
/>
|
|
30
|
-
</td>
|
|
15
|
+
<!-- <table-dropdown
|
|
16
|
+
:colSpan="3"
|
|
17
|
+
:tableItems="getDropdownValues()"
|
|
18
|
+
@toggle-dropdown-open="toggleDropdownOpen()"
|
|
19
|
+
@item-selected="onItemSelected({ item: $event, index })"
|
|
20
|
+
:isOpen="isDropdownOpen()"
|
|
21
|
+
:optionItems="itemOptions"
|
|
22
|
+
:optionsDisplay="['display_name', 'company_item_number', 'model']"
|
|
23
|
+
/> -->
|
|
31
24
|
<div class="icons-container">
|
|
32
25
|
<three-dots :options="listOptions" :isLoading="false" />
|
|
33
26
|
</div>
|
|
@@ -54,6 +47,7 @@ import styled from "vue-styled-components"
|
|
|
54
47
|
import MainTable from "@/components/tables/mainTable"
|
|
55
48
|
import ThreeDots from "@/components/threeDots"
|
|
56
49
|
import Toggle from "@/components/inputs/toggle"
|
|
50
|
+
// import TableDropdown from "@/components/tableDropdown"
|
|
57
51
|
|
|
58
52
|
const PageContainer = styled.div`
|
|
59
53
|
padding: 40px;
|
|
@@ -67,6 +61,7 @@ export default {
|
|
|
67
61
|
MainTable,
|
|
68
62
|
ThreeDots,
|
|
69
63
|
Toggle,
|
|
64
|
+
// TableDropdown,
|
|
70
65
|
},
|
|
71
66
|
data() {
|
|
72
67
|
return {
|
|
@@ -78,6 +73,7 @@ export default {
|
|
|
78
73
|
number_max_allowed: 10,
|
|
79
74
|
unit_short_name: "cm",
|
|
80
75
|
},
|
|
76
|
+
dropdownOpen: false,
|
|
81
77
|
isChecked: false,
|
|
82
78
|
listOptions: [
|
|
83
79
|
{
|
|
@@ -125,6 +121,32 @@ export default {
|
|
|
125
121
|
value: "option_4",
|
|
126
122
|
},
|
|
127
123
|
],
|
|
124
|
+
itemOptions: [
|
|
125
|
+
{
|
|
126
|
+
display_name: "Test 1",
|
|
127
|
+
company_item_number: "123",
|
|
128
|
+
model: "BTB-2145 Long Text Long Text Long Text Long Text Long Text",
|
|
129
|
+
id: 1,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
display_name: "Test 2",
|
|
133
|
+
company_item_number: "1234",
|
|
134
|
+
model: "BTB-123",
|
|
135
|
+
id: 2,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
display_name: "Test 3",
|
|
139
|
+
company_item_number: "12345",
|
|
140
|
+
model: "BTB-543",
|
|
141
|
+
id: 3,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
display_name: "Test 4",
|
|
145
|
+
company_item_number: "123456",
|
|
146
|
+
model: "BTB-4930",
|
|
147
|
+
id: 4,
|
|
148
|
+
},
|
|
149
|
+
],
|
|
128
150
|
}
|
|
129
151
|
},
|
|
130
152
|
methods: {
|
|
@@ -134,6 +156,47 @@ export default {
|
|
|
134
156
|
onInputChange(event) {
|
|
135
157
|
this.isChecked = event
|
|
136
158
|
},
|
|
159
|
+
isDropdownOpen() {
|
|
160
|
+
return this.dropdownOpen
|
|
161
|
+
},
|
|
162
|
+
toggleDropdownOpen() {
|
|
163
|
+
this.dropdownOpen = !this.dropdownOpen
|
|
164
|
+
},
|
|
165
|
+
getDropdownValues() {
|
|
166
|
+
let items = []
|
|
167
|
+
items = [
|
|
168
|
+
{
|
|
169
|
+
value: this.getComponentInfo({
|
|
170
|
+
row: this.itemOptions[0],
|
|
171
|
+
value: "display_name",
|
|
172
|
+
}),
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
value: this.getComponentInfo({
|
|
176
|
+
row: this.itemOptions[0],
|
|
177
|
+
value: "company_item_number",
|
|
178
|
+
}),
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
value: this.getComponentInfo({
|
|
182
|
+
row: this.itemOptions[0],
|
|
183
|
+
value: "model",
|
|
184
|
+
}),
|
|
185
|
+
},
|
|
186
|
+
]
|
|
187
|
+
return items
|
|
188
|
+
},
|
|
189
|
+
getComponentInfo({ row, value }) {
|
|
190
|
+
let item
|
|
191
|
+
if (row.selectedValue && row.selectedValue[value]) {
|
|
192
|
+
item = row.selectedValue[value]
|
|
193
|
+
} else if (row[value]) {
|
|
194
|
+
item = row[value]
|
|
195
|
+
} else {
|
|
196
|
+
item = "-"
|
|
197
|
+
}
|
|
198
|
+
return item
|
|
199
|
+
},
|
|
137
200
|
},
|
|
138
201
|
}
|
|
139
202
|
</script>
|
|
@@ -241,6 +241,10 @@ const TableContainer = styled.table`
|
|
|
241
241
|
visibility: visible;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
.drag-wrapper {
|
|
245
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
|
246
|
+
}
|
|
247
|
+
|
|
244
248
|
.arrow-dropdown {
|
|
245
249
|
visibility: visible;
|
|
246
250
|
}
|
|
@@ -248,8 +252,18 @@ const TableContainer = styled.table`
|
|
|
248
252
|
|
|
249
253
|
.drag-container {
|
|
250
254
|
display: table-cell;
|
|
251
|
-
width:
|
|
252
|
-
|
|
255
|
+
width: 20px;
|
|
256
|
+
min-width: 20px;
|
|
257
|
+
height: 40px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.drag-wrapper {
|
|
261
|
+
width: 16px;
|
|
262
|
+
height: 36px;
|
|
263
|
+
display: grid;
|
|
264
|
+
align-items: center;
|
|
265
|
+
justify-items: center;
|
|
266
|
+
border-radius: 4px;
|
|
253
267
|
}
|
|
254
268
|
|
|
255
269
|
.drag-icon {
|
|
@@ -298,6 +312,10 @@ const TableContainer = styled.table`
|
|
|
298
312
|
font-size: 13px;
|
|
299
313
|
padding: 5px 10px;
|
|
300
314
|
background: #fff !important;
|
|
315
|
+
|
|
316
|
+
&:focus {
|
|
317
|
+
background: ${(props) => props.theme.colors.grey5} + " !important";
|
|
318
|
+
}
|
|
301
319
|
}
|
|
302
320
|
|
|
303
321
|
.open-container {
|