@eturnity/eturnity_reusable_components 7.20.0--EPDM-10564.3 → 7.20.0--EPDM-5518.6

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.20.0--EPDM-10564.3",
3
+ "version": "7.20.0--EPDM-5518.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -0,0 +1,3 @@
1
+ <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5 10C7.76142 10 10 7.76142 10 5C10 2.23858 7.76142 0 5 0C2.23858 0 0 2.23858 0 5C0 7.76142 2.23858 10 5 10ZM5.875 5.05243V2.125H4.125V5.92743L6.19061 7.47663L7.24061 6.07663L5.875 5.05243Z" fill="white"/>
3
+ </svg>
@@ -0,0 +1,3 @@
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="M3.99482 2.7C4.49188 2.7 4.89482 2.29706 4.89482 1.8C4.89482 1.30294 4.49188 0.9 3.99482 0.9C3.49777 0.9 3.09482 1.30294 3.09482 1.8C3.09482 2.29706 3.49777 2.7 3.99482 2.7ZM5.79482 1.8C5.79482 2.50671 5.38756 3.11829 4.79492 3.41285V4H5.80557L4.00557 6L2.20557 4H3.19492L3.19492 3.41294C2.60218 3.11842 2.19482 2.50678 2.19482 1.8C2.19482 0.805887 3.00071 0 3.99482 0C4.98894 0 5.79482 0.805887 5.79482 1.8ZM10.8948 1.8C10.8948 2.29706 10.4919 2.7 9.99482 2.7C9.49777 2.7 9.09482 2.29706 9.09482 1.8C9.09482 1.30294 9.49777 0.9 9.99482 0.9C10.4919 0.9 10.8948 1.30294 10.8948 1.8ZM10.7949 3.41285C11.3876 3.11829 11.7948 2.50671 11.7948 1.8C11.7948 0.805887 10.9889 0 9.99482 0C9.00071 0 8.19482 0.805887 8.19482 1.8C8.19482 2.50678 8.60218 3.11842 9.19492 3.41294V4H8.20557L10.0056 6L11.8056 4H10.7949V3.41285ZM14 7.79999L0 7.79999V6.19999L14 6.19999V7.79999ZM7.00518 11.3C6.50812 11.3 6.10518 11.7029 6.10518 12.2C6.10518 12.6971 6.50812 13.1 7.00518 13.1C7.50223 13.1 7.90518 12.6971 7.90518 12.2C7.90518 11.7029 7.50223 11.3 7.00518 11.3ZM5.20518 12.2C5.20518 11.4933 5.61244 10.8817 6.20508 10.5872L6.20508 10H5.19443L6.99443 8L8.79443 10H7.80508V10.5871C8.39782 10.8816 8.80518 11.4932 8.80518 12.2C8.80518 13.1941 7.99929 14 7.00518 14C6.01106 14 5.20518 13.1941 5.20518 12.2Z" fill="#B2B9C5"/>
3
+ </svg>
@@ -0,0 +1,3 @@
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="M0 1.59997L14 1.59998V-2.44379e-05L0 -2.56618e-05V1.59997ZM6.10274 12.2C6.10274 11.7029 6.50568 11.3 7.00274 11.3C7.49979 11.3 7.90274 11.7029 7.90274 12.2C7.90274 12.6971 7.49979 13.1 7.00274 13.1C6.50568 13.1 6.10274 12.6971 6.10274 12.2ZM6.20264 10.5872C5.61 10.8817 5.20274 11.4933 5.20274 12.2C5.20274 13.1941 6.00862 14 7.00274 14C7.99685 14 8.80274 13.1941 8.80274 12.2C8.80274 11.4932 8.39538 10.8816 7.80264 10.5871L7.80264 4.65002H9.5L7 2.65002L4.5 4.65002H6.20264L6.20264 10.5872Z" fill="#B2B9C5"/>
3
+ </svg>
@@ -100,10 +100,12 @@
100
100
  <option-title> {{ filter.selectedText }} </option-title>
101
101
  </template>
102
102
  <template #dropdown>
103
- <dropdown-checkbox-container @click.stop>
103
+ <dropdown-checkbox-container
104
+ v-for="(filterOption, optionIdx) in filter.choices"
105
+ :key="optionIdx + 'optionIdx'"
106
+ @click.stop
107
+ >
104
108
  <checkbox
105
- v-for="(filterOption, optionIdx) in filter.choices"
106
- :key="optionIdx + 'optionIdx'"
107
109
  :label="filterOption.text"
108
110
  :isChecked="filterOption.selected"
109
111
  @on-event-handler="
@@ -268,6 +270,12 @@
268
270
  :text="buttonText.cancel"
269
271
  @click="$emit('on-cancel-view')"
270
272
  />
273
+ <reset-container v-if="!filterViews || !filterViews.length">
274
+ <reset-button @click="$emit('on-reset-filters')">
275
+ <icon :name="'update'" size="14px" :color="theme.colors.blue" />
276
+ <div>{{ $gettext('reset_filters') }}</div>
277
+ </reset-button>
278
+ </reset-container>
271
279
  </button-container>
272
280
  </container-wrapper>
273
281
  </template>
@@ -329,6 +337,16 @@ const ButtonContainer = styled.div`
329
337
  padding: 15px;
330
338
  `
331
339
 
340
+ const ResetContainer = styled.div`
341
+ display: grid;
342
+ align-content: center;
343
+ margin-left: auto;
344
+ div {
345
+ margin-top: 0;
346
+ align-self: center;
347
+ }
348
+ `
349
+
332
350
  const ColumnContainer = styled.div``
333
351
 
334
352
  const DragContainer = styled.div`
@@ -376,7 +394,7 @@ const DropdownCheckboxContainer = styled.div`
376
394
  display: grid;
377
395
  gap: 6px;
378
396
  width: 100%;
379
- padding: 12px 10px;
397
+ padding: 7px 10px;
380
398
  background: ${(props) => props.theme.colors.grey5};
381
399
  `
382
400
 
@@ -455,6 +473,7 @@ export default {
455
473
  DeleteIcon,
456
474
  UpperContainer,
457
475
  ResetButton,
476
+ ResetContainer,
458
477
  VueDatePicker
459
478
  },
460
479
  props: {
@@ -70,6 +70,9 @@ export default {
70
70
  },
71
71
  settingsTranslations: {
72
72
  required: false
73
+ },
74
+ closeDropdown: {
75
+ required: false
73
76
  }
74
77
  },
75
78
  data() {
@@ -122,6 +125,7 @@ export default {
122
125
  this.$emit('on-filter-view-select', item)
123
126
  },
124
127
  onViewDelete(item) {
128
+ this.onToggleDropdown()
125
129
  this.$emit('on-filter-view-delete', item)
126
130
  },
127
131
  onApplyCurrentView() {
@@ -138,6 +142,13 @@ export default {
138
142
  },
139
143
  beforeDestroy() {
140
144
  document.removeEventListener('click', this.clickOutside)
145
+ },
146
+ watch: {
147
+ closeDropdown(newVal) {
148
+ if (newVal) {
149
+ this.isDropdownOpen = false
150
+ }
151
+ }
141
152
  }
142
153
  }
143
154
  </script>
@@ -3,10 +3,11 @@
3
3
  <container
4
4
  :checkColor="checkColor"
5
5
  :size="size"
6
- :hasLabel="hasLabel"
6
+ :hasLabel="label && !!label.length"
7
7
  :backgroundColor="backgroundColor"
8
8
  :isChecked="isChecked"
9
9
  :isDisabled="isDisabled"
10
+ :cursorType="cursorType"
10
11
  >
11
12
  <input-checkbox
12
13
  type="checkbox"
@@ -17,7 +18,7 @@
17
18
  <check-wrapper :hasLabel="hasLabel">
18
19
  <span class="checkmark"></span>
19
20
  </check-wrapper>
20
- <label-text v-if="hasLabel">{{ label }}</label-text>
21
+ <label-text v-if="label && !!label.length">{{ label }}</label-text>
21
22
  </container>
22
23
  </component-wrapper>
23
24
  </template>
@@ -33,6 +34,7 @@
33
34
  // size="small"
34
35
  // backgroundColor="red"
35
36
  // :isDisabled="true"
37
+ // cursorType="default"
36
38
  // />
37
39
  import styled from 'vue3-styled-components'
38
40
 
@@ -55,7 +57,8 @@ const containerAttrs = {
55
57
  hasLabel: Boolean,
56
58
  backgroundColor: String,
57
59
  isChecked: Boolean,
58
- isDisabled: Boolean
60
+ isDisabled: Boolean,
61
+ cursorType: String
59
62
  }
60
63
  const Container = styled('label', containerAttrs)`
61
64
  display: grid;
@@ -64,7 +67,7 @@ const Container = styled('label', containerAttrs)`
64
67
  align-content: center;
65
68
  color: ${(props) => props.theme.colors.black};
66
69
  position: relative;
67
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
70
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
68
71
  font-size: 16px;
69
72
  user-select: none;
70
73
 
@@ -89,7 +92,7 @@ const Container = styled('label', containerAttrs)`
89
92
  : props.theme.colors.green
90
93
  : props.isDisabled
91
94
  ? props.theme.colors.lightGray
92
- : '#fff'};
95
+ : props.theme.colors.white};
93
96
  border-radius: 4px;
94
97
  border: 1px solid
95
98
  ${(props) =>
@@ -183,6 +186,10 @@ export default {
183
186
  dataId: {
184
187
  type: String,
185
188
  default: ''
189
+ },
190
+ cursorType: {
191
+ type: String,
192
+ default: 'pointer'
186
193
  }
187
194
  },
188
195
  computed: {
@@ -560,7 +560,7 @@ export default {
560
560
  try {
561
561
  evaluatedVal = this.onEvaluateCode(event)
562
562
  } finally {
563
- if (evaluatedVal) {
563
+ if (evaluatedVal && this.value != evaluatedVal) {
564
564
  this.$emit('on-input', evaluatedVal)
565
565
  }
566
566
  }
@@ -646,10 +646,10 @@ export default {
646
646
  }
647
647
  },
648
648
  initInteraction(e) {
649
+ this.focusInput()
650
+ e.preventDefault()
649
651
  window.addEventListener('mousemove', this.interact, false)
650
652
  window.addEventListener('mouseup', this.stopInteract, false)
651
- e.preventDefault()
652
- this.focusInput()
653
653
  },
654
654
  interact(e) {
655
655
  e.preventDefault()
@@ -328,7 +328,7 @@ export default {
328
328
  }
329
329
  },
330
330
  methods: {
331
- onEnterPress(event){
331
+ onEnterPress() {
332
332
  this.$emit('on-enter-click')
333
333
  this.$refs.inputElement.$el.blur()
334
334
  },
@@ -49,7 +49,7 @@
49
49
  // label="Question 5"
50
50
  // alignItems="horizontal" // horizontal, vertical
51
51
  // :isDisabled="true"
52
- // . fontSize="13px"
52
+ // fontSize="13px"
53
53
  // />
54
54
  import styled from 'vue3-styled-components'
55
55
  import InfoText from '../../infoText'
@@ -81,8 +81,6 @@ const paginationWrapper = styled.nav`
81
81
  flex-wrap: wrap;
82
82
  justify-content: flex-end;
83
83
  align-items: center;
84
- margin-bottom: 2px;
85
- margin-top: 10px;
86
84
  `
87
85
  const paginationLink = styled.div`
88
86
  display: flex;
@@ -92,15 +90,18 @@ const paginationLink = styled.div`
92
90
  border-radius: 3px;
93
91
  white-space: nowrap;
94
92
  cursor: pointer;
93
+ color: ${(props) => props.theme.colors.brightBlue};
95
94
 
96
95
  &.active {
97
- color: #fff;
96
+ color: ${(props) => props.theme.colors.white};
98
97
  background-color: ${(props) => props.theme.colors.brightBlue};
99
98
  padding: 7px 12px;
100
99
  border-radius: 4px;
101
100
  }
102
101
  `
103
- const arrowText = styled.div``
102
+ const arrowText = styled.div`
103
+ color: ${(props) => props.theme.colors.brightBlue};
104
+ `
104
105
  const arrowIconContainer = styled.div`
105
106
  margin: 0 10px;
106
107
  display: flex;
@@ -69,7 +69,7 @@
69
69
  </template>
70
70
 
71
71
  <script>
72
- // import ThreeDots from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
72
+ // import ProjectMarker from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
73
73
  // To use:
74
74
  // <project-marker
75
75
  // :activeLanguage="'en-us'"
@@ -0,0 +1,145 @@
1
+ <template>
2
+ <page-container>
3
+ <box-container>
4
+ <selected-container
5
+ >{{ numberSelected }} {{ $gettext('selected') }}</selected-container
6
+ >
7
+ <list-container v-if="optionsList.length">
8
+ <list-item
9
+ v-for="item in optionsList"
10
+ :key="item.type"
11
+ :hoverColor="item.hoverColor"
12
+ @click="$emit('on-' + item.type)"
13
+ >
14
+ {{ item.name }}
15
+ </list-item>
16
+ </list-container>
17
+ <empty-text v-if="!optionsList.length">
18
+ {{ $gettext('no_batch_actions_available') }}
19
+ </empty-text>
20
+ <icon-container @click="$emit('on-close')">
21
+ <icon
22
+ name="close_for_modals,_tool_tips"
23
+ color="white"
24
+ size="14px"
25
+ cursor="pointer"
26
+ />
27
+ </icon-container>
28
+ </box-container>
29
+ </page-container>
30
+ </template>
31
+
32
+ <script>
33
+ // import SelectedOptions from "@eturnity/eturnity_reusable_components/src/components/selectedOptions"
34
+ // optionsList = [
35
+ // {
36
+ // type: 'export',
37
+ // name: 'Export'
38
+ // },
39
+ // {
40
+ // type: 'delete',
41
+ // name: 'Delete',
42
+ // hoverColor: 'red' // default is green
43
+ // }
44
+ // ]
45
+ // @on-${type}="function" should $emit the callback for the 'type' in the optionsList
46
+ // <selected-options
47
+ // :numberSelected="numberSelected"
48
+ // :optionsList="optionsList"
49
+ // @on-close="onCloseFunction()"
50
+ // @on-export="function()" @on-delete="function()"
51
+ // />
52
+ import styled from 'vue3-styled-components'
53
+ import Icon from '../icon'
54
+
55
+ const PageContainer = styled.div`
56
+ position: fixed;
57
+ bottom: 30px;
58
+ left: 50%;
59
+ transform: translateX(-50%);
60
+ `
61
+
62
+ const SelectedContainer = styled.div`
63
+ display: grid;
64
+ align-items: center;
65
+ height: 100%;
66
+ padding-right: 20px;
67
+ border-right: 1px solid rgba(255, 255, 255, 0.2);
68
+ `
69
+
70
+ const BoxContainer = styled.div`
71
+ display: flex;
72
+ align-items: center;
73
+ background-color: ${(props) => props.theme.colors.black};
74
+ opacity: 90%;
75
+ color: ${(props) => props.theme.colors.white};
76
+ border-radius: 4px;
77
+ padding: 8px 10px 8px 20px;
78
+ font-size: 14px;
79
+ height: 40px;
80
+ `
81
+
82
+ const ListContainer = styled.div`
83
+ padding: 0 20px;
84
+ display: flex;
85
+ gap: 20px;
86
+ color: ${(props) => props.theme.colors.white};
87
+ `
88
+
89
+ const ListAttrs = {
90
+ hoverColor: String
91
+ }
92
+ const ListItem = styled('div', ListAttrs)`
93
+ cursor: pointer;
94
+ &:hover {
95
+ color: ${(props) =>
96
+ props.hoverColor
97
+ ? props.theme.colors[props.hoverColor]
98
+ : props.theme.colors.green};
99
+ }
100
+ `
101
+
102
+ const IconContainer = styled.div`
103
+ display: grid;
104
+ align-items: center;
105
+ justify-items: center;
106
+ height: 30px;
107
+ width: 30px;
108
+ cursor: pointer;
109
+ margin-left: 20px;
110
+
111
+ &:hover {
112
+ background: rgba(255, 255, 255, 0.1);
113
+ border-radius: 4px;
114
+ }
115
+ `
116
+
117
+ const EmptyText = styled.div`
118
+ color: ${(props) => props.theme.colors.white};
119
+ font-size: 13px;
120
+ padding-left: 16px;
121
+ `
122
+
123
+ export default {
124
+ name: 'selected-options',
125
+ components: {
126
+ PageContainer,
127
+ BoxContainer,
128
+ SelectedContainer,
129
+ ListContainer,
130
+ ListItem,
131
+ Icon,
132
+ IconContainer,
133
+ EmptyText
134
+ },
135
+ props: {
136
+ optionsList: {
137
+ required: true
138
+ },
139
+ numberSelected: {
140
+ required: true,
141
+ default: 0
142
+ }
143
+ }
144
+ }
145
+ </script>