@eturnity/eturnity_reusable_components 8.26.11-EPDM-11600.15 → 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 -212
- package/dist/main.es16.js +196 -21
- package/dist/main.es17.js +19 -1051
- package/dist/main.es18.js +1044 -215
- package/dist/main.es19.js +197 -69
- package/dist/main.es199.js +13 -7
- package/dist/main.es20.js +99 -2
- package/dist/main.es21.js +2 -541
- package/dist/main.es22.js +530 -188
- package/dist/main.es23.js +226 -60
- package/dist/main.es24.js +2 -2
- package/dist/main.es5.js +3 -3
- package/dist/main.es555.js +1 -1
- package/dist/main.es6.js +4 -4
- package/dist/main.es8.js +1 -1
- package/dist/main.es9.js +1 -1
- package/package.json +1 -1
- package/src/assets/svgIcons/erase.svg +3 -2
- package/src/assets/theme.js +1 -1
- package/src/components/barchart/BottomFields.vue +32 -2
- package/src/components/barchart/composables/useAxisCalculations.js +1 -4
- package/src/components/barchart/index.vue +7 -17
- package/src/components/barchart/styles/chart.js +20 -31
- package/src/components/buttons/buttonIcon/index.vue +26 -1
- package/src/components/buttons/mainButton/index.vue +18 -1
- package/src/components/infoText/index.vue +4 -1
- package/src/components/inputs/inputNumber/InputNumber.stories.js +5 -5
- package/src/components/inputs/inputNumber/index.vue +49 -7
- package/src/components/pageSubtitle/index.vue +1 -7
package/dist/main.es23.js
CHANGED
@@ -1,66 +1,232 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
return (str) => {
|
21
|
-
const hit = cache[str];
|
22
|
-
return hit || (cache[str] = fn(str));
|
23
|
-
};
|
1
|
+
import styled from "./main.es7.js";
|
2
|
+
import _sfc_main$1 from "./main.es24.js";
|
3
|
+
import theme from "./main.es8.js";
|
4
|
+
import "./main.es3.js";
|
5
|
+
import _export_sfc from "./main.es11.js";
|
6
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createCommentVNode, createTextVNode } from "./main.es6.js";
|
7
|
+
import { toDisplayString } from "./main.es16.js";
|
8
|
+
const PageContainer = styled.div``;
|
9
|
+
const ButtonAttrs = {
|
10
|
+
type: String,
|
11
|
+
isDisabled: Boolean,
|
12
|
+
minWidth: String,
|
13
|
+
width: String,
|
14
|
+
noWrap: Boolean,
|
15
|
+
height: String,
|
16
|
+
variant: String,
|
17
|
+
buttonSize: String,
|
18
|
+
appTheme: String,
|
19
|
+
isActive: Boolean
|
24
20
|
};
|
25
|
-
const
|
26
|
-
|
27
|
-
|
28
|
-
)
|
29
|
-
|
30
|
-
(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
21
|
+
const ButtonContainer = styled("div", ButtonAttrs)`
|
22
|
+
display: flex;
|
23
|
+
justify-content: center;
|
24
|
+
padding: ${(props) => {
|
25
|
+
var _a, _b, _c, _d;
|
26
|
+
return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.padding;
|
27
|
+
}};
|
28
|
+
font-size: ${(props) => {
|
29
|
+
var _a, _b, _c, _d;
|
30
|
+
return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.fontSize;
|
31
|
+
}};
|
32
|
+
color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.textColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.textColor};
|
33
|
+
background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.isActive ? props.theme.mainButton[props.appTheme][props.type][props.variant].active.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.backgroundColor};
|
34
|
+
border: ${(props) => {
|
35
|
+
const borderValue = props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.borderColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.borderColor;
|
36
|
+
return borderValue ? "1px solid " + borderValue : "none";
|
37
|
+
}};
|
38
|
+
border-radius: 4px;
|
39
|
+
text-align: center;
|
40
|
+
cursor: ${(props) => props.isDisabled ? "not-allowed" : "pointer"};
|
41
|
+
user-select: none;
|
42
|
+
${(props) => props.minWidth ? `min-width: ${props.minWidth};` : ""};
|
43
|
+
${(props) => props.noWrap ? `white-space: nowrap;` : ""};
|
44
|
+
height: ${(props) => props.height};
|
45
|
+
line-height: 1;
|
46
|
+
width: ${(props) => props.width};
|
47
|
+
&:hover {
|
48
|
+
background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].hover.backgroundColor};
|
49
|
+
}
|
50
|
+
|
51
|
+
&:active {
|
52
|
+
background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].active.backgroundColor};
|
53
|
+
}
|
54
|
+
`;
|
55
|
+
const AltAttrs = {
|
56
|
+
altStyle: Boolean,
|
57
|
+
color: String
|
36
58
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
59
|
+
styled("div", AltAttrs)`
|
60
|
+
background-color: ${(props) => props.color ? props.color : props.theme.colors.transparentWhite1};
|
61
|
+
padding: 7px;
|
62
|
+
height: 100%;
|
63
|
+
width: 30%;
|
64
|
+
justify-content: center;
|
65
|
+
display: flex;
|
66
|
+
align-items: center;
|
67
|
+
border-radius: 4px 0 0 4px;
|
68
|
+
color: ${(props) => props.theme.colors.white};
|
69
|
+
all: ${(props) => props.altStyle ? "" : "unset"};
|
70
|
+
`;
|
71
|
+
styled("span", AltAttrs)`
|
72
|
+
padding: ${(props) => props.altStyle ? "7px" : "0"};
|
73
|
+
all: ${(props) => props.altStyle ? "" : "unset"};
|
74
|
+
`;
|
75
|
+
const LabelAttrs = {
|
76
|
+
hasIcon: Boolean
|
77
|
+
};
|
78
|
+
const LabelComponent = styled("span", LabelAttrs)`
|
79
|
+
display: flex;
|
80
|
+
align-items: center;
|
81
|
+
justify-content: center;
|
82
|
+
gap: ${(props) => props.hasIcon ? "5px" : "0"};
|
83
|
+
`;
|
84
|
+
const _sfc_main = {
|
85
|
+
name: "MainButton",
|
86
|
+
components: {
|
87
|
+
Icon: _sfc_main$1,
|
88
|
+
LabelComponent,
|
89
|
+
PageContainer,
|
90
|
+
ButtonContainer
|
91
|
+
},
|
92
|
+
props: {
|
93
|
+
type: {
|
94
|
+
required: false,
|
95
|
+
default: "primary",
|
96
|
+
// primary, secondary, tertiary, ghost
|
97
|
+
type: String
|
98
|
+
},
|
99
|
+
variant: {
|
100
|
+
required: false,
|
101
|
+
default: "main",
|
102
|
+
// main, cancel
|
103
|
+
type: String
|
104
|
+
},
|
105
|
+
isDisabled: {
|
106
|
+
required: false,
|
107
|
+
default: false,
|
108
|
+
type: Boolean
|
109
|
+
},
|
110
|
+
isActive: {
|
111
|
+
required: false,
|
112
|
+
default: false,
|
113
|
+
type: Boolean
|
114
|
+
},
|
115
|
+
icon: {
|
116
|
+
required: false,
|
117
|
+
default: null,
|
118
|
+
type: String
|
119
|
+
},
|
120
|
+
iconColor: {
|
121
|
+
required: false,
|
122
|
+
default: "",
|
123
|
+
type: String
|
124
|
+
},
|
125
|
+
iconAltStyle: {
|
126
|
+
required: false,
|
127
|
+
default: false,
|
128
|
+
type: Boolean
|
129
|
+
},
|
130
|
+
iconAltStyleColor: {
|
131
|
+
required: false,
|
132
|
+
default: null,
|
133
|
+
type: String
|
134
|
+
},
|
135
|
+
text: {
|
136
|
+
required: true,
|
137
|
+
type: String
|
138
|
+
},
|
139
|
+
noWrap: {
|
140
|
+
required: false,
|
141
|
+
default: false,
|
142
|
+
type: Boolean
|
143
|
+
},
|
144
|
+
minWidth: {
|
145
|
+
required: false,
|
146
|
+
default: null,
|
147
|
+
type: String
|
148
|
+
},
|
149
|
+
width: {
|
150
|
+
required: false,
|
151
|
+
default: "auto",
|
152
|
+
type: String
|
153
|
+
},
|
154
|
+
height: {
|
155
|
+
required: false,
|
156
|
+
default: "auto",
|
157
|
+
type: String
|
158
|
+
},
|
159
|
+
id: {
|
160
|
+
required: false,
|
161
|
+
default: null,
|
162
|
+
type: String
|
163
|
+
},
|
164
|
+
dataId: {
|
165
|
+
type: String,
|
166
|
+
default: ""
|
167
|
+
},
|
168
|
+
dataQaId: {
|
169
|
+
type: String,
|
170
|
+
default: ""
|
171
|
+
},
|
172
|
+
appTheme: {
|
173
|
+
type: String,
|
174
|
+
default: "light"
|
175
|
+
},
|
176
|
+
buttonSize: {
|
177
|
+
type: String,
|
178
|
+
default: "medium",
|
179
|
+
required: false
|
180
|
+
}
|
181
|
+
},
|
182
|
+
computed: {
|
183
|
+
theme() {
|
184
|
+
return theme;
|
185
|
+
},
|
186
|
+
getIconColor() {
|
187
|
+
return this.isDisabled ? this.theme.mainButton[this.appTheme][this.type][this.variant].disabled.textColor : this.iconColor ? this.iconColor : this.theme.mainButton[this.appTheme][this.type][this.variant].default.textColor;
|
188
|
+
}
|
189
|
+
}
|
40
190
|
};
|
41
|
-
|
42
|
-
const
|
43
|
-
const
|
44
|
-
const
|
45
|
-
const
|
46
|
-
|
47
|
-
|
48
|
-
|
191
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
192
|
+
const _component_Icon = resolveComponent("Icon");
|
193
|
+
const _component_LabelComponent = resolveComponent("LabelComponent");
|
194
|
+
const _component_ButtonContainer = resolveComponent("ButtonContainer");
|
195
|
+
const _component_PageContainer = resolveComponent("PageContainer");
|
196
|
+
return openBlock(), createBlock(_component_PageContainer, null, {
|
197
|
+
default: withCtx(() => [createVNode(_component_ButtonContainer, {
|
198
|
+
id: $props.id,
|
199
|
+
"app-theme": $props.appTheme,
|
200
|
+
"button-size": $props.buttonSize,
|
201
|
+
"data-id": $props.dataId,
|
202
|
+
"data-qa-id": $props.dataQaId,
|
203
|
+
height: $props.height,
|
204
|
+
"is-active": $props.isActive,
|
205
|
+
"is-disabled": $props.isDisabled,
|
206
|
+
"min-width": $props.minWidth,
|
207
|
+
"no-wrap": $props.noWrap,
|
208
|
+
type: $props.type,
|
209
|
+
variant: $props.variant,
|
210
|
+
width: $props.width
|
211
|
+
}, {
|
212
|
+
default: withCtx(() => [createVNode(_component_LabelComponent, {
|
213
|
+
"has-icon": Boolean($props.icon)
|
214
|
+
}, {
|
215
|
+
default: withCtx(() => [$props.icon ? (openBlock(), createBlock(_component_Icon, {
|
216
|
+
key: 0,
|
217
|
+
color: $options.getIconColor,
|
218
|
+
"hovered-color": $options.getIconColor,
|
219
|
+
name: $props.icon,
|
220
|
+
size: "14px"
|
221
|
+
}, null, 8, ["color", "hovered-color", "name"])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString($props.text), 1)]),
|
222
|
+
_: 1
|
223
|
+
}, 8, ["has-icon"])]),
|
224
|
+
_: 1
|
225
|
+
}, 8, ["id", "app-theme", "button-size", "data-id", "data-qa-id", "height", "is-active", "is-disabled", "min-width", "no-wrap", "type", "variant", "width"])]),
|
226
|
+
_: 1
|
227
|
+
});
|
49
228
|
}
|
229
|
+
const RCButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
50
230
|
export {
|
51
|
-
|
52
|
-
extend,
|
53
|
-
hyphenate,
|
54
|
-
includeBooleanAttr,
|
55
|
-
invokeArrayFns,
|
56
|
-
isArray,
|
57
|
-
isFunction,
|
58
|
-
isHTMLTag,
|
59
|
-
isModelListener,
|
60
|
-
isOn,
|
61
|
-
isSVGTag,
|
62
|
-
isSpecialBooleanAttr,
|
63
|
-
isString,
|
64
|
-
looseToNumber,
|
65
|
-
makeMap
|
231
|
+
RCButton as default
|
66
232
|
};
|
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.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.es555.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const __vite_glob_0_174 = "data:image/svg+xml;base64,
|
1
|
+
const __vite_glob_0_174 = "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjE2IiB2aWV3Ym94PSIxMiAxMiAxNiAxNiIgd2lkdGg9IjE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSI3Ij48L2NpcmNsZT4KPHBhdGggZD0iTTI0Ljk1OTIgMTUuMDQwOEMyMi4yMzgyIDEyLjMxOTcgMTcuNzYxOCAxMi4zMTk3IDE1LjA0MDggMTUuMDQwOEMxMi4zMTk3IDE3Ljc2MTggMTIuMzE5NyAyMi4yMzgyIDE1LjA0MDggMjQuOTU5MkMxNy43NjE4IDI3LjY4MDMgMjIuMjM4MiAyNy42ODAzIDI0Ljk1OTIgMjQuOTU5MkMyNy42ODAzIDIyLjIzODIgMjcuNjgwMyAxNy44NDk1IDI0Ljk1OTIgMTUuMDQwOFpNMjMuNjQyNiAyMi41MDE2TDIyLjQxMzggMjMuNzMwNEwxOS45NTYxIDIxLjI3MjdMMTcuNDk4NCAyMy43MzA0TDE2LjI2OTYgMjIuNTAxNkwxOC43MjczIDIwLjA0MzlMMTYuMjY5NiAxNy41ODYyTDE3LjQ5ODQgMTYuMzU3NEwxOS45NTYxIDE4LjgxNUwyMi40MTM4IDE2LjM1NzRMMjMuNjQyNiAxNy41ODYyTDIxLjE4NSAyMC4wNDM5TDIzLjY0MjYgMjIuNTAxNloiIGZpbGw9IiNGRjU2NTYiPjwvcGF0aD4KPC9zdmc+Cg==";
|
2
2
|
export {
|
3
3
|
__vite_glob_0_174 as default
|
4
4
|
};
|
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.es8.js
CHANGED
@@ -342,7 +342,7 @@ const theme = (() => {
|
|
342
342
|
borderColor: semanticColors.grey[300]
|
343
343
|
},
|
344
344
|
active: {
|
345
|
-
backgroundColor: semanticColors.purple[
|
345
|
+
backgroundColor: semanticColors.purple[100],
|
346
346
|
textColor: semanticColors.purple[600],
|
347
347
|
borderColor: semanticColors.grey[600]
|
348
348
|
},
|
package/dist/main.es9.js
CHANGED
package/package.json
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
-
<svg
|
2
|
-
|
1
|
+
<svg fill="none" height="16" viewbox="12 12 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<circle cx="20" cy="20" r="7"></circle>
|
3
|
+
<path d="M24.9592 15.0408C22.2382 12.3197 17.7618 12.3197 15.0408 15.0408C12.3197 17.7618 12.3197 22.2382 15.0408 24.9592C17.7618 27.6803 22.2382 27.6803 24.9592 24.9592C27.6803 22.2382 27.6803 17.8495 24.9592 15.0408ZM23.6426 22.5016L22.4138 23.7304L19.9561 21.2727L17.4984 23.7304L16.2696 22.5016L18.7273 20.0439L16.2696 17.5862L17.4984 16.3574L19.9561 18.815L22.4138 16.3574L23.6426 17.5862L21.185 20.0439L23.6426 22.5016Z" fill="#FF5656"></path>
|
3
4
|
</svg>
|
package/src/assets/theme.js
CHANGED
@@ -333,7 +333,7 @@ const theme = (() => {
|
|
333
333
|
borderColor: semanticColors.grey[300],
|
334
334
|
},
|
335
335
|
active: {
|
336
|
-
backgroundColor: semanticColors.purple[
|
336
|
+
backgroundColor: semanticColors.purple[100],
|
337
337
|
textColor: semanticColors.purple[600],
|
338
338
|
borderColor: semanticColors.grey[600],
|
339
339
|
},
|
@@ -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)
|
@@ -68,10 +68,7 @@ export function useAxisCalculations(props, maxValue) {
|
|
68
68
|
// Generate labels including 0 up to numSteps
|
69
69
|
const numSteps = Math.floor(max / stepSize)
|
70
70
|
for (let i = 0; i <= numSteps; i++) {
|
71
|
-
|
72
|
-
const roundedStepValueString = stepValue.toFixed(2)
|
73
|
-
const roundedStepValueNumber = parseFloat(roundedStepValueString)
|
74
|
-
labels.push(roundedStepValueNumber)
|
71
|
+
labels.push(i * stepSize)
|
75
72
|
}
|
76
73
|
|
77
74
|
// Ensure we always have at least 2 labels (0 and max)
|
@@ -17,8 +17,8 @@
|
|
17
17
|
/>
|
18
18
|
</ChartControlsWrapper>
|
19
19
|
<GraphSection :height="height" :width="width">
|
20
|
-
<YAxis :width="yAxisWidth">
|
21
|
-
<YAxisTitleWrapper v-if="yAxisTitle">
|
20
|
+
<YAxis :height="height" :width="yAxisWidth">
|
21
|
+
<YAxisTitleWrapper v-if="yAxisTitle" :height="yAxisHeight">
|
22
22
|
{{ yAxisTitle }}
|
23
23
|
</YAxisTitleWrapper>
|
24
24
|
<YAxisRow
|
@@ -51,11 +51,6 @@
|
|
51
51
|
<LoadingOverlay v-if="isLoading">
|
52
52
|
<Spinner size="medium" />
|
53
53
|
</LoadingOverlay>
|
54
|
-
<InfoCardContainer v-else-if="isDataIssueMessageDisplayed">
|
55
|
-
<RCInfoCard align-items="center">
|
56
|
-
{{ dataIssueMessage }}
|
57
|
-
</RCInfoCard>
|
58
|
-
</InfoCardContainer>
|
59
54
|
<SelectionBox
|
60
55
|
v-if="selectionSize && isSelectionEnabled"
|
61
56
|
:bar-width="barWidth"
|
@@ -171,6 +166,7 @@
|
|
171
166
|
:is-inputs-disabled="isLoading"
|
172
167
|
:is-scrollable="isScrollable"
|
173
168
|
:percentage-error-message="percentageErrorMessage"
|
169
|
+
:input-error-message="inputErrorMessage"
|
174
170
|
:series="series"
|
175
171
|
:y-axis-width="yAxisWidth"
|
176
172
|
@input-blur="handleInputBlur"
|
@@ -187,7 +183,6 @@
|
|
187
183
|
import ChartControls from './ChartControls'
|
188
184
|
import BottomFields from './BottomFields'
|
189
185
|
import SelectionBox from './SelectionBox'
|
190
|
-
import RCInfoCard from '../infoCard'
|
191
186
|
import Spinner from '../spinner'
|
192
187
|
import { numberToString } from '../../helpers/numberConverter'
|
193
188
|
|
@@ -223,7 +218,6 @@
|
|
223
218
|
TooltipGradientBox,
|
224
219
|
ChartControlsWrapper,
|
225
220
|
LoadingOverlay,
|
226
|
-
InfoCardContainer,
|
227
221
|
} from './styles/chart'
|
228
222
|
|
229
223
|
const props = defineProps({
|
@@ -306,14 +300,6 @@
|
|
306
300
|
type: Boolean,
|
307
301
|
default: false,
|
308
302
|
},
|
309
|
-
dataIssueMessage: {
|
310
|
-
type: String,
|
311
|
-
default: '',
|
312
|
-
},
|
313
|
-
isDataIssueMessageDisplayed: {
|
314
|
-
type: Boolean,
|
315
|
-
default: false,
|
316
|
-
},
|
317
303
|
showPercentageOnTooltip: {
|
318
304
|
type: Boolean,
|
319
305
|
default: false,
|
@@ -322,6 +308,10 @@
|
|
322
308
|
type: String,
|
323
309
|
default: '',
|
324
310
|
},
|
311
|
+
inputErrorMessage: {
|
312
|
+
type: String,
|
313
|
+
default: '',
|
314
|
+
},
|
325
315
|
})
|
326
316
|
|
327
317
|
const generateChartId = () =>
|