@byu-oit/vue-decision-processing-components 8.25.4 → 8.27.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.
- package/AdmitPeriodConfig.vue +1 -0
- package/ApplicantInfo.vue +16 -2
- package/CHANGELOG.md +28 -0
- package/DetailsHeader.vue +129 -18
- package/package.json +1 -1
package/AdmitPeriodConfig.vue
CHANGED
|
@@ -61,6 +61,7 @@ export default {
|
|
|
61
61
|
accept: 'application/json',
|
|
62
62
|
'content-type': 'application/json'
|
|
63
63
|
}
|
|
64
|
+
// This config is hosted in the domain-common-admit-periods repository
|
|
64
65
|
const url = `https://admit-period-vocab-cdn.ces-admissionssupport-prd.amazon.byu.edu/${this.school}-admit-periods.json`
|
|
65
66
|
const options = { headers, url }
|
|
66
67
|
const r = await window.byu.auth.request(options)
|
package/ApplicantInfo.vue
CHANGED
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
<template>
|
|
17
17
|
<div class="applicant" slot="applicantInfo">
|
|
18
18
|
<em>{{ applicantType }}</em>
|
|
19
|
-
<div>
|
|
19
|
+
<div v-if="compact">
|
|
20
|
+
{{ netId }}
|
|
21
|
+
</div>
|
|
22
|
+
<div v-else>
|
|
20
23
|
{{ netId }}
|
|
21
24
|
|
|
|
22
25
|
{{ byuId }}
|
|
@@ -29,7 +32,12 @@
|
|
|
29
32
|
|
|
|
30
33
|
{{ religion }}
|
|
31
34
|
</div>
|
|
32
|
-
<div>
|
|
35
|
+
<div v-if="compact">
|
|
36
|
+
{{ admitPeriod | yearTerm }}
|
|
37
|
+
|
|
|
38
|
+
{{ applicationStatus }}
|
|
39
|
+
</div>
|
|
40
|
+
<div v-else>
|
|
33
41
|
{{ admitPeriod | yearTerm }}
|
|
34
42
|
|
|
|
35
43
|
{{ applicantMajor }}
|
|
@@ -45,6 +53,12 @@ import { mapState } from 'vuex'
|
|
|
45
53
|
export default {
|
|
46
54
|
name: 'ApplicantInfo',
|
|
47
55
|
filters: { dateFormat },
|
|
56
|
+
props: {
|
|
57
|
+
compact: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
48
62
|
computed: {
|
|
49
63
|
...mapState({
|
|
50
64
|
applicantType: state => state.packet.applicantType ? state.packet.applicantType : state.application.applicantType,
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [8.27.1](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.27.0...v8.27.1) (2022-06-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* styling and errors due to (sometimes) missing ref element ([28784c3](https://github.com/byu-oit/vue-decision-processing-components/commit/28784c386f464659a2897242c18f944c8c63f5aa))
|
|
11
|
+
|
|
12
|
+
## [8.27.0](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.26.1...v8.27.0) (2022-06-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add compact option ([f9b5d98](https://github.com/byu-oit/vue-decision-processing-components/commit/f9b5d986155ccb5aca813466cdf150124b1a2a99))
|
|
18
|
+
|
|
19
|
+
### [8.26.1](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.26.0...v8.26.1) (2022-06-03)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* scroll flicker ([3614ced](https://github.com/byu-oit/vue-decision-processing-components/commit/3614ced02822db8e9d6d97b6df0910e1d25a0484))
|
|
25
|
+
|
|
26
|
+
## [8.26.0](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.25.4...v8.26.0) (2022-06-03)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* collapsing DetailsHeader - when scrolling and not mouseover - header collapses to a smaller size. ([05ef93a](https://github.com/byu-oit/vue-decision-processing-components/commit/05ef93aaaee0c05c0a6a1651b72d35f0a7cd2773))
|
|
32
|
+
|
|
5
33
|
### [8.25.4](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.25.3...v8.25.4) (2022-06-01)
|
|
6
34
|
|
|
7
35
|
|
package/DetailsHeader.vue
CHANGED
|
@@ -14,24 +14,48 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
-->
|
|
16
16
|
<template>
|
|
17
|
-
<div class="
|
|
18
|
-
<div class="star" v-if="!hideStar && appId" :title="userFlag.isActive ? 'Remove from Tracking List' : 'Add to Tracking List'">
|
|
19
|
-
<starred-indicator :set="userFlag.isActive" @click="toggleApplicationStar" />
|
|
20
|
-
</div>
|
|
17
|
+
<div ref="container" class="header-container bg-secondary text-white" @mouseenter="mouseenter" @mouseleave="mouseleave">
|
|
21
18
|
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
<transition name="scale">
|
|
20
|
+
<div v-if="compact" class="applicant-details compact" key="compact">
|
|
21
|
+
<div class="star" v-if="!hideStar && appId" :title="userFlag.isActive ? 'Remove from Tracking List' : 'Add to Tracking List'">
|
|
22
|
+
<starred-indicator :set="userFlag.isActive" @click="toggleApplicationStar" />
|
|
23
|
+
</div>
|
|
24
|
+
<div class="name">
|
|
25
|
+
<slot name="applicantNameCompact"></slot>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="applicant">
|
|
28
|
+
<slot name="applicantInfoCompact"></slot>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="additional">
|
|
31
|
+
<slot name="additionalInfoCompact"></slot>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="actions bg-light text-body">
|
|
34
|
+
<slot name="actionsCompact"></slot>
|
|
35
|
+
</div>
|
|
26
36
|
</div>
|
|
27
|
-
<div class="applicant">
|
|
28
|
-
<
|
|
37
|
+
<div v-else class="applicant-details" key="expanded">
|
|
38
|
+
<div class="star" v-if="!hideStar && appId" :title="userFlag.isActive ? 'Remove from Tracking List' : 'Add to Tracking List'">
|
|
39
|
+
<starred-indicator :set="userFlag.isActive" @click="toggleApplicationStar" />
|
|
40
|
+
</div>
|
|
41
|
+
<div class="name">
|
|
42
|
+
<slot name="applicantName">
|
|
43
|
+
<h2>{{application.applicantName}}</h2>
|
|
44
|
+
</slot>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="applicant">
|
|
47
|
+
<slot name="applicantInfo">
|
|
29
48
|
<ApplicantInfo/>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
49
|
+
</slot>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="additional">
|
|
52
|
+
<slot name="additionalInfo"></slot>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="actions bg-light text-body">
|
|
55
|
+
<slot name="actions"></slot>
|
|
56
|
+
</div>
|
|
34
57
|
</div>
|
|
58
|
+
</transition>
|
|
35
59
|
</div>
|
|
36
60
|
</template>
|
|
37
61
|
<script>
|
|
@@ -56,6 +80,15 @@ export default {
|
|
|
56
80
|
type: String
|
|
57
81
|
}
|
|
58
82
|
},
|
|
83
|
+
data () {
|
|
84
|
+
return {
|
|
85
|
+
compact: false,
|
|
86
|
+
justShrank: false,
|
|
87
|
+
shrinkYLimit: 0,
|
|
88
|
+
justGrew: false,
|
|
89
|
+
hovering: false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
59
92
|
computed: {
|
|
60
93
|
...mapState({
|
|
61
94
|
userInfo: 'userInfo',
|
|
@@ -81,20 +114,78 @@ export default {
|
|
|
81
114
|
flagValue: 'S-' + this.userInfo.byuId,
|
|
82
115
|
flagState: userFlagSet ? 'clear' : 'set'
|
|
83
116
|
})
|
|
117
|
+
},
|
|
118
|
+
handleScroll () {
|
|
119
|
+
if (!this.hovering) {
|
|
120
|
+
const containerElem = this.$refs.container
|
|
121
|
+
if (!containerElem || !containerElem.getBoundingClientRect) {
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
const containerTopY = containerElem.getBoundingClientRect().top
|
|
125
|
+
// Prevent flickering when just over the scroll threshold
|
|
126
|
+
if (this.justShrank) {
|
|
127
|
+
if (containerTopY > 0) {
|
|
128
|
+
this.shrinkYLimit = containerTopY
|
|
129
|
+
this.justShrank = false
|
|
130
|
+
}
|
|
131
|
+
} else if (containerTopY < this.shrinkYLimit) {
|
|
132
|
+
this.shrinkYLimit = containerTopY
|
|
133
|
+
}
|
|
134
|
+
if (this.justGrew) {
|
|
135
|
+
if (containerTopY > 0) {
|
|
136
|
+
this.justGrew = false
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (this.compact) {
|
|
140
|
+
if (containerTopY > this.shrinkYLimit) {
|
|
141
|
+
this.compact = false
|
|
142
|
+
this.justGrew = true
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
if (!this.justGrew && containerTopY <= 0) {
|
|
146
|
+
this.justShrank = true
|
|
147
|
+
this.compact = true
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
mouseenter () {
|
|
153
|
+
this.compact = false
|
|
154
|
+
this.hovering = true
|
|
155
|
+
},
|
|
156
|
+
mouseleave (event) {
|
|
157
|
+
this.hovering = false
|
|
158
|
+
this.handleScroll(event)
|
|
84
159
|
}
|
|
85
160
|
},
|
|
86
|
-
filters: { yearTermFormat }
|
|
161
|
+
filters: { yearTermFormat },
|
|
162
|
+
mounted () {
|
|
163
|
+
window.addEventListener("scroll", this.handleScroll)
|
|
164
|
+
},
|
|
165
|
+
beforeUnmount () {
|
|
166
|
+
window.removeEventListener("scroll", this.handleScroll)
|
|
167
|
+
}
|
|
87
168
|
}
|
|
88
169
|
</script>
|
|
89
170
|
<style scoped>
|
|
171
|
+
.header-container {
|
|
172
|
+
display: grid;
|
|
173
|
+
grid-template-columns: 1fr;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.header-container > * {
|
|
177
|
+
grid-column: 1/2;
|
|
178
|
+
grid-row: 1/2;
|
|
179
|
+
}
|
|
180
|
+
|
|
90
181
|
.applicant-details {
|
|
91
182
|
display: grid;
|
|
92
|
-
grid-template-columns: 3rem 2fr 1fr;
|
|
183
|
+
grid-template-columns: 3rem minmax(40vw, 2fr) minmax(20vw, 1fr) minmax(auto, 30vw);
|
|
93
184
|
grid-template-rows: repeat(2, auto);
|
|
94
185
|
grid-column-gap: 0.5rem;
|
|
95
186
|
grid-template-areas:
|
|
96
|
-
"star name additional"
|
|
97
|
-
"star applicant additional";
|
|
187
|
+
"star name additional actions"
|
|
188
|
+
"star applicant additional actions";
|
|
98
189
|
}
|
|
99
190
|
|
|
100
191
|
.star {
|
|
@@ -117,4 +208,24 @@ export default {
|
|
|
117
208
|
padding: 0.5rem;
|
|
118
209
|
}
|
|
119
210
|
|
|
211
|
+
.actions {
|
|
212
|
+
grid-area: actions;
|
|
213
|
+
padding: 0.5rem;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.scale-enter-active,
|
|
217
|
+
.scale-leave-active {
|
|
218
|
+
transition: all 0.25s ease-out;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.scale-enter {
|
|
222
|
+
opacity: 0;
|
|
223
|
+
transform: scaleY(0.5) translateY(0.5rem);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.scale-leave-to {
|
|
227
|
+
opacity: 0;
|
|
228
|
+
transform: scaleY(0.5) translateY(-0.5rem);
|
|
229
|
+
}
|
|
230
|
+
|
|
120
231
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byu-oit/vue-decision-processing-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.27.1",
|
|
4
4
|
"description": "Vue components shared between decision processing systems for the CES schools.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@fortawesome/fontawesome-free": "^5.15.4",
|