@axos-web-dev/shared-components 0.0.133 → 0.0.134

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.
@@ -1,5 +1,5 @@
1
- const fdic_callout = "_fdic_callout_1kihd_1";
2
- const inner_container = "_inner_container_1kihd_6";
1
+ const fdic_callout = "_fdic_callout_1f6md_1";
2
+ const inner_container = "_inner_container_1f6md_6";
3
3
  const css = {
4
4
  fdic_callout,
5
5
  inner_container
@@ -1,26 +1,23 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import css from "./FdicCallout.module.js";
3
3
  const FdicBanner = () => {
4
- return /* @__PURE__ */ jsx("header", { className: css.fdic_callout, children: /* @__PURE__ */ jsx("div", { className: css.inner_container, children: /* @__PURE__ */ jsxs("div", { className: "flex middle", children: [
4
+ return /* @__PURE__ */ jsx("header", { className: css.fdic_callout, children: /* @__PURE__ */ jsx("div", { className: css.inner_container, children: /* @__PURE__ */ jsx("div", { className: "flex middle", children: /* @__PURE__ */ jsxs("picture", { children: [
5
5
  /* @__PURE__ */ jsx(
6
- "svg",
6
+ "source",
7
7
  {
8
- width: "39",
9
- height: "16",
10
- viewBox: "0 0 39 16",
11
- fill: "none",
12
- xmlns: "http://www.w3.org/2000/svg",
13
- children: /* @__PURE__ */ jsx(
14
- "path",
15
- {
16
- d: "M34.8999 3.9C36.1999 3.9 37.3999 4.5 38.1999 5.6V0.8C37.0999 0.3 35.9999 0 34.6999 0C32.6999 0 30.5999 0.9 29.1999 2.4C27.7999 4 27.0999 6 27.0999 8C27.0999 10.2 27.7999 12.2 29.3999 13.7C30.8999 15.1 32.7999 15.9 34.8999 15.9C36.0999 15.9 36.9999 15.6 38.1999 15.2V10.5C37.3999 11.5 36.1999 12.1 34.8999 12.1C32.4999 12.1 30.9999 10.4 30.9999 8C30.9999 5.6 32.5999 3.9 34.8999 3.9ZM22.7999 15.6H26.5999V0.5H22.7999V15.6ZM14.0999 12.2H13.1999V3.8H14.0999C16.4999 3.8 18.2999 5.3 18.2999 8C18.2999 10.9 16.3999 12.2 14.0999 12.2ZM14.8999 0.5H9.4999V15.6H14.8999C18.8999 15.6 22.2999 12.3 22.2999 8.1C22.2999 3.9 18.8999 0.5 14.8999 0.5ZM0.399902 15.5H4.1999V9.6H8.3999V6.3H4.1999V3.8H8.7999V0.5H0.399902V15.5Z",
17
- fill: "#fff"
18
- }
19
- )
8
+ media: "(max-width:470px)",
9
+ srcSet: "https://images.axos.com/o9ov1v03uwqk/kntIyYva4pj4Lahj5IUiR/9a3f70731650a801033c3553a3c151d8/fdic-callout-mobile.png"
20
10
  }
21
11
  ),
22
- /* @__PURE__ */ jsx("p", { className: "mb_0", children: "FDIC-Insured - Backed by the full faith and credit of the U.S. Government" })
23
- ] }) }) });
12
+ /* @__PURE__ */ jsx(
13
+ "img",
14
+ {
15
+ src: "https://images.axos.com/o9ov1v03uwqk/3ptbiM1tUeC10mwamc0Hvg/9d11b3170a9a42a853f7342199865260/fdic-callout.png",
16
+ alt: "fdic-insured - backed by the full faith and credit of the u.s. government",
17
+ className: "img_fluid"
18
+ }
19
+ )
20
+ ] }) }) }) });
24
21
  };
25
22
  export {
26
23
  FdicBanner
@@ -51,7 +51,7 @@ const Purposes = [
51
51
  "Refi Rate-Term/Limited C.O."
52
52
  ];
53
53
  const RepresentativesFico = [
54
- "780 +",
54
+ "780",
55
55
  "779 - 760",
56
56
  "759 - 740",
57
57
  "739 - 720",
@@ -73,7 +73,8 @@ const DocType = [
73
73
  "Investor - DSCR No Ratio",
74
74
  "Written VOE",
75
75
  "2 Year Alt Doc",
76
- "1yr Streamlined Full Doc"
76
+ "1yr Streamlined Full Doc",
77
+ "1yr Profit and Loss"
77
78
  ];
78
79
  const Citizenship = [
79
80
  "U.S. Citizen",
@@ -1,15 +1,19 @@
1
1
  import { FormProps } from './FormProps';
2
2
 
3
3
  export type QuickPricerInputs = {
4
- base_Loan_Amount: number;
5
- appraised_Value: number;
6
- loan_Purpose: string;
7
- Cash_Out_Amount: number;
8
- CblInterestOnly: string;
9
- representative_FICO: string;
10
- months_Reserves: number;
11
- underwriting_Document_Type: string;
12
- citizenship: string;
4
+ Base_Loan_Amount__c: number;
5
+ Appraised_Value__c: number;
6
+ Loan_Purpose__c: string;
7
+ Cash_Out_Amount__c: number;
8
+ Interest_Only__c: boolean;
9
+ Self_Employed__c: boolean;
10
+ Pledged_Assets__c: boolean;
11
+ Cross_Collateralization__c: boolean;
12
+ Representative_FICO__c: string;
13
+ Months_Reserves__c: number;
14
+ Underwriting_Document_Type__c: string;
15
+ Debt_To_Income_Ratio__c: number;
16
+ Citizenship__c: string;
13
17
  Mortgage_Lates_12: string;
14
18
  Mortgage_Lates_24: string;
15
19
  HousingEventType: string;
@@ -18,10 +22,10 @@ export type QuickPricerInputs = {
18
22
  Number_of_Properties_Financed: number;
19
23
  BankruptcySeasoning: string;
20
24
  zip: string;
21
- property_Type: string;
22
- occupance: string;
23
- Units: string;
24
- Prepayment_Penalty: string;
25
+ Property_Type__c: string;
26
+ Occupance__c: string;
27
+ Units__c: string;
28
+ Prepayment_Penalty__c: string;
25
29
  broker_Compensation: string;
26
30
  NMLS_ID__c: string;
27
31
  email: string;
@@ -12,7 +12,7 @@ import { Dropdown } from "../Input/Dropdown.js";
12
12
  /* empty css */
13
13
  import { Input } from "../Input/Input.js";
14
14
  import "../Input/Input.css.js";
15
- import { InputAmount } from "../Input/InputAmount.js";
15
+ import "../Input/InputAmount.js";
16
16
  import { InputPhone } from "../Input/InputPhone.js";
17
17
  import "../Input/InputTextArea.js";
18
18
  import "../icons/ArrowIcon/ArrowIcon.css.js";
@@ -29,7 +29,7 @@ import { getVariant } from "../utils/getVariant.js";
29
29
  import clsx from "clsx";
30
30
  import { useForm, FormProvider } from "react-hook-form";
31
31
  import * as z from "zod";
32
- import { Purposes, RepresentativesFico, DocType, Citizenship, MortgageLates, HousingEventType, HousingEventHistory, BankruptcyType, BankruptcySeasoning, PropertyType, Occupancy, NumberOfUnits, PrepaymentPenalty } from "./FormEnums.js";
32
+ import { Purposes, RepresentativesFico, DocType, Citizenship, MortgageLates, HousingEventType, HousingEventHistory, BankruptcyType, BankruptcySeasoning, PropertyType, Occupancy, NumberOfUnits, PrepaymentPenalty, BrokerConpensation } from "./FormEnums.js";
33
33
  import { formContainer, iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, one_row, section_title, checkbox_group, disclosureForm, actions } from "./Forms.css.js";
34
34
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
35
35
  const QuickPricer = ({
@@ -47,30 +47,45 @@ const QuickPricer = ({
47
47
  validateEmail
48
48
  }) => {
49
49
  const [refiCashOut, setRefiCashOut] = useState(false);
50
+ const [DSCR_Ratio, setDSCR_Ratio] = useState(false);
51
+ const [houseEventHistory, setHouseEventHistory] = useState(false);
52
+ const [bankruptcySeasoning, setBankruptcySeasoning] = useState(false);
53
+ const [numberOfUnits, setNumberOfUnits] = useState(false);
54
+ const [prepaymentPenalty, setPrepaymentPenalty] = useState(false);
50
55
  const schema = z.object({
51
- base_Loan_Amount: z.coerce.number({ message: "Please provide a valid loan amount" }).min(149999, {
56
+ Base_Loan_Amount__c: z.coerce.number({
57
+ message: "Please provide a valid base loan amount"
58
+ }).min(149999, {
52
59
  message: "Please enter a value greater than or equal to 149999"
53
60
  }),
54
- appraised_Value: z.coerce.number({ message: "Please provide a valid property value" }).min(149999, {
61
+ Appraised_Value__c: z.coerce.number({
62
+ message: "Please provide a valid property value"
63
+ }).min(149999, {
55
64
  message: "Please enter a value greater than or equal to 149999"
56
65
  }),
57
- loan_Purpose: z.string().min(1, { message: "Purpose is required" }).refine((val) => Purposes.includes(val), {
66
+ Loan_Purpose__c: z.string().min(1, { message: "Purpose is required" }).refine((val) => Purposes.includes(val), {
58
67
  message: "Purpose is required"
59
68
  }),
60
- Cash_Out_Amount: z.coerce.number({
69
+ Cash_Out_Amount__c: z.coerce.number({
61
70
  message: "Please provide a valid property value"
62
- }).min(1, { message: "Cash Out is required" }),
63
- CblInterestOnly: z.coerce.string(),
64
- representative_FICO: z.string().min(1, { message: "Representative FICO is required" }).refine((val) => RepresentativesFico.includes(val), {
71
+ }).min(0, { message: "Cash Out is required" }),
72
+ Interest_Only__c: z.coerce.boolean(),
73
+ Self_Employed__c: z.coerce.boolean(),
74
+ Pledged_Assets__c: z.coerce.boolean(),
75
+ Cross_Collateralization__c: z.coerce.boolean(),
76
+ Representative_FICO__c: z.string().min(1, { message: "Representative FICO is required" }).refine((val) => RepresentativesFico.includes(val), {
65
77
  message: "Representative FICO is required"
66
78
  }),
67
- months_Reserves: z.coerce.number({
79
+ Months_Reserves__c: z.coerce.number({
68
80
  message: "Please provide a valid months of reserves"
69
- }).min(1, { message: "Months of reserves is required" }),
70
- underwriting_Document_Type: z.string().min(1, { message: "Underwriting / Doc Type is required" }).refine((val) => DocType.includes(val), {
81
+ }).min(0, { message: "Months of reserves is required" }),
82
+ Underwriting_Document_Type__c: z.string().min(1, { message: "Underwriting / Doc Type is required" }).refine((val) => DocType.includes(val), {
71
83
  message: "Underwriting / Doc Type is required"
72
84
  }),
73
- citizenship: z.string().min(1, { message: "Citizenship is required" }).refine((val) => Citizenship.includes(val), {
85
+ Debt_To_Income_Ratio__c: z.coerce.number({
86
+ message: "DCSR Ratio should be between 0.00 and 10.00"
87
+ }).min(0, { message: "DCSR Ratio is required" }).max(10, { message: "DCSR Ratio should be between 0.00 and 10.00" }),
88
+ Citizenship__c: z.string().min(1, { message: "Citizenship is required" }).refine((val) => Citizenship.includes(val), {
74
89
  message: "Citizenship is required"
75
90
  }),
76
91
  Mortgage_Lates_12: z.string().min(1, { message: "Mortgage history is required" }).refine((val) => MortgageLates.includes(val), {
@@ -88,26 +103,26 @@ const QuickPricer = ({
88
103
  BankruptcyType: z.string().min(1, { message: "Bankruptcy type is required" }).refine((val) => BankruptcyType.includes(val), {
89
104
  message: "Bankruptcy type is required"
90
105
  }),
91
- Number_of_Properties_Financed: z.coerce.number({ message: "Please provide a valid # of Properties" }).min(1, {
106
+ Number_of_Properties_Financed: z.coerce.number({ message: "Please provide a valid # of Properties" }).min(0, {
92
107
  message: "Please provide a valid # of Properties"
93
108
  }),
94
109
  BankruptcySeasoning: z.string().min(1, { message: "Bankruptcy seasoning is required" }).refine((val) => BankruptcySeasoning.includes(val), {
95
110
  message: "Bankruptcy seasoning is required"
96
111
  }),
97
112
  zip: z.string().trim().max(20).min(1, { message: "Zip code is required." }),
98
- property_Type: z.string().min(1, { message: "Property type is required" }).refine((val) => PropertyType.includes(val), {
113
+ Property_Type__c: z.string().min(1, { message: "Property type is required" }).refine((val) => PropertyType.includes(val), {
99
114
  message: "Property type is required"
100
115
  }),
101
- occupance: z.string().min(1, { message: "Occupancy is required" }).refine((val) => Occupancy.includes(val), {
116
+ Occupance__c: z.string().min(1, { message: "Occupancy is required" }).refine((val) => Occupancy.includes(val), {
102
117
  message: "Occupancy is required"
103
118
  }),
104
- Units: z.string().min(1, { message: "# of Units is required" }).refine((val) => NumberOfUnits.includes(val), {
119
+ Units__c: z.string().min(1, { message: "# of Units is required" }).refine((val) => NumberOfUnits.includes(val), {
105
120
  message: "# of Units is required"
106
121
  }),
107
- Prepayment_Penalty: z.string().min(1, { message: "Prepayment penalty is required" }).refine((val) => PrepaymentPenalty.includes(val), {
122
+ Prepayment_Penalty__c: z.string().min(1, { message: "Prepayment penalty is required" }).refine((val) => PrepaymentPenalty.includes(val), {
108
123
  message: "Prepayment penalty is required"
109
124
  }),
110
- broker_Compensation: z.string().min(1, { message: "Broker compensation is required" }).refine((val) => PrepaymentPenalty.includes(val), {
125
+ broker_Compensation: z.string().min(1, { message: "Broker compensation is required" }).refine((val) => BrokerConpensation.includes(val), {
111
126
  message: "Broker compensation is required"
112
127
  }),
113
128
  NMLS_ID__c: z.string().min(6).max(7),
@@ -123,17 +138,32 @@ const QuickPricer = ({
123
138
  }
124
139
  return removeDashes;
125
140
  })
141
+ }).superRefine((values, ctx) => {
142
+ if (values.Base_Loan_Amount__c > values.Appraised_Value__c) {
143
+ ctx.addIssue({
144
+ code: z.ZodIssueCode.custom,
145
+ path: ["Base_Loan_Amount__c"],
146
+ message: "Base loan amount should be lower than appraised value"
147
+ });
148
+ }
126
149
  });
127
150
  const methods = useForm({
128
- resolver: zodResolver(schema.merge(SalesforceSchema), {
151
+ resolver: zodResolver(z.intersection(schema, SalesforceSchema), {
129
152
  async: true
130
153
  }),
131
154
  mode: "all",
155
+ reValidateMode: "onChange",
132
156
  defaultValues: {
133
- months_Reserves: 0
157
+ Cash_Out_Amount__c: 0,
158
+ Debt_To_Income_Ratio__c: 0,
159
+ Months_Reserves__c: 0,
160
+ housingEventSeasoning: "Not Applicable",
161
+ BankruptcySeasoning: "Not Applicable",
162
+ Number_of_Properties_Financed: 0,
163
+ Units__c: "1 Unit",
164
+ Prepayment_Penalty__c: ""
134
165
  }
135
166
  });
136
- console.log(methods, "methooooods");
137
167
  const {
138
168
  handleSubmit,
139
169
  register,
@@ -169,10 +199,10 @@ const QuickPricer = ({
169
199
  /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
170
200
  /* @__PURE__ */ jsx("div", { className: clsx(one_row, section_title({ variant })), children: /* @__PURE__ */ jsx("h4", { className: "header_4", children: "Loan Details" }) }),
171
201
  /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
172
- InputAmount,
202
+ Input,
173
203
  {
174
- id: "base_Loan_Amount",
175
- ...register("base_Loan_Amount", {
204
+ id: "Base_Loan_Amount__c",
205
+ ...register("Base_Loan_Amount__c", {
176
206
  required: true,
177
207
  minLength: 149999,
178
208
  maxLength: 999999999
@@ -180,26 +210,27 @@ const QuickPricer = ({
180
210
  label: "Loan Amount",
181
211
  sizes: "medium",
182
212
  required: true,
183
- error: !!errors.base_Loan_Amount,
184
- helperText: errors.base_Loan_Amount?.message,
213
+ error: !!errors.Base_Loan_Amount__c,
214
+ helperText: errors.Base_Loan_Amount__c?.message,
185
215
  variant,
186
216
  type: "number"
187
217
  }
188
218
  ) }),
189
219
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
190
- InputAmount,
220
+ Input,
191
221
  {
192
- id: "appraised_Value",
193
- ...register("appraised_Value", {
222
+ id: "Appraised_Value__c",
223
+ ...register("Appraised_Value__c", {
194
224
  required: true,
195
225
  minLength: 149999,
196
- maxLength: 999999999
226
+ maxLength: 999999999,
227
+ deps: ["Base_Loan_Amount__c"]
197
228
  }),
198
229
  label: "Property Value",
199
230
  sizes: "medium",
200
231
  required: true,
201
- error: !!errors.appraised_Value,
202
- helperText: errors.appraised_Value?.message,
232
+ error: !!errors.Appraised_Value__c,
233
+ helperText: errors.Appraised_Value__c?.message,
203
234
  variant,
204
235
  type: "number"
205
236
  }
@@ -207,15 +238,15 @@ const QuickPricer = ({
207
238
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
208
239
  Dropdown,
209
240
  {
210
- id: "loan_Purpose",
211
- ...register("loan_Purpose", {
241
+ id: "Loan_Purpose__c",
242
+ ...register("Loan_Purpose__c", {
212
243
  required: true
213
244
  }),
214
245
  label: "Purpose",
215
246
  sizes: "medium",
216
247
  required: true,
217
- error: !!errors.loan_Purpose,
218
- helperText: errors.loan_Purpose?.message,
248
+ error: !!errors.Loan_Purpose__c,
249
+ helperText: errors.Loan_Purpose__c?.message,
219
250
  variant,
220
251
  defaultValue: "Purpose Loan",
221
252
  onChange: (event) => {
@@ -223,7 +254,7 @@ const QuickPricer = ({
223
254
  setRefiCashOut(true);
224
255
  } else {
225
256
  setRefiCashOut(false);
226
- setValue("Cash_Out_Amount", 0);
257
+ setValue("Cash_Out_Amount__c", 0);
227
258
  }
228
259
  },
229
260
  children: [
@@ -235,17 +266,17 @@ const QuickPricer = ({
235
266
  }
236
267
  ) }),
237
268
  refiCashOut && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
238
- InputAmount,
269
+ Input,
239
270
  {
240
- id: "Cash_Out_Amount",
241
- ...register("Cash_Out_Amount", {
271
+ id: "Cash_Out_Amount__c",
272
+ ...register("Cash_Out_Amount__c", {
242
273
  required: true
243
274
  }),
244
275
  label: "Cash Out",
245
276
  sizes: "medium",
246
277
  required: true,
247
- error: !!errors.Cash_Out_Amount,
248
- helperText: errors.Cash_Out_Amount?.message,
278
+ error: !!errors.Cash_Out_Amount__c,
279
+ helperText: errors.Cash_Out_Amount__c?.message,
249
280
  variant,
250
281
  type: "number"
251
282
  }
@@ -254,52 +285,52 @@ const QuickPricer = ({
254
285
  /* @__PURE__ */ jsx(
255
286
  Checkbox,
256
287
  {
257
- id: "CblInterestOnly",
258
- ...register("CblInterestOnly"),
288
+ id: "Interest_Only__c",
289
+ ...register("Interest_Only__c"),
259
290
  sizes: "medium",
260
- error: !!errors.CblInterestOnly,
261
- helperText: errors.CblInterestOnly?.message,
291
+ error: !!errors.Interest_Only__c,
292
+ helperText: errors.Interest_Only__c?.message,
262
293
  variant,
263
- value: "Interest Only",
294
+ value: 1,
264
295
  children: "Interest Only"
265
296
  }
266
297
  ),
267
298
  /* @__PURE__ */ jsx(
268
299
  Checkbox,
269
300
  {
270
- id: "CblInterestOnly",
271
- ...register("CblInterestOnly"),
301
+ id: "Self_Employed__c",
302
+ ...register("Self_Employed__c"),
272
303
  sizes: "medium",
273
- error: !!errors.CblInterestOnly,
274
- helperText: errors.CblInterestOnly?.message,
304
+ error: !!errors.Self_Employed__c,
305
+ helperText: errors.Self_Employed__c?.message,
275
306
  variant,
276
- value: "Self Employed",
307
+ value: 1,
277
308
  children: "Self Employed"
278
309
  }
279
310
  ),
280
311
  /* @__PURE__ */ jsx(
281
312
  Checkbox,
282
313
  {
283
- id: "CblInterestOnly",
284
- ...register("CblInterestOnly"),
314
+ id: "Pledged_Assets__c",
315
+ ...register("Pledged_Assets__c"),
285
316
  sizes: "medium",
286
- error: !!errors.CblInterestOnly,
287
- helperText: errors.CblInterestOnly?.message,
317
+ error: !!errors.Pledged_Assets__c,
318
+ helperText: errors.Pledged_Assets__c?.message,
288
319
  variant,
289
- value: "Pledget Assets",
320
+ value: 1,
290
321
  children: "Pledget Assets"
291
322
  }
292
323
  ),
293
324
  /* @__PURE__ */ jsx(
294
325
  Checkbox,
295
326
  {
296
- id: "CblInterestOnly",
297
- ...register("CblInterestOnly"),
327
+ id: "Cross_Collateralization__c",
328
+ ...register("Cross_Collateralization__c"),
298
329
  sizes: "medium",
299
- error: !!errors.CblInterestOnly,
300
- helperText: errors.CblInterestOnly?.message,
330
+ error: !!errors.Cross_Collateralization__c,
331
+ helperText: errors.Cross_Collateralization__c?.message,
301
332
  variant,
302
- value: "Cross Collateralization",
333
+ value: 1,
303
334
  children: "Cross Collateralization"
304
335
  }
305
336
  )
@@ -307,22 +338,22 @@ const QuickPricer = ({
307
338
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
308
339
  Dropdown,
309
340
  {
310
- id: "representative_FICO",
311
- ...register("representative_FICO", {
341
+ id: "Representative_FICO__c",
342
+ ...register("Representative_FICO__c", {
312
343
  required: true
313
344
  }),
314
345
  label: "FICO",
315
346
  sizes: "medium",
316
347
  required: true,
317
- error: !!errors.representative_FICO,
318
- helperText: errors.representative_FICO?.message,
348
+ error: !!errors.Representative_FICO__c,
349
+ helperText: errors.Representative_FICO__c?.message,
319
350
  variant,
320
- defaultValue: "FICO",
351
+ defaultValue: "default",
321
352
  children: [
322
- /* @__PURE__ */ jsx("option", { value: "FICO", disabled: true, children: "Select a Representative FICO" }),
323
- /* @__PURE__ */ jsx("option", { value: "780 +", children: "780 +" }),
324
- /* @__PURE__ */ jsx("option", { value: "779 - 760", children: "779 - 740" }),
325
- /* @__PURE__ */ jsx("option", { value: "759 - 760", children: "779 - 740" }),
353
+ /* @__PURE__ */ jsx("option", { value: "default", disabled: true, children: "Select a Representative FICO" }),
354
+ /* @__PURE__ */ jsx("option", { value: "780", children: "780+" }),
355
+ /* @__PURE__ */ jsx("option", { value: "779 - 760", children: "779 - 760" }),
356
+ /* @__PURE__ */ jsx("option", { value: "759 - 740", children: "759 - 740" }),
326
357
  /* @__PURE__ */ jsx("option", { value: "739 - 720", children: "739 - 720" }),
327
358
  /* @__PURE__ */ jsx("option", { value: "719 - 700", children: "719 - 700" }),
328
359
  /* @__PURE__ */ jsx("option", { value: "699 - 680", children: "699 - 680" }),
@@ -334,17 +365,17 @@ const QuickPricer = ({
334
365
  }
335
366
  ) }),
336
367
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
337
- InputAmount,
368
+ Input,
338
369
  {
339
- id: "months_Reserves",
340
- ...register("months_Reserves", {
370
+ id: "Months_Reserves__c",
371
+ ...register("Months_Reserves__c", {
341
372
  required: true
342
373
  }),
343
- label: "Property Value",
374
+ label: "Months of Reserves",
344
375
  sizes: "medium",
345
376
  required: true,
346
- error: !!errors.months_Reserves,
347
- helperText: errors.months_Reserves?.message,
377
+ error: !!errors.Months_Reserves__c,
378
+ helperText: errors.Months_Reserves__c?.message,
348
379
  variant,
349
380
  type: "number"
350
381
  }
@@ -352,17 +383,25 @@ const QuickPricer = ({
352
383
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
353
384
  Dropdown,
354
385
  {
355
- id: "underwriting_Document_Type",
356
- ...register("underwriting_Document_Type", {
386
+ id: "Underwriting_Document_Type__c",
387
+ ...register("Underwriting_Document_Type__c", {
357
388
  required: true
358
389
  }),
359
390
  label: "Underwriting / Doc Type",
360
391
  sizes: "medium",
361
392
  required: true,
362
- error: !!errors.underwriting_Document_Type,
363
- helperText: errors.underwriting_Document_Type?.message,
393
+ error: !!errors.Underwriting_Document_Type__c,
394
+ helperText: errors.Underwriting_Document_Type__c?.message,
364
395
  variant,
365
396
  defaultValue: "Full Doc",
397
+ onChange: (event) => {
398
+ if (event.target.value === "Investor - DSCR") {
399
+ setDSCR_Ratio(true);
400
+ } else {
401
+ setDSCR_Ratio(false);
402
+ setValue("Debt_To_Income_Ratio__c", 0);
403
+ }
404
+ },
366
405
  children: [
367
406
  /* @__PURE__ */ jsx("option", { value: "Full Doc", children: "Full Doc" }),
368
407
  /* @__PURE__ */ jsx("option", { value: "Asset Depletion", children: "Asset Depletion" }),
@@ -374,22 +413,39 @@ const QuickPricer = ({
374
413
  /* @__PURE__ */ jsx("option", { value: "Investor - DSCR No Ratio", children: "Investor - DSCR No Ratio" }),
375
414
  /* @__PURE__ */ jsx("option", { value: "Written VOE", children: "Written VOE" }),
376
415
  /* @__PURE__ */ jsx("option", { value: "2 Year Alt Doc", children: "2 Year Alt Doc" }),
377
- /* @__PURE__ */ jsx("option", { value: "1yr Streamlined Full Doc", children: "1yr Streamlined Full Doc" })
416
+ /* @__PURE__ */ jsx("option", { value: "1yr Streamlined Full Doc", children: "1yr Streamlined Full Doc" }),
417
+ /* @__PURE__ */ jsx("option", { value: "1yr Profit and Loss", children: "1yr Profit and Loss" })
378
418
  ]
379
419
  }
380
420
  ) }),
421
+ DSCR_Ratio && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
422
+ Input,
423
+ {
424
+ id: "Debt_To_Income_Ratio__c",
425
+ ...register("Debt_To_Income_Ratio__c", {
426
+ required: true
427
+ }),
428
+ label: "DSCR Ratio",
429
+ sizes: "medium",
430
+ required: true,
431
+ error: !!errors.Debt_To_Income_Ratio__c,
432
+ helperText: errors.Debt_To_Income_Ratio__c?.message,
433
+ variant,
434
+ type: "number"
435
+ }
436
+ ) }),
381
437
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
382
438
  Dropdown,
383
439
  {
384
- id: "citizenship",
385
- ...register("citizenship", {
440
+ id: "Citizenship__c",
441
+ ...register("Citizenship__c", {
386
442
  required: true
387
443
  }),
388
444
  label: "Citizenship",
389
445
  sizes: "medium",
390
446
  required: true,
391
- error: !!errors.citizenship,
392
- helperText: errors.citizenship?.message,
447
+ error: !!errors.Citizenship__c,
448
+ helperText: errors.Citizenship__c?.message,
393
449
  variant,
394
450
  defaultValue: "U.S. Citizen",
395
451
  children: [
@@ -457,6 +513,14 @@ const QuickPricer = ({
457
513
  error: !!errors.HousingEventType,
458
514
  helperText: errors.HousingEventType?.message,
459
515
  variant,
516
+ onChange: (event) => {
517
+ if (event.target.value !== "None") {
518
+ setHouseEventHistory(true);
519
+ } else {
520
+ setHouseEventHistory(false);
521
+ setValue("housingEventSeasoning", "Not Applicable");
522
+ }
523
+ },
460
524
  defaultValue: "None",
461
525
  children: [
462
526
  /* @__PURE__ */ jsx("option", { value: "None", children: "None" }),
@@ -468,7 +532,7 @@ const QuickPricer = ({
468
532
  ]
469
533
  }
470
534
  ) }),
471
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
535
+ houseEventHistory && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
472
536
  Dropdown,
473
537
  {
474
538
  id: "housingEventSeasoning",
@@ -507,6 +571,14 @@ const QuickPricer = ({
507
571
  helperText: errors.BankruptcyType?.message,
508
572
  variant,
509
573
  defaultValue: "None",
574
+ onChange: (event) => {
575
+ if (event.target.value !== "None") {
576
+ setBankruptcySeasoning(true);
577
+ } else {
578
+ setBankruptcySeasoning(false);
579
+ setValue("BankruptcySeasoning", "Not Applicable");
580
+ }
581
+ },
510
582
  children: [
511
583
  /* @__PURE__ */ jsx("option", { value: "None", children: "None" }),
512
584
  /* @__PURE__ */ jsx("option", { value: "Chapter 7", children: "Chapter 7" }),
@@ -516,7 +588,7 @@ const QuickPricer = ({
516
588
  }
517
589
  ) }),
518
590
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
519
- InputAmount,
591
+ Input,
520
592
  {
521
593
  id: "Number_of_Properties_Financed",
522
594
  ...register("Number_of_Properties_Financed", {
@@ -531,7 +603,7 @@ const QuickPricer = ({
531
603
  type: "number"
532
604
  }
533
605
  ) }),
534
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
606
+ bankruptcySeasoning && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
535
607
  Dropdown,
536
608
  {
537
609
  id: "BankruptcySeasoning",
@@ -574,17 +646,25 @@ const QuickPricer = ({
574
646
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
575
647
  Dropdown,
576
648
  {
577
- id: "property_Type",
578
- ...register("property_Type", {
649
+ id: "Property_Type__c",
650
+ ...register("Property_Type__c", {
579
651
  required: true
580
652
  }),
581
653
  label: "Property Type",
582
654
  sizes: "medium",
583
655
  required: true,
584
- error: !!errors.property_Type,
585
- helperText: errors.property_Type?.message,
656
+ error: !!errors.Property_Type__c,
657
+ helperText: errors.Property_Type__c?.message,
586
658
  variant,
587
659
  defaultValue: "Default",
660
+ onChange: (event) => {
661
+ if (event.target.value === "Single Family Residence") {
662
+ setNumberOfUnits(true);
663
+ } else {
664
+ setNumberOfUnits(false);
665
+ setValue("Units__c", "1 Unit");
666
+ }
667
+ },
588
668
  children: [
589
669
  /* @__PURE__ */ jsx("option", { value: "Default", disabled: true, children: "Select option" }),
590
670
  /* @__PURE__ */ jsx("option", { value: "Single Family Residence", children: "Single Family Residence" }),
@@ -597,39 +677,47 @@ const QuickPricer = ({
597
677
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
598
678
  Dropdown,
599
679
  {
600
- id: "occupance",
601
- ...register("occupance", {
680
+ id: "Occupance__c",
681
+ ...register("Occupance__c", {
602
682
  required: true
603
683
  }),
604
684
  label: "Occupancy",
605
685
  sizes: "medium",
606
686
  required: true,
607
- error: !!errors.occupance,
608
- helperText: errors.occupance?.message,
687
+ error: !!errors.Occupance__c,
688
+ helperText: errors.Occupance__c?.message,
609
689
  variant,
610
- defaultValue: "Default",
690
+ defaultValue: "",
691
+ onChange: (event) => {
692
+ if (event.target.value === "Investment") {
693
+ setPrepaymentPenalty(true);
694
+ } else {
695
+ setPrepaymentPenalty(false);
696
+ setValue("Prepayment_Penalty__c", "");
697
+ }
698
+ },
611
699
  children: [
612
- /* @__PURE__ */ jsx("option", { value: "Default", disabled: true, children: "Select option" }),
700
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select option" }),
613
701
  /* @__PURE__ */ jsx("option", { value: "Principal Residence", children: "Principal Residence" }),
614
702
  /* @__PURE__ */ jsx("option", { value: "Second Home", children: "Second Home" }),
615
703
  /* @__PURE__ */ jsx("option", { value: "Investment", children: "Investment" })
616
704
  ]
617
705
  }
618
706
  ) }),
619
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
707
+ numberOfUnits && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
620
708
  Dropdown,
621
709
  {
622
710
  id: "Units",
623
- ...register("Units", {
711
+ ...register("Units__c", {
624
712
  required: true
625
713
  }),
626
- label: "# of Units",
714
+ label: "# of Units__c",
627
715
  sizes: "medium",
628
716
  required: true,
629
- error: !!errors.Units,
630
- helperText: errors.Units?.message,
717
+ error: !!errors.Units__c,
718
+ helperText: errors.Units__c?.message,
631
719
  variant,
632
- defaultValue: "Default",
720
+ defaultValue: "1 Unit",
633
721
  children: [
634
722
  /* @__PURE__ */ jsx("option", { value: "1 Unit", children: "1 Unit" }),
635
723
  /* @__PURE__ */ jsx("option", { value: "2 Unit", children: "2 Unit" }),
@@ -638,22 +726,22 @@ const QuickPricer = ({
638
726
  ]
639
727
  }
640
728
  ) }),
641
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
729
+ prepaymentPenalty && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
642
730
  Dropdown,
643
731
  {
644
- id: "Prepayment_Penalty",
645
- ...register("Prepayment_Penalty", {
732
+ id: "Prepayment_Penalty__c",
733
+ ...register("Prepayment_Penalty__c", {
646
734
  required: true
647
735
  }),
648
736
  label: "Prepayment Penalty",
649
737
  sizes: "medium",
650
738
  required: true,
651
- error: !!errors.Prepayment_Penalty,
652
- helperText: errors.Prepayment_Penalty?.message,
739
+ error: !!errors.Prepayment_Penalty__c,
740
+ helperText: errors.Prepayment_Penalty__c?.message,
653
741
  variant,
654
- defaultValue: "Default",
742
+ defaultValue: "",
655
743
  children: [
656
- /* @__PURE__ */ jsx("option", { value: "Default", disabled: true, children: "Select option" }),
744
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select option" }),
657
745
  /* @__PURE__ */ jsx("option", { value: "1 Year", children: "1 Year" }),
658
746
  /* @__PURE__ */ jsx("option", { value: "2 Year", children: "2 Year" }),
659
747
  /* @__PURE__ */ jsx("option", { value: "3 Year", children: "3 Year" }),
@@ -718,7 +806,8 @@ const QuickPricer = ({
718
806
  required: true,
719
807
  error: !!errors.email,
720
808
  helperText: errors.email?.message,
721
- variant
809
+ variant,
810
+ type: "email"
722
811
  }
723
812
  ) }),
724
813
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
@@ -1,50 +1,48 @@
1
- ._fdic_callout_1kihd_1 {
1
+ ._fdic_callout_1f6md_1 {
2
2
  background-color: #000;
3
3
  color: #fff;
4
4
  }
5
5
 
6
- ._inner_container_1kihd_6 {
6
+ ._inner_container_1f6md_6 {
7
7
  margin-left: auto;
8
8
  margin-right: auto;
9
9
  width: calc(100% - 90px);
10
10
  }
11
11
 
12
- ._fdic_callout_1kihd_1 svg {
13
- margin-right: 8px;
14
- }
15
-
16
- ._fdic_callout_1kihd_1 .flex {
12
+ ._fdic_callout_1f6md_1 .flex {
17
13
  min-height: 32px;
18
14
  }
19
15
 
20
- ._fdic_callout_1kihd_1 p {
21
- font-size: 12px;
22
- line-height: 1;
23
- font-style: italic;
16
+ ._fdic_callout_1f6md_1 img {
17
+ padding-block: 8px;
24
18
  }
25
19
 
26
20
  @media (max-width: 1280px) and (min-width: 1024px) {
27
- ._inner_container_1kihd_6 {
21
+ ._inner_container_1f6md_6 {
28
22
  width: calc(100% - 40px);
29
23
  }
30
24
  }
31
25
 
32
26
  @media (max-width: 769px) {
33
- ._inner_container_1kihd_6 {
27
+ ._inner_container_1f6md_6 {
34
28
  width: calc(100% - 60px);
35
29
  }
36
30
  }
37
31
 
38
32
  @media (max-width: 603px) {
39
- ._fdic_callout_1kihd_1 .flex {
40
- min-height: 24px;
33
+ ._fdic_callout_1f6md_1 .flex {
34
+ min-height: 28px;
41
35
  }
42
- ._fdic_callout_1kihd_1 p {
43
- font-size: 8px;
44
- line-height: 1.3;
36
+ }
37
+
38
+ @media (max-width: 470px) {
39
+ ._fdic_callout_1f6md_1 img {
40
+ padding-block: 5px;
45
41
  }
46
- ._fdic_callout_1kihd_1 svg {
47
- min-width: 32px;
48
- height: auto;
42
+ }
43
+
44
+ @media (max-width: 400px) {
45
+ ._inner_container_1f6md_6 {
46
+ width: calc(100% - 20px);
49
47
  }
50
48
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "0.0.133",
4
+ "version": "0.0.134",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",