@eturnity/eturnity_reusable_components 9.19.2 → 9.19.4
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.
- package/package.json +20 -22
- package/src/assets/svgIcons/eraser.svg +1 -0
- package/src/assets/svgIcons/freedraw.svg +1 -0
- package/src/assets/svgIcons/line.svg +1 -0
- package/src/assets/svgIcons/polyline.svg +3 -0
- package/src/components/errorMessage/index.vue +1 -1
- package/src/components/inputs/select/index.vue +14 -2
- package/src/components/tableDropdown/index.vue +23 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
|
3
|
-
"version": "9.19.
|
|
3
|
+
"version": "9.19.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -8,25 +8,6 @@
|
|
|
8
8
|
"main": "./src/index.js",
|
|
9
9
|
"module": "./src/index.js",
|
|
10
10
|
"private": false,
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "vite",
|
|
13
|
-
"build": "vite build && npm run build:provided-files && npm run copy:provided-docs",
|
|
14
|
-
"build:provided-files": "node scripts/build-provided-files.js",
|
|
15
|
-
"verify:provided-files": "node scripts/verify-provided-files.js",
|
|
16
|
-
"copy:provided-docs": "node scripts/copy-provided-docs.js",
|
|
17
|
-
"verify:provided-docs": "node scripts/verify-provided-docs.js",
|
|
18
|
-
"purge:provided-files-cache": "node scripts/purge-provided-files-cache.js",
|
|
19
|
-
"promote:provided-files-tag": "node scripts/promote-provided-files-tag.js",
|
|
20
|
-
"lint": "vue-cli-service lint",
|
|
21
|
-
"storybook": "storybook dev -p 6006",
|
|
22
|
-
"build-storybook": "storybook build",
|
|
23
|
-
"prettier": "prettier --write 'src/**/*.{js,vue}'",
|
|
24
|
-
"test": "jest",
|
|
25
|
-
"test-coverage": "jest --coverage",
|
|
26
|
-
"merge-remote-master": "node scripts/merge-remote-master.js",
|
|
27
|
-
"prepack": "npm run verify:provided-files && npm run verify:provided-docs",
|
|
28
|
-
"prepublishOnly": "npm run test && npm run build && npm run verify:provided-files && npm run verify:provided-docs"
|
|
29
|
-
},
|
|
30
11
|
"peerDependencies": {
|
|
31
12
|
"vue": "^3.0.0",
|
|
32
13
|
"vue3-styled-components": "^1.0.0"
|
|
@@ -94,5 +75,22 @@
|
|
|
94
75
|
},
|
|
95
76
|
"author": "Aaron Enser",
|
|
96
77
|
"license": "ISC",
|
|
97
|
-
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
|
|
98
|
-
|
|
78
|
+
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme",
|
|
79
|
+
"scripts": {
|
|
80
|
+
"dev": "vite",
|
|
81
|
+
"build": "vite build && npm run build:provided-files && npm run copy:provided-docs",
|
|
82
|
+
"build:provided-files": "node scripts/build-provided-files.js",
|
|
83
|
+
"verify:provided-files": "node scripts/verify-provided-files.js",
|
|
84
|
+
"copy:provided-docs": "node scripts/copy-provided-docs.js",
|
|
85
|
+
"verify:provided-docs": "node scripts/verify-provided-docs.js",
|
|
86
|
+
"purge:provided-files-cache": "node scripts/purge-provided-files-cache.js",
|
|
87
|
+
"promote:provided-files-tag": "node scripts/promote-provided-files-tag.js",
|
|
88
|
+
"lint": "vue-cli-service lint",
|
|
89
|
+
"storybook": "storybook dev -p 6006",
|
|
90
|
+
"build-storybook": "storybook build",
|
|
91
|
+
"prettier": "prettier --write 'src/**/*.{js,vue}'",
|
|
92
|
+
"test": "jest",
|
|
93
|
+
"test-coverage": "jest --coverage",
|
|
94
|
+
"merge-remote-master": "node scripts/merge-remote-master.js"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="m16.24 3.56l4.95 4.94c.78.79.78 2.05 0 2.84L12 20.53a4.01 4.01 0 0 1-5.66 0L2.81 17c-.78-.79-.78-2.05 0-2.84l10.6-10.6c.79-.78 2.05-.78 2.83 0M4.22 15.58l3.54 3.53c.78.79 2.04.79 2.83 0l3.53-3.53l-4.95-4.95z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 14 14"><path fill="currentColor" fill-rule="evenodd" d="M8.61 2.66c-.227-.198-.817-.365-1.602.129c-2.508 1.58-4.693 4.43-5.432 5.463a.75.75 0 1 1-1.22-.873c.75-1.047 3.078-4.112 5.853-5.86C7.41.763 8.75.795 9.594 1.527c.421.365.684.89.688 1.486c.004.591-.246 1.177-.702 1.698c-1.427 1.632-3.312 3.845-4.104 4.925c-.104.142-.111.25-.102.312c.01.07.047.136.11.183a.411.411 0 0 0 .299.067c.14-.017.36-.094.628-.339c.226-.208.461-.43.703-.657c.745-.701 1.55-1.46 2.356-2.053c.838-.616 1.818-.787 2.561-.333c.371.227.632.59.723 1.024c.09.43.004.878-.213 1.29c-.232.442-.434.76-.615 1.046l-.014.023a10.6 10.6 0 0 0-.485.819a.506.506 0 0 0-.024.415c.024.06.047.089.06.101c.092.007.172-.016.299-.114c.178-.139.377-.374.676-.766a.75.75 0 0 1 1.192.911c-.285.373-.594.764-.948 1.04c-.392.304-.867.489-1.444.413c-.633-.082-1.048-.57-1.231-1.037a2.007 2.007 0 0 1 .09-1.658c.19-.364.37-.647.541-.916l.021-.034c.177-.279.352-.556.555-.942c.085-.162.077-.255.071-.284a.068.068 0 0 0-.036-.051c-.043-.027-.347-.138-.89.262c-.726.533-1.433 1.2-2.16 1.884c-.255.24-.513.483-.775.723c-.923.846-2.047.959-2.838.367c-.77-.576-.981-1.68-.32-2.582c.837-1.142 2.767-3.405 4.185-5.026l.513.448l-.513-.448c.271-.31.332-.555.331-.702a.468.468 0 0 0-.171-.362Zm2.863 8.883l-.003-.002c.002 0 .003.001.003.002" clip-rule="evenodd"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42"></path></svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18 1.72728C18 2.62728 17.2636 3.36364 16.3636 3.36364C16.2164 3.36364 16.0773 3.34728 15.9464 3.30637L13.0336 6.21091C13.0745 6.34182 13.0909 6.48909 13.0909 6.63637C13.0909 7.53637 12.3545 8.27273 11.4545 8.27273C10.5545 8.27273 9.81818 7.53637 9.81818 6.63637C9.81818 6.48909 9.83455 6.34182 9.87545 6.21091L7.78909 4.12455C7.65818 4.16546 7.51091 4.18182 7.36364 4.18182C7.21636 4.18182 7.06909 4.16546 6.93818 4.12455L3.21545 7.85546C3.25636 7.98637 3.27273 8.12546 3.27273 8.27273C3.27273 9.17273 2.53636 9.90909 1.63636 9.90909C0.736364 9.90909 0 9.17273 0 8.27273C0 7.37273 0.736364 6.63637 1.63636 6.63637C1.78364 6.63637 1.92273 6.65273 2.05364 6.69364L5.78454 2.97091C5.74364 2.84 5.72727 2.69273 5.72727 2.54546C5.72727 1.64546 6.46364 0.909094 7.36364 0.909094C8.26364 0.909094 9 1.64546 9 2.54546C9 2.69273 8.98364 2.84 8.94273 2.97091L11.0291 5.05728C11.16 5.01637 11.3073 5 11.4545 5C11.6018 5 11.7491 5.01637 11.88 5.05728L14.7845 2.14455C14.7436 2.01364 14.7273 1.87455 14.7273 1.72728C14.7273 0.827275 15.4636 0.0909119 16.3636 0.0909119C17.2636 0.0909119 18 0.827275 18 1.72728Z" fill="#B2B9C5"/>
|
|
3
|
+
</svg>
|
|
@@ -509,6 +509,9 @@
|
|
|
509
509
|
Bottom: 'bottom',
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
+
/** Capture phase so this runs before @click.stop on the caret (EPDM-18900). */
|
|
513
|
+
const CLICK_OUTSIDE_CAPTURE = true
|
|
514
|
+
|
|
512
515
|
export default {
|
|
513
516
|
name: 'RCselect',
|
|
514
517
|
|
|
@@ -885,7 +888,11 @@
|
|
|
885
888
|
},
|
|
886
889
|
beforeMount() {
|
|
887
890
|
this.selectedValue = this.value
|
|
888
|
-
document.addEventListener(
|
|
891
|
+
document.addEventListener(
|
|
892
|
+
'click',
|
|
893
|
+
this.clickOutside,
|
|
894
|
+
CLICK_OUTSIDE_CAPTURE
|
|
895
|
+
)
|
|
889
896
|
this.getDropdownPosition()
|
|
890
897
|
window.removeEventListener('resize', this.handleSetDropdownOffet)
|
|
891
898
|
if (this.dropdownResizeObserver) this.dropdownResizeObserver.disconnect()
|
|
@@ -898,7 +905,11 @@
|
|
|
898
905
|
}
|
|
899
906
|
},
|
|
900
907
|
unmounted() {
|
|
901
|
-
document.removeEventListener(
|
|
908
|
+
document.removeEventListener(
|
|
909
|
+
'click',
|
|
910
|
+
this.clickOutside,
|
|
911
|
+
CLICK_OUTSIDE_CAPTURE
|
|
912
|
+
)
|
|
902
913
|
},
|
|
903
914
|
methods: {
|
|
904
915
|
getDropdownTopScrollYOffset() {
|
|
@@ -983,6 +994,7 @@
|
|
|
983
994
|
clickOutside(event) {
|
|
984
995
|
const dropdownRef = this.$refs.dropdown
|
|
985
996
|
if (!this.isClickOutsideActive) return
|
|
997
|
+
if (!this.$refs.select?.$el || !dropdownRef?.$el) return
|
|
986
998
|
if (
|
|
987
999
|
this.$refs.select.$el == event.target ||
|
|
988
1000
|
this.$refs.select.$el.contains(event.target) ||
|
|
@@ -213,6 +213,9 @@
|
|
|
213
213
|
import InfoText from '../infoText'
|
|
214
214
|
import MainButton from '../buttons/mainButton'
|
|
215
215
|
|
|
216
|
+
/** Capture phase so this runs before @click.stop on arrows (EPDM-18900). */
|
|
217
|
+
const CLICK_OUTSIDE_CAPTURE = true
|
|
218
|
+
|
|
216
219
|
const rowAttrs = { disabled: Boolean, isOpen: Boolean }
|
|
217
220
|
const DropdownRow = styled('div', rowAttrs)`
|
|
218
221
|
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
|
@@ -577,7 +580,11 @@
|
|
|
577
580
|
watch: {
|
|
578
581
|
isOpen(newVal) {
|
|
579
582
|
if (newVal) {
|
|
580
|
-
document.addEventListener(
|
|
583
|
+
document.addEventListener(
|
|
584
|
+
'click',
|
|
585
|
+
this.clickOutside,
|
|
586
|
+
CLICK_OUTSIDE_CAPTURE
|
|
587
|
+
)
|
|
581
588
|
this.$emit('dropdown-search', '')
|
|
582
589
|
this.$nextTick(() => {
|
|
583
590
|
this.$refs.searchInput.$el.children[0].children[0].focus()
|
|
@@ -619,7 +626,11 @@
|
|
|
619
626
|
}
|
|
620
627
|
this.wasClicked = false
|
|
621
628
|
if (!this.isOpen) {
|
|
622
|
-
document.addEventListener(
|
|
629
|
+
document.addEventListener(
|
|
630
|
+
'click',
|
|
631
|
+
this.clickOutside,
|
|
632
|
+
CLICK_OUTSIDE_CAPTURE
|
|
633
|
+
)
|
|
623
634
|
this.$emit('dropdown-search', '')
|
|
624
635
|
this.$nextTick(() => {
|
|
625
636
|
this.scrollToItem()
|
|
@@ -629,7 +640,11 @@
|
|
|
629
640
|
this.$refs.searchInput.$el.children[0].children[1].focus()
|
|
630
641
|
})
|
|
631
642
|
} else {
|
|
632
|
-
document.removeEventListener(
|
|
643
|
+
document.removeEventListener(
|
|
644
|
+
'click',
|
|
645
|
+
this.clickOutside,
|
|
646
|
+
CLICK_OUTSIDE_CAPTURE
|
|
647
|
+
)
|
|
633
648
|
this.$emit('toggle-dropdown-open', { close: true })
|
|
634
649
|
this.inputText = ''
|
|
635
650
|
}
|
|
@@ -668,7 +683,11 @@
|
|
|
668
683
|
this.inputText = ''
|
|
669
684
|
// 'close: true' is needed in case a box is open and another box is clicked on
|
|
670
685
|
// so this one will close properly
|
|
671
|
-
document.removeEventListener(
|
|
686
|
+
document.removeEventListener(
|
|
687
|
+
'click',
|
|
688
|
+
this.clickOutside,
|
|
689
|
+
CLICK_OUTSIDE_CAPTURE
|
|
690
|
+
)
|
|
672
691
|
this.$emit('toggle-dropdown-open', { close: true })
|
|
673
692
|
},
|
|
674
693
|
onCustomNameClick() {
|