@eturnity/eturnity_reusable_components 8.49.2-EPDM-16285.0 → 8.49.3-EPDM-17959.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.es9.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import styled from "./main.es7.js";
2
- import _sfc_main$1 from "./main.es15.js";
2
+ import _sfc_main$1 from "./main.es17.js";
3
3
  import theme from "./main.es8.js";
4
4
  import "./main.es3.js";
5
5
  import _export_sfc from "./main.es11.js";
@@ -39,6 +39,11 @@ const _sfc_main = {
39
39
  dataId: {
40
40
  type: String,
41
41
  default: ""
42
+ },
43
+ dataQaId: {
44
+ required: false,
45
+ default: "",
46
+ type: String
42
47
  }
43
48
  },
44
49
  computed: {
@@ -58,7 +63,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
63
  const _component_TextContainer = resolveComponent("TextContainer");
59
64
  const _component_TagContainer = resolveComponent("TagContainer");
60
65
  return openBlock(), createBlock(_component_TagContainer, {
61
- "data-id": $props.dataId
66
+ "data-id": $props.dataId,
67
+ "data-qa-id": $props.dataQaId
62
68
  }, {
63
69
  default: withCtx(() => [createVNode(_component_RcIcon, {
64
70
  color: $options.getIconColor,
@@ -70,7 +76,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
70
76
  _: 1
71
77
  })]),
72
78
  _: 1
73
- }, 8, ["data-id"]);
79
+ }, 8, ["data-id", "data-qa-id"]);
74
80
  }
75
81
  const ConversionTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
76
82
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.49.2-EPDM-16285.0",
3
+ "version": "8.49.3-EPDM-17959.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -1,5 +1,4 @@
1
1
  import Accordion from './index.vue'
2
- import theme from '@/assets/theme'
3
2
 
4
3
  export default {
5
4
  title: 'Accordion',
@@ -27,9 +26,6 @@ const Template = (args, { argTypes }) => ({
27
26
  </div>
28
27
  </template>
29
28
  </Accordion>`,
30
- provide: {
31
- theme,
32
- },
33
29
  })
34
30
 
35
31
  export const Default = Template.bind({})
@@ -25,9 +25,11 @@
25
25
  >
26
26
  <InputNumber
27
27
  :allow-negative="false"
28
+ :data-qa-id="processedDataQaId({label: item.label, series})"
28
29
  :default-number="0"
29
30
  :disabled="isInputsDisabled"
30
31
  :error-message="getInputErrorMessage(series.data, item.label)"
32
+ :input-data-id="processedDataId({label: item.label, series})"
31
33
  input-height="36px"
32
34
  :is-disabled-styled-only="true"
33
35
  :is-error="getIsError(series.data, item.label)"
@@ -37,6 +39,7 @@
37
39
  : false
38
40
  "
39
41
  :is-relative-error-message="true"
42
+ :label-data-id="`${processedDataId({label: item.label, series})}_label`"
40
43
  :min-decimals="0"
41
44
  :number-precision="fieldMode === 'percentage' ? 2 : 0"
42
45
  text-align="center"
@@ -68,11 +71,14 @@
68
71
  >
69
72
  <InputNumber
70
73
  :allow-negative="false"
74
+ :data-qa-id="processedDataQaId({label: item.label, series})"
71
75
  :default-number="0"
72
76
  :disabled="isInputsDisabled"
73
77
  input-height="36px"
74
78
  :is-disabled-styled-only="true"
75
79
  :is-read-only="true"
80
+ :input-data-id="processedDataId({label: item.label, series})"
81
+ :label-data-id="`${processedDataId({label: item.label, series})}_label`"
76
82
  :min-decimals="0"
77
83
  :number-precision="fieldMode === 'percentage' ? 2 : 0"
78
84
  text-align="center"
@@ -99,7 +105,9 @@
99
105
  :is-scrollable="isScrollable"
100
106
  >
101
107
  <InputNumber
108
+ :data-qa-id="processedDataQaId({label: item.label, series})"
102
109
  :default-number="0"
110
+ :input-data-id="processedDataId({label: item.label, series})"
103
111
  input-height="36px"
104
112
  :is-border-error-only="true"
105
113
  :is-info-border="
@@ -108,6 +116,7 @@
108
116
  : false
109
117
  "
110
118
  :is-read-only="true"
119
+ :label-data-id="`${processedDataId({label: item.label, series})}_label`"
111
120
  :min-decimals="0"
112
121
  :number-precision="0"
113
122
  text-align="center"
@@ -129,11 +138,14 @@
129
138
  >
130
139
  <InputNumber
131
140
  :allow-negative="false"
141
+ :data-qa-id="processedDataQaId({label: item.label})"
132
142
  :disabled="isInputsDisabled"
133
143
  :error-message="item.errorMessage"
144
+ :input-data-id="processedDataId({label: item.label})"
134
145
  input-height="36px"
135
146
  :is-disabled-styled-only="true"
136
147
  :is-error="item.isError"
148
+ :label-data-id="`${processedDataId({label: item.label})}_label`"
137
149
  :min-decimals="0"
138
150
  :number-precision="0"
139
151
  text-align="center"
@@ -232,6 +244,16 @@
232
244
  type: String,
233
245
  default: '',
234
246
  },
247
+ dataId: {
248
+ required: false,
249
+ default: '',
250
+ type: String,
251
+ },
252
+ dataQaId: {
253
+ required: false,
254
+ default: '',
255
+ type: String,
256
+ },
235
257
  })
236
258
 
237
259
  const seriesData = ref([])
@@ -386,6 +408,27 @@
386
408
  emit('sync-scroll', event.target.scrollLeft)
387
409
  }
388
410
 
411
+ const sanitizedStr = (rawSstr) => {
412
+ return rawSstr
413
+ .toLowerCase()
414
+ .replace(/:/g, '')
415
+ .replace(/[^a-z0-9_]+/g, '_')
416
+ }
417
+ const processedDataId = ({ label, series }) => {
418
+ let rawStr = `${props.dataId}_${label}`
419
+ if (series?.name) {
420
+ rawStr += `_${series.name}`
421
+ }
422
+ return sanitizedStr(rawStr)
423
+ }
424
+ const processedDataQaId = ({ label, series }) => {
425
+ let rawStr = `${props.dataQaId}_${label}`
426
+ if (series?.name) {
427
+ rawStr += `_${series.name}`
428
+ }
429
+ return sanitizedStr(rawStr)
430
+ }
431
+
389
432
  defineExpose({
390
433
  syncScroll,
391
434
  })
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Container :class="`barchart-${chartId}`" :width="width">
2
+ <Container :data-id="`${dataId}_chart`" :data-qa-id="`${dataQaId}_chart`" :class="`barchart-${chartId}`" :width="width">
3
3
  <ChartControlsWrapper
4
4
  v-if="isChartControlsShown('top')"
5
5
  :position="chartControlsPosition"
@@ -161,6 +161,8 @@
161
161
  :bar-width="barWidth"
162
162
  :chart-id="chartId"
163
163
  :data="data"
164
+ :data-id="dataId"
165
+ :data-qa-id="dataQaId"
164
166
  :field-mode="fieldMode"
165
167
  :is-chart-controls-shown-in-bottom="isChartControlsShown('bottom')"
166
168
  :is-inputs-disabled="isLoading"
@@ -312,6 +314,16 @@
312
314
  type: String,
313
315
  default: '',
314
316
  },
317
+ dataId: {
318
+ required: false,
319
+ default: '',
320
+ type: String,
321
+ },
322
+ dataQaId: {
323
+ required: false,
324
+ default: '',
325
+ type: String,
326
+ },
315
327
  })
316
328
 
317
329
  const generateChartId = () =>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Wrapper>
3
- <Container>
3
+ <Container :data-id="dataId" :data-qa-id="dataQaId">
4
4
  <LeftLine :color="color" />
5
5
  <RightLine :color="color" />
6
6
  </Container>
@@ -57,6 +57,16 @@
57
57
  required: false,
58
58
  default: '',
59
59
  },
60
+ dataId: {
61
+ required: false,
62
+ default: '',
63
+ type: String,
64
+ },
65
+ dataQaId: {
66
+ required: false,
67
+ default: '',
68
+ type: String,
69
+ },
60
70
  },
61
71
  }
62
72
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Wrapper :is-disabled="isDisabled">
2
+ <Wrapper :data-id="dataId" :data-qa-id="dataQaId" :is-disabled="isDisabled">
3
3
  <DeleteIconRed class="icon-red" :hover-bg="hoverBg" />
4
4
  <DeleteIconGray class="icon-gray" />
5
5
  </Wrapper>
@@ -73,6 +73,16 @@
73
73
  required: false,
74
74
  default: '',
75
75
  },
76
+ dataId: {
77
+ required: false,
78
+ default: '',
79
+ type: String,
80
+ },
81
+ dataQaId: {
82
+ required: false,
83
+ default: '',
84
+ type: String,
85
+ },
76
86
  },
77
87
  }
78
88
  </script>
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <PageContainer
3
3
  ref="container"
4
+ :data-id="dataId"
5
+ :data-qa-id="dataQaId"
4
6
  data-test-id="infoText_container"
5
7
  :type="type"
6
8
  @click=";(isMobile || openTrigger === 'onClick') && toggleInfo()"
@@ -329,6 +331,16 @@
329
331
  default: false,
330
332
  required: false,
331
333
  },
334
+ dataId: {
335
+ required: false,
336
+ default: '',
337
+ type: String,
338
+ },
339
+ dataQaId: {
340
+ required: false,
341
+ default: '',
342
+ type: String,
343
+ },
332
344
  },
333
345
  setup(props) {
334
346
  const isVisible = ref(false)
@@ -25,7 +25,6 @@
25
25
  : 'eturnityGrey'
26
26
  "
27
27
  :font-size="fontSize"
28
- :font-weight="labelFontWeight"
29
28
  >{{ label }}
30
29
  <IsRequiredLabelStar v-if="isRequiredLabel" />
31
30
  <OptionalLabel v-if="labelOptional">
@@ -288,14 +287,14 @@
288
287
  overflow: hidden;`}
289
288
  `
290
289
 
291
- const labelAttrs = { fontSize: String, fontColor: String, fontWeight: String }
290
+ const labelAttrs = { fontSize: String, fontColor: String }
292
291
  const InputLabel = styled('div', labelAttrs)`
293
292
  color: ${(props) =>
294
293
  props.theme.colors[props.fontColor]
295
294
  ? props.theme.colors[props.fontColor]
296
295
  : props.fontColor};
297
296
  font-size: ${(props) => props.fontSize};
298
- font-weight: ${(props) => props.fontWeight};
297
+ font-weight: 700;
299
298
  `
300
299
  const OptionalLabel = styled.span`
301
300
  font-weight: 300;
@@ -540,11 +539,6 @@
540
539
  label: {
541
540
  required: false,
542
541
  },
543
- labelFontWeight: {
544
- required: false,
545
- default: '700',
546
- type: String,
547
- },
548
542
  isRequiredLabel: {
549
543
  required: false,
550
544
  default: false,
@@ -18,7 +18,7 @@
18
18
  :is-error="isError"
19
19
  >
20
20
  <textarea
21
- :data-id="inputDataId"
21
+ :data-id="inputDataId || dataId"
22
22
  :data-qa-id="dataQaId"
23
23
  :disabled="isDisabled"
24
24
  :placeholder="placeholder"
@@ -192,6 +192,11 @@
192
192
  required: false,
193
193
  default: '',
194
194
  },
195
+ dataId: {
196
+ required: false,
197
+ default: '',
198
+ type: String,
199
+ },
195
200
  dataQaId: {
196
201
  required: false,
197
202
  default: '',
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <TagContainer :data-id="dataId">
2
+ <TagContainer :data-id="dataId" :data-qa-id="dataQaId">
3
3
  <RcIcon
4
4
  :color="getIconColor"
5
5
  :hovered-color="getIconColor"
@@ -51,6 +51,11 @@
51
51
  type: String,
52
52
  default: '',
53
53
  },
54
+ dataQaId: {
55
+ required: false,
56
+ default: '',
57
+ type: String,
58
+ },
54
59
  },
55
60
  computed: {
56
61
  getIconColor() {
@@ -2,6 +2,8 @@
2
2
  <PageContainer
3
3
  ref="pageContainer"
4
4
  :activated="isOpen"
5
+ :data-id="dataId"
6
+ :data-qa-id="dataQaId"
5
7
  :hovered-background-color="hoveredBackgroundColor"
6
8
  @click="toggleButton()"
7
9
  >
@@ -315,6 +317,16 @@
315
317
  type: String,
316
318
  default: theme.colors.grey5,
317
319
  },
320
+ dataId: {
321
+ required: false,
322
+ default: '',
323
+ type: String,
324
+ },
325
+ dataQaId: {
326
+ required: false,
327
+ default: '',
328
+ type: String,
329
+ },
318
330
  },
319
331
  data() {
320
332
  return {
@@ -1,76 +0,0 @@
1
- import styled from 'vue3-styled-components'
2
-
3
- const TEXT_VARIANTS = {
4
- HEADING_MEDIUM: 'heading-medium',
5
- HEADING_LARGE: 'heading-large',
6
- BODY_SMALL: 'body-small',
7
- BODY_MEDIUM: 'body-medium',
8
- BODY_LARGE: 'body-large',
9
- SUBHEADING_SMALL: 'subheading-small',
10
- SUBHEADING_MEDIUM: 'subheading-medium',
11
- SUBHEADING_LARGE: 'subheading-large',
12
- }
13
-
14
- const textVariants = {
15
- [TEXT_VARIANTS.HEADING_MEDIUM]: {
16
- fontSize: '20px',
17
- fontWeight: '500',
18
- lineHeight: '130%',
19
- letterSpacing: '-0.3px',
20
- },
21
- [TEXT_VARIANTS.HEADING_LARGE]: {
22
- fontSize: '24px',
23
- fontWeight: '500',
24
- lineHeight: '130%',
25
- letterSpacing: '-0.36px',
26
- },
27
- [TEXT_VARIANTS.SUBHEADING_SMALL]: {
28
- fontSize: '12px',
29
- fontWeight: '500',
30
- lineHeight: '140%',
31
- letterSpacing: '-0.12px',
32
- },
33
- [TEXT_VARIANTS.SUBHEADING_MEDIUM]: {
34
- fontSize: '14px',
35
- fontWeight: '500',
36
- lineHeight: '140%',
37
- letterSpacing: '-0.14px',
38
- },
39
- [TEXT_VARIANTS.SUBHEADING_LARGE]: {
40
- fontSize: '16px',
41
- fontWeight: '500',
42
- lineHeight: '140%',
43
- letterSpacing: '-0.16px',
44
- },
45
- [TEXT_VARIANTS.BODY_SMALL]: {
46
- fontSize: '12px',
47
- fontWeight: '400',
48
- lineHeight: '150%',
49
- },
50
- [TEXT_VARIANTS.BODY_MEDIUM]: {
51
- fontSize: '14px',
52
- fontWeight: '400',
53
- lineHeight: '150%',
54
- },
55
- [TEXT_VARIANTS.BODY_LARGE]: {
56
- fontSize: '16px',
57
- fontWeight: '400',
58
- lineHeight: '150%',
59
- },
60
- }
61
-
62
- const StyledText = styled('div', {
63
- fontColor: String,
64
- type: String,
65
- })`
66
- color: ${(props) => props.fontColor};
67
- font-style: normal;
68
-
69
- font-size: ${(props) => textVariants[props.type]?.fontSize ?? '14px'};
70
- font-weight: ${(props) => textVariants[props.type]?.fontWeight ?? '400'};
71
- line-height: ${(props) => textVariants[props.type]?.lineHeight ?? '150%'};
72
- letter-spacing: ${(props) =>
73
- textVariants[props.type]?.letterSpacing ?? 'normal'};
74
- `
75
-
76
- export default StyledText