@eturnity/eturnity_reusable_components 8.31.6-EPDM-13620.1 → 8.31.6-EPDM-16401.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.31.6-EPDM-13620.1",
3
+ "version": "8.31.6-EPDM-16401.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -201,12 +201,6 @@
201
201
  </SelectDropdown>
202
202
  </Component>
203
203
  </DropdownWrapper>
204
- <ErrorMessage
205
- v-if="hasError && hasErrorMessage"
206
- data-test-id="error_message_wrapper"
207
- >
208
- {{ dynamicErrorMessage }}
209
- </ErrorMessage>
210
204
  </SelectButtonWrapper>
211
205
  </InputWrapper>
212
206
  </Container>
@@ -239,7 +233,6 @@
239
233
  import { Teleport, inject } from 'vue'
240
234
  import styled from 'vue3-styled-components'
241
235
  import InfoText from '../../infoText'
242
- import ErrorMessage from '../../errorMessage'
243
236
  import Icon from '../../icon'
244
237
  import InputText from '../inputText'
245
238
  import DraggableInputHandle from '../../draggableInputHandle'
@@ -309,6 +302,7 @@
309
302
  const Container = styled('div', inputProps)`
310
303
  width: ${(props) => props.selectWidth};
311
304
  position: ${(props) => (props.noRelative ? 'static' : 'relative')};
305
+ display: inline-block;
312
306
  text-align: ${(props) => (props.textCenter ? 'center' : 'left')};
313
307
  `
314
308
 
@@ -520,7 +514,6 @@
520
514
  Teleport,
521
515
  DraggableInputHandle,
522
516
  IsRequiredLabelStar,
523
- ErrorMessage,
524
517
  },
525
518
 
526
519
  props: {
@@ -627,14 +620,9 @@
627
620
  default: true,
628
621
  },
629
622
  hasError: {
630
- type: Boolean,
631
623
  required: false,
632
624
  default: false,
633
625
  },
634
- errorMessage: {
635
- type: String,
636
- default: '',
637
- },
638
626
  disabled: {
639
627
  required: false,
640
628
  type: Boolean,
@@ -747,12 +735,6 @@
747
735
  }
748
736
  },
749
737
  computed: {
750
- hasErrorMessage() {
751
- return this.errorMessage && this.errorMessage.length > 0
752
- },
753
- dynamicErrorMessage() {
754
- return this.errorMessage
755
- },
756
738
  optionLength() {
757
739
  if (this.isDropdownOpen) {
758
740
  return this.$refs.dropdown.$el.childElementCount > 1
@@ -159,17 +159,24 @@
159
159
  theme,
160
160
  }
161
161
  },
162
- computed: {},
162
+ computed: {
163
+ selectDropdownParent() {
164
+ const element = this.$el?.closest('.rc-select-dropdown')
165
+ // Try to get the Vue component instance
166
+ return element?.__vueParentComponent?.ctx || this.$parent
167
+ },
168
+ },
163
169
  methods: {
164
170
  clickHandler(e) {
165
171
  if (this.isDisabled || !!this.$attrs?.onClick) {
166
172
  // prevent emitter if the option is disabled
167
173
  return
168
174
  }
169
- this.$parent.$emit('option-selected', this.value, e)
175
+ // Pass the component instance along with the value
176
+ this.selectDropdownParent.$emit('option-selected', this.value, this, e)
170
177
  },
171
178
  hoverHandler() {
172
- this.$parent.$emit('option-hovered', this.value)
179
+ this.selectDropdownParent.$emit('option-hovered', this.value)
173
180
  },
174
181
  },
175
182
  }
@@ -25,8 +25,6 @@
25
25
  :resize="resize"
26
26
  :rows="rowHeight"
27
27
  :value="value"
28
- @blur="onInputBlur"
29
- @focus="onInputFocus"
30
28
  @input="onChangeHandler"
31
29
  ></textarea>
32
30
  </InputContainer>
@@ -210,12 +208,6 @@
210
208
  }
211
209
  this.$emit('input-change', $event.target.value)
212
210
  },
213
- onInputBlur($event) {
214
- this.$emit('input-blur', $event.target.value)
215
- },
216
- onInputFocus($event) {
217
- this.$emit('input-focus', $event.target.value)
218
- },
219
211
  },
220
212
  }
221
213
  </script>