@eturnity/eturnity_reusable_components 6.33.1-EPDM-5205.1 → 6.33.1-EPDM-7956

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 (40) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/package.json +15 -18
  3. package/src/App.vue +2 -2
  4. package/src/components/addNewButton/index.vue +1 -1
  5. package/src/components/buttons/buttonIcon/index.vue +1 -1
  6. package/src/components/buttons/closeButton/index.vue +1 -1
  7. package/src/components/buttons/mainButton/index.vue +1 -1
  8. package/src/components/deleteIcon/index.vue +1 -1
  9. package/src/components/dropdown/index.vue +129 -110
  10. package/src/components/errorMessage/index.vue +1 -1
  11. package/src/components/icon/iconCollection.vue +2 -2
  12. package/src/components/icon/index.vue +36 -42
  13. package/src/components/iconWrapper/index.vue +1 -1
  14. package/src/components/infoText/index.vue +2 -6
  15. package/src/components/inputs/checkbox/index.vue +1 -1
  16. package/src/components/inputs/inputNumber/index.vue +1 -2
  17. package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
  18. package/src/components/inputs/inputText/index.vue +3 -3
  19. package/src/components/inputs/radioButton/index.vue +1 -1
  20. package/src/components/inputs/searchInput/index.vue +1 -1
  21. package/src/components/inputs/select/index.vue +22 -28
  22. package/src/components/inputs/select/option/index.vue +1 -1
  23. package/src/components/inputs/slider/index.vue +1 -1
  24. package/src/components/inputs/switchField/index.vue +1 -1
  25. package/src/components/inputs/textAreaInput/index.vue +1 -1
  26. package/src/components/inputs/toggle/index.vue +1 -1
  27. package/src/components/modals/modal/index.vue +1 -1
  28. package/src/components/pageSubtitle/index.vue +1 -1
  29. package/src/components/pageTitle/index.vue +1 -1
  30. package/src/components/pagination/index.vue +12 -12
  31. package/src/components/progressBar/index.vue +1 -1
  32. package/src/components/projectMarker/index.vue +1 -1
  33. package/src/components/spinner/index.vue +1 -1
  34. package/src/components/tableDropdown/index.vue +22 -13
  35. package/src/components/tables/mainTable/exampleNested.vue +1 -1
  36. package/src/components/tables/mainTable/index.vue +7 -70
  37. package/src/components/tables/viewTable/index.vue +3 -3
  38. package/src/components/threeDots/index.vue +14 -8
  39. package/src/components/videoThumbnail/index.vue +95 -100
  40. package/src/main.js +4 -9
@@ -1,4 +1,4 @@
1
- import { ThemeProvider } from "vue-styled-components"
1
+ import { ThemeProvider } from "vue3-styled-components"
2
2
 
3
3
  const theme = {
4
4
  colors: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "6.33.1-EPDM-5205.1",
3
+ "version": "6.33.1-EPDM-7956",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -10,27 +10,24 @@
10
10
  "build-storybook": "build-storybook"
11
11
  },
12
12
  "dependencies": {
13
+ "@storybook/vue3": "^7.0.18",
14
+ "@vue/compat": "^3.3.4",
13
15
  "@vueform/slider": "1.0.5",
14
- "core-js": "^3.31.1",
16
+ "external-svg-loader": "^1.6.7",
15
17
  "html-loader": "0.5.5",
16
18
  "v-click-outside": "2.1.4",
17
- "vue": "2.6.11",
18
- "vue-styled-components": "1.6.0"
19
+ "vue": "3.3.4",
20
+ "vue3-styled-components": "^1.2.1"
19
21
  },
20
22
  "devDependencies": {
21
- "@storybook/addon-actions": "6.2.8",
22
- "@storybook/addon-docs": "6.4.19",
23
- "@storybook/addon-essentials": "6.2.8",
24
- "@storybook/addon-links": "6.2.8",
25
- "@storybook/vue": "6.4.19",
26
- "@vue/cli-plugin-babel": "~4.5.0",
27
- "@vue/cli-plugin-eslint": "~4.5.0",
28
- "@vue/cli-service": "~4.5.0",
29
- "@vue/composition-api": "1.0.0-rc.10",
30
- "babel-eslint": "10.1.0",
31
- "eslint": "6.7.2",
32
- "eslint-plugin-vue": "6.2.2",
33
- "vue-template-compiler": "2.6.11"
23
+ "@babel/core": "^7.12.16",
24
+ "@babel/eslint-parser": "^7.12.16",
25
+ "@vue/cli-plugin-babel": "^5.0.8",
26
+ "@vue/cli-plugin-eslint": "^5.0.8",
27
+ "@vue/cli-service": "5.0.8",
28
+ "@vue/compiler-sfc": "^3.3.4",
29
+ "eslint": "^7.32.0",
30
+ "eslint-plugin-vue": "^8.0.3"
34
31
  },
35
32
  "eslintConfig": {
36
33
  "root": true,
@@ -42,7 +39,7 @@
42
39
  "eslint:recommended"
43
40
  ],
44
41
  "parserOptions": {
45
- "parser": "babel-eslint"
42
+ "parser": "@babel/eslint-parser"
46
43
  },
47
44
  "rules": {}
48
45
  },
package/src/App.vue CHANGED
@@ -94,9 +94,9 @@
94
94
  </template>
95
95
 
96
96
  <script>
97
- import { ThemeProvider } from 'vue-styled-components'
97
+ import { ThemeProvider } from 'vue3-styled-components'
98
98
  import theme from './assets/theme'
99
- import styled from 'vue-styled-components'
99
+ import styled from 'vue3-styled-components'
100
100
  import InputNumber from '@/components/inputs/inputNumber'
101
101
  import Select from '@/components/inputs/select'
102
102
  import SwitchField from '@/components/inputs/switchField'
@@ -8,7 +8,7 @@
8
8
 
9
9
  <script>
10
10
  // import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
11
- import styled from "vue-styled-components"
11
+ import styled from "vue3-styled-components"
12
12
 
13
13
  const pageAttrs = { shouldPosition: Boolean }
14
14
  const PageContainer = styled("div", pageAttrs)`
@@ -32,7 +32,7 @@
32
32
  // />
33
33
 
34
34
  import Icon from "../../icon"
35
- import styled from "vue-styled-components"
35
+ import styled from "vue3-styled-components"
36
36
  import Theme from "@/assets/theme";
37
37
 
38
38
  const PageContainer = styled.div``
@@ -13,7 +13,7 @@
13
13
  // <close-button
14
14
  // color="#fff"
15
15
  // />
16
- import styled from 'vue-styled-components'
16
+ import styled from 'vue3-styled-components'
17
17
 
18
18
  const Container = styled.div`
19
19
  position: relative;
@@ -22,7 +22,7 @@
22
22
  // :minWidth="minWidth"
23
23
  // />
24
24
 
25
- import styled from "vue-styled-components"
25
+ import styled from "vue3-styled-components"
26
26
 
27
27
  const PageContainer = styled.div``
28
28
 
@@ -19,7 +19,7 @@
19
19
  <script>
20
20
  // To use:
21
21
  // <delete-icon @click.native="onDeleteItem(item)" :isDisabled="true" />
22
- import styled from "vue-styled-components"
22
+ import styled from "vue3-styled-components"
23
23
 
24
24
  const wrapperAttrs = { isDisabled: Boolean }
25
25
  const Wrapper = styled("div", wrapperAttrs)`
@@ -1,119 +1,138 @@
1
1
  <template>
2
- <wrapper ref="dropdown" :openingMode="openingMode">
3
- <WrapperButton @click="isOpenByClick=!isOpenByClick">
4
- <slot name="trigger"/>
5
- </WrapperButton>
6
- <WrapperDropdown class="dropdown-content" :class="{openDropdown:isOpenByClick && openingMode=='click'}" :justify="justify" :position="position" :width="width" :backgroundColor="backgroundColor">
7
- <DropdownWindow :gap="gap" :backgroundColor="backgroundColor" :width="width">
8
- <slot name="dropdown"/>
9
- </DropdownWindow>
10
- </WrapperDropdown>
11
- </wrapper>
12
- </template>
13
-
14
- <script>
15
- // import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
16
- // How to use:
17
- //<DropdownComponent
18
- // width="300px"
19
- // backgroundColor="red">
2
+ <wrapper ref="dropdown" :openingMode="openingMode">
3
+ <WrapperButton @click="isOpenByClick = !isOpenByClick">
4
+ <slot name="trigger" />
5
+ </WrapperButton>
6
+ <WrapperDropdown
7
+ class="dropdown-content"
8
+ :class="{ openDropdown: isOpenByClick && openingMode == 'click' }"
9
+ :justify="justify"
10
+ :position="position"
11
+ :width="width"
12
+ :backgroundColor="backgroundColor"
13
+ >
14
+ <DropdownWindow
15
+ :gap="gap"
16
+ :backgroundColor="backgroundColor"
17
+ :width="width"
18
+ >
19
+ <slot name="dropdown" />
20
+ </DropdownWindow>
21
+ </WrapperDropdown>
22
+ </wrapper>
23
+ </template>
20
24
 
21
- // <DropdownComponent/>
22
-
23
- import styled from 'vue-styled-components'
24
-
25
- const wrapperAttrs = { width: String, backgroundColor:String,openingMode:String,gap:String,justify:String }
26
- const Wrapper = styled('div', wrapperAttrs)`
27
- display: inline-block;
28
- position: relative;
25
+ <script>
26
+ // import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
27
+ // How to use:
28
+ //<DropdownComponent
29
+ // width="300px"
30
+ // backgroundColor="red">
29
31
 
30
- &:hover .dropdown-content {
31
- ${props=>props.openingMode=='hover'?"display:block":""}
32
- }
33
- & .openDropdown{
34
- ${props=>props.openingMode=='click'?"display:block !important":""}
35
- }
36
- `
37
- const WrapperDropdown = styled('div', wrapperAttrs)`
38
- margin-top: 0;
39
- display: none;
40
- position: absolute;
41
- z-index: 1;
42
- ${(props) => props.justify=="right"?"right:0;":""}
43
- `
44
- const DropdownWindow = styled('div', wrapperAttrs)`
45
- width: ${(props) => props.width};
46
- background-color: ${(props) => props.theme.colors[props.backgroundColor] || props.backgroundColor};
47
- margin-top: ${(props) => props.gap};
48
- border-radius: 4px;
49
- position: relative;
50
- min-width: 160px;
51
- box-shadow: -1px 0px 5px rgba(0, 0, 0, 0.302);
52
- z-index: 1;
53
- `
54
-
55
- const WrapperButton = styled('div', wrapperAttrs)`
56
- display: inline-block;
57
- `
58
-
59
- export default {
60
- name: 'DropdownComponent',
61
- components: {
62
- WrapperDropdown,
63
- WrapperButton,
64
- Wrapper,
65
- DropdownWindow
66
- },
67
- props: {
68
- width: {
69
- required: false,
70
- default: '300px'
71
- },
72
- gap: {
73
- required: false,
74
- default: '10px'
75
- },
76
- position: {
77
- required: false,
78
- default: 'bottom'
79
- },
80
- justify: {
81
- required: false,
82
- default: 'left'
83
- },
84
- openingMode: {
85
- required: false,
86
- default: 'hover'
87
- },
88
- backgroundColor: {
89
- required: false,
90
- default: 'white'
91
- }
32
+ // <DropdownComponent/>
33
+
34
+ import styled from 'vue3-styled-components'
35
+
36
+ const wrapperAttrs = {
37
+ width: String,
38
+ backgroundColor: String,
39
+ openingMode: String,
40
+ gap: String,
41
+ justify: String
42
+ }
43
+ const Wrapper = styled('div', wrapperAttrs)`
44
+ display: inline-block;
45
+ position: relative;
46
+
47
+ &:hover .dropdown-content {
48
+ ${(props) => (props.openingMode == 'hover' ? 'display:block' : '')}
49
+ }
50
+ & .openDropdown {
51
+ ${(props) =>
52
+ props.openingMode == 'click' ? 'display:block !important' : ''}
53
+ }
54
+ `
55
+ const WrapperDropdown = styled('div', wrapperAttrs)`
56
+ margin-top: 0;
57
+ display: none;
58
+ position: absolute;
59
+ z-index: 1;
60
+ ${(props) => (props.justify == 'right' ? 'right:0;' : '')}
61
+ `
62
+ const DropdownWindow = styled('div', wrapperAttrs)`
63
+ width: ${(props) => props.width};
64
+ background-color: ${(props) =>
65
+ props.theme.colors[props.backgroundColor] || props.backgroundColor};
66
+ margin-top: ${(props) => props.gap};
67
+ border-radius: 4px;
68
+ position: relative;
69
+ min-width: 160px;
70
+ box-shadow: -1px 0px 5px rgba(0, 0, 0, 0.302);
71
+ z-index: 1;
72
+ `
73
+
74
+ const WrapperButton = styled('div', wrapperAttrs)`
75
+ display: inline-block;
76
+ `
77
+
78
+ export default {
79
+ name: 'DropdownComponent',
80
+ components: {
81
+ WrapperDropdown,
82
+ WrapperButton,
83
+ Wrapper,
84
+ DropdownWindow
85
+ },
86
+ props: {
87
+ width: {
88
+ required: false,
89
+ default: '300px'
92
90
  },
93
- data() {
94
- return {
95
- isOpenByClick:false
96
- }
91
+ gap: {
92
+ required: false,
93
+ default: '10px'
97
94
  },
98
- methods:{
99
- clickOutside(event) {
100
- if (this.openingMode!="click") return
101
- if (
102
- this.$refs.dropdown.$el == event.target ||
103
- this.$refs.dropdown.$el.contains(event.target)
104
- ) {
105
- return
106
- } else {
107
- this.isOpenByClick=false
108
- }
109
- },
95
+ position: {
96
+ required: false,
97
+ default: 'bottom'
110
98
  },
111
- mounted() {
112
- document.addEventListener('click', this.clickOutside)
99
+ justify: {
100
+ required: false,
101
+ default: 'left'
113
102
  },
114
- beforeDestroy() {
115
- document.removeEventListener('click', this.clickOutside)
103
+ openingMode: {
104
+ required: false,
105
+ default: 'hover'
116
106
  },
107
+ backgroundColor: {
108
+ required: false,
109
+ default: 'white'
110
+ }
111
+ },
112
+ data() {
113
+ return {
114
+ isOpenByClick: false
115
+ }
116
+ },
117
+ methods: {
118
+ clickOutside(event) {
119
+ if (this.openingMode != 'click') return
120
+ if (
121
+ this.$refs.dropdown &&
122
+ (this.$refs.dropdown.$el == event.target ||
123
+ this.$refs.dropdown.$el.contains(event.target))
124
+ ) {
125
+ return
126
+ } else {
127
+ this.isOpenByClick = false
128
+ }
129
+ }
130
+ },
131
+ mounted() {
132
+ document.addEventListener('click', this.clickOutside)
133
+ },
134
+ beforeDestroy() {
135
+ document.removeEventListener('click', this.clickOutside)
117
136
  }
118
- </script>
119
-
137
+ }
138
+ </script>
@@ -13,7 +13,7 @@
13
13
  // alignText="right" // default is left
14
14
  // />
15
15
 
16
- import styled from 'vue-styled-components'
16
+ import styled from 'vue3-styled-components'
17
17
 
18
18
  const TextOverlay = styled.div`
19
19
  position: absolute;
@@ -16,7 +16,7 @@
16
16
 
17
17
  <script>
18
18
  import icon from './index.vue'
19
- import styled from 'vue-styled-components'
19
+ import styled from 'vue3-styled-components'
20
20
 
21
21
  const Wrapper = styled.div`
22
22
  display: block;
@@ -36,7 +36,7 @@ const IconWrapper = styled.div`
36
36
  margin: 10px;
37
37
  `
38
38
  export default {
39
- name: 'collection',
39
+ name: 'collectionComponent',
40
40
  components: { icon, IconWrapper, Wrapper },
41
41
  props: {
42
42
  size: { required: false },
@@ -1,18 +1,12 @@
1
1
  <template>
2
2
  <Wrapper :isDisabled="disabled" :size="size" :cursor="cursor">
3
- <icon-image
4
- :disabled="disabled"
5
- :size="size"
6
- :color="color"
7
- :hoveredColor="hoveredColor"
8
- v-html="
9
- require(`!html-loader!./../../assets/svgIcons/${name.toLowerCase()}.svg`)
10
- "
11
- ></icon-image>
3
+ <IconImage :size="size" :color="color" :hoveredColor="hoveredColor">
4
+ <i v-html="svgIconModule"></i>
5
+ </IconImage>
12
6
  </Wrapper>
13
7
  </template>
14
8
 
15
- <script>
9
+ <script setup>
16
10
  // import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
17
11
  // How to use:
18
12
  //<icon
@@ -23,8 +17,8 @@
23
17
  // cursor="default"
24
18
  // />
25
19
 
26
- import styled from 'vue-styled-components'
27
-
20
+ import { computed } from 'vue'
21
+ import styled from 'vue3-styled-components'
28
22
  const wrapperAttrs = { isDisabled: Boolean, size: String, cursor: String }
29
23
  const Wrapper = styled('div', wrapperAttrs)`
30
24
  display: flex;
@@ -52,37 +46,37 @@ const IconImage = styled('div', IconImageProps)`
52
46
  }
53
47
  `
54
48
 
55
- export default {
56
- name: 'icon',
57
- components: {
58
- IconImage,
59
- Wrapper
49
+ const props = defineProps({
50
+ disabled: {
51
+ required: false,
52
+ default: false
53
+ },
54
+ name: {
55
+ required: true
56
+ },
57
+ color: {
58
+ required: false
59
+ },
60
+ hoveredColor: {
61
+ required: false
60
62
  },
61
- props: {
62
- disabled: {
63
- required: false,
64
- default: false
65
- },
66
- name: {
67
- required: true
68
- },
69
- color: {
70
- required: false
71
- },
72
- hoveredColor: {
73
- required: false
74
- },
75
- size: {
76
- required: false,
77
- default: '30px'
78
- },
79
- cursor: {
80
- required: false,
81
- default: null
82
- }
63
+ size: {
64
+ required: false,
65
+ default: '30px'
83
66
  },
84
- data() {
85
- return {}
67
+ cursor: {
68
+ required: false,
69
+ default: null
86
70
  }
87
- }
71
+ })
72
+
73
+ const svgIconsContext = import.meta.glob('../../assets/svgIcons/*.svg', {
74
+ as: 'raw'
75
+ })
76
+
77
+ const svgIconModule = computed(() => {
78
+ const moduleKey = `../../assets/svgIcons/${props.name}.svg`
79
+
80
+ return svgIconsContext[moduleKey]
81
+ })
88
82
  </script>
@@ -34,7 +34,7 @@
34
34
  // size="60px" by default, this is 30px
35
35
  // />
36
36
 
37
- import styled from 'vue-styled-components'
37
+ import styled from 'vue3-styled-components'
38
38
  import icon from '../icon'
39
39
  const wrapperAttrs = { isHovered:Boolean,borderRadius:String,disabled: Boolean, size: String,backgroundColor:String,hoveredBackgroundColor:String }
40
40
  const Wrapper = styled('div', wrapperAttrs)`
@@ -32,7 +32,7 @@
32
32
  // alignArrow="right" // which side the arrow should be on
33
33
  // />
34
34
  import theme from '../../assets/theme.js'
35
- import styled from 'vue-styled-components'
35
+ import styled from 'vue3-styled-components'
36
36
  import icon from '../icon'
37
37
 
38
38
  const textAttrs = {
@@ -156,11 +156,7 @@ export default {
156
156
  },
157
157
  computed: {
158
158
  iconColor() {
159
- return this.isActive
160
- ? this.borderColor
161
- ? this.borderColor
162
- : theme.colors.secondary
163
- : theme.colors.mediumGray
159
+ return theme.colors.mediumGray
164
160
  },
165
161
  halfComputedTextInfoWidth() {
166
162
  return parseInt(this.width) / 2
@@ -33,7 +33,7 @@
33
33
  // backgroundColor="red"
34
34
  // :isDisabled="true"
35
35
  // />
36
- import styled from 'vue-styled-components'
36
+ import styled from 'vue3-styled-components'
37
37
 
38
38
  const ComponentWrapper = styled.div`
39
39
  min-height: 18px;
@@ -48,7 +48,6 @@
48
48
  :fontSize="fontSize"
49
49
  :fontColor="fontColor"
50
50
  :backgroundColor="backgroundColor"
51
- v-on="$listeners"
52
51
  :hasSlot="hasSlot"
53
52
  :hasLabelSlot="hasLabelSlot"
54
53
  :slotSize="slotSize"
@@ -98,7 +97,7 @@
98
97
  // :minNumber="0"
99
98
  // fontColor="blue"
100
99
  // />
101
- import styled from 'vue-styled-components'
100
+ import styled from 'vue3-styled-components'
102
101
  import {
103
102
  stringToNumber,
104
103
  numberToString
@@ -44,7 +44,7 @@
44
44
  // number_max_allowed: 10,
45
45
  // unit_short_name: "cm",
46
46
  // },
47
- import styled from "vue-styled-components"
47
+ import styled from "vue3-styled-components"
48
48
  import {
49
49
  stringToNumber,
50
50
  numberToString,
@@ -59,7 +59,7 @@
59
59
  </template>
60
60
 
61
61
  <script>
62
- import styled from 'vue-styled-components'
62
+ import styled from 'vue3-styled-components'
63
63
  import InfoText from '../../infoText'
64
64
  import Icon from '../../icon'
65
65
  import ErrorMessage from '../../errorMessage'
@@ -313,8 +313,8 @@ export default {
313
313
  }
314
314
  },
315
315
  methods: {
316
- onChangeHandler($event) {
317
- this.$emit('input-change', $event)
316
+ onChangeHandler(event) {
317
+ this.$emit('input-change', event.target.value)
318
318
  },
319
319
  onInputBlur($event) {
320
320
  this.$emit('input-blur', $event.target.value)
@@ -54,7 +54,7 @@
54
54
  // { label: 'Button 4', value: 'button_4', disabled: true }
55
55
  // ]
56
56
 
57
- import styled from "vue-styled-components"
57
+ import styled from "vue3-styled-components"
58
58
  import Modal from "../../modals/modal"
59
59
  import InfoText from "../../infoText"
60
60
 
@@ -29,7 +29,7 @@
29
29
  // inputWidth="250px"
30
30
  // @on-change="function($event)"
31
31
  // />
32
- import styled from 'vue-styled-components'
32
+ import styled from 'vue3-styled-components'
33
33
 
34
34
  const Container = styled.div`
35
35
  width: 100%;