@byu-oit/vue-decision-processing-components 8.25.3 → 8.26.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.
@@ -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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
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.26.1](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.26.0...v8.26.1) (2022-06-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * scroll flicker ([3614ced](https://github.com/byu-oit/vue-decision-processing-components/commit/3614ced02822db8e9d6d97b6df0910e1d25a0484))
11
+
12
+ ## [8.26.0](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.25.4...v8.26.0) (2022-06-03)
13
+
14
+
15
+ ### Features
16
+
17
+ * 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))
18
+
19
+ ### [8.25.4](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.25.3...v8.25.4) (2022-06-01)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * adjust active admit periods ([31793d0](https://github.com/byu-oit/vue-decision-processing-components/commit/31793d09f1e67a6656a68cd1c9cf7cb83741b7c8))
25
+
5
26
  ### [8.25.3](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.25.2...v8.25.3) (2022-05-09)
6
27
 
7
28
 
package/DetailsHeader.vue CHANGED
@@ -14,24 +14,48 @@
14
14
  limitations under the License.
15
15
  -->
16
16
  <template>
17
- <div class="applicant-details">
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
- <div class="name">
23
- <slot name="applicantName">
24
- <h2>{{application.applicantName}}</h2>
25
- </slot>
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">
34
+ <slot name="actionsCompact"></slot>
35
+ </div>
26
36
  </div>
27
- <div class="applicant">
28
- <slot name="applicantInfo">
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
- </slot>
31
- </div>
32
- <div class="additional">
33
- <slot name="additionalInfo"></slot>
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,75 @@ 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
+ const containerTopY = containerElem.getBoundingClientRect().top
122
+ // Prevent flickering when just over the scroll threshold
123
+ if (this.justShrank) {
124
+ if (containerTopY > 0) {
125
+ this.shrinkYLimit = containerTopY
126
+ this.justShrank = false
127
+ }
128
+ } else if (containerTopY < this.shrinkYLimit) {
129
+ this.shrinkYLimit = containerTopY
130
+ }
131
+ if (this.justGrew) {
132
+ if (containerTopY > 0) {
133
+ this.justGrew = false
134
+ }
135
+ }
136
+ if (this.compact) {
137
+ if (containerTopY > this.shrinkYLimit) {
138
+ this.compact = false
139
+ this.justGrew = true
140
+ }
141
+ } else {
142
+ if (!this.justGrew && containerTopY <= 0) {
143
+ this.justShrank = true
144
+ this.compact = true
145
+ }
146
+ }
147
+ }
148
+ },
149
+ mouseenter () {
150
+ this.compact = false
151
+ this.hovering = true
152
+ },
153
+ mouseleave (event) {
154
+ this.hovering = false
155
+ this.handleScroll(event)
84
156
  }
85
157
  },
86
- filters: { yearTermFormat }
158
+ filters: { yearTermFormat },
159
+ mounted () {
160
+ window.addEventListener("scroll", this.handleScroll)
161
+ },
162
+ beforeUnmount () {
163
+ window.removeEventListener("scroll", this.handleScroll)
164
+ }
87
165
  }
88
166
  </script>
89
167
  <style scoped>
168
+ .header-container {
169
+ display: grid;
170
+ grid-template-columns: 1fr;
171
+ }
172
+
173
+ .header-container > * {
174
+ grid-column: 1/2;
175
+ grid-row: 1/2;
176
+ }
177
+
90
178
  .applicant-details {
91
179
  display: grid;
92
- grid-template-columns: 3rem 2fr 1fr;
180
+ grid-template-columns: 3rem minmax(40vw, 2fr) minmax(20vw, 1fr) minmax(auto, 30vw);
93
181
  grid-template-rows: repeat(2, auto);
94
182
  grid-column-gap: 0.5rem;
95
183
  grid-template-areas:
96
- "star name additional"
97
- "star applicant additional";
184
+ "star name additional actions"
185
+ "star applicant additional actions";
98
186
  }
99
187
 
100
188
  .star {
@@ -117,4 +205,24 @@ export default {
117
205
  padding: 0.5rem;
118
206
  }
119
207
 
208
+ .actions {
209
+ grid-area: actions;
210
+ padding: 0.5rem;
211
+ }
212
+
213
+ .scale-enter-active,
214
+ .scale-leave-active {
215
+ transition: all 0.25s ease-out;
216
+ }
217
+
218
+ .scale-enter {
219
+ opacity: 0;
220
+ transform: scaleY(0.5) translateY(0.5rem);
221
+ }
222
+
223
+ .scale-leave-to {
224
+ opacity: 0;
225
+ transform: scaleY(0.5) translateY(-0.5rem);
226
+ }
227
+
120
228
  </style>
@@ -50,9 +50,11 @@ export default {
50
50
  type: Array,
51
51
  default() {
52
52
  return [
53
- '20221',
54
53
  '20223',
55
54
  '20225',
55
+ '20231',
56
+ '20233',
57
+ '20235',
56
58
  ]
57
59
  }
58
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byu-oit/vue-decision-processing-components",
3
- "version": "8.25.3",
3
+ "version": "8.26.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",