@eturnity/eturnity_reusable_components 7.48.1-EPDM-12680.11 → 7.48.1-dev-14.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/package.json +3 -2
- package/src/assets/theme.js +1 -0
- package/src/components/buttons/buttonIcon/index.vue +1 -3
- package/src/components/buttons/mainButton/index.vue +0 -10
- package/src/components/icon/index.vue +0 -1
- package/src/components/infoCard/InfoCard.stories.js +170 -0
- package/src/components/infoCard/defaultProps.js +7 -0
- package/src/components/infoCard/index.vue +107 -22
- package/src/components/infoCard/infoCard.spec.js +64 -0
- package/src/components/infoText/index.vue +125 -289
- package/src/components/inputs/inputNumber/index.vue +11 -185
- package/src/components/inputs/inputText/index.vue +2 -23
- package/src/components/inputs/radioButton/defaultProps.js +0 -2
- package/src/components/inputs/radioButton/index.vue +6 -27
- package/src/components/inputs/radioButton/radioButton.spec.js +62 -99
- package/src/components/inputs/select/index.vue +29 -69
- package/src/components/inputs/select/option/index.vue +2 -11
- package/src/components/markerItem/index.vue +1 -8
- package/src/components/modals/modal/index.vue +9 -3
- package/src/components/sideMenu/index.vue +12 -3
- package/src/components/spinner/index.vue +0 -11
- package/src/components/tables/mainTable/index.vue +12 -4
- package/src/assets/svgIcons/collapse_all.svg +0 -4
- package/src/assets/svgIcons/hybrid.svg +0 -4
- package/src/assets/svgIcons/module.svg +0 -3
- package/src/assets/svgIcons/move_down.svg +0 -3
- package/src/assets/svgIcons/move_up.svg +0 -3
- package/src/assets/svgIcons/optimizer.svg +0 -6
- package/src/assets/svgIcons/string_design.svg +0 -5
- package/src/components/infoText/placeholder.vue +0 -225
- package/src/components/stringDesign/DropdownMenu/index.vue +0 -715
@@ -114,7 +114,9 @@ describe('RadioButton.vue', () => {
|
|
114
114
|
const checkedWrapper = checkedWrapperArray[0]
|
115
115
|
const checkedRadioInput = checkedWrapper.find('input[type="radio"]')
|
116
116
|
const defaultValueFromProps = radioButtons.props('selectedOption')
|
117
|
-
expect(checkedRadioInput.attributes('value')).toBe(
|
117
|
+
expect(checkedRadioInput.attributes('value')).toBe(
|
118
|
+
defaultValueFromProps
|
119
|
+
)
|
118
120
|
|
119
121
|
// Log attributes to see what is rendered (commented out just for reference)
|
120
122
|
// console.log('checkedRadioInput attributes', checkedRadioInput.attributes())
|
@@ -147,33 +149,25 @@ describe('RadioButton.vue', () => {
|
|
147
149
|
it('click on disabled element (|| selected element || info icon || image) does not emit anything', async () => {
|
148
150
|
// Remember the number of emitted events before triggering clicks
|
149
151
|
const initialNumberOfEvents =
|
150
|
-
radioButtons.emitted('on-radio-change')
|
152
|
+
radioButtons.emitted('on-radio-change').length
|
151
153
|
|
152
154
|
// Test RadioWrapper with disabled element
|
153
155
|
const disabledWrapperArray = findRadioWrappersByCriteria(['disabled'])
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
initialNumberOfEvents
|
161
|
-
)
|
162
|
-
}
|
163
|
-
}
|
156
|
+
const disabledLabelWrapper = disabledWrapperArray[0].find('label')
|
157
|
+
await disabledLabelWrapper.trigger('click')
|
158
|
+
// Check if we still have the same number of emitted events as at the beginning
|
159
|
+
expect(radioButtons.emitted('on-radio-change')).toHaveLength(
|
160
|
+
initialNumberOfEvents
|
161
|
+
)
|
164
162
|
|
165
163
|
// Get RadioWrapper with selected element
|
166
164
|
const checkedWrapperArray = findRadioWrappersByCriteria(['checked'])
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
initialNumberOfEvents
|
174
|
-
)
|
175
|
-
}
|
176
|
-
}
|
165
|
+
const checkedLabelWrapper = checkedWrapperArray[0].find('label')
|
166
|
+
await checkedLabelWrapper.trigger('click')
|
167
|
+
// Check if we still have the same number of emitted events as at the beginning
|
168
|
+
expect(radioButtons.emitted('on-radio-change')).toHaveLength(
|
169
|
+
initialNumberOfEvents
|
170
|
+
)
|
177
171
|
|
178
172
|
// Get RadioWrapper with info icon
|
179
173
|
const arrayOfWrappersWithInfoIcons = findRadioWrappersByCriteria([
|
@@ -181,18 +175,14 @@ describe('RadioButton.vue', () => {
|
|
181
175
|
'unchecked',
|
182
176
|
'hasInfoIcon',
|
183
177
|
])
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
initialNumberOfEvents
|
193
|
-
)
|
194
|
-
}
|
195
|
-
}
|
178
|
+
const infoIconForClick = arrayOfWrappersWithInfoIcons[0].find(
|
179
|
+
'[data-test-id="infoText_trigger"]'
|
180
|
+
)
|
181
|
+
await infoIconForClick.trigger('click')
|
182
|
+
// Check if we still have the same number of emitted events as at the beginning
|
183
|
+
expect(radioButtons.emitted('on-radio-change')).toHaveLength(
|
184
|
+
initialNumberOfEvents
|
185
|
+
)
|
196
186
|
|
197
187
|
// Get RadioWrapper with image
|
198
188
|
const arrayOfWrappersWithImage = findRadioWrappersByCriteria([
|
@@ -200,87 +190,60 @@ describe('RadioButton.vue', () => {
|
|
200
190
|
'unchecked',
|
201
191
|
'hasImage',
|
202
192
|
])
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
initialNumberOfEvents
|
216
|
-
)
|
193
|
+
const testedRadioWrapperWithImage = arrayOfWrappersWithImage[0]
|
194
|
+
const openImageWrapperTestId = testedRadioWrapperWithImage
|
195
|
+
.attributes('data-test-id')
|
196
|
+
.replace('radioWrapper_', 'radioOpenImage_')
|
197
|
+
const openImageWrapper = testedRadioWrapperWithImage.find(
|
198
|
+
`[data-test-id="${openImageWrapperTestId}"]`
|
199
|
+
)
|
200
|
+
await openImageWrapper.trigger('click')
|
201
|
+
// Check if we still have the same number of emitted events as at the beginning
|
202
|
+
expect(radioButtons.emitted('on-radio-change')).toHaveLength(
|
203
|
+
initialNumberOfEvents
|
204
|
+
)
|
217
205
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
}
|
242
|
-
}
|
243
|
-
//Close the modal
|
244
|
-
const closeButton = radioButtons.find('.visible .close')
|
245
|
-
if (closeButton.exists()) {
|
246
|
-
await closeButton.trigger('click')
|
247
|
-
await radioButtons.vm.$nextTick()
|
248
|
-
expect(imageModalWrapper.attributes('class')).toContain('hidden')
|
249
|
-
}
|
250
|
-
}
|
251
|
-
}
|
252
|
-
}
|
206
|
+
// Since we just clicked on image miniature
|
207
|
+
// lets check has the corresponding modal been opened
|
208
|
+
// and is the correct image displayed
|
209
|
+
const imageModalWrapperTestId = testedRadioWrapperWithImage
|
210
|
+
.attributes('data-test-id')
|
211
|
+
.replace('radioWrapper_', 'radioModal_')
|
212
|
+
const imageModalWrapper = testedRadioWrapperWithImage.find(
|
213
|
+
`[data-test-id="${imageModalWrapperTestId}"]`
|
214
|
+
)
|
215
|
+
expect(imageModalWrapper.attributes('class')).toContain('visible')
|
216
|
+
const imageWrapperTestId = testedRadioWrapperWithImage
|
217
|
+
.attributes('data-test-id')
|
218
|
+
.replace('radioWrapper_', 'radioImage_')
|
219
|
+
const imageWrapper = testedRadioWrapperWithImage.find(
|
220
|
+
`[data-test-id="${imageWrapperTestId}"]`
|
221
|
+
)
|
222
|
+
const expectedImageSrc = imageWrapper.attributes('src')
|
223
|
+
const modalImageSrc = imageModalWrapper.find('img').attributes('src')
|
224
|
+
expect(modalImageSrc).toBe(expectedImageSrc)
|
225
|
+
//Close the modal
|
226
|
+
radioButtons.find('.visible .close').trigger('click')
|
227
|
+
await radioButtons.vm.$nextTick()
|
228
|
+
expect(imageModalWrapper.attributes('class')).toContain('hidden')
|
253
229
|
}),
|
254
230
|
it('test hover on Info Icon', async () => {
|
255
231
|
// Get RadioWrapper with Info Icon
|
256
232
|
const arrayOfWrappersWithInfoIcon = findRadioWrappersByCriteria([
|
257
233
|
'hasInfoIcon',
|
258
234
|
])
|
259
|
-
|
260
|
-
// Ensure we have at least one wrapper with Info Icon
|
261
|
-
expect(arrayOfWrappersWithInfoIcon.length).toBeGreaterThan(0)
|
262
|
-
|
263
235
|
//Select tested item and get expected text within the info badge
|
264
236
|
const testedRadioWrapper =
|
265
237
|
arrayOfWrappersWithInfoIcon[arrayOfWrappersWithInfoIcon.length - 1]
|
266
238
|
const valueOfTestedRadioWrapper = testedRadioWrapper
|
267
239
|
.attributes('data-test-id')
|
268
240
|
.replace('radioWrapper_', '')
|
269
|
-
const expectedText = defaultRadioButtonProps.options.find(
|
270
|
-
(el) => el.value === valueOfTestedRadioWrapper
|
271
|
-
).infoText
|
241
|
+
const expectedText = defaultRadioButtonProps.options.find((el) => el.value === valueOfTestedRadioWrapper).infoText
|
272
242
|
const iconForHover = testedRadioWrapper.find(
|
273
243
|
'[data-test-id="infoText_trigger"]'
|
274
244
|
)
|
275
|
-
|
276
|
-
|
277
|
-
// expect(iconForHover.exists()).toBe(true)
|
278
|
-
|
279
|
-
if (iconForHover.exists()) {
|
280
|
-
await iconForHover.trigger('mouseenter')
|
281
|
-
await radioButtons.vm.$nextTick() // Wait for the next tick to ensure reactivity
|
282
|
-
expect(testedRadioWrapper.text()).toContain(expectedText)
|
283
|
-
}
|
245
|
+
await iconForHover.trigger('mouseenter')
|
246
|
+
expect(testedRadioWrapper.text()).toContain(expectedText)
|
284
247
|
}),
|
285
248
|
it('Test the click again after all the manipulations', async () => {
|
286
249
|
const uncheckedWrapperArray = findRadioWrappersByCriteria([
|
@@ -17,9 +17,7 @@
|
|
17
17
|
>
|
18
18
|
<InputLabel
|
19
19
|
:font-color="
|
20
|
-
labelFontColor || colorMode == 'dark'
|
21
|
-
? 'white'
|
22
|
-
: 'eturnityGrey'
|
20
|
+
labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
|
23
21
|
"
|
24
22
|
:font-size="fontSize"
|
25
23
|
>{{ label }}
|
@@ -42,26 +40,18 @@
|
|
42
40
|
<SelectButton
|
43
41
|
ref="select"
|
44
42
|
:bg-color="
|
45
|
-
buttonBgColor || colorMode == 'dark'
|
46
|
-
? 'transparentBlack1'
|
47
|
-
: colorMode == 'transparent'
|
48
|
-
? 'transparent'
|
49
|
-
: 'white'
|
43
|
+
buttonBgColor || colorMode == 'dark' ? 'transparentBlack1' : 'white'
|
50
44
|
"
|
51
45
|
class="select-button"
|
52
|
-
:color-mode="colorMode"
|
53
46
|
:data-id="dataId"
|
54
47
|
:disabled="disabled"
|
55
48
|
:font-color="
|
56
|
-
buttonFontColor || colorMode == 'dark'
|
57
|
-
? 'white'
|
58
|
-
: 'black'
|
49
|
+
buttonFontColor || colorMode == 'dark' ? 'white' : 'black'
|
59
50
|
"
|
60
51
|
:font-size="fontSize"
|
61
52
|
:has-error="hasError"
|
62
53
|
:has-no-padding="isSearchBarVisible || !hasSelectButtonPadding"
|
63
54
|
:height="height"
|
64
|
-
:is-search-bar-visible="isSearchBarVisible"
|
65
55
|
:no-relative="noRelative"
|
66
56
|
:padding-left="paddingLeft"
|
67
57
|
:select-height="selectHeight"
|
@@ -82,11 +72,7 @@
|
|
82
72
|
ref="searchInput"
|
83
73
|
background-color="transparent"
|
84
74
|
:font-color="
|
85
|
-
buttonFontColor ||
|
86
|
-
colorMode == 'dark' ||
|
87
|
-
colorMode == 'transparent'
|
88
|
-
? 'white'
|
89
|
-
: 'black'
|
75
|
+
buttonFontColor || colorMode == 'dark' ? 'white' : 'black'
|
90
76
|
"
|
91
77
|
:font-size="fontSize"
|
92
78
|
input-height="34px"
|
@@ -100,36 +86,37 @@
|
|
100
86
|
/>
|
101
87
|
<Selector
|
102
88
|
v-else
|
89
|
+
:disabled="disabled"
|
103
90
|
:padding-left="paddingLeft"
|
104
91
|
:select-width="selectWidth"
|
105
92
|
:show-border="showBorder"
|
106
93
|
>
|
107
94
|
<slot name="selector" :selected-value="selectedValue"></slot>
|
108
95
|
</Selector>
|
109
|
-
<Caret
|
110
|
-
class="caret_dropdown"
|
111
|
-
:color-mode="colorMode"
|
112
|
-
@click.stop="toggleCaretDropdown"
|
113
|
-
>
|
96
|
+
<Caret class="caret_dropdown" @click.stop="toggleCaretDropdown">
|
114
97
|
<Icon
|
115
98
|
v-if="isDropdownOpen"
|
116
99
|
:color="
|
117
|
-
caretColor ||
|
100
|
+
caretColor || disabled
|
101
|
+
? 'grey2'
|
102
|
+
: colorMode == 'dark'
|
118
103
|
? 'white'
|
119
104
|
: 'transparentBlack1'
|
120
105
|
"
|
121
106
|
name="arrow_up"
|
122
|
-
|
107
|
+
size="12px"
|
123
108
|
/>
|
124
109
|
<Icon
|
125
110
|
v-else
|
126
111
|
:color="
|
127
|
-
caretColor ||
|
112
|
+
caretColor || disabled
|
113
|
+
? 'grey2'
|
114
|
+
: colorMode == 'dark'
|
128
115
|
? 'white'
|
129
116
|
: 'transparentBlack1'
|
130
117
|
"
|
131
118
|
name="arrow_down"
|
132
|
-
|
119
|
+
size="12px"
|
133
120
|
/>
|
134
121
|
</Caret>
|
135
122
|
</SelectButton>
|
@@ -139,27 +126,15 @@
|
|
139
126
|
v-show="isSelectDropdownShown"
|
140
127
|
ref="dropdown"
|
141
128
|
:bg-color="
|
142
|
-
dropdownBgColor ||
|
143
|
-
colorMode == 'dark' ||
|
144
|
-
colorMode == 'transparent'
|
145
|
-
? 'black'
|
146
|
-
: 'white'
|
129
|
+
dropdownBgColor || colorMode == 'dark' ? 'black' : 'white'
|
147
130
|
"
|
148
131
|
:dropdown-position="dropdownPosition"
|
149
132
|
:font-color="
|
150
|
-
dropdownFontColor ||
|
151
|
-
colorMode == 'dark' ||
|
152
|
-
colorMode == 'transparent'
|
153
|
-
? 'white'
|
154
|
-
: 'black'
|
133
|
+
dropdownFontColor || colorMode == 'dark' ? 'white' : 'black'
|
155
134
|
"
|
156
135
|
:font-size="fontSize"
|
157
136
|
:hovered-bg-color="
|
158
|
-
colorMode == 'dark'
|
159
|
-
? '#000000'
|
160
|
-
: colorMode == 'transparent'
|
161
|
-
? 'grey6'
|
162
|
-
: dropdownBgColor
|
137
|
+
colorMode == 'dark' ? '#000000' : dropdownBgColor
|
163
138
|
"
|
164
139
|
:hovered-index="hoveredIndex"
|
165
140
|
:hovered-value="hoveredValue"
|
@@ -216,15 +191,12 @@
|
|
216
191
|
const CARET_WIDTH = '30px'
|
217
192
|
const BORDER_WIDTH = '1px'
|
218
193
|
|
219
|
-
const
|
220
|
-
const Caret = styled('div', CaretAttrs)`
|
194
|
+
const Caret = styled.div`
|
221
195
|
display: flex;
|
222
196
|
align-items: center;
|
223
197
|
justify-content: center;
|
224
|
-
width: ${
|
225
|
-
|
226
|
-
min-width: ${(props) =>
|
227
|
-
props.colorMode === 'transparent' ? '15px' : CARET_WIDTH};
|
198
|
+
width: ${CARET_WIDTH};
|
199
|
+
min-width: ${CARET_WIDTH};
|
228
200
|
height: 100%;
|
229
201
|
align-items: center;
|
230
202
|
cursor: pointer;
|
@@ -232,11 +204,13 @@
|
|
232
204
|
`
|
233
205
|
|
234
206
|
const selectorProps = {
|
207
|
+
disabled: Boolean,
|
235
208
|
selectWidth: String,
|
236
209
|
paddingLeft: String,
|
237
210
|
showBorder: Boolean,
|
238
211
|
}
|
239
212
|
const Selector = styled('div', selectorProps)`
|
213
|
+
color: ${(props) => (props.disabled ? props.theme.colors.grey2 : '')};
|
240
214
|
${(props) =>
|
241
215
|
props.selectWidth === '100%'
|
242
216
|
? 'width: 100%;'
|
@@ -263,7 +237,6 @@
|
|
263
237
|
`
|
264
238
|
const OptionalLabel = styled.span`
|
265
239
|
font-weight: 300;
|
266
|
-
text-transform: lowercase;
|
267
240
|
`
|
268
241
|
const inputProps = {
|
269
242
|
selectWidth: String,
|
@@ -308,8 +281,6 @@
|
|
308
281
|
noRelative: Boolean,
|
309
282
|
tablePaddingLeft: String,
|
310
283
|
showDisabledBackground: Boolean,
|
311
|
-
colorMode: String,
|
312
|
-
isSearchBarVisible: Boolean,
|
313
284
|
}
|
314
285
|
const SelectButton = styled('div', selectButtonAttrs)`
|
315
286
|
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
@@ -317,11 +288,7 @@
|
|
317
288
|
border-radius: 4px;
|
318
289
|
max-width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
|
319
290
|
${(props) =>
|
320
|
-
props.
|
321
|
-
? props.isSearchBarVisible
|
322
|
-
? 'padding: 10px 15px 10px 5px;'
|
323
|
-
: 'padding: 10px 15px;'
|
324
|
-
: props.isSearchBarVisible
|
291
|
+
props.isSearchBarVisible
|
325
292
|
? ''
|
326
293
|
: `padding-left: ${
|
327
294
|
props.hasNoPadding
|
@@ -349,22 +316,14 @@
|
|
349
316
|
hasError ? theme.colors.red : theme.colors.grey4
|
350
317
|
}
|
351
318
|
`}
|
352
|
-
|
353
|
-
props.
|
354
|
-
|
355
|
-
props.colorMode === 'transparent'
|
356
|
-
? 'transparent'
|
357
|
-
: props.disabled && props.showDisabledBackground
|
358
|
-
? props.theme.colors.disabled
|
319
|
+
background-color:${(props) =>
|
320
|
+
props.disabled && props.showDisabledBackground
|
321
|
+
? props.theme.colors.grey5
|
359
322
|
: props.theme.colors[props.bgColor]
|
360
323
|
? props.theme.colors[props.bgColor]
|
361
324
|
: props.bgColor};
|
362
325
|
color: ${(props) =>
|
363
|
-
props.
|
364
|
-
? props.theme.colors.white
|
365
|
-
: props.disabled && props.showDisabledBackground
|
366
|
-
? props.theme.colors.black
|
367
|
-
: props.theme.colors[props.fontColor]
|
326
|
+
props.theme.colors[props.fontColor]
|
368
327
|
? props.theme.colors[props.fontColor]
|
369
328
|
: props.fontColor};
|
370
329
|
${(props) => (props.disabled ? 'pointer-events: none' : '')};
|
@@ -583,6 +542,7 @@
|
|
583
542
|
},
|
584
543
|
disabled: {
|
585
544
|
required: false,
|
545
|
+
type: Boolean,
|
586
546
|
default: false,
|
587
547
|
},
|
588
548
|
isAutoSearch: {
|
@@ -661,7 +621,7 @@
|
|
661
621
|
if (this.isDropdownOpen) {
|
662
622
|
return this.$refs.dropdown.$el.childElementCount > 1
|
663
623
|
? this.$refs.dropdown.$el.childElementCount
|
664
|
-
: this.$refs.dropdown.$el.children[0]
|
624
|
+
: !!this.$refs.dropdown.$el.children[0]
|
665
625
|
? this.$refs.dropdown.$el.children[0].childElementCount
|
666
626
|
: 0
|
667
627
|
}
|
@@ -1,12 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<OptionContainer
|
3
|
-
:background-color="
|
4
|
-
colorMode == 'dark'
|
5
|
-
? '#000000'
|
6
|
-
: colorMode == 'transparent'
|
7
|
-
? 'black'
|
8
|
-
: backgroundColor
|
9
|
-
"
|
3
|
+
:background-color="colorMode == 'dark' ? '#000000' : backgroundColor"
|
10
4
|
:cursor-type="cursorType"
|
11
5
|
:data-value="value"
|
12
6
|
:disabled-bg-color="disabledBgColor"
|
@@ -14,8 +8,6 @@
|
|
14
8
|
:hovered-bg-color="
|
15
9
|
colorMode == 'dark'
|
16
10
|
? '#000000'
|
17
|
-
: colorMode == 'transparent'
|
18
|
-
? 'grey6'
|
19
11
|
: hoveredBgColor
|
20
12
|
? hoveredBgColor
|
21
13
|
: 'grey5'
|
@@ -138,8 +130,7 @@
|
|
138
130
|
default: '12px 10px',
|
139
131
|
},
|
140
132
|
textColor: {
|
141
|
-
type:
|
142
|
-
required: false,
|
133
|
+
type: true,
|
143
134
|
default: 'inherit',
|
144
135
|
},
|
145
136
|
},
|
@@ -12,7 +12,7 @@
|
|
12
12
|
:name="iconName"
|
13
13
|
size="10px"
|
14
14
|
/>
|
15
|
-
<span
|
15
|
+
<span>{{ label }}</span>
|
16
16
|
</MarkerContainer>
|
17
17
|
</PageContainer>
|
18
18
|
</template>
|
@@ -60,13 +60,6 @@
|
|
60
60
|
border-radius: 4px;
|
61
61
|
white-space: nowrap;
|
62
62
|
cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
|
63
|
-
overflow: hidden;
|
64
|
-
text-overflow: ellipsis;
|
65
|
-
|
66
|
-
span {
|
67
|
-
overflow: hidden;
|
68
|
-
text-overflow: ellipsis;
|
69
|
-
}
|
70
63
|
`
|
71
64
|
|
72
65
|
export default {
|
@@ -5,7 +5,7 @@
|
|
5
5
|
:is-open="isOpen"
|
6
6
|
:position="position"
|
7
7
|
>
|
8
|
-
<ModalContainer @click="onClickModalContainer">
|
8
|
+
<ModalContainer :overflow="overflowRule" @click="onClickModalContainer">
|
9
9
|
<Spinner v-if="isLoading" :limited-to-modal="true" size="50px" />
|
10
10
|
<ContentContainer :visible="!isLoading">
|
11
11
|
<slot></slot>
|
@@ -67,7 +67,8 @@
|
|
67
67
|
}
|
68
68
|
`
|
69
69
|
|
70
|
-
const
|
70
|
+
const modalContainerAttrs = { overflow: String }
|
71
|
+
const ModalContainer = styled('div', modalContainerAttrs)`
|
71
72
|
align-self: center;
|
72
73
|
justify-self: center;
|
73
74
|
position: relative;
|
@@ -75,7 +76,7 @@
|
|
75
76
|
border-radius: 4px;
|
76
77
|
background: white;
|
77
78
|
margin: 0 auto;
|
78
|
-
overflow:
|
79
|
+
overflow: ${(props) => props.overflow};
|
79
80
|
max-width: 95%;
|
80
81
|
max-height: 95%;
|
81
82
|
min-width: 100px;
|
@@ -152,6 +153,11 @@
|
|
152
153
|
type: Boolean,
|
153
154
|
default: true,
|
154
155
|
},
|
156
|
+
overflowRule: {
|
157
|
+
required: false,
|
158
|
+
type: String,
|
159
|
+
default: 'auto',
|
160
|
+
},
|
155
161
|
},
|
156
162
|
watch: {
|
157
163
|
isOpen: {
|
@@ -254,9 +254,6 @@
|
|
254
254
|
activeDropdown: null,
|
255
255
|
}
|
256
256
|
},
|
257
|
-
mounted() {
|
258
|
-
this.activeDropdown = this.activeParentTab
|
259
|
-
},
|
260
257
|
methods: {
|
261
258
|
toggleActiveDropdown(value) {
|
262
259
|
if (this.activeDropdown === value) {
|
@@ -266,5 +263,17 @@
|
|
266
263
|
}
|
267
264
|
},
|
268
265
|
},
|
266
|
+
watch: {
|
267
|
+
activeTab: {
|
268
|
+
// once active tab is received, check if any parent
|
269
|
+
// tab is active and if so open according dropdown
|
270
|
+
handler() {
|
271
|
+
if (this.activeParentTab) {
|
272
|
+
this.activeDropdown = this.activeParentTab
|
273
|
+
}
|
274
|
+
},
|
275
|
+
once: true,
|
276
|
+
},
|
277
|
+
},
|
269
278
|
}
|
270
279
|
</script>
|
@@ -3,7 +3,6 @@
|
|
3
3
|
<Container>
|
4
4
|
<SpinnerWrapper data-test-id="spinner_full_wrapper">
|
5
5
|
<SpinnerSvg
|
6
|
-
:class="{ white: isWhite }"
|
7
6
|
data-test-id="spinner_full_icon"
|
8
7
|
:style="{ width: size, height: size }"
|
9
8
|
/>
|
@@ -17,7 +16,6 @@
|
|
17
16
|
>
|
18
17
|
<SpinnerWrapper data-test-id="spinner_wrapper">
|
19
18
|
<SpinnerSvg
|
20
|
-
:class="{ white: isWhite }"
|
21
19
|
data-test-id="spinner_icon"
|
22
20
|
:style="{ width: size, height: size }"
|
23
21
|
/>
|
@@ -56,10 +54,6 @@
|
|
56
54
|
const SpinnerWrapper = styled.div`
|
57
55
|
width: ${(props) => (props.size ? props.size : '60px')};
|
58
56
|
height: auto;
|
59
|
-
|
60
|
-
.white {
|
61
|
-
filter: brightness(0) invert(1);
|
62
|
-
}
|
63
57
|
`
|
64
58
|
|
65
59
|
export default {
|
@@ -86,11 +80,6 @@
|
|
86
80
|
default: '60px',
|
87
81
|
type: String,
|
88
82
|
},
|
89
|
-
isWhite: {
|
90
|
-
required: false,
|
91
|
-
default: false,
|
92
|
-
type: Boolean,
|
93
|
-
},
|
94
83
|
},
|
95
84
|
}
|
96
85
|
</script>
|
@@ -10,7 +10,11 @@
|
|
10
10
|
ref="tableRef"
|
11
11
|
:is-position-absolute="doesTableContainDraggables"
|
12
12
|
>
|
13
|
-
<TableWrapper
|
13
|
+
<TableWrapper
|
14
|
+
class="main-table-wrapper"
|
15
|
+
:full-width="fullWidth"
|
16
|
+
:is-overflow-hidden="isOverflowHidden"
|
17
|
+
>
|
14
18
|
<SpinnerWrapper v-if="isLoading">
|
15
19
|
<Spinner />
|
16
20
|
</SpinnerWrapper>
|
@@ -70,12 +74,12 @@
|
|
70
74
|
`}
|
71
75
|
`
|
72
76
|
|
73
|
-
const wrapperAttrs = { fullWidth: Boolean }
|
77
|
+
const wrapperAttrs = { fullWidth: Boolean, isOverflowHidden: Boolean }
|
74
78
|
const TableWrapper = styled('div', wrapperAttrs)`
|
75
79
|
width: ${(props) => (props.fullWidth ? '100%' : 'fit-content')};
|
76
80
|
max-width: 100%;
|
77
|
-
|
78
|
-
|
81
|
+
${(props) =>
|
82
|
+
props.isOverflowHidden ? 'overflow-x: auto; overflow-y: hidden;' : ''}
|
79
83
|
|
80
84
|
::-webkit-scrollbar {
|
81
85
|
height: 10px; //height of the whole scrollbar area
|
@@ -409,6 +413,10 @@
|
|
409
413
|
required: false,
|
410
414
|
default: false,
|
411
415
|
},
|
416
|
+
isOverflowHidden: {
|
417
|
+
required: false,
|
418
|
+
default: true,
|
419
|
+
},
|
412
420
|
titleText: {
|
413
421
|
required: false,
|
414
422
|
default: null,
|
@@ -1,4 +0,0 @@
|
|
1
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.22998 11.8962H10.5006H12.2505V10.1463V8.97906H14.0004V5.47917H12.2505V4.31283V2.56289V2.55151H10.5006V2.56289H8.58218L7.76617 4.31283H10.5006V10.1463H5.04599L4.22998 11.8962Z" fill="white"/>
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.2622 4.79738C6.91629 4.63687 6.53076 4.54729 6.12431 4.54729C4.63054 4.54729 3.41919 5.75796 3.41919 7.25241C3.41919 8.33588 4.05591 9.26984 4.97534 9.70158L7.2622 4.79738ZM5.44786 3.11681C5.44786 3.49042 5.7507 3.79326 6.12431 3.79326C6.49793 3.79326 6.80077 3.49042 6.80077 3.11681V1.76459C6.80077 1.39097 6.49793 1.08813 6.12431 1.08813C5.7507 1.08813 5.44786 1.39097 5.44786 1.76459V3.11681ZM2.02818 7.88939H0.675962C0.302349 7.88939 -0.000488281 7.58655 -0.000488281 7.21294C-0.000488281 6.83932 0.302349 6.53649 0.675962 6.53649H2.02818C2.4018 6.53649 2.70463 6.83932 2.70463 7.21294C2.70463 7.58655 2.4018 7.88939 2.02818 7.88939ZM3.7057 10.5877L2.74955 11.5439C2.4855 11.8079 2.05745 11.8079 1.7934 11.5439C1.52935 11.2798 1.52935 10.8518 1.7934 10.5877L2.74955 9.63155C3.0136 9.36751 3.44165 9.36751 3.7057 9.63155C3.96975 9.8956 3.96975 10.3237 3.7057 10.5877ZM2.74955 4.79432L1.7934 3.83817C1.52935 3.57412 1.52935 3.14607 1.7934 2.88202C2.05745 2.61797 2.4855 2.61797 2.74955 2.88202L3.7057 3.83817C3.96975 4.10222 3.96975 4.53027 3.7057 4.79432C3.44165 5.05837 3.0136 5.05837 2.74955 4.79432Z" fill="white"/>
|
4
|
-
</svg>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.0722 3.6H1.6V10.4H11.0722L7.87332 7.60217L7.18484 7L7.87332 6.39783L11.0722 3.6ZM12.4 9.43572V4.56428L9.61516 7L12.4 9.43572ZM0 2H1.6H12.4H14V3.6V10.4V12H12.4H1.6H0V10.4V3.6V2Z" fill="white"/>
|
3
|
-
</svg>
|