@eturnity/eturnity_reusable_components 8.49.3 → 9.3.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.
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.49.3",
3
+ "version": "9.3.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -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 = () =>
@@ -20,7 +20,7 @@
20
20
  <Radio
21
21
  :checked="selectedOption === item.value"
22
22
  :data-id="`radio_button_${dataId}_option_${item.value}`"
23
- :data-qa-id="dataQaId"
23
+ :data-qa-id="`${dataQaId}_${item.value}`"
24
24
  :data-test-id="'radioInput_' + item.value"
25
25
  :disabled="isItemDisabled(item)"
26
26
  :name="'radioButtons_' + radioName"
@@ -9,6 +9,7 @@
9
9
  v-if="!item.children"
10
10
  :key="idx"
11
11
  :data-id="`sub_menu_settings_${item.key}`"
12
+ :data-qa-id="`sub_menu_settings_${item.key}`"
12
13
  :fill-type="item.icon === 'free_technology' ? 'stroke' : 'fill'"
13
14
  :is-active="activeTab === item.key || activeParentTab === item.key"
14
15
  @click="$emit('tab-click', { activeKey: item.key })"
@@ -31,6 +32,7 @@
31
32
  <CollapseWrapper v-else :key="idx + item.key">
32
33
  <CollapseContainer
33
34
  :data-id="`sub_menu_settings_${item.key}`"
35
+ :data-qa-id="`sub_menu_settings_${item.key}`"
34
36
  :is-active="activeParentTab === item.key"
35
37
  @click="toggleActiveDropdown(item.key)"
36
38
  >
@@ -66,6 +68,7 @@
66
68
  v-for="subItem in item.children"
67
69
  :key="subItem.key"
68
70
  :data-id="`sub_menu_settings_${subItem.key}`"
71
+ :data-qa-id="`sub_menu_settings_${subItem.key}`"
69
72
  :is-active="activeTab === subItem.key"
70
73
  @click="
71
74
  $emit('tab-click', {
@@ -83,6 +86,7 @@
83
86
  <BottomSection v-if="hasLogout">
84
87
  <IconContainer
85
88
  data-id="button_settings_logout"
89
+ data-qa-id="button_settings_logout"
86
90
  :is-active="false"
87
91
  :is-button="true"
88
92
  @click="$emit('on-logout')"
@@ -94,7 +98,11 @@
94
98
  size="18px"
95
99
  />
96
100
  </IconContainer>
97
- <AppVersion>{{ appVersion }}</AppVersion>
101
+ <AppVersion
102
+ data-id="app_side_menu_version"
103
+ data-qa-id="app_side_menu_version"
104
+ >{{ appVersion }}</AppVersion
105
+ >
98
106
  </BottomSection>
99
107
  </PageContainer>
100
108
  </template>