@eturnity/eturnity_reusable_components 8.40.6 → 8.40.8--EPDM-16195.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.es26.js CHANGED
@@ -1,26 +1,261 @@
1
- import styled from "./main.es7.js";
2
1
  import "./main.es3.js";
3
- import _export_sfc from "./main.es11.js";
4
- import { resolveComponent, openBlock, createBlock, withCtx, createTextVNode } from "./main.es6.js";
5
- const StarElement = styled.span`
2
+ import styled from "./main.es7.js";
3
+ import { fetchIcon } from "./main.es27.js";
4
+ import { rotateSvg } from "./main.es28.js";
5
+ import { reactive } from "./main.es18.js";
6
+ import { computed, onMounted, watch, openBlock, createBlock, withCtx, createVNode, createElementVNode as createBaseVNode, createTextVNode, createCommentVNode } from "./main.es6.js";
7
+ import { toDisplayString } from "./main.es16.js";
8
+ const _hoisted_1 = ["innerHTML"];
9
+ const _sfc_main = {
10
+ __name: "index",
11
+ props: {
12
+ disabled: {
13
+ required: false,
14
+ default: false,
15
+ type: Boolean
16
+ },
17
+ name: {
18
+ required: true,
19
+ type: String
20
+ },
21
+ color: {
22
+ required: false,
23
+ default: null,
24
+ type: String
25
+ },
26
+ hoveredColor: {
27
+ required: false,
28
+ default: null,
29
+ type: String
30
+ },
31
+ size: {
32
+ required: false,
33
+ default: "30px",
34
+ type: String
35
+ },
36
+ width: {
37
+ type: String,
38
+ required: false,
39
+ default: ""
40
+ },
41
+ height: {
42
+ type: String,
43
+ required: false,
44
+ default: ""
45
+ },
46
+ cursor: {
47
+ required: false,
48
+ default: null,
49
+ type: String
50
+ },
51
+ isStriked: {
52
+ required: false,
53
+ default: false,
54
+ type: Boolean
55
+ },
56
+ backgroundColor: {
57
+ required: false,
58
+ default: null,
59
+ type: String
60
+ },
61
+ count: {
62
+ required: false,
63
+ default: 0,
64
+ type: Number
65
+ },
66
+ animation: {
67
+ required: false,
68
+ default: "none",
69
+ type: String
70
+ },
71
+ fillType: {
72
+ required: false,
73
+ default: "fill",
74
+ type: String
75
+ },
76
+ disableHover: {
77
+ type: Boolean,
78
+ default: false
79
+ },
80
+ showCount: {
81
+ type: Boolean,
82
+ default: false
83
+ },
84
+ svgRotation: {
85
+ type: Number,
86
+ default: null
87
+ }
88
+ },
89
+ setup(__props) {
90
+ const props = __props;
91
+ const Wrapper = styled("div", {
92
+ height: String,
93
+ width: String,
94
+ disabled: Boolean,
95
+ cursor: String
96
+ })`
97
+ display: flex;
98
+ position: relative;
99
+ align-content: center;
100
+ justify-content: center;
101
+ width: ${(props2) => props2.width};
102
+ height: ${(props2) => props2.height};
103
+ min-width: ${(props2) => props2.width};
104
+ min-height: ${(props2) => props2.height};
105
+ cursor: ${(props2) => props2.disabled ? "not-allowed" : props2.cursor};
106
+ line-height: 0;
107
+ `;
108
+ const CountWrapper = styled("div")`
109
+ position: absolute;
110
+ top: -7px;
111
+ right: -7px;
112
+ background-color: ${({
113
+ theme
114
+ }) => theme.colors.red};
6
115
  color: ${({
7
- theme
8
- }) => theme.colors.red};
116
+ theme
117
+ }) => theme.colors.white};
118
+ border-radius: 100%;
119
+ width: 15px;
120
+ height: 15px;
121
+ display: flex;
122
+ justify-content: center;
123
+ align-items: center;
124
+ font-size: 10px;
9
125
  `;
10
- const _sfc_main = {
11
- name: "IsRequiredLabelStar",
12
- components: {
13
- StarElement
126
+ const StrikedLine = styled("div", {
127
+ color: String
128
+ })`
129
+ display: flex;
130
+ position: absolute;
131
+ bottom: 0;
132
+ left: 0;
133
+ align-content: center;
134
+ justify-content: center;
135
+ width: 143%;
136
+ height: 8%;
137
+ background-color: ${({
138
+ theme,
139
+ color
140
+ }) => theme.colors[color] || color};
141
+ min-height: 0;
142
+ line-height: 0;
143
+ transform-origin: 0% 100%;
144
+ transform: rotate(-45deg);
145
+ `;
146
+ const IconImageAttrs = {
147
+ color: String,
148
+ backgroundColor: String,
149
+ hoveredColor: String,
150
+ animation: String,
151
+ fillType: String,
152
+ disableHover: Boolean,
153
+ showCount: Boolean
154
+ };
155
+ const IconImage = styled("div", IconImageAttrs)`
156
+ animation: ${(props2) => props2.animation};
157
+ width: 100%;
158
+ svg {
159
+ width: 100%;
160
+ height: 100%;
161
+ background-color: ${(props2) => props2.backgroundColor ? props2.backgroundColor : "transparent"};
162
+ padding: ${(props2) => props2.backgroundColor ? "3px" : "0"};
163
+ border-radius: ${(props2) => props2.showCount ? "8px 0 0 8px" : props2.backgroundColor ? "8px" : "0"};
164
+ }
165
+ svg path:not(.fix, .isStrokePath) {
166
+ ${({
167
+ theme,
168
+ color,
169
+ fillType
170
+ }) => color && `${fillType}: ${theme.colors[color] || color};`}
171
+ }
172
+ svg .isStroke {
173
+ ${({
174
+ theme,
175
+ color
176
+ }) => color && `stroke: ${theme.colors[color] || color};`}
177
+ }
178
+ svg .isFill {
179
+ ${({
180
+ theme,
181
+ color
182
+ }) => color && `fill: ${theme.colors[color] || color};`}
183
+ }
184
+ svg .isStrokePath:not(.fix) {
185
+ ${({
186
+ theme,
187
+ color
188
+ }) => color && `stroke: ${theme.colors[color] || color};`}
189
+ }
190
+ ${(props2) => !props2.disableHover && `
191
+ &:hover svg path:not(.fix, .isStrokePath) {
192
+ ${`${props2.fillType}: ${props2.theme.colors[props2.hoveredColor] || props2.color};`}
193
+ &:hover svg isStrokePath:not(.fix) {
194
+ ${`stroke: ${props2.theme.colors[props2.hoveredColor] || props2.color};`}
195
+ }
196
+ &:hover + div {
197
+ background-color: ${props2.hoveredColor};
198
+ }
199
+ `}
200
+
201
+ @keyframes fade {
202
+ 50% {
203
+ opacity: 0.3;
204
+ }
205
+ }
206
+ `;
207
+ const icon = reactive({
208
+ html: ""
209
+ });
210
+ const loadSvg = async () => {
211
+ let svgString = await fetchIcon(props.name.toLowerCase());
212
+ if (props.svgRotation)
213
+ svgString = rotateSvg(svgString, props.svgRotation);
214
+ icon.html = svgString;
215
+ };
216
+ const counter = computed(() => props.count > 9 ? "9+" : props.count.toString());
217
+ onMounted(() => loadSvg());
218
+ watch(() => props.name, loadSvg);
219
+ watch(() => props.svgRotation, loadSvg);
220
+ return (_ctx, _cache) => {
221
+ return openBlock(), createBlock(Wrapper, {
222
+ cursor: __props.cursor,
223
+ "data-test-id": "icon_wrapper",
224
+ disabled: __props.disabled,
225
+ height: __props.height ? __props.height : __props.size,
226
+ width: __props.width ? __props.width : __props.size
227
+ }, {
228
+ default: withCtx(() => [createVNode(IconImage, {
229
+ animation: __props.animation,
230
+ "background-color": __props.backgroundColor,
231
+ color: __props.color,
232
+ "data-test-id": "icon_image",
233
+ "disable-hover": __props.disableHover,
234
+ "fill-type": __props.fillType,
235
+ "hovered-color": __props.hoveredColor,
236
+ "show-count": __props.showCount
237
+ }, {
238
+ default: withCtx(() => [createBaseVNode("i", {
239
+ "data-test-id": "icon_svg",
240
+ innerHTML: icon.html
241
+ }, null, 8, _hoisted_1)]),
242
+ _: 1
243
+ }, 8, ["animation", "background-color", "color", "disable-hover", "fill-type", "hovered-color", "show-count"]), createTextVNode(), __props.isStriked ? (openBlock(), createBlock(StrikedLine, {
244
+ key: 0,
245
+ color: __props.color,
246
+ "data-test-id": "icon_striked_line"
247
+ }, null, 8, ["color"])) : createCommentVNode("", true), createTextVNode(), __props.count > 0 ? (openBlock(), createBlock(CountWrapper, {
248
+ key: 1,
249
+ "data-test-id": "icon_count"
250
+ }, {
251
+ default: withCtx(() => [createTextVNode(toDisplayString(counter.value), 1)]),
252
+ _: 1
253
+ })) : createCommentVNode("", true)]),
254
+ _: 1
255
+ }, 8, ["cursor", "disabled", "height", "width"]);
256
+ };
14
257
  }
15
258
  };
16
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17
- const _component_StarElement = resolveComponent("StarElement");
18
- return openBlock(), createBlock(_component_StarElement, null, {
19
- default: withCtx(() => [createTextVNode("*")]),
20
- _: 1
21
- });
22
- }
23
- const IsRequiredLabelStar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
24
259
  export {
25
- IsRequiredLabelStar as default
260
+ _sfc_main as default
26
261
  };
@@ -1,5 +1,5 @@
1
1
  import styled from "./main.es7.js";
2
- import _sfc_main$1 from "./main.es17.js";
2
+ import _sfc_main$1 from "./main.es26.js";
3
3
  import theme from "./main.es8.js";
4
4
  import "./main.es3.js";
5
5
  import _export_sfc from "./main.es11.js";
package/dist/main.es6.js CHANGED
@@ -1,5 +1,5 @@
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.es19.js";
2
- import { readonly, ref, shallowRef, unref } from "./main.es19.js";
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
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
4
  import { toDisplayString } from "./main.es16.js";
5
5
  const stack = [];
package/dist/main.es9.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import styled from "./main.es7.js";
2
- import _sfc_main$1 from "./main.es17.js";
2
+ import _sfc_main$1 from "./main.es26.js";
3
3
  import theme from "./main.es8.js";
4
4
  import "./main.es3.js";
5
5
  import _export_sfc from "./main.es11.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.40.6",
3
+ "version": "8.40.8--EPDM-16195.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -1,19 +1,5 @@
1
1
  <template>
2
2
  <Container :is-chart-controls-shown-in-bottom="isChartControlsShownInBottom">
3
- <LabelsColumn :width="yAxisWidth">
4
- <LabelRow v-for="series in seriesData" :key="series.name">
5
- {{ series.name }}
6
- </LabelRow>
7
- <TotalRow v-if="seriesData.length && fieldMode === 'percentage'">
8
- {{ $gettext ? `${$gettext('loadprofile_total')} (%)` : 'Total (%)' }}
9
- </TotalRow>
10
- <TotalRow v-if="seriesData.length">
11
- {{
12
- $gettext ? `${$gettext('loadprofile_total')} (kWh)` : 'Total (kWh)'
13
- }}
14
- </TotalRow>
15
- </LabelsColumn>
16
-
17
3
  <FieldsContainer
18
4
  :class="`fields-container-${chartId}`"
19
5
  @scroll="handleFieldsScroll"
@@ -26,6 +12,11 @@
26
12
  :key="series.name"
27
13
  :data-series-name="series.name"
28
14
  >
15
+ <LabelsColumn :width="yAxisWidth">
16
+ <LabelRow>
17
+ {{ series.name }}
18
+ </LabelRow>
19
+ </LabelsColumn>
29
20
  <InputGroup
30
21
  v-for="(item, index) in props.data"
31
22
  :key="index"
@@ -60,6 +51,15 @@
60
51
  </InputRow>
61
52
 
62
53
  <TotalInputRow v-if="fieldMode === 'percentage'">
54
+ <LabelsColumn :width="yAxisWidth">
55
+ <TotalRow v-if="seriesData.length">
56
+ {{
57
+ $gettext
58
+ ? `${$gettext('loadprofile_total')} (%)`
59
+ : 'Total (%)'
60
+ }}
61
+ </TotalRow>
62
+ </LabelsColumn>
63
63
  <InputGroup
64
64
  v-for="(item, index) in props.data"
65
65
  :key="index"
@@ -83,6 +83,15 @@
83
83
  </TotalInputRow>
84
84
 
85
85
  <TotalInputRow>
86
+ <LabelsColumn :width="yAxisWidth">
87
+ <TotalRow v-if="seriesData.length">
88
+ {{
89
+ $gettext
90
+ ? `${$gettext('loadprofile_total')} (kWh)`
91
+ : 'Total (kWh)'
92
+ }}
93
+ </TotalRow>
94
+ </LabelsColumn>
86
95
  <InputGroup
87
96
  v-for="(item, index) in props.data"
88
97
  :key="index"
@@ -111,6 +120,7 @@
111
120
  <!-- For simple bar chart -->
112
121
  <template v-else>
113
122
  <InputRow>
123
+ <LabelsColumn :width="yAxisWidth" />
114
124
  <InputGroup
115
125
  v-for="(item, index) in props.data"
116
126
  :key="index"
@@ -60,7 +60,7 @@
60
60
  const getSpinnerSize = (size) => {
61
61
  switch (size) {
62
62
  case 'tiny':
63
- return '16px'
63
+ return '14px'
64
64
  case 'small':
65
65
  return '24px'
66
66
  case 'large':
@@ -54,9 +54,8 @@
54
54
 
55
55
  const TableTitle = styled.div`
56
56
  margin-bottom: 16px;
57
- font-weight: bold;
57
+ font-weight: 500;
58
58
  font-size: 14px;
59
- text-transform: uppercase;
60
59
  `
61
60
 
62
61
  const tableScrollProps = {
@@ -66,12 +65,6 @@
66
65
  const TableScroll = styled('div', tableScrollProps)`
67
66
  max-width: 100%;
68
67
  height: auto;
69
- ${(props) =>
70
- props.isPositionAbsolute &&
71
- `
72
- position: absolute;
73
- left: -20px;
74
- `}
75
68
  `
76
69
 
77
70
  const wrapperAttrs = { fullWidth: Boolean, isOverflowHidden: Boolean }
@@ -111,15 +104,24 @@
111
104
 
112
105
  const TableContainer = styled('table', containerAttrs)`
113
106
  width: 100%;
114
- border-collapse: collapse;
115
- border: none;
116
- font-size: 13px;
107
+ border-collapse: separate;
108
+ border-spacing: 0;
109
+ border-right: ${(props) =>
110
+ '1px solid ' + props.theme.semanticColors.grey[200]};
111
+ border-left: ${(props) =>
112
+ '1px solid ' + props.theme.semanticColors.grey[200]};
113
+ border-top: ${(props) =>
114
+ '1px solid ' + props.theme.semanticColors.grey[200]};
115
+ border-radius: 4px;
116
+ font-size: 12px;
117
117
 
118
118
  thead {
119
- font-weight: bold;
119
+ font-weight: 500;
120
+ line-height: 140%;
120
121
 
121
122
  tr {
122
123
  border-bottom: none !important;
124
+ background-color: ${(props) => props.theme.semanticColors.grey[100]};
123
125
  }
124
126
  }
125
127
 
@@ -128,6 +130,8 @@
128
130
  }
129
131
 
130
132
  tbody {
133
+ font-weight: 400;
134
+ line-height: 150%;
131
135
  tr {
132
136
  &:hover,
133
137
  td.hovered-column {
@@ -148,18 +152,25 @@
148
152
  }
149
153
 
150
154
  td {
151
- height: 40px;
155
+ height: 48px;
156
+ }
157
+
158
+ .drag-placeholder {
159
+ min-height: 48px;
160
+ min-width: 20px;
161
+ border-bottom: 1px solid
162
+ ${(props) => props.theme.semanticColors.grey[200]};
152
163
  }
153
164
  }
154
165
  }
155
166
 
156
167
  th {
157
- padding: 11px 15px;
168
+ padding: 8px 16px;
158
169
  background-color: ${(props) => props.theme.semanticColors.grey[100]};
159
170
  border-bottom: 1px solid
160
- ${(props) => props.theme.semanticColors.teal[100]};
171
+ ${(props) => props.theme.semanticColors.grey[200]};
161
172
  cursor: auto;
162
- height: 40px;
173
+ height: 36px;
163
174
  font-weight: 500;
164
175
 
165
176
  .ordering {
@@ -251,6 +262,10 @@
251
262
  visibility: hidden;
252
263
  }
253
264
 
265
+ &.footer {
266
+ background-color: ${(props) => props.theme.colors.grey5};
267
+ }
268
+
254
269
  &.footer,
255
270
  &.total-row {
256
271
  td {
@@ -283,6 +298,8 @@
283
298
  flex-wrap: nowrap;
284
299
  background-color: ${(props) => props.theme.colors.white};
285
300
  vertical-align: middle;
301
+ border-bottom: 1px solid
302
+ ${(props) => props.theme.semanticColors.grey[200]};
286
303
  }
287
304
 
288
305
  .arrow-container {
@@ -301,6 +318,11 @@
301
318
  .arrow-container {
302
319
  border-bottom: none;
303
320
  }
321
+
322
+ .drag-container,
323
+ .icons-container {
324
+ border-bottom: none !important;
325
+ }
304
326
  }
305
327
 
306
328
  &:hover {
@@ -326,12 +348,14 @@
326
348
  display: table-cell;
327
349
  width: 20px;
328
350
  min-width: 20px;
329
- height: 40px;
351
+ height: 48px;
352
+ border-bottom: ${(props) =>
353
+ '1px solid ' + props.theme.semanticColors.grey[200]};
330
354
  }
331
355
 
332
356
  .drag-wrapper {
333
357
  width: 16px;
334
- height: 36px;
358
+ height: 46px;
335
359
  display: grid;
336
360
  align-items: center;
337
361
  justify-items: center;
@@ -377,9 +401,9 @@
377
401
  }
378
402
 
379
403
  input {
380
- font-size: 13px;
404
+ font-size: 12px;
381
405
  padding: 5px 10px;
382
- background: #fff;
406
+ background: ${(props) => props.theme.colors.white};
383
407
  height: unset;
384
408
 
385
409
  &:focus {