@eturnity/eturnity_reusable_components 7.8.1-EPDM-9696.0 → 7.8.1-EPDM-9696.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/.eslintrc ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": ["plugin:prettier/recommended", "plugin:vue/essential"],
3
+
4
+ "plugins": ["prettier"],
5
+
6
+ "rules": {
7
+ "prettier/prettier": "error",
8
+ "vue/no-parsing-error": "off",
9
+ "vue/no-side-effects-in-computed-properties": "off",
10
+ "vue/invalid-first-character-of-tag-name": "off"
11
+ },
12
+
13
+ "parserOptions": {
14
+ "ecmaVersion": 6,
15
+ "parser": "babel-eslint",
16
+ "sourceType": "module"
17
+ }
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.8.1-EPDM-9696.0",
3
+ "version": "7.8.1-EPDM-9696.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <Handle :height = "height" class="handle">
3
+ <Dot></Dot>
4
+ <Dot></Dot>
5
+ <Dot></Dot>
6
+ </Handle>
7
+ </template>
8
+
9
+ <script>
10
+
11
+ import styled from 'vue-styled-components'
12
+
13
+ const Handle = styled('div',{ height : String })`
14
+ position:absolute;
15
+ left:0;
16
+ margin-right:10px;
17
+ display: flex;
18
+ align-items: stretch;
19
+ flex-direction: column;
20
+ justify-content: center;
21
+ width: 14px;
22
+ height:${props=> props.height};
23
+ padding: 0 5px;
24
+ background-color: #f3f3f7;
25
+ cursor: pointer;
26
+ align-items: center;
27
+ `
28
+ const Dot = styled.div`
29
+ display: inline-block;
30
+ width: 4px;
31
+ height: 4px;
32
+ margin:2px;
33
+ background-color: #0068de;
34
+ `
35
+
36
+ export default {
37
+ name: 'draggableInputHandle',
38
+ props:['height'],
39
+ components: {
40
+ Handle,
41
+ Dot
42
+ },
43
+ data() {
44
+ return {}
45
+ }
46
+ }
47
+ </script>
@@ -46,7 +46,9 @@
46
46
  @keydown.native="onKeyDown"
47
47
  :showBorder="showBorder"
48
48
  :data-id="dataId"
49
- >
49
+ :isDraggable="isDraggable"
50
+ >
51
+ <draggableInputHandle v-if="isDraggable && !isSearchBarVisible" :height="selectHeight" />
50
52
  <inputText
51
53
  v-if="isSearchBarVisible"
52
54
  ref="searchInput"
@@ -141,6 +143,7 @@ import styled from 'vue-styled-components'
141
143
  import InfoText from '../../infoText'
142
144
  import icon from '../../icon'
143
145
  import inputText from '../inputText'
146
+ import draggableInputHandle from '../../draggableInputHandle'
144
147
 
145
148
  const Caret = styled.div`
146
149
  display: flex;
@@ -200,13 +203,14 @@ const selectButtonAttrs = {
200
203
  height: String,
201
204
  selectMinHeight: String,
202
205
  isSearchBarVisible: Boolean,
203
- showBorder: Boolean
206
+ showBorder: Boolean,
207
+ isDraggable: Boolean,
204
208
  }
205
209
  const selectButton = styled('div', selectButtonAttrs)`
206
210
  position: relative;
207
211
  box-sizing: border-box;
208
212
  border-radius: 4px;
209
- padding: ${(props) => (props.isSearchBarVisible ? '0' : '0px 0px 0 15px')};
213
+ padding-left:${(props) => (props.isSearchBarVisible ? '0' : props.isDraggable?'30px':'15px')};
210
214
  text-align: left;
211
215
  border-radius: 4px;
212
216
  min-height: ${(props) =>
@@ -236,6 +240,10 @@ const selectButton = styled('div', selectButtonAttrs)`
236
240
  ? props.theme.colors[props.fontColor]
237
241
  : props.fontColor};
238
242
  ${(props) => (props.disabled ? 'pointer-events: none' : '')};
243
+ overflow: hidden;
244
+ & >.handle{
245
+ border-right:${(props) =>props.hasError ? props.theme.colors.red : props.theme.colors.grey4} 1px solid;
246
+ }
239
247
  `
240
248
  const selectDropdownAttrs = {
241
249
  hoveredBgColor: String,
@@ -401,6 +409,10 @@ export default {
401
409
  dataId: {
402
410
  type: String,
403
411
  default: ''
412
+ },
413
+ isDraggable: {
414
+ type: Boolean,
415
+ default: false
404
416
  }
405
417
  },
406
418
 
@@ -418,7 +430,8 @@ export default {
418
430
  icon,
419
431
  Caret,
420
432
  Selector,
421
- inputText
433
+ inputText,
434
+ draggableInputHandle
422
435
  },
423
436
 
424
437
  data() {