@eturnity/eturnity_reusable_components 7.6.1-EPDM-9777.3 → 7.6.1-qa-16-02-15
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 +1 -1
- package/src/assets/theme.js +1 -0
- package/src/components/infoCard/index.vue +21 -19
- package/src/components/infoText/index.vue +0 -1
- package/src/components/modals/modal/index.vue +17 -12
- package/src/components/pagination/index.vue +19 -4
- package/src/components/tables/mainTable/index.vue +4 -3
- package/src/components/threeDots/index.vue +13 -19
package/package.json
CHANGED
package/src/assets/theme.js
CHANGED
@@ -1,36 +1,38 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
<info-container>
|
3
|
+
<icon name="info" size="24px" />
|
4
|
+
<InfoTextContainer>
|
5
|
+
<slot />
|
6
|
+
</InfoTextContainer>
|
7
|
+
</info-container>
|
8
8
|
</template>
|
9
|
-
|
9
|
+
|
10
10
|
<script>
|
11
11
|
import styled from 'vue-styled-components'
|
12
|
-
import
|
13
|
-
|
14
|
-
const InfoContainer = styled.div`
|
12
|
+
import icon from '../icon'
|
13
|
+
const InfoContainer = styled('div')`
|
15
14
|
display: flex;
|
15
|
+
align-items: flex-start;
|
16
16
|
gap: 15px;
|
17
17
|
padding: 20px;
|
18
|
-
|
18
|
+
width: 500px;
|
19
|
+
min-width: 450px;
|
20
|
+
border: 1px dashed #dee2eb;
|
19
21
|
border-radius: 4px;
|
22
|
+
margin:20px 0;
|
20
23
|
`
|
21
24
|
|
22
|
-
const
|
25
|
+
const InfoTextContainer = styled('div')`
|
23
26
|
font-size: 13px;
|
24
|
-
width: 100%;
|
25
27
|
`
|
26
28
|
|
27
29
|
|
28
30
|
export default {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
components:{
|
32
|
+
icon,
|
33
|
+
InfoTextContainer,
|
34
|
+
InfoContainer
|
35
|
+
},
|
36
|
+
props:[]
|
35
37
|
}
|
36
38
|
</script>
|
@@ -3,7 +3,6 @@
|
|
3
3
|
:position="position"
|
4
4
|
:isOpen="isOpen"
|
5
5
|
:class="{ visible: isOpen, hidden: !isOpen }"
|
6
|
-
@click.native="onOutsideClose()"
|
7
6
|
:backdrop="backdrop"
|
8
7
|
>
|
9
8
|
<modal-container @click.stop>
|
@@ -27,7 +26,7 @@
|
|
27
26
|
// import Modal from "@eturnity/eturnity_reusable_components/src/components/modals/modal"
|
28
27
|
// This is a more flexible modal box, where the parent can decide how the body of the modal looks
|
29
28
|
// To use:
|
30
|
-
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :
|
29
|
+
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :isLoading="true" :hideClose="true">
|
31
30
|
// <div>Data....</div>
|
32
31
|
// </modal>
|
33
32
|
|
@@ -137,10 +136,6 @@ export default {
|
|
137
136
|
required: true,
|
138
137
|
default: false
|
139
138
|
},
|
140
|
-
preventOutsideClose: {
|
141
|
-
required: false,
|
142
|
-
default: false
|
143
|
-
},
|
144
139
|
isLoading: {
|
145
140
|
required: false,
|
146
141
|
default: false
|
@@ -158,20 +153,30 @@ export default {
|
|
158
153
|
default: 'fixed'
|
159
154
|
}
|
160
155
|
},
|
156
|
+
beforeDestroy() {
|
157
|
+
window.removeEventListener('keydown', this.handleKeyDown)
|
158
|
+
},
|
161
159
|
methods: {
|
162
160
|
onCloseModal() {
|
163
161
|
this.$emit('on-close')
|
164
162
|
},
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
this.$emit('on-close')
|
163
|
+
handleKeyDown({ key }) {
|
164
|
+
if (key === 'Escape') {
|
165
|
+
this.onCloseModal()
|
169
166
|
}
|
170
167
|
}
|
171
168
|
},
|
172
169
|
watch: {
|
173
|
-
isOpen:
|
174
|
-
|
170
|
+
isOpen: {
|
171
|
+
immediate: true,
|
172
|
+
handler(isOpen) {
|
173
|
+
document.body.style.overflow = isOpen ? 'hidden' : ''
|
174
|
+
if (isOpen) {
|
175
|
+
window.addEventListener('keydown', this.handleKeyDown)
|
176
|
+
} else {
|
177
|
+
window.removeEventListener('keydown', this.handleKeyDown)
|
178
|
+
}
|
179
|
+
}
|
175
180
|
}
|
176
181
|
}
|
177
182
|
}
|
@@ -7,7 +7,11 @@
|
|
7
7
|
@click="fetchPage(paginationParams.previous)"
|
8
8
|
>
|
9
9
|
<arrowIconContainer>
|
10
|
-
<icon
|
10
|
+
<icon
|
11
|
+
name="arrow_left"
|
12
|
+
:color="getTheme.colors.brightBlue"
|
13
|
+
size="12px"
|
14
|
+
/>
|
11
15
|
</arrowIconContainer>
|
12
16
|
<arrowText>{{ $gettext('back') }}</arrowText>
|
13
17
|
</paginationLink>
|
@@ -55,7 +59,11 @@
|
|
55
59
|
>
|
56
60
|
<arrowText>{{ $gettext('forward') }}</arrowText>
|
57
61
|
<arrowIconContainer>
|
58
|
-
<icon
|
62
|
+
<icon
|
63
|
+
name="arrow_right"
|
64
|
+
:color="getTheme.colors.brightBlue"
|
65
|
+
size="12px"
|
66
|
+
/>
|
59
67
|
</arrowIconContainer>
|
60
68
|
</paginationLink>
|
61
69
|
</paginationWrapper>
|
@@ -64,8 +72,10 @@
|
|
64
72
|
<script>
|
65
73
|
import styled from 'vue-styled-components'
|
66
74
|
import icon from '../icon'
|
75
|
+
import theme from '@/assets/theme.js'
|
76
|
+
|
67
77
|
const paginationWrapper = styled.nav`
|
68
|
-
color:
|
78
|
+
color: ${(props) => props.theme.brightBlue};
|
69
79
|
font-size: 13px;
|
70
80
|
display: flex;
|
71
81
|
flex-wrap: wrap;
|
@@ -85,7 +95,7 @@ const paginationLink = styled.div`
|
|
85
95
|
|
86
96
|
&.active {
|
87
97
|
color: #fff;
|
88
|
-
background-color:
|
98
|
+
background-color: ${(props) => props.theme.brightBlue};
|
89
99
|
padding: 7px 12px;
|
90
100
|
border-radius: 4px;
|
91
101
|
}
|
@@ -106,6 +116,11 @@ export default {
|
|
106
116
|
arrowIconContainer
|
107
117
|
},
|
108
118
|
props: ['fetchPage', 'currentPage', 'paginationParams'],
|
119
|
+
computed: {
|
120
|
+
getTheme() {
|
121
|
+
return theme
|
122
|
+
}
|
123
|
+
},
|
109
124
|
methods: {
|
110
125
|
getNewProjects(num) {
|
111
126
|
this.$emit('on-pagination-change', num)
|
@@ -10,7 +10,7 @@
|
|
10
10
|
ref="tableRef"
|
11
11
|
:isPositionAbsolute="doesTableContainDraggables"
|
12
12
|
>
|
13
|
-
<table-wrapper :fullWidth="fullWidth">
|
13
|
+
<table-wrapper class="main-table-wrapper" :fullWidth="fullWidth">
|
14
14
|
<spinner-wrapper v-if="isLoading">
|
15
15
|
<spinner />
|
16
16
|
</spinner-wrapper>
|
@@ -72,7 +72,7 @@ const TableWrapper = styled('div', wrapperAttrs)`
|
|
72
72
|
overflow-y: hidden;
|
73
73
|
|
74
74
|
::-webkit-scrollbar {
|
75
|
-
height:
|
75
|
+
height: 10px; //height of the whole scrollbar area
|
76
76
|
}
|
77
77
|
|
78
78
|
::-webkit-scrollbar-track {
|
@@ -81,7 +81,7 @@ const TableWrapper = styled('div', wrapperAttrs)`
|
|
81
81
|
}
|
82
82
|
|
83
83
|
::-webkit-scrollbar-thumb {
|
84
|
-
border-bottom:
|
84
|
+
border-bottom: 10px solid ${(props) => props.theme.colors.brightBlue}; // width of the actual scrollbar
|
85
85
|
border-radius: 4px;
|
86
86
|
}
|
87
87
|
`
|
@@ -416,6 +416,7 @@ export default {
|
|
416
416
|
}
|
417
417
|
},
|
418
418
|
mounted() {
|
419
|
+
console.log('asdfasf')
|
419
420
|
this.observeTableHeight()
|
420
421
|
},
|
421
422
|
beforeDestroy() {
|
@@ -23,17 +23,17 @@
|
|
23
23
|
v-for="child in childOpen"
|
24
24
|
:key="child.value"
|
25
25
|
@click.stop="
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
onSelect({
|
27
|
+
item: child,
|
28
|
+
hasChildren: hasChildren(child)
|
29
|
+
})
|
30
|
+
"
|
31
31
|
@keyup.enter.stop="
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
onSelect({
|
33
|
+
item: child,
|
34
|
+
hasChildren: hasChildren(child)
|
35
|
+
})
|
36
|
+
"
|
37
37
|
>
|
38
38
|
{{ child.name }}
|
39
39
|
</option-child>
|
@@ -45,8 +45,8 @@
|
|
45
45
|
tabindex="0"
|
46
46
|
@click.stop="onSelect({ item: item, hasChildren: hasChildren(item) })"
|
47
47
|
@keyup.enter="
|
48
|
-
|
49
|
-
|
48
|
+
onSelect({ item: item, hasChildren: hasChildren(item) })
|
49
|
+
"
|
50
50
|
@mouseover="onItemHover({ index, item })"
|
51
51
|
:isDisabled="item.disabled"
|
52
52
|
>
|
@@ -68,10 +68,9 @@
|
|
68
68
|
// import ThreeDots from "@eturnity/eturnity_reusable_components/src/components/threeDots"
|
69
69
|
// To use:
|
70
70
|
// <three-dots
|
71
|
-
// :isLoading="true"
|
72
71
|
// :options="listOptions"
|
73
|
-
// @on-click="onClick($event)"
|
74
72
|
// @on-select="onSelect($event)"
|
73
|
+
// :isLoading="true"
|
75
74
|
// />
|
76
75
|
// options to pass:
|
77
76
|
// listOptions: [
|
@@ -204,8 +203,6 @@ const OptionItem = styled('div', optionAttrs)`
|
|
204
203
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
205
204
|
font-size: 13px;
|
206
205
|
position: relative;
|
207
|
-
${(props) => (props.isDisabled ? `background-color: ${ props.theme.colors.grey5 }!important` : '')};
|
208
|
-
${(props) => (props.isDisabled ? `color: ${ props.theme.colors.grey2 }` : '')};
|
209
206
|
|
210
207
|
&:hover {
|
211
208
|
background-color: #ebeef4;
|
@@ -371,9 +368,6 @@ export default {
|
|
371
368
|
},
|
372
369
|
onSelect({ item, hasChildren }) {
|
373
370
|
if (hasChildren || item.disabled) {
|
374
|
-
if (item.disabled) {
|
375
|
-
this.$emit('on-click', item)
|
376
|
-
}
|
377
371
|
return
|
378
372
|
}
|
379
373
|
this.$emit('on-select', item)
|