@eturnity/eturnity_reusable_components 7.24.3-EPDM-11250.0 → 7.24.3-EPDM-11320.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 (68) hide show
  1. package/.eslintrc.js +125 -0
  2. package/package.json +6 -20
  3. package/src/App.vue +75 -70
  4. package/src/components/addNewButton/index.vue +24 -27
  5. package/src/components/banner/actionBanner/index.vue +32 -30
  6. package/src/components/banner/banner/index.vue +88 -80
  7. package/src/components/banner/infoBanner/index.vue +36 -44
  8. package/src/components/buttons/buttonIcon/index.vue +83 -78
  9. package/src/components/buttons/closeButton/index.vue +26 -26
  10. package/src/components/buttons/mainButton/index.vue +80 -76
  11. package/src/components/card/index.vue +56 -52
  12. package/src/components/collapsableInfoText/index.vue +81 -76
  13. package/src/components/deleteIcon/index.vue +31 -28
  14. package/src/components/draggableInputHandle/index.vue +20 -17
  15. package/src/components/dropdown/Dropdown.stories.js +8 -8
  16. package/src/components/dropdown/index.vue +75 -72
  17. package/src/components/errorMessage/index.vue +23 -23
  18. package/src/components/filter/filterSettings.vue +349 -329
  19. package/src/components/filter/index.vue +130 -130
  20. package/src/components/filter/parentDropdown.vue +43 -40
  21. package/src/components/icon/Icons.stories.js +4 -4
  22. package/src/components/icon/iconCache.js +1 -1
  23. package/src/components/icon/iconCollection.vue +40 -37
  24. package/src/components/icon/index.vue +72 -65
  25. package/src/components/iconWrapper/index.vue +122 -118
  26. package/src/components/infoCard/index.vue +20 -17
  27. package/src/components/infoText/index.vue +88 -82
  28. package/src/components/inputs/checkbox/index.vue +91 -94
  29. package/src/components/inputs/inputNumber/index.vue +508 -488
  30. package/src/components/inputs/inputNumberQuestion/index.vue +127 -124
  31. package/src/components/inputs/inputText/index.vue +265 -252
  32. package/src/components/inputs/radioButton/index.vue +135 -120
  33. package/src/components/inputs/searchInput/index.vue +84 -81
  34. package/src/components/inputs/select/index.vue +644 -631
  35. package/src/components/inputs/select/option/index.vue +91 -91
  36. package/src/components/inputs/select/select.stories.js +7 -7
  37. package/src/components/inputs/slider/index.vue +46 -46
  38. package/src/components/inputs/switchField/index.vue +159 -152
  39. package/src/components/inputs/textAreaInput/index.vue +120 -113
  40. package/src/components/inputs/toggle/index.vue +137 -127
  41. package/src/components/label/index.vue +64 -61
  42. package/src/components/markerItem/index.vue +40 -40
  43. package/src/components/modals/actionModal/index.vue +32 -29
  44. package/src/components/modals/infoModal/index.vue +34 -27
  45. package/src/components/modals/modal/index.vue +88 -80
  46. package/src/components/navigationTabs/index.vue +50 -47
  47. package/src/components/pageSubtitle/index.vue +33 -29
  48. package/src/components/pageTitle/index.vue +47 -39
  49. package/src/components/pagination/index.vue +64 -62
  50. package/src/components/progressBar/index.vue +70 -67
  51. package/src/components/projectMarker/index.vue +172 -163
  52. package/src/components/rangeSlider/Slider.vue +449 -449
  53. package/src/components/rangeSlider/index.vue +282 -270
  54. package/src/components/rangeSlider/utils/dom.js +3 -3
  55. package/src/components/selectedOptions/index.vue +51 -51
  56. package/src/components/sideMenu/index.vue +117 -109
  57. package/src/components/spinner/index.vue +37 -34
  58. package/src/components/tableDropdown/index.vue +343 -326
  59. package/src/components/tables/mainTable/index.vue +109 -106
  60. package/src/components/tables/viewTable/index.vue +105 -92
  61. package/src/components/threeDots/index.vue +174 -171
  62. package/src/components/videoThumbnail/index.vue +67 -59
  63. package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
  64. package/src/helpers/numberConverter.js +1 -3
  65. package/src/helpers/translateLang.js +10 -13
  66. package/.prettierrc +0 -7
  67. package/public/favicon.ico +0 -0
  68. package/public/index.html +0 -17
package/.eslintrc.js ADDED
@@ -0,0 +1,125 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: {
4
+ browser: true,
5
+ node: true,
6
+ es6: true
7
+ },
8
+ extends: ['plugin:vue/recommended', 'eslint:recommended',],
9
+ plugins: ['vue'],
10
+ parserOptions: {
11
+ ecmaVersion: 2020,
12
+ sourceType: 'module',
13
+ },
14
+ rules: {
15
+ 'vue/component-name-in-template-casing': ['warn', 'PascalCase', {
16
+ registeredComponentsOnly: false,
17
+ ignores: []
18
+ }],
19
+ 'vue/multi-word-component-names': ['warn', {
20
+ ignores: []
21
+ }],
22
+ 'vue/html-closing-bracket-newline': ['warn', {
23
+ singleline: 'never',
24
+ multiline: 'always'
25
+ }],
26
+ 'vue/html-closing-bracket-spacing': ['warn', {
27
+ startTag: 'never',
28
+ endTag: 'never',
29
+ selfClosingTag: 'always'
30
+ }],
31
+ "vue/no-multi-spaces": ["warn", {
32
+ "ignoreProperties": false
33
+ }],
34
+ 'vue/html-end-tags': 'warn',
35
+ 'keyword-spacing': ['warn', {
36
+ before: true, // Require a space before keywords
37
+ after: true // Require a space after keywords
38
+ }],
39
+ // Enforce one space after comma
40
+ 'comma-spacing': ['warn', {
41
+ before: false, // No space before comma
42
+ after: true // Require a space after comma
43
+ }],
44
+ 'func-call-spacing': ['warn', 'never'],
45
+ // Enforce one space around binary operators (+, -, *, /, etc.)
46
+ 'space-infix-ops': 'warn',
47
+ // Enforce no space inside parentheses
48
+ 'space-in-parens': ['warn', 'never'],
49
+ // Enforce one space before block statements (if, else, for, etc.)
50
+ 'space-before-blocks': 'warn',
51
+ // Enforce no spaces inside square brackets
52
+ 'array-bracket-spacing': ['warn', 'never'],
53
+ // Enforce one space before function parentheses
54
+ 'space-before-function-paren': ['warn', 'never'],
55
+ // Enforce one space inside braces of object literals
56
+ 'object-curly-spacing': ['warn', 'always'],
57
+ // Enforce one space before and after arrow functions (optional)
58
+ 'arrow-spacing': ['warn', { before: true, after: true }],
59
+ // Enforce one space after colon in object literals
60
+ 'key-spacing': ['warn', {
61
+ beforeColon: false, // No space before colon
62
+ afterColon: true, // Require one space after colon
63
+ mode: 'strict' // Enforce spacing between key and value
64
+ }],
65
+ 'vue/html-indent': ['warn', 2],
66
+ 'vue/html-quotes': ['warn', 'double'],
67
+ 'vue/html-self-closing': ['warn', {
68
+ html: {
69
+ void: 'always',
70
+ normal: 'never',
71
+ component: 'always'
72
+ },
73
+ svg: 'always',
74
+ math: 'always'
75
+ }],
76
+ 'vue/require-default-prop': 'warn',
77
+ 'vue/require-prop-types': 'warn',
78
+ 'vue/script-indent': ['warn', 2, {
79
+ baseIndent: 1,
80
+ switchCase: 1,
81
+ ignores: []
82
+ }],
83
+ 'vue/v-on-event-hyphenation': ['warn', 'always', {
84
+ autofix: true,
85
+ ignore: []
86
+ }],
87
+ 'vue/prop-name-casing': ['warn', 'camelCase'],
88
+ 'vue/order-in-components': 'warn',
89
+ 'vue/this-in-template': ['warn', 'never'],
90
+ 'vue/attributes-order': ['warn', {
91
+ order: [
92
+ 'DEFINITION',
93
+ 'LIST_RENDERING',
94
+ 'CONDITIONALS',
95
+ 'RENDER_MODIFIERS',
96
+ 'GLOBAL',
97
+ ['UNIQUE', 'SLOT'],
98
+ 'TWO_WAY_BINDING',
99
+ 'OTHER_DIRECTIVES',
100
+ 'OTHER_ATTR',
101
+ 'EVENTS',
102
+ 'CONTENT'
103
+ ],
104
+ alphabetical: true
105
+ }],
106
+ 'vue/no-unused-vars': 'warn',
107
+ 'vue/no-use-v-if-with-v-for': ['warn', {
108
+ allowUsingIterationVar: false
109
+ }],
110
+ 'no-unused-vars': 'warn',
111
+ 'no-undef': 'warn',
112
+ 'no-console': 'warn',
113
+ 'no-debugger': 'warn',
114
+ 'no-multi-spaces': 'warn',
115
+ 'no-mixed-spaces-and-tabs': 'warn',
116
+ "no-redeclare": "warn",
117
+ "no-unsafe-finally": "warn",
118
+ 'vue/no-v-for-template-key': 'warn',
119
+ 'vue/no-reserved-component-names': 'warn',
120
+ 'max-len': ['warn', { code: 80, tabWidth: 2, ignoreUrls: true }],
121
+ },
122
+ globals: {
123
+ _: true
124
+ }
125
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.24.3-EPDM-11250.0",
3
+ "version": "7.24.3-EPDM-11320.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -22,28 +22,14 @@
22
22
  "vuedraggable": "4.1.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@babel/core": "7.12.16",
26
- "@babel/eslint-parser": "7.12.16",
27
- "@vue/cli-plugin-babel": "5.0.8",
25
+ "babel-eslint": "10.1.0",
28
26
  "@vue/cli-plugin-eslint": "5.0.8",
29
27
  "@vue/cli-service": "5.0.8",
30
28
  "@vue/compiler-sfc": "3.3.4",
31
- "eslint": "7.32.0",
32
- "eslint-plugin-vue": "8.0.3"
33
- },
34
- "eslintConfig": {
35
- "root": true,
36
- "env": {
37
- "node": true
38
- },
39
- "extends": [
40
- "plugin:vue/essential",
41
- "eslint:recommended"
42
- ],
43
- "parserOptions": {
44
- "parser": "@babel/eslint-parser"
45
- },
46
- "rules": {}
29
+ "eslint": "8.0.1",
30
+ "eslint-config-prettier": "8.8.0",
31
+ "eslint-plugin-prettier": "4.2.1",
32
+ "eslint-plugin-vue": "9.14.1"
47
33
  },
48
34
  "browserslist": [
49
35
  "> 1%",
package/src/App.vue CHANGED
@@ -1,103 +1,108 @@
1
1
  <template>
2
- <ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
3
- <page-container>
2
+ <ThemeProvider
3
+ :style="{ height: '100%' }"
4
+ :theme="getTheme()"
5
+ >
6
+ <PageContainer>
4
7
  <br />
5
- <input-number
8
+ <InputNumber
9
+ background-color="transparent"
10
+ border-color="eturnityGrey"
11
+ input-height="34px"
12
+ input-width="420px"
13
+ :interaction-step="1"
14
+ :is-interactive="true"
15
+ :min-number="0"
16
+ :number-precision="0"
17
+ text-align="left"
18
+ unit-name="mm"
6
19
  :value="value"
7
- :minNumber="0"
8
- unitName="mm"
9
- :numberPrecision="0"
10
- backgroundColor="transparent"
11
- borderColor="eturnityGrey"
12
- inputHeight="34px"
13
- inputWidth="420px"
14
- textAlign="left"
15
- :isInteractive="true"
16
- :interactionStep="1"
17
- @on-input="inputHandler"
20
+ @input-blur="blurHandler"
18
21
  @input-change="changeHandler"
19
22
  @input-focus="focusHandler"
20
- @input-blur="blurHandler"
23
+ @on-input="inputHandler"
21
24
  >
22
- <template v-slot:label>
25
+ <template #label>
23
26
  <div>Interactive Label 1</div>
24
27
  </template>
25
- </input-number>
28
+ </InputNumber>
26
29
 
27
- <hr>
30
+ <hr />
28
31
 
29
- <input-number
32
+ <InputNumber
33
+ background-color="transparent"
34
+ border-color="eturnityGrey"
35
+ input-height="34px"
36
+ input-width="420px"
37
+ :interaction-step="1"
38
+ :is-interactive="true"
39
+ :min-number="0"
40
+ :number-precision="0"
41
+ text-align="left"
42
+ unit-name="mm"
30
43
  :value="value"
31
- :minNumber="0"
32
- unitName="mm"
33
- :numberPrecision="0"
34
- backgroundColor="transparent"
35
- borderColor="eturnityGrey"
36
- inputHeight="34px"
37
- inputWidth="420px"
38
- textAlign="left"
39
- :isInteractive="true"
40
- :interactionStep="1"
41
- @on-input="inputHandler"
44
+ @input-blur="blurHandler"
42
45
  @input-change="changeHandler"
43
46
  @input-focus="focusHandler"
44
- @input-blur="blurHandler"
47
+ @on-input="inputHandler"
45
48
  >
46
- <template v-slot:label>
49
+ <template #label>
47
50
  <div>Interactive Label 2</div>
48
51
  </template>
49
- </input-number>
52
+ </InputNumber>
50
53
 
51
- <hr>
52
- <button @click="value=42">Click to set at 42</button>
53
- </page-container>
54
+ <hr />
55
+ <button @click="value=42">
56
+ Click to set at 42
57
+ </button>
58
+ </PageContainer>
54
59
  </ThemeProvider>
55
60
  </template>
56
61
 
57
62
  <script>
58
- import { ThemeProvider } from 'vue3-styled-components'
59
- import theme from './assets/theme'
60
- import styled from 'vue3-styled-components'
61
- import InputNumber from '@/components/inputs/inputNumber'
63
+ import { ThemeProvider } from 'vue3-styled-components'
64
+ import theme from './assets/theme'
65
+ import styled from 'vue3-styled-components'
66
+ import InputNumber from '@/components/inputs/inputNumber'
62
67
 
63
- const PageContainer = styled.div`
68
+ const PageContainer = styled.div`
64
69
  padding: 40px;
65
70
  `
66
71
 
67
- export default {
68
- name: 'App',
69
- components: {
70
- ThemeProvider,
71
- PageContainer,
72
- InputNumber,
73
- },
74
- data() {
75
- return {
76
- value: 42,
77
- }
78
- },
79
- computed: {
80
- },
81
- methods: {
82
- blurHandler(e) {
83
- console.log('blur', e)
72
+ export default {
73
+ name: 'App',
74
+ components: {
75
+ ThemeProvider,
76
+ PageContainer,
77
+ InputNumber,
84
78
  },
85
- changeHandler(e) {
86
- console.log('change', e)
79
+ data() {
80
+ return {
81
+ value: 42,
82
+ }
87
83
  },
88
- focusHandler(e) {
89
- console.log('focus', e)
84
+ computed: {
90
85
  },
91
- inputHandler(e) {
92
- console.log('input', e)
93
- //this.value = e
94
- setTimeout(()=>{this.value = e},1000)
95
- },
96
- getTheme() {
97
- return theme
86
+ methods: {
87
+ blurHandler(e) {
88
+ console.log('blur', e)
89
+ },
90
+ changeHandler(e) {
91
+ console.log('change', e)
92
+ },
93
+ focusHandler(e) {
94
+ console.log('focus', e)
95
+ },
96
+ inputHandler(e) {
97
+ console.log('input', e)
98
+ //this.value = e
99
+ setTimeout(() => {this.value = e}, 1000)
100
+ },
101
+ getTheme() {
102
+ return theme
103
+ }
98
104
  }
99
105
  }
100
- }
101
106
  </script>
102
107
 
103
108
  <style>
@@ -1,24 +1,24 @@
1
1
  <template>
2
- <page-container :shouldPosition="shouldPosition">
3
- <button-container :data-id="dataId">
2
+ <PageContainer :should-position="shouldPosition">
3
+ <ButtonContainer :data-id="dataId">
4
4
  <PlusButtonSvg />
5
- </button-container>
6
- </page-container>
5
+ </ButtonContainer>
6
+ </PageContainer>
7
7
  </template>
8
8
 
9
9
  <script>
10
10
  // import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
11
- import styled from 'vue3-styled-components'
12
- import PlusButtonSvg from '../../assets/icons/plus_button.svg'
11
+ import styled from 'vue3-styled-components'
12
+ import PlusButtonSvg from '../../assets/icons/plus_button.svg'
13
13
 
14
- const pageAttrs = { shouldPosition: Boolean }
15
- const PageContainer = styled('div', pageAttrs)`
14
+ const pageAttrs = { shouldPosition: Boolean }
15
+ const PageContainer = styled('div', pageAttrs)`
16
16
  position: ${(props) => (props.shouldPosition ? 'fixed' : 'unset')};
17
17
  bottom: 30px;
18
18
  right: 30px;
19
19
  `
20
20
 
21
- const ButtonContainer = styled.div`
21
+ const ButtonContainer = styled.div`
22
22
  height: 60px;
23
23
  width: 60px;
24
24
  background-color: ${(props) => props.theme.colors.green};
@@ -40,25 +40,22 @@ const ButtonContainer = styled.div`
40
40
  }
41
41
  `
42
42
 
43
- const PlusButton = styled.img``
44
-
45
- export default {
46
- name: 'add-new-button',
47
- components: {
48
- PageContainer,
49
- ButtonContainer,
50
- PlusButton,
51
- PlusButtonSvg
52
- },
53
- props: {
54
- shouldPosition: {
55
- required: false,
56
- default: true
43
+ export default {
44
+ name: 'AddNewButton',
45
+ components: {
46
+ PageContainer,
47
+ ButtonContainer,
48
+ PlusButtonSvg
57
49
  },
58
- dataId: {
59
- type: String,
60
- default: ''
50
+ props: {
51
+ shouldPosition: {
52
+ required: false,
53
+ default: true
54
+ },
55
+ dataId: {
56
+ type: String,
57
+ default: ''
58
+ }
61
59
  }
62
60
  }
63
- }
64
61
  </script>
@@ -1,28 +1,30 @@
1
1
  <template>
2
- <Modal :is-open="isOpen" @on-close="closeModal">
3
- <modalContainer>
4
- <modalTitle v-if="$slots.title">
2
+ <Modal
3
+ :is-open="isOpen"
4
+ @on-close="closeModal"
5
+ >
6
+ <ModalContainer>
7
+ <ModalTitle v-if="$slots.title">
5
8
  <slot name="title"></slot>
6
- </modalTitle>
7
- <textContainer v-if="$slots.body">
9
+ </ModalTitle>
10
+ <TextContainer v-if="$slots.body">
8
11
  <slot name="body"></slot>
9
- </textContainer>
10
- <buttonContainer v-if="$slots.buttons">
12
+ </TextContainer>
13
+ <ButtonContainer v-if="$slots.buttons">
11
14
  <slot name="buttons"></slot>
12
- </buttonContainer>
13
- </modalContainer>
15
+ </ButtonContainer>
16
+ </ModalContainer>
14
17
  </Modal>
15
18
  </template>
16
19
  <script>
17
- import styled from 'vue3-styled-components'
18
- import { mapActions, mapState } from 'vuex'
19
- import Modal from '../modal'
20
- const modalContainer = styled.div`
20
+ import styled from 'vue3-styled-components'
21
+ import Modal from '../modal'
22
+ const ModalContainer = styled.div`
21
23
  width: 450px;
22
24
  min-height: 205px;
23
25
  padding: 40px 40px 30px 40px;
24
26
  `
25
- const modalTitle = styled.div`
27
+ const ModalTitle = styled.div`
26
28
  color: ${(props) => props.theme.colors.black};
27
29
  font-family: ${(props) => props.theme.fonts.mainFont};
28
30
  font-size: 18px;
@@ -31,12 +33,12 @@ const modalTitle = styled.div`
31
33
  line-height: 120%;
32
34
  text-transform: uppercase;
33
35
  `
34
- const buttonContainer = styled.div`
36
+ const ButtonContainer = styled.div`
35
37
  display: inline-flex;
36
38
  align-items: flex-start;
37
39
  gap: 20px;
38
40
  `
39
- const textContainer = styled.div`
41
+ const TextContainer = styled.div`
40
42
  color: ${(props) => props.theme.colors.black};
41
43
  font-family: ${(props) => props.theme.fonts.mainFont};
42
44
  font-size: 13px;
@@ -46,20 +48,20 @@ const textContainer = styled.div`
46
48
  padding: 30px 0px;
47
49
  white-space: pre-wrap;
48
50
  `
49
- export default {
50
- name: 'actionModal',
51
- props: ['isOpen'],
52
- components: {
53
- Modal,
54
- modalContainer,
55
- modalTitle,
56
- buttonContainer,
57
- textContainer
58
- },
59
- methods: {
60
- closeModal() {
61
- this.$emit('on-close')
51
+ export default {
52
+ name: 'ActionModal',
53
+ components: {
54
+ Modal,
55
+ ModalContainer,
56
+ ModalTitle,
57
+ ButtonContainer,
58
+ TextContainer
59
+ },
60
+ props: ['isOpen'],
61
+ methods: {
62
+ closeModal() {
63
+ this.$emit('on-close')
64
+ }
62
65
  }
63
66
  }
64
- }
65
67
  </script>