@eturnity/eturnity_reusable_components 7.35.1-EPDM-11196.0 → 7.35.1-EPDM-10576.5
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
CHANGED
@@ -87,7 +87,10 @@
|
|
87
87
|
:key="index + '_field'"
|
88
88
|
>
|
89
89
|
<SelectComponent
|
90
|
-
v-if="
|
90
|
+
v-if="
|
91
|
+
isMultipleSelector(filter.filter_type) ||
|
92
|
+
isSingleSelector(filter.filter_type)
|
93
|
+
"
|
91
94
|
align-items="vertical"
|
92
95
|
:disabled="!filter.choices.length"
|
93
96
|
font-size="13px"
|
@@ -102,16 +105,12 @@
|
|
102
105
|
<OptionTitle> {{ filter.selectedText }} </OptionTitle>
|
103
106
|
</template>
|
104
107
|
<template #dropdown>
|
105
|
-
<
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
:is-checked="filterOption.selected"
|
112
|
-
:label="filterOption.text"
|
113
|
-
size="small"
|
114
|
-
@on-event-handler="
|
108
|
+
<template v-if="isSingleSelector(filter.filter_type)">
|
109
|
+
<Option
|
110
|
+
v-for="(filterOption, optionIdx) in filter.choices"
|
111
|
+
:key="optionIdx + 'optionIdx'"
|
112
|
+
:value="filterOption.text"
|
113
|
+
@click="
|
115
114
|
onChange({
|
116
115
|
dataType: item.type,
|
117
116
|
value: $event,
|
@@ -119,8 +118,31 @@
|
|
119
118
|
field: filter.field,
|
120
119
|
})
|
121
120
|
"
|
122
|
-
|
123
|
-
|
121
|
+
>
|
122
|
+
{{ filterOption.text }}
|
123
|
+
</Option>
|
124
|
+
</template>
|
125
|
+
<template v-else>
|
126
|
+
<DropdownCheckboxContainer
|
127
|
+
v-for="(filterOption, optionIdx) in filter.choices"
|
128
|
+
:key="optionIdx + 'optionIdx'"
|
129
|
+
@click.stop
|
130
|
+
>
|
131
|
+
<Checkbox
|
132
|
+
:is-checked="filterOption.selected"
|
133
|
+
:label="filterOption.text"
|
134
|
+
size="small"
|
135
|
+
@on-event-handler="
|
136
|
+
onChange({
|
137
|
+
dataType: item.type,
|
138
|
+
value: $event,
|
139
|
+
choice: filterOption.choice,
|
140
|
+
field: filter.field,
|
141
|
+
})
|
142
|
+
"
|
143
|
+
/>
|
144
|
+
</DropdownCheckboxContainer>
|
145
|
+
</template>
|
124
146
|
</template>
|
125
147
|
</SelectComponent>
|
126
148
|
<SectionContainer v-else-if="isRangeSelector(filter.filter_type)">
|
@@ -305,6 +327,8 @@
|
|
305
327
|
const ContainerWrapper = styled.div`
|
306
328
|
position: absolute;
|
307
329
|
margin-top: 4px;
|
330
|
+
max-height: 70vh;
|
331
|
+
overflow-y: auto;
|
308
332
|
background-color: ${(props) => props.theme.colors.white};
|
309
333
|
min-width: 100%;
|
310
334
|
width: max-content;
|
@@ -317,13 +341,15 @@
|
|
317
341
|
const ColAttrs = { numCols: Number, hasActiveView: Boolean }
|
318
342
|
const ColumnWrapper = styled('div', ColAttrs)`
|
319
343
|
display: grid;
|
344
|
+
max-height: 50vh;
|
345
|
+
overflow-y: auto;
|
320
346
|
grid-template-columns: repeat(${(props) => props.numCols}, auto);
|
321
347
|
|
322
348
|
${({ hasActiveView, theme }) =>
|
323
349
|
hasActiveView &&
|
324
350
|
`
|
325
|
-
|
326
|
-
|
351
|
+
border-top: 1px solid ${theme.colors.grey4};
|
352
|
+
`}
|
327
353
|
`
|
328
354
|
|
329
355
|
const TitleAttrs = { showBorder: Boolean }
|
@@ -335,8 +361,8 @@
|
|
335
361
|
${({ showBorder, theme }) =>
|
336
362
|
showBorder &&
|
337
363
|
`
|
338
|
-
|
339
|
-
|
364
|
+
border-right: 1px solid ${theme.colors.grey4};
|
365
|
+
`}
|
340
366
|
`
|
341
367
|
|
342
368
|
const ButtonContainer = styled.div`
|
@@ -372,8 +398,8 @@
|
|
372
398
|
${({ showBorder, theme }) =>
|
373
399
|
showBorder &&
|
374
400
|
`
|
375
|
-
|
376
|
-
|
401
|
+
border-right: 1px solid ${theme.colors.grey4};
|
402
|
+
`}
|
377
403
|
|
378
404
|
.ghost {
|
379
405
|
opacity: 0.5;
|
@@ -402,6 +428,7 @@
|
|
402
428
|
display: grid;
|
403
429
|
gap: 6px;
|
404
430
|
width: 100%;
|
431
|
+
overflow-wrap: anywhere;
|
405
432
|
padding: 7px 10px;
|
406
433
|
background: ${(props) => props.theme.colors.grey5};
|
407
434
|
`
|
@@ -435,11 +462,11 @@
|
|
435
462
|
`
|
436
463
|
|
437
464
|
const UpperContainer = styled.div`
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
`
|
465
|
+
display: grid;
|
466
|
+
grid-gap: 20px
|
467
|
+
grid-template-columns: 1fr 1fr;
|
468
|
+
padding: 10px 14px;
|
469
|
+
`
|
443
470
|
|
444
471
|
const ResetButton = styled.div`
|
445
472
|
display: inline-flex;
|
@@ -622,6 +649,9 @@
|
|
622
649
|
const foundItem = options.find((item) => item.choice === value)
|
623
650
|
return foundItem ? foundItem.text : value ? value : filter.selectedText
|
624
651
|
},
|
652
|
+
isSingleSelector(type) {
|
653
|
+
return type === 'boolean'
|
654
|
+
},
|
625
655
|
isMultipleSelector(type) {
|
626
656
|
return type === 'multi_select_integer' || type === 'multi_select_string'
|
627
657
|
},
|
@@ -1,10 +1,6 @@
|
|
1
1
|
<template>
|
2
|
-
<InfoContainer
|
3
|
-
|
4
|
-
:border-color="borderColor"
|
5
|
-
:has-dashed-border="hasDashedBorder"
|
6
|
-
>
|
7
|
-
<RCIcon :color="color" name="info" size="24px" />
|
2
|
+
<InfoContainer>
|
3
|
+
<RCIcon name="info" size="24px" :color="color" />
|
8
4
|
<TextContainer>
|
9
5
|
<slot></slot>
|
10
6
|
</TextContainer>
|
@@ -14,24 +10,12 @@
|
|
14
10
|
<script>
|
15
11
|
import styled from 'vue3-styled-components'
|
16
12
|
import RCIcon from '../icon'
|
17
|
-
|
18
|
-
|
19
|
-
hasDashedBorder: Boolean,
|
20
|
-
borderColor: String,
|
21
|
-
}
|
22
|
-
const InfoContainer = styled('div', propsContainer)`
|
13
|
+
|
14
|
+
const InfoContainer = styled.div`
|
23
15
|
display: flex;
|
24
16
|
gap: 15px;
|
25
|
-
padding:
|
26
|
-
border: 1px ${(props) =>
|
27
|
-
${(props) =>
|
28
|
-
props.theme.colors[props.borderColor]
|
29
|
-
? props.theme.colors[props.borderColor]
|
30
|
-
: props.borderColor};
|
31
|
-
background-color: ${(props) =>
|
32
|
-
props.theme.colors[props.backgroundColor]
|
33
|
-
? props.theme.colors[props.backgroundColor]
|
34
|
-
: props.backgroundColor};
|
17
|
+
padding: 20px;
|
18
|
+
border: 1px dashed ${(props) => props.theme.colors.grey4};
|
35
19
|
border-radius: 4px;
|
36
20
|
`
|
37
21
|
|
@@ -49,19 +33,8 @@
|
|
49
33
|
},
|
50
34
|
props: {
|
51
35
|
color: {
|
52
|
-
required: false
|
53
|
-
}
|
54
|
-
|
55
|
-
required: false,
|
56
|
-
},
|
57
|
-
hasDashedBorder: {
|
58
|
-
required: false,
|
59
|
-
default: true,
|
60
|
-
},
|
61
|
-
borderColor: {
|
62
|
-
required: false,
|
63
|
-
default: 'grey4',
|
64
|
-
},
|
65
|
-
},
|
36
|
+
required: false
|
37
|
+
}
|
38
|
+
}
|
66
39
|
}
|
67
40
|
</script>
|