@eturnity/eturnity_reusable_components 1.0.82 → 1.0.86
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>
|
|
@@ -82,11 +82,11 @@ const TableContainer = styled.table`
|
|
|
82
82
|
cursor: pointer;
|
|
83
83
|
|
|
84
84
|
.table-dropdown {
|
|
85
|
-
background-color: ${(props) => props.theme.colors.grey5}
|
|
85
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
input {
|
|
89
|
-
background-color: ${(props) => props.theme.colors.grey5}
|
|
89
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -255,10 +255,6 @@ const TableContainer = styled.table`
|
|
|
255
255
|
width: 20px;
|
|
256
256
|
min-width: 20px;
|
|
257
257
|
height: 40px;
|
|
258
|
-
vertical-align: middle;
|
|
259
|
-
display: grid;
|
|
260
|
-
align-items: center;
|
|
261
|
-
justify-items: center;
|
|
262
258
|
}
|
|
263
259
|
|
|
264
260
|
.drag-wrapper {
|
|
@@ -315,7 +311,11 @@ const TableContainer = styled.table`
|
|
|
315
311
|
input {
|
|
316
312
|
font-size: 13px;
|
|
317
313
|
padding: 5px 10px;
|
|
318
|
-
background: #fff
|
|
314
|
+
background: #fff;
|
|
315
|
+
|
|
316
|
+
&:focus {
|
|
317
|
+
background: ${(props) => props.theme.colors.grey5};
|
|
318
|
+
}
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.open-container {
|