@eturnity/eturnity_reusable_components 7.35.1-EPDM-10576.6 → 7.35.1-EPDM-11386.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.35.1-EPDM-10576.6",
3
+ "version": "7.35.1-EPDM-11386.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
package/src/App.vue CHANGED
@@ -1,13 +1,10 @@
1
1
  <template>
2
- <ThemeProvider :style="{ height: '100%' }" :theme="getTheme()">
3
- <RouterView />
4
- </ThemeProvider>
2
+ <ThemeProvider :style="{ height: '100%' }" :theme="getTheme()" />
5
3
  </template>
6
4
 
7
5
  <script>
8
6
  import { ThemeProvider } from 'vue3-styled-components'
9
7
  import theme from './assets/theme'
10
-
11
8
  export default {
12
9
  name: 'App',
13
10
  components: {
@@ -0,0 +1,6 @@
1
+ <svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
2
+ viewBox="0 0 512 512" xml:space="preserve">
3
+ <path d="M256,0C114.617,0,0,114.615,0,256s114.617,256,256,256s256-114.615,256-256S397.383,0,256,0z M224,320
4
+ c0,8.836-7.164,16-16,16h-32c-8.836,0-16-7.164-16-16V192c0-8.836,7.164-16,16-16h32c8.836,0,16,7.164,16,16V320z M352,320
5
+ c0,8.836-7.164,16-16,16h-32c-8.836,0-16-7.164-16-16V192c0-8.836,7.164-16,16-16h32c8.836,0,16,7.164,16,16V320z"/>
6
+ </svg>
@@ -35,6 +35,9 @@ const theme = {
35
35
  tablet: '768px',
36
36
  tabletLarge: '950px',
37
37
  },
38
+ fonts: {
39
+ mainFont: '"Figtree", sans-serif',
40
+ },
38
41
  borderRadius: '4px',
39
42
  }
40
43
 
@@ -87,10 +87,7 @@
87
87
  :key="index + '_field'"
88
88
  >
89
89
  <SelectComponent
90
- v-if="
91
- isMultipleSelector(filter.filter_type) ||
92
- isSingleSelector(filter.filter_type)
93
- "
90
+ v-if="isMultipleSelector(filter.filter_type)"
94
91
  align-items="vertical"
95
92
  :disabled="!filter.choices.length"
96
93
  font-size="13px"
@@ -105,12 +102,16 @@
105
102
  <OptionTitle> {{ filter.selectedText }} </OptionTitle>
106
103
  </template>
107
104
  <template #dropdown>
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="
105
+ <DropdownCheckboxContainer
106
+ v-for="(filterOption, optionIdx) in filter.choices"
107
+ :key="optionIdx + 'optionIdx'"
108
+ @click.stop
109
+ >
110
+ <Checkbox
111
+ :is-checked="filterOption.selected"
112
+ :label="filterOption.text"
113
+ size="small"
114
+ @on-event-handler="
114
115
  onChange({
115
116
  dataType: item.type,
116
117
  value: $event,
@@ -118,31 +119,8 @@
118
119
  field: filter.field,
119
120
  })
120
121
  "
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>
122
+ />
123
+ </DropdownCheckboxContainer>
146
124
  </template>
147
125
  </SelectComponent>
148
126
  <SectionContainer v-else-if="isRangeSelector(filter.filter_type)">
@@ -327,29 +305,25 @@
327
305
  const ContainerWrapper = styled.div`
328
306
  position: absolute;
329
307
  margin-top: 4px;
330
- max-height: 70vh;
331
- overflow-y: auto;
332
308
  background-color: ${(props) => props.theme.colors.white};
333
309
  min-width: 100%;
334
310
  width: max-content;
335
311
  border: 1px solid ${(props) => props.theme.colors.grey4};
336
312
  border-radius: 4px;
337
- z-index: 1;
313
+ z-index: 99999;
338
314
  font-size: 13px;
339
315
  `
340
316
 
341
317
  const ColAttrs = { numCols: Number, hasActiveView: Boolean }
342
318
  const ColumnWrapper = styled('div', ColAttrs)`
343
319
  display: grid;
344
- max-height: 50vh;
345
- overflow-y: auto;
346
320
  grid-template-columns: repeat(${(props) => props.numCols}, auto);
347
321
 
348
322
  ${({ hasActiveView, theme }) =>
349
323
  hasActiveView &&
350
324
  `
351
- border-top: 1px solid ${theme.colors.grey4};
352
- `}
325
+ border-top: 1px solid ${theme.colors.grey4};
326
+ `}
353
327
  `
354
328
 
355
329
  const TitleAttrs = { showBorder: Boolean }
@@ -361,8 +335,8 @@
361
335
  ${({ showBorder, theme }) =>
362
336
  showBorder &&
363
337
  `
364
- border-right: 1px solid ${theme.colors.grey4};
365
- `}
338
+ border-right: 1px solid ${theme.colors.grey4};
339
+ `}
366
340
  `
367
341
 
368
342
  const ButtonContainer = styled.div`
@@ -398,8 +372,8 @@
398
372
  ${({ showBorder, theme }) =>
399
373
  showBorder &&
400
374
  `
401
- border-right: 1px solid ${theme.colors.grey4};
402
- `}
375
+ border-right: 1px solid ${theme.colors.grey4};
376
+ `}
403
377
 
404
378
  .ghost {
405
379
  opacity: 0.5;
@@ -428,7 +402,6 @@
428
402
  display: grid;
429
403
  gap: 6px;
430
404
  width: 100%;
431
- overflow-wrap: anywhere;
432
405
  padding: 7px 10px;
433
406
  background: ${(props) => props.theme.colors.grey5};
434
407
  `
@@ -462,11 +435,11 @@
462
435
  `
463
436
 
464
437
  const UpperContainer = styled.div`
465
- display: grid;
466
- grid-gap: 20px
467
- grid-template-columns: 1fr 1fr;
468
- padding: 10px 14px;
469
- `
438
+ display: grid;
439
+ grid-gap: 20px
440
+ grid-template-columns: 1fr 1fr;
441
+ padding: 10px 14px;
442
+ `
470
443
 
471
444
  const ResetButton = styled.div`
472
445
  display: inline-flex;
@@ -649,9 +622,6 @@
649
622
  const foundItem = options.find((item) => item.choice === value)
650
623
  return foundItem ? foundItem.text : value ? value : filter.selectedText
651
624
  },
652
- isSingleSelector(type) {
653
- return type === 'boolean'
654
- },
655
625
  isMultipleSelector(type) {
656
626
  return type === 'multi_select_integer' || type === 'multi_select_string'
657
627
  },
@@ -92,7 +92,7 @@
92
92
  mounted() {
93
93
  document.addEventListener('click', this.clickOutside)
94
94
  },
95
- beforeUnmount() {
95
+ beforeDestroy() {
96
96
  document.removeEventListener('click', this.clickOutside)
97
97
  },
98
98
  methods: {
@@ -0,0 +1,103 @@
1
+ <template>
2
+ <Container>
3
+ <RoundedTabLeft
4
+ :background-color="backgroundColor"
5
+ :border-radius="borderRadius"
6
+ />
7
+ <Tab
8
+ :background-color="backgroundColor"
9
+ :border-radius="borderRadius"
10
+ :height="height"
11
+ :width="width"
12
+ >
13
+ <slot></slot>
14
+ </Tab>
15
+ <RoundedTabRight
16
+ :background-color="backgroundColor"
17
+ :border-radius="borderRadius"
18
+ />
19
+ </Container>
20
+ </template>
21
+ <script>
22
+ import styled from 'vue3-styled-components'
23
+
24
+ const Container = styled.div`
25
+ position: relative;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ `
30
+ const RoundedTabLeft = styled('div', {
31
+ backgroundColor: String,
32
+ borderRadius: String,
33
+ })`
34
+ position:absolute;
35
+ bottom:0;
36
+ left:-${(prop) => prop.borderRadius}
37
+ background-color: ${(prop) => prop.backgroundColor};
38
+ width: ${(prop) => prop.borderRadius};
39
+ height: ${(prop) => prop.borderRadius};
40
+ -webkit-mask-image: radial-gradient(
41
+ circle at top left,
42
+ transparent 71%,
43
+ black 71%
44
+ );
45
+ `
46
+ const RoundedTabRight = styled('div', {
47
+ backgroundColor: String,
48
+ borderRadius: String,
49
+ })`
50
+ position:absolute;
51
+ bottom:0;
52
+ right:-${(prop) => prop.borderRadius}
53
+ background-color: ${(prop) => prop.backgroundColor};
54
+ width: ${(prop) => prop.borderRadius};
55
+ height: ${(prop) => prop.borderRadius};
56
+ -webkit-mask-image: radial-gradient(
57
+ circle at top right,
58
+ transparent 71%,
59
+ black 71%
60
+ );`
61
+ const Tab = styled('div', {
62
+ width: String,
63
+ height: String,
64
+ backgroundColor: String,
65
+ borderRadius: String,
66
+ })`
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ background-color: ${(prop) => prop.backgroundColor};
71
+ width: ${(prop) => prop.width};
72
+ height: ${(prop) => prop.height};
73
+ border-radius: ${(prop) => prop.borderRadius} ${(prop) => prop.borderRadius}
74
+ 0 0;
75
+ `
76
+ export default {
77
+ name: 'SelectedOptions',
78
+ components: {
79
+ Container,
80
+ Tab,
81
+ RoundedTabLeft,
82
+ RoundedTabRight,
83
+ },
84
+ props: {
85
+ height: {
86
+ required: false,
87
+ default: '40px',
88
+ },
89
+ width: {
90
+ required: false,
91
+ default: '200px',
92
+ },
93
+ backgroundColor: {
94
+ required: false,
95
+ default: 'blue',
96
+ },
97
+ borderRadius: {
98
+ required: false,
99
+ default: '20px',
100
+ },
101
+ },
102
+ }
103
+ </script>