@eturnity/eturnity_reusable_components 7.6.1-EPDM-9777.4 → 7.6.1-qa-16-02-15.1
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 +3 -3
- package/src/components/threeDots/index.vue +13 -20
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
|
`
|
@@ -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,11 +45,10 @@
|
|
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
|
-
:title="item.title"
|
53
52
|
>
|
54
53
|
<arrow-left
|
55
54
|
:hasChildren="hasChildren(item)"
|
@@ -69,10 +68,9 @@
|
|
69
68
|
// import ThreeDots from "@eturnity/eturnity_reusable_components/src/components/threeDots"
|
70
69
|
// To use:
|
71
70
|
// <three-dots
|
72
|
-
// :isLoading="true"
|
73
71
|
// :options="listOptions"
|
74
|
-
// @on-click="onClick($event)"
|
75
72
|
// @on-select="onSelect($event)"
|
73
|
+
// :isLoading="true"
|
76
74
|
// />
|
77
75
|
// options to pass:
|
78
76
|
// listOptions: [
|
@@ -205,8 +203,6 @@ const OptionItem = styled('div', optionAttrs)`
|
|
205
203
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
206
204
|
font-size: 13px;
|
207
205
|
position: relative;
|
208
|
-
${(props) => (props.isDisabled ? `background-color: ${ props.theme.colors.grey5 }!important` : '')};
|
209
|
-
${(props) => (props.isDisabled ? `color: ${ props.theme.colors.grey2 }` : '')};
|
210
206
|
|
211
207
|
&:hover {
|
212
208
|
background-color: #ebeef4;
|
@@ -372,9 +368,6 @@ export default {
|
|
372
368
|
},
|
373
369
|
onSelect({ item, hasChildren }) {
|
374
370
|
if (hasChildren || item.disabled) {
|
375
|
-
if (item.disabled) {
|
376
|
-
this.$emit('on-click', item)
|
377
|
-
}
|
378
371
|
return
|
379
372
|
}
|
380
373
|
this.$emit('on-select', item)
|