@eturnity/eturnity_reusable_components 8.26.11-EPDM-16030.0 → 8.26.11-qa-07.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/dist/main.es12.js +2 -2
- package/dist/main.es13.js +3 -3
- package/dist/main.es14.js +2 -2
- package/dist/main.es15.js +60 -221
- package/dist/main.es16.js +150 -15
- package/dist/main.es17.js +21 -196
- package/dist/main.es18.js +1051 -19
- package/dist/main.es19.js +215 -1044
- package/dist/main.es20.js +69 -197
- package/dist/main.es21.js +2 -99
- package/dist/main.es22.js +541 -2
- package/dist/main.es23.js +159 -470
- package/dist/main.es24.js +2 -2
- package/dist/main.es377.js +1 -1
- package/dist/main.es379.js +21 -60
- package/dist/main.es380.js +60 -21
- package/dist/main.es5.js +3 -3
- package/dist/main.es6.js +4 -4
- package/dist/main.es9.js +1 -1
- package/package.json +1 -1
- package/src/components/barchart/BottomFields.vue +32 -2
- package/src/components/barchart/index.vue +5 -0
- package/src/components/buttons/buttonIcon/index.vue +26 -1
- package/src/components/buttons/mainButton/index.vue +19 -11
- package/src/components/infoText/index.vue +4 -1
- package/src/components/inputs/inputNumber/index.vue +45 -4
package/dist/main.es24.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import "./main.es3.js";
|
2
2
|
import styled from "./main.es7.js";
|
3
3
|
import { fetchIcon } from "./main.es378.js";
|
4
|
-
import { reactive } from "./main.
|
4
|
+
import { reactive } from "./main.es18.js";
|
5
5
|
import { computed, onMounted, watch, openBlock, createBlock, withCtx, createVNode, createElementVNode as createBaseVNode, createTextVNode, createCommentVNode } from "./main.es6.js";
|
6
|
-
import { toDisplayString } from "./main.
|
6
|
+
import { toDisplayString } from "./main.es16.js";
|
7
7
|
const _hoisted_1 = ["innerHTML"];
|
8
8
|
const _sfc_main = {
|
9
9
|
__name: "index",
|
package/dist/main.es377.js
CHANGED
package/dist/main.es379.js
CHANGED
@@ -1,64 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
let supported;
|
2
|
+
let perf;
|
3
|
+
function isPerformanceSupported() {
|
4
|
+
var _a;
|
5
|
+
if (supported !== void 0) {
|
6
|
+
return supported;
|
6
7
|
}
|
7
|
-
|
8
|
+
if (typeof window !== "undefined" && window.performance) {
|
9
|
+
supported = true;
|
10
|
+
perf = window.performance;
|
11
|
+
} else if (typeof globalThis !== "undefined" && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
|
12
|
+
supported = true;
|
13
|
+
perf = globalThis.perf_hooks.performance;
|
14
|
+
} else {
|
15
|
+
supported = false;
|
16
|
+
}
|
17
|
+
return supported;
|
18
|
+
}
|
19
|
+
function now() {
|
20
|
+
return isPerformanceSupported() ? perf.now() : Date.now();
|
8
21
|
}
|
9
|
-
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
10
|
-
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
11
|
-
const NOOP = () => {
|
12
|
-
};
|
13
|
-
const extend = Object.assign;
|
14
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
15
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
16
|
-
const isArray = Array.isArray;
|
17
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
18
|
-
const isFunction = (val) => typeof val === "function";
|
19
|
-
const isString = (val) => typeof val === "string";
|
20
|
-
const isSymbol = (val) => typeof val === "symbol";
|
21
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
22
|
-
const objectToString = Object.prototype.toString;
|
23
|
-
const toTypeString = (value) => objectToString.call(value);
|
24
|
-
const toRawType = (value) => {
|
25
|
-
return toTypeString(value).slice(8, -1);
|
26
|
-
};
|
27
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
28
|
-
const cacheStringFunction = (fn) => {
|
29
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
30
|
-
return (str) => {
|
31
|
-
const hit = cache[str];
|
32
|
-
return hit || (cache[str] = fn(str));
|
33
|
-
};
|
34
|
-
};
|
35
|
-
const capitalize = cacheStringFunction(
|
36
|
-
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
37
|
-
);
|
38
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
39
|
-
const def = (obj, key, value) => {
|
40
|
-
Object.defineProperty(obj, key, {
|
41
|
-
configurable: true,
|
42
|
-
enumerable: false,
|
43
|
-
value
|
44
|
-
});
|
45
|
-
};
|
46
22
|
export {
|
47
|
-
|
48
|
-
|
49
|
-
def,
|
50
|
-
extend,
|
51
|
-
hasChanged,
|
52
|
-
hasOwn,
|
53
|
-
isArray,
|
54
|
-
isFunction,
|
55
|
-
isIntegerKey,
|
56
|
-
isMap,
|
57
|
-
isObject,
|
58
|
-
isString,
|
59
|
-
isSymbol,
|
60
|
-
makeMap,
|
61
|
-
objectToString,
|
62
|
-
toRawType,
|
63
|
-
toTypeString
|
23
|
+
isPerformanceSupported,
|
24
|
+
now
|
64
25
|
};
|
package/dist/main.es380.js
CHANGED
@@ -1,25 +1,64 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
return supported;
|
1
|
+
function makeMap(str, expectsLowerCase) {
|
2
|
+
const map = /* @__PURE__ */ Object.create(null);
|
3
|
+
const list = str.split(",");
|
4
|
+
for (let i = 0; i < list.length; i++) {
|
5
|
+
map[list[i]] = true;
|
7
6
|
}
|
8
|
-
|
9
|
-
supported = true;
|
10
|
-
perf = window.performance;
|
11
|
-
} else if (typeof globalThis !== "undefined" && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
|
12
|
-
supported = true;
|
13
|
-
perf = globalThis.perf_hooks.performance;
|
14
|
-
} else {
|
15
|
-
supported = false;
|
16
|
-
}
|
17
|
-
return supported;
|
18
|
-
}
|
19
|
-
function now() {
|
20
|
-
return isPerformanceSupported() ? perf.now() : Date.now();
|
7
|
+
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
21
8
|
}
|
9
|
+
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
10
|
+
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
11
|
+
const NOOP = () => {
|
12
|
+
};
|
13
|
+
const extend = Object.assign;
|
14
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
15
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
16
|
+
const isArray = Array.isArray;
|
17
|
+
const isMap = (val) => toTypeString(val) === "[object Map]";
|
18
|
+
const isFunction = (val) => typeof val === "function";
|
19
|
+
const isString = (val) => typeof val === "string";
|
20
|
+
const isSymbol = (val) => typeof val === "symbol";
|
21
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
22
|
+
const objectToString = Object.prototype.toString;
|
23
|
+
const toTypeString = (value) => objectToString.call(value);
|
24
|
+
const toRawType = (value) => {
|
25
|
+
return toTypeString(value).slice(8, -1);
|
26
|
+
};
|
27
|
+
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
28
|
+
const cacheStringFunction = (fn) => {
|
29
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
30
|
+
return (str) => {
|
31
|
+
const hit = cache[str];
|
32
|
+
return hit || (cache[str] = fn(str));
|
33
|
+
};
|
34
|
+
};
|
35
|
+
const capitalize = cacheStringFunction(
|
36
|
+
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
37
|
+
);
|
38
|
+
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
39
|
+
const def = (obj, key, value) => {
|
40
|
+
Object.defineProperty(obj, key, {
|
41
|
+
configurable: true,
|
42
|
+
enumerable: false,
|
43
|
+
value
|
44
|
+
});
|
45
|
+
};
|
22
46
|
export {
|
23
|
-
|
24
|
-
|
47
|
+
NOOP,
|
48
|
+
capitalize,
|
49
|
+
def,
|
50
|
+
extend,
|
51
|
+
hasChanged,
|
52
|
+
hasOwn,
|
53
|
+
isArray,
|
54
|
+
isFunction,
|
55
|
+
isIntegerKey,
|
56
|
+
isMap,
|
57
|
+
isObject,
|
58
|
+
isString,
|
59
|
+
isSymbol,
|
60
|
+
makeMap,
|
61
|
+
objectToString,
|
62
|
+
toRawType,
|
63
|
+
toTypeString
|
25
64
|
};
|
package/dist/main.es5.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { isRuntimeOnly, warn, createRenderer, callWithAsyncErrorHandling } from "./main.es6.js";
|
2
2
|
import { Comment, Fragment, Static, Teleport, Text, callWithErrorHandling, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, devtools, getCurrentInstance, guardReactiveProps, h, handleError, initCustomFormatter, inject, isVNode, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, queuePostFlushCb, renderList, renderSlot, resolveComponent, resolveDynamicComponent, setBlockTracking, setDevtoolsHook, ssrContextKey, useSSRContext, version, watch, watchEffect, withCtx, withDirectives } from "./main.es6.js";
|
3
|
-
import { isFunction, isHTMLTag, isSVGTag, isString, looseToNumber, isArray, invokeArrayFns, hyphenate, extend, isOn, isModelListener, capitalize, isSpecialBooleanAttr, includeBooleanAttr } from "./main.
|
4
|
-
import { camelize } from "./main.
|
5
|
-
import { capitalize as capitalize2, normalizeClass, normalizeStyle, toDisplayString, toHandlerKey } from "./main.
|
3
|
+
import { isFunction, isHTMLTag, isSVGTag, isString, looseToNumber, isArray, invokeArrayFns, hyphenate, extend, isOn, isModelListener, capitalize, isSpecialBooleanAttr, includeBooleanAttr } from "./main.es15.js";
|
4
|
+
import { camelize } from "./main.es16.js";
|
5
|
+
import { capitalize as capitalize2, normalizeClass, normalizeStyle, toDisplayString, toHandlerKey } from "./main.es16.js";
|
6
6
|
const svgNS = "http://www.w3.org/2000/svg";
|
7
7
|
const doc = typeof document !== "undefined" ? document : null;
|
8
8
|
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
package/dist/main.es6.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, isProxy, computed as computed$1, pauseTracking, resetTracking, isReadonly, track, proxyRefs, markRaw, shallowReadonly, EffectScope, reactive, shallowReactive, trigger } from "./main.
|
2
|
-
import { readonly, ref, shallowRef, unref } from "./main.
|
3
|
-
import { isString, isFunction, getGlobalThis, isArray, NOOP, EMPTY_OBJ, normalizeClass, isObject, extend, normalizeStyle, isOn, isPromise, hasChanged, remove, isSet, isMap, isPlainObject, camelize, capitalize, toHandlerKey, hasOwn, EMPTY_ARR, NO, isBuiltInDirective, isReservedProp, invokeArrayFns, makeMap, looseToNumber, hyphenate, def, toRawType, isModelListener } from "./main.
|
4
|
-
import { toDisplayString } from "./main.
|
1
|
+
import { isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, isProxy, computed as computed$1, pauseTracking, resetTracking, isReadonly, track, proxyRefs, markRaw, shallowReadonly, EffectScope, reactive, shallowReactive, trigger } from "./main.es18.js";
|
2
|
+
import { readonly, ref, shallowRef, unref } from "./main.es18.js";
|
3
|
+
import { isString, isFunction, getGlobalThis, isArray, NOOP, EMPTY_OBJ, normalizeClass, isObject, extend, normalizeStyle, isOn, isPromise, hasChanged, remove, isSet, isMap, isPlainObject, camelize, capitalize, toHandlerKey, hasOwn, EMPTY_ARR, NO, isBuiltInDirective, isReservedProp, invokeArrayFns, makeMap, looseToNumber, hyphenate, def, toRawType, isModelListener } from "./main.es16.js";
|
4
|
+
import { toDisplayString } from "./main.es16.js";
|
5
5
|
const stack = [];
|
6
6
|
function pushWarningContext(vnode) {
|
7
7
|
stack.push(vnode);
|
package/dist/main.es9.js
CHANGED
package/package.json
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
<!-- For stacked bar chart -->
|
23
23
|
<template v-if="seriesData.length">
|
24
24
|
<InputRow
|
25
|
-
v-for="series in seriesData"
|
25
|
+
v-for="(series, seriesIndex) in seriesData"
|
26
26
|
:key="series.name"
|
27
27
|
:data-series-name="series.name"
|
28
28
|
>
|
@@ -36,8 +36,10 @@
|
|
36
36
|
:allow-negative="false"
|
37
37
|
:default-number="0"
|
38
38
|
:disabled="isInputsDisabled"
|
39
|
+
:error-message="getInputErrorMessage(series.data, item.label)"
|
39
40
|
input-height="36px"
|
40
41
|
:is-disabled-styled-only="true"
|
42
|
+
:is-error="getIsError(series.data, item.label)"
|
41
43
|
:is-info-border="
|
42
44
|
fieldMode === 'percentage'
|
43
45
|
? calculatePercentageTotal(item.label) !== 100
|
@@ -117,8 +119,10 @@
|
|
117
119
|
<InputNumber
|
118
120
|
:allow-negative="false"
|
119
121
|
:disabled="isInputsDisabled"
|
122
|
+
:error-message="item.errorMessage"
|
120
123
|
input-height="36px"
|
121
124
|
:is-disabled-styled-only="true"
|
125
|
+
:is-error="item.isError"
|
122
126
|
:min-decimals="0"
|
123
127
|
:number-precision="0"
|
124
128
|
text-align="center"
|
@@ -142,6 +146,11 @@
|
|
142
146
|
</InfoCardBody>
|
143
147
|
</InfoCard>
|
144
148
|
</InfoCardContainer>
|
149
|
+
<InfoCardContainer v-if="hasInputErrors" :y-axis-width="yAxisWidth">
|
150
|
+
<InfoCard align-items="center" type="error_minor">
|
151
|
+
<InfoCardBody> {{ inputErrorMessage }} </InfoCardBody>
|
152
|
+
</InfoCard>
|
153
|
+
</InfoCardContainer>
|
145
154
|
</template>
|
146
155
|
|
147
156
|
<script setup>
|
@@ -204,6 +213,10 @@
|
|
204
213
|
type: String,
|
205
214
|
default: '',
|
206
215
|
},
|
216
|
+
inputErrorMessage: {
|
217
|
+
type: String,
|
218
|
+
default: '',
|
219
|
+
},
|
207
220
|
})
|
208
221
|
|
209
222
|
const seriesData = ref([])
|
@@ -229,6 +242,8 @@
|
|
229
242
|
label: d.label,
|
230
243
|
value: d.value,
|
231
244
|
percentage: d.percentage,
|
245
|
+
isError: d.isError,
|
246
|
+
errorMessage: d.errorMessage,
|
232
247
|
originalValue: currentSeriesData.length
|
233
248
|
? currentSeriesData[itemIndex].data[dIndex].originalValue
|
234
249
|
: d.value,
|
@@ -275,7 +290,7 @@
|
|
275
290
|
}
|
276
291
|
}
|
277
292
|
|
278
|
-
const getDisplayValue = (data, label
|
293
|
+
const getDisplayValue = (data, label) => {
|
279
294
|
if (props.fieldMode === 'absolute') {
|
280
295
|
return data.find((d) => d.label === label)?.value
|
281
296
|
}
|
@@ -283,6 +298,13 @@
|
|
283
298
|
return data.find((d) => d.label === label)?.percentage
|
284
299
|
}
|
285
300
|
|
301
|
+
const getIsError = (data, label) => {
|
302
|
+
return data.find((d) => d.label === label)?.isError
|
303
|
+
}
|
304
|
+
const getInputErrorMessage = (data, label) => {
|
305
|
+
return data.find((d) => d.label === label)?.errorMessage
|
306
|
+
}
|
307
|
+
|
286
308
|
const calculatePercentageTotal = (label) => {
|
287
309
|
const percentageTotal = seriesData.value.reduce((sum, series) => {
|
288
310
|
const percentage =
|
@@ -336,6 +358,14 @@
|
|
336
358
|
return calculatePercentageTotal(d.label) !== 100
|
337
359
|
})
|
338
360
|
})
|
361
|
+
const hasInputErrors = computed(() => {
|
362
|
+
if (seriesData.value.length) {
|
363
|
+
return seriesData.value.some((serie) =>
|
364
|
+
serie.data.some((item) => item.isError)
|
365
|
+
)
|
366
|
+
}
|
367
|
+
return props.data.some((item) => item.isError)
|
368
|
+
})
|
339
369
|
|
340
370
|
const handleFieldsScroll = (event) => {
|
341
371
|
emit('sync-scroll', event.target.scrollLeft)
|
@@ -166,6 +166,7 @@
|
|
166
166
|
:is-inputs-disabled="isLoading"
|
167
167
|
:is-scrollable="isScrollable"
|
168
168
|
:percentage-error-message="percentageErrorMessage"
|
169
|
+
:input-error-message="inputErrorMessage"
|
169
170
|
:series="series"
|
170
171
|
:y-axis-width="yAxisWidth"
|
171
172
|
@input-blur="handleInputBlur"
|
@@ -307,6 +308,10 @@
|
|
307
308
|
type: String,
|
308
309
|
default: '',
|
309
310
|
},
|
311
|
+
inputErrorMessage: {
|
312
|
+
type: String,
|
313
|
+
default: '',
|
314
|
+
},
|
310
315
|
})
|
311
316
|
|
312
317
|
const generateChartId = () =>
|
@@ -50,6 +50,7 @@
|
|
50
50
|
numberCount
|
51
51
|
}}</NumberText>
|
52
52
|
</NumberContainer>
|
53
|
+
<BetaTag v-if="isBeta" :is-disabled="isDisabled"> Beta </BetaTag>
|
53
54
|
</ButtonWrapper>
|
54
55
|
</PageContainer>
|
55
56
|
</template>
|
@@ -70,7 +71,9 @@
|
|
70
71
|
import styled from 'vue3-styled-components'
|
71
72
|
import Theme from '@/assets/theme'
|
72
73
|
|
73
|
-
const PageContainer = styled.div
|
74
|
+
const PageContainer = styled.div`
|
75
|
+
position: relative;
|
76
|
+
`
|
74
77
|
|
75
78
|
const ButtonAttrs = {
|
76
79
|
type: String,
|
@@ -200,6 +203,23 @@
|
|
200
203
|
background-color: ${(props) => props.theme.semanticColors.purple[50]};
|
201
204
|
`
|
202
205
|
|
206
|
+
const BetaTag = styled('div', { isDisabled: Boolean })`
|
207
|
+
position: absolute;
|
208
|
+
top: -5px;
|
209
|
+
right: -8px;
|
210
|
+
padding: 4px;
|
211
|
+
border-radius: 4px;
|
212
|
+
font-size: 10px;
|
213
|
+
background-color: ${(props) =>
|
214
|
+
props.isDisabled
|
215
|
+
? props.theme.colors.disabled
|
216
|
+
: props.theme.semanticColors.red[500]};
|
217
|
+
color: ${(props) => props.theme.colors.white};
|
218
|
+
font-weight: 700;
|
219
|
+
transform: rotate(20deg);
|
220
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
221
|
+
`
|
222
|
+
|
203
223
|
export default {
|
204
224
|
name: 'ButtonIcon',
|
205
225
|
components: {
|
@@ -210,6 +230,7 @@
|
|
210
230
|
Icon,
|
211
231
|
NumberContainer,
|
212
232
|
NumberText,
|
233
|
+
BetaTag,
|
213
234
|
},
|
214
235
|
props: {
|
215
236
|
type: {
|
@@ -293,6 +314,10 @@
|
|
293
314
|
type: String,
|
294
315
|
default: 'auto',
|
295
316
|
},
|
317
|
+
isBeta: {
|
318
|
+
type: Boolean,
|
319
|
+
default: false,
|
320
|
+
},
|
296
321
|
},
|
297
322
|
data() {
|
298
323
|
return {
|
@@ -7,11 +7,13 @@
|
|
7
7
|
:data-id="dataId"
|
8
8
|
:data-qa-id="dataQaId"
|
9
9
|
:height="height"
|
10
|
+
:is-active="isActive"
|
10
11
|
:is-disabled="isDisabled"
|
11
12
|
:min-width="minWidth"
|
12
13
|
:no-wrap="noWrap"
|
13
14
|
:type="type"
|
14
15
|
:variant="variant"
|
16
|
+
:width="width"
|
15
17
|
>
|
16
18
|
<LabelComponent :has-icon="Boolean(icon)">
|
17
19
|
<Icon
|
@@ -21,7 +23,7 @@
|
|
21
23
|
:name="icon"
|
22
24
|
size="14px"
|
23
25
|
/>
|
24
|
-
{{
|
26
|
+
{{ text }}
|
25
27
|
</LabelComponent>
|
26
28
|
</ButtonContainer>
|
27
29
|
</PageContainer>
|
@@ -50,11 +52,13 @@
|
|
50
52
|
type: String,
|
51
53
|
isDisabled: Boolean,
|
52
54
|
minWidth: String,
|
55
|
+
width: String,
|
53
56
|
noWrap: Boolean,
|
54
57
|
height: String,
|
55
58
|
variant: String,
|
56
59
|
buttonSize: String,
|
57
60
|
appTheme: String,
|
61
|
+
isActive: Boolean,
|
58
62
|
}
|
59
63
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
60
64
|
display: flex;
|
@@ -73,6 +77,9 @@
|
|
73
77
|
props.isDisabled
|
74
78
|
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
75
79
|
.disabled.backgroundColor
|
80
|
+
: props.isActive
|
81
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
82
|
+
.active.backgroundColor
|
76
83
|
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
77
84
|
.default.backgroundColor};
|
78
85
|
border: ${(props) => {
|
@@ -91,7 +98,7 @@
|
|
91
98
|
${(props) => (props.noWrap ? `white-space: nowrap;` : '')};
|
92
99
|
height: ${(props) => props.height};
|
93
100
|
line-height: 1;
|
94
|
-
|
101
|
+
width: ${(props) => props.width};
|
95
102
|
&:hover {
|
96
103
|
background-color: ${(props) =>
|
97
104
|
props.isDisabled
|
@@ -170,6 +177,11 @@
|
|
170
177
|
default: false,
|
171
178
|
type: Boolean,
|
172
179
|
},
|
180
|
+
isActive: {
|
181
|
+
required: false,
|
182
|
+
default: false,
|
183
|
+
type: Boolean,
|
184
|
+
},
|
173
185
|
icon: {
|
174
186
|
required: false,
|
175
187
|
default: null,
|
@@ -204,6 +216,11 @@
|
|
204
216
|
default: null,
|
205
217
|
type: String,
|
206
218
|
},
|
219
|
+
width: {
|
220
|
+
required: false,
|
221
|
+
default: 'auto',
|
222
|
+
type: String,
|
223
|
+
},
|
207
224
|
height: {
|
208
225
|
required: false,
|
209
226
|
default: 'auto',
|
@@ -231,10 +248,6 @@
|
|
231
248
|
default: 'medium',
|
232
249
|
required: false,
|
233
250
|
},
|
234
|
-
isFirstLetterCapitalized: {
|
235
|
-
type: Boolean,
|
236
|
-
default: false,
|
237
|
-
},
|
238
251
|
},
|
239
252
|
computed: {
|
240
253
|
theme() {
|
@@ -250,10 +263,5 @@
|
|
250
263
|
.default.textColor
|
251
264
|
},
|
252
265
|
},
|
253
|
-
methods: {
|
254
|
-
capitalizeFirstLetter(word) {
|
255
|
-
return word.charAt(0).toUpperCase() + word.slice(1)
|
256
|
-
},
|
257
|
-
},
|
258
266
|
}
|
259
267
|
</script>
|
@@ -49,7 +49,10 @@
|
|
49
49
|
<slot name="trigger"></slot>
|
50
50
|
</IconWrapper>
|
51
51
|
</div>
|
52
|
-
<Teleport
|
52
|
+
<Teleport
|
53
|
+
v-if="!hideInfoText && isVisible && (!!text || $slots.default)"
|
54
|
+
to="body"
|
55
|
+
>
|
53
56
|
<TextWrapper data-test-id="info_text_wrapper" :style="wrapperStyle">
|
54
57
|
<TextOverlay
|
55
58
|
ref="infoBox"
|
@@ -799,6 +799,10 @@
|
|
799
799
|
type: Boolean,
|
800
800
|
default: false,
|
801
801
|
},
|
802
|
+
hasSpaceBetweenUnit: {
|
803
|
+
type: Boolean,
|
804
|
+
default: true,
|
805
|
+
},
|
802
806
|
},
|
803
807
|
data() {
|
804
808
|
return {
|
@@ -812,8 +816,12 @@
|
|
812
816
|
displayedPlaceholder() {
|
813
817
|
if (this.placeholder) return this.placeholder
|
814
818
|
if (this.defaultNumber)
|
815
|
-
return `${this.defaultNumber}
|
816
|
-
|
819
|
+
return `${this.defaultNumber}${this.hasSpaceBetweenUnit ? ' ' : ''}${
|
820
|
+
this.unitName ? this.unitName : ''
|
821
|
+
}`
|
822
|
+
return `${this.minNumber || 0}${this.hasSpaceBetweenUnit ? ' ' : ''}${
|
823
|
+
this.unitName ? this.unitName : ''
|
824
|
+
}`
|
817
825
|
},
|
818
826
|
hasSlot() {
|
819
827
|
return !!this.$slots.default
|
@@ -1027,8 +1035,9 @@
|
|
1027
1035
|
return
|
1028
1036
|
}
|
1029
1037
|
this.textInput = this.formatWithCurrency(this.value)
|
1038
|
+
const textInputWithoutUnit = this.formatWithoutUnit(this.value)
|
1030
1039
|
this.enteredValue = stringToNumber({
|
1031
|
-
value:
|
1040
|
+
value: textInputWithoutUnit,
|
1032
1041
|
numberPrecision: this.numberPrecision,
|
1033
1042
|
minDecimals: this.minDecimals,
|
1034
1043
|
})
|
@@ -1049,6 +1058,38 @@
|
|
1049
1058
|
this.$refs.inputField1.$el.blur()
|
1050
1059
|
})
|
1051
1060
|
},
|
1061
|
+
formatWithoutUnit(value) {
|
1062
|
+
let adjustedMinValue =
|
1063
|
+
value || value === 0
|
1064
|
+
? value
|
1065
|
+
: this.defaultNumber
|
1066
|
+
? this.defaultNumber
|
1067
|
+
: this.minNumber || this.minNumber === 0
|
1068
|
+
? this.minNumber
|
1069
|
+
: ''
|
1070
|
+
if (adjustedMinValue || adjustedMinValue === 0) {
|
1071
|
+
let input = this.numberToStringEnabled
|
1072
|
+
? numberToString({
|
1073
|
+
value: adjustedMinValue,
|
1074
|
+
numberPrecision: this.numberPrecision,
|
1075
|
+
minDecimals: this.minDecimals,
|
1076
|
+
})
|
1077
|
+
: adjustedMinValue
|
1078
|
+
return input
|
1079
|
+
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
1080
|
+
return ''
|
1081
|
+
} else if (this.isFocused) {
|
1082
|
+
return value
|
1083
|
+
} else {
|
1084
|
+
return this.numberToStringEnabled
|
1085
|
+
? numberToString({
|
1086
|
+
value: adjustedMinValue,
|
1087
|
+
numberPrecision: this.numberPrecision,
|
1088
|
+
minDecimals: this.minDecimals,
|
1089
|
+
})
|
1090
|
+
: adjustedMinValue
|
1091
|
+
}
|
1092
|
+
},
|
1052
1093
|
formatWithCurrency(value) {
|
1053
1094
|
let adjustedMinValue =
|
1054
1095
|
value || value === 0
|
@@ -1069,7 +1110,7 @@
|
|
1069
1110
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
1070
1111
|
//return input + ' ' + unit
|
1071
1112
|
if (unit) {
|
1072
|
-
return input
|
1113
|
+
return `${input}${this.hasSpaceBetweenUnit ? ' ' : ''}${unit}`
|
1073
1114
|
}
|
1074
1115
|
return input
|
1075
1116
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|