@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.2 → 7.24.3-qa-elisee-7.32.0
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/.prettierrc +6 -8
- package/package.json +21 -9
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +78 -79
- package/src/assets/svgIcons/adjust_roof.svg +6 -0
- package/src/assets/svgIcons/copy.svg +10 -0
- package/src/assets/theme.js +3 -3
- package/src/components/addNewButton/AddNewButton.stories.js +2 -2
- package/src/components/addNewButton/index.vue +51 -48
- package/src/components/banner/actionBanner/index.vue +55 -54
- package/src/components/banner/banner/banner.stories.js +5 -5
- package/src/components/banner/banner/index.vue +159 -159
- package/src/components/banner/infoBanner/index.vue +53 -41
- package/src/components/buttons/buttonIcon/index.vue +122 -125
- package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
- package/src/components/buttons/closeButton/index.vue +49 -49
- package/src/components/buttons/mainButton/index.vue +119 -119
- package/src/components/card/index.vue +70 -70
- package/src/components/collapsableInfoText/index.vue +94 -96
- package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
- package/src/components/deleteIcon/index.vue +54 -54
- package/src/components/draggableInputHandle/index.vue +37 -37
- package/src/components/dropdown/Dropdown.stories.js +10 -9
- package/src/components/dropdown/index.vue +106 -106
- package/src/components/errorMessage/index.vue +52 -52
- package/src/components/filter/filterSettings.vue +433 -439
- package/src/components/filter/index.vue +135 -135
- package/src/components/filter/parentDropdown.vue +73 -73
- package/src/components/icon/Icons.stories.js +7 -7
- package/src/components/icon/iconCollection.vue +53 -53
- package/src/components/icon/index.vue +121 -121
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +26 -26
- package/src/components/infoText/index.vue +132 -133
- package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
- package/src/components/inputs/checkbox/index.vue +180 -190
- package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
- package/src/components/inputs/inputNumber/index.vue +644 -647
- package/src/components/inputs/inputNumberQuestion/index.vue +182 -185
- package/src/components/inputs/inputText/InputText.stories.js +22 -22
- package/src/components/inputs/inputText/index.vue +336 -337
- package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
- package/src/components/inputs/radioButton/index.vue +219 -221
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +126 -126
- package/src/components/inputs/select/index.vue +776 -778
- package/src/components/inputs/select/option/index.vue +124 -124
- package/src/components/inputs/select/select.stories.js +32 -31
- package/src/components/inputs/slider/index.vue +99 -99
- package/src/components/inputs/switchField/index.vue +222 -220
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
- package/src/components/inputs/textAreaInput/index.vue +173 -171
- package/src/components/inputs/toggle/Toggle.stories.js +14 -14
- package/src/components/inputs/toggle/index.vue +217 -214
- package/src/components/label/index.vue +82 -82
- package/src/components/markerItem/index.vue +66 -68
- package/src/components/modals/actionModal/index.vue +54 -54
- package/src/components/modals/infoModal/index.vue +36 -39
- package/src/components/modals/modal/index.vue +134 -134
- package/src/components/modals/modal/modal.stories.js +5 -5
- package/src/components/navigationTabs/index.vue +94 -96
- package/src/components/pageSubtitle/index.vue +49 -55
- package/src/components/pageTitle/index.vue +56 -56
- package/src/components/pagination/index.vue +89 -92
- package/src/components/progressBar/index.vue +107 -107
- package/src/components/projectMarker/index.vue +244 -246
- package/src/components/rangeSlider/Slider.vue +465 -491
- package/src/components/rangeSlider/index.vue +410 -410
- package/src/components/rangeSlider/utils/dom.js +5 -5
- package/src/components/selectedOptions/index.vue +119 -119
- package/src/components/sideMenu/index.vue +199 -199
- package/src/components/spinner/index.vue +57 -57
- package/src/components/tableDropdown/index.vue +520 -520
- package/src/components/tables/mainTable/index.vue +362 -366
- package/src/components/tables/viewTable/index.vue +171 -171
- package/src/components/threeDots/index.vue +334 -340
- package/src/components/videoThumbnail/index.vue +86 -86
- package/src/components/videoThumbnail/videoThumbnail.stories.js +16 -14
- package/src/helpers/numberConverter.js +2 -2
- package/src/helpers/translateLang.js +9 -9
- package/src/mixins/inputValidations.js +5 -5
- package/.eslintrc.js +0 -184
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isFunction } from './fns'
|
2
2
|
|
3
|
-
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
3
|
+
export function matchesSelectorToParentElements (el, selector, baseNode) {
|
4
4
|
let node = el
|
5
5
|
|
6
6
|
const matchesSelectorFunc = [
|
@@ -8,8 +8,8 @@ export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
8
8
|
'webkitMatchesSelector',
|
9
9
|
'mozMatchesSelector',
|
10
10
|
'msMatchesSelector',
|
11
|
-
'oMatchesSelector'
|
12
|
-
].find(
|
11
|
+
'oMatchesSelector'
|
12
|
+
].find(func => isFunction(node[func]))
|
13
13
|
|
14
14
|
if (!isFunction(node[matchesSelectorFunc])) return false
|
15
15
|
|
@@ -22,7 +22,7 @@ export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
22
22
|
return false
|
23
23
|
}
|
24
24
|
|
25
|
-
export function addEvent(el, event, handler) {
|
25
|
+
export function addEvent (el, event, handler) {
|
26
26
|
if (!el) {
|
27
27
|
return
|
28
28
|
}
|
@@ -35,7 +35,7 @@ export function addEvent(el, event, handler) {
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
|
38
|
-
export function removeEvent(el, event, handler) {
|
38
|
+
export function removeEvent (el, event, handler) {
|
39
39
|
if (!el) {
|
40
40
|
return
|
41
41
|
}
|
@@ -1,145 +1,145 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
{{ numberSelected }} {{ $gettext('selected') }}
|
6
|
-
|
7
|
-
<
|
8
|
-
<
|
2
|
+
<page-container>
|
3
|
+
<box-container>
|
4
|
+
<selected-container
|
5
|
+
>{{ numberSelected }} {{ $gettext('selected') }}</selected-container
|
6
|
+
>
|
7
|
+
<list-container v-if="optionsList.length">
|
8
|
+
<list-item
|
9
9
|
v-for="item in optionsList"
|
10
10
|
:key="item.type"
|
11
|
-
:
|
11
|
+
:hoverColor="item.hoverColor"
|
12
12
|
@click="$emit('on-' + item.type)"
|
13
13
|
>
|
14
14
|
{{ item.name }}
|
15
|
-
</
|
16
|
-
</
|
17
|
-
<
|
15
|
+
</list-item>
|
16
|
+
</list-container>
|
17
|
+
<empty-text v-if="!optionsList.length">
|
18
18
|
{{ $gettext('no_batch_actions_available') }}
|
19
|
-
</
|
20
|
-
<
|
21
|
-
<
|
22
|
-
color="white"
|
23
|
-
cursor="pointer"
|
19
|
+
</empty-text>
|
20
|
+
<icon-container @click="$emit('on-close')">
|
21
|
+
<icon
|
24
22
|
name="close_for_modals,_tool_tips"
|
23
|
+
color="white"
|
25
24
|
size="14px"
|
25
|
+
cursor="pointer"
|
26
26
|
/>
|
27
|
-
</
|
28
|
-
</
|
29
|
-
</
|
27
|
+
</icon-container>
|
28
|
+
</box-container>
|
29
|
+
</page-container>
|
30
30
|
</template>
|
31
31
|
|
32
32
|
<script>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
33
|
+
// import SelectedOptions from "@eturnity/eturnity_reusable_components/src/components/selectedOptions"
|
34
|
+
// optionsList = [
|
35
|
+
// {
|
36
|
+
// type: 'export',
|
37
|
+
// name: 'Export'
|
38
|
+
// },
|
39
|
+
// {
|
40
|
+
// type: 'delete',
|
41
|
+
// name: 'Delete',
|
42
|
+
// hoverColor: 'red' // default is green
|
43
|
+
// }
|
44
|
+
// ]
|
45
|
+
// @on-${type}="function" should $emit the callback for the 'type' in the optionsList
|
46
|
+
// <selected-options
|
47
|
+
// :numberSelected="numberSelected"
|
48
|
+
// :optionsList="optionsList"
|
49
|
+
// @on-close="onCloseFunction()"
|
50
|
+
// @on-export="function()" @on-delete="function()"
|
51
|
+
// />
|
52
|
+
import styled from 'vue3-styled-components'
|
53
|
+
import Icon from '../icon'
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
const PageContainer = styled.div`
|
56
|
+
position: fixed;
|
57
|
+
bottom: 30px;
|
58
|
+
left: 50%;
|
59
|
+
transform: translateX(-50%);
|
60
|
+
`
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
62
|
+
const SelectedContainer = styled.div`
|
63
|
+
display: grid;
|
64
|
+
align-items: center;
|
65
|
+
height: 100%;
|
66
|
+
padding-right: 20px;
|
67
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
68
|
+
`
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
70
|
+
const BoxContainer = styled.div`
|
71
|
+
display: flex;
|
72
|
+
align-items: center;
|
73
|
+
background-color: ${(props) => props.theme.colors.black};
|
74
|
+
opacity: 90%;
|
75
|
+
color: ${(props) => props.theme.colors.white};
|
76
|
+
border-radius: 4px;
|
77
|
+
padding: 8px 10px 8px 20px;
|
78
|
+
font-size: 14px;
|
79
|
+
height: 40px;
|
80
|
+
`
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
82
|
+
const ListContainer = styled.div`
|
83
|
+
padding: 0 20px;
|
84
|
+
display: flex;
|
85
|
+
gap: 20px;
|
86
|
+
color: ${(props) => props.theme.colors.white};
|
87
|
+
`
|
88
88
|
|
89
|
-
|
90
|
-
|
89
|
+
const ListAttrs = {
|
90
|
+
hoverColor: String
|
91
|
+
}
|
92
|
+
const ListItem = styled('div', ListAttrs)`
|
93
|
+
cursor: pointer;
|
94
|
+
&:hover {
|
95
|
+
color: ${(props) =>
|
96
|
+
props.hoverColor
|
97
|
+
? props.theme.colors[props.hoverColor]
|
98
|
+
: props.theme.colors.green};
|
91
99
|
}
|
92
|
-
|
93
|
-
cursor: pointer;
|
94
|
-
&:hover {
|
95
|
-
color: ${(props) =>
|
96
|
-
props.hoverColor
|
97
|
-
? props.theme.colors[props.hoverColor]
|
98
|
-
: props.theme.colors.green};
|
99
|
-
}
|
100
|
-
`
|
100
|
+
`
|
101
101
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
102
|
+
const IconContainer = styled.div`
|
103
|
+
display: grid;
|
104
|
+
align-items: center;
|
105
|
+
justify-items: center;
|
106
|
+
height: 30px;
|
107
|
+
width: 30px;
|
108
|
+
cursor: pointer;
|
109
|
+
margin-left: 20px;
|
110
110
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
111
|
+
&:hover {
|
112
|
+
background: rgba(255, 255, 255, 0.1);
|
113
|
+
border-radius: 4px;
|
114
|
+
}
|
115
|
+
`
|
116
116
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
const EmptyText = styled.div`
|
118
|
+
color: ${(props) => props.theme.colors.white};
|
119
|
+
font-size: 13px;
|
120
|
+
padding-left: 16px;
|
121
|
+
`
|
122
122
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
},
|
139
|
-
numberSelected: {
|
140
|
-
required: true,
|
141
|
-
default: 0,
|
142
|
-
},
|
123
|
+
export default {
|
124
|
+
name: 'selected-options',
|
125
|
+
components: {
|
126
|
+
PageContainer,
|
127
|
+
BoxContainer,
|
128
|
+
SelectedContainer,
|
129
|
+
ListContainer,
|
130
|
+
ListItem,
|
131
|
+
Icon,
|
132
|
+
IconContainer,
|
133
|
+
EmptyText
|
134
|
+
},
|
135
|
+
props: {
|
136
|
+
optionsList: {
|
137
|
+
required: true
|
143
138
|
},
|
139
|
+
numberSelected: {
|
140
|
+
required: true,
|
141
|
+
default: 0
|
142
|
+
}
|
144
143
|
}
|
144
|
+
}
|
145
145
|
</script>
|