@bloom-housing/ui-components 4.2.0 → 4.2.1-alpha.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,275 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.2.1-alpha.2](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.1-alpha.1...@bloom-housing/ui-components@4.2.1-alpha.2) (2022-04-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * a11y issues on homepage components ([#2624](https://github.com/bloom-housing/bloom/issues/2624)) ([bf443d5](https://github.com/bloom-housing/bloom/commit/bf443d55d12d624b057666933bdd06feaf7d79be))
12
+
13
+
14
+
15
+
16
+
17
+ ## [4.2.1-alpha.1](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.1-alpha.0...@bloom-housing/ui-components@4.2.1-alpha.1) (2022-04-07)
18
+
19
+ **Note:** Version bump only for package @bloom-housing/ui-components
20
+
21
+
22
+
23
+
24
+
25
+ ## [4.2.1-alpha.0](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.1.3-alpha.5...@bloom-housing/ui-components@4.2.1-alpha.0) (2022-04-06)
26
+
27
+
28
+ * 2022-04-06 sync master (#2628) ([bc31833](https://github.com/bloom-housing/bloom/commit/bc31833f7ea5720a242d93a01bb1b539181fbad4)), closes [#2628](https://github.com/bloom-housing/bloom/issues/2628) [#2037](https://github.com/bloom-housing/bloom/issues/2037) [#2095](https://github.com/bloom-housing/bloom/issues/2095) [#2162](https://github.com/bloom-housing/bloom/issues/2162) [#2293](https://github.com/bloom-housing/bloom/issues/2293) [#2295](https://github.com/bloom-housing/bloom/issues/2295) [#2296](https://github.com/bloom-housing/bloom/issues/2296) [#2294](https://github.com/bloom-housing/bloom/issues/2294) [#2277](https://github.com/bloom-housing/bloom/issues/2277) [#2299](https://github.com/bloom-housing/bloom/issues/2299) [#2292](https://github.com/bloom-housing/bloom/issues/2292) [#2308](https://github.com/bloom-housing/bloom/issues/2308) [#2239](https://github.com/bloom-housing/bloom/issues/2239) [#2311](https://github.com/bloom-housing/bloom/issues/2311) [#2230](https://github.com/bloom-housing/bloom/issues/2230) [#2302](https://github.com/bloom-housing/bloom/issues/2302) [#2288](https://github.com/bloom-housing/bloom/issues/2288) [#2317](https://github.com/bloom-housing/bloom/issues/2317) [#2386](https://github.com/bloom-housing/bloom/issues/2386) [#2215](https://github.com/bloom-housing/bloom/issues/2215) [#2303](https://github.com/bloom-housing/bloom/issues/2303) [#2410](https://github.com/bloom-housing/bloom/issues/2410) [#2430](https://github.com/bloom-housing/bloom/issues/2430) [#2439](https://github.com/bloom-housing/bloom/issues/2439) [#2196](https://github.com/bloom-housing/bloom/issues/2196) [#2238](https://github.com/bloom-housing/bloom/issues/2238) [#2226](https://github.com/bloom-housing/bloom/issues/2226) [#2230](https://github.com/bloom-housing/bloom/issues/2230) [#2243](https://github.com/bloom-housing/bloom/issues/2243) [#2195](https://github.com/bloom-housing/bloom/issues/2195) [#2215](https://github.com/bloom-housing/bloom/issues/2215) [#2266](https://github.com/bloom-housing/bloom/issues/2266) [#2188](https://github.com/bloom-housing/bloom/issues/2188) [#2270](https://github.com/bloom-housing/bloom/issues/2270) [#2188](https://github.com/bloom-housing/bloom/issues/2188) [#2213](https://github.com/bloom-housing/bloom/issues/2213) [#2234](https://github.com/bloom-housing/bloom/issues/2234) [#1901](https://github.com/bloom-housing/bloom/issues/1901) [#2260](https://github.com/bloom-housing/bloom/issues/2260) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#2280](https://github.com/bloom-housing/bloom/issues/2280) [#2253](https://github.com/bloom-housing/bloom/issues/2253) [#2276](https://github.com/bloom-housing/bloom/issues/2276) [#2282](https://github.com/bloom-housing/bloom/issues/2282) [#2262](https://github.com/bloom-housing/bloom/issues/2262) [#2278](https://github.com/bloom-housing/bloom/issues/2278) [#2293](https://github.com/bloom-housing/bloom/issues/2293) [#2295](https://github.com/bloom-housing/bloom/issues/2295) [#2296](https://github.com/bloom-housing/bloom/issues/2296) [#2294](https://github.com/bloom-housing/bloom/issues/2294) [#2277](https://github.com/bloom-housing/bloom/issues/2277) [#2290](https://github.com/bloom-housing/bloom/issues/2290) [#2299](https://github.com/bloom-housing/bloom/issues/2299) [#2292](https://github.com/bloom-housing/bloom/issues/2292) [#2303](https://github.com/bloom-housing/bloom/issues/2303) [#2305](https://github.com/bloom-housing/bloom/issues/2305) [#2306](https://github.com/bloom-housing/bloom/issues/2306) [#2308](https://github.com/bloom-housing/bloom/issues/2308) [#2190](https://github.com/bloom-housing/bloom/issues/2190) [#2239](https://github.com/bloom-housing/bloom/issues/2239) [#2311](https://github.com/bloom-housing/bloom/issues/2311) [#2302](https://github.com/bloom-housing/bloom/issues/2302) [#2301](https://github.com/bloom-housing/bloom/issues/2301) [#1927](https://github.com/bloom-housing/bloom/issues/1927) [#2313](https://github.com/bloom-housing/bloom/issues/2313) [#2289](https://github.com/bloom-housing/bloom/issues/2289) [#2279](https://github.com/bloom-housing/bloom/issues/2279) [#2288](https://github.com/bloom-housing/bloom/issues/2288) [#2317](https://github.com/bloom-housing/bloom/issues/2317) [#2319](https://github.com/bloom-housing/bloom/issues/2319) [#2108](https://github.com/bloom-housing/bloom/issues/2108) [#2326](https://github.com/bloom-housing/bloom/issues/2326) [#2349](https://github.com/bloom-housing/bloom/issues/2349) [#2350](https://github.com/bloom-housing/bloom/issues/2350) [#2351](https://github.com/bloom-housing/bloom/issues/2351) [#2348](https://github.com/bloom-housing/bloom/issues/2348) [#2352](https://github.com/bloom-housing/bloom/issues/2352) [#2316](https://github.com/bloom-housing/bloom/issues/2316) [#2356](https://github.com/bloom-housing/bloom/issues/2356) [#2353](https://github.com/bloom-housing/bloom/issues/2353) [#2338](https://github.com/bloom-housing/bloom/issues/2338) [#2377](https://github.com/bloom-housing/bloom/issues/2377) [#2320](https://github.com/bloom-housing/bloom/issues/2320) [#2386](https://github.com/bloom-housing/bloom/issues/2386) [#2362](https://github.com/bloom-housing/bloom/issues/2362) [#2395](https://github.com/bloom-housing/bloom/issues/2395) [#2410](https://github.com/bloom-housing/bloom/issues/2410) [#2407](https://github.com/bloom-housing/bloom/issues/2407) [#2430](https://github.com/bloom-housing/bloom/issues/2430) [#2418](https://github.com/bloom-housing/bloom/issues/2418) [#2434](https://github.com/bloom-housing/bloom/issues/2434) [#2374](https://github.com/bloom-housing/bloom/issues/2374) [#2435](https://github.com/bloom-housing/bloom/issues/2435) [#2420](https://github.com/bloom-housing/bloom/issues/2420) [#2412](https://github.com/bloom-housing/bloom/issues/2412) [#2434](https://github.com/bloom-housing/bloom/issues/2434) [#2458](https://github.com/bloom-housing/bloom/issues/2458) [#2460](https://github.com/bloom-housing/bloom/issues/2460) [#2465](https://github.com/bloom-housing/bloom/issues/2465) [#2436](https://github.com/bloom-housing/bloom/issues/2436) [#2484](https://github.com/bloom-housing/bloom/issues/2484) [#2482](https://github.com/bloom-housing/bloom/issues/2482) [#2483](https://github.com/bloom-housing/bloom/issues/2483) [#2488](https://github.com/bloom-housing/bloom/issues/2488) [#2485](https://github.com/bloom-housing/bloom/issues/2485) [#2519](https://github.com/bloom-housing/bloom/issues/2519) [#2506](https://github.com/bloom-housing/bloom/issues/2506) [#2534](https://github.com/bloom-housing/bloom/issues/2534) [#2544](https://github.com/bloom-housing/bloom/issues/2544) [#2550](https://github.com/bloom-housing/bloom/issues/2550) [#2288](https://github.com/bloom-housing/bloom/issues/2288) [#2317](https://github.com/bloom-housing/bloom/issues/2317) [#2319](https://github.com/bloom-housing/bloom/issues/2319) [#2108](https://github.com/bloom-housing/bloom/issues/2108) [#2326](https://github.com/bloom-housing/bloom/issues/2326) [#2349](https://github.com/bloom-housing/bloom/issues/2349) [#2350](https://github.com/bloom-housing/bloom/issues/2350) [#2351](https://github.com/bloom-housing/bloom/issues/2351) [#2348](https://github.com/bloom-housing/bloom/issues/2348) [#2352](https://github.com/bloom-housing/bloom/issues/2352) [#2316](https://github.com/bloom-housing/bloom/issues/2316) [#2356](https://github.com/bloom-housing/bloom/issues/2356) [#2353](https://github.com/bloom-housing/bloom/issues/2353) [#2338](https://github.com/bloom-housing/bloom/issues/2338) [#2377](https://github.com/bloom-housing/bloom/issues/2377) [#2320](https://github.com/bloom-housing/bloom/issues/2320) [#2386](https://github.com/bloom-housing/bloom/issues/2386) [#2362](https://github.com/bloom-housing/bloom/issues/2362) [#2395](https://github.com/bloom-housing/bloom/issues/2395) [#2410](https://github.com/bloom-housing/bloom/issues/2410) [#2407](https://github.com/bloom-housing/bloom/issues/2407) [#2430](https://github.com/bloom-housing/bloom/issues/2430) [#2418](https://github.com/bloom-housing/bloom/issues/2418) [#2434](https://github.com/bloom-housing/bloom/issues/2434) [#2374](https://github.com/bloom-housing/bloom/issues/2374) [#2435](https://github.com/bloom-housing/bloom/issues/2435) [#2420](https://github.com/bloom-housing/bloom/issues/2420) [#2412](https://github.com/bloom-housing/bloom/issues/2412) [#2438](https://github.com/bloom-housing/bloom/issues/2438) [#2429](https://github.com/bloom-housing/bloom/issues/2429) [#2452](https://github.com/bloom-housing/bloom/issues/2452) [#2458](https://github.com/bloom-housing/bloom/issues/2458) [#2423](https://github.com/bloom-housing/bloom/issues/2423) [#2432](https://github.com/bloom-housing/bloom/issues/2432) [#2437](https://github.com/bloom-housing/bloom/issues/2437) [#2440](https://github.com/bloom-housing/bloom/issues/2440) [#2441](https://github.com/bloom-housing/bloom/issues/2441) [#2460](https://github.com/bloom-housing/bloom/issues/2460) [#2459](https://github.com/bloom-housing/bloom/issues/2459) [#2464](https://github.com/bloom-housing/bloom/issues/2464) [#2465](https://github.com/bloom-housing/bloom/issues/2465) [#2466](https://github.com/bloom-housing/bloom/issues/2466) [#2436](https://github.com/bloom-housing/bloom/issues/2436) [#2451](https://github.com/bloom-housing/bloom/issues/2451) [#2415](https://github.com/bloom-housing/bloom/issues/2415) [#2354](https://github.com/bloom-housing/bloom/issues/2354) [#2455](https://github.com/bloom-housing/bloom/issues/2455) [#2484](https://github.com/bloom-housing/bloom/issues/2484) [#2482](https://github.com/bloom-housing/bloom/issues/2482) [#2483](https://github.com/bloom-housing/bloom/issues/2483) [#2476](https://github.com/bloom-housing/bloom/issues/2476) [#2485](https://github.com/bloom-housing/bloom/issues/2485) [#2470](https://github.com/bloom-housing/bloom/issues/2470) [#2488](https://github.com/bloom-housing/bloom/issues/2488) [#2487](https://github.com/bloom-housing/bloom/issues/2487) [#2496](https://github.com/bloom-housing/bloom/issues/2496) [#2498](https://github.com/bloom-housing/bloom/issues/2498) [#2499](https://github.com/bloom-housing/bloom/issues/2499) [#2291](https://github.com/bloom-housing/bloom/issues/2291) [#2461](https://github.com/bloom-housing/bloom/issues/2461) [#2485](https://github.com/bloom-housing/bloom/issues/2485) [#2494](https://github.com/bloom-housing/bloom/issues/2494) [#2503](https://github.com/bloom-housing/bloom/issues/2503) [#2495](https://github.com/bloom-housing/bloom/issues/2495) [#2477](https://github.com/bloom-housing/bloom/issues/2477) [#2505](https://github.com/bloom-housing/bloom/issues/2505) [#2372](https://github.com/bloom-housing/bloom/issues/2372) [#2489](https://github.com/bloom-housing/bloom/issues/2489) [#2497](https://github.com/bloom-housing/bloom/issues/2497) [#2506](https://github.com/bloom-housing/bloom/issues/2506) [#2486](https://github.com/bloom-housing/bloom/issues/2486)
29
+
30
+
31
+ ### BREAKING CHANGES
32
+
33
+ * preferences model and relationships changed
34
+
35
+ * feat: feat(backend): extend UserUpdateDto to support email change
36
+
37
+ picked from dev 3e1fdbd0ea91d4773973d5c485a5ba61303db90a
38
+
39
+ * fix: 2056/user account edit fix
40
+
41
+ picked from dev a15618c0cb548ff5b2ae913b802c9e08bb673f30
42
+
43
+ * refactor: 2085/adds top level catchAll exception filter
44
+
45
+ picked from dev aeaa63d1af1fa3d11671e169cb3bd23d356fface
46
+
47
+ * feat: feat: Change unit number field type to text
48
+
49
+ picked from dev f54be7c7ba6aac8e00fee610dc86584b60cc212d
50
+
51
+ * feat(backend): improve application flagged set saving efficiency
52
+
53
+ * fix: fix: updates address order
54
+
55
+ picked from dev 252e014dcbd2e4c305384ed552135f5a8e4e4767
56
+
57
+ * fix: sets programs to optoinal and updates versions
58
+
59
+ * chore: chore(deps): bump electron from 13.1.7 to 13.3.0
60
+
61
+ * chore: chore(deps): bump axios from 0.21.1 to 0.21.2
62
+
63
+ * fix: adds programs service
64
+
65
+ * fix: fix lisitng e2e tests
66
+
67
+ * fix: fix member tests
68
+
69
+ * fix: adds jurisdictionId to useSWR path
70
+
71
+ * fix: recalculate units available on listing update
72
+
73
+ picked form dev f1a3dbce6478b16542ed61ab20de5dfb9b797262
74
+
75
+ * feat: feat(backend): make use of new application confirmation codes
76
+
77
+ picked from dev 3c45c2904818200eed4568931d4cc352fd2f449e
78
+
79
+ * revert: revert "chore(deps): bump axios from 0.21.1 to 0.21.2
80
+
81
+ picked from dev 2b83bc0393afc42eed542e326d5ef75502ce119c
82
+
83
+ * fix: app submission w/ no due date
84
+
85
+ picked from dev 4af1f5a8448f16d347b4a65ecb85fda4d6ed71fc
86
+
87
+ * feat: adds new preferences, reserved community type
88
+
89
+ * feat: adds bottom border to preferences
90
+
91
+ * feat: updates preference string
92
+
93
+ * fix: preference cleanup for avance
94
+
95
+ * refactor: remove applicationAddress
96
+
97
+ picked from dev bf10632a62bf2f14922948c046ea3352ed010f4f
98
+
99
+ * feat: refactor and add public site application flow cypress tests
100
+
101
+ picked from dev 9ec0e8d05f9570773110754e7fdaf49254d1eab8
102
+
103
+ * feat: better seed data for ami-charts
104
+
105
+ picked from dev d8b1d4d185731a589c563a32bd592d01537785f3
106
+
107
+ * feat: adds listing management cypress tests to partner portal
108
+
109
+ * fix: listings management keep empty strings, remove empty objects
110
+
111
+ picked from dev c4b1e833ec128f457015ac7ffa421ee6047083d9
112
+
113
+ * feat: one month rent
114
+
115
+ picked from dev 883b0d53030e1c4d54f2f75bd5e188bb1d255f64
116
+
117
+ * test: view.spec.ts test
118
+
119
+ picked from dev 324446c90138d8fac50aba445f515009b5a58bfb
120
+
121
+ * refactor: removes jsonpath
122
+
123
+ picked from dev deb39acc005607ce3076942b1f49590d08afc10c
124
+
125
+ * feat: adds jurisdictions to pref seeds
126
+
127
+ picked from dev 9e47cec3b1acfe769207ccbb33c07019cd742e33
128
+
129
+ * feat: new demographics sub-race questions
130
+
131
+ picked from dev 9ab892694c1ad2fa8890b411b3b32af68ade1fc3
132
+
133
+ * feat: updates email confirmation for lottery
134
+
135
+ picked from dev 1a5e824c96d8e23674c32ea92688b9f7255528d3
136
+
137
+ * fix: add ariaHidden to Icon component
138
+
139
+ picked from dev c7bb86aec6fd5ad386c7ca50087d0113b14503be
140
+
141
+ * fix: add ariaLabel prop to Button component
142
+
143
+ picked from dev 509ddc898ba44c05e26f8ed8c777f1ba456eeee5
144
+
145
+ * fix: change the yes/no radio text to be more descriptive
146
+
147
+ picked from dev 0c46054574535523d6f217bb0677bbe732b8945f
148
+
149
+ * fix: remove alameda reference in demographics
150
+
151
+ picked from dev 7d5991cbf6dbe0b61f2b14d265e87ce3687f743d
152
+
153
+ * chore: release version
154
+
155
+ picked from dev fe82f25dc349877d974ae62d228fea0354978fb7
156
+
157
+ * feat: ami chart jurisdictionalized
158
+
159
+ picked from dev 0a5cbc88a9d9e3c2ff716fe0f44ca6c48f5dcc50
160
+
161
+ * refactor: make backend a peer dependency in ui-components
162
+
163
+ picked from dev 952aaa14a77e0960312ff0eeee51399d1d6af9f3
164
+
165
+ * feat: add a phone number column to the user_accounts table
166
+
167
+ picked from dev 2647df9ab9888a525cc8a164d091dda6482c502a
168
+
169
+ * chore: removes application program partners
170
+
171
+ * chore: removes application program display
172
+
173
+ * Revert "chore: removes application program display"
174
+
175
+ This reverts commit 14825b4a6c9cd1a7235e32074e32af18a71b5c26.
176
+
177
+ * Revert "chore: removes application program partners"
178
+
179
+ This reverts commit d7aa38c777972a2e21d9f816441caa27f98d3f86.
180
+
181
+ * chore: yarn.lock and backend-swagger
182
+
183
+ * fix: removes Duplicate identifier fieldGroupObjectToArray
184
+
185
+ * feat: skip preferences if not on listing
186
+
187
+ * chore(release): version
188
+
189
+ * fix: cannot save custom mailing, dropoff, or pickup address
190
+
191
+ * chore(release): version
192
+
193
+ * chore: converge on one axios version, remove peer dependency
194
+
195
+ * chore(release): version
196
+
197
+ * feat: simplify Waitlist component and use more flexible schema
198
+
199
+ * chore(release): version
200
+
201
+ * fix: lottery results uploads now save
202
+
203
+ * chore(release): version
204
+
205
+ * feat: add SRO unit type
206
+
207
+ * chore(release): version
208
+
209
+ * fix: paper application submission
210
+
211
+ * chore(release): version
212
+
213
+ * fix: choose-language context
214
+
215
+ * chore(release): version
216
+
217
+ * fix: applications/view hide prefs
218
+
219
+ * chore(release): version
220
+
221
+ * feat: overrides fallback to english, tagalog support
222
+
223
+ * chore(release): version
224
+
225
+ * fix: account translations
226
+
227
+ * chore(release): version
228
+
229
+ * fix: units with invalid ami chart
230
+
231
+ * chore(release): version
232
+
233
+ * fix: remove description for the partners programs
234
+
235
+ * fix: fix modal styles on mobile
236
+
237
+ * fix: visual improvement to programs form display
238
+
239
+ * fix: submission tests not running
240
+ * sign-in pages have been updated
241
+ * moved some helpers from ui-components to shared-helpers
242
+ * remove applicationDueTime field and consolidated into applicationDueDate
243
+
244
+ * chore(release): version
245
+
246
+ - @bloom-housing/backend-core@3.0.2-alpha.13
247
+ - @bloom-housing/shared-helpers@4.0.1-alpha.21
248
+ - @bloom-housing/partners@4.0.1-alpha.23
249
+ - @bloom-housing/public@4.0.1-alpha.22
250
+ - @bloom-housing/ui-components@4.0.1-alpha.21
251
+ * moved some helpers from ui-components to shared-helpers
252
+ * remove applicationDueTime field and consolidated into applicationDueDate
253
+
254
+ * chore(release): version
255
+
256
+ - @bloom-housing/backend-core@3.0.2-alpha.13
257
+ - @bloom-housing/shared-helpers@4.0.1-alpha.21
258
+ - @bloom-housing/partners@4.0.1-alpha.23
259
+ - @bloom-housing/public@4.0.1-alpha.22
260
+ - @bloom-housing/ui-components@4.0.1-alpha.21
261
+ * consolidated all event section components in one new component, uptake will require removing the deprecated components and uptaking EventSection
262
+
263
+ * chore(release): version
264
+
265
+ - @bloom-housing/backend-core@3.0.2-alpha.38
266
+ - @bloom-housing/shared-helpers@4.0.1-alpha.63
267
+ - @bloom-housing/partners@4.0.1-alpha.67
268
+ - @bloom-housing/public@4.0.1-alpha.66
269
+ - @bloom-housing/ui-components@4.0.1-alpha.62
270
+
271
+
272
+
273
+
274
+
6
275
  # [4.2.0](https://github.com/seanmalbert/bloom/compare/@bloom-housing/ui-components@4.1.2...@bloom-housing/ui-components@4.2.0) (2022-04-06)
7
276
 
8
277
 
package/index.ts CHANGED
@@ -118,6 +118,7 @@ export * from "./src/page_components/listing/listing_sidebar/Waitlist"
118
118
  export * from "./src/page_components/listing/listing_sidebar/WhatToExpect"
119
119
  export * from "./src/page_components/listing/listing_sidebar/events/DownloadLotteryResults"
120
120
  export * from "./src/page_components/listing/listing_sidebar/events/EventSection"
121
+ export * from "./src/page_components/sign-in/FormTerms"
121
122
  export * from "./src/page_components/sign-in/FormSignIn"
122
123
  export * from "./src/page_components/sign-in/FormSignInMFAType"
123
124
  export * from "./src/page_components/sign-in/FormSignInMFACode"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "4.2.0",
3
+ "version": "4.2.1-alpha.2",
4
4
  "author": "Sean Albert <sean.albert@exygy.com>",
5
5
  "description": "Shared user interface components for Bloom affordable housing system",
6
6
  "homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
@@ -69,7 +69,7 @@
69
69
  "webpack": "^4.44.2"
70
70
  },
71
71
  "dependencies": {
72
- "@bloom-housing/backend-core": "^4.2.0",
72
+ "@bloom-housing/backend-core": "^4.2.1-alpha.1",
73
73
  "@mapbox/mapbox-sdk": "^0.13.0",
74
74
  "@types/body-scroll-lock": "^2.6.1",
75
75
  "@types/jwt-decode": "^2.2.1",
@@ -100,5 +100,5 @@
100
100
  "tailwindcss": "2.2.10",
101
101
  "typesafe-actions": "^5.1.0"
102
102
  },
103
- "gitHead": "0b40ac24d0bac2f1a9863ebc63b1330a5d3fa7c1"
103
+ "gitHead": "760be1b60919af8a03bc676db0acc3f1cbc77747"
104
104
  }
@@ -29,6 +29,7 @@ import {
29
29
  useEffect,
30
30
  useMemo,
31
31
  useReducer,
32
+ useCallback,
32
33
  } from "react"
33
34
  import qs from "qs"
34
35
  import axiosStatic from "axios"
@@ -51,6 +52,7 @@ type ContextProps = {
51
52
  reservedCommunityTypeService: ReservedCommunityTypesService
52
53
  unitPriorityService: UnitAccessibilityPriorityTypesService
53
54
  unitTypesService: UnitTypesService
55
+ loadProfile: (redirect?: string) => void
54
56
  login: (
55
57
  email: string,
56
58
  password: string,
@@ -99,7 +101,7 @@ const saveToken = createAction("SAVE_TOKEN")<{
99
101
  accessToken: string
100
102
  dispatch: DispatchType
101
103
  }>()
102
- const saveProfile = createAction("SAVE_PROFILE")<User>()
104
+ const saveProfile = createAction("SAVE_PROFILE")<User | null>()
103
105
  const startLoading = createAction("START_LOADING")()
104
106
  const stopLoading = createAction("STOP_LOADING")()
105
107
  const signOut = createAction("SIGN_OUT")()
@@ -218,23 +220,30 @@ export const AuthProvider: FunctionComponent = ({ children }) => {
218
220
  }
219
221
  }, [apiUrl, storageType])
220
222
 
223
+ const loadProfile = useCallback(
224
+ async (redirect?: string) => {
225
+ try {
226
+ const profile = await userService?.userControllerProfile()
227
+ if (profile) {
228
+ dispatch(saveProfile(profile))
229
+ }
230
+ } finally {
231
+ dispatch(stopLoading())
232
+
233
+ if (redirect) {
234
+ router.push(redirect)
235
+ }
236
+ }
237
+ },
238
+ [userService, router]
239
+ )
240
+
221
241
  // Load our profile as soon as we have an access token available
222
242
  useEffect(() => {
223
243
  if (!state.profile && state.accessToken && !state.loading) {
224
- const loadProfile = async () => {
225
- dispatch(startLoading())
226
- try {
227
- const profile = await userService?.userControllerProfile()
228
- if (profile) {
229
- dispatch(saveProfile(profile))
230
- }
231
- } finally {
232
- dispatch(stopLoading())
233
- }
234
- }
235
244
  void loadProfile()
236
245
  }
237
- }, [state.profile, state.accessToken, apiUrl, userService, state.loading])
246
+ }, [state.profile, state.accessToken, apiUrl, userService, state.loading, loadProfile])
238
247
 
239
248
  const contextValues: ContextProps = {
240
249
  amiChartsService: new AmiChartsService(),
@@ -254,6 +263,7 @@ export const AuthProvider: FunctionComponent = ({ children }) => {
254
263
  accessToken: state.accessToken,
255
264
  initialStateLoaded: state.initialStateLoaded,
256
265
  profile: state.profile,
266
+ loadProfile,
257
267
  login: async (
258
268
  email,
259
269
  password,
@@ -1,4 +1,4 @@
1
- import React, { FunctionComponent, useContext, useEffect } from "react"
1
+ import React, { FunctionComponent, useContext, useEffect, useState } from "react"
2
2
  import { clearSiteAlertMessage, setSiteAlertMessage } from "../notifications/SiteAlert"
3
3
  import { NavigationContext } from "../config/NavigationContext"
4
4
  import { AuthContext } from "./AuthContext"
@@ -12,6 +12,7 @@ type XOR<T, U> = T | U extends Record<string, unknown>
12
12
  type RequireLoginProps = {
13
13
  signInPath: string
14
14
  signInMessage: string
15
+ termsPath?: string // partners portal required accepted terms after sign-in
15
16
  } & XOR<{ requireForRoutes?: string[] }, { skipForRoutes: string[] }>
16
17
 
17
18
  /**
@@ -24,10 +25,12 @@ const RequireLogin: FunctionComponent<RequireLoginProps> = ({
24
25
  children,
25
26
  signInPath,
26
27
  signInMessage,
28
+ termsPath,
27
29
  ...rest
28
30
  }) => {
29
31
  const { router } = useContext(NavigationContext)
30
32
  const { profile, initialStateLoaded } = useContext(AuthContext)
33
+ const [hasTerms, setHasTerms] = useState(false)
31
34
 
32
35
  // Parse just the pathname portion of the signInPath (in case we want to pass URL params)
33
36
  const [signInPathname] = signInPath.split("?")
@@ -44,6 +47,12 @@ const RequireLogin: FunctionComponent<RequireLoginProps> = ({
44
47
  ? !rest.skipForRoutes.some((path) => new RegExp(path).exec(router.pathname))
45
48
  : true)
46
49
 
50
+ useEffect(() => {
51
+ if (profile?.jurisdictions?.some((jurisdiction) => jurisdiction.partnerTerms)) {
52
+ setHasTerms(true)
53
+ }
54
+ }, [profile])
55
+
47
56
  useEffect(() => {
48
57
  if (loginRequiredForPath && initialStateLoaded && !profile) {
49
58
  setSiteAlertMessage(signInMessage, "notice")
@@ -51,9 +60,25 @@ const RequireLogin: FunctionComponent<RequireLoginProps> = ({
51
60
  } else {
52
61
  clearSiteAlertMessage("notice")
53
62
  }
54
- }, [loginRequiredForPath, initialStateLoaded, profile, router, signInPath, signInMessage])
55
63
 
56
- if (loginRequiredForPath && !profile) {
64
+ if (termsPath && profile && !profile?.agreedToTermsOfService && hasTerms) {
65
+ void router.push(termsPath)
66
+ }
67
+ }, [
68
+ loginRequiredForPath,
69
+ initialStateLoaded,
70
+ profile,
71
+ router,
72
+ signInPath,
73
+ signInMessage,
74
+ termsPath,
75
+ hasTerms,
76
+ ])
77
+
78
+ if (
79
+ loginRequiredForPath &&
80
+ (!profile || (hasTerms && termsPath && !profile.agreedToTermsOfService))
81
+ ) {
57
82
  return null
58
83
  }
59
84
 
@@ -41,7 +41,7 @@ const ActionBlock = ({
41
41
  <div className={actionBlockClasses.join(" ")}>
42
42
  <div className="action-block__head">
43
43
  {icon && <div className="action-block__icon">{icon}</div>}
44
- <h3 className="action-block__header">{header}</h3>
44
+ <h2 className="action-block__header">{header}</h2>
45
45
  {subheader && layout === ActionBlockLayout.block && (
46
46
  <p className="action-block__subheader">{subheader}</p>
47
47
  )}
@@ -422,7 +422,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
422
422
  }
423
423
 
424
424
  return (
425
- <div className={"site-header"}>
425
+ <header className={"site-header"}>
426
426
  {props.languages && <LanguageNav languages={props.languages} />}
427
427
 
428
428
  <div className={`navbar-notice ${!props.noticeMobile && `navbar-notice-hide`}`}>
@@ -441,7 +441,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
441
441
  </nav>
442
442
  {!isDesktop && mobileMenu && getMobileDropdown()}
443
443
  {getMobileDrawer()}
444
- </div>
444
+ </header>
445
445
  )
446
446
  }
447
447
 
@@ -499,6 +499,10 @@
499
499
  "authentication.timeout.action": "Stay logged in",
500
500
  "authentication.timeout.signOutMessage": "We care about your security. We logged you out due to inactivity. Please sign in to continue.",
501
501
  "authentication.timeout.text": "To protect your identity, your session will expire in one minute due to inactivity. You will lose any unsaved information and be logged out if you choose not to respond.",
502
+ "authentication.terms.termsOfService": "Terms of Service",
503
+ "authentication.terms.reviewToc": "Review Terms of Service",
504
+ "authentication.terms.youMustAcceptToc": "To continue you must accept the Terms of Service",
505
+ "authentication.terms.acceptToc": "I accept the Terms of Service",
502
506
  "config.routePrefix": "",
503
507
  "errors.agreeError": "You must agree to the terms in order to continue",
504
508
  "errors.alert.badRequest": "Looks like something went wrong. Please try again. \n\nContact your housing department if you're still experiencing issues.",
@@ -843,7 +847,7 @@
843
847
  "t.none": "None",
844
848
  "t.noneFound": "None found.",
845
849
  "t.occupancy": "Occupancy",
846
- "t.ok": "OK",
850
+ "t.ok": "Ok",
847
851
  "t.or": "or",
848
852
  "t.people": "people",
849
853
  "t.perMonth": "per month",
@@ -8,14 +8,15 @@ export type LangItem = {
8
8
  }
9
9
 
10
10
  export interface LanguageNavProps {
11
+ ariaLabel?: string
11
12
  languages: LangItem[]
12
13
  }
13
14
 
14
- const LanguageNav = ({ languages }: LanguageNavProps) => {
15
+ const LanguageNav = ({ ariaLabel, languages }: LanguageNavProps) => {
15
16
  return (
16
17
  <div className="language-bar">
17
18
  <div className="language-bar__inner">
18
- <nav className="language-nav">
19
+ <nav {...(ariaLabel ? { "aria-label": ariaLabel } : {})} className="language-nav">
19
20
  <ul className="language-nav__list">
20
21
  {languages.map((item) => (
21
22
  <li key={item.label}>
@@ -50,9 +50,9 @@
50
50
  }
51
51
 
52
52
  .fixed-overlay__inner-slim {
53
- width: 75vw;
53
+ width: 90vw;
54
54
 
55
55
  @screen md {
56
- width: 50vw;
56
+ width: 75vw;
57
57
  }
58
58
  }
@@ -0,0 +1,94 @@
1
+ import React, { useContext, useCallback, useMemo } from "react"
2
+ import {
3
+ AuthContext,
4
+ AppearanceStyleType,
5
+ Button,
6
+ Field,
7
+ Form,
8
+ FormCard,
9
+ Icon,
10
+ MarkdownSection,
11
+ t,
12
+ } from "@bloom-housing/ui-components"
13
+ import Markdown from "markdown-to-jsx"
14
+ import { useForm } from "react-hook-form"
15
+
16
+ type FormTermsInValues = {
17
+ agree: boolean
18
+ }
19
+
20
+ const FormTerms = () => {
21
+ const { profile, userProfileService, loadProfile } = useContext(AuthContext)
22
+
23
+ // eslint-disable-next-line @typescript-eslint/unbound-method
24
+ const { handleSubmit, register, errors } = useForm<FormTermsInValues>()
25
+
26
+ const onSubmit = useCallback(async () => {
27
+ if (!profile) return
28
+
29
+ const jurisdictionIds =
30
+ profile?.jurisdictions.map((item) => ({
31
+ id: item.id,
32
+ })) || []
33
+
34
+ await userProfileService?.update({
35
+ body: { ...profile, jurisdictions: jurisdictionIds, agreedToTermsOfService: true },
36
+ })
37
+
38
+ loadProfile?.("/")
39
+ }, [loadProfile, profile, userProfileService])
40
+
41
+ const jurisdictionTerms = useMemo(() => {
42
+ const jurisdiction = profile?.jurisdictions.find((jurisdiction) => jurisdiction.partnerTerms)
43
+ return jurisdiction ? jurisdiction.partnerTerms : ""
44
+ }, [profile])
45
+
46
+ return (
47
+ <Form id="terms" className="mt-10" onSubmit={handleSubmit(onSubmit)}>
48
+ <FormCard>
49
+ <div className="form-card__lead text-center">
50
+ <Icon size="2xl" symbol="settings" />
51
+ <h2 className="form-card__title">{t(`authentication.terms.reviewToc`)}</h2>
52
+ <p className="field-note mt-4 text-center">
53
+ {t(`authentication.terms.youMustAcceptToc`)}
54
+ </p>
55
+
56
+ <div className="overflow-y-auto max-h-96 mt-5 pr-4 text-left">
57
+ {jurisdictionTerms && (
58
+ <MarkdownSection padding={false} fullwidth={true}>
59
+ <Markdown options={{ disableParsingRawHTML: false }}>{jurisdictionTerms}</Markdown>
60
+ </MarkdownSection>
61
+ )}
62
+ </div>
63
+ </div>
64
+
65
+ <div className="form-card__group pt-0">
66
+ <Field
67
+ id="agree"
68
+ name="agree"
69
+ type="checkbox"
70
+ className="flex flex-col justify-center items-center"
71
+ label={t(`authentication.terms.acceptToc`)}
72
+ register={register}
73
+ validation={{ required: true }}
74
+ error={!!errors.agree}
75
+ errorMessage={t("errors.agreeError")}
76
+ dataTestId="agree"
77
+ />
78
+ </div>
79
+
80
+ <div className="border-b" />
81
+
82
+ <div className="form-card__pager">
83
+ <div className="form-card__pager-row primary">
84
+ <Button styleType={AppearanceStyleType.primary} data-test-id="form-submit">
85
+ {t("t.submit")}
86
+ </Button>
87
+ </div>
88
+ </div>
89
+ </FormCard>
90
+ </Form>
91
+ )
92
+ }
93
+
94
+ export { FormTerms as default, FormTerms }
@@ -1,10 +1,13 @@
1
1
  .markdown-section {
2
- @apply px-5;
3
2
  @apply my-6;
4
3
 
5
4
  @screen md {
6
5
  @apply my-12;
7
6
  }
7
+
8
+ &--with-padding {
9
+ @apply px-5;
10
+ }
8
11
  }
9
12
 
10
13
  .markdown-section__inner {
@@ -3,16 +3,20 @@ import "./MarkdownSection.scss"
3
3
 
4
4
  export interface MarkdownSectionProps {
5
5
  fullwidth?: boolean
6
+ padding?: boolean
6
7
  children: React.ReactNode
7
8
  }
8
9
 
9
- export const MarkdownSection = (props: MarkdownSectionProps) => {
10
- const contentWidth = props.fullwidth ? "markdown" : "markdown max-w-2xl"
10
+ export const MarkdownSection = ({ fullwidth, padding = true, children }: MarkdownSectionProps) => {
11
+ const contentWidth = fullwidth ? "markdown" : "markdown max-w-2xl"
12
+ const sectionClassNames = ["markdown-section"]
13
+
14
+ if (padding) sectionClassNames.push("markdown-section--with-padding")
11
15
 
12
16
  return (
13
- <div className="markdown-section">
17
+ <div className={sectionClassNames.join(" ")}>
14
18
  <div className="markdown-section__inner">
15
- <article className={contentWidth}>{props.children}</article>
19
+ <article className={contentWidth}>{children}</article>
16
20
  </div>
17
21
  </div>
18
22
  )