@eturnity/eturnity_reusable_components 7.18.0 → 7.20.0--EPDM-10564.2

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 (53) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/babel.config.js +2 -4
  3. package/package.json +18 -23
  4. package/src/App.vue +2 -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/card/index.vue +25 -24
  10. package/src/components/deleteIcon/DeleteIcon.stories.js +7 -7
  11. package/src/components/deleteIcon/index.vue +47 -30
  12. package/src/components/draggableInputHandle/index.vue +24 -25
  13. package/src/components/dropdown/index.vue +129 -110
  14. package/src/components/errorMessage/index.vue +10 -5
  15. package/src/components/filter/filterSettings.vue +59 -97
  16. package/src/components/filter/index.vue +3 -3
  17. package/src/components/filter/parentDropdown.vue +2 -2
  18. package/src/components/icon/iconCache.js +23 -0
  19. package/src/components/icon/iconCollection.vue +2 -2
  20. package/src/components/icon/index.vue +67 -75
  21. package/src/components/iconWrapper/index.vue +1 -4
  22. package/src/components/infoCard/index.vue +2 -3
  23. package/src/components/infoText/index.vue +2 -2
  24. package/src/components/inputs/checkbox/index.vue +21 -6
  25. package/src/components/inputs/inputNumber/index.vue +8 -11
  26. package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
  27. package/src/components/inputs/inputText/index.vue +3 -3
  28. package/src/components/inputs/radioButton/index.vue +1 -1
  29. package/src/components/inputs/searchInput/index.vue +28 -11
  30. package/src/components/inputs/select/index.vue +295 -67
  31. package/src/components/inputs/select/option/index.vue +49 -12
  32. package/src/components/inputs/slider/index.vue +16 -16
  33. package/src/components/inputs/switchField/index.vue +2 -2
  34. package/src/components/inputs/textAreaInput/index.vue +1 -1
  35. package/src/components/inputs/toggle/index.vue +2 -2
  36. package/src/components/label/index.vue +27 -31
  37. package/src/components/markerItem/index.vue +86 -0
  38. package/src/components/modals/modal/index.vue +2 -6
  39. package/src/components/navigationTabs/index.vue +27 -20
  40. package/src/components/pageSubtitle/index.vue +1 -1
  41. package/src/components/pageTitle/index.vue +13 -18
  42. package/src/components/pagination/index.vue +3 -3
  43. package/src/components/progressBar/index.vue +1 -1
  44. package/src/components/projectMarker/index.vue +16 -9
  45. package/src/components/sideMenu/index.vue +1 -1
  46. package/src/components/spinner/index.vue +7 -11
  47. package/src/components/tableDropdown/index.vue +35 -45
  48. package/src/components/tables/mainTable/exampleNested.vue +1 -1
  49. package/src/components/tables/mainTable/index.vue +10 -9
  50. package/src/components/tables/viewTable/index.vue +2 -2
  51. package/src/components/threeDots/index.vue +1 -1
  52. package/src/components/videoThumbnail/index.vue +95 -100
  53. package/src/main.js +4 -11
@@ -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/babel.config.js CHANGED
@@ -1,5 +1,3 @@
1
1
  module.exports = {
2
- presets: [
3
- '@vue/cli-plugin-babel/preset'
4
- ]
5
- }
2
+ presets: ['@vue/cli-plugin-babel/preset']
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.18.0",
3
+ "version": "7.20.0--EPDM-10564.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -10,30 +10,25 @@
10
10
  "build-storybook": "build-storybook"
11
11
  },
12
12
  "dependencies": {
13
- "@vueform/slider": "1.0.5",
13
+ "@storybook/vue3": "7.0.18",
14
+ "@vue/compat": "3.3.4",
15
+ "@vueform/slider": "2.1.10",
16
+ "@vuepic/vue-datepicker": "6.1.0",
17
+ "click-outside-vue3": "4.0.1",
14
18
  "html-loader": "0.5.5",
15
- "postcss": "^8.4.25",
16
- "v-click-outside": "2.1.4",
17
- "vue": "2.6.11",
18
- "vue-styled-components": "1.6.0",
19
- "vue2-datepicker": "3.11.1",
20
- "vuedraggable": "2.24.3",
21
- "core-js": "3.31.1"
19
+ "postcss": "8.4.25",
20
+ "vue": "3.3.4",
21
+ "vue3-styled-components": "1.2.1",
22
+ "vuedraggable": "4.1.0"
22
23
  },
23
24
  "devDependencies": {
24
- "@storybook/addon-actions": "6.2.8",
25
- "@storybook/addon-docs": "6.4.19",
26
- "@storybook/addon-essentials": "6.2.8",
27
- "@storybook/addon-links": "6.2.8",
28
- "@storybook/vue": "6.4.19",
29
- "@vue/cli-plugin-babel": "~4.5.0",
30
- "@vue/cli-plugin-eslint": "~4.5.0",
31
- "@vue/cli-service": "~4.5.0",
32
- "@vue/composition-api": "1.0.0-rc.10",
33
- "babel-eslint": "10.1.0",
34
- "eslint": "6.7.2",
35
- "eslint-plugin-vue": "6.2.2",
36
- "vue-template-compiler": "2.6.11"
25
+ "@babel/core": "7.12.16",
26
+ "@vue/cli-plugin-babel": "5.0.8",
27
+ "@vue/cli-plugin-eslint": "5.0.8",
28
+ "@vue/cli-service": "5.0.8",
29
+ "@vue/compiler-sfc": "3.3.4",
30
+ "eslint": "7.32.0",
31
+ "eslint-plugin-vue": "8.0.3"
37
32
  },
38
33
  "eslintConfig": {
39
34
  "root": true,
@@ -45,7 +40,7 @@
45
40
  "eslint:recommended"
46
41
  ],
47
42
  "parserOptions": {
48
- "parser": "babel-eslint"
43
+ "parser": "@babel/eslint-parser"
49
44
  },
50
45
  "rules": {}
51
46
  },
package/src/App.vue CHANGED
@@ -55,9 +55,9 @@
55
55
  </template>
56
56
 
57
57
  <script>
58
- import { ThemeProvider } from 'vue-styled-components'
58
+ import { ThemeProvider } from 'vue3-styled-components'
59
59
  import theme from './assets/theme'
60
- import styled from 'vue-styled-components'
60
+ import styled from 'vue3-styled-components'
61
61
  import InputNumber from '@/components/inputs/inputNumber'
62
62
 
63
63
  const PageContainer = styled.div`
@@ -1,14 +1,15 @@
1
1
  <template>
2
2
  <page-container :shouldPosition="shouldPosition">
3
3
  <button-container :data-id="dataId">
4
- <plus-button :src="require('../../assets/icons/plus_button.svg')" />
4
+ <PlusButtonSvg />
5
5
  </button-container>
6
6
  </page-container>
7
7
  </template>
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
+ import PlusButtonSvg from '../../assets/icons/plus_button.svg'
12
13
 
13
14
  const pageAttrs = { shouldPosition: Boolean }
14
15
  const PageContainer = styled('div', pageAttrs)`
@@ -46,7 +47,8 @@ export default {
46
47
  components: {
47
48
  PageContainer,
48
49
  ButtonContainer,
49
- PlusButton
50
+ PlusButton,
51
+ PlusButtonSvg
50
52
  },
51
53
  props: {
52
54
  shouldPosition: {
@@ -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;
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <page-container>
3
3
  <button-container
4
+ :id="id"
4
5
  :type="type"
5
6
  :minWidth="minWidth"
6
7
  :isDisabled="isDisabled"
@@ -25,7 +26,7 @@
25
26
  // :data-id="test_data_id"
26
27
  // />
27
28
 
28
- import styled from 'vue-styled-components'
29
+ import styled from 'vue3-styled-components'
29
30
 
30
31
  const PageContainer = styled.div``
31
32
 
@@ -98,6 +99,10 @@ export default {
98
99
  required: false,
99
100
  default: null
100
101
  },
102
+ id: {
103
+ required: false,
104
+ default: null
105
+ },
101
106
  dataId: {
102
107
  type: String,
103
108
  default: ''
@@ -1,26 +1,26 @@
1
1
  <template>
2
- <Wrapper
3
- v-show="!isLoading"
4
- :class="viewCardClass"
5
- :width="width"
6
- :minWidth="minWidth"
7
- >
8
- <Spinner v-if="isLoading" size="50px" :limitedToModal="true" />
9
- <CardWrapper v-else>
10
- <CardTitle :class="titleClass" >
11
- {{ $gettext(title) }}
12
- <et-popover
13
- v-if="showPopover && popoverText !== ''"
14
- :text="popoverText"
15
- ></et-popover>
16
- </CardTitle>
17
- <slot></slot>
18
- </CardWrapper>
19
- </Wrapper>
2
+ <Wrapper
3
+ v-show="!isLoading"
4
+ :class="viewCardClass"
5
+ :width="width"
6
+ :minWidth="minWidth"
7
+ >
8
+ <Spinner v-if="isLoading" size="50px" :limitedToModal="true" />
9
+ <CardWrapper v-else>
10
+ <CardTitle :class="titleClass">
11
+ {{ $gettext(title) }}
12
+ <et-popover
13
+ v-if="showPopover && popoverText !== ''"
14
+ :text="popoverText"
15
+ ></et-popover>
16
+ </CardTitle>
17
+ <slot></slot>
18
+ </CardWrapper>
19
+ </Wrapper>
20
20
  </template>
21
21
 
22
22
  <script>
23
- import styled from 'vue-styled-components'
23
+ import styled from 'vue3-styled-components'
24
24
  import Spinner from '../spinner'
25
25
 
26
26
  const WrapperProps = { width: [Number, String], minWidth: [Number, String] }
@@ -28,9 +28,10 @@ const Wrapper = styled('div', WrapperProps)`
28
28
  max-width: ${(props) => props.width};
29
29
  min-width: ${(props) => props.minWidth};
30
30
  padding: 20px;
31
- box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
31
+ box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
32
+ 0 1px 5px 0 rgba(0, 0, 0, 0.12);
32
33
  border-radius: 4px;
33
- background-color: ${props => props.theme.colors.white};
34
+ background-color: ${(props) => props.theme.colors.white};
34
35
  height: 100%;
35
36
  `
36
37
 
@@ -42,7 +43,7 @@ const CardWrapper = styled('div')`
42
43
  const CardTitle = styled('p')`
43
44
  font-size: 14px;
44
45
  line-height: 1;
45
- color: ${props => props.theme.colors.black};
46
+ color: ${(props) => props.theme.colors.black};
46
47
  font-weight: 700;
47
48
  margin-bottom: 10px;
48
49
  `
@@ -89,7 +90,7 @@ export default {
89
90
  Spinner,
90
91
  Wrapper,
91
92
  CardTitle,
92
- CardWrapper,
93
+ CardWrapper
93
94
  }
94
95
  }
95
- </script>
96
+ </script>
@@ -1,8 +1,8 @@
1
- import DeleteIcon from "./index.vue"
1
+ import DeleteIcon from './index.vue'
2
2
 
3
3
  export default {
4
- title: "DeleteIcon",
5
- component: DeleteIcon,
4
+ title: 'DeleteIcon',
5
+ component: DeleteIcon
6
6
  // argTypes: {},
7
7
  }
8
8
 
@@ -11,19 +11,19 @@ const Template = (args, { argTypes }) => ({
11
11
  components: { DeleteIcon },
12
12
  // The story's `args` need to be mapped into the template through the `setup()` method
13
13
  props: Object.keys(argTypes),
14
- template: '<delete-icon v-bind="$props" />',
14
+ template: '<delete-icon v-bind="$props" />'
15
15
 
16
16
  // import DeleteIcon from "@eturnity/eturnity_reusable_components/src/components/deleteIcon"
17
17
  // To use:
18
- // <delete-icon color="gray" @click.native="onDeleteItem(item)" :isDisabled="true" />
18
+ // <delete-icon color="gray" @click="onDeleteItem(item)" :isDisabled="true" />
19
19
  })
20
20
 
21
21
  export const Default = Template.bind({})
22
22
  Default.args = {
23
- isDisabled: false,
23
+ isDisabled: false
24
24
  }
25
25
 
26
26
  export const Disabled = Template.bind({})
27
27
  Disabled.args = {
28
- isDisabled: true,
28
+ isDisabled: true
29
29
  }
@@ -1,61 +1,78 @@
1
1
  <template>
2
- <wrapper
3
- @mouseover="isHovered = true"
4
- @mouseleave="isHovered = false"
5
- :isDisabled="isDisabled"
6
- >
7
- <icon-image
8
- v-if="isHovered && !isDisabled"
9
- :hoverBg="hoverBg"
10
- :src="require('../../assets/icons/delete_icon.svg')"
11
- />
12
- <icon-image
13
- v-else
14
- :src="require('../../assets/icons/delete_icon_gray.svg')"
15
- />
2
+ <wrapper :isDisabled="isDisabled">
3
+ <delete-icon-red class="icon-red" :hoverBg="hoverBg" />
4
+ <delete-icon-gray class="icon-gray" />
16
5
  </wrapper>
17
6
  </template>
18
7
 
19
8
  <script>
20
9
  // To use:
21
- // <delete-icon @click.native="onDeleteItem(item)" :isDisabled="true" />
22
- import styled from "vue-styled-components"
10
+ // <delete-icon @click="onDeleteItem(item)" :isDisabled="true" />
11
+ import styled from 'vue3-styled-components'
12
+ import SvgDelete from '../../assets/icons/delete_icon.svg'
13
+ import SvgDeleteGray from '../../assets/icons/delete_icon_gray.svg'
23
14
 
24
15
  const wrapperAttrs = { isDisabled: Boolean }
25
- const Wrapper = styled("div", wrapperAttrs)`
16
+ const Wrapper = styled('div', wrapperAttrs)`
26
17
  width: 30px;
27
18
  height: 30px;
28
- cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
19
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
20
+
21
+ .icon-red {
22
+ display: none;
23
+ }
24
+
25
+ .icon-gray {
26
+ display: inline;
27
+ }
28
+
29
+ ${(props) =>
30
+ !props.isDisabled &&
31
+ `
32
+ &:hover {
33
+ .icon-red {
34
+ display: inline;
35
+ }
36
+
37
+ .icon-gray {
38
+ display: none;
39
+ }
40
+ }
41
+ `}
29
42
  `
30
43
 
31
44
  const IconImageAttrs = { hoverBg: String }
32
- const IconImage = styled('img', IconImageAttrs)`
45
+ const DeleteIconRed = styled(SvgDelete, IconImageAttrs)`
33
46
  &:hover {
34
- background-color: ${(props) => props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
47
+ background-color: ${(props) =>
48
+ props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
49
+ border-radius: 4px;
50
+ }
51
+ `
52
+
53
+ const DeleteIconGray = styled(SvgDeleteGray, IconImageAttrs)`
54
+ &:hover {
55
+ background-color: ${(props) => props.theme.colors.grey5};
35
56
  border-radius: 4px;
36
57
  }
37
58
  `
38
59
 
39
60
  export default {
40
- name: "delete-icon",
61
+ name: 'delete-icon',
41
62
  components: {
42
63
  Wrapper,
43
- IconImage,
64
+ DeleteIconRed,
65
+ DeleteIconGray
44
66
  },
45
67
  props: {
46
68
  isDisabled: {
47
69
  required: false,
48
- default: false,
70
+ default: false
49
71
  },
50
72
  hoverBg: {
51
73
  required: false,
52
- default: '',
74
+ default: ''
53
75
  }
54
- },
55
- data() {
56
- return {
57
- isHovered: false,
58
- }
59
- },
76
+ }
60
77
  }
61
78
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Handle :height = "height" class="handle">
2
+ <Handle :height="height" class="handle">
3
3
  <Dot></Dot>
4
4
  <Dot></Dot>
5
5
  <Dot></Dot>
@@ -7,35 +7,34 @@
7
7
  </template>
8
8
 
9
9
  <script>
10
+ import styled from 'vue3-styled-components'
10
11
 
11
- import styled from 'vue-styled-components'
12
-
13
- const Handle = styled('div',{ height : String })`
14
- position:absolute;
15
- left:0;
16
- margin-right:10px;
17
- display: flex;
18
- align-items: stretch;
19
- flex-direction: column;
20
- justify-content: center;
21
- width: 14px;
22
- height:${props=> props.height};
23
- padding: 0 5px;
24
- background-color: #f3f3f7;
25
- cursor: pointer;
26
- align-items: center;
27
- `
12
+ const Handle = styled('div', { height: String })`
13
+ position: absolute;
14
+ left: 0;
15
+ margin-right: 10px;
16
+ display: flex;
17
+ align-items: stretch;
18
+ flex-direction: column;
19
+ justify-content: center;
20
+ width: 14px;
21
+ height: ${(props) => props.height};
22
+ padding: 0 5px;
23
+ background-color: #f3f3f7;
24
+ cursor: pointer;
25
+ align-items: center;
26
+ `
28
27
  const Dot = styled.div`
29
- display: inline-block;
30
- width: 4px;
31
- height: 4px;
32
- margin:2px;
33
- background-color: #0068de;
34
- `
28
+ display: inline-block;
29
+ width: 4px;
30
+ height: 4px;
31
+ margin: 2px;
32
+ background-color: #0068de;
33
+ `
35
34
 
36
35
  export default {
37
36
  name: 'draggableInputHandle',
38
- props:['height'],
37
+ props: ['height'],
39
38
  components: {
40
39
  Handle,
41
40
  Dot