@eturnity/eturnity_reusable_components 1.1.7 → 1.1.10
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
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
:optionItems="itemOptions"
|
|
22
22
|
:optionsDisplay="['display_name', 'company_item_number', 'model']"
|
|
23
23
|
/> -->
|
|
24
|
-
<td>
|
|
25
|
-
<search-input />
|
|
26
|
-
</td>
|
|
24
|
+
<td>Test</td>
|
|
27
25
|
<div class="icons-container">
|
|
28
26
|
<three-dots :options="listOptions" :isLoading="false" />
|
|
29
27
|
</div>
|
|
@@ -50,7 +48,6 @@ import styled from "vue-styled-components"
|
|
|
50
48
|
import MainTable from "@/components/tables/mainTable"
|
|
51
49
|
import ThreeDots from "@/components/threeDots"
|
|
52
50
|
import Toggle from "@/components/inputs/toggle"
|
|
53
|
-
import SearchInput from "@/components/inputs/searchInput"
|
|
54
51
|
// import TableDropdown from "@/components/tableDropdown"
|
|
55
52
|
|
|
56
53
|
const PageContainer = styled.div`
|
|
@@ -65,7 +62,6 @@ export default {
|
|
|
65
62
|
MainTable,
|
|
66
63
|
ThreeDots,
|
|
67
64
|
Toggle,
|
|
68
|
-
SearchInput,
|
|
69
65
|
// TableDropdown,
|
|
70
66
|
},
|
|
71
67
|
data() {
|
|
@@ -84,20 +80,7 @@ export default {
|
|
|
84
80
|
{
|
|
85
81
|
name: "Option 1",
|
|
86
82
|
value: "option_1",
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
name: "Option 1 Child",
|
|
90
|
-
value: "option_1_child",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: "Option 2 Child",
|
|
94
|
-
value: "option_2_child",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "Option 3 Child",
|
|
98
|
-
value: "option_3_child",
|
|
99
|
-
},
|
|
100
|
-
],
|
|
83
|
+
disabled: true,
|
|
101
84
|
},
|
|
102
85
|
{
|
|
103
86
|
name: "Option 2",
|
|
@@ -106,20 +89,6 @@ export default {
|
|
|
106
89
|
{
|
|
107
90
|
name: "Option 3",
|
|
108
91
|
value: "option_3",
|
|
109
|
-
children: [
|
|
110
|
-
{
|
|
111
|
-
name: "Option 3 Child",
|
|
112
|
-
value: "option_3_child",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: "Option 4 Child",
|
|
116
|
-
value: "option_4_child",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "Option 5 Child",
|
|
120
|
-
value: "option_5_child",
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
92
|
},
|
|
124
93
|
{
|
|
125
94
|
name: "Option 4",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dropdown-row
|
|
3
3
|
:colspan="colSpan"
|
|
4
|
+
:isOpen="isOpen"
|
|
4
5
|
@click="toggleOpen"
|
|
5
6
|
ref="dropdownItem"
|
|
6
7
|
:disabled="disabled"
|
|
@@ -143,9 +144,13 @@ import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinn
|
|
|
143
144
|
import SearchInput from "@eturnity/eturnity_reusable_components/src/components/inputs/searchInput"
|
|
144
145
|
import InputText from "@eturnity/eturnity_reusable_components/src/components/inputs/inputText"
|
|
145
146
|
|
|
146
|
-
const rowAttrs = { disabled: Boolean }
|
|
147
|
+
const rowAttrs = { disabled: Boolean, isOpen: Boolean }
|
|
147
148
|
const DropdownRow = styled("td", rowAttrs)`
|
|
148
149
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
150
|
+
|
|
151
|
+
input {
|
|
152
|
+
cursor: ${(props) => (!props.isOpen ? "pointer !important" : "inherit")};
|
|
153
|
+
}
|
|
149
154
|
`
|
|
150
155
|
|
|
151
156
|
const ComponentItem = styled.div`
|
|
@@ -262,14 +267,14 @@ const TemplateLink = styled.div`
|
|
|
262
267
|
|
|
263
268
|
const InputContainer = styled.div`
|
|
264
269
|
.inputField input {
|
|
265
|
-
padding: 0
|
|
270
|
+
padding: 0;
|
|
266
271
|
|
|
267
272
|
&:focus {
|
|
268
|
-
padding: 5px
|
|
273
|
+
padding: 5px 0px;
|
|
269
274
|
}
|
|
270
275
|
|
|
271
276
|
&:hover {
|
|
272
|
-
padding: 0
|
|
277
|
+
padding: 0px 0 !important;
|
|
273
278
|
}
|
|
274
279
|
}
|
|
275
280
|
`
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
onSelect({ item: item, hasChildren: hasChildren(item) })
|
|
44
44
|
"
|
|
45
45
|
@mouseover="onItemHover({ index, item })"
|
|
46
|
+
:isDisabled="item.disabled"
|
|
46
47
|
>
|
|
47
48
|
<arrow-left :hasChildren="hasChildren(item)" />
|
|
48
49
|
<span>
|
|
@@ -117,25 +118,27 @@ const PageContainer = styled.div`
|
|
|
117
118
|
display: grid;
|
|
118
119
|
align-items: center;
|
|
119
120
|
justify-items: center;
|
|
120
|
-
width: 30px;
|
|
121
|
-
height: 30px;
|
|
122
|
-
|
|
123
|
-
&:hover {
|
|
124
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
|
125
|
-
border-radius: 4px;
|
|
126
|
-
}
|
|
127
121
|
`
|
|
128
122
|
|
|
129
123
|
const ButtonContainer = styled.div`
|
|
130
124
|
display: flex;
|
|
131
125
|
flex-direction: column;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
132
128
|
padding: 5px;
|
|
133
129
|
cursor: pointer;
|
|
130
|
+
width: 20px;
|
|
131
|
+
height: 20px;
|
|
134
132
|
|
|
135
133
|
div {
|
|
136
134
|
// This is the dot color
|
|
137
135
|
background-color: #263238;
|
|
138
136
|
}
|
|
137
|
+
|
|
138
|
+
&:hover {
|
|
139
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
|
140
|
+
border-radius: 4px;
|
|
141
|
+
}
|
|
139
142
|
`
|
|
140
143
|
|
|
141
144
|
const DotItem = styled.div`
|
|
@@ -179,9 +182,10 @@ const OptionsContainer = styled.div`
|
|
|
179
182
|
height: max-content;
|
|
180
183
|
`
|
|
181
184
|
|
|
182
|
-
const
|
|
185
|
+
const optionAttrs = { isDisabled: Boolean }
|
|
186
|
+
const OptionItem = styled("div", optionAttrs)`
|
|
183
187
|
padding: 12px;
|
|
184
|
-
cursor: pointer;
|
|
188
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
185
189
|
font-size: 13px;
|
|
186
190
|
position: relative;
|
|
187
191
|
|
|
@@ -288,7 +292,7 @@ export default {
|
|
|
288
292
|
item.children && item.children.length ? item.children : null
|
|
289
293
|
},
|
|
290
294
|
onSelect({ item, hasChildren }) {
|
|
291
|
-
if (hasChildren) {
|
|
295
|
+
if (hasChildren || item.disabled) {
|
|
292
296
|
return
|
|
293
297
|
}
|
|
294
298
|
this.$emit("on-select", item)
|