@eturnity/eturnity_reusable_components 7.8.6-EPDM-9779.2 → 7.8.6-EPDM-7951.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.
Files changed (51) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/package.json +18 -23
  3. package/src/App.vue +2 -2
  4. package/src/assets/theme.js +0 -2
  5. package/src/components/addNewButton/index.vue +5 -3
  6. package/src/components/buttons/buttonIcon/index.vue +1 -1
  7. package/src/components/buttons/closeButton/index.vue +1 -1
  8. package/src/components/buttons/mainButton/index.vue +6 -1
  9. package/src/components/deleteIcon/DeleteIcon.stories.js +7 -7
  10. package/src/components/deleteIcon/index.vue +25 -21
  11. package/src/components/draggableInputHandle/index.vue +24 -25
  12. package/src/components/dropdown/index.vue +129 -110
  13. package/src/components/errorMessage/index.vue +1 -1
  14. package/src/components/filter/filterSettings.vue +55 -97
  15. package/src/components/filter/index.vue +3 -3
  16. package/src/components/filter/parentDropdown.vue +2 -2
  17. package/src/components/icon/iconCollection.vue +2 -2
  18. package/src/components/icon/index.vue +57 -55
  19. package/src/components/iconWrapper/index.vue +2 -5
  20. package/src/components/infoCard/index.vue +2 -3
  21. package/src/components/infoText/index.vue +2 -6
  22. package/src/components/inputs/checkbox/index.vue +21 -6
  23. package/src/components/inputs/inputNumber/index.vue +8 -12
  24. package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
  25. package/src/components/inputs/inputText/index.vue +3 -3
  26. package/src/components/inputs/radioButton/index.vue +1 -1
  27. package/src/components/inputs/searchInput/index.vue +7 -8
  28. package/src/components/inputs/select/index.vue +213 -72
  29. package/src/components/inputs/select/option/index.vue +5 -5
  30. package/src/components/inputs/slider/index.vue +16 -16
  31. package/src/components/inputs/switchField/index.vue +2 -2
  32. package/src/components/inputs/textAreaInput/index.vue +1 -1
  33. package/src/components/inputs/toggle/index.vue +2 -2
  34. package/src/components/label/index.vue +27 -32
  35. package/src/components/modals/modal/index.vue +13 -8
  36. package/src/components/navigationTabs/index.vue +37 -30
  37. package/src/components/pageSubtitle/index.vue +1 -1
  38. package/src/components/pageTitle/index.vue +20 -19
  39. package/src/components/pagination/index.vue +1 -1
  40. package/src/components/progressBar/index.vue +1 -1
  41. package/src/components/projectMarker/index.vue +10 -7
  42. package/src/components/sideMenu/index.vue +1 -1
  43. package/src/components/spinner/index.vue +6 -11
  44. package/src/components/tableDropdown/index.vue +21 -26
  45. package/src/components/tables/mainTable/exampleNested.vue +1 -1
  46. package/src/components/tables/mainTable/index.vue +2 -1
  47. package/src/components/tables/viewTable/index.vue +2 -2
  48. package/src/components/threeDots/index.vue +1 -1
  49. package/src/components/videoThumbnail/index.vue +95 -100
  50. package/src/main.js +4 -11
  51. package/src/assets/svgIcons/expand.svg +0 -1
@@ -53,7 +53,7 @@
53
53
  </no-template>
54
54
  <input-container
55
55
  v-if="item.type === 'input'"
56
- @click.native.stop="onInputClick()"
56
+ @click.stop="onInputClick()"
57
57
  >
58
58
  <text-container
59
59
  v-if="customInputDisabled"
@@ -93,16 +93,11 @@
93
93
  triggerType="hover"
94
94
  ></et-popover>
95
95
  <arrow-down
96
- @click.native.stop="toggleOpen"
96
+ @click.stop="toggleOpen"
97
97
  v-if="!isOpen"
98
98
  class="arrow-dropdown"
99
- :src="require('../../assets/icons/collapse_arrow_icon.svg')"
100
- />
101
- <arrow-up
102
- @click.native.stop="toggleOpen"
103
- v-else
104
- :src="require('../../assets/icons/collapse_arrow_icon.svg')"
105
99
  />
100
+ <arrow-up @click.stop="toggleOpen" v-else />
106
101
  </arrow-wrapper>
107
102
  <options-container v-if="isOpen" ref="optionsContainer">
108
103
  <options-wrapper @click.prevent.stop>
@@ -127,20 +122,18 @@
127
122
  :key="index"
128
123
  @click="onItemClick(item)"
129
124
  :tabindex="0"
130
- @keyup.enter.native="onItemClick(item)"
125
+ @keyup.enter="onItemClick(item)"
131
126
  >
132
- <template v-for="(option, idx) in optionsDisplay">
133
- <span v-if="option !== 'template'" :key="idx">
127
+ <template v-for="(option, idx) in optionsDisplay" :key="idx">
128
+ <span v-if="option !== 'template'">
134
129
  {{ !!item[option] ? item[option] : '-' }}
135
130
  </span>
136
131
  <template-button
137
- :key="idx"
138
132
  @click.stop="onTemplateClick(item)"
139
133
  v-else-if="option === 'template' && item.has_template"
140
134
  >{{ $gettext('Use template...') }}</template-button
141
135
  >
142
136
  <no-template
143
- :key="idx"
144
137
  v-else-if="option === 'template' && !item.has_template"
145
138
  >
146
139
  {{ $gettext('No main component template') }}
@@ -183,10 +176,12 @@
183
176
  // :optionsDisplay="['display_name', 'company_item_number']" // Array. what should be displayed
184
177
  // :disabled="true"
185
178
  // />
186
- import styled from 'vue-styled-components'
187
- import Spinner from '@eturnity/eturnity_reusable_components/src/components/spinner'
188
- import SearchInput from '@eturnity/eturnity_reusable_components/src/components/inputs/searchInput'
189
- import InputText from '@eturnity/eturnity_reusable_components/src/components/inputs/inputText'
179
+ import styled from 'vue3-styled-components'
180
+ import Spinner from '../spinner'
181
+ import SearchInput from '../inputs/searchInput'
182
+ import InputText from '../inputs/inputText'
183
+ import CollapseArrowIcon from '../../assets/icons/collapse_arrow_icon.svg'
184
+ import SubpositionMarkerIcon from '../../assets/icons/subposition_marker.svg'
190
185
 
191
186
  const rowAttrs = { disabled: Boolean, isOpen: Boolean }
192
187
  const DropdownRow = styled('div', rowAttrs)`
@@ -237,9 +232,8 @@ const ComponentContainer = styled('div', containerAttrs)`
237
232
  padding: 5px 4px;
238
233
  `
239
234
 
240
- const ArrowDown = styled.img`
235
+ const ArrowDown = styled(CollapseArrowIcon)`
241
236
  width: 8px;
242
- transform: rotate(0deg);
243
237
  transition: transform 150ms ease;
244
238
  `
245
239
 
@@ -403,9 +397,7 @@ const TextContainer = styled.div`
403
397
  align-items: center;
404
398
  `
405
399
 
406
- const NestedIcon = styled.div`
407
- background-image: ${() =>
408
- `url(${require('../../assets/icons/subposition_marker.svg')})`};
400
+ const NestedIcon = styled(SubpositionMarkerIcon)`
409
401
  height: 10px;
410
402
  width: 6px;
411
403
  `
@@ -604,7 +596,7 @@ export default {
604
596
  }
605
597
  })
606
598
  })
607
- if (this.dynamicGridWidth.length === this.optionsDisplay.length) {
599
+ if (Array.isArray(this.dynamicGridWidth)) {
608
600
  this.dynamicGridWidth = this.dynamicGridWidth.join(' ')
609
601
  }
610
602
  }
@@ -627,9 +619,12 @@ export default {
627
619
  })
628
620
  }
629
621
  },
630
- optionItems(val) {
631
- if (val && val.length) {
632
- this.setDropdownWidth(val)
622
+ optionItems: {
623
+ immediate: true,
624
+ handler(val) {
625
+ if (val && val.length) {
626
+ this.setDropdownWidth(val)
627
+ }
633
628
  }
634
629
  }
635
630
  }
@@ -161,7 +161,7 @@
161
161
 
162
162
  <script>
163
163
  import draggable from "vuedraggable"
164
- import styled from "vue-styled-components"
164
+ import styled from "vue3-styled-components"
165
165
  import MainTable from "@/components/reusable-components/tables/MainTable"
166
166
  import InputText from "@eturnity/eturnity_reusable_components/src/components/inputs/inputText"
167
167
  import DeleteIcon from "@/components/reusable-components/DeleteIcon"
@@ -29,7 +29,7 @@
29
29
  <script>
30
30
  // ToDo: add this to storybook
31
31
  // import MainTable from "@eturnity/eturnity_reusable_components/src/components/tables/mainTable"
32
- import styled from 'vue-styled-components'
32
+ import styled from 'vue3-styled-components'
33
33
  import Spinner from '../../spinner'
34
34
 
35
35
  const pageContainerProps = {
@@ -122,6 +122,7 @@ const TableContainer = styled('table', containerAttrs)`
122
122
  background-color: ${(props) => props.theme.colors.white};
123
123
  cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
124
124
 
125
+ .select-button,
125
126
  .arrow-container,
126
127
  .input-placeholder,
127
128
  .table-dropdown-item {
@@ -29,7 +29,7 @@
29
29
  </table-item>
30
30
  <icons-container v-if="showIconsContainer">
31
31
  <delete-icon
32
- @click.native="$emit('on-click-delete', index)"
32
+ @click="$emit('on-click-delete', index)"
33
33
  color="gray"
34
34
  />
35
35
  </icons-container>
@@ -45,7 +45,7 @@
45
45
  // This is a read only table. Pass it data, and it displays it
46
46
  // ToDo: add this to storybook
47
47
  // import ViewTable from "@eturnity/eturnity_reusable_components/src/components/tables/viewTable"
48
- import styled from 'vue-styled-components'
48
+ import styled from 'vue3-styled-components'
49
49
  import DeleteIcon from '../../deleteIcon'
50
50
  import Spinner from '../../spinner'
51
51
 
@@ -123,7 +123,7 @@
123
123
  // },
124
124
  // ],
125
125
 
126
- import styled from 'vue-styled-components'
126
+ import styled from 'vue3-styled-components'
127
127
  import Spinner from '../spinner'
128
128
 
129
129
  const PageContainerAttrs = {
@@ -1,108 +1,103 @@
1
1
  <template>
2
- <wrapper :width="width" :height="height" :fit="fit">
3
- <img :src="src">
4
- <iconWrapper>
5
- <icon
6
- name="play"
7
- :size="playIconSize"
8
- :color="playIconColor"
9
- />
10
- </iconWrapper>
11
- </wrapper>
12
- </template>
13
-
14
- <script>
15
- // import VideoThumbnail from "@eturnity/eturnity_reusable_components/src/components/videoThumbnail"
16
- // How to use:
17
- //<videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
18
- // playIconColor="red"
19
- // playIconSize="20px"
20
- // width="400px"
21
- // height="600px"
22
- // />
23
-
24
- import styled from 'vue-styled-components'
25
- import Icon from '../icon'
26
-
27
- const wrapperAttrs = { width: String, height:String,fit:String }
28
- const Wrapper = styled('div', wrapperAttrs)`
29
- display: inline-block;
30
- position: relative;
31
- width:${props=>props.width};
32
- height:${props=>props.height};
33
- & img{
34
- object-fit:${props=>props.fit};
35
- width:${props=>props.width};
36
- height:${props=>props.height};
37
- }
38
- `
39
- const iconWrapper = styled('div')`
40
- position: absolute;
41
- top:0;
42
- bottom:0;
43
- left:0;
44
- right:0;
45
- display:flex;
46
- justify-content:center;
47
- align-items: center;
48
- `
2
+ <wrapper :width="width" :height="height" :fit="fit">
3
+ <img :src="src" />
4
+ <iconWrapper>
5
+ <icon name="play" :size="playIconSize" :color="playIconColor" />
6
+ </iconWrapper>
7
+ </wrapper>
8
+ </template>
9
+
10
+ <script>
11
+ // import VideoThumbnail from "@eturnity/eturnity_reusable_components/src/components/videoThumbnail"
12
+ // How to use:
13
+ //<videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
14
+ // playIconColor="red"
15
+ // playIconSize="20px"
16
+ // width="400px"
17
+ // height="600px"
18
+ // />
19
+
20
+ import styled from 'vue3-styled-components'
21
+ import Icon from '../icon'
49
22
 
50
- export default {
51
- name: 'VideoThumbnail',
52
- components: {
53
- Wrapper,
54
- Icon,
55
- iconWrapper
23
+ const wrapperAttrs = { width: String, height: String, fit: String }
24
+ const Wrapper = styled('div', wrapperAttrs)`
25
+ display: inline-block;
26
+ position: relative;
27
+ width: ${(props) => props.width};
28
+ height: ${(props) => props.height};
29
+ & img {
30
+ object-fit: ${(props) => props.fit};
31
+ width: ${(props) => props.width};
32
+ height: ${(props) => props.height};
33
+ }
34
+ `
35
+ const iconWrapper = styled('div')`
36
+ position: absolute;
37
+ top: 0;
38
+ bottom: 0;
39
+ left: 0;
40
+ right: 0;
41
+ display: flex;
42
+ justify-content: center;
43
+ align-items: center;
44
+ `
45
+
46
+ export default {
47
+ name: 'VideoThumbnail',
48
+ components: {
49
+ Wrapper,
50
+ Icon,
51
+ iconWrapper
52
+ },
53
+ props: {
54
+ src: {
55
+ required: true
56
56
  },
57
- props: {
58
- src:{
59
- required: true,
60
- },
61
- fit:{
62
- required: false,
63
- default: 'cover'
64
- },
65
- width: {
66
- required: false,
67
- default: '300px'
68
- },
69
- height: {
70
- required: false,
71
- default: '200px'
72
- },
73
- playIconSize:{
74
- required: false,
75
- default: '50px'
76
- },
77
- playIconColor:{
78
- required: false,
79
- default: 'blue'
80
- }
57
+ fit: {
58
+ required: false,
59
+ default: 'cover'
81
60
  },
82
- data() {
83
- return {
84
- isOpenByClick:false
85
- }
61
+ width: {
62
+ required: false,
63
+ default: '300px'
86
64
  },
87
- methods:{
88
- clickOutside(event) {
89
- if (this.openingMode!="click") return
90
- if (
91
- this.$refs.dropdown.$el == event.target ||
92
- this.$refs.dropdown.$el.contains(event.target)
93
- ) {
94
- return
95
- } else {
96
- this.isOpenByClick=false
97
- }
98
- },
65
+ height: {
66
+ required: false,
67
+ default: '200px'
99
68
  },
100
- mounted() {
101
- document.addEventListener('click', this.clickOutside)
102
- },
103
- beforeDestroy() {
104
- document.removeEventListener('click', this.clickOutside)
69
+ playIconSize: {
70
+ required: false,
71
+ default: '50px'
105
72
  },
73
+ playIconColor: {
74
+ required: false,
75
+ default: 'blue'
76
+ }
77
+ },
78
+ data() {
79
+ return {
80
+ isOpenByClick: false
81
+ }
82
+ },
83
+ methods: {
84
+ clickOutside(event) {
85
+ if (this.openingMode != 'click') return
86
+ if (
87
+ this.$refs.dropdown.$el == event.target ||
88
+ this.$refs.dropdown.$el.contains(event.target)
89
+ ) {
90
+ return
91
+ } else {
92
+ this.isOpenByClick = false
93
+ }
94
+ }
95
+ },
96
+ mounted() {
97
+ document.addEventListener('click', this.clickOutside)
98
+ },
99
+ beforeDestroy() {
100
+ document.removeEventListener('click', this.clickOutside)
106
101
  }
107
- </script>
108
-
102
+ }
103
+ </script>
package/src/main.js CHANGED
@@ -1,13 +1,6 @@
1
- import Vue from "vue"
2
- import App from "./App.vue"
3
- import VueCompositionAPI from "@vue/composition-api"
4
- import vClickOutside from 'v-click-outside'
1
+ import App from './App.vue'
2
+ import { createApp } from 'vue'
5
3
 
6
- Vue.config.productionTip = false
4
+ const app = createApp(App)
7
5
 
8
- Vue.use(VueCompositionAPI)
9
- Vue.use(vClickOutside)
10
-
11
- new Vue({
12
- render: (h) => h(App),
13
- }).$mount("#app")
6
+ app.mount('#app')
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M245.7,232.4c1,7.7-2.4,11.3-10.3,10.8l-62.1-6.9c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