@eturnity/eturnity_reusable_components 7.20.0--EPDM-5518.5 → 7.20.0--EPDM-9013.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.20.0--EPDM-5518.5",
3
+ "version": "7.20.0--EPDM-9013.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -0,0 +1,4 @@
1
+ <svg width="15" height="9" viewBox="0 0 15 9" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.462 8.46H12.894C12.7848 8.46 12.697 8.4327 12.6307 8.37809C12.5683 8.32349 12.5176 8.26108 12.4786 8.19087L10.5186 4.94378C10.4874 5.04129 10.4504 5.12514 10.4075 5.19535L8.52943 8.19087C8.48263 8.25718 8.42802 8.31958 8.36562 8.37809C8.30711 8.4327 8.2291 8.46 8.13159 8.46H6.66309L9.47138 4.10714L6.77425 0H8.34221C8.45143 0 8.52943 0.0156017 8.57624 0.0468051C8.62694 0.0741079 8.67375 0.120913 8.71665 0.18722L10.6415 3.28805C10.6805 3.19054 10.7273 3.09303 10.7819 2.99552L12.5488 0.216473C12.5917 0.142365 12.6385 0.0877595 12.6892 0.052656C12.7399 0.017552 12.8043 0 12.8823 0H14.3859L11.6654 4.04278L14.462 8.46Z" fill="#263238"/>
3
+ <path d="M3.16519 7.23137C3.45772 7.23137 3.70344 7.19627 3.90237 7.12606C4.10129 7.05585 4.25925 6.96224 4.37627 6.84523C4.49718 6.72822 4.58299 6.5917 4.63369 6.43569C4.6883 6.27967 4.7156 6.1139 4.7156 5.93838C4.7156 5.75506 4.68635 5.59124 4.62784 5.44693C4.56934 5.29871 4.47768 5.1739 4.35286 5.07249C4.22805 4.96718 4.06618 4.88722 3.86726 4.83261C3.67224 4.77801 3.43627 4.75071 3.15934 4.75071H1.57382V7.23137H3.16519ZM1.57382 1.21693V3.66249H2.82585C3.36411 3.66249 3.76975 3.56498 4.04278 3.36996C4.31971 3.17494 4.45817 2.86486 4.45817 2.43971C4.45817 1.99896 4.33336 1.68498 4.08373 1.49776C3.83411 1.31054 3.44407 1.21693 2.91361 1.21693H1.57382ZM2.91361 0C3.46747 0 3.94137 0.0526557 4.33531 0.157967C4.72925 0.263278 5.05104 0.413444 5.30066 0.608465C5.55419 0.803486 5.73946 1.03946 5.85647 1.31639C5.97349 1.59332 6.03199 1.90535 6.03199 2.25249C6.03199 2.45141 6.00274 2.64253 5.94423 2.82585C5.88573 3.00527 5.79407 3.17494 5.66925 3.33485C5.54834 3.49087 5.39232 3.63324 5.2012 3.76195C5.01398 3.89066 4.78971 3.99988 4.52838 4.08959C5.69071 4.35091 6.27187 4.97888 6.27187 5.97349C6.27187 6.33232 6.20361 6.66386 6.0671 6.96809C5.93058 7.27232 5.73166 7.5356 5.47033 7.75793C5.209 7.97635 4.88722 8.14797 4.50498 8.27278C4.12274 8.39759 3.68589 8.46 3.19444 8.46H0V0H2.91361Z" fill="#263238"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 0H2C0.89 0 0 0.9 0 2V16C0 17.1 0.89 18 2 18H6V16H2V2H16V16H12V18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.11 0 16 0ZM9 6L5 10H8V18H10V10H13L9 6Z" fill="#263238"/>
3
+ </svg>
@@ -268,12 +268,6 @@
268
268
  :text="buttonText.cancel"
269
269
  @click="$emit('on-cancel-view')"
270
270
  />
271
- <reset-container v-if="!filterViews || !filterViews.length">
272
- <reset-button @click="$emit('on-reset-filters')">
273
- <icon :name="'update'" size="14px" :color="theme.colors.blue" />
274
- <div>{{ $gettext('reset_filters') }}</div>
275
- </reset-button>
276
- </reset-container>
277
271
  </button-container>
278
272
  </container-wrapper>
279
273
  </template>
@@ -335,16 +329,6 @@ const ButtonContainer = styled.div`
335
329
  padding: 15px;
336
330
  `
337
331
 
338
- const ResetContainer = styled.div`
339
- display: grid;
340
- align-content: center;
341
- margin-left: auto;
342
- div {
343
- margin-top: 0;
344
- align-self: center;
345
- }
346
- `
347
-
348
332
  const ColumnContainer = styled.div``
349
333
 
350
334
  const DragContainer = styled.div`
@@ -471,7 +455,6 @@ export default {
471
455
  DeleteIcon,
472
456
  UpperContainer,
473
457
  ResetButton,
474
- ResetContainer,
475
458
  VueDatePicker
476
459
  },
477
460
  props: {
@@ -3,11 +3,10 @@
3
3
  <container
4
4
  :checkColor="checkColor"
5
5
  :size="size"
6
- :hasLabel="label && !!label.length"
6
+ :hasLabel="hasLabel"
7
7
  :backgroundColor="backgroundColor"
8
8
  :isChecked="isChecked"
9
9
  :isDisabled="isDisabled"
10
- :cursorType="cursorType"
11
10
  >
12
11
  <input-checkbox
13
12
  type="checkbox"
@@ -18,7 +17,7 @@
18
17
  <check-wrapper :hasLabel="hasLabel">
19
18
  <span class="checkmark"></span>
20
19
  </check-wrapper>
21
- <label-text v-if="label && !!label.length">{{ label }}</label-text>
20
+ <label-text v-if="hasLabel">{{ label }}</label-text>
22
21
  </container>
23
22
  </component-wrapper>
24
23
  </template>
@@ -34,7 +33,6 @@
34
33
  // size="small"
35
34
  // backgroundColor="red"
36
35
  // :isDisabled="true"
37
- // cursorType="default"
38
36
  // />
39
37
  import styled from 'vue3-styled-components'
40
38
 
@@ -57,8 +55,7 @@ const containerAttrs = {
57
55
  hasLabel: Boolean,
58
56
  backgroundColor: String,
59
57
  isChecked: Boolean,
60
- isDisabled: Boolean,
61
- cursorType: String
58
+ isDisabled: Boolean
62
59
  }
63
60
  const Container = styled('label', containerAttrs)`
64
61
  display: grid;
@@ -67,7 +64,7 @@ const Container = styled('label', containerAttrs)`
67
64
  align-content: center;
68
65
  color: ${(props) => props.theme.colors.black};
69
66
  position: relative;
70
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
67
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
71
68
  font-size: 16px;
72
69
  user-select: none;
73
70
 
@@ -92,7 +89,7 @@ const Container = styled('label', containerAttrs)`
92
89
  : props.theme.colors.green
93
90
  : props.isDisabled
94
91
  ? props.theme.colors.lightGray
95
- : props.theme.colors.white};
92
+ : '#fff'};
96
93
  border-radius: 4px;
97
94
  border: 1px solid
98
95
  ${(props) =>
@@ -186,10 +183,6 @@ export default {
186
183
  dataId: {
187
184
  type: String,
188
185
  default: ''
189
- },
190
- cursorType: {
191
- type: String,
192
- default: 'pointer'
193
186
  }
194
187
  },
195
188
  computed: {
@@ -328,7 +328,7 @@ export default {
328
328
  }
329
329
  },
330
330
  methods: {
331
- onEnterPress() {
331
+ onEnterPress(event){
332
332
  this.$emit('on-enter-click')
333
333
  this.$refs.inputElement.$el.blur()
334
334
  },
@@ -8,11 +8,7 @@
8
8
  :hasLabel="!!label && label.length > 0"
9
9
  :alignItems="alignItems"
10
10
  >
11
- <label-wrapper
12
- v-if="label"
13
- :data-id="labelDataId"
14
- :shownDropdown="shownDropdown"
15
- >
11
+ <label-wrapper v-if="label" :data-id="labelDataId">
16
12
  <input-label
17
13
  :fontColor="
18
14
  labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
@@ -51,7 +47,6 @@
51
47
  :showBorder="showBorder"
52
48
  :data-id="dataId"
53
49
  :paddingLeft="paddingLeft"
54
- :shownDropdown="shownDropdown"
55
50
  >
56
51
  <draggableInputHandle
57
52
  v-if="isDraggable && !isSearchBarVisible"
@@ -75,10 +70,9 @@
75
70
  />
76
71
  <selector
77
72
  v-else
73
+ :showBorder="showBorder"
78
74
  :selectWidth="selectWidth"
79
75
  :paddingLeft="paddingLeft"
80
- :noMaxWidth="noMaxWidth"
81
- :showBorder="showBorder"
82
76
  >
83
77
  <slot name="selector" :selectedValue="selectedValue"></slot>
84
78
  </selector>
@@ -186,17 +180,22 @@ const Caret = styled.div`
186
180
  const selectorProps = {
187
181
  selectWidth: String,
188
182
  paddingLeft: String,
189
- showBorder: Boolean,
190
- noMaxWidth: Boolean
183
+ showBorder: Boolean
191
184
  }
192
185
  const Selector = styled('div', selectorProps)`
193
- max-width: ${(props) =>
194
- props.noMaxWidth
195
- ? '100%'
196
- : `calc(${props.selectWidth} - (${CARET_WIDTH} + ${props.paddingLeft} + (${BORDER_WIDTH} * 2)))`};
197
- white-space: nowrap;
198
- text-overflow: ellipsis;
199
- overflow: hidden;
186
+ ${(props) =>
187
+ props.selectWidth === '100%'
188
+ ? 'width: 100%;'
189
+ : `width: calc(${props.selectWidth} -
190
+ (
191
+ ${CARET_WIDTH} +
192
+ ${props.paddingLeft}
193
+ ${props.showBorder ? `+ (${BORDER_WIDTH} * 2)` : ''}
194
+ )
195
+ );
196
+ white-space: nowrap;
197
+ text-overflow: ellipsis;
198
+ overflow: hidden;`}
200
199
  `
201
200
 
202
201
  const labelAttrs = { fontSize: String, fontColor: String }
@@ -220,12 +219,10 @@ const Container = styled('div', inputProps)`
220
219
  position: relative;
221
220
  display: inline-block;
222
221
  `
223
-
224
- const LabelAttrs = { shownDropdown: Boolean }
225
- const LabelWrapper = styled('div', LabelAttrs)`
222
+ const LabelWrapper = styled.div`
226
223
  display: inline-grid;
227
224
  grid-template-columns: auto auto;
228
- grid-gap: ${(props) => (props.shownDropdown ? '0' : '12px')};
225
+ grid-gap: 12px;
229
226
  align-items: center;
230
227
  justify-content: start;
231
228
  `
@@ -248,8 +245,7 @@ const selectButtonAttrs = {
248
245
  selectMinHeight: String,
249
246
  hasNoPadding: Boolean,
250
247
  showBorder: Boolean,
251
- paddingLeft: String,
252
- shownDropdown: Boolean
248
+ paddingLeft: String
253
249
  }
254
250
  const selectButton = styled('div', selectButtonAttrs)`
255
251
  position: relative;
@@ -257,9 +253,7 @@ const selectButton = styled('div', selectButtonAttrs)`
257
253
  border-radius: 4px;
258
254
  max-width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
259
255
  ${(props) =>
260
- props.isSearchBarVisible || props.hasNoPadding
261
- ? ''
262
- : `padding-left: ${props.shownDropdown ? '0' : props.paddingLeft}`};
256
+ props.hasNoPadding ? '' : `padding-left: ${props.paddingLeft}`};
263
257
  text-align: left;
264
258
  min-height: ${(props) =>
265
259
  props.selectHeight
@@ -482,14 +476,6 @@ export default {
482
476
  type: Boolean,
483
477
  default: false
484
478
  },
485
- noMaxWidth: {
486
- type: Boolean,
487
- default: false
488
- },
489
- shownDropdown: {
490
- type: Boolean,
491
- default: false
492
- },
493
479
  minOptionLength: {
494
480
  type: Number,
495
481
  default: MIN_OPTION_LENGTH
@@ -605,22 +591,15 @@ export default {
605
591
  searchChange(value) {
606
592
  this.textSearch = value
607
593
  this.$emit('search-change', value)
608
- const children =
609
- this.$refs.dropdown.$children &&
610
- this.$refs.dropdown.$children[0] &&
611
- this.$refs.dropdown.$children.length === 1 &&
612
- this.$refs.dropdown.$children[0].$children.length
613
- ? this.$refs.dropdown.$children[0].$children
614
- : this.$refs.dropdown.$children
615
- children
616
- .map((component) => component.$el)
617
- .forEach((el) => {
618
- if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
619
- el.style.display = 'none'
620
- } else {
621
- el.style.display = 'grid'
622
- }
623
- })
594
+ const dropdownChildren = [...this.$refs.dropdown.$el.children]
595
+ dropdownChildren.forEach((el) => {
596
+ if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
597
+ el.style.display = 'none'
598
+
599
+ return
600
+ }
601
+ el.style.display = 'inherit'
602
+ })
624
603
  },
625
604
  clickOutside(event) {
626
605
  const dropdownRef = this.$refs.dropdown
@@ -49,7 +49,7 @@
49
49
  // label="Question 5"
50
50
  // alignItems="horizontal" // horizontal, vertical
51
51
  // :isDisabled="true"
52
- // fontSize="13px"
52
+ // . fontSize="13px"
53
53
  // />
54
54
  import styled from 'vue3-styled-components'
55
55
  import InfoText from '../../infoText'
@@ -81,6 +81,8 @@ const paginationWrapper = styled.nav`
81
81
  flex-wrap: wrap;
82
82
  justify-content: flex-end;
83
83
  align-items: center;
84
+ margin-bottom: 2px;
85
+ margin-top: 10px;
84
86
  `
85
87
  const paginationLink = styled.div`
86
88
  display: flex;
@@ -90,18 +92,15 @@ const paginationLink = styled.div`
90
92
  border-radius: 3px;
91
93
  white-space: nowrap;
92
94
  cursor: pointer;
93
- color: ${(props) => props.theme.colors.brightBlue};
94
95
 
95
96
  &.active {
96
- color: ${(props) => props.theme.colors.white};
97
+ color: #fff;
97
98
  background-color: ${(props) => props.theme.colors.brightBlue};
98
99
  padding: 7px 12px;
99
100
  border-radius: 4px;
100
101
  }
101
102
  `
102
- const arrowText = styled.div`
103
- color: ${(props) => props.theme.colors.brightBlue};
104
- `
103
+ const arrowText = styled.div``
105
104
  const arrowIconContainer = styled.div`
106
105
  margin: 0 10px;
107
106
  display: flex;
@@ -69,7 +69,7 @@
69
69
  </template>
70
70
 
71
71
  <script>
72
- // import ProjectMarker from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
72
+ // import ThreeDots from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
73
73
  // To use:
74
74
  // <project-marker
75
75
  // :activeLanguage="'en-us'"
@@ -1,3 +0,0 @@
1
- <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5 10C7.76142 10 10 7.76142 10 5C10 2.23858 7.76142 0 5 0C2.23858 0 0 2.23858 0 5C0 7.76142 2.23858 10 5 10ZM5.875 5.05243V2.125H4.125V5.92743L6.19061 7.47663L7.24061 6.07663L5.875 5.05243Z" fill="white"/>
3
- </svg>
@@ -1,96 +0,0 @@
1
- <template>
2
- <page-container>
3
- <marker-container
4
- :backgroundColor="backgroundColor"
5
- :hasIcon="!!iconName"
6
- :cursor="cursor"
7
- >
8
- <icon
9
- v-if="!!iconName"
10
- :name="iconName"
11
- color="white"
12
- size="10px"
13
- :cursor="cursor"
14
- />
15
- <span>{{ label }}</span>
16
- </marker-container>
17
- </page-container>
18
- </template>
19
-
20
- <script>
21
- // import MarkerItem from "@eturnity/eturnity_reusable_components/src/components/markerItem"
22
- // To use:
23
- // <marker-item
24
- // label="Label"
25
- // backgroundColor="#ab5348"
26
- // iconName="icon_name"
27
- // cursor="pointer"
28
- // />
29
-
30
- import styled from 'vue3-styled-components'
31
- import Icon from '../icon'
32
- import Modal from '../modals/modal'
33
- import PageTitle from '../pageTitle'
34
- import DeleteIcon from '../deleteIcon'
35
- import PageSubtitle from '../pageSubtitle'
36
- import MainButton from '../buttons/mainButton'
37
-
38
- const PageContainer = styled.div`
39
- display: flex;
40
- align-items: center;
41
- font-size: 12px;
42
- line-height: 14px;
43
- `
44
-
45
- const MarkerAttrs = {
46
- backgroundColor: String,
47
- hasIcon: Boolean,
48
- cursor: String
49
- }
50
- const MarkerContainer = styled('div', MarkerAttrs)`
51
- display: grid;
52
- grid-template-columns: ${(props) => (props.hasIcon ? 'auto 1fr' : '1fr')};
53
- grid-gap: 5px;
54
- position: relative;
55
- align-items: center;
56
- padding: 2px 7px;
57
- color: ${(props) => props.theme.colors.white};
58
- background-color: ${(props) =>
59
- props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
60
- border: 1px solid
61
- ${(props) =>
62
- props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
63
- border-radius: 4px;
64
- white-space: nowrap;
65
- cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
66
- `
67
-
68
- // const IconContainer = styled.div`
69
- // padding: 8px;
70
- // line-height: 0;
71
- // `
72
-
73
- export default {
74
- name: 'project-marker',
75
- components: {
76
- PageContainer,
77
- MarkerContainer,
78
- Icon
79
- },
80
- props: {
81
- backgroundColor: {
82
- required: false
83
- },
84
- iconName: {
85
- required: false
86
- },
87
- label: {
88
- required: true
89
- },
90
- cursor: {
91
- required: false,
92
- default: 'default'
93
- }
94
- }
95
- }
96
- </script>
@@ -1,145 +0,0 @@
1
- <template>
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
- 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
- <empty-text v-if="!optionsList.length">
18
- {{ $gettext('no_batch_actions_available') }}
19
- </empty-text>
20
- <icon-container @click="$emit('on-close')">
21
- <icon
22
- name="close_for_modals,_tool_tips"
23
- color="white"
24
- size="14px"
25
- cursor="pointer"
26
- />
27
- </icon-container>
28
- </box-container>
29
- </page-container>
30
- </template>
31
-
32
- <script>
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
-
55
- const PageContainer = styled.div`
56
- position: fixed;
57
- bottom: 30px;
58
- left: 50%;
59
- transform: translateX(-50%);
60
- `
61
-
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
-
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
-
82
- const ListContainer = styled.div`
83
- padding: 0 20px;
84
- display: flex;
85
- gap: 20px;
86
- color: ${(props) => props.theme.colors.white};
87
- `
88
-
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};
99
- }
100
- `
101
-
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
-
111
- &:hover {
112
- background: rgba(255, 255, 255, 0.1);
113
- border-radius: 4px;
114
- }
115
- `
116
-
117
- const EmptyText = styled.div`
118
- color: ${(props) => props.theme.colors.white};
119
- font-size: 13px;
120
- padding-left: 16px;
121
- `
122
-
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
138
- },
139
- numberSelected: {
140
- required: true,
141
- default: 0
142
- }
143
- }
144
- }
145
- </script>