@bloom-housing/ui-components 7.0.8-alpha.0 → 7.1.0
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 +3 -5
- package/LICENSE.txt +201 -0
- package/package.json +4 -13
- package/src/helpers/preferences.tsx +13 -13
- package/src/locales/es.json +4 -2
- package/src/locales/general.json +3 -1
- package/src/locales/tl.json +3 -1
- package/src/locales/vi.json +4 -2
- package/src/locales/zh.json +5 -3
- package/src/page_components/NavigationHeader.tsx +31 -31
- package/src/page_components/forgot-password/FormForgotPassword.tsx +29 -42
- package/src/page_components/sign-in/FormSignIn.tsx +39 -50
- package/src/page_components/sign-in/FormSignInAddPhone.tsx +24 -32
- package/src/page_components/sign-in/FormSignInErrorBox.tsx +18 -32
- package/src/page_components/sign-in/FormSignInMFACode.tsx +23 -32
- package/src/page_components/sign-in/FormSignInMFAType.tsx +21 -25
- package/src/page_components/sign-in/FormTerms.tsx +16 -23
- package/src/page_components/sign-in/ResendConfirmationModal.tsx +28 -30
- package/src/tables/AgPagination.tsx +28 -30
- package/tsconfig.json +1 -0
- package/lerna.json +0 -15
- package/src/helpers/DateFormat.ts +0 -11
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
Field,
|
|
8
8
|
emailRegex,
|
|
9
9
|
AppearanceSizeType,
|
|
10
|
-
} from "
|
|
11
|
-
import React, { useEffect, useMemo } from "react"
|
|
12
|
-
import { useForm } from "react-hook-form"
|
|
10
|
+
} from "@bloom-housing/ui-components"
|
|
11
|
+
import React, { useEffect, useMemo } from "react"
|
|
12
|
+
import { useForm } from "react-hook-form"
|
|
13
13
|
|
|
14
14
|
export type ResendConfirmationModalProps = {
|
|
15
|
-
isOpen: boolean
|
|
16
|
-
initialEmailValue: string
|
|
17
|
-
onClose: () => void
|
|
18
|
-
onSubmit: (email: string) => void
|
|
19
|
-
loading: boolean
|
|
20
|
-
}
|
|
15
|
+
isOpen: boolean
|
|
16
|
+
initialEmailValue: string
|
|
17
|
+
onClose: () => void
|
|
18
|
+
onSubmit: (email: string) => void
|
|
19
|
+
loading: boolean
|
|
20
|
+
}
|
|
21
21
|
|
|
22
22
|
export type ResendConfirmationModalForm = {
|
|
23
|
-
onSubmit: (email: string) => void
|
|
24
|
-
}
|
|
23
|
+
onSubmit: (email: string) => void
|
|
24
|
+
}
|
|
25
25
|
|
|
26
26
|
const ResendConfirmationModal = ({
|
|
27
27
|
isOpen,
|
|
@@ -35,23 +35,23 @@ const ResendConfirmationModal = ({
|
|
|
35
35
|
defaultValues: useMemo(() => {
|
|
36
36
|
return {
|
|
37
37
|
emailResend: initialEmailValue,
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
39
|
}, [initialEmailValue]),
|
|
40
|
-
})
|
|
40
|
+
})
|
|
41
41
|
|
|
42
42
|
useEffect(() => {
|
|
43
43
|
reset({
|
|
44
44
|
emailResend: initialEmailValue,
|
|
45
|
-
})
|
|
46
|
-
}, [initialEmailValue, reset])
|
|
45
|
+
})
|
|
46
|
+
}, [initialEmailValue, reset])
|
|
47
47
|
|
|
48
48
|
const onFormSubmit = async () => {
|
|
49
|
-
const isValid = await trigger()
|
|
50
|
-
if (!isValid) return
|
|
49
|
+
const isValid = await trigger()
|
|
50
|
+
if (!isValid) return
|
|
51
51
|
|
|
52
|
-
const { emailResend } = getValues()
|
|
53
|
-
onSubmit(emailResend)
|
|
54
|
-
}
|
|
52
|
+
const { emailResend } = getValues()
|
|
53
|
+
onSubmit(emailResend)
|
|
54
|
+
}
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<Modal
|
|
@@ -59,8 +59,8 @@ const ResendConfirmationModal = ({
|
|
|
59
59
|
title={t("authentication.signIn.yourAccountIsNotConfirmed")}
|
|
60
60
|
ariaDescription={t("authentication.createAccount.linkExpired")}
|
|
61
61
|
onClose={() => {
|
|
62
|
-
onClose()
|
|
63
|
-
window.scrollTo(0, 0)
|
|
62
|
+
onClose()
|
|
63
|
+
window.scrollTo(0, 0)
|
|
64
64
|
}}
|
|
65
65
|
actions={[
|
|
66
66
|
<Button
|
|
@@ -76,8 +76,8 @@ const ResendConfirmationModal = ({
|
|
|
76
76
|
type="button"
|
|
77
77
|
styleType={AppearanceStyleType.alert}
|
|
78
78
|
onClick={() => {
|
|
79
|
-
onClose()
|
|
80
|
-
window.scrollTo(0, 0)
|
|
79
|
+
onClose()
|
|
80
|
+
window.scrollTo(0, 0)
|
|
81
81
|
}}
|
|
82
82
|
size={AppearanceSizeType.small}
|
|
83
83
|
>
|
|
@@ -100,12 +100,10 @@ const ResendConfirmationModal = ({
|
|
|
100
100
|
/>
|
|
101
101
|
</Form>
|
|
102
102
|
|
|
103
|
-
<p className="pt-4">
|
|
104
|
-
{t("authentication.createAccount.resendEmailInfo")}
|
|
105
|
-
</p>
|
|
103
|
+
<p className="pt-4">{t("authentication.createAccount.resendEmailInfo")}</p>
|
|
106
104
|
</>
|
|
107
105
|
</Modal>
|
|
108
|
-
)
|
|
109
|
-
}
|
|
106
|
+
)
|
|
107
|
+
}
|
|
110
108
|
|
|
111
|
-
export { ResendConfirmationModal as default, ResendConfirmationModal }
|
|
109
|
+
export { ResendConfirmationModal as default, ResendConfirmationModal }
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { Button, t } from "
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Button, t } from "@bloom-housing/ui-components"
|
|
3
3
|
|
|
4
4
|
type AgPaginationProps = {
|
|
5
|
-
totalItems: number
|
|
6
|
-
totalPages: number
|
|
7
|
-
currentPage: number
|
|
8
|
-
itemsPerPage: number
|
|
9
|
-
quantityLabel?: string
|
|
10
|
-
setCurrentPage: React.Dispatch<React.SetStateAction<number
|
|
11
|
-
setItemsPerPage: React.Dispatch<React.SetStateAction<number
|
|
12
|
-
onPageChange?: (page: number) => void
|
|
13
|
-
onPerPageChange?: (size: number) => void
|
|
14
|
-
}
|
|
5
|
+
totalItems: number
|
|
6
|
+
totalPages: number
|
|
7
|
+
currentPage: number
|
|
8
|
+
itemsPerPage: number
|
|
9
|
+
quantityLabel?: string
|
|
10
|
+
setCurrentPage: React.Dispatch<React.SetStateAction<number>>
|
|
11
|
+
setItemsPerPage: React.Dispatch<React.SetStateAction<number>>
|
|
12
|
+
onPageChange?: (page: number) => void
|
|
13
|
+
onPerPageChange?: (size: number) => void
|
|
14
|
+
}
|
|
15
15
|
|
|
16
|
-
const AG_PER_PAGE_OPTIONS = [8, 25, 50, 100]
|
|
16
|
+
const AG_PER_PAGE_OPTIONS = [8, 25, 50, 100]
|
|
17
17
|
|
|
18
18
|
const AgPagination = ({
|
|
19
19
|
totalItems,
|
|
@@ -27,19 +27,19 @@ const AgPagination = ({
|
|
|
27
27
|
onPerPageChange,
|
|
28
28
|
}: AgPaginationProps) => {
|
|
29
29
|
const onNextClick = () => {
|
|
30
|
-
setCurrentPage(currentPage + 1)
|
|
31
|
-
onPageChange && onPageChange(currentPage)
|
|
32
|
-
}
|
|
30
|
+
setCurrentPage(currentPage + 1)
|
|
31
|
+
onPageChange && onPageChange(currentPage)
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
const onPrevClick = () => {
|
|
35
|
-
setCurrentPage(currentPage - 1)
|
|
36
|
-
onPageChange && onPageChange(currentPage)
|
|
37
|
-
}
|
|
35
|
+
setCurrentPage(currentPage - 1)
|
|
36
|
+
onPageChange && onPageChange(currentPage)
|
|
37
|
+
}
|
|
38
38
|
|
|
39
39
|
const onRowLimitChange = (size: string) => {
|
|
40
|
-
setItemsPerPage(parseInt(size))
|
|
41
|
-
onPerPageChange && onPerPageChange(itemsPerPage)
|
|
42
|
-
}
|
|
40
|
+
setItemsPerPage(parseInt(size))
|
|
41
|
+
onPerPageChange && onPerPageChange(itemsPerPage)
|
|
42
|
+
}
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
45
|
<div className="data-pager flex flex-col md:flex-row">
|
|
@@ -58,9 +58,7 @@ const AgPagination = ({
|
|
|
58
58
|
<span className="field-label" id="lbTotalPages">
|
|
59
59
|
{totalItems}
|
|
60
60
|
</span>
|
|
61
|
-
{quantityLabel &&
|
|
62
|
-
<span className="field-label">{quantityLabel}</span>
|
|
63
|
-
)}
|
|
61
|
+
{quantityLabel && <span className="field-label">{quantityLabel}</span>}
|
|
64
62
|
</div>
|
|
65
63
|
|
|
66
64
|
<div className="flex mt-5 md:mt-0 md:items-center">
|
|
@@ -99,12 +97,12 @@ const AgPagination = ({
|
|
|
99
97
|
{Array(totalPages)
|
|
100
98
|
.fill(totalPages)
|
|
101
99
|
.map((_, i) => {
|
|
102
|
-
const value = i + 1
|
|
100
|
+
const value = i + 1
|
|
103
101
|
return (
|
|
104
102
|
<option key={value} value={value}>
|
|
105
103
|
{value}
|
|
106
104
|
</option>
|
|
107
|
-
)
|
|
105
|
+
)
|
|
108
106
|
})}
|
|
109
107
|
</select>
|
|
110
108
|
</div>
|
|
@@ -133,7 +131,7 @@ const AgPagination = ({
|
|
|
133
131
|
</Button>
|
|
134
132
|
</div>
|
|
135
133
|
</div>
|
|
136
|
-
)
|
|
137
|
-
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
138
136
|
|
|
139
|
-
export { AgPagination as default, AgPagination, AG_PER_PAGE_OPTIONS }
|
|
137
|
+
export { AgPagination as default, AgPagination, AG_PER_PAGE_OPTIONS }
|
package/tsconfig.json
CHANGED
package/lerna.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "independent",
|
|
3
|
-
"npmClient": "yarn",
|
|
4
|
-
"useWorkspaces": true,
|
|
5
|
-
"command": {
|
|
6
|
-
"publish": {
|
|
7
|
-
"conventionalCommits": true,
|
|
8
|
-
"message": "chore(release): publish"
|
|
9
|
-
},
|
|
10
|
-
"version": {
|
|
11
|
-
"conventionalCommits": true,
|
|
12
|
-
"message": "chore(release): version"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { t } from "../..";
|
|
2
|
-
import dayjs from "dayjs";
|
|
3
|
-
|
|
4
|
-
function formatDateTime(date: Date, showTime?: boolean) {
|
|
5
|
-
return (
|
|
6
|
-
dayjs(date).format("MMMM D, YYYY") +
|
|
7
|
-
(showTime ? ` ${t("t.at")} ` + dayjs(date).format("h:mmA") : "")
|
|
8
|
-
);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { formatDateTime as default, formatDateTime };
|