@eturnity/eturnity_reusable_components 6.37.0-EPDM-8148.7 → 6.37.0-EPDM-2198.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.
Files changed (47) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +42 -181
  3. package/src/assets/svgIcons/charger_icon_white.svg +44 -0
  4. package/src/assets/svgIcons/collections.svg +3 -0
  5. package/src/assets/svgIcons/dashboard.svg +3 -0
  6. package/src/assets/svgIcons/energy_meter.svg +12 -0
  7. package/src/assets/svgIcons/erase.svg +1 -1
  8. package/src/assets/svgIcons/expand.svg +1 -0
  9. package/src/assets/svgIcons/logout.svg +3 -0
  10. package/src/assets/svgIcons/split.svg +94 -0
  11. package/src/assets/svgIcons/subscriptions.svg +3 -0
  12. package/src/assets/theme.js +3 -0
  13. package/src/components/addNewButton/index.vue +12 -8
  14. package/src/components/buttons/mainButton/index.vue +35 -23
  15. package/src/components/card/index.vue +95 -0
  16. package/src/components/draggableInputHandle/index.vue +47 -0
  17. package/src/components/errorMessage/index.vue +1 -3
  18. package/src/components/filter/filterSettings.vue +15 -10
  19. package/src/components/filter/index.vue +12 -1
  20. package/src/components/icon/iconCollection.vue +5 -5
  21. package/src/components/icon/index.vue +10 -2
  22. package/src/components/iconWrapper/index.vue +17 -12
  23. package/src/components/infoCard/index.vue +36 -0
  24. package/src/components/infoText/index.vue +2 -12
  25. package/src/components/inputs/checkbox/index.vue +5 -0
  26. package/src/components/inputs/inputNumber/index.vue +48 -17
  27. package/src/components/inputs/inputText/index.vue +24 -5
  28. package/src/components/inputs/radioButton/index.vue +66 -49
  29. package/src/components/inputs/searchInput/index.vue +6 -0
  30. package/src/components/inputs/select/index.vue +122 -58
  31. package/src/components/inputs/select/option/index.vue +5 -1
  32. package/src/components/inputs/switchField/index.vue +7 -11
  33. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +0 -8
  34. package/src/components/inputs/textAreaInput/index.vue +12 -7
  35. package/src/components/inputs/toggle/index.vue +82 -82
  36. package/src/components/label/index.vue +103 -0
  37. package/src/components/modals/modal/index.vue +46 -13
  38. package/src/components/navigationTabs/index.vue +105 -0
  39. package/src/components/pageSubtitle/index.vue +1 -8
  40. package/src/components/pageTitle/index.vue +32 -4
  41. package/src/components/pagination/index.vue +136 -129
  42. package/src/components/projectMarker/index.vue +39 -33
  43. package/src/components/sideMenu/index.vue +270 -0
  44. package/src/components/tables/mainTable/index.vue +3 -3
  45. package/src/components/threeDots/index.vue +31 -22
  46. package/src/helpers/numberConverter.js +4 -2
  47. package/src/helpers/translateLang.js +9 -1
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <Wrapper
3
+ v-show="!isLoading"
4
+ :class="viewCardClass"
5
+ :width="width"
6
+ :minWidth="minWidth"
7
+ >
8
+ <Spinner v-if="isLoading" size="50px" :limitedToModal="true" />
9
+ <CardWrapper v-else>
10
+ <CardTitle :class="titleClass" >
11
+ {{ $gettext(title) }}
12
+ <et-popover
13
+ v-if="showPopover && popoverText !== ''"
14
+ :text="popoverText"
15
+ ></et-popover>
16
+ </CardTitle>
17
+ <slot></slot>
18
+ </CardWrapper>
19
+ </Wrapper>
20
+ </template>
21
+
22
+ <script>
23
+ import styled from 'vue-styled-components'
24
+ import Spinner from '../spinner'
25
+
26
+ const WrapperProps = { width: [Number, String], minWidth: [Number, String] }
27
+ const Wrapper = styled('div', WrapperProps)`
28
+ max-width: ${(props) => props.width};
29
+ min-width: ${(props) => props.minWidth};
30
+ padding: 20px;
31
+ box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
32
+ border-radius: 4px;
33
+ background-color: ${props => props.theme.colors.white};
34
+ height: 100%;
35
+ `
36
+
37
+ const CardWrapper = styled('div')`
38
+ height: 100%;
39
+ width: auto;
40
+ `
41
+
42
+ const CardTitle = styled('p')`
43
+ font-size: 14px;
44
+ line-height: 1;
45
+ color: ${props => props.theme.colors.black};
46
+ font-weight: 700;
47
+ margin-bottom: 10px;
48
+ `
49
+
50
+ export default {
51
+ name: 'Card',
52
+ props: {
53
+ title: {
54
+ type: String,
55
+ default: ''
56
+ },
57
+ width: {
58
+ type: [Number, String],
59
+ required: false,
60
+ default: '400px'
61
+ },
62
+ minWidth: {
63
+ type: [Number, String],
64
+ required: false,
65
+ default: null
66
+ },
67
+ titleClass: {
68
+ type: String,
69
+ default: ''
70
+ },
71
+ showPopover: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ viewCardClass: {
76
+ type: String,
77
+ default: ''
78
+ },
79
+ popoverText: {
80
+ type: String,
81
+ default: ''
82
+ },
83
+ isLoading: {
84
+ type: Boolean,
85
+ default: false
86
+ }
87
+ },
88
+ components: {
89
+ Spinner,
90
+ Wrapper,
91
+ CardTitle,
92
+ CardWrapper,
93
+ }
94
+ }
95
+ </script>
@@ -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>
@@ -9,9 +9,7 @@
9
9
  <script>
10
10
  // import ErrorMessage from "@eturnity/eturnity_reusable_components/src/components/errorMessage"
11
11
  //To use:
12
- // <error-message
13
- // alignText="right" // default is left
14
- // />
12
+ // <error-message />
15
13
 
16
14
  import styled from 'vue-styled-components'
17
15
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <container-wrapper>
2
+ <container-wrapper @click="$emit('on-container-click')">
3
3
  <upper-container v-if="filterViews && filterViews.length">
4
4
  <view-container :maxWidth="activeView.length">
5
5
  <select-component
@@ -40,7 +40,10 @@
40
40
  v-for="(item, idx) in filterData"
41
41
  :key="idx + '_filterdata'"
42
42
  >
43
- <column-title :showBorder="idx + 1 !== filterData.length">
43
+ <column-title
44
+ :showBorder="idx + 1 !== filterData.length"
45
+ :data-id="`filter_label_project_view_file_manager_${item.type}`"
46
+ >
44
47
  {{ item.columnName }}
45
48
  </column-title>
46
49
  <row-container v-if="item.type === 'columns'">
@@ -88,13 +91,12 @@
88
91
  selectHeight="36px"
89
92
  fontSize="13px"
90
93
  :label="filter.label"
94
+ :labelDataId="filter.dataId"
91
95
  alignItems="vertical"
92
96
  :disabled="!filter.choices.length"
93
97
  >
94
98
  <template #selector>
95
- <option-title>
96
- {{ filter.selectedText }}
97
- </option-title>
99
+ <option-title> {{ filter.selectedText }} </option-title>
98
100
  </template>
99
101
  <template #dropdown>
100
102
  <dropdown-checkbox-container @click.stop>
@@ -117,7 +119,7 @@
117
119
  </template>
118
120
  </select-component>
119
121
  <section-container v-else-if="isRangeSelector(filter.filter_type)">
120
- <row-label>{{ filter.label }}</row-label>
122
+ <row-label :data-id="filter.dataId">{{ filter.label }}</row-label>
121
123
  <grid-container>
122
124
  <input-number
123
125
  :placeholder="
@@ -125,7 +127,7 @@
125
127
  ? $gettext('min') + ' (' + filter.unit + ')'
126
128
  : $gettext('min')
127
129
  "
128
- :numberPrecision="2"
130
+ :numberPrecision="isIntegerRange(filter.filter_type) ? 0 : 2"
129
131
  :value="filter.range.start"
130
132
  @input-change="
131
133
  onChange({
@@ -145,7 +147,7 @@
145
147
  ? $gettext('max') + ' (' + filter.unit + ')'
146
148
  : $gettext('max')
147
149
  "
148
- :numberPrecision="2"
150
+ :numberPrecision="isIntegerRange(filter.filter_type) ? 0 : 2"
149
151
  :value="filter.range.end"
150
152
  @input-change="
151
153
  onChange({
@@ -165,7 +167,7 @@
165
167
  v-else-if="isDateSelector(filter.filter_type)"
166
168
  @click.stop
167
169
  >
168
- <row-label>{{ filter.label }}</row-label>
170
+ <row-label :data-id="filter.dataId">{{ filter.label }}</row-label>
169
171
  <grid-container>
170
172
  <date-picker-input
171
173
  :placeholder="$gettext('Date from')"
@@ -338,7 +340,7 @@ const DragContainer = styled.div`
338
340
 
339
341
  const RowContainer = styled('div', TitleAttrs)`
340
342
  padding: 10px 14px;
341
- width: 300px;
343
+ min-width: 300px;
342
344
 
343
345
  ${({ showBorder, theme }) =>
344
346
  showBorder &&
@@ -613,6 +615,9 @@ export default {
613
615
  return type === 'multi_select_integer' || type === 'multi_select_string'
614
616
  },
615
617
  isRangeSelector(type) {
618
+ return type === 'integer_range' || type === 'number_range'
619
+ },
620
+ isIntegerRange(type) {
616
621
  return type === 'integer_range'
617
622
  },
618
623
  isDateSelector(type) {
@@ -19,6 +19,7 @@
19
19
  @on-apply-current-view="onApplyCurrentView()"
20
20
  @on-prevent-close="onPreventClose($event)"
21
21
  @on-reset-filters="onResetFilters()"
22
+ @on-container-click="onContainerClick()"
22
23
  :hasActiveView="hasActiveView"
23
24
  :activeView="activeView"
24
25
  :activeLanguage="activeLanguage"
@@ -82,9 +83,19 @@ export default {
82
83
  onToggleDropdown() {
83
84
  this.isDropdownOpen = !this.isDropdownOpen
84
85
  },
86
+ onContainerClick() {
87
+ // due to newer versions of Chrome (121), contains() is not always working.
88
+ // So, we need to add this so that the filter modal won't close
89
+ // when we open a dropdown. EPDM-9732
90
+ this.preventOutsideClick = true
91
+ setTimeout(() => {
92
+ this.preventOutsideClick = false
93
+ }, 100)
94
+ },
85
95
  clickOutside(event) {
96
+ const target = event.target
86
97
  if (
87
- !this.$refs.dropdown.$el.contains(event.target) &&
98
+ !this.$refs.dropdown.$el.contains(target) &&
88
99
  !this.preventOutsideClick
89
100
  ) {
90
101
  this.isDropdownOpen = false
@@ -20,13 +20,13 @@ import styled from 'vue-styled-components'
20
20
 
21
21
  const Wrapper = styled.div`
22
22
  display: block;
23
- text-align:center;
24
- justify-items:center
25
- width:100%;
26
- background-color:#ccc;
23
+ text-align: center;
24
+ justify-items: center;
25
+ width: 100%;
26
+ background-color: #ccc;
27
27
  `
28
28
  const IconWrapper = styled.div`
29
- display:inline-flex
29
+ display: inline-flex;
30
30
  flex-direction: column;
31
31
  background-color: white;
32
32
  border-radius: 6px;
@@ -5,6 +5,7 @@
5
5
  :size="size"
6
6
  :color="color"
7
7
  :hoveredColor="hoveredColor"
8
+ :backgroundColor="backgroundColor"
8
9
  v-html="
9
10
  require(`!html-loader!./../../assets/svgIcons/${name.toLowerCase()}.svg`)
10
11
  "
@@ -30,7 +31,7 @@ import styled from 'vue-styled-components'
30
31
  const wrapperAttrs = { isDisabled: Boolean, size: String, cursor: String }
31
32
  const Wrapper = styled('div', wrapperAttrs)`
32
33
  display: flex;
33
- position:relative
34
+ position: relative;
34
35
  align-content: center;
35
36
  justify-content: center;
36
37
  width: ${(props) => props.size};
@@ -40,6 +41,7 @@ const Wrapper = styled('div', wrapperAttrs)`
40
41
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursor)};
41
42
  line-height: 0;
42
43
  `
44
+
43
45
  const strikedAttrs = { isDisabled: Boolean, color: String, hoveredColor: String }
44
46
  const strikedLine = styled('div', strikedAttrs)`
45
47
  display: flex;
@@ -56,11 +58,14 @@ const strikedLine = styled('div', strikedAttrs)`
56
58
  transform-origin: 0% 100%;
57
59
  transform: rotate(-45deg);
58
60
  `
59
- const IconImageProps = { color: String, hoveredColor: String, size: String }
61
+ const IconImageProps = { color: String, hoveredColor: String, size: String, backgroundColor: String}
60
62
  const IconImage = styled('div', IconImageProps)`
63
+ width: 100%;
61
64
  svg {
62
65
  width: 100%;
63
66
  height: 100%;
67
+ background-color: ${(props) => props.backgroundColor};
68
+ padding: ${(props) => props.backgroundColor ? '3px' : '0'};
64
69
  }
65
70
  svg path {
66
71
  ${(props) =>
@@ -92,6 +97,9 @@ export default {
92
97
  color: {
93
98
  required: false
94
99
  },
100
+ backgroundColor: {
101
+ required: false
102
+ },
95
103
  hoveredColor: {
96
104
  required: false
97
105
  },
@@ -8,6 +8,7 @@
8
8
  :color="iconColor"
9
9
  :hoveredBackgroundColor="hoveredBackgroundColor"
10
10
  :isHovered="isHovered"
11
+ :data-id="dataId"
11
12
  >
12
13
  <icon
13
14
  :disabled="disabled"
@@ -110,14 +111,14 @@ export default {
110
111
  required: false
111
112
  },
112
113
  backgroundColor: {
113
- required: false,
114
- },
115
- hasBorder: {
116
- required: false,
114
+ required: false
115
+ },
116
+ hasBorder: {
117
+ required: false
117
118
  },
118
119
  hoveredBackgroundColor: {
119
120
  required: false,
120
- default: 'transparentWhite1'
121
+ default: 'transparentWhite2'
121
122
  },
122
123
  size: {
123
124
  required: false,
@@ -135,13 +136,17 @@ export default {
135
136
  required: false,
136
137
  default: '6px'
137
138
  },
138
- isHovered:{
139
- required:false,
140
- default:false
141
- },
142
- isStriked:{
143
- required:false,
144
- default:false
139
+ dataId: {
140
+ type: String,
141
+ default: ''
142
+ },
143
+ isHovered: {
144
+ required: false,
145
+ default: false
146
+ },
147
+ isStriked: {
148
+ required: false,
149
+ default: false
145
150
  }
146
151
  },
147
152
  data() {
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <info-container>
3
+ <icon name="info" size="24px" />
4
+ <text-container>
5
+ <slot />
6
+ </text-container>
7
+ </info-container>
8
+ </template>
9
+
10
+ <script>
11
+ import styled from 'vue-styled-components'
12
+ import Icon from '../icon'
13
+
14
+ const InfoContainer = styled.div`
15
+ display: flex;
16
+ gap: 15px;
17
+ padding: 20px;
18
+ border: 1px dashed ${(props) => props.theme.colors.grey4};
19
+ border-radius: 4px;
20
+ `
21
+
22
+ const TextContainer = styled.div`
23
+ font-size: 13px;
24
+ width: 100%;
25
+ `
26
+
27
+
28
+ export default {
29
+ name: 'InfoCard',
30
+ components: {
31
+ Icon,
32
+ InfoContainer,
33
+ TextContainer
34
+ }
35
+ }
36
+ </script>
@@ -10,7 +10,6 @@
10
10
  </icon-img>
11
11
  <text-overlay
12
12
  v-if="showInfo"
13
- :borderColor="borderColor"
14
13
  :width="width"
15
14
  :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
16
15
  :alignArrow="alignArrow"
@@ -27,7 +26,6 @@
27
26
  //To use:
28
27
  // <info-text
29
28
  // text="Veritatis et quasi architecto beatae vitae"
30
- // borderColor="#ccc"
31
29
  // size="20"
32
30
  // alignArrow="right" // which side the arrow should be on
33
31
  // />
@@ -37,7 +35,6 @@ import icon from '../icon'
37
35
 
38
36
  const textAttrs = {
39
37
  iconSize: String,
40
- borderColor: String,
41
38
  alignArrow: String,
42
39
  width: String,
43
40
  halfComputedTextInfoWidth: Number
@@ -58,6 +55,7 @@ const TextOverlay = styled('div', textAttrs)`
58
55
  max-width: 400px;
59
56
  font-size: 13px;
60
57
  font-weight: 400;
58
+ line-height: normal;
61
59
  border-radius: 4px;
62
60
  z-index: 99;
63
61
  color: ${(props) => props.theme.colors.white};
@@ -111,10 +109,6 @@ export default {
111
109
  text: {
112
110
  required: false
113
111
  },
114
- borderColor: {
115
- required: false,
116
- default: null
117
- },
118
112
  size: {
119
113
  required: false,
120
114
  default: '14px'
@@ -156,11 +150,7 @@ export default {
156
150
  },
157
151
  computed: {
158
152
  iconColor() {
159
- return this.isActive
160
- ? this.borderColor
161
- ? this.borderColor
162
- : theme.colors.secondary
163
- : theme.colors.mediumGray
153
+ return theme.colors.mediumGray
164
154
  },
165
155
  halfComputedTextInfoWidth() {
166
156
  return parseInt(this.width) / 2
@@ -11,6 +11,7 @@
11
11
  <input-checkbox
12
12
  type="checkbox"
13
13
  :checked="isChecked"
14
+ :data-id="dataId"
14
15
  @change="onChangeHandler(!isChecked)"
15
16
  />
16
17
  <div>
@@ -168,6 +169,10 @@ export default {
168
169
  isDisabled: {
169
170
  required: false,
170
171
  default: false
172
+ },
173
+ dataId: {
174
+ type: String,
175
+ default: ''
171
176
  }
172
177
  },
173
178
  methods: {
@@ -13,15 +13,14 @@
13
13
  </label-slot-wrapper>
14
14
 
15
15
  <label-wrapper v-if="labelText">
16
- <label-text :labelFontColor="labelFontColor">
16
+ <label-text :labelFontColor="labelFontColor" :data-id="labelDataId">
17
17
  {{ labelText }}
18
18
  </label-text>
19
+
19
20
  <info-text
20
21
  v-if="labelInfoText"
21
22
  :text="labelInfoText"
22
- borderColor="#ccc"
23
- size="14px"
24
- :alignText="labelInfoAlign"
23
+ :alignArrow="labelInfoAlign"
25
24
  />
26
25
  </label-wrapper>
27
26
  <input-wrapper>
@@ -37,7 +36,7 @@
37
36
  :value="formatWithCurrency(value)"
38
37
  @blur="onInputBlur($event)"
39
38
  @focus="focusInput()"
40
- @keyup.enter="$emit('on-enter-click')"
39
+ @keyup.enter="onEnterPress"
41
40
  @input="onInput($event)"
42
41
  :disabled="disabled"
43
42
  :isDisabled="disabled"
@@ -53,6 +52,7 @@
53
52
  :hasLabelSlot="hasLabelSlot"
54
53
  :slotSize="slotSize"
55
54
  :showLinearUnitName="showLinearUnitName"
55
+ :data-id="inputDataId"
56
56
  />
57
57
  <slot-container v-if="hasSlot" :slotSize="slotSize" :isError="isError">
58
58
  <slot></slot>
@@ -82,6 +82,7 @@
82
82
  // inputWidth="150px" //by default, this is 100%
83
83
  // minWidth="100px"
84
84
  // :numberPrecision="3"
85
+ // minDecimals="2"
85
86
  // unitName="pc"
86
87
  // :value="inputValue" //required -- String
87
88
  // @input-change="onInputChange($event)" //required
@@ -97,7 +98,9 @@
97
98
  // labelInfoAlign="left"
98
99
  // :minNumber="0"
99
100
  // fontColor="blue"
100
- // />
101
+ // >
102
+ //<template name=label><img>....</template>
103
+ //</inputNumber>
101
104
  import styled from 'vue-styled-components'
102
105
  import {
103
106
  stringToNumber,
@@ -356,6 +359,10 @@ export default {
356
359
  required: false,
357
360
  default: 0
358
361
  },
362
+ minDecimals: {
363
+ required: false,
364
+ default: 0
365
+ },
359
366
  unitName: {
360
367
  required: false,
361
368
  default: ''
@@ -437,6 +444,14 @@ export default {
437
444
  focus: {
438
445
  required: false,
439
446
  default: false
447
+ },
448
+ labelDataId: {
449
+ required: false,
450
+ default: ''
451
+ },
452
+ inputDataId: {
453
+ required: false,
454
+ default: ''
440
455
  }
441
456
  },
442
457
  computed: {
@@ -454,6 +469,10 @@ export default {
454
469
  }
455
470
  },
456
471
  methods: {
472
+ onEnterPress(){
473
+ this.$emit('on-enter-click')
474
+ this.$refs.inputField1.$el.blur()
475
+ },
457
476
  onChangeHandler(event) {
458
477
  if (isNaN(event) || event === '') {
459
478
  event = this.defaultNumber
@@ -462,7 +481,7 @@ export default {
462
481
  ? this.minNumber
463
482
  : event
464
483
  }
465
- if (!this.allowNegative && typeof event === 'number') {
484
+ if (!this.allowNegative) {
466
485
  event = Math.abs(event)
467
486
  }
468
487
  event = parseFloat(event)
@@ -488,7 +507,8 @@ export default {
488
507
  } else {
489
508
  let num = stringToNumber({
490
509
  value: item,
491
- numberPrecision: false
510
+ numberPrecision: false,
511
+ minDecimals: this.minDecimals
492
512
  })
493
513
  return num
494
514
  }
@@ -499,7 +519,8 @@ export default {
499
519
  if (typeof evaluated === 'string') {
500
520
  evaluated = stringToNumber({
501
521
  value: evaluated,
502
- numberPrecision: this.numberPrecision
522
+ numberPrecision: this.numberPrecision,
523
+ minDecimals: this.minDecimals
503
524
  })
504
525
  } else if (typeof evaluated === 'number') {
505
526
  evaluated = evaluated.toFixed(this.numberPrecision)
@@ -528,6 +549,9 @@ export default {
528
549
  return array
529
550
  },
530
551
  onInput(value) {
552
+ // if(!this.isFocused){
553
+ // return
554
+ // }
531
555
  if (this.isBlurred) {
532
556
  this.isBlurred = false
533
557
  return
@@ -559,7 +583,8 @@ export default {
559
583
  : this.defaultNumber
560
584
  ? this.defaultNumber
561
585
  : this.minNumber,
562
- numberPrecision: this.numberPrecision
586
+ numberPrecision: this.numberPrecision,
587
+ minDecimals: this.minDecimals
563
588
  })
564
589
  }
565
590
  let adjustedMinValue =
@@ -604,7 +629,8 @@ export default {
604
629
  let input = this.numberToStringEnabled
605
630
  ? numberToString({
606
631
  value: adjustedMinValue,
607
- numberPrecision: this.numberPrecision
632
+ numberPrecision: this.numberPrecision,
633
+ minDecimals: this.minDecimals
608
634
  })
609
635
  : adjustedMinValue
610
636
  let unit = this.showLinearUnitName ? '' : this.unitName
@@ -616,7 +642,8 @@ export default {
616
642
  return this.numberToStringEnabled
617
643
  ? numberToString({
618
644
  value: adjustedMinValue,
619
- numberPrecision: this.numberPrecision
645
+ numberPrecision: this.numberPrecision,
646
+ minDecimals: this.minDecimals
620
647
  })
621
648
  : adjustedMinValue
622
649
  }
@@ -631,11 +658,12 @@ export default {
631
658
  e.preventDefault()
632
659
  let value = parseFloat(this.value || 0)
633
660
  value += parseFloat(this.interactionStep) * parseInt(e.movementX)
634
- this.$emit('on-input', value)
661
+ this.$emit('on-input-drag', value)
635
662
 
636
663
  this.textInput = numberToString({
637
664
  value: value && value.length ? value : this.minNumber,
638
- numberPrecision: this.numberPrecision
665
+ numberPrecision: this.numberPrecision,
666
+ minDecimals: this.minDecimals
639
667
  })
640
668
  //this.value=value
641
669
  },
@@ -650,17 +678,20 @@ export default {
650
678
  if (this.value) {
651
679
  this.textInput = numberToString({
652
680
  value: this.value,
653
- numberPrecision: this.numberPrecision
681
+ numberPrecision: this.numberPrecision,
682
+ minDecimals: this.minDecimals
654
683
  })
655
684
  } else if (this.defaultNumber !== null) {
656
685
  this.textInput = numberToString({
657
686
  value: this.defaultNumber,
658
- numberPrecision: this.numberPrecision
687
+ numberPrecision: this.numberPrecision,
688
+ minDecimals: this.minDecimals
659
689
  })
660
690
  } else if (this.minNumber !== null) {
661
691
  this.textInput = numberToString({
662
692
  value: this.minNumber,
663
- numberPrecision: this.numberPrecision
693
+ numberPrecision: this.numberPrecision,
694
+ minDecimals: this.minDecimals
664
695
  })
665
696
  }
666
697
  },