@oatfi/ui 0.7.0 → 0.8.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/dist/index.cjs.js +12 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +15 -7
- package/dist/index.esm.js +12 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -646,12 +646,20 @@ declare const HelperText: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
646
646
|
* Underwriting outcomes as the API reports them.
|
|
647
647
|
*
|
|
648
648
|
* The declined set is deliberately wide: `CLOSED_NO_DECISION`, `DECLINED`,
|
|
649
|
-
* `DENIED`, `ERROR`, `N/A` and `REJECTED` all mean "no"
|
|
650
|
-
* shown identically. Anything unrecognised — including
|
|
651
|
-
* `NOT_EXECUTED` and `null` — falls through to the manual-review
|
|
652
|
-
* than showing nothing, because an unknown status must never read
|
|
649
|
+
* `DENIED`, `ERROR`, `MANUAL_REVIEW_DECLINED`, `N/A` and `REJECTED` all mean "no"
|
|
650
|
+
* to a borrower and are shown identically. Anything unrecognised — including
|
|
651
|
+
* `MANUAL_REVIEW`, `NOT_EXECUTED` and `null` — falls through to the manual-review
|
|
652
|
+
* message rather than showing nothing, because an unknown status must never read
|
|
653
|
+
* as approval.
|
|
653
654
|
*/
|
|
654
|
-
type UnderwritingDecision = 'PROCESSING' | 'APPROVED' | 'MANUAL_REVIEW' | 'NOT_EXECUTED' | 'CLOSED_NO_DECISION' | 'DECLINED' | 'DENIED' | 'ERROR' | 'N/A' | 'REJECTED';
|
|
655
|
+
type UnderwritingDecision = 'PROCESSING' | 'APPROVED' | 'MANUAL_REVIEW' | 'MANUAL_REVIEW_DECLINED' | 'NOT_EXECUTED' | 'CLOSED_NO_DECISION' | 'DECLINED' | 'DENIED' | 'ERROR' | 'N/A' | 'REJECTED';
|
|
656
|
+
/** How a borrower-facing surface should present an underwriting status. */
|
|
657
|
+
type UnderwritingOutcome = 'processing' | 'approved' | 'declined' | 'review';
|
|
658
|
+
/**
|
|
659
|
+
* The grouping `UnderwritingStatus` renders by, exported so other surfaces (the
|
|
660
|
+
* servicing status summary) cannot drift from it. Unknown statuses are `review`.
|
|
661
|
+
*/
|
|
662
|
+
declare function classifyUnderwritingStatus(status?: string | null): UnderwritingOutcome;
|
|
655
663
|
interface UnderwritingStatusProps {
|
|
656
664
|
status?: string | null;
|
|
657
665
|
/**
|
|
@@ -919,5 +927,5 @@ declare const describeComponentEnv: ({ bundleEnv, apiEnv, ref, sha }: ComponentB
|
|
|
919
927
|
/** Tooltip text: `Bundle: Development (dev12, abc1234) · API: Staging`. */
|
|
920
928
|
declare const describeComponentEnvTitle: ({ bundleEnv, apiEnv, ref, sha, }: ComponentBuildInfo) => string;
|
|
921
929
|
|
|
922
|
-
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, EnvironmentTag, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, defaultTheme, describeComponentEnv, describeComponentEnvTitle, mergeBranding, resolveComponentEnvTag, useTheme };
|
|
923
|
-
export type { AchVerificationConsentProps, BadgeVariant, Branding, CollapsibleSourceProps, ComponentBuildInfo, ComponentEnv, ComponentEnvTag, CurrencyInputProps, DateInputProps, DotsMenuOption, DotsMenuProps, DropDownProps, EmailInputProps, EnvironmentName, EnvironmentTagInfo, EnvironmentTagProps, FileInputProps, FootnoteLink, FootnoteProps, LoaderProps, ManualMethodCardProps, ManualMethodStatus, ManualMethodValue, Option, PhoneInputProps, PlaidConnection, PlaidMethodCardProps, PlaidTileProps, PreviewProps, SSNInputProps, SearchDropdownProps, StepperProps, StepperStep, Tab, TabsProps, TaxIdInputProps, TermsDocumentProps, TextInputProps, Theme, ThemeBorder, ThemeColors, ThemeProviderProps, ThemeTypography, UnderwritingDecision, UnderwritingStatusProps, UploadZoneProps, UploadedFile };
|
|
930
|
+
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, EnvironmentTag, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, classifyUnderwritingStatus, defaultTheme, describeComponentEnv, describeComponentEnvTitle, mergeBranding, resolveComponentEnvTag, useTheme };
|
|
931
|
+
export type { AchVerificationConsentProps, BadgeVariant, Branding, CollapsibleSourceProps, ComponentBuildInfo, ComponentEnv, ComponentEnvTag, CurrencyInputProps, DateInputProps, DotsMenuOption, DotsMenuProps, DropDownProps, EmailInputProps, EnvironmentName, EnvironmentTagInfo, EnvironmentTagProps, FileInputProps, FootnoteLink, FootnoteProps, LoaderProps, ManualMethodCardProps, ManualMethodStatus, ManualMethodValue, Option, PhoneInputProps, PlaidConnection, PlaidMethodCardProps, PlaidTileProps, PreviewProps, SSNInputProps, SearchDropdownProps, StepperProps, StepperStep, Tab, TabsProps, TaxIdInputProps, TermsDocumentProps, TextInputProps, Theme, ThemeBorder, ThemeColors, ThemeProviderProps, ThemeTypography, UnderwritingDecision, UnderwritingOutcome, UnderwritingStatusProps, UploadZoneProps, UploadedFile };
|
package/dist/index.esm.js
CHANGED
|
@@ -2043,16 +2043,24 @@ const DECLINED = /* @__PURE__ */ new Set([
|
|
|
2043
2043
|
"DECLINED",
|
|
2044
2044
|
"DENIED",
|
|
2045
2045
|
"ERROR",
|
|
2046
|
+
"MANUAL_REVIEW_DECLINED",
|
|
2046
2047
|
"N/A",
|
|
2047
2048
|
"REJECTED"
|
|
2048
2049
|
]);
|
|
2050
|
+
function classifyUnderwritingStatus(status) {
|
|
2051
|
+
if (status === "PROCESSING") return "processing";
|
|
2052
|
+
if (status === "APPROVED") return "approved";
|
|
2053
|
+
if (status && DECLINED.has(status)) return "declined";
|
|
2054
|
+
return "review";
|
|
2055
|
+
}
|
|
2049
2056
|
function UnderwritingStatus({
|
|
2050
2057
|
status,
|
|
2051
2058
|
creditLimit,
|
|
2052
2059
|
children,
|
|
2053
2060
|
testId
|
|
2054
2061
|
}) {
|
|
2055
|
-
|
|
2062
|
+
const outcome = classifyUnderwritingStatus(status);
|
|
2063
|
+
if (outcome === "processing") {
|
|
2056
2064
|
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, children: [
|
|
2057
2065
|
/* @__PURE__ */ jsx(H3, { children: "Your application is being reviewed" }),
|
|
2058
2066
|
/* @__PURE__ */ jsxs(Stack, { width: "100%", alignItems: "center", gap: "16px", children: [
|
|
@@ -2061,7 +2069,7 @@ function UnderwritingStatus({
|
|
|
2061
2069
|
] })
|
|
2062
2070
|
] });
|
|
2063
2071
|
}
|
|
2064
|
-
if (
|
|
2072
|
+
if (outcome === "approved") {
|
|
2065
2073
|
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, children: [
|
|
2066
2074
|
/* @__PURE__ */ jsx(H3, { children: "Congrats!" }),
|
|
2067
2075
|
/* @__PURE__ */ jsxs(Body200, { children: [
|
|
@@ -2075,7 +2083,7 @@ function UnderwritingStatus({
|
|
|
2075
2083
|
children
|
|
2076
2084
|
] });
|
|
2077
2085
|
}
|
|
2078
|
-
if (
|
|
2086
|
+
if (outcome === "declined") {
|
|
2079
2087
|
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, children: [
|
|
2080
2088
|
/* @__PURE__ */ jsx(H3, { children: "Sorry, we cannot approve your application" }),
|
|
2081
2089
|
/* @__PURE__ */ jsx(Body200, { children: "We are sorry to inform you that we cannot approve your application. Please try again later." })
|
|
@@ -2597,5 +2605,5 @@ function Preview({ branding, className }) {
|
|
|
2597
2605
|
return /* @__PURE__ */ jsx(ThemeProvider, { branding, children: /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(PreviewContent, {}) }) });
|
|
2598
2606
|
}
|
|
2599
2607
|
|
|
2600
|
-
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content$1 as Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, EnvironmentTag, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, defaultTheme, describeComponentEnv, describeComponentEnvTitle, mergeBranding, resolveComponentEnvTag, useTheme };
|
|
2608
|
+
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content$1 as Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, EnvironmentTag, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, classifyUnderwritingStatus, defaultTheme, describeComponentEnv, describeComponentEnvTitle, mergeBranding, resolveComponentEnvTag, useTheme };
|
|
2601
2609
|
//# sourceMappingURL=index.esm.js.map
|