@eturnity/eturnity_reusable_components 7.18.0--EPDM-5518.4 → 7.18.0-EPDM-10335.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.
Files changed (53) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/package.json +19 -23
  3. package/src/App.vue +2 -2
  4. package/src/components/addNewButton/index.vue +5 -3
  5. package/src/components/buttons/buttonIcon/index.vue +1 -1
  6. package/src/components/buttons/closeButton/index.vue +1 -1
  7. package/src/components/buttons/mainButton/index.vue +6 -1
  8. package/src/components/deleteIcon/DeleteIcon.stories.js +7 -7
  9. package/src/components/deleteIcon/index.vue +25 -21
  10. package/src/components/draggableInputHandle/index.vue +24 -25
  11. package/src/components/dropdown/index.vue +129 -110
  12. package/src/components/errorMessage/index.vue +10 -5
  13. package/src/components/filter/filterSettings.vue +57 -113
  14. package/src/components/filter/index.vue +3 -3
  15. package/src/components/filter/parentDropdown.vue +2 -2
  16. package/src/components/icon/iconCache.js +23 -0
  17. package/src/components/icon/iconCollection.vue +2 -2
  18. package/src/components/icon/index.vue +67 -75
  19. package/src/components/iconWrapper/index.vue +1 -4
  20. package/src/components/infoCard/index.vue +2 -3
  21. package/src/components/infoText/index.vue +1 -1
  22. package/src/components/inputs/checkbox/index.vue +24 -16
  23. package/src/components/inputs/inputNumber/index.vue +7 -10
  24. package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
  25. package/src/components/inputs/inputText/index.vue +4 -4
  26. package/src/components/inputs/radioButton/index.vue +1 -1
  27. package/src/components/inputs/searchInput/index.vue +28 -11
  28. package/src/components/inputs/select/index.vue +212 -91
  29. package/src/components/inputs/select/option/index.vue +36 -11
  30. package/src/components/inputs/slider/index.vue +16 -16
  31. package/src/components/inputs/switchField/index.vue +2 -2
  32. package/src/components/inputs/textAreaInput/index.vue +2 -2
  33. package/src/components/inputs/toggle/index.vue +2 -2
  34. package/src/components/label/index.vue +27 -31
  35. package/src/components/modals/modal/index.vue +2 -6
  36. package/src/components/navigationTabs/index.vue +27 -20
  37. package/src/components/pageSubtitle/index.vue +1 -1
  38. package/src/components/pageTitle/index.vue +4 -4
  39. package/src/components/pagination/index.vue +6 -7
  40. package/src/components/progressBar/index.vue +1 -1
  41. package/src/components/projectMarker/index.vue +17 -10
  42. package/src/components/sideMenu/index.vue +1 -1
  43. package/src/components/spinner/index.vue +7 -11
  44. package/src/components/tableDropdown/index.vue +30 -37
  45. package/src/components/tables/mainTable/exampleNested.vue +1 -1
  46. package/src/components/tables/mainTable/index.vue +10 -9
  47. package/src/components/tables/viewTable/index.vue +2 -2
  48. package/src/components/threeDots/index.vue +1 -1
  49. package/src/components/videoThumbnail/index.vue +95 -100
  50. package/src/main.js +4 -11
  51. package/src/assets/svgIcons/clock_full.svg +0 -3
  52. package/src/components/markerItem/index.vue +0 -96
  53. package/src/components/selectedOptions/index.vue +0 -145
@@ -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"
@@ -15,10 +14,10 @@
15
14
  :data-id="dataId"
16
15
  @change="onChangeHandler(!isChecked)"
17
16
  />
18
- <div>
17
+ <check-wrapper :hasLabel="hasLabel">
19
18
  <span class="checkmark"></span>
20
- </div>
21
- <label-text v-if="label && !!label.length">{{ label }}</label-text>
19
+ </check-wrapper>
20
+ <label-text v-if="hasLabel">{{ label }}</label-text>
22
21
  </container>
23
22
  </component-wrapper>
24
23
  </template>
@@ -34,22 +33,29 @@
34
33
  // size="small"
35
34
  // backgroundColor="red"
36
35
  // :isDisabled="true"
37
- // cursorType="default"
38
36
  // />
39
- import styled from 'vue-styled-components'
37
+ import styled from 'vue3-styled-components'
40
38
 
41
39
  const ComponentWrapper = styled.div`
42
40
  min-height: 18px;
43
41
  `
44
42
 
43
+ const CheckWrapper = styled('div', { hasLabel: Boolean })`
44
+ ${(props) =>
45
+ props.hasLabel &&
46
+ `
47
+ display: flex;
48
+ align-items: center;
49
+ `}
50
+ `
51
+
45
52
  const containerAttrs = {
46
53
  checkColor: String,
47
54
  size: String,
48
55
  hasLabel: Boolean,
49
56
  backgroundColor: String,
50
57
  isChecked: Boolean,
51
- isDisabled: Boolean,
52
- cursorType: String
58
+ isDisabled: Boolean
53
59
  }
54
60
  const Container = styled('label', containerAttrs)`
55
61
  display: grid;
@@ -58,7 +64,7 @@ const Container = styled('label', containerAttrs)`
58
64
  align-content: center;
59
65
  color: ${(props) => props.theme.colors.black};
60
66
  position: relative;
61
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
67
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
62
68
  font-size: 16px;
63
69
  user-select: none;
64
70
 
@@ -83,7 +89,7 @@ const Container = styled('label', containerAttrs)`
83
89
  : props.theme.colors.green
84
90
  : props.isDisabled
85
91
  ? props.theme.colors.lightGray
86
- : props.theme.colors.white};
92
+ : '#fff'};
87
93
  border-radius: 4px;
88
94
  border: 1px solid
89
95
  ${(props) =>
@@ -148,7 +154,8 @@ export default {
148
154
  ComponentWrapper,
149
155
  Container,
150
156
  InputCheckbox,
151
- LabelText
157
+ LabelText,
158
+ CheckWrapper
152
159
  },
153
160
  props: {
154
161
  label: {
@@ -176,10 +183,11 @@ export default {
176
183
  dataId: {
177
184
  type: String,
178
185
  default: ''
179
- },
180
- cursorType: {
181
- type: String,
182
- default: 'pointer'
186
+ }
187
+ },
188
+ computed: {
189
+ hasLabel() {
190
+ return !!this.label.length
183
191
  }
184
192
  },
185
193
  methods: {
@@ -47,7 +47,6 @@
47
47
  :fontSize="fontSize"
48
48
  :fontColor="fontColor"
49
49
  :backgroundColor="backgroundColor"
50
- v-on="$listeners"
51
50
  :hasSlot="hasSlot"
52
51
  :hasLabelSlot="hasLabelSlot"
53
52
  :slotSize="slotSize"
@@ -101,7 +100,7 @@
101
100
  // >
102
101
  //<template name=label><img>....</template>
103
102
  //</inputNumber>
104
- import styled from 'vue-styled-components'
103
+ import styled from 'vue3-styled-components'
105
104
  import {
106
105
  stringToNumber,
107
106
  numberToString
@@ -488,9 +487,10 @@ export default {
488
487
  // Need to return an integer rather than a string
489
488
  this.$emit('input-change', event)
490
489
  },
491
- onEvaluateCode(val) {
490
+ onEvaluateCode(event) {
492
491
  // function to perform math on the code
493
492
  // filter the string in case of any malicious content
493
+ const val = event.target.value
494
494
  let filtered = val.replace('(auto)', '').replace(/[^-()\d/*+.,]/g, '')
495
495
  filtered = filtered.split(/([-+*/()])/)
496
496
  let formatted = filtered.map((item) => {
@@ -548,20 +548,17 @@ export default {
548
548
  }
549
549
  return array
550
550
  },
551
- onInput(value) {
552
- // if(!this.isFocused){
553
- // return
554
- // }
551
+ onInput(event) {
555
552
  if (this.isBlurred) {
556
553
  this.isBlurred = false
557
554
  return
558
555
  }
559
- if (value === '') {
556
+ if (event.target.value === '') {
560
557
  this.$emit('on-input', '')
561
558
  }
562
559
  let evaluatedVal
563
560
  try {
564
- evaluatedVal = this.onEvaluateCode(value)
561
+ evaluatedVal = this.onEvaluateCode(event)
565
562
  } finally {
566
563
  if (evaluatedVal) {
567
564
  this.$emit('on-input', evaluatedVal)
@@ -573,7 +570,7 @@ export default {
573
570
  // setting isBlurred so we don't trigger onInput as well
574
571
  this.isBlurred = true
575
572
  let value = e.target.value
576
- let evaluatedInput = this.onEvaluateCode(value)
573
+ let evaluatedInput = this.onEvaluateCode(e)
577
574
  this.onChangeHandler(evaluatedInput ? evaluatedInput : value)
578
575
  if ((evaluatedInput && value.length) || this.minNumber !== null) {
579
576
  this.textInput = numberToString({
@@ -44,7 +44,7 @@
44
44
  // number_max_allowed: 10,
45
45
  // unit_short_name: "cm",
46
46
  // },
47
- import styled from "vue-styled-components"
47
+ import styled from "vue3-styled-components"
48
48
  import {
49
49
  stringToNumber,
50
50
  numberToString,
@@ -66,7 +66,7 @@
66
66
  </template>
67
67
 
68
68
  <script>
69
- import styled from 'vue-styled-components'
69
+ import styled from 'vue3-styled-components'
70
70
  import InfoText from '../../infoText'
71
71
  import Icon from '../../icon'
72
72
  import ErrorMessage from '../../errorMessage'
@@ -328,12 +328,12 @@ 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
  },
335
- onChangeHandler($event) {
336
- this.$emit('input-change', $event)
335
+ onChangeHandler(event) {
336
+ this.$emit('input-change', event.target.value)
337
337
  },
338
338
  onInputBlur($event) {
339
339
  this.$emit('input-blur', $event.target.value)
@@ -60,7 +60,7 @@
60
60
  // { label: 'Button 4', value: 'button_4', disabled: true }
61
61
  // ]
62
62
 
63
- import styled from 'vue-styled-components'
63
+ import styled from 'vue3-styled-components'
64
64
  import Modal from '../../modals/modal'
65
65
  import InfoText from '../../infoText'
66
66
 
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <container :inputWidth="inputWidth">
3
- <input-wrapper>
3
+ <input-wrapper :iconPosition="iconPosition" :iconColor="iconColor">
4
+ <SearchIconSvg class="search-icn" />
4
5
  <input-container
5
6
  ref="inputElement"
6
7
  :placeholder="placeholder"
@@ -13,10 +14,6 @@
13
14
  :hasFocus="hasFocus"
14
15
  :data-id="dataId"
15
16
  />
16
- <img
17
- class="search-icn"
18
- :src="require('../../../assets/icons/search_icon_black.svg')"
19
- />
20
17
  </input-wrapper>
21
18
  </container>
22
19
  </template>
@@ -32,8 +29,11 @@
32
29
  // @on-change="function($event)"
33
30
  // :isFilter="true" // to set the height at 30px
34
31
  // data-id="test-data-id"
32
+ // iconPosition="left"
33
+ // iconColor="grey2"
35
34
  // />
36
- import styled from 'vue-styled-components'
35
+ import styled from 'vue3-styled-components'
36
+ import SearchIconSvg from '../../../assets/icons/search_icon_black.svg'
37
37
 
38
38
  const inputAttrs = {
39
39
  isDisabled: Boolean,
@@ -68,11 +68,18 @@ const InputContainer = styled('input', inputAttrs)`
68
68
  const InputWrapper = styled.span`
69
69
  position: relative;
70
70
 
71
- img {
71
+ svg {
72
72
  position: absolute;
73
- right: 10px;
74
- top: 50%;
75
73
  transform: translateY(-50%);
74
+ top: 50%;
75
+ ${(props) => (props.iconPosition === 'right' ? 'right' : 'left')}: 10px;
76
+
77
+ path {
78
+ fill: ${(props) =>
79
+ props.theme.colors[props.iconColor]
80
+ ? props.theme.colors[props.iconColor]
81
+ : props.iconColor};
82
+ }
76
83
  }
77
84
  `
78
85
 
@@ -81,7 +88,8 @@ export default {
81
88
  components: {
82
89
  InputContainer,
83
90
  InputWrapper,
84
- Container
91
+ Container,
92
+ SearchIconSvg
85
93
  },
86
94
  props: {
87
95
  value: {
@@ -110,11 +118,20 @@ export default {
110
118
  dataId: {
111
119
  required: false,
112
120
  default: ''
121
+ },
122
+ iconPosition: {
123
+ type: String,
124
+ default: 'right'
125
+ },
126
+ iconColor: {
127
+ type: String,
128
+ default: 'black'
113
129
  }
114
130
  },
131
+ emits: ['on-change'],
115
132
  methods: {
116
133
  onChangeHandler(event) {
117
- this.$emit('on-change', event)
134
+ this.$emit('on-change', event.target.value)
118
135
  },
119
136
  focusInputElement() {
120
137
  this.$nextTick(() => {