@eturnity/eturnity_reusable_components 6.33.1-EPDM-7956 → 6.33.1-EPDM-7762.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.
Files changed (41) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/package.json +18 -15
  3. package/src/App.vue +2 -2
  4. package/src/assets/theme.js +3 -3
  5. package/src/components/addNewButton/index.vue +1 -1
  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 +1 -1
  9. package/src/components/deleteIcon/index.vue +1 -1
  10. package/src/components/dropdown/index.vue +110 -129
  11. package/src/components/errorMessage/index.vue +1 -1
  12. package/src/components/icon/iconCollection.vue +2 -2
  13. package/src/components/icon/index.vue +42 -36
  14. package/src/components/iconWrapper/index.vue +1 -1
  15. package/src/components/infoText/index.vue +6 -2
  16. package/src/components/inputs/checkbox/index.vue +1 -1
  17. package/src/components/inputs/inputNumber/index.vue +2 -1
  18. package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
  19. package/src/components/inputs/inputText/index.vue +3 -3
  20. package/src/components/inputs/radioButton/index.vue +1 -1
  21. package/src/components/inputs/searchInput/index.vue +1 -1
  22. package/src/components/inputs/select/index.vue +23 -17
  23. package/src/components/inputs/select/option/index.vue +1 -1
  24. package/src/components/inputs/slider/index.vue +1 -1
  25. package/src/components/inputs/switchField/index.vue +1 -1
  26. package/src/components/inputs/textAreaInput/index.vue +1 -1
  27. package/src/components/inputs/toggle/index.vue +1 -1
  28. package/src/components/modals/modal/index.vue +1 -1
  29. package/src/components/pageSubtitle/index.vue +1 -1
  30. package/src/components/pageTitle/index.vue +1 -1
  31. package/src/components/pagination/index.vue +12 -12
  32. package/src/components/progressBar/index.vue +1 -1
  33. package/src/components/projectMarker/index.vue +1 -1
  34. package/src/components/spinner/index.vue +1 -1
  35. package/src/components/tableDropdown/index.vue +4 -4
  36. package/src/components/tables/mainTable/exampleNested.vue +1 -1
  37. package/src/components/tables/mainTable/index.vue +1 -1
  38. package/src/components/tables/viewTable/index.vue +3 -3
  39. package/src/components/threeDots/index.vue +1 -1
  40. package/src/components/videoThumbnail/index.vue +100 -95
  41. package/src/main.js +9 -4
@@ -1,4 +1,4 @@
1
- import { ThemeProvider } from "vue3-styled-components"
1
+ import { ThemeProvider } from "vue-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-7956",
3
+ "version": "6.33.1-EPDM-7762.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -10,24 +10,27 @@
10
10
  "build-storybook": "build-storybook"
11
11
  },
12
12
  "dependencies": {
13
- "@storybook/vue3": "^7.0.18",
14
- "@vue/compat": "^3.3.4",
15
13
  "@vueform/slider": "1.0.5",
16
- "external-svg-loader": "^1.6.7",
14
+ "core-js": "^3.31.1",
17
15
  "html-loader": "0.5.5",
18
16
  "v-click-outside": "2.1.4",
19
- "vue": "3.3.4",
20
- "vue3-styled-components": "^1.2.1"
17
+ "vue": "2.6.11",
18
+ "vue-styled-components": "1.6.0"
21
19
  },
22
20
  "devDependencies": {
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"
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"
31
34
  },
32
35
  "eslintConfig": {
33
36
  "root": true,
@@ -39,7 +42,7 @@
39
42
  "eslint:recommended"
40
43
  ],
41
44
  "parserOptions": {
42
- "parser": "@babel/eslint-parser"
45
+ "parser": "babel-eslint"
43
46
  },
44
47
  "rules": {}
45
48
  },
package/src/App.vue CHANGED
@@ -94,9 +94,9 @@
94
94
  </template>
95
95
 
96
96
  <script>
97
- import { ThemeProvider } from 'vue3-styled-components'
97
+ import { ThemeProvider } from 'vue-styled-components'
98
98
  import theme from './assets/theme'
99
- import styled from 'vue3-styled-components'
99
+ import styled from 'vue-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'
@@ -3,7 +3,7 @@ const theme = {
3
3
  primary: '#48a2d0',
4
4
  secondary: '#fdb813',
5
5
  tertiary: '#d5d5d5',
6
- black: '#353535',
6
+ black: '#263238',
7
7
  yellow: '#fdb813',
8
8
  darkGray: '#818181',
9
9
  gray1: '#666',
@@ -20,8 +20,8 @@ const theme = {
20
20
  grey5: '#fafafa',
21
21
  grey6: '#555d61',
22
22
  green: '#99db0c',
23
- transparentWhite1:'#ffffff32',
24
- transparentBlack1:'#263238e6',
23
+ transparentWhite1: '#ffffff32',
24
+ transparentBlack1: '#263238e6',
25
25
  disabled: '#dfe1e1',
26
26
  eturnityGrey: '#263238'
27
27
  },
@@ -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 "vue3-styled-components"
11
+ import styled from "vue-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 "vue3-styled-components"
35
+ import styled from "vue-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 'vue3-styled-components'
16
+ import styled from 'vue-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 "vue3-styled-components"
25
+ import styled from "vue-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 "vue3-styled-components"
22
+ import styled from "vue-styled-components"
23
23
 
24
24
  const wrapperAttrs = { isDisabled: Boolean }
25
25
  const Wrapper = styled("div", wrapperAttrs)`
@@ -1,138 +1,119 @@
1
1
  <template>
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>
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">
24
20
 
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">
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;
31
29
 
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'
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
90
66
  },
91
- gap: {
92
- required: false,
93
- default: '10px'
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
+ }
94
92
  },
95
- position: {
96
- required: false,
97
- default: 'bottom'
93
+ data() {
94
+ return {
95
+ isOpenByClick:false
96
+ }
98
97
  },
99
- justify: {
100
- required: false,
101
- default: 'left'
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
+ },
102
110
  },
103
- openingMode: {
104
- required: false,
105
- default: 'hover'
111
+ mounted() {
112
+ document.addEventListener('click', this.clickOutside)
113
+ },
114
+ beforeDestroy() {
115
+ document.removeEventListener('click', this.clickOutside)
106
116
  },
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)
136
117
  }
137
- }
138
- </script>
118
+ </script>
119
+
@@ -13,7 +13,7 @@
13
13
  // alignText="right" // default is left
14
14
  // />
15
15
 
16
- import styled from 'vue3-styled-components'
16
+ import styled from 'vue-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 'vue3-styled-components'
19
+ import styled from 'vue-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: 'collectionComponent',
39
+ name: 'collection',
40
40
  components: { icon, IconWrapper, Wrapper },
41
41
  props: {
42
42
  size: { required: false },
@@ -1,12 +1,18 @@
1
1
  <template>
2
2
  <Wrapper :isDisabled="disabled" :size="size" :cursor="cursor">
3
- <IconImage :size="size" :color="color" :hoveredColor="hoveredColor">
4
- <i v-html="svgIconModule"></i>
5
- </IconImage>
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>
6
12
  </Wrapper>
7
13
  </template>
8
14
 
9
- <script setup>
15
+ <script>
10
16
  // import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
11
17
  // How to use:
12
18
  //<icon
@@ -17,8 +23,8 @@
17
23
  // cursor="default"
18
24
  // />
19
25
 
20
- import { computed } from 'vue'
21
- import styled from 'vue3-styled-components'
26
+ import styled from 'vue-styled-components'
27
+
22
28
  const wrapperAttrs = { isDisabled: Boolean, size: String, cursor: String }
23
29
  const Wrapper = styled('div', wrapperAttrs)`
24
30
  display: flex;
@@ -46,37 +52,37 @@ const IconImage = styled('div', IconImageProps)`
46
52
  }
47
53
  `
48
54
 
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
55
+ export default {
56
+ name: 'icon',
57
+ components: {
58
+ IconImage,
59
+ Wrapper
62
60
  },
63
- size: {
64
- required: false,
65
- default: '30px'
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
+ }
66
83
  },
67
- cursor: {
68
- required: false,
69
- default: null
84
+ data() {
85
+ return {}
70
86
  }
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
- })
87
+ }
82
88
  </script>
@@ -34,7 +34,7 @@
34
34
  // size="60px" by default, this is 30px
35
35
  // />
36
36
 
37
- import styled from 'vue3-styled-components'
37
+ import styled from 'vue-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 'vue3-styled-components'
35
+ import styled from 'vue-styled-components'
36
36
  import icon from '../icon'
37
37
 
38
38
  const textAttrs = {
@@ -156,7 +156,11 @@ export default {
156
156
  },
157
157
  computed: {
158
158
  iconColor() {
159
- return theme.colors.mediumGray
159
+ return this.isActive
160
+ ? this.borderColor
161
+ ? this.borderColor
162
+ : theme.colors.secondary
163
+ : theme.colors.mediumGray
160
164
  },
161
165
  halfComputedTextInfoWidth() {
162
166
  return parseInt(this.width) / 2
@@ -33,7 +33,7 @@
33
33
  // backgroundColor="red"
34
34
  // :isDisabled="true"
35
35
  // />
36
- import styled from 'vue3-styled-components'
36
+ import styled from 'vue-styled-components'
37
37
 
38
38
  const ComponentWrapper = styled.div`
39
39
  min-height: 18px;
@@ -48,6 +48,7 @@
48
48
  :fontSize="fontSize"
49
49
  :fontColor="fontColor"
50
50
  :backgroundColor="backgroundColor"
51
+ v-on="$listeners"
51
52
  :hasSlot="hasSlot"
52
53
  :hasLabelSlot="hasLabelSlot"
53
54
  :slotSize="slotSize"
@@ -97,7 +98,7 @@
97
98
  // :minNumber="0"
98
99
  // fontColor="blue"
99
100
  // />
100
- import styled from 'vue3-styled-components'
101
+ import styled from 'vue-styled-components'
101
102
  import {
102
103
  stringToNumber,
103
104
  numberToString
@@ -44,7 +44,7 @@
44
44
  // number_max_allowed: 10,
45
45
  // unit_short_name: "cm",
46
46
  // },
47
- import styled from "vue3-styled-components"
47
+ import styled from "vue-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 'vue3-styled-components'
62
+ import styled from 'vue-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.target.value)
316
+ onChangeHandler($event) {
317
+ this.$emit('input-change', $event)
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 "vue3-styled-components"
57
+ import styled from "vue-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 'vue3-styled-components'
32
+ import styled from 'vue-styled-components'
33
33
 
34
34
  const Container = styled.div`
35
35
  width: 100%;
@@ -131,7 +131,7 @@
131
131
  // </template>
132
132
  // </Select>
133
133
 
134
- import styled from 'vue3-styled-components'
134
+ import styled from 'vue-styled-components'
135
135
  import InfoText from '../../infoText'
136
136
  import icon from '../../icon'
137
137
  import inputText from '../inputText'
@@ -153,7 +153,7 @@ const Selector = styled.div`
153
153
  width: 100%;
154
154
  `
155
155
 
156
- const labelAttrs = { fontSize: String }
156
+ const labelAttrs = { fontSize: String, fontColor: String }
157
157
  const InputLabel = styled('div', labelAttrs)`
158
158
  color: ${(props) =>
159
159
  props.theme.colors[props.fontColor]
@@ -427,7 +427,9 @@ export default {
427
427
  const optionElement = this.$el.querySelector(`[data-value="${e}"]`)
428
428
  if (this.$refs.dropdown) {
429
429
  this.hoveredIndex =
430
- [...this.$refs.dropdown.$el.children].indexOf(optionElement) + 1
430
+ this.$refs.dropdown.$children
431
+ .map((component) => component.$el)
432
+ .indexOf(optionElement) + 1
431
433
  }
432
434
  },
433
435
  mouseEnterHandler() {
@@ -444,13 +446,15 @@ export default {
444
446
  searchChange(value) {
445
447
  this.textSearch = value
446
448
  this.$emit('search-change', value)
447
- ;[...this.$refs.dropdown.$el.children].forEach((el) => {
448
- if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
449
- el.style.display = 'none'
450
- } else {
451
- el.style.display = 'inherit'
452
- }
453
- })
449
+ this.$refs.dropdown.$children
450
+ .map((component) => component.$el)
451
+ .forEach((el) => {
452
+ if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
453
+ el.style.display = 'none'
454
+ } else {
455
+ el.style.display = 'inherit'
456
+ }
457
+ })
454
458
  },
455
459
  onSelectSlotClick() {
456
460
  this.toggleDropdown()
@@ -472,9 +476,10 @@ export default {
472
476
  } else if (e.key == 'ArrowUp') {
473
477
  this.onArrowPress(-1)
474
478
  } else if (e.key == 'Enter') {
475
- const optionHoveredComponent = [...this.$refs.dropdown.$el.children][
476
- (this.hoveredIndex - 1 + this.optionLength) % this.optionLength
477
- ]
479
+ const optionHoveredComponent =
480
+ this.$refs.dropdown.$children[
481
+ (this.hoveredIndex - 1 + this.optionLength) % this.optionLength
482
+ ]
478
483
  this.optionSelected(optionHoveredComponent.$el.dataset.value)
479
484
  }
480
485
  },
@@ -483,9 +488,10 @@ export default {
483
488
  ((this.hoveredIndex + dir + this.optionLength - 1) %
484
489
  this.optionLength) +
485
490
  1
486
- const optionHoveredComponent = [...this.$refs.dropdown.$el.children][
487
- (this.hoveredIndex - 1 + this.optionLength) % this.optionLength
488
- ]
491
+ const optionHoveredComponent =
492
+ this.$refs.dropdown.$children[
493
+ (this.hoveredIndex - 1 + this.optionLength) % this.optionLength
494
+ ]
489
495
  const topPos = optionHoveredComponent.$el.offsetTop
490
496
  this.$refs.dropdown.$el.scrollTop = topPos
491
497
  }
@@ -493,7 +499,7 @@ export default {
493
499
  computed: {
494
500
  optionLength() {
495
501
  if (this.isDropdownOpen) {
496
- return this.$refs.dropdown.$el.childElementCount
502
+ return this.$refs.dropdown.$children.length
497
503
  } else {
498
504
  return 0
499
505
  }
@@ -7,7 +7,7 @@
7
7
  <script>
8
8
  // import selectButton from './selectButton'
9
9
  // import selectDropdown from './selectDropDown'
10
- import styled from 'vue3-styled-components'
10
+ import styled from 'vue-styled-components'
11
11
  const optionProps={hoveredBgColor:String}
12
12
  const optionContainer = styled('div',optionProps)`
13
13
  display:flex;
@@ -22,7 +22,7 @@
22
22
  // :maxValue="500" //default is 100 if not specified
23
23
  // />
24
24
  import Slider from "@vueform/slider/dist/slider.vue2.js"
25
- import styled from "vue3-styled-components"
25
+ import styled from "vue-styled-components"
26
26
 
27
27
  const Container = styled.div`
28
28
  margin: 16px 0 16px 21px;
@@ -73,7 +73,7 @@
73
73
  // :disabled="false"
74
74
  // />
75
75
 
76
- import styled from 'vue3-styled-components'
76
+ import styled from 'vue-styled-components'
77
77
  import InfoText from '../../infoText'
78
78
  import theme from '../../../assets/theme'
79
79
  const Container = styled.div``
@@ -51,7 +51,7 @@
51
51
  // :isDisabled="true"
52
52
  // . fontSize="13px"
53
53
  // />
54
- import styled from 'vue3-styled-components'
54
+ import styled from 'vue-styled-components'
55
55
  import InfoText from '../../infoText'
56
56
  import ErrorMessage from '../../errorMessage'
57
57
 
@@ -71,7 +71,7 @@
71
71
  // infoTextMessage="My info message"
72
72
  // />
73
73
 
74
- import styled from "vue3-styled-components"
74
+ import styled from "vue-styled-components"
75
75
  import InfoText from "../../infoText"
76
76
 
77
77
  const Container = styled.div`
@@ -28,7 +28,7 @@
28
28
  // <div>Data....</div>
29
29
  // </modal>
30
30
 
31
- import styled from 'vue3-styled-components'
31
+ import styled from 'vue-styled-components'
32
32
  import CloseButton from '../../buttons/closeButton'
33
33
  import Spinner from '../../spinner'
34
34
 
@@ -21,7 +21,7 @@
21
21
  // color="red"
22
22
  // infoText="My info text"
23
23
  // />
24
- import styled from "vue3-styled-components"
24
+ import styled from "vue-styled-components"
25
25
  import InfoText from "../infoText"
26
26
 
27
27
  const textAttrs = { color: String, hasInfoText: Boolean, marginBottom: String }
@@ -9,7 +9,7 @@
9
9
  // text="My Page Title"
10
10
  // color="red"
11
11
  // />
12
- import styled from "vue3-styled-components"
12
+ import styled from "vue-styled-components"
13
13
 
14
14
  const textAttrs = { color: String, fontSize: String, uppercase: Boolean }
15
15
  const TitleText = styled("div", textAttrs)`
@@ -11,17 +11,17 @@
11
11
  </arrowIconContainer>
12
12
  <arrowText>{{ $gettext('back') }}</arrowText>
13
13
  </paginationLink>
14
-
14
+
15
15
  <!-- First page -->
16
16
  <paginationLink
17
17
  v-if="currentPage > 2 && paginationParams.pages > 3"
18
18
  @click="fetchPage(1)"
19
19
  >1</paginationLink
20
20
  >
21
-
21
+
22
22
  <!-- Back tree dots -->
23
23
  <span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
24
-
24
+
25
25
  <!-- Current block -->
26
26
  <paginationLink
27
27
  v-for="number in paginationNumbers()"
@@ -30,7 +30,7 @@
30
30
  @click="fetchPage(number)"
31
31
  >{{ number }}</paginationLink
32
32
  >
33
-
33
+
34
34
  <!-- Forward tree dots -->
35
35
  <span
36
36
  v-if="
@@ -38,7 +38,7 @@
38
38
  "
39
39
  >...</span
40
40
  >
41
-
41
+
42
42
  <!-- End page -->
43
43
  <paginationLink
44
44
  v-if="
@@ -47,7 +47,7 @@
47
47
  @click="fetchPage(paginationParams.pages)"
48
48
  >{{ paginationParams.pages }}</paginationLink
49
49
  >
50
-
50
+
51
51
  <!-- Forward button -->
52
52
  <paginationLink
53
53
  v-if="paginationParams.next"
@@ -60,12 +60,11 @@
60
60
  </paginationLink>
61
61
  </paginationWrapper>
62
62
  </template>
63
-
64
- <script>
65
- import styled from "vue3-styled-components"
66
- import icon from "../icon"
67
-
68
- const paginationWrapper=styled.nav`
63
+
64
+ <script>
65
+ import styled from "vue-styled-components"
66
+ import icon from "../icon"
67
+ const paginationWrapper=styled.nav`
69
68
  color: #1a237e;
70
69
  font-size: 13px;
71
70
  display: -webkit-box;
@@ -135,3 +134,4 @@ const paginationWrapper=styled.nav`
135
134
  }
136
135
  }
137
136
  </script>
137
+
@@ -31,7 +31,7 @@
31
31
  // stepNumber="4"
32
32
  // :labelText="translate('step')"
33
33
  // />
34
- import styled from "vue3-styled-components"
34
+ import styled from "vue-styled-components"
35
35
 
36
36
  const Container = styled.div`
37
37
  display: grid;
@@ -88,7 +88,7 @@
88
88
  // @deleteHandler="onMarkerDelete($event)"
89
89
  // />
90
90
 
91
- import styled from "vue3-styled-components"
91
+ import styled from "vue-styled-components"
92
92
  import Icon from "../icon"
93
93
  import Modal from '../modals/modal'
94
94
  import PageTitle from '../pageTitle'
@@ -18,7 +18,7 @@
18
18
  <script>
19
19
  // import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
20
20
  // <spinner size="30px" />
21
- import styled from 'vue3-styled-components'
21
+ import styled from 'vue-styled-components'
22
22
 
23
23
  const SpinnerContainer = styled.div`
24
24
  position: fixed;
@@ -186,10 +186,10 @@
186
186
  // :optionsDisplay="['display_name', 'company_item_number']" // Array. what should be displayed
187
187
  // :disabled="true"
188
188
  // />
189
- import styled from 'vue3-styled-components'
190
- import Spinner from '@/components/spinner'
191
- import SearchInput from '@/components/inputs/searchInput'
192
- import InputText from '@/components/inputs/inputText'
189
+ import styled from 'vue-styled-components'
190
+ import Spinner from '@eturnity/eturnity_reusable_components/src/components/spinner'
191
+ import SearchInput from '@eturnity/eturnity_reusable_components/src/components/inputs/searchInput'
192
+ import InputText from '@eturnity/eturnity_reusable_components/src/components/inputs/inputText'
193
193
 
194
194
  const rowAttrs = { disabled: Boolean, isOpen: Boolean }
195
195
  const DropdownRow = styled('div', rowAttrs)`
@@ -161,7 +161,7 @@
161
161
 
162
162
  <script>
163
163
  import draggable from "vuedraggable"
164
- import styled from "vue3-styled-components"
164
+ import styled from "vue-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"
@@ -23,7 +23,7 @@
23
23
  <script>
24
24
  // ToDo: add this to storybook
25
25
  // import MainTable from "@eturnity/eturnity_reusable_components/src/components/tables/mainTable"
26
- import styled from 'vue3-styled-components'
26
+ import styled from 'vue-styled-components'
27
27
  import Spinner from '../../spinner'
28
28
 
29
29
  const PageContainer = styled.div``
@@ -45,9 +45,9 @@
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 "vue3-styled-components"
49
- import DeleteIcon from "../../deleteIcon"
50
- import Spinner from "../../spinner"
48
+ import styled from 'vue-styled-components'
49
+ import DeleteIcon from '../../deleteIcon'
50
+ import Spinner from '../../spinner'
51
51
 
52
52
  const TableScroll = styled.div`
53
53
  position: relative;
@@ -121,7 +121,7 @@
121
121
  // },
122
122
  // ],
123
123
 
124
- import styled from 'vue3-styled-components'
124
+ import styled from 'vue-styled-components'
125
125
  import Spinner from '../spinner'
126
126
 
127
127
  const PageContainer = styled.div`
@@ -1,103 +1,108 @@
1
1
  <template>
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'
22
-
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
- `
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
+ `
45
49
 
46
- export default {
47
- name: 'VideoThumbnail',
48
- components: {
49
- Wrapper,
50
- Icon,
51
- iconWrapper
52
- },
53
- props: {
54
- src: {
55
- required: true
50
+ export default {
51
+ name: 'VideoThumbnail',
52
+ components: {
53
+ Wrapper,
54
+ Icon,
55
+ iconWrapper
56
56
  },
57
- fit: {
58
- required: false,
59
- default: 'cover'
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
+ }
60
81
  },
61
- width: {
62
- required: false,
63
- default: '300px'
82
+ data() {
83
+ return {
84
+ isOpenByClick:false
85
+ }
64
86
  },
65
- height: {
66
- required: false,
67
- default: '200px'
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
+ },
68
99
  },
69
- playIconSize: {
70
- required: false,
71
- default: '50px'
100
+ mounted() {
101
+ document.addEventListener('click', this.clickOutside)
102
+ },
103
+ beforeDestroy() {
104
+ document.removeEventListener('click', this.clickOutside)
72
105
  },
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)
101
106
  }
102
- }
103
- </script>
107
+ </script>
108
+
package/src/main.js CHANGED
@@ -1,8 +1,13 @@
1
+ import Vue from "vue"
1
2
  import App from "./App.vue"
3
+ import VueCompositionAPI from "@vue/composition-api"
4
+ import vClickOutside from 'v-click-outside'
2
5
 
3
- import { createApp } from 'vue'
6
+ Vue.config.productionTip = false
4
7
 
5
- const app = createApp(App)
6
-
7
- app.mount('#app')
8
+ Vue.use(VueCompositionAPI)
9
+ Vue.use(vClickOutside)
8
10
 
11
+ new Vue({
12
+ render: (h) => h(App),
13
+ }).$mount("#app")