@asd20/ui 3.2.388 → 3.2.391
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-lock.json +1 -1
- package/package.json +1 -1
- package/src/components/molecules/Asd20DepartmentContactCard/index.vue +0 -3
- package/src/components/molecules/Asd20ListItem/index.vue +8 -4
- package/src/components/molecules/Asd20Modal/index.vue +22 -5
- package/src/components/organisms/Asd20ComposeEmailModal/index.vue +0 -2
- package/src/components/organisms/Asd20PeopleList/index.vue +1 -3
- package/src/components/organisms/Asd20PersonModal/index.vue +1 -9
package/package-lock.json
CHANGED
package/package.json
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
<asd20-compose-email-modal
|
|
22
22
|
v-if="group"
|
|
23
23
|
:open="composingEmail"
|
|
24
|
-
v-model="isActive"
|
|
25
24
|
:recipient-id="group.id"
|
|
26
25
|
@dismiss="composingEmail = false"
|
|
27
26
|
/>
|
|
@@ -43,7 +42,6 @@ export default {
|
|
|
43
42
|
},
|
|
44
43
|
data: () => ({
|
|
45
44
|
composingEmail: false,
|
|
46
|
-
isActive: false,
|
|
47
45
|
}),
|
|
48
46
|
computed: {
|
|
49
47
|
classes() {
|
|
@@ -150,7 +148,6 @@ export default {
|
|
|
150
148
|
console.log(item)
|
|
151
149
|
if (item.label === 'Send an Email') {
|
|
152
150
|
this.composingEmail = true
|
|
153
|
-
this.isActive = true
|
|
154
151
|
}
|
|
155
152
|
},
|
|
156
153
|
},
|
|
@@ -102,12 +102,16 @@ export default {
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
tag() {
|
|
105
|
-
if (this.actionable)
|
|
106
|
-
return 'button'
|
|
105
|
+
// if (this.actionable)
|
|
106
|
+
// return 'button'
|
|
107
107
|
// if (this.actionable && this.to && this.to[0] === '/' && this.$router)
|
|
108
108
|
// return 'button'
|
|
109
|
-
if (this.actionable && this.hrefValue)
|
|
110
|
-
|
|
109
|
+
if (this.actionable && this.hrefValue) {
|
|
110
|
+
return 'a'
|
|
111
|
+
// return 'div'
|
|
112
|
+
} else {
|
|
113
|
+
return 'button'
|
|
114
|
+
}
|
|
111
115
|
},
|
|
112
116
|
hrefAttr() {
|
|
113
117
|
return this.tag === 'a' ? 'href' : null
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
@before-leave="transitioning = true"
|
|
7
7
|
>
|
|
8
8
|
<div v-if="open" :class="classes">
|
|
9
|
-
<focus-trap :
|
|
9
|
+
<focus-trap :open="open">
|
|
10
10
|
<div class="asd20-modal">
|
|
11
11
|
<div v-if="title || $slots.title" class="asd20-modal__header">
|
|
12
12
|
<asd20-icon v-if="icon" :name="icon" size="md" />
|
|
13
13
|
<h2>{{ title }}<slot name="title" /></h2>
|
|
14
14
|
|
|
15
15
|
<asd20-button
|
|
16
|
+
ref="closeButton"
|
|
16
17
|
v-if="dismissable"
|
|
17
18
|
size="md"
|
|
18
19
|
icon="close"
|
|
@@ -20,7 +21,6 @@
|
|
|
20
21
|
hide-label
|
|
21
22
|
transparent
|
|
22
23
|
@click.native="$emit('dismiss', false)"
|
|
23
|
-
@click="isActive = false"
|
|
24
24
|
/>
|
|
25
25
|
</div>
|
|
26
26
|
<slot name="header" />
|
|
@@ -38,11 +38,9 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script>
|
|
41
|
-
import Vue from 'vue'
|
|
42
41
|
import Asd20Icon from '../../atoms/Asd20Icon'
|
|
43
42
|
import Asd20Button from '../../atoms/Asd20Button'
|
|
44
43
|
import { FocusTrap } from 'focus-trap-vue'
|
|
45
|
-
Vue.use(FocusTrap)
|
|
46
44
|
|
|
47
45
|
export default {
|
|
48
46
|
name: 'Asd20Modal',
|
|
@@ -57,7 +55,6 @@ export default {
|
|
|
57
55
|
},
|
|
58
56
|
data: () => ({
|
|
59
57
|
transitioning: false,
|
|
60
|
-
isActive: false,
|
|
61
58
|
}),
|
|
62
59
|
computed: {
|
|
63
60
|
classes() {
|
|
@@ -67,6 +64,26 @@ export default {
|
|
|
67
64
|
}
|
|
68
65
|
},
|
|
69
66
|
},
|
|
67
|
+
watch: {
|
|
68
|
+
open: function(newVal) {
|
|
69
|
+
if (newVal) {
|
|
70
|
+
this.setFocus()
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
setFocus() {
|
|
76
|
+
this.$nextTick(() => {
|
|
77
|
+
this.$refs.closeButton.$el.focus()
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
mounted() {
|
|
83
|
+
if (this.open === true) {
|
|
84
|
+
this.setFocus()
|
|
85
|
+
}
|
|
86
|
+
},
|
|
70
87
|
}
|
|
71
88
|
</script>
|
|
72
89
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<asd20-modal
|
|
3
3
|
:open="open"
|
|
4
|
-
:isActive="isActive"
|
|
5
4
|
title="Send an Email"
|
|
6
5
|
icon="email"
|
|
7
6
|
dismissable
|
|
@@ -78,7 +77,6 @@ export default {
|
|
|
78
77
|
},
|
|
79
78
|
composing: false,
|
|
80
79
|
sending: false,
|
|
81
|
-
isActive: false,
|
|
82
80
|
emailMessage: {
|
|
83
81
|
senderName: '',
|
|
84
82
|
senderEmail: '',
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
v-for="(person, index) in mappedPeople"
|
|
6
6
|
:key="index"
|
|
7
7
|
v-bind="person"
|
|
8
|
-
@click.native="
|
|
8
|
+
@click.native="onPersonClick(person)"
|
|
9
9
|
/>
|
|
10
10
|
</asd20-list>
|
|
11
11
|
<Asd20PersonModal
|
|
12
12
|
:person="selectedPerson"
|
|
13
13
|
:open="!!selectedPerson"
|
|
14
|
-
:isActive="isActive"
|
|
15
14
|
@dismiss="selectedPerson = null"
|
|
16
15
|
:force-display-email="forceDisplayEmail"
|
|
17
16
|
/>
|
|
@@ -46,7 +45,6 @@ export default {
|
|
|
46
45
|
data: () => ({
|
|
47
46
|
// loadedPeople: [],
|
|
48
47
|
selectedPerson: null,
|
|
49
|
-
isActive: false,
|
|
50
48
|
}),
|
|
51
49
|
|
|
52
50
|
methods: {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<asd20-modal
|
|
3
3
|
v-if="person"
|
|
4
4
|
:open="open"
|
|
5
|
-
:isActive="isActive"
|
|
6
5
|
title="Staff Details"
|
|
7
6
|
icon="staff"
|
|
8
7
|
dismissable
|
|
@@ -46,12 +45,7 @@
|
|
|
46
45
|
icon-size="lg"
|
|
47
46
|
label="Send an Email"
|
|
48
47
|
actionable
|
|
49
|
-
@click.native="
|
|
50
|
-
()=>{
|
|
51
|
-
composingEmail = true;
|
|
52
|
-
isActive = true
|
|
53
|
-
}
|
|
54
|
-
"
|
|
48
|
+
@click.native="composingEmail = true"
|
|
55
49
|
/>
|
|
56
50
|
<Asd20ListItem
|
|
57
51
|
v-show="person.email && !useEmailForm"
|
|
@@ -84,7 +78,6 @@
|
|
|
84
78
|
<asd20-compose-email-modal
|
|
85
79
|
v-show="person"
|
|
86
80
|
:open="open && composingEmail"
|
|
87
|
-
:isActive="isActive"
|
|
88
81
|
:recipient-id="person.id"
|
|
89
82
|
@dismiss="composingEmail = false"
|
|
90
83
|
/>
|
|
@@ -115,7 +108,6 @@ export default {
|
|
|
115
108
|
},
|
|
116
109
|
data: () => ({
|
|
117
110
|
composingEmail: false,
|
|
118
|
-
isActive: false,
|
|
119
111
|
}),
|
|
120
112
|
computed: {
|
|
121
113
|
initials() {
|