@axos-web-dev/shared-components 0.0.155 → 0.0.157

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.
Files changed (196) hide show
  1. package/dist/ATMLocator/ATMLocator.js +35 -33
  2. package/dist/Accordion/Accordion.css.js +4 -4
  3. package/dist/Accordion/Accordion.js +3 -3
  4. package/dist/AlertBanner/AlertBanner.css.js +1 -1
  5. package/dist/AlertBanner/index.js +3 -3
  6. package/dist/Article/Article.css.js +4 -4
  7. package/dist/ArticlesSet/ArticlesSet.css.js +4 -4
  8. package/dist/AwardsBanner/AwardsBanner.css.js +1 -1
  9. package/dist/AwardsItem/AwardsItem.css.js +2 -2
  10. package/dist/Blockquote/Blockquote.module.js +3 -3
  11. package/dist/BulletItem/BulletItem.css.js +2 -2
  12. package/dist/BulletItem/BulletItem.js +3 -3
  13. package/dist/Button/Button.css.js +4 -4
  14. package/dist/Button/Button.js +36 -34
  15. package/dist/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js +3 -3
  16. package/dist/Calculators/ApyCalculator/ApyCalculator.css.js +3 -3
  17. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +4 -4
  18. package/dist/Calculators/AxosOneCalculator/index.js +3 -3
  19. package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js +4 -4
  20. package/dist/Calculators/BalanceAPYCalculator/index.js +3 -3
  21. package/dist/Calculators/Calculator.js +34 -32
  22. package/dist/Calculators/MarginTradingCalculator/MarginTradingCalculator.css.js +1 -1
  23. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +3 -3
  24. package/dist/Calculators/calculator.css.js +4 -4
  25. package/dist/CallToActionBar/CallToActionBar.css.js +3 -3
  26. package/dist/Carousel/Carousel.css.js +3 -3
  27. package/dist/Carousel/index.js +36 -34
  28. package/dist/Chevron/Chevron.css.js +4 -4
  29. package/dist/Chevron/index.js +36 -34
  30. package/dist/CollectInformationAlert/CollectInformationAlert.css.js +4 -4
  31. package/dist/CollectInformationAlert/index.js +3 -3
  32. package/dist/Comparison/Comparison.css.js +7 -7
  33. package/dist/Comparison/Comparison.js +35 -33
  34. package/dist/ContentBanner/ContentBanner.css.js +4 -4
  35. package/dist/DownloadTile/DownloadTile.css.js +3 -3
  36. package/dist/ExecutiveBio/ExecutiveBio.css.js +4 -4
  37. package/dist/FaqAccordion/FaqAccordion.css.js +4 -4
  38. package/dist/FaqAccordion/index.js +36 -34
  39. package/dist/FooterDisclosure/FooterDisclosure.css.js +1 -1
  40. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.css.js +2 -2
  41. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +35 -33
  42. package/dist/Forms/ApplicationStart.js +5 -5
  43. package/dist/Forms/ClearingForm.js +5 -5
  44. package/dist/Forms/CommercialDeposits.js +5 -5
  45. package/dist/Forms/CommercialLending.js +5 -5
  46. package/dist/Forms/ContactCompany.js +5 -5
  47. package/dist/Forms/ContactUs.js +5 -5
  48. package/dist/Forms/ContactUsAAS.js +4 -4
  49. package/dist/Forms/ContactUsBusiness.js +36 -34
  50. package/dist/Forms/ContactUsNMLSId.js +36 -34
  51. package/dist/Forms/CpraRequest.js +4 -4
  52. package/dist/Forms/DealerServices.js +5 -5
  53. package/dist/Forms/EmailOnly.js +37 -35
  54. package/dist/Forms/EmailUs.js +4 -4
  55. package/dist/Forms/FormEnums.d.ts +57 -13
  56. package/dist/Forms/FormEnums.js +81 -63
  57. package/dist/Forms/FormProps.d.ts +4 -1
  58. package/dist/Forms/Forms.css.js +7 -7
  59. package/dist/Forms/MortgageRate/MortgageRateForm.js +37 -35
  60. package/dist/Forms/MortgageRate/MortgageRateQuoteFilters.js +1 -1
  61. package/dist/Forms/MortgageRate/MortgageRateWatch.js +36 -34
  62. package/dist/Forms/{QuickPricer.d.ts → QuickPricer/QuickPricerForm.d.ts} +24 -12
  63. package/dist/Forms/{QuickPricer.js → QuickPricer/QuickPricerForm.js} +206 -234
  64. package/dist/Forms/QuickPricer/QuickPricerResults.css.d.ts +2 -0
  65. package/dist/Forms/QuickPricer/QuickPricerResults.css.js +7 -0
  66. package/dist/Forms/QuickPricer/UserInformation.css.d.ts +8 -0
  67. package/dist/Forms/QuickPricer/UserInformation.css.js +21 -0
  68. package/dist/Forms/QuickPricer/UserInformation.d.ts +10 -0
  69. package/dist/Forms/QuickPricer/UserInformation.js +59 -0
  70. package/dist/Forms/QuickPricer/index.d.ts +4 -0
  71. package/dist/Forms/QuickPricer/index.js +19 -0
  72. package/dist/Forms/ScheduleCall.js +5 -5
  73. package/dist/Forms/ScheduleCallPremier.js +5 -5
  74. package/dist/Forms/SuccesForm.js +35 -33
  75. package/dist/Forms/WcplSurvey.js +4 -4
  76. package/dist/Forms/index.d.ts +5 -6
  77. package/dist/Forms/index.js +23 -8
  78. package/dist/HeroBanner/HeroBanner.css.js +5 -5
  79. package/dist/HeroBanner/LargeBanner.css.js +4 -4
  80. package/dist/HeroBanner/SelectionBanner.css.js +4 -4
  81. package/dist/Hyperlink/Hyperlink.css.js +1 -1
  82. package/dist/Hyperlink/index.js +35 -33
  83. package/dist/IconBillboard/IconBillboard.css.js +4 -4
  84. package/dist/ImageBillboard/ImageBillboard.css.js +4 -4
  85. package/dist/ImageBillboard/ImageBillboard.js +3 -3
  86. package/dist/ImageBillboard/ImageBillboardSet.js +3 -3
  87. package/dist/ImageLink/ImageLink.css.js +1 -1
  88. package/dist/ImageLink/ImageLink.js +35 -33
  89. package/dist/ImageLink/ImageLinkSet.js +35 -33
  90. package/dist/ImageLink/index.js +34 -32
  91. package/dist/Input/Checkbox.css.js +1 -1
  92. package/dist/Input/CurrencyInput.js +1 -1
  93. package/dist/Input/DatePicker.css.d.ts +1 -0
  94. package/dist/Input/DatePicker.css.js +6 -0
  95. package/dist/Input/DatePicker2.d.ts +21 -0
  96. package/dist/Input/DatePicker2.js +103 -0
  97. package/dist/Input/DatePickerComponents/DatePicker.d.ts +11 -0
  98. package/dist/Input/DatePickerComponents/DatePicker.js +13 -0
  99. package/dist/Input/DatePickerComponents/InputDate.d.ts +15 -0
  100. package/dist/Input/DatePickerComponents/InputDate.js +66 -0
  101. package/dist/Input/DatePickerComponents/index.d.ts +2 -0
  102. package/dist/Input/DatePickerComponents/index.js +6 -0
  103. package/dist/Input/Datepicker.d.ts +3 -0
  104. package/dist/Input/Datepicker.js +47 -0
  105. package/dist/Input/Dropdown.css.js +2 -2
  106. package/dist/Input/Input.css.js +4 -4
  107. package/dist/Input/InputAmount.js +1 -1
  108. package/dist/Input/InputDate.css.d.ts +6 -0
  109. package/dist/Input/InputDate.css.js +15 -0
  110. package/dist/Input/InputDate.d.ts +3 -0
  111. package/dist/Input/InputDate.js +47 -0
  112. package/dist/Input/InputPhone.js +1 -1
  113. package/dist/Input/InputProps.d.ts +5 -0
  114. package/dist/Input/RadioButton.css.js +1 -1
  115. package/dist/Input/index.d.ts +1 -1
  116. package/dist/Input/index.js +1 -1
  117. package/dist/Inputs/Input.css.js +3 -3
  118. package/dist/Insight/Featured/CategorySelector.css.js +5 -5
  119. package/dist/Insight/Featured/CategorySelector.js +34 -32
  120. package/dist/Insight/Featured/Featured.css.js +2 -2
  121. package/dist/Insight/Featured/Featured.js +36 -34
  122. package/dist/Insight/Featured/Header.css.js +1 -1
  123. package/dist/Insight/Featured/Header.js +35 -33
  124. package/dist/Insight/Insight.css.js +2 -2
  125. package/dist/Interstitial/Interstitial-variants.css.js +4 -4
  126. package/dist/LandingPageHeader/LandingPageHeader.css.js +3 -3
  127. package/dist/LandingPageHeader/LandingPageHeader.js +3 -3
  128. package/dist/LoadingIndicator/LoadingIndicator.css.js +1 -1
  129. package/dist/Modal/Modal.css.js +3 -3
  130. package/dist/Modal/Modal.js +35 -33
  131. package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +3 -3
  132. package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.js +3 -3
  133. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.js +3 -3
  134. package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.js +3 -3
  135. package/dist/NavigationMenu/AxosBank/NavBar.css.js +3 -3
  136. package/dist/NavigationMenu/AxosBank/NavData.js +36 -34
  137. package/dist/NavigationMenu/AxosBank/SubNavBar.js +35 -33
  138. package/dist/NavigationMenu/AxosBank/SubNavbar.css.js +3 -3
  139. package/dist/NavigationMenu/AxosBank/index.js +34 -32
  140. package/dist/NavigationMenu/AxosClearing/NavBar.css.js +1 -1
  141. package/dist/PageNavItem/PageNavItem.css.js +4 -4
  142. package/dist/PageNavSet/PageNavigationSet.css.js +1 -1
  143. package/dist/SecondaryFooter/SecondaryFooter.css.js +3 -3
  144. package/dist/SetContainer/SetContainer.css.js +3 -3
  145. package/dist/SetContainer/SetContainer.js +36 -34
  146. package/dist/SocialMediaBar/SocialMediaBar.css.js +1 -1
  147. package/dist/StepItem/StepItem.css.js +3 -3
  148. package/dist/StepItemSet/StepItemSet.css.js +3 -3
  149. package/dist/Tab/Tab.css.js +3 -3
  150. package/dist/Table/Table.css.js +3 -3
  151. package/dist/Table/Table.d.ts +2 -1
  152. package/dist/Table/Table.interface.d.ts +1 -0
  153. package/dist/Table/Table.js +5 -3
  154. package/dist/TextBlock/TextBlock.css.js +3 -3
  155. package/dist/TopicalNavItem/TopicalNavItem.css.js +1 -1
  156. package/dist/TopicalNavSet/TopicalNavSet.css.js +1 -1
  157. package/dist/Typography/Typography.css.js +1 -1
  158. package/dist/VideoTile/VideoTile.css.js +4 -4
  159. package/dist/VideoTile/VideoTile.js +3 -3
  160. package/dist/VideoWrapper/VideoWrapper.css.js +1 -1
  161. package/dist/VideoWrapper/index.js +4 -4
  162. package/dist/assets/Blockquote/Blockquote.css.css +68 -68
  163. package/dist/assets/Forms/QuickPricer/QuickPricerResults.css +12 -0
  164. package/dist/assets/Forms/QuickPricer/UserInformation.css +78 -0
  165. package/dist/assets/Input/DatePicker.css +95 -0
  166. package/dist/assets/Input/InputDate.css +39 -0
  167. package/dist/assets/globals.css +3 -0
  168. package/dist/assets/node_modules/react-date-range/dist/styles.css.css +194 -0
  169. package/dist/assets/node_modules/react-date-range/dist/theme/default.css.css +385 -0
  170. package/dist/globals.css.js +2 -2
  171. package/dist/icons/ArrowIcon/ArrowIcon.css.js +3 -3
  172. package/dist/icons/CalendarIcon/CalendarIcon.d.ts +3 -0
  173. package/dist/icons/CalendarIcon/CalendarIcon.js +17 -0
  174. package/dist/icons/CalendarIcon/index.d.ts +1 -0
  175. package/dist/icons/CalendarIcon/index.js +4 -0
  176. package/dist/icons/CheckIcon/CheckIcon.css.js +3 -3
  177. package/dist/icons/DownloadIcon/DownloadIcon.css.js +3 -3
  178. package/dist/icons/FollowIcon/FollowIcon.css.js +3 -3
  179. package/dist/icons/Star/Star.css.js +1 -1
  180. package/dist/index.css.js +3 -3
  181. package/dist/main.js +24 -10
  182. package/dist/themes/axos.css.js +1 -1
  183. package/dist/themes/premier.css.js +2 -2
  184. package/dist/types/icon.d.ts +3 -0
  185. package/dist/types/icon.js +1 -0
  186. package/dist/types/popover.d.ts +8 -0
  187. package/dist/types/popover.js +1 -0
  188. package/dist/utils/constants/format.d.ts +1 -0
  189. package/dist/utils/constants/format.js +4 -0
  190. package/dist/utils/constants/popper.d.ts +6 -0
  191. package/dist/utils/constants/popper.js +10 -0
  192. package/dist/utils/hooks/usePopover.d.ts +25 -0
  193. package/dist/utils/hooks/usePopover.js +64 -0
  194. package/dist/utils/index.d.ts +1 -1
  195. package/dist/utils/index.js +1 -1
  196. package/package.json +131 -124
@@ -1,37 +1,37 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { zodResolver } from "@hookform/resolvers/zod";
4
- import { Button } from "../Button/Button.js";
5
- import "../Button/Button.css.js";
4
+ import { Button } from "../../Button/Button.js";
5
+ import "../../Button/Button.css.js";
6
6
  import { useState } from "react";
7
7
  import "react-use";
8
- import { Checkbox } from "../Input/Checkbox.js";
9
- import "../Input/CurrencyInput.js";
10
- import { Dropdown } from "../Input/Dropdown.js";
11
- import "../Input/Dropdown.css.js";
12
- import { Input } from "../Input/Input.js";
13
- import "../Input/Input.css.js";
14
- import "../Input/InputAmount.js";
15
- import { InputPhone } from "../Input/InputPhone.js";
16
- import "../Input/InputTextArea.js";
17
- import "../Input/DownPaymentInput.js";
18
- import "../icons/ArrowIcon/ArrowIcon.css.js";
19
- import SvgAxosX from "../icons/AxosX/index.js";
20
- import SvgComponent from "../icons/AxosX/Blue.js";
21
- import "../icons/CheckIcon/CheckIcon.css.js";
22
- /* empty css */
23
- /* empty css */
24
- /* empty css */
25
- /* empty css */
26
- import { associatedEmail } from "../utils/EverestValidity.js";
27
- import "../utils/allowedAxosDomains.js";
28
- import { getVariant } from "../utils/getVariant.js";
8
+ import { Checkbox } from "../../Input/Checkbox.js";
9
+ import { CurrencyInput } from "../../Input/CurrencyInput.js";
10
+ import "../../Input/DownPaymentInput.js";
11
+ import { Dropdown } from "../../Input/Dropdown.js";
12
+ import "../../Input/Dropdown.css.js";
13
+ import { Input } from "../../Input/Input.js";
14
+ import "../../Input/Input.css.js";
15
+ import "../../Input/InputAmount.js";
16
+ import { InputPhone } from "../../Input/InputPhone.js";
17
+ import "../../Input/InputTextArea.js";
18
+ import "../../icons/ArrowIcon/ArrowIcon.css.js";
19
+ import SvgAxosX from "../../icons/AxosX/index.js";
20
+ import SvgComponent from "../../icons/AxosX/Blue.js";
21
+ import "../../icons/CheckIcon/CheckIcon.css.js";
22
+ /* empty css */
23
+ /* empty css */
24
+ /* empty css */
25
+ /* empty css */
26
+ import "../../utils/allowedAxosDomains.js";
27
+ import { associatedEmail } from "../../utils/EverestValidity.js";
28
+ 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, BrokerConpensation } from "./FormEnums.js";
33
- import { formContainer, iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, one_row, section_title, checkbox_group, disclosureForm, actions } from "./Forms.css.js";
34
- import { SalesforceSchema } from "./SalesforceFieldsForm.js";
32
+ import { Purposes, RepresentativesFico, DocType, Citizenship, MortgageLates, HousingEventType, HousingEventHistory, BankruptcyType, BankruptcySeasoning, PropertyType, Occupancy, NumberOfUnits, PrepaymentPenalty, BrokerConpensation } from "../FormEnums.js";
33
+ import { formContainer, iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, one_row, section_title, checkbox_group, disclosureForm, actions } from "../Forms.css.js";
34
+ import { SalesforceSchema } from "../SalesforceFieldsForm.js";
35
35
  const QuickPricer = ({
36
36
  icon = false,
37
37
  children,
@@ -44,7 +44,10 @@ const QuickPricer = ({
44
44
  callToAction,
45
45
  id,
46
46
  description,
47
- validateEmail
47
+ validateEmail,
48
+ validateNMLS = async () => {
49
+ return false;
50
+ }
48
51
  }) => {
49
52
  const [refiCashOut, setRefiCashOut] = useState(false);
50
53
  const [DSCR_Ratio, setDSCR_Ratio] = useState(false);
@@ -53,17 +56,19 @@ const QuickPricer = ({
53
56
  const [numberOfUnits, setNumberOfUnits] = useState(false);
54
57
  const [prepaymentPenalty, setPrepaymentPenalty] = useState(false);
55
58
  const schema = z.object({
56
- Base_Loan_Amount__c: z.coerce.number({
59
+ Base_Loan_Amount__c: z.string({
57
60
  message: "Please provide a valid base loan amount"
58
- }).min(149999, {
59
- message: "Please enter a value greater than or equal to 149999"
61
+ }).transform((val) => {
62
+ const removeDashes = val.replace(/[$,]/gi, "");
63
+ return parseFloat(removeDashes);
60
64
  }),
61
- Appraised_Value__c: z.coerce.number({
65
+ Appraised_Value__c: z.string({
62
66
  message: "Please provide a valid property value"
63
- }).min(149999, {
64
- message: "Please enter a value greater than or equal to 149999"
67
+ }).transform((val) => {
68
+ const removeDashes = val.replace(/[$,]/gi, "");
69
+ return parseFloat(removeDashes);
65
70
  }),
66
- Loan_Purpose__c: z.string().min(1, { message: "Purpose is required" }).refine((val) => Purposes.includes(val), {
71
+ Loan_Purpose__c: z.string().min(1, { message: "Purpose is required" }).refine((val) => Purposes.map((item) => item.value).includes(val), {
67
72
  message: "Purpose is required"
68
73
  }),
69
74
  Cash_Out_Amount__c: z.coerce.number({
@@ -73,19 +78,22 @@ const QuickPricer = ({
73
78
  Self_Employed__c: z.coerce.boolean(),
74
79
  Pledged_Assets__c: z.coerce.boolean(),
75
80
  Cross_Collateralization__c: z.coerce.boolean(),
76
- Representative_FICO__c: z.string().min(1, { message: "Representative FICO is required" }).refine((val) => RepresentativesFico.includes(val), {
77
- message: "Representative FICO is required"
78
- }),
81
+ Representative_FICO__c: z.string().min(1, { message: "Representative FICO is required" }).refine(
82
+ (val) => RepresentativesFico.map((item) => item.value).includes(val),
83
+ {
84
+ message: "Representative FICO is required"
85
+ }
86
+ ),
79
87
  Months_Reserves__c: z.coerce.number({
80
88
  message: "Please provide a valid months of reserves"
81
89
  }).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), {
90
+ Underwriting_Document_Type__c: z.string().min(1, { message: "Underwriting / Doc Type is required" }).refine((val) => DocType.map((item) => item.value).includes(val), {
83
91
  message: "Underwriting / Doc Type is required"
84
92
  }),
85
93
  Debt_To_Income_Ratio__c: z.coerce.number({
86
94
  message: "DCSR Ratio should be between 0.00 and 10.00"
87
95
  }).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), {
96
+ Citizenship__c: z.string().min(1, { message: "Citizenship is required" }).refine((val) => Citizenship.map((item) => item.value).includes(val), {
89
97
  message: "Citizenship is required"
90
98
  }),
91
99
  Mortgage_Lates_12: z.string().min(1, { message: "Mortgage history is required" }).refine((val) => MortgageLates.includes(val), {
@@ -94,40 +102,64 @@ const QuickPricer = ({
94
102
  Mortgage_Lates_24: z.string().min(1, { message: "Mortgage history is required" }).refine((val) => MortgageLates.includes(val), {
95
103
  message: "Mortgage history is required"
96
104
  }),
97
- HousingEventType: z.string().min(1, { message: "Housing event type is required" }).refine((val) => HousingEventType.includes(val), {
98
- message: "Housing event type is required"
99
- }),
100
- housingEventSeasoning: z.string().min(1, { message: "Housing event history is required" }).refine((val) => HousingEventHistory.includes(val), {
101
- message: "Housing event history is required"
102
- }),
103
- BankruptcyType: z.string().min(1, { message: "Bankruptcy type is required" }).refine((val) => BankruptcyType.includes(val), {
104
- message: "Bankruptcy type is required"
105
- }),
106
- Number_of_Properties_Financed: z.coerce.number({ message: "Please provide a valid # of Properties" }).min(0, {
105
+ HousingEventType__c: z.string().min(1, { message: "Housing event type is required" }).refine(
106
+ (val) => HousingEventType.map((item) => item.value).includes(val),
107
+ {
108
+ message: "Housing event type is required"
109
+ }
110
+ ),
111
+ housingEventSeasoning__c: z.string().min(1, { message: "Housing event history is required" }).refine(
112
+ (val) => HousingEventHistory.map((item) => item.value).includes(val),
113
+ {
114
+ message: "Housing event history is required"
115
+ }
116
+ ),
117
+ bankruptcyType__c: z.string().min(1, { message: "Bankruptcy type is required" }).refine(
118
+ (val) => BankruptcyType.map((item) => item.value).includes(val),
119
+ {
120
+ message: "Bankruptcy type is required"
121
+ }
122
+ ),
123
+ Number_of_Properties_Financed__c: z.coerce.number({ message: "Please provide a valid # of Properties" }).min(0, {
107
124
  message: "Please provide a valid # of Properties"
108
125
  }),
109
- BankruptcySeasoning: z.string().min(1, { message: "Bankruptcy seasoning is required" }).refine((val) => BankruptcySeasoning.includes(val), {
110
- message: "Bankruptcy seasoning is required"
111
- }),
112
- zip: z.string().trim().max(20).min(1, { message: "Zip code is required." }),
113
- Property_Type__c: z.string().min(1, { message: "Property type is required" }).refine((val) => PropertyType.includes(val), {
126
+ bankruptcySeasoning__c: z.string().min(1, { message: "Bankruptcy seasoning is required" }).refine(
127
+ (val) => BankruptcySeasoning.map((item) => item.value).includes(val),
128
+ {
129
+ message: "Bankruptcy seasoning is required"
130
+ }
131
+ ),
132
+ Zip__c: z.string().trim().max(20).min(1, { message: "Zip code is required." }),
133
+ Property_Type__c: z.string().min(1, { message: "Property type is required" }).refine((val) => PropertyType.map((item) => item.value).includes(val), {
114
134
  message: "Property type is required"
115
135
  }),
116
- Occupance__c: z.string().min(1, { message: "Occupancy is required" }).refine((val) => Occupancy.includes(val), {
136
+ Occupance__c: z.string().min(1, { message: "Occupancy is required" }).refine((val) => Occupancy.map((item) => item.value).includes(val), {
117
137
  message: "Occupancy is required"
118
138
  }),
119
- Units__c: z.string().min(1, { message: "# of Units is required" }).refine((val) => NumberOfUnits.includes(val), {
120
- message: "# of Units is required"
121
- }),
122
- Prepayment_Penalty__c: z.string().min(1, { message: "Prepayment penalty is required" }).refine((val) => PrepaymentPenalty.includes(val), {
123
- message: "Prepayment penalty is required"
124
- }),
125
- broker_Compensation: z.string().min(1, { message: "Broker compensation is required" }).refine((val) => BrokerConpensation.includes(val), {
126
- message: "Broker compensation is required"
127
- }),
128
- NMLS_ID__c: z.string().min(6).max(7),
129
- email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
130
- phone: z.string().regex(/[\d-]{10}/).min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
139
+ Units__c: z.string().min(1, { message: "# of Units is required" }).refine(
140
+ (val) => NumberOfUnits.map((item) => item.value).includes(val),
141
+ {
142
+ message: "# of Units is required"
143
+ }
144
+ ),
145
+ Prepayment_Penalty__c: z.string().min(1, { message: "Prepayment penalty is required" }).refine(
146
+ (val) => PrepaymentPenalty.map((field) => field.value).includes(val),
147
+ {
148
+ message: "Prepayment penalty is required"
149
+ }
150
+ ),
151
+ Broker_Compensation__c: z.string().min(1, { message: "Broker compensation is required" }).refine(
152
+ (val) => BrokerConpensation.map((item) => item.value).includes(val),
153
+ {
154
+ message: "Broker compensation is required"
155
+ }
156
+ ),
157
+ NMLS__c: z.string().min(6, "Valid NMLS should have at least 6 characters").max(7, "Valid NMLS should have at most 7 characters").refine(async (val) => {
158
+ const res = await validateNMLS(val);
159
+ return res?.body?.data?.records?.length > 0;
160
+ }, "NMLS ID is not valid"),
161
+ Email_Address__c: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
162
+ Cell_Phone__c: z.string().regex(/[\d-]{10}/).min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
131
163
  const removeDashes = val.replace(/-/gi, "");
132
164
  if (removeDashes.length !== 10) {
133
165
  ctx.addIssue({
@@ -139,11 +171,25 @@ const QuickPricer = ({
139
171
  return removeDashes;
140
172
  })
141
173
  }).superRefine((values, ctx) => {
174
+ if (values.Base_Loan_Amount__c < 149999) {
175
+ ctx.addIssue({
176
+ code: z.ZodIssueCode.custom,
177
+ path: ["Base_Loan_Amount__c"],
178
+ message: "Please enter a value greater than or equal to 149999"
179
+ });
180
+ }
181
+ if (values.Appraised_Value__c < 149999) {
182
+ ctx.addIssue({
183
+ code: z.ZodIssueCode.custom,
184
+ path: ["Appraised_Value__c"],
185
+ message: "Please enter a value greater than or equal to 149999"
186
+ });
187
+ }
142
188
  if (values.Base_Loan_Amount__c > values.Appraised_Value__c) {
143
189
  ctx.addIssue({
144
190
  code: z.ZodIssueCode.custom,
145
191
  path: ["Base_Loan_Amount__c"],
146
- message: "Base loan amount should be lower than appraised value"
192
+ message: "Loan amount should be lower than appraised value"
147
193
  });
148
194
  }
149
195
  });
@@ -156,12 +202,12 @@ const QuickPricer = ({
156
202
  defaultValues: {
157
203
  Cash_Out_Amount__c: 0,
158
204
  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: ""
205
+ housingEventSeasoning__c: "NotApplicable",
206
+ bankruptcySeasoning__c: "NotApplicable",
207
+ Number_of_Properties_Financed__c: 0,
208
+ Units__c: "OneUnit",
209
+ Prepayment_Penalty__c: "None",
210
+ Months_Reserves__c: 0
165
211
  }
166
212
  });
167
213
  const {
@@ -199,7 +245,7 @@ const QuickPricer = ({
199
245
  /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
200
246
  /* @__PURE__ */ jsx("div", { className: clsx(one_row, section_title({ variant })), children: /* @__PURE__ */ jsx("h4", { className: "header_4", children: "Loan Details" }) }),
201
247
  /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
202
- Input,
248
+ CurrencyInput,
203
249
  {
204
250
  id: "Base_Loan_Amount__c",
205
251
  ...register("Base_Loan_Amount__c", {
@@ -212,12 +258,11 @@ const QuickPricer = ({
212
258
  required: true,
213
259
  error: !!errors.Base_Loan_Amount__c,
214
260
  helperText: errors.Base_Loan_Amount__c?.message,
215
- variant,
216
- type: "number"
261
+ variant
217
262
  }
218
263
  ) }),
219
264
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
220
- Input,
265
+ CurrencyInput,
221
266
  {
222
267
  id: "Appraised_Value__c",
223
268
  ...register("Appraised_Value__c", {
@@ -231,8 +276,7 @@ const QuickPricer = ({
231
276
  required: true,
232
277
  error: !!errors.Appraised_Value__c,
233
278
  helperText: errors.Appraised_Value__c?.message,
234
- variant,
235
- type: "number"
279
+ variant
236
280
  }
237
281
  ) }),
238
282
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
@@ -248,9 +292,9 @@ const QuickPricer = ({
248
292
  error: !!errors.Loan_Purpose__c,
249
293
  helperText: errors.Loan_Purpose__c?.message,
250
294
  variant,
251
- defaultValue: "Purpose Loan",
295
+ defaultValue: "",
252
296
  onChange: (event) => {
253
- if (event.target.value === "Refi Cashout") {
297
+ if (event.target.value === "RefiCashout") {
254
298
  setRefiCashOut(true);
255
299
  } else {
256
300
  setRefiCashOut(false);
@@ -258,10 +302,8 @@ const QuickPricer = ({
258
302
  }
259
303
  },
260
304
  children: [
261
- /* @__PURE__ */ jsx("option", { value: "Purpose Loan", disabled: true, children: "Select a Purpose Loan" }),
262
- /* @__PURE__ */ jsx("option", { value: "Purchase", children: "Purchase" }),
263
- /* @__PURE__ */ jsx("option", { value: "Refi Cashout", children: "Refi Cashout" }),
264
- /* @__PURE__ */ jsx("option", { value: "Refi Rate-Term/Limited C.O.", children: "Refi Rate-Term/Limited C.O." })
305
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select a Purpose Loan" }),
306
+ Purposes.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
265
307
  ]
266
308
  }
267
309
  ) }),
@@ -351,16 +393,7 @@ const QuickPricer = ({
351
393
  defaultValue: "default",
352
394
  children: [
353
395
  /* @__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" }),
357
- /* @__PURE__ */ jsx("option", { value: "739 - 720", children: "739 - 720" }),
358
- /* @__PURE__ */ jsx("option", { value: "719 - 700", children: "719 - 700" }),
359
- /* @__PURE__ */ jsx("option", { value: "699 - 680", children: "699 - 680" }),
360
- /* @__PURE__ */ jsx("option", { value: "679 - 660", children: "679 - 660" }),
361
- /* @__PURE__ */ jsx("option", { value: "659 - 640", children: "659 - 640" }),
362
- /* @__PURE__ */ jsx("option", { value: "639 - 620", children: "639 - 620" }),
363
- /* @__PURE__ */ jsx("option", { value: "Below 620", children: "Below 620" })
396
+ RepresentativesFico.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
364
397
  ]
365
398
  }
366
399
  ) }),
@@ -380,7 +413,7 @@ const QuickPricer = ({
380
413
  type: "number"
381
414
  }
382
415
  ) }),
383
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
416
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
384
417
  Dropdown,
385
418
  {
386
419
  id: "Underwriting_Document_Type__c",
@@ -393,29 +426,16 @@ const QuickPricer = ({
393
426
  error: !!errors.Underwriting_Document_Type__c,
394
427
  helperText: errors.Underwriting_Document_Type__c?.message,
395
428
  variant,
396
- defaultValue: "Full Doc",
429
+ defaultValue: "FullDoc",
397
430
  onChange: (event) => {
398
- if (event.target.value === "Investor - DSCR") {
431
+ if (event.target.value === "InvestorDscr") {
399
432
  setDSCR_Ratio(true);
400
433
  } else {
401
434
  setDSCR_Ratio(false);
402
435
  setValue("Debt_To_Income_Ratio__c", 0);
403
436
  }
404
437
  },
405
- children: [
406
- /* @__PURE__ */ jsx("option", { value: "Full Doc", children: "Full Doc" }),
407
- /* @__PURE__ */ jsx("option", { value: "Asset Depletion", children: "Asset Depletion" }),
408
- /* @__PURE__ */ jsx("option", { value: "Personal Bank Stmt: 12 Mos", children: "Personal Bank Stmt: 12 Mos" }),
409
- /* @__PURE__ */ jsx("option", { value: "Business Bank Stmt: 12 Mos", children: "Business Bank Stmt: 12 Mos" }),
410
- /* @__PURE__ */ jsx("option", { value: "Personal Bank Stmt: 24 Mos", children: "Personal Bank Stmt: 24 Mos" }),
411
- /* @__PURE__ */ jsx("option", { value: "Business Bank Stmt: 24 Mos", children: "Business Bank Stmt: 24 Mos" }),
412
- /* @__PURE__ */ jsx("option", { value: "Investor - DSCR", children: "Investor - DSCR" }),
413
- /* @__PURE__ */ jsx("option", { value: "Investor - DSCR No Ratio", children: "Investor - DSCR No Ratio" }),
414
- /* @__PURE__ */ jsx("option", { value: "Written VOE", children: "Written VOE" }),
415
- /* @__PURE__ */ jsx("option", { value: "2 Year Alt Doc", children: "2 Year Alt 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" })
418
- ]
438
+ children: DocType.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
419
439
  }
420
440
  ) }),
421
441
  DSCR_Ratio && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
@@ -434,7 +454,7 @@ const QuickPricer = ({
434
454
  type: "number"
435
455
  }
436
456
  ) }),
437
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
457
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
438
458
  Dropdown,
439
459
  {
440
460
  id: "Citizenship__c",
@@ -447,13 +467,8 @@ const QuickPricer = ({
447
467
  error: !!errors.Citizenship__c,
448
468
  helperText: errors.Citizenship__c?.message,
449
469
  variant,
450
- defaultValue: "U.S. Citizen",
451
- children: [
452
- /* @__PURE__ */ jsx("option", { value: "U.S. Citizen", children: "U.S. Citizen" }),
453
- /* @__PURE__ */ jsx("option", { value: "Perm. Resident Alien", children: "Perm. Resident Alien" }),
454
- /* @__PURE__ */ jsx("option", { value: "Non-Perm. Resident Alien", children: "Non-Perm. Resident Alien" }),
455
- /* @__PURE__ */ jsx("option", { value: "Foreign National", children: "Foreign National" })
456
- ]
470
+ defaultValue: "USCitizen",
471
+ children: Citizenship.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
457
472
  }
458
473
  ) }),
459
474
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
@@ -500,75 +515,60 @@ const QuickPricer = ({
500
515
  ]
501
516
  }
502
517
  ) }),
503
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
518
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
504
519
  Dropdown,
505
520
  {
506
- id: "HousingEventType",
507
- ...register("HousingEventType", {
521
+ id: "HousingEventType__c",
522
+ ...register("HousingEventType__c", {
508
523
  required: true
509
524
  }),
510
525
  label: "Housing Event Type",
511
526
  sizes: "medium",
512
527
  required: true,
513
- error: !!errors.HousingEventType,
514
- helperText: errors.HousingEventType?.message,
528
+ error: !!errors.HousingEventType__c,
529
+ helperText: errors.HousingEventType__c?.message,
515
530
  variant,
516
531
  onChange: (event) => {
517
532
  if (event.target.value !== "None") {
518
533
  setHouseEventHistory(true);
519
534
  } else {
520
535
  setHouseEventHistory(false);
521
- setValue("housingEventSeasoning", "Not Applicable");
536
+ setValue("housingEventSeasoning__c", "NotApplicable");
522
537
  }
523
538
  },
524
539
  defaultValue: "None",
525
- children: [
526
- /* @__PURE__ */ jsx("option", { value: "None", children: "None" }),
527
- /* @__PURE__ */ jsx("option", { value: "Deed-In-Lieu", children: "Deed-In-Lieu" }),
528
- /* @__PURE__ */ jsx("option", { value: "Short Sale", children: "Short Sale" }),
529
- /* @__PURE__ */ jsx("option", { value: "Forbearance", children: "Forbearance" }),
530
- /* @__PURE__ */ jsx("option", { value: "Foreclosure", children: "Foreclosure" }),
531
- /* @__PURE__ */ jsx("option", { value: "Modification", children: "Modification" })
532
- ]
540
+ children: HousingEventType.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
533
541
  }
534
542
  ) }),
535
- houseEventHistory && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
543
+ houseEventHistory && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
536
544
  Dropdown,
537
545
  {
538
- id: "housingEventSeasoning",
539
- ...register("housingEventSeasoning", {
546
+ id: "housingEventSeasoning__c",
547
+ ...register("housingEventSeasoning__c", {
540
548
  required: true
541
549
  }),
542
550
  label: "Housing Event History",
543
551
  sizes: "medium",
544
552
  required: true,
545
- error: !!errors.housingEventSeasoning,
546
- helperText: errors.housingEventSeasoning?.message,
553
+ error: !!errors.housingEventSeasoning__c,
554
+ helperText: errors.housingEventSeasoning__c?.message,
547
555
  variant,
548
- defaultValue: "Not Applicable",
549
- children: [
550
- /* @__PURE__ */ jsx("option", { value: "Not Applicable", children: "Not Applicable" }),
551
- /* @__PURE__ */ jsx("option", { value: "1-12 Months", children: "1-12 Months" }),
552
- /* @__PURE__ */ jsx("option", { value: "13-24 Months", children: "13-24 Months" }),
553
- /* @__PURE__ */ jsx("option", { value: "25-36 Months", children: "25-36 Months" }),
554
- /* @__PURE__ */ jsx("option", { value: "37-48 Months", children: "37-48 Months" }),
555
- /* @__PURE__ */ jsx("option", { value: "49-60 Months", children: "49-60 Months" }),
556
- /* @__PURE__ */ jsx("option", { value: "More than 5 Years Ago", children: "More than 5 Years Ago" })
557
- ]
556
+ defaultValue: "NotApplicable",
557
+ children: HousingEventHistory.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
558
558
  }
559
559
  ) }),
560
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
560
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
561
561
  Dropdown,
562
562
  {
563
- id: "BankruptcyType",
564
- ...register("BankruptcyType", {
563
+ id: "bankruptcyType__c",
564
+ ...register("bankruptcyType__c", {
565
565
  required: true
566
566
  }),
567
567
  label: "Bankruptcy Type",
568
568
  sizes: "medium",
569
569
  required: true,
570
- error: !!errors.BankruptcyType,
571
- helperText: errors.BankruptcyType?.message,
570
+ error: !!errors.bankruptcyType__c,
571
+ helperText: errors.bankruptcyType__c?.message,
572
572
  variant,
573
573
  defaultValue: "None",
574
574
  onChange: (event) => {
@@ -576,70 +576,57 @@ const QuickPricer = ({
576
576
  setBankruptcySeasoning(true);
577
577
  } else {
578
578
  setBankruptcySeasoning(false);
579
- setValue("BankruptcySeasoning", "Not Applicable");
579
+ setValue("bankruptcySeasoning__c", "NotApplicable");
580
580
  }
581
581
  },
582
- children: [
583
- /* @__PURE__ */ jsx("option", { value: "None", children: "None" }),
584
- /* @__PURE__ */ jsx("option", { value: "Chapter 7", children: "Chapter 7" }),
585
- /* @__PURE__ */ jsx("option", { value: "Chapter 11", children: "Chapter 11" }),
586
- /* @__PURE__ */ jsx("option", { value: "Chapter 13", children: "Chapter 13" })
587
- ]
582
+ children: BankruptcyType.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
588
583
  }
589
584
  ) }),
590
585
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
591
586
  Input,
592
587
  {
593
- id: "Number_of_Properties_Financed",
594
- ...register("Number_of_Properties_Financed", {
588
+ id: "Number_of_Properties_Financed__c",
589
+ ...register("Number_of_Properties_Financed__c", {
595
590
  required: true
596
591
  }),
597
592
  label: "# of Properties Financed",
598
593
  sizes: "medium",
599
594
  required: true,
600
- error: !!errors.Number_of_Properties_Financed,
601
- helperText: errors.Number_of_Properties_Financed?.message,
595
+ error: !!errors.Number_of_Properties_Financed__c,
596
+ helperText: errors.Number_of_Properties_Financed__c?.message,
602
597
  variant,
603
598
  type: "number"
604
599
  }
605
600
  ) }),
606
- bankruptcySeasoning && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
601
+ bankruptcySeasoning && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
607
602
  Dropdown,
608
603
  {
609
- id: "BankruptcySeasoning",
610
- ...register("BankruptcySeasoning", {
604
+ id: "bankruptcySeasoning__c",
605
+ ...register("bankruptcySeasoning__c", {
611
606
  required: true
612
607
  }),
613
608
  label: "Bankruptcy Seasoning",
614
609
  sizes: "medium",
615
610
  required: true,
616
- error: !!errors.BankruptcySeasoning,
617
- helperText: errors.BankruptcySeasoning?.message,
611
+ error: !!errors.bankruptcySeasoning__c,
612
+ helperText: errors.bankruptcySeasoning__c?.message,
618
613
  variant,
619
- defaultValue: "Not Applicable",
620
- children: [
621
- /* @__PURE__ */ jsx("option", { value: "Not Applicable", children: "Not Applicable" }),
622
- /* @__PURE__ */ jsx("option", { value: "1-12 Months", children: "1-12 Months" }),
623
- /* @__PURE__ */ jsx("option", { value: "13-24 Months", children: "13-24 Months" }),
624
- /* @__PURE__ */ jsx("option", { value: "25-36 Months", children: "25-36 Months" }),
625
- /* @__PURE__ */ jsx("option", { value: "37-48 Months", children: "37-48 Months" }),
626
- /* @__PURE__ */ jsx("option", { value: "49-60 Months", children: "49-60 Months" }),
627
- /* @__PURE__ */ jsx("option", { value: "More than 5 Years Ago", children: "More than 5 Years Ago" })
628
- ]
614
+ defaultValue: "NotApplicable",
615
+ children: BankruptcySeasoning.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
629
616
  }
630
617
  ) }),
631
618
  /* @__PURE__ */ jsx("div", { className: clsx(one_row, section_title({ variant })), children: /* @__PURE__ */ jsx("h4", { className: "header_4", children: "Property Information" }) }),
632
619
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
633
620
  Input,
634
621
  {
635
- id: "zip",
636
- ...register("zip", { required: true }),
622
+ id: "Zip__c",
623
+ ...register("Zip__c", { required: true }),
637
624
  label: "Zip Code",
638
625
  sizes: "medium",
639
626
  placeholder: "Zip Code",
640
627
  required: true,
641
- error: !!errors.zip,
642
- helperText: errors.zip?.message,
628
+ error: !!errors.Zip__c,
629
+ helperText: errors.Zip__c?.message,
643
630
  variant
644
631
  }
645
632
  ) }),
@@ -658,19 +645,16 @@ const QuickPricer = ({
658
645
  variant,
659
646
  defaultValue: "Default",
660
647
  onChange: (event) => {
661
- if (event.target.value === "Single Family Residence") {
648
+ if (event.target.value === "SingleFamily") {
662
649
  setNumberOfUnits(true);
663
650
  } else {
664
651
  setNumberOfUnits(false);
665
- setValue("Units__c", "1 Unit");
652
+ setValue("Units__c", "OneUnit");
666
653
  }
667
654
  },
668
655
  children: [
669
656
  /* @__PURE__ */ jsx("option", { value: "Default", disabled: true, children: "Select option" }),
670
- /* @__PURE__ */ jsx("option", { value: "Single Family Residence", children: "Single Family Residence" }),
671
- /* @__PURE__ */ jsx("option", { value: "Condo", children: "Condo" }),
672
- /* @__PURE__ */ jsx("option", { value: "Co-op", children: "Co-op" }),
673
- /* @__PURE__ */ jsx("option", { value: "Condotel", children: "Condotel" })
657
+ PropertyType.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
674
658
  ]
675
659
  }
676
660
  ) }),
@@ -693,40 +677,33 @@ const QuickPricer = ({
693
677
  setPrepaymentPenalty(true);
694
678
  } else {
695
679
  setPrepaymentPenalty(false);
696
- setValue("Prepayment_Penalty__c", "");
680
+ setValue("Prepayment_Penalty__c", "None");
697
681
  }
698
682
  },
699
683
  children: [
700
684
  /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select option" }),
701
- /* @__PURE__ */ jsx("option", { value: "Principal Residence", children: "Principal Residence" }),
702
- /* @__PURE__ */ jsx("option", { value: "Second Home", children: "Second Home" }),
703
- /* @__PURE__ */ jsx("option", { value: "Investment", children: "Investment" })
685
+ Occupancy.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
704
686
  ]
705
687
  }
706
688
  ) }),
707
- numberOfUnits && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
689
+ numberOfUnits && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
708
690
  Dropdown,
709
691
  {
710
- id: "Units",
692
+ id: "Units__c",
711
693
  ...register("Units__c", {
712
694
  required: true
713
695
  }),
714
- label: "# of Units__c",
696
+ label: "# of Units",
715
697
  sizes: "medium",
716
698
  required: true,
717
699
  error: !!errors.Units__c,
718
700
  helperText: errors.Units__c?.message,
719
701
  variant,
720
- defaultValue: "1 Unit",
721
- children: [
722
- /* @__PURE__ */ jsx("option", { value: "1 Unit", children: "1 Unit" }),
723
- /* @__PURE__ */ jsx("option", { value: "2 Unit", children: "2 Unit" }),
724
- /* @__PURE__ */ jsx("option", { value: "3 Unit", children: "3 Unit" }),
725
- /* @__PURE__ */ jsx("option", { value: "4 Unit", children: "4 Unit" })
726
- ]
702
+ defaultValue: "OneUnit",
703
+ children: NumberOfUnits.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
727
704
  }
728
705
  ) }),
729
- prepaymentPenalty && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
706
+ prepaymentPenalty && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
730
707
  Dropdown,
731
708
  {
732
709
  id: "Prepayment_Penalty__c",
@@ -739,44 +716,36 @@ const QuickPricer = ({
739
716
  error: !!errors.Prepayment_Penalty__c,
740
717
  helperText: errors.Prepayment_Penalty__c?.message,
741
718
  variant,
742
- defaultValue: "",
743
- children: [
744
- /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select option" }),
745
- /* @__PURE__ */ jsx("option", { value: "1 Year", children: "1 Year" }),
746
- /* @__PURE__ */ jsx("option", { value: "2 Year", children: "2 Year" }),
747
- /* @__PURE__ */ jsx("option", { value: "3 Year", children: "3 Year" }),
748
- /* @__PURE__ */ jsx("option", { value: "4 Year", children: "4 Year" }),
749
- /* @__PURE__ */ jsx("option", { value: "5 Year", children: "5 Year" })
750
- ]
719
+ defaultValue: "None",
720
+ children: PrepaymentPenalty.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
751
721
  }
752
722
  ) }),
753
723
  /* @__PURE__ */ jsx("div", { className: clsx(one_row, section_title({ variant })), children: /* @__PURE__ */ jsx("h4", { className: "header_4", children: "Broker Information" }) }),
754
724
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
755
725
  Dropdown,
756
726
  {
757
- id: "broker_Compensation",
758
- ...register("broker_Compensation", {
727
+ id: "Broker_Compensation__c",
728
+ ...register("Broker_Compensation__c", {
759
729
  required: true
760
730
  }),
761
731
  label: "Broker Compensation",
762
732
  sizes: "medium",
763
733
  required: true,
764
- error: !!errors.broker_Compensation,
765
- helperText: errors.broker_Compensation?.message,
734
+ error: !!errors.Broker_Compensation__c,
735
+ helperText: errors.Broker_Compensation__c?.message,
766
736
  variant,
767
737
  defaultValue: "Default",
768
738
  children: [
769
739
  /* @__PURE__ */ jsx("option", { value: "Default", disabled: true, children: "Select option" }),
770
- /* @__PURE__ */ jsx("option", { value: "Borrower Paid", children: "Borrower Paid" }),
771
- /* @__PURE__ */ jsx("option", { value: "Lender Paid", children: "Lender Paid" })
740
+ BrokerConpensation.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }))
772
741
  ]
773
742
  }
774
743
  ) }),
775
744
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
776
745
  Input,
777
746
  {
778
- id: "NMLS_ID__c",
779
- ...register("NMLS_ID__c", {
747
+ id: "NMLS__c",
748
+ ...register("NMLS__c", {
780
749
  required: true,
781
750
  min: 6,
782
751
  max: 7
@@ -785,27 +754,27 @@ const QuickPricer = ({
785
754
  placeholder: "Company NMLS ID",
786
755
  sizes: "medium",
787
756
  required: true,
788
- error: !!errors.NMLS_ID__c,
789
- helperText: errors.NMLS_ID__c?.message,
757
+ error: !!errors.NMLS__c,
758
+ helperText: errors.NMLS__c?.message,
790
759
  variant
791
760
  }
792
761
  ) }),
793
762
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
794
763
  Input,
795
764
  {
796
- id: "email",
797
- ...register("email", {
765
+ id: "Email_Address__c",
766
+ ...register("Email_Address__c", {
798
767
  required: true,
799
768
  validate: {
800
769
  isValid: associatedEmail
801
770
  }
802
771
  }),
803
- label: "Email",
772
+ label: "Email Address",
804
773
  sizes: "medium",
805
774
  placeholder: "Email",
806
775
  required: true,
807
- error: !!errors.email,
808
- helperText: errors.email?.message,
776
+ error: !!errors.Email_Address__c,
777
+ helperText: errors.Email_Address__c?.message,
809
778
  variant,
810
779
  type: "email"
811
780
  }
@@ -813,14 +782,17 @@ const QuickPricer = ({
813
782
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
814
783
  InputPhone,
815
784
  {
816
- id: "phone",
817
- ...register("phone", { required: true, maxLength: 12 }),
785
+ id: "Cell_Phone__c",
786
+ ...register("Cell_Phone__c", {
787
+ required: true,
788
+ maxLength: 12
789
+ }),
818
790
  label: "Phone",
819
791
  sizes: "medium",
820
792
  placeholder: "Phone",
821
793
  required: true,
822
- error: !!errors.phone,
823
- helperText: errors.phone?.message,
794
+ error: !!errors.Cell_Phone__c,
795
+ helperText: errors.Cell_Phone__c?.message,
824
796
  variant
825
797
  }
826
798
  ) })