@eturnity/eturnity_reusable_components 7.2.2 → 7.4.0-EPDM-7260.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 +2 -2
- package/src/App.vue +1 -3
- package/src/assets/svgIcons/consumption_tariffs.svg +43 -0
- package/src/assets/svgIcons/electricity_tariff.svg +3 -0
- package/src/components/addNewButton/index.vue +8 -12
- package/src/components/buttons/mainButton/index.vue +1 -1
- package/src/components/iconWrapper/index.vue +15 -19
- package/src/components/inputs/inputText/index.vue +2 -2
- package/src/components/inputs/searchInput/index.vue +2 -2
- package/src/components/inputs/select/index.vue +2 -8
- package/src/components/inputs/switchField/index.vue +2 -7
- package/src/components/inputs/toggle/index.vue +1 -1
- package/src/components/pageTitle/index.vue +3 -26
- package/src/components/selectedOptions/index.vue +135 -0
- package/src/components/sideMenu/index.vue +1 -5
- package/src/helpers/numberConverter.js +1 -1
- package/src/components/infoCard/index.vue +0 -38
- package/src/components/navigationTabs/index.vue +0 -107
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.4.0-EPDM-7260.1",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -63,4 +63,4 @@
|
|
63
63
|
"author": "Aaron Enser",
|
64
64
|
"license": "ISC",
|
65
65
|
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
|
66
|
-
}
|
66
|
+
}
|
package/src/App.vue
CHANGED
@@ -114,7 +114,6 @@ import iconCollection from '@/components/icon/iconCollection'
|
|
114
114
|
import dropdownComponent from '@/components/dropdown'
|
115
115
|
import videoThumbnail from '@/components/videoThumbnail'
|
116
116
|
import icon from '@/components/icon'
|
117
|
-
import infoCard from '@/components/infoCard'
|
118
117
|
// import TableDropdown from "@/components/tableDropdown"
|
119
118
|
|
120
119
|
const PageContainer = styled.div`
|
@@ -139,8 +138,7 @@ export default {
|
|
139
138
|
iconCollection,
|
140
139
|
dropdownComponent,
|
141
140
|
videoThumbnail,
|
142
|
-
icon
|
143
|
-
infoCard
|
141
|
+
icon
|
144
142
|
},
|
145
143
|
data() {
|
146
144
|
return {
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<svg width="81" height="80" viewBox="0 0 81 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M51.6097 40.3491C51.7466 40.2267 51.66 40 51.4764 40H43.375L48.9016 22.6994C48.9636 22.5053 48.7296 22.3537 48.5777 22.4895L29.3903 39.6509C29.2534 39.7733 29.34 40 29.5236 40H37.625L32.0984 57.3006C32.0364 57.4947 32.2704 57.6463 32.4223 57.5105L51.6097 40.3491Z" fill="#B2B9C5"/>
|
3
|
+
<path d="M27.5676 15.1647C28.222 15.8191 28.2078 16.8942 27.536 17.5661C26.8641 18.238 25.789 18.2521 25.1346 17.5978L17.3671 9.83034L19.8002 7.39727L27.5676 15.1647Z" fill="#DEE2EB"/>
|
4
|
+
<path d="M22.9134 2.03786C24.0932 2.24201 24.8589 3.36854 24.6237 4.55419C24.3885 5.73997 23.2413 6.53586 22.0613 6.33187L11.6146 4.5259L11.3604 0.0388747L22.9134 2.03786Z" fill="#DEE2EB"/>
|
5
|
+
<path d="M25.9034 19.9886C26.5577 20.643 26.5436 21.7181 25.8717 22.39C25.1998 23.0619 24.1247 23.0761 23.4703 22.4217L14.1231 13.0744L16.5561 10.6414L25.9034 19.9886Z" fill="#DEE2EB"/>
|
6
|
+
<path d="M21.8694 22.4428C22.5238 23.0972 22.5096 24.1723 21.8377 24.8442C21.1658 25.516 20.0907 25.5302 19.4363 24.8758L10.879 16.3185L13.312 13.8854L21.8694 22.4428Z" fill="#DEE2EB"/>
|
7
|
+
<path d="M16.2556 23.3171C16.9099 23.9715 16.8958 25.0467 16.2239 25.7185C15.552 26.3904 14.4769 26.4046 13.8225 25.7502L7.63489 19.5626L10.068 17.1295L16.2556 23.3171Z" fill="#DEE2EB"/>
|
8
|
+
<path d="M20.3268 7.92388L8.16149 20.0892L2.10553 14.0332C-0.0757419 11.852 -0.0284786 8.26816 2.21109 6.02859L6.2662 1.97348C8.50578 -0.26609 12.0896 -0.313354 14.2708 1.86792L20.3268 7.92388Z" fill="#DEE2EB"/>
|
9
|
+
<path d="M18.947 11.4102L18.1359 12.2212L17.0827 11.168L17.8937 10.3569L18.947 11.4102Z" fill="#DEE2EB"/>
|
10
|
+
<path d="M15.7029 14.6542L14.8919 15.4653L13.8386 14.4121L14.6497 13.601L15.7029 14.6542Z" fill="#DEE2EB"/>
|
11
|
+
<path d="M11.9322 17.3717L11.1212 18.1827L10.5946 17.6561L11.4056 16.8451L11.9322 17.3717Z" fill="#DEE2EB"/>
|
12
|
+
<path d="M6.2662 1.97348C8.29376 -0.05407 10.1615 -0.0787013 11.3604 0.0388747L11.6202 0.568994L11.4815 0.970987L9.60324 1.79608C9.16322 1.44619 6.15807 2.08162 6.2662 1.97348Z" fill="#DEE2EB"/>
|
13
|
+
<path d="M53.4304 64.8353C52.776 64.1809 52.7902 63.1058 53.4621 62.4339C54.134 61.762 55.2091 61.7478 55.8635 62.4022L63.6309 70.1697L61.1978 72.6027L53.4304 64.8353Z" fill="#DEE2EB"/>
|
14
|
+
<path d="M58.0847 77.9621C56.9049 77.758 56.1391 76.6315 56.3743 75.4458C56.6095 74.26 57.7567 73.4641 58.9367 73.6681L69.3834 75.4741L69.6376 79.9611L58.0847 77.9621Z" fill="#DEE2EB"/>
|
15
|
+
<path d="M55.0947 60.0114C54.4403 59.357 54.4545 58.2819 55.1264 57.61C55.7982 56.9381 56.8734 56.9239 57.5277 57.5783L66.875 66.9256L64.4419 69.3586L55.0947 60.0114Z" fill="#DEE2EB"/>
|
16
|
+
<path d="M59.1287 57.5572C58.4743 56.9028 58.4885 55.8277 59.1603 55.1558C59.8322 54.4839 60.9074 54.4698 61.5617 55.1242L70.1191 63.6815L67.686 66.1146L59.1287 57.5572Z" fill="#DEE2EB"/>
|
17
|
+
<path d="M64.7425 56.6829C64.0881 56.0285 64.1023 54.9533 64.7742 54.2815C65.446 53.6096 66.5212 53.5954 67.1755 54.2498L73.3632 60.4374L70.9301 62.8705L64.7425 56.6829Z" fill="#DEE2EB"/>
|
18
|
+
<path d="M60.6712 72.0761L72.8366 59.9108L78.8925 65.9668C81.0738 68.148 81.0265 71.7318 78.787 73.9714L74.7318 78.0265C72.4923 80.2661 68.9085 80.3134 66.7272 78.1321L60.6712 72.0761Z" fill="#DEE2EB"/>
|
19
|
+
<path d="M62.0511 68.5898L62.8621 67.7788L63.9153 68.832L63.1043 69.6431L62.0511 68.5898Z" fill="#DEE2EB"/>
|
20
|
+
<path d="M65.2952 65.3458L66.1062 64.5347L67.1594 65.5879L66.3484 66.399L65.2952 65.3458Z" fill="#DEE2EB"/>
|
21
|
+
<path d="M69.0659 62.6283L69.8769 61.8173L70.4035 62.3439L69.5925 63.1549L69.0659 62.6283Z" fill="#DEE2EB"/>
|
22
|
+
<path d="M74.7318 78.0265C72.7043 80.0541 70.8365 80.0787 69.6376 79.9611L69.3778 79.431L69.5165 79.029L71.3948 78.2039C71.8348 78.5538 74.84 77.9184 74.7318 78.0265Z" fill="#DEE2EB"/>
|
23
|
+
<path d="M53.4304 15.1647C52.776 15.8191 52.7902 16.8942 53.4621 17.5661C54.134 18.238 55.2091 18.2521 55.8635 17.5978L63.6309 9.83034L61.1978 7.39727L53.4304 15.1647Z" fill="#DEE2EB"/>
|
24
|
+
<path d="M58.0847 2.03786C56.9049 2.24201 56.1391 3.36854 56.3743 4.55419C56.6095 5.73997 57.7567 6.53586 58.9367 6.33187L69.3834 4.5259L69.6376 0.0388747L58.0847 2.03786Z" fill="#DEE2EB"/>
|
25
|
+
<path d="M55.0947 19.9886C54.4403 20.643 54.4545 21.7181 55.1263 22.39C55.7982 23.0619 56.8734 23.0761 57.5277 22.4217L66.875 13.0744L64.4419 10.6414L55.0947 19.9886Z" fill="#DEE2EB"/>
|
26
|
+
<path d="M59.1287 22.4428C58.4743 23.0972 58.4885 24.1723 59.1603 24.8442C59.8322 25.516 60.9074 25.5302 61.5617 24.8758L70.1191 16.3185L67.686 13.8854L59.1287 22.4428Z" fill="#DEE2EB"/>
|
27
|
+
<path d="M64.7425 23.3171C64.0881 23.9715 64.1023 25.0467 64.7742 25.7185C65.446 26.3904 66.5212 26.4046 67.1755 25.7502L73.3632 19.5626L70.9301 17.1295L64.7425 23.3171Z" fill="#DEE2EB"/>
|
28
|
+
<path d="M60.6712 7.92388L72.8366 20.0892L78.8925 14.0332C81.0738 11.852 81.0265 8.26816 78.787 6.02859L74.7318 1.97348C72.4923 -0.26609 68.9085 -0.313354 66.7272 1.86792L60.6712 7.92388Z" fill="#DEE2EB"/>
|
29
|
+
<path d="M62.0511 11.4102L62.8621 12.2212L63.9153 11.168L63.1043 10.3569L62.0511 11.4102Z" fill="#DEE2EB"/>
|
30
|
+
<path d="M65.2952 14.6542L66.1062 15.4653L67.1594 14.4121L66.3484 13.601L65.2952 14.6542Z" fill="#DEE2EB"/>
|
31
|
+
<path d="M69.0659 17.3717L69.8769 18.1827L70.4035 17.6561L69.5925 16.8451L69.0659 17.3717Z" fill="#DEE2EB"/>
|
32
|
+
<path d="M74.7318 1.97348C72.7043 -0.05407 70.8365 -0.0787013 69.6376 0.0388747L69.3778 0.568994L69.5165 0.970987L71.3948 1.79608C71.8348 1.44619 74.84 2.08162 74.7318 1.97348Z" fill="#DEE2EB"/>
|
33
|
+
<path d="M27.5676 64.8353C28.222 64.1809 28.2078 63.1058 27.536 62.4339C26.8641 61.762 25.789 61.7479 25.1346 62.4022L17.3671 70.1697L19.8002 72.6027L27.5676 64.8353Z" fill="#DEE2EB"/>
|
34
|
+
<path d="M22.9134 77.9621C24.0932 77.758 24.8589 76.6315 24.6237 75.4458C24.3885 74.26 23.2413 73.4641 22.0613 73.6681L11.6146 75.4741L11.3604 79.9611L22.9134 77.9621Z" fill="#DEE2EB"/>
|
35
|
+
<path d="M25.9034 60.0114C26.5578 59.357 26.5436 58.2819 25.8717 57.61C25.1998 56.9381 24.1247 56.924 23.4703 57.5783L14.1231 66.9256L16.5561 69.3586L25.9034 60.0114Z" fill="#DEE2EB"/>
|
36
|
+
<path d="M21.8694 57.5572C22.5238 56.9028 22.5096 55.8277 21.8377 55.1558C21.1658 54.484 20.0907 54.4698 19.4363 55.1242L10.879 63.6815L13.312 66.1146L21.8694 57.5572Z" fill="#DEE2EB"/>
|
37
|
+
<path d="M16.2556 56.6829C16.9099 56.0285 16.8958 54.9533 16.2239 54.2815C15.552 53.6096 14.4769 53.5954 13.8225 54.2498L7.63489 60.4374L10.068 62.8705L16.2556 56.6829Z" fill="#DEE2EB"/>
|
38
|
+
<path d="M20.3268 72.0761L8.16149 59.9108L2.10553 65.9668C-0.0757409 68.148 -0.0284779 71.7318 2.2111 73.9714L6.2662 78.0265C8.50578 80.2661 12.0896 80.3134 14.2708 78.1321L20.3268 72.0761Z" fill="#DEE2EB"/>
|
39
|
+
<path d="M18.947 68.5898L18.1359 67.7788L17.0827 68.832L17.8938 69.6431L18.947 68.5898Z" fill="#DEE2EB"/>
|
40
|
+
<path d="M15.7029 65.3458L14.8919 64.5347L13.8386 65.5879L14.6497 66.399L15.7029 65.3458Z" fill="#DEE2EB"/>
|
41
|
+
<path d="M11.9322 62.6283L11.1212 61.8173L10.5946 62.3439L11.4056 63.1549L11.9322 62.6283Z" fill="#DEE2EB"/>
|
42
|
+
<path d="M6.2662 78.0265C8.29376 80.0541 10.1615 80.0787 11.3604 79.9611L11.6202 79.431L11.4815 79.029L9.60324 78.2039C9.16322 78.5538 6.15807 77.9184 6.2662 78.0265Z" fill="#DEE2EB"/>
|
43
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg width="10" height="18" viewBox="0 0 10 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.36652 9.33445C9.4832 9.20595 9.39203 9 9.21845 9H6.16767L8.29896 0.785289C8.35143 0.583073 8.09775 0.44595 7.95731 0.60061L0.633784 8.66555C0.517096 8.79405 0.608271 9 0.781847 9H3.83263L1.70134 17.2147C1.64887 17.4169 1.90255 17.5541 2.04299 17.3994L9.36652 9.33445Z" fill="#263238"/>
|
3
|
+
</svg>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<page-container :shouldPosition="shouldPosition">
|
3
|
-
<button-container
|
3
|
+
<button-container>
|
4
4
|
<plus-button :src="require('../../assets/icons/plus_button.svg')" />
|
5
5
|
</button-container>
|
6
6
|
</page-container>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script>
|
10
10
|
// import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
|
11
|
-
import styled from
|
11
|
+
import styled from "vue-styled-components"
|
12
12
|
|
13
13
|
const pageAttrs = { shouldPosition: Boolean }
|
14
|
-
const PageContainer = styled(
|
15
|
-
position: ${(props) => (props.shouldPosition ?
|
14
|
+
const PageContainer = styled("div", pageAttrs)`
|
15
|
+
position: ${(props) => (props.shouldPosition ? "fixed" : "unset")};
|
16
16
|
bottom: 30px;
|
17
17
|
right: 30px;
|
18
18
|
`
|
@@ -42,21 +42,17 @@ const ButtonContainer = styled.div`
|
|
42
42
|
const PlusButton = styled.img``
|
43
43
|
|
44
44
|
export default {
|
45
|
-
name:
|
45
|
+
name: "add-new-button",
|
46
46
|
components: {
|
47
47
|
PageContainer,
|
48
48
|
ButtonContainer,
|
49
|
-
PlusButton
|
49
|
+
PlusButton,
|
50
50
|
},
|
51
51
|
props: {
|
52
52
|
shouldPosition: {
|
53
53
|
required: false,
|
54
|
-
default: true
|
54
|
+
default: true,
|
55
55
|
},
|
56
|
-
|
57
|
-
type: String,
|
58
|
-
default: ''
|
59
|
-
}
|
60
|
-
}
|
56
|
+
},
|
61
57
|
}
|
62
58
|
</script>
|
@@ -8,7 +8,6 @@
|
|
8
8
|
:color="iconColor"
|
9
9
|
:hoveredBackgroundColor="hoveredBackgroundColor"
|
10
10
|
:isHovered="isHovered"
|
11
|
-
:data-id="dataId"
|
12
11
|
>
|
13
12
|
<icon
|
14
13
|
:disabled="disabled"
|
@@ -111,10 +110,10 @@ export default {
|
|
111
110
|
required: false
|
112
111
|
},
|
113
112
|
backgroundColor: {
|
114
|
-
required: false
|
115
|
-
|
116
|
-
|
117
|
-
|
113
|
+
required: false,
|
114
|
+
},
|
115
|
+
hasBorder: {
|
116
|
+
required: false,
|
118
117
|
},
|
119
118
|
hoveredBackgroundColor: {
|
120
119
|
required: false,
|
@@ -136,21 +135,18 @@ export default {
|
|
136
135
|
required: false,
|
137
136
|
default: '6px'
|
138
137
|
},
|
139
|
-
|
140
|
-
|
141
|
-
default:
|
138
|
+
isHovered:{
|
139
|
+
required:false,
|
140
|
+
default:false
|
141
|
+
},
|
142
|
+
isStriked:{
|
143
|
+
required:false,
|
144
|
+
default:false
|
145
|
+
|
146
|
+
}
|
142
147
|
},
|
143
|
-
|
144
|
-
|
145
|
-
default: false
|
146
|
-
},
|
147
|
-
isStriked: {
|
148
|
-
required: false,
|
149
|
-
default: false
|
148
|
+
data() {
|
149
|
+
return {}
|
150
150
|
}
|
151
|
-
},
|
152
|
-
data() {
|
153
|
-
return {}
|
154
151
|
}
|
155
|
-
}
|
156
152
|
</script>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<input-label
|
9
9
|
:labelFontColor="labelFontColor"
|
10
10
|
:fontSize="fontSize"
|
11
|
-
:
|
11
|
+
:dataId="labelDataId"
|
12
12
|
>{{ label }}
|
13
13
|
<optionalLabel v-if="labelOptional"
|
14
14
|
>({{ $gettext('Optional') }})</optionalLabel
|
@@ -44,7 +44,7 @@
|
|
44
44
|
:hasFocus="hasFocus"
|
45
45
|
:backgroundColor="backgroundColor"
|
46
46
|
:disabledBackgroundColor="disabledBackgroundColor"
|
47
|
-
:
|
47
|
+
:dataId="inputDataId"
|
48
48
|
/>
|
49
49
|
<icon-wrapper
|
50
50
|
v-if="inputType === 'password' && !isError"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
:inputWidth="inputWidth"
|
12
12
|
:isFilter="isFilter"
|
13
13
|
:hasFocus="hasFocus"
|
14
|
-
:
|
14
|
+
:dataId="dataId"
|
15
15
|
/>
|
16
16
|
<img
|
17
17
|
class="search-icn"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
// inputWidth="250px"
|
32
32
|
// @on-change="function($event)"
|
33
33
|
// :isFilter="true" // to set the height at 30px
|
34
|
-
//
|
34
|
+
// dataId="test-data-id"
|
35
35
|
// />
|
36
36
|
import styled from 'vue-styled-components'
|
37
37
|
|
@@ -45,7 +45,6 @@
|
|
45
45
|
:disabled="disabled"
|
46
46
|
@keydown.native="onKeyDown"
|
47
47
|
:showBorder="showBorder"
|
48
|
-
:data-id="dataId"
|
49
48
|
>
|
50
49
|
<inputText
|
51
50
|
v-if="isSearchBarVisible"
|
@@ -123,8 +122,7 @@
|
|
123
122
|
// optionWidth="50%"
|
124
123
|
// label="that is a label"
|
125
124
|
// alignItems="vertical"
|
126
|
-
// label-data-id="test-
|
127
|
-
// data-id="test-data-id"
|
125
|
+
// label-data-id="test-data-id"
|
128
126
|
// >
|
129
127
|
// <template #selector="{selectedValue}">
|
130
128
|
// value selected: {{selectedValue}}
|
@@ -393,10 +391,6 @@ export default {
|
|
393
391
|
showBorder: {
|
394
392
|
required: false,
|
395
393
|
default: true
|
396
|
-
},
|
397
|
-
dataId: {
|
398
|
-
type: String,
|
399
|
-
default: ''
|
400
394
|
}
|
401
395
|
},
|
402
396
|
|
@@ -477,7 +471,7 @@ export default {
|
|
477
471
|
}
|
478
472
|
},
|
479
473
|
optionLeave() {
|
480
|
-
if
|
474
|
+
if(this.dropdownAutoClose) {
|
481
475
|
this.isDropdownOpen = false
|
482
476
|
}
|
483
477
|
},
|
@@ -10,8 +10,6 @@
|
|
10
10
|
v-if="label && labelAlign === 'left'"
|
11
11
|
:hasInfoMessage="!!infoTextMessage"
|
12
12
|
:colorMode="colorMode"
|
13
|
-
:primaryColor="primaryColor"
|
14
|
-
:secondaryColor="secondaryColor"
|
15
13
|
>
|
16
14
|
<label-text :size="size">{{ label }}</label-text>
|
17
15
|
<info-text
|
@@ -37,7 +35,6 @@
|
|
37
35
|
:primaryColor="primaryColor"
|
38
36
|
:secondaryColor="secondaryColor"
|
39
37
|
:inactiveColor="inactiveColor"
|
40
|
-
:data-id="item.hasOwnProperty('dataId') ? item.dataId : ''"
|
41
38
|
>
|
42
39
|
{{ item.content }}
|
43
40
|
</switchOption>
|
@@ -102,12 +99,10 @@ const toggleAttrs = {
|
|
102
99
|
fontColor: String,
|
103
100
|
disabled: Boolean,
|
104
101
|
backgroundColor: String,
|
105
|
-
isChecked: Boolean
|
106
|
-
secondaryColor: String,
|
107
|
-
primaryColor: String,
|
102
|
+
isChecked: Boolean
|
108
103
|
}
|
109
104
|
const LabelText = styled('div', toggleAttrs)`
|
110
|
-
color:
|
105
|
+
color: white;
|
111
106
|
font-size: 13px;
|
112
107
|
font-weight: 700;
|
113
108
|
`
|
@@ -1,14 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">{{ text }}</title-text>
|
4
|
-
<info-text
|
5
|
-
v-if="infoText"
|
6
|
-
:text="infoText"
|
7
|
-
borderColor="#ccc"
|
8
|
-
size="14px"
|
9
|
-
:alignArrow="infoAlign"
|
10
|
-
/>
|
11
|
-
</flex>
|
2
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">{{ text }}</title-text>
|
12
3
|
</template>
|
13
4
|
|
14
5
|
<script>
|
@@ -19,28 +10,20 @@
|
|
19
10
|
// color="red"
|
20
11
|
// />
|
21
12
|
import styled from "vue-styled-components"
|
22
|
-
|
13
|
+
|
23
14
|
const textAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
24
15
|
const TitleText = styled("div", textAttrs)`
|
25
16
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
26
17
|
font-weight: bold;
|
27
18
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
28
19
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
29
|
-
|
30
|
-
`
|
31
|
-
const flex = styled("div", textAttrs)`
|
32
|
-
display: flex;
|
33
|
-
gap:10px;
|
34
20
|
margin-bottom: 20px;
|
35
|
-
align-items: center;
|
36
21
|
`
|
37
22
|
|
38
23
|
export default {
|
39
24
|
name: "page-title",
|
40
25
|
components: {
|
41
26
|
TitleText,
|
42
|
-
InfoText,
|
43
|
-
flex
|
44
27
|
},
|
45
28
|
props: {
|
46
29
|
text: {
|
@@ -56,13 +39,7 @@ export default {
|
|
56
39
|
uppercase: {
|
57
40
|
required: false,
|
58
41
|
default: true
|
59
|
-
}
|
60
|
-
infoText: {
|
61
|
-
required: false,
|
62
|
-
},
|
63
|
-
infoAlign: {
|
64
|
-
required: false,
|
65
|
-
},
|
42
|
+
}
|
66
43
|
},
|
67
44
|
}
|
68
45
|
</script>
|
@@ -0,0 +1,135 @@
|
|
1
|
+
<template>
|
2
|
+
<page-container>
|
3
|
+
<box-container>
|
4
|
+
<selected-container
|
5
|
+
>{{ numberSelected }} {{ $gettext('selected') }}</selected-container
|
6
|
+
>
|
7
|
+
<list-container>
|
8
|
+
<list-item
|
9
|
+
v-for="item in optionsList"
|
10
|
+
:key="item.type"
|
11
|
+
:hoverColor="item.hoverColor"
|
12
|
+
@click="$emit('on-' + item.type)"
|
13
|
+
>
|
14
|
+
{{ item.name }}
|
15
|
+
</list-item>
|
16
|
+
</list-container>
|
17
|
+
<icon-container @click="$emit('on-close')">
|
18
|
+
<icon
|
19
|
+
name="close_for_modals,_tool_tips"
|
20
|
+
color="white"
|
21
|
+
size="14px"
|
22
|
+
cursor="pointer"
|
23
|
+
/>
|
24
|
+
</icon-container>
|
25
|
+
</box-container>
|
26
|
+
</page-container>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
// import SelectedOptions from "@eturnity/eturnity_reusable_components/src/components/selectedOptions"
|
31
|
+
// optionsList = [
|
32
|
+
// {
|
33
|
+
// type: 'export',
|
34
|
+
// name: 'Export'
|
35
|
+
// },
|
36
|
+
// {
|
37
|
+
// type: 'delete',
|
38
|
+
// name: 'Delete',
|
39
|
+
// hoverColor: 'red' // default is green
|
40
|
+
// }
|
41
|
+
// ]
|
42
|
+
// @on-${type}="function" should $emit the callback for the 'type' in the optionsList
|
43
|
+
// <selected-options
|
44
|
+
// :numberSelected="numberSelected"
|
45
|
+
// :optionsList="optionsList"
|
46
|
+
// @on-close="onCloseFunction()"
|
47
|
+
// @on-export="function()" @on-delete="function()"
|
48
|
+
// />
|
49
|
+
import styled from 'vue-styled-components'
|
50
|
+
import Icon from '../icon'
|
51
|
+
|
52
|
+
const PageContainer = styled.div`
|
53
|
+
position: fixed;
|
54
|
+
bottom: 30px;
|
55
|
+
left: 50%;
|
56
|
+
transform: translateX(-50%);
|
57
|
+
`
|
58
|
+
|
59
|
+
const SelectedContainer = styled.div`
|
60
|
+
display: grid;
|
61
|
+
align-items: center;
|
62
|
+
height: 100%;
|
63
|
+
padding-right: 20px;
|
64
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
65
|
+
`
|
66
|
+
|
67
|
+
const BoxContainer = styled.div`
|
68
|
+
display: flex;
|
69
|
+
align-items: center;
|
70
|
+
background-color: ${(props) => props.theme.colors.black};
|
71
|
+
opacity: 90%;
|
72
|
+
color: ${(props) => props.theme.colors.white};
|
73
|
+
border-radius: 4px;
|
74
|
+
padding: 8px 10px 8px 20px;
|
75
|
+
font-size: 14px;
|
76
|
+
height: 40px;
|
77
|
+
`
|
78
|
+
|
79
|
+
const ListContainer = styled.div`
|
80
|
+
padding: 0 20px;
|
81
|
+
display: flex;
|
82
|
+
gap: 20px;
|
83
|
+
color: ${(props) => props.theme.colors.white};
|
84
|
+
`
|
85
|
+
|
86
|
+
const ListAttrs = {
|
87
|
+
hoverColor: String
|
88
|
+
}
|
89
|
+
const ListItem = styled('div', ListAttrs)`
|
90
|
+
cursor: pointer;
|
91
|
+
&:hover {
|
92
|
+
color: ${(props) =>
|
93
|
+
props.hoverColor
|
94
|
+
? props.theme.colors[props.hoverColor]
|
95
|
+
: props.theme.colors.green};
|
96
|
+
}
|
97
|
+
`
|
98
|
+
|
99
|
+
const IconContainer = styled.div`
|
100
|
+
display: grid;
|
101
|
+
align-items: center;
|
102
|
+
justify-items: center;
|
103
|
+
height: 30px;
|
104
|
+
width: 30px;
|
105
|
+
cursor: pointer;
|
106
|
+
margin-left: 20px;
|
107
|
+
|
108
|
+
&:hover {
|
109
|
+
background: rgba(255, 255, 255, 0.1);
|
110
|
+
border-radius: 4px;
|
111
|
+
}
|
112
|
+
`
|
113
|
+
|
114
|
+
export default {
|
115
|
+
name: 'selected-options',
|
116
|
+
components: {
|
117
|
+
PageContainer,
|
118
|
+
BoxContainer,
|
119
|
+
SelectedContainer,
|
120
|
+
ListContainer,
|
121
|
+
ListItem,
|
122
|
+
Icon,
|
123
|
+
IconContainer
|
124
|
+
},
|
125
|
+
props: {
|
126
|
+
optionsList: {
|
127
|
+
required: true
|
128
|
+
},
|
129
|
+
numberSelected: {
|
130
|
+
required: true,
|
131
|
+
default: 0
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
</script>
|
@@ -18,10 +18,7 @@
|
|
18
18
|
<list-text>{{ $gettext(item.label) }}</list-text>
|
19
19
|
</list-item>
|
20
20
|
<collapse-wrapper v-else :key="idx + item.key">
|
21
|
-
<collapse-container
|
22
|
-
:data-id="`sub_menu_settings_${item.key}`"
|
23
|
-
@click="toggleActiveDropdown(item.key)"
|
24
|
-
>
|
21
|
+
<collapse-container @click="toggleActiveDropdown(item.key)">
|
25
22
|
<icon-container :isActive="activeParentTab === item.key">
|
26
23
|
<icon
|
27
24
|
:name="item.icon"
|
@@ -44,7 +41,6 @@
|
|
44
41
|
v-for="subItem in item.children"
|
45
42
|
:key="subItem.key"
|
46
43
|
:isActive="activeTab === subItem.key"
|
47
|
-
:data-id="`sub_menu_settings_${subItem.key}`"
|
48
44
|
@click="
|
49
45
|
$emit('tab-click', {
|
50
46
|
activeKey: subItem.key,
|
@@ -38,7 +38,7 @@ export const stringToNumber = ({
|
|
38
38
|
.replace(/[.\s]/g, '')
|
39
39
|
.replace(/[,\s]/, '.')
|
40
40
|
}
|
41
|
-
} else if (selectedLang === 'en-us'
|
41
|
+
} else if (selectedLang === 'en-us') {
|
42
42
|
// replace commas with blank: 1,234.56 --> 1234.56
|
43
43
|
if (allowNegative) {
|
44
44
|
newVal = newVal.replace(/[^\d-.,']/g, '').replace(/[,\s]/g, '')
|
@@ -1,38 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<info-container>
|
3
|
-
<icon name="info" size="24px" />
|
4
|
-
<InfoTextContainer>
|
5
|
-
<slot />
|
6
|
-
</InfoTextContainer>
|
7
|
-
</info-container>
|
8
|
-
</template>
|
9
|
-
|
10
|
-
<script>
|
11
|
-
import styled from 'vue-styled-components'
|
12
|
-
import icon from '../icon'
|
13
|
-
const InfoContainer = styled('div')`
|
14
|
-
display: flex;
|
15
|
-
align-items: flex-start;
|
16
|
-
gap: 15px;
|
17
|
-
padding: 20px;
|
18
|
-
width: 500px;
|
19
|
-
min-width: 450px;
|
20
|
-
border: 1px dashed #dee2eb;
|
21
|
-
border-radius: 4px;
|
22
|
-
margin:20px 0;
|
23
|
-
`
|
24
|
-
|
25
|
-
const InfoTextContainer = styled('div')`
|
26
|
-
font-size: 13px;
|
27
|
-
`
|
28
|
-
|
29
|
-
|
30
|
-
export default {
|
31
|
-
components:{
|
32
|
-
icon,
|
33
|
-
InfoTextContainer,
|
34
|
-
InfoContainer
|
35
|
-
},
|
36
|
-
props:[]
|
37
|
-
}
|
38
|
-
</script>
|
@@ -1,107 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<roofTabWrap>
|
3
|
-
<tab
|
4
|
-
v-for="(tab, index) in tabsData"
|
5
|
-
:key="tab.id"
|
6
|
-
:isDisabled="!!tab['isDisabled']"
|
7
|
-
:textColor="tab['textColor']"
|
8
|
-
:active="isIndexKey ? index === activeTab : tab[tabKey] === activeTab"
|
9
|
-
@click="$emit('tab-click', isIndexKey ? index : tab[tabKey])"
|
10
|
-
>
|
11
|
-
<Option :isDisabled="!!tab['isDisabled']" :textColor="tab['textColor']">
|
12
|
-
<Uppercase>{{ tab[tabLabel] }}</Uppercase>
|
13
|
-
<info-text
|
14
|
-
v-if="tab['labelInfoText']"
|
15
|
-
:text="tab['labelInfoText']"
|
16
|
-
borderColor="#ccc"
|
17
|
-
size="14px"
|
18
|
-
:alignArrow="tab['labelInfoAlign']"
|
19
|
-
/>
|
20
|
-
</Option>
|
21
|
-
</tab>
|
22
|
-
<bottomLine />
|
23
|
-
</roofTabWrap>
|
24
|
-
</template>
|
25
|
-
|
26
|
-
<script>
|
27
|
-
import styled from 'vue-styled-components'
|
28
|
-
import InfoText from '../infoText'
|
29
|
-
const TabAttr = {
|
30
|
-
active: Boolean,
|
31
|
-
isDisabled: Boolean,
|
32
|
-
textColor: String
|
33
|
-
}
|
34
|
-
|
35
|
-
const bottomLine = styled('div')`
|
36
|
-
position: absolute;
|
37
|
-
bottom: 0;
|
38
|
-
left: 0;
|
39
|
-
height: 1px;
|
40
|
-
width: 100%;
|
41
|
-
background-color: #b2b9c5;
|
42
|
-
`
|
43
|
-
const roofTabWrap = styled('div')`
|
44
|
-
display: flex;
|
45
|
-
align-items: center;
|
46
|
-
position: relative;
|
47
|
-
font-size: 13px;
|
48
|
-
font-weight: 700;
|
49
|
-
`
|
50
|
-
const Uppercase = styled('span')`
|
51
|
-
text-transform: uppercase;
|
52
|
-
`
|
53
|
-
const Option = styled('div',TabAttr)`
|
54
|
-
font-size: 13px;
|
55
|
-
font-weight: 700;
|
56
|
-
display:flex;
|
57
|
-
justify-content: center;
|
58
|
-
flex-direction: row;
|
59
|
-
gap: 10px;
|
60
|
-
color: ${props=>props.textColor ?
|
61
|
-
props.theme.colors[props.textColor] ? props.theme.colors[props.textColor] : props.textColor :
|
62
|
-
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
63
|
-
`
|
64
|
-
const Tab = styled('div', TabAttr)`
|
65
|
-
padding: 16px 10px;
|
66
|
-
margin-right: 5px;
|
67
|
-
position: relative;
|
68
|
-
top: ${(props) => (props.isDisabled ? '-1px' : '0')};
|
69
|
-
z-index: 10;
|
70
|
-
border-bottom: 2px solid
|
71
|
-
${(props) => (props.active ? props.theme.colors.primary : 'transparent')};
|
72
|
-
background-color: ${(props) => (props.isDisabled ? props.theme.colors.grey5 : 'transparent')};
|
73
|
-
transition: 0.2s ease;
|
74
|
-
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
75
|
-
min-width: 140px;
|
76
|
-
display: flex !important;
|
77
|
-
align-items: center;
|
78
|
-
justify-content: space-between;
|
79
|
-
min-height: 55px;
|
80
|
-
&:hover {
|
81
|
-
border-color: ${(props) => props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.primary};
|
82
|
-
}
|
83
|
-
`
|
84
|
-
|
85
|
-
export default {
|
86
|
-
name: 'Tabs',
|
87
|
-
|
88
|
-
components: {
|
89
|
-
Tab,
|
90
|
-
bottomLine,
|
91
|
-
roofTabWrap,
|
92
|
-
Option,
|
93
|
-
InfoText,
|
94
|
-
Uppercase
|
95
|
-
},
|
96
|
-
|
97
|
-
props: {
|
98
|
-
tabsData: { required: true },
|
99
|
-
activeTab: { required: true },
|
100
|
-
isIndexKey: { type: Boolean, default: false },
|
101
|
-
tabKey: { type: String, default: '' },
|
102
|
-
tabLabel: { type: String, default: '' }
|
103
|
-
}
|
104
|
-
}
|
105
|
-
</script>
|
106
|
-
|
107
|
-
<style lang="scss" scoped></style>
|