@bloom-housing/ui-components 3.0.1-alpha.21 → 3.0.1-alpha.25
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 +47 -0
- package/package.json +4 -6
- package/src/locales/es.json +1 -1
- package/src/locales/general.json +3 -2
- package/src/locales/general_OLD.json +1 -1
- package/src/locales/vi.json +1 -1
- package/src/locales/zh.json +1 -1
- package/src/page_components/listing/listing_sidebar/Waitlist.tsx +31 -62
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
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
|
+
## [3.0.1-alpha.25](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.24...@bloom-housing/ui-components@3.0.1-alpha.25) (2021-11-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.0.1-alpha.24](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.23...@bloom-housing/ui-components@3.0.1-alpha.24) (2021-11-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* guard against 0 output ([0ea9012](https://github.com/bloom-housing/bloom/commit/0ea9012fdac02fb1cb4357abec2ec69633902654))
|
|
20
|
+
* remove bold style from current waitlist size ([2e2f414](https://github.com/bloom-housing/bloom/commit/2e2f4141e62c8544c0828b29de0b99bb97abb201))
|
|
21
|
+
* show waitlist values even if they're zero ([6a35e67](https://github.com/bloom-housing/bloom/commit/6a35e679f142105e40719e89bda3d957e3200e1d))
|
|
22
|
+
* simpler conditionals ([f3e588d](https://github.com/bloom-housing/bloom/commit/f3e588d5e6dd0a39d1aed99ef6eba0054540ed14))
|
|
23
|
+
* waitlist: handle both null and undefined ([90fd369](https://github.com/bloom-housing/bloom/commit/90fd369b471c7f9baa0a1d58f452159449fe6fcf))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* simplify Waitlist component and use more flexible schema ([96df149](https://github.com/bloom-housing/bloom/commit/96df1496f377ddfa6f0e6c016c84954b6a43ff4a))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [3.0.1-alpha.23](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.22...@bloom-housing/ui-components@3.0.1-alpha.23) (2021-11-29)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [3.0.1-alpha.22](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.21...@bloom-housing/ui-components@3.0.1-alpha.22) (2021-11-23)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* remove alameda reference in demographics ([#2209](https://github.com/bloom-housing/bloom/issues/2209)) ([7d5991c](https://github.com/bloom-housing/bloom/commit/7d5991cbf6dbe0b61f2b14d265e87ce3687f743d))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
6
53
|
## [3.0.1-alpha.21](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.20...@bloom-housing/ui-components@3.0.1-alpha.21) (2021-11-23)
|
|
7
54
|
|
|
8
55
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "3.0.1-alpha.
|
|
3
|
+
"version": "3.0.1-alpha.25",
|
|
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,6 +69,7 @@
|
|
|
69
69
|
"webpack": "^4.44.2"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
+
"@bloom-housing/backend-core": "^3.0.1-alpha.26",
|
|
72
73
|
"@mapbox/mapbox-sdk": "^0.13.0",
|
|
73
74
|
"@types/body-scroll-lock": "^2.6.1",
|
|
74
75
|
"@types/jwt-decode": "^2.2.1",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"@types/react-dom": "^16.9.5",
|
|
80
81
|
"@types/react-text-mask": "^5.4.6",
|
|
81
82
|
"@types/react-transition-group": "^4.4.0",
|
|
82
|
-
"axios": "
|
|
83
|
+
"axios": "0.21.1",
|
|
83
84
|
"body-scroll-lock": "^3.1.5",
|
|
84
85
|
"jwt-decode": "^2.2.0",
|
|
85
86
|
"markdown-to-jsx": "^6.11.4",
|
|
@@ -99,8 +100,5 @@
|
|
|
99
100
|
"tailwindcss": "2.2.10",
|
|
100
101
|
"typesafe-actions": "^5.1.0"
|
|
101
102
|
},
|
|
102
|
-
"
|
|
103
|
-
"@bloom-housing/backend-core": ">= 2.0.0-pre-tailwind"
|
|
104
|
-
},
|
|
105
|
-
"gitHead": "6f7f276d917473aaa7c2da9b28f100477fc6514a"
|
|
103
|
+
"gitHead": "65e3b5ce8e9fe6093fbec85de964305a959fd53c"
|
|
106
104
|
}
|
package/src/locales/es.json
CHANGED
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
"notListed": "No aparece en la lista"
|
|
296
296
|
},
|
|
297
297
|
"howDidYouHearOptions": {
|
|
298
|
-
"
|
|
298
|
+
"jurisdictionWebsite": "Sitio web del HCD del Condado de Alameda",
|
|
299
299
|
"developerWebsite": "Sitio web del constructor",
|
|
300
300
|
"flyer": "Folleto",
|
|
301
301
|
"emailAlert": "Aviso por email",
|
package/src/locales/general.json
CHANGED
|
@@ -706,7 +706,7 @@
|
|
|
706
706
|
"notListed": "Not Listed"
|
|
707
707
|
},
|
|
708
708
|
"howDidYouHearOptions": {
|
|
709
|
-
"
|
|
709
|
+
"jurisdictionWebsite": "Alameda County HCD Website",
|
|
710
710
|
"developerWebsite": "Developer Website",
|
|
711
711
|
"flyer": "Flyer",
|
|
712
712
|
"emailAlert": "Email Alert",
|
|
@@ -1106,6 +1106,7 @@
|
|
|
1106
1106
|
"header": "Public Lottery",
|
|
1107
1107
|
"seeVideo": "See Video"
|
|
1108
1108
|
},
|
|
1109
|
+
"recommended": "Recommended",
|
|
1109
1110
|
"referralContactPhone": "Referral Contact Phone",
|
|
1110
1111
|
"referralSummary": "Referral Summary",
|
|
1111
1112
|
"remainingUnitsAfterPreferenceConsideration": "After all preference holders have been considered, any remaining units will be available to other qualified applicants.",
|
|
@@ -1231,7 +1232,7 @@
|
|
|
1231
1232
|
"maxSize": "Maximum Waitlist Size",
|
|
1232
1233
|
"maxSizeQuestion": "What is the maximum size of the waitlist?",
|
|
1233
1234
|
"open": "Open Waitlist",
|
|
1234
|
-
"openQuestion": "
|
|
1235
|
+
"openQuestion": "Do you want to show a waitlist?",
|
|
1235
1236
|
"openSize": "Number of Openings",
|
|
1236
1237
|
"openSizeQuestion": "How many spots are open on the list?",
|
|
1237
1238
|
"openSlots": "Open Waitlist Slots",
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
"notListed": "Not Listed"
|
|
421
421
|
},
|
|
422
422
|
"howDidYouHearOptions": {
|
|
423
|
-
"
|
|
423
|
+
"jurisdictionWebsite": "Alameda County HCD Website",
|
|
424
424
|
"developerWebsite": "Developer Website",
|
|
425
425
|
"flyer": "Flyer",
|
|
426
426
|
"emailAlert": "Email Alert",
|
package/src/locales/vi.json
CHANGED
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
"notListed": "Không được Liệt kê"
|
|
293
293
|
},
|
|
294
294
|
"howDidYouHearOptions": {
|
|
295
|
-
"
|
|
295
|
+
"jurisdictionWebsite": "Trang web HCD của Quận Alameda",
|
|
296
296
|
"developerWebsite": "Trang web của Cơ quan phát triển nhà",
|
|
297
297
|
"flyer": "Tờ rơi",
|
|
298
298
|
"emailAlert": "Thông báo qua Email",
|
package/src/locales/zh.json
CHANGED
|
@@ -1,77 +1,46 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { t } from "../../../helpers/translator"
|
|
3
3
|
|
|
4
|
-
const WaitlistItem = (props: { className?: string; value: number; text: string }) => {
|
|
5
|
-
return props.value ? (
|
|
6
|
-
<li className={`uppercase text-gray-800 text-tiny ${props.className}`}>
|
|
7
|
-
<span className="text-right w-12 inline-block pr-2">{props.value}</span>
|
|
8
|
-
<span>{props.text}</span>
|
|
9
|
-
</li>
|
|
10
|
-
) : null
|
|
11
|
-
}
|
|
12
|
-
|
|
13
4
|
export interface WaitlistProps {
|
|
14
5
|
isWaitlistOpen: boolean
|
|
15
|
-
waitlistMaxSize
|
|
16
|
-
waitlistCurrentSize
|
|
17
|
-
waitlistOpenSpots
|
|
18
|
-
unitsAvailable: number
|
|
6
|
+
waitlistMaxSize?: number | null
|
|
7
|
+
waitlistCurrentSize?: number | null
|
|
8
|
+
waitlistOpenSpots?: number | null
|
|
19
9
|
}
|
|
20
10
|
|
|
11
|
+
const WaitlistItem = (props: { className?: string; value: number; text: string }) => (
|
|
12
|
+
<li className={`uppercase text-gray-800 text-tiny ${props.className}`}>
|
|
13
|
+
<span className="text-right w-12 inline-block pr-2">{props.value}</span>
|
|
14
|
+
<span>{props.text}</span>
|
|
15
|
+
</li>
|
|
16
|
+
)
|
|
17
|
+
|
|
21
18
|
const Waitlist = (props: WaitlistProps) => {
|
|
22
|
-
|
|
23
|
-
if (!props.isWaitlistOpen && !props.waitlistCurrentSize) return <></>
|
|
24
|
-
if (props.unitsAvailable && props.unitsAvailable > 0 && props.isWaitlistOpen) {
|
|
25
|
-
header = t("listings.waitlist.unitsAndWaitlist")
|
|
26
|
-
subheader = t("listings.waitlist.submitAnApplication")
|
|
27
|
-
waitlistItems = (
|
|
28
|
-
<>
|
|
29
|
-
<WaitlistItem
|
|
30
|
-
value={props.unitsAvailable}
|
|
31
|
-
text={t("listings.availableUnits")}
|
|
32
|
-
className={"font-semibold"}
|
|
33
|
-
/>
|
|
34
|
-
{props.waitlistOpenSpots && (
|
|
35
|
-
<WaitlistItem
|
|
36
|
-
value={props.waitlistOpenSpots}
|
|
37
|
-
text={t("listings.waitlist.openSlots")}
|
|
38
|
-
className={"font-semibold"}
|
|
39
|
-
/>
|
|
40
|
-
)}
|
|
41
|
-
</>
|
|
42
|
-
)
|
|
43
|
-
} else {
|
|
44
|
-
if (props.isWaitlistOpen) {
|
|
45
|
-
header = t("listings.waitlist.isOpen")
|
|
46
|
-
subheader = t("listings.waitlist.submitForWaitlist")
|
|
47
|
-
} else {
|
|
48
|
-
header = t("listings.waitlist.closed")
|
|
49
|
-
subheader = null
|
|
50
|
-
}
|
|
51
|
-
waitlistItems = (
|
|
52
|
-
<>
|
|
53
|
-
<WaitlistItem
|
|
54
|
-
value={props.waitlistCurrentSize || 0}
|
|
55
|
-
text={t("listings.waitlist.currentSize")}
|
|
56
|
-
/>
|
|
57
|
-
{props.waitlistOpenSpots && (
|
|
58
|
-
<WaitlistItem
|
|
59
|
-
value={props.waitlistOpenSpots}
|
|
60
|
-
text={t("listings.waitlist.openSlots")}
|
|
61
|
-
className={"font-semibold"}
|
|
62
|
-
/>
|
|
63
|
-
)}
|
|
64
|
-
<WaitlistItem value={props.waitlistMaxSize || 0} text={t("listings.waitlist.finalSize")} />
|
|
65
|
-
</>
|
|
66
|
-
)
|
|
67
|
-
}
|
|
19
|
+
if (!props.isWaitlistOpen) return <></>
|
|
68
20
|
|
|
69
21
|
return (
|
|
70
22
|
<section className="aside-block is-tinted">
|
|
71
|
-
<h4 className="text-caps-tiny">{
|
|
23
|
+
<h4 className="text-caps-tiny">{t("listings.waitlist.unitsAndWaitlist")}</h4>
|
|
72
24
|
<div>
|
|
73
|
-
|
|
74
|
-
|
|
25
|
+
<p className="text-tiny text-gray-800 pb-3">{t("listings.waitlist.submitAnApplication")}</p>
|
|
26
|
+
<ul>
|
|
27
|
+
{props.waitlistCurrentSize !== null && props.waitlistCurrentSize !== undefined && (
|
|
28
|
+
<WaitlistItem
|
|
29
|
+
value={props.waitlistCurrentSize}
|
|
30
|
+
text={t("listings.waitlist.currentSize")}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
33
|
+
{props.waitlistOpenSpots !== null && props.waitlistOpenSpots !== undefined && (
|
|
34
|
+
<WaitlistItem
|
|
35
|
+
value={props.waitlistOpenSpots}
|
|
36
|
+
text={t("listings.waitlist.openSlots")}
|
|
37
|
+
className={"font-semibold"}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
40
|
+
{props.waitlistMaxSize != null && (
|
|
41
|
+
<WaitlistItem value={props.waitlistMaxSize} text={t("listings.waitlist.finalSize")} />
|
|
42
|
+
)}
|
|
43
|
+
</ul>
|
|
75
44
|
</div>
|
|
76
45
|
</section>
|
|
77
46
|
)
|