@bloom-housing/ui-components 12.0.12 → 12.0.14
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/dist/src/actions/ExpandableText.js +1 -1
- package/dist/src/actions/ExpandableText.js.map +1 -1
- package/dist/src/helpers/preferences.js +13 -6
- package/dist/src/helpers/preferences.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/ExpandableText.tsx +1 -0
- package/src/helpers/preferences.tsx +22 -15
|
@@ -16,7 +16,7 @@ var moreLessButton = function (expanded, setExpanded, strings, buttonClassName)
|
|
|
16
16
|
if (buttonClassName) {
|
|
17
17
|
classes.push(buttonClassName);
|
|
18
18
|
}
|
|
19
|
-
return (React.createElement("button", { className: classes.join(" "), onClick: function () { return setExpanded(!expanded); }, "aria-label": strings.buttonAriaLabel }, expanded ? strings === null || strings === void 0 ? void 0 : strings.readLess : strings === null || strings === void 0 ? void 0 : strings.readMore));
|
|
19
|
+
return (React.createElement("button", { className: classes.join(" "), onClick: function () { return setExpanded(!expanded); }, "aria-label": strings.buttonAriaLabel, "aria-expanded": expanded }, expanded ? strings === null || strings === void 0 ? void 0 : strings.readLess : strings === null || strings === void 0 ? void 0 : strings.readMore));
|
|
20
20
|
};
|
|
21
21
|
var ExpandableText = function (props) {
|
|
22
22
|
var _a = useState(props.expand || false), expanded = _a[0], setExpanded = _a[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableText.js","sourceRoot":"","sources":["../../../src/actions/ExpandableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,QAA2B,MAAM,iBAAiB,CAAA;AACzD,OAAO,uBAAuB,CAAA;AAgB9B,IAAM,OAAO,GAAG,UAAC,IAAY,EAAE,QAAiB,EAAE,SAAiB;IACjE,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE;QACxC,OAA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,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;KACrF;IACD,OAAO,CACL,6BAAK,SAAS,EAAE,0BAAmB,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,KAAI,EAAE,CAAE;QACxD,GAAG;QACJ,oBAAC,QAAQ,IACP,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EACtD,OAAO,EAAE,KAAK,CAAC,aAAa,GAC5B;QACD,MAAM,CACH,CACP,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { t, GridSection, ViewItem, GridCell, Field, Select, resolveObject
|
|
2
|
+
import { t, GridSection, ViewItem, GridCell, Field, Select, resolveObject } from "../../";
|
|
3
3
|
export var FormAddress = function (_a) {
|
|
4
|
-
var
|
|
4
|
+
var _b, _c, _d;
|
|
5
|
+
var subtitle = _a.subtitle, dataKey = _a.dataKey, _e = _a.enableMailCheckbox, enableMailCheckbox = _e === void 0 ? false : _e, register = _a.register, errors = _a.errors, required = _a.required, stateKeys = _a.stateKeys;
|
|
5
6
|
return (React.createElement(React.Fragment, null,
|
|
6
7
|
React.createElement(GridSection, { subtitle: subtitle },
|
|
7
8
|
React.createElement(GridCell, { span: 2 },
|
|
8
9
|
React.createElement(ViewItem, { label: t("application.contact.streetAddress") },
|
|
9
|
-
React.createElement(Field, { id: "".concat(dataKey, ".street"), name: "".concat(dataKey, ".street"), label: t("application.contact.streetAddress"), placeholder: t("application.contact.streetAddress"), register: register, validation: { required: required }, error: !!resolveObject("".concat(dataKey, ".street"), errors), errorMessage:
|
|
10
|
+
React.createElement(Field, { id: "".concat(dataKey, ".street"), name: "".concat(dataKey, ".street"), label: t("application.contact.streetAddress"), placeholder: t("application.contact.streetAddress"), register: register, validation: { required: required, maxLength: 64 }, error: !!resolveObject("".concat(dataKey, ".street"), errors), errorMessage: ((_b = resolveObject("".concat(dataKey, ".street"), errors)) === null || _b === void 0 ? void 0 : _b.type) === "maxLength"
|
|
11
|
+
? t("errors.maxLength")
|
|
12
|
+
: t("errors.streetError"), readerOnly: true }))),
|
|
10
13
|
React.createElement(GridCell, null,
|
|
11
14
|
React.createElement(ViewItem, { label: t("application.contact.apt") },
|
|
12
|
-
React.createElement(Field, { id: "".concat(dataKey, ".street2"), name: "".concat(dataKey, ".street2"), label: t("application.contact.apt"), placeholder: t("application.contact.apt"), register: register, readerOnly: true }))),
|
|
15
|
+
React.createElement(Field, { id: "".concat(dataKey, ".street2"), name: "".concat(dataKey, ".street2"), label: t("application.contact.apt"), placeholder: t("application.contact.apt"), register: register, readerOnly: true, error: !!resolveObject("".concat(dataKey, ".street2"), errors), validation: { maxLength: 64 }, errorMessage: t("errors.maxLength") }))),
|
|
13
16
|
React.createElement(GridCell, null,
|
|
14
17
|
React.createElement(ViewItem, { label: t("application.contact.city") },
|
|
15
|
-
React.createElement(Field, { id: "".concat(dataKey, ".city"), name: "".concat(dataKey, ".city"), label: t("application.contact.cityName"), placeholder: t("application.contact.cityName"), register: register, validation: { required: required }, error: !!resolveObject("".concat(dataKey, ".city"), errors), errorMessage:
|
|
18
|
+
React.createElement(Field, { id: "".concat(dataKey, ".city"), name: "".concat(dataKey, ".city"), label: t("application.contact.cityName"), placeholder: t("application.contact.cityName"), register: register, validation: { required: required, maxLength: 64 }, error: !!resolveObject("".concat(dataKey, ".city"), errors), errorMessage: ((_c = resolveObject("".concat(dataKey, ".city"), errors)) === null || _c === void 0 ? void 0 : _c.type) === "maxLength"
|
|
19
|
+
? t("errors.maxLength")
|
|
20
|
+
: t("errors.cityError"), readerOnly: true }))),
|
|
16
21
|
React.createElement(GridCell, { className: "md:grid md:grid-cols-2 md:gap-8", span: 2 },
|
|
17
22
|
React.createElement(ViewItem, { label: t("application.contact.state"), className: "mb-0" },
|
|
18
23
|
React.createElement(Select, { id: "".concat(dataKey, ".state"), name: "".concat(dataKey, ".state"), label: t("application.contact.state"), labelClassName: "sr-only", register: register, controlClassName: "control", options: stateKeys, keyPrefix: "states", validation: { required: required }, error: !!resolveObject("".concat(dataKey, ".state"), errors), errorMessage: t("errors.stateError") })),
|
|
19
24
|
React.createElement(ViewItem, { label: t("application.contact.zip") },
|
|
20
|
-
React.createElement(Field, { id: "".concat(dataKey, ".zipCode"), name: "".concat(dataKey, ".zipCode"), label: t("application.contact.zip"), placeholder: t("application.contact.zipCode"), register: register, validation: { required: required }, error: !!resolveObject("".concat(dataKey, ".zipCode"), errors), errorMessage:
|
|
25
|
+
React.createElement(Field, { id: "".concat(dataKey, ".zipCode"), name: "".concat(dataKey, ".zipCode"), label: t("application.contact.zip"), placeholder: t("application.contact.zipCode"), register: register, validation: { required: required, maxLength: 64 }, error: !!resolveObject("".concat(dataKey, ".zipCode"), errors), errorMessage: ((_d = resolveObject("".concat(dataKey, ".zipCode"), errors)) === null || _d === void 0 ? void 0 : _d.type) === "maxLength"
|
|
26
|
+
? t("errors.maxLength")
|
|
27
|
+
: t("errors.zipCodeError"), readerOnly: true }))),
|
|
21
28
|
enableMailCheckbox && (React.createElement(GridCell, { span: 2 },
|
|
22
29
|
React.createElement(Field, { id: "application.sendMailToMailingAddress", name: "application.sendMailToMailingAddress", type: "checkbox", label: t("application.contact.sendMailToMailingAddress"), register: register }))))));
|
|
23
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../../src/helpers/preferences.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,
|
|
1
|
+
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../../src/helpers/preferences.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,CAAC,EAAE,WAA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CACO,CACZ,CACW,CACb,CACJ,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.14",
|
|
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/ui-components",
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { UseFormMethods } from "react-hook-form"
|
|
3
|
-
import {
|
|
4
|
-
t,
|
|
5
|
-
GridSection,
|
|
6
|
-
ViewItem,
|
|
7
|
-
GridCell,
|
|
8
|
-
Field,
|
|
9
|
-
Select,
|
|
10
|
-
resolveObject,
|
|
11
|
-
} from "../../"
|
|
3
|
+
import { t, GridSection, ViewItem, GridCell, Field, Select, resolveObject } from "../../"
|
|
12
4
|
|
|
13
5
|
type FormAddressProps = {
|
|
14
6
|
subtitle: string
|
|
@@ -40,9 +32,13 @@ export const FormAddress = ({
|
|
|
40
32
|
label={t("application.contact.streetAddress")}
|
|
41
33
|
placeholder={t("application.contact.streetAddress")}
|
|
42
34
|
register={register}
|
|
43
|
-
validation={{ required }}
|
|
35
|
+
validation={{ required, maxLength: 64 }}
|
|
44
36
|
error={!!resolveObject(`${dataKey}.street`, errors)}
|
|
45
|
-
errorMessage={
|
|
37
|
+
errorMessage={
|
|
38
|
+
resolveObject(`${dataKey}.street`, errors)?.type === "maxLength"
|
|
39
|
+
? t("errors.maxLength")
|
|
40
|
+
: t("errors.streetError")
|
|
41
|
+
}
|
|
46
42
|
readerOnly
|
|
47
43
|
/>
|
|
48
44
|
</ViewItem>
|
|
@@ -56,6 +52,9 @@ export const FormAddress = ({
|
|
|
56
52
|
placeholder={t("application.contact.apt")}
|
|
57
53
|
register={register}
|
|
58
54
|
readerOnly
|
|
55
|
+
error={!!resolveObject(`${dataKey}.street2`, errors)}
|
|
56
|
+
validation={{ maxLength: 64 }}
|
|
57
|
+
errorMessage={t("errors.maxLength")}
|
|
59
58
|
/>
|
|
60
59
|
</ViewItem>
|
|
61
60
|
</GridCell>
|
|
@@ -68,9 +67,13 @@ export const FormAddress = ({
|
|
|
68
67
|
label={t("application.contact.cityName")}
|
|
69
68
|
placeholder={t("application.contact.cityName")}
|
|
70
69
|
register={register}
|
|
71
|
-
validation={{ required }}
|
|
70
|
+
validation={{ required, maxLength: 64 }}
|
|
72
71
|
error={!!resolveObject(`${dataKey}.city`, errors)}
|
|
73
|
-
errorMessage={
|
|
72
|
+
errorMessage={
|
|
73
|
+
resolveObject(`${dataKey}.city`, errors)?.type === "maxLength"
|
|
74
|
+
? t("errors.maxLength")
|
|
75
|
+
: t("errors.cityError")
|
|
76
|
+
}
|
|
74
77
|
readerOnly
|
|
75
78
|
/>
|
|
76
79
|
</ViewItem>
|
|
@@ -100,9 +103,13 @@ export const FormAddress = ({
|
|
|
100
103
|
label={t("application.contact.zip")}
|
|
101
104
|
placeholder={t("application.contact.zipCode")}
|
|
102
105
|
register={register}
|
|
103
|
-
validation={{ required }}
|
|
106
|
+
validation={{ required, maxLength: 64 }}
|
|
104
107
|
error={!!resolveObject(`${dataKey}.zipCode`, errors)}
|
|
105
|
-
errorMessage={
|
|
108
|
+
errorMessage={
|
|
109
|
+
resolveObject(`${dataKey}.zipCode`, errors)?.type === "maxLength"
|
|
110
|
+
? t("errors.maxLength")
|
|
111
|
+
: t("errors.zipCodeError")
|
|
112
|
+
}
|
|
106
113
|
readerOnly
|
|
107
114
|
/>
|
|
108
115
|
</ViewItem>
|