@axos-web-dev/shared-components 1.0.99 → 1.0.100-dev.2

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 (160) hide show
  1. package/dist/ATMLocator/ATMLocator.js +8 -1
  2. package/dist/ArticlesSet/ArticlesSet.js +2 -2
  3. package/dist/Auth/ErrorAlert.js +10 -3
  4. package/dist/Blockquote/Blockquote.module.js +3 -3
  5. package/dist/Button/Button.js +10 -3
  6. package/dist/Calculators/Calculator.js +22 -3
  7. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.d.ts +9 -0
  8. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +219 -0
  9. package/dist/Calculators/MaxLoanCalculator/index.js +22 -5
  10. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.d.ts +1 -0
  11. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +2 -0
  12. package/dist/Calculators/MonthlyPaymentCalculator/index.js +15 -5
  13. package/dist/Calculators/index.d.ts +2 -1
  14. package/dist/Calculators/index.js +3 -1
  15. package/dist/Carousel/index.js +10 -3
  16. package/dist/Chatbot/Bubble.css.d.ts +1 -0
  17. package/dist/Chatbot/Bubble.css.js +5 -0
  18. package/dist/Chatbot/Bubble.d.ts +3 -0
  19. package/dist/Chatbot/Bubble.js +48 -0
  20. package/dist/Chatbot/Chat.d.ts +1 -0
  21. package/dist/Chatbot/Chat.js +165 -0
  22. package/dist/Chatbot/ChatWindow.css.d.ts +11 -0
  23. package/dist/Chatbot/ChatWindow.css.js +25 -0
  24. package/dist/Chatbot/ChatWindow.d.ts +23 -0
  25. package/dist/Chatbot/ChatWindow.js +202 -0
  26. package/dist/Chatbot/Chatbot.css.d.ts +1 -0
  27. package/dist/Chatbot/Chatbot.css.js +5 -0
  28. package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
  29. package/dist/Chatbot/Chatbot.d.ts +1 -0
  30. package/dist/Chatbot/Chatbot.js +39 -0
  31. package/dist/Chatbot/authenticate.d.ts +3 -0
  32. package/dist/Chatbot/authenticate.js +16 -0
  33. package/dist/Chatbot/index.d.ts +9 -0
  34. package/dist/Chatbot/index.js +31 -0
  35. package/dist/Chatbot/store/chat.d.ts +9 -0
  36. package/dist/Chatbot/store/chat.js +11 -0
  37. package/dist/Chatbot/store/messages.d.ts +14 -0
  38. package/dist/Chatbot/store/messages.js +12 -0
  39. package/dist/Chatbot/useHeadlessChat.d.ts +22 -0
  40. package/dist/Chatbot/useHeadlessChat.js +157 -0
  41. package/dist/Chevron/index.js +10 -3
  42. package/dist/Comparison/Comparison.js +10 -3
  43. package/dist/ExecutiveBio/ExecutiveBio.js +10 -3
  44. package/dist/FaqAccordion/index.js +10 -3
  45. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +10 -3
  46. package/dist/Forms/ApplicationStart.d.ts +1 -1
  47. package/dist/Forms/ApplicationStart.js +111 -89
  48. package/dist/Forms/ApplyNow.d.ts +2 -2
  49. package/dist/Forms/ApplyNow.js +178 -146
  50. package/dist/Forms/ClearingForm.d.ts +1 -1
  51. package/dist/Forms/ClearingForm.js +184 -162
  52. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  53. package/dist/Forms/CommercialDeposits.js +201 -179
  54. package/dist/Forms/CommercialLending.d.ts +1 -1
  55. package/dist/Forms/CommercialLending.js +278 -256
  56. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  57. package/dist/Forms/CommercialPremiumFinance.js +128 -106
  58. package/dist/Forms/ContactCompany.d.ts +1 -1
  59. package/dist/Forms/ContactCompany.js +113 -91
  60. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  61. package/dist/Forms/ContactCompanyTitle.js +127 -105
  62. package/dist/Forms/ContactUs.d.ts +1 -1
  63. package/dist/Forms/ContactUs.js +99 -77
  64. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  65. package/dist/Forms/ContactUsAAS.js +180 -158
  66. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  67. package/dist/Forms/ContactUsBusiness.js +143 -115
  68. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  69. package/dist/Forms/ContactUsBusinessNameEmail.js +112 -84
  70. package/dist/Forms/ContactUsLVF.d.ts +3 -1
  71. package/dist/Forms/ContactUsLVF.js +127 -101
  72. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  73. package/dist/Forms/ContactUsNMLSId.js +126 -98
  74. package/dist/Forms/CpraRequest.d.ts +1 -1
  75. package/dist/Forms/CpraRequest.js +641 -619
  76. package/dist/Forms/CraPublicFile.d.ts +1 -1
  77. package/dist/Forms/CraPublicFile.js +118 -90
  78. package/dist/Forms/DealerServices.d.ts +1 -1
  79. package/dist/Forms/DealerServices.js +225 -204
  80. package/dist/Forms/EmailOnly.d.ts +1 -1
  81. package/dist/Forms/EmailOnly.js +65 -39
  82. package/dist/Forms/EmailUs.d.ts +1 -1
  83. package/dist/Forms/EmailUs.js +75 -53
  84. package/dist/Forms/FormProps.d.ts +3 -0
  85. package/dist/Forms/Forms.css.d.ts +18 -0
  86. package/dist/Forms/Forms.css.js +44 -38
  87. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
  88. package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
  89. package/dist/Forms/HoneyPot/index.d.ts +23 -0
  90. package/dist/Forms/HoneyPot/index.js +69 -0
  91. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  92. package/dist/Forms/MortgageRate/MortgageRateForm.js +376 -348
  93. package/dist/Forms/MortgageRate/MortgageRateWatch.js +10 -3
  94. package/dist/Forms/MortgageWarehouseLending.d.ts +11 -0
  95. package/dist/Forms/MortgageWarehouseLending.js +343 -0
  96. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  97. package/dist/Forms/QuickPricer/QuickPricerForm.js +624 -609
  98. package/dist/Forms/ScheduleCall.d.ts +1 -1
  99. package/dist/Forms/ScheduleCall.js +156 -134
  100. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  101. package/dist/Forms/ScheduleCallPremier.js +178 -156
  102. package/dist/Forms/SuccesForm.js +13 -6
  103. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  104. package/dist/Forms/VendorQuestionnaire.js +817 -795
  105. package/dist/Forms/WcplSurvey.d.ts +1 -1
  106. package/dist/Forms/WcplSurvey.js +112 -90
  107. package/dist/Forms/applynow-utils.d.ts +1 -0
  108. package/dist/Forms/applynow-utils.js +48 -0
  109. package/dist/Forms/index.d.ts +3 -0
  110. package/dist/Forms/index.js +12 -2
  111. package/dist/HeroBanner/HeroBanner.js +42 -1
  112. package/dist/Hyperlink/index.js +10 -3
  113. package/dist/IconBillboard/sections/CallToActionSection.js +2 -1
  114. package/dist/ImageBillboard/ExitIntentModal/useExitIntentModal.js +6 -1
  115. package/dist/ImageLink/ImageLink.js +10 -3
  116. package/dist/ImageLink/ImageLinkSet.js +10 -3
  117. package/dist/ImageLink/index.js +10 -3
  118. package/dist/Input/Input.js +3 -1
  119. package/dist/Insight/Featured/CategorySelector.js +10 -3
  120. package/dist/Insight/Featured/Featured.js +10 -3
  121. package/dist/Insight/Featured/Header.js +10 -3
  122. package/dist/Modal/Modal.js +10 -3
  123. package/dist/NavigationMenu/AxosALTS/NavData.js +10 -3
  124. package/dist/NavigationMenu/AxosALTS/index.js +10 -3
  125. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +16 -16
  126. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +1 -0
  127. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +25 -7
  128. package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
  129. package/dist/NavigationMenu/AxosBank/NavData.js +10 -3
  130. package/dist/NavigationMenu/AxosBank/SubNavBar.js +32 -8
  131. package/dist/NavigationMenu/AxosBank/index.js +10 -3
  132. package/dist/NavigationMenu/LaVictoire/NavData.js +10 -3
  133. package/dist/NavigationMenu/LaVictoire/index.js +10 -3
  134. package/dist/NavigationMenu/NavDataJson.d.ts +2 -0
  135. package/dist/NavigationMenu/NavDataJson.js +315 -0
  136. package/dist/NavigationMenu/Navbar.d.ts +5 -0
  137. package/dist/NavigationMenu/Navbar.js +201 -0
  138. package/dist/NavigationMenu/SignInNavButton.d.ts +1 -0
  139. package/dist/NavigationMenu/SignInNavButton.js +369 -0
  140. package/dist/SetContainer/SetContainer.js +10 -3
  141. package/dist/SocialMediaBar/iconsRepository.js +10 -3
  142. package/dist/Table/Table.d.ts +1 -1
  143. package/dist/VideoTile/VideoTile.js +10 -3
  144. package/dist/VideoWrapper/index.js +10 -3
  145. package/dist/assets/Blockquote/Blockquote.css.css +68 -68
  146. package/dist/assets/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css +3 -0
  147. package/dist/assets/Chatbot/Bubble.css +40 -0
  148. package/dist/assets/Chatbot/ChatWindow.css +107 -0
  149. package/dist/assets/Forms/Forms.css +135 -105
  150. package/dist/assets/Forms/HoneyPot/HoneyPot.css +8 -0
  151. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +191 -191
  152. package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +473 -473
  153. package/dist/assets/utils/optimizeImage/optimizeImage.css.css +47 -47
  154. package/dist/icons/Logos/AXB.d.ts +8 -0
  155. package/dist/icons/Logos/AXB.js +74 -0
  156. package/dist/main.d.ts +1 -0
  157. package/dist/main.js +43 -3
  158. package/dist/utils/allowedAxosDomains.js +2 -1
  159. package/dist/utils/optimizeImage/optimizeImage.module.js +3 -3
  160. package/package.json +136 -133
@@ -32,6 +32,7 @@ import clsx from "clsx";
32
32
  import { useForm, FormProvider } from "react-hook-form";
33
33
  import * as z from "zod";
34
34
  import { iconForm, headerContainer, headerForm, form, descriptionField, fullRowForm, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
35
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
35
36
  const ContactUsLVF = ({
36
37
  icon = false,
37
38
  children,
@@ -44,7 +45,9 @@ const ContactUsLVF = ({
44
45
  description,
45
46
  callToAction,
46
47
  validateEmail,
47
- id
48
+ onValidate,
49
+ id,
50
+ dealerCheckbox = true
48
51
  }) => {
49
52
  const schema = z.object({
50
53
  firstname: z.string().regex(/^[a-zA-Z]*(?:[a-zA-Z][a-zA-Z'-]*\s{0,1}){2,}$/g, {
@@ -75,11 +78,22 @@ const ContactUsLVF = ({
75
78
  message: z.string().min(1, { message: "Please complete this required field." }),
76
79
  checkbox: z.boolean()
77
80
  });
81
+ const gen_schema = schema.merge(honeyPotSchema).superRefine((data, ctx) => {
82
+ if (!isValidHoneyPot(data)) {
83
+ ctx.addIssue({
84
+ code: z.ZodIssueCode.custom,
85
+ message: "fields are not valid."
86
+ });
87
+ }
88
+ });
78
89
  const methods = useForm({
79
- resolver: zodResolver(schema, {
90
+ resolver: zodResolver(gen_schema, {
80
91
  async: true
81
92
  }),
82
- mode: "all"
93
+ mode: "all",
94
+ defaultValues: {
95
+ checkbox: false
96
+ }
83
97
  });
84
98
  const {
85
99
  handleSubmit,
@@ -112,7 +126,8 @@ const ContactUsLVF = ({
112
126
  await onSubmit({
113
127
  fields: formattedFieldsData,
114
128
  context: contextData,
115
- legalConsentOptions: legalConsentData
129
+ legalConsentOptions: legalConsentData,
130
+ form: "contactUSLVF"
116
131
  });
117
132
  };
118
133
  const variant = getVariant(fullVariant);
@@ -128,104 +143,115 @@ const ContactUsLVF = ({
128
143
  }
129
144
  )
130
145
  ] }),
131
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
132
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
133
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
134
- Input,
135
- {
136
- id: "firstname",
137
- ...register("firstname", { required: true }),
138
- sizes: "medium",
139
- placeholder: "First Name",
140
- required: true,
141
- error: !!errors.firstname,
142
- helperText: errors.firstname?.message,
143
- variant
144
- }
145
- ) }),
146
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
147
- Input,
148
- {
149
- id: "lastname",
150
- ...register("lastname", { required: true }),
151
- sizes: "medium",
152
- placeholder: "Last Name",
153
- required: true,
154
- error: !!errors.lastname,
155
- helperText: errors.lastname?.message,
156
- variant
157
- }
158
- ) }),
159
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
160
- Input,
161
- {
162
- id: "email",
163
- ...register("email", {
164
- required: true,
165
- validate: {
166
- isValid: associatedEmail
146
+ /* @__PURE__ */ jsxs(
147
+ "form",
148
+ {
149
+ className: form,
150
+ onSubmit: async (e) => {
151
+ onValidate && onValidate(e);
152
+ await handleSubmit(submitForm)(e);
153
+ e.preventDefault();
154
+ },
155
+ children: [
156
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
157
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
158
+ Input,
159
+ {
160
+ id: "firstname",
161
+ ...register("firstname", { required: true }),
162
+ sizes: "medium",
163
+ placeholder: "First Name",
164
+ required: true,
165
+ error: !!errors.firstname,
166
+ helperText: errors.firstname?.message,
167
+ variant
167
168
  }
168
- }),
169
- sizes: "medium",
170
- placeholder: "Email",
171
- required: true,
172
- error: !!errors.email,
173
- helperText: errors.email?.message,
174
- variant
175
- }
176
- ) }),
177
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
178
- InputPhone,
179
- {
180
- id: "phone",
181
- ...register("phone", { required: true, maxLength: 12 }),
182
- sizes: "medium",
183
- placeholder: "Phone Number",
184
- required: true,
185
- error: !!errors.phone,
186
- helperText: errors.phone?.message,
187
- variant
188
- }
189
- ) }),
190
- /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm), children: /* @__PURE__ */ jsx(
191
- InputTextArea,
192
- {
193
- id: "message",
194
- ...register("message"),
195
- sizes: "medium",
196
- placeholder: "Message",
197
- error: !!errors.message,
198
- helperText: errors.message?.message,
199
- variant
200
- }
201
- ) }),
202
- " ",
203
- /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
204
- Checkbox,
205
- {
206
- id: "checkbox",
207
- ...register("checkbox"),
208
- sizes: "medium",
209
- error: !!errors.checkbox,
210
- helperText: errors.checkbox?.message,
211
- variant,
212
- children: "I'm a Dealer interested in Inventory Financing."
213
- }
214
- ) })
215
- ] }),
216
- children,
217
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
218
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
219
- Button,
220
- {
221
- color: getVariant(callToAction?.variant),
222
- as: "button",
223
- type: "submit",
224
- disabled: !isValid || isSubmitting,
225
- children: callToAction?.displayText
226
- }
227
- ) })
228
- ] })
169
+ ) }),
170
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
171
+ Input,
172
+ {
173
+ id: "lastname",
174
+ ...register("lastname", { required: true }),
175
+ sizes: "medium",
176
+ placeholder: "Last Name",
177
+ required: true,
178
+ error: !!errors.lastname,
179
+ helperText: errors.lastname?.message,
180
+ variant
181
+ }
182
+ ) }),
183
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
184
+ Input,
185
+ {
186
+ id: "email",
187
+ ...register("email", {
188
+ required: true,
189
+ validate: {
190
+ isValid: associatedEmail
191
+ }
192
+ }),
193
+ sizes: "medium",
194
+ placeholder: "Email",
195
+ required: true,
196
+ error: !!errors.email,
197
+ helperText: errors.email?.message,
198
+ variant
199
+ }
200
+ ) }),
201
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
202
+ InputPhone,
203
+ {
204
+ id: "phone",
205
+ ...register("phone", { required: true, maxLength: 12 }),
206
+ sizes: "medium",
207
+ placeholder: "Phone Number",
208
+ required: true,
209
+ error: !!errors.phone,
210
+ helperText: errors.phone?.message,
211
+ variant
212
+ }
213
+ ) }),
214
+ /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm), children: /* @__PURE__ */ jsx(
215
+ InputTextArea,
216
+ {
217
+ id: "message",
218
+ ...register("message"),
219
+ sizes: "medium",
220
+ placeholder: "Message",
221
+ error: !!errors.message,
222
+ helperText: errors.message?.message,
223
+ variant
224
+ }
225
+ ) }),
226
+ dealerCheckbox && /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm), children: /* @__PURE__ */ jsx(
227
+ Checkbox,
228
+ {
229
+ id: "checkbox",
230
+ ...register("checkbox"),
231
+ sizes: "medium",
232
+ error: !!errors.checkbox,
233
+ helperText: errors.checkbox?.message,
234
+ variant,
235
+ children: "I'm a Dealer interested in Inventory Financing."
236
+ }
237
+ ) }),
238
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
239
+ ] }),
240
+ children,
241
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
242
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
243
+ Button,
244
+ {
245
+ color: getVariant(callToAction?.variant),
246
+ as: "button",
247
+ type: "submit",
248
+ disabled: !isValid || isSubmitting,
249
+ children: callToAction?.displayText
250
+ }
251
+ ) })
252
+ ]
253
+ }
254
+ )
229
255
  ] }) }) }, id);
230
256
  };
231
257
  export {
@@ -7,4 +7,4 @@ export type ContactUsNmlsIdInputs = {
7
7
  phone: string;
8
8
  NMLS_ID__c: string;
9
9
  };
10
- export declare const ContactUsNMLSId: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ContactUsNMLSId: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -16,7 +16,7 @@ import "../icons/ArrowIcon/ArrowIcon.css.js";
16
16
  import SvgAxosX from "../icons/AxosX/index.js";
17
17
  import SvgComponent from "../icons/AxosX/Blue.js";
18
18
  import "../icons/CheckIcon/CheckIcon.css.js";
19
- import '../assets/VideoWrapper/VideoWrapper.css';import '../assets/TopicalNavSet/TopicalNavSet.css';import '../assets/TopicalNavItem/TopicalNavItem.css';import '../assets/Topic/Topic.css';import '../assets/TextBlock/TextBlock.css';import '../assets/SocialMediaBar/SocialMediaBar.css';import '../assets/SecondaryFooter/SecondaryFooter.css';import '../assets/Pagination/Pagination.css';import '../assets/PageNavSet/PageNavigationSet.css';import '../assets/NavigationMenu/LaVictoire/NavBar.css';import '../assets/NavigationMenu/AxosALTS/NavBar.css';import '../assets/NavigationMenu/AxosClearing/NavBar.css';import '../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../assets/NavigationMenu/AxosBank/NavBar.css';import '../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisorServices/NavBar.css';import '../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisor/NavBar.css';import '../assets/Insight/Insight.css';import '../assets/Insight/Featured/Header.css';import '../assets/Insight/Featured/CategorySelector.css';import '../assets/Insight/Featured/Featured.css';import '../assets/ImageLink/ImageLink.css';import '../assets/VideoTile/VideoTile.css';import '../assets/HelpArticle/HelpArticle.css';import '../assets/FooterSiteMap/AxosBank/FooterSiteMap.css';import '../assets/FooterDisclosure/LVF/LaVictorieFooter.css';import '../assets/DownloadTile/DownloadTile.css';import '../assets/CollectInformationAlert/CollectInformationAlert.css';import '../assets/CallToActionBar/CallToActionBar.css';import '../assets/AwardsItem/AwardsItem.css';import '../assets/AwardsBanner/AwardsBanner.css';import '../assets/Auth/SignIn.css';import '../assets/Auth/ErrorAlert.css';import '../assets/Calculators/MarginTradingCalculator/MarginTradingCalculator.css';import '../assets/Forms/QuickPricer/UserInformation.css';import '../assets/Modal/Modal.css';import '../assets/Forms/QuickPricer/QuickPricerResults.css';import '../assets/BulletItem/BulletItem.css';import '../assets/Typography/Typography.css';import '../assets/icons/FollowIcon/FollowIcon.css';import '../assets/icons/DownloadIcon/DownloadIcon.css';import '../assets/themes/victorie.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
19
+ import '../assets/VideoWrapper/VideoWrapper.css';import '../assets/TopicalNavSet/TopicalNavSet.css';import '../assets/TopicalNavItem/TopicalNavItem.css';import '../assets/Topic/Topic.css';import '../assets/TextBlock/TextBlock.css';import '../assets/SocialMediaBar/SocialMediaBar.css';import '../assets/SecondaryFooter/SecondaryFooter.css';import '../assets/Pagination/Pagination.css';import '../assets/PageNavSet/PageNavigationSet.css';import '../assets/NavigationMenu/LaVictoire/NavBar.css';import '../assets/NavigationMenu/AxosALTS/NavBar.css';import '../assets/NavigationMenu/AxosClearing/NavBar.css';import '../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../assets/NavigationMenu/AxosBank/NavBar.css';import '../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisorServices/NavBar.css';import '../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisor/NavBar.css';import '../assets/Insight/Insight.css';import '../assets/Insight/Featured/Header.css';import '../assets/Insight/Featured/CategorySelector.css';import '../assets/Insight/Featured/Featured.css';import '../assets/ImageLink/ImageLink.css';import '../assets/VideoTile/VideoTile.css';import '../assets/HelpArticle/HelpArticle.css';import '../assets/FooterSiteMap/AxosBank/FooterSiteMap.css';import '../assets/FooterDisclosure/LVF/LaVictorieFooter.css';import '../assets/DownloadTile/DownloadTile.css';import '../assets/CollectInformationAlert/CollectInformationAlert.css';import '../assets/Chatbot/ChatWindow.css';import '../assets/Chatbot/Bubble.css';import '../assets/CallToActionBar/CallToActionBar.css';import '../assets/AwardsItem/AwardsItem.css';import '../assets/AwardsBanner/AwardsBanner.css';import '../assets/Auth/SignIn.css';import '../assets/Auth/ErrorAlert.css';import '../assets/Calculators/MarginTradingCalculator/MarginTradingCalculator.css';import '../assets/Forms/QuickPricer/UserInformation.css';import '../assets/Modal/Modal.css';import '../assets/Forms/QuickPricer/QuickPricerResults.css';import '../assets/BulletItem/BulletItem.css';import '../assets/Typography/Typography.css';import '../assets/icons/FollowIcon/FollowIcon.css';import '../assets/icons/DownloadIcon/DownloadIcon.css';import '../assets/themes/victorie.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
20
20
  /* empty css */
21
21
  /* empty css */
22
22
  /* empty css */
@@ -41,9 +41,12 @@ import "../Calculators/ApyCalculator/ApyCalculator.css.js";
41
41
  import "../Table/Table.css.js";
42
42
  import "../Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js";
43
43
  import "../Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js";
44
+ import "../Input/PercentageInput.js";
44
45
  import { useForm, FormProvider } from "react-hook-form";
45
46
  import { z } from "zod";
47
+ import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
46
48
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
49
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
47
50
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
48
51
  /* empty css */
49
52
  /* empty css */
@@ -62,8 +65,6 @@ import "iframe-resizer";
62
65
  import "../Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js";
63
66
  import "../Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js";
64
67
  import "../Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js";
65
- import "../Input/PercentageInput.js";
66
- import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
67
68
  /* empty css */
68
69
  import "react-dom";
69
70
  /* empty css */
@@ -72,6 +73,12 @@ import "../Auth/SignInPassword.js";
72
73
  /* empty css */
73
74
  /* empty css */
74
75
  import "../Carousel/index.js";
76
+ /* empty css */
77
+ import "../Chatbot/store/chat.js";
78
+ import "../Chatbot/authenticate.js";
79
+ /* empty css */
80
+ import "../Chatbot/store/messages.js";
81
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
75
82
  /* empty css */
76
83
  import "../Comparison/Comparison.css.js";
77
84
  import "next/image.js";
@@ -138,6 +145,7 @@ const ContactUsNMLSId = ({
138
145
  description,
139
146
  callToAction,
140
147
  validateEmail,
148
+ onValidate,
141
149
  id
142
150
  }) => {
143
151
  const schema = z.object({
@@ -164,9 +172,17 @@ const ContactUsNMLSId = ({
164
172
  }),
165
173
  NMLS_ID__c: z.string().min(6).max(7)
166
174
  });
175
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
176
+ if (!isValidHoneyPot(data)) {
177
+ ctx.addIssue({
178
+ code: z.ZodIssueCode.custom,
179
+ message: "fields are not valid."
180
+ });
181
+ }
182
+ });
167
183
  const methods = useForm({
168
184
  resolver: zodResolver(
169
- schema.merge(SalesforceSchema),
185
+ gen_schema,
170
186
  {
171
187
  async: true
172
188
  },
@@ -203,100 +219,112 @@ const ContactUsNMLSId = ({
203
219
  }
204
220
  )
205
221
  ] }),
206
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
207
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
208
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
209
- Input,
210
- {
211
- id: "first_name",
212
- ...register("first_name", { required: true }),
213
- label: "First Name",
214
- sizes: "medium",
215
- placeholder: "First Name",
216
- required: true,
217
- error: !!errors.first_name,
218
- helperText: errors.first_name?.message,
219
- variant
220
- }
221
- ) }),
222
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
223
- Input,
224
- {
225
- id: "last_name",
226
- ...register("last_name", { required: true }),
227
- label: "Last Name",
228
- sizes: "medium",
229
- placeholder: "Last Name",
230
- required: true,
231
- error: !!errors.last_name,
232
- helperText: errors.last_name?.message,
233
- variant
234
- }
235
- ) }),
236
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
237
- Input,
238
- {
239
- id: "email",
240
- ...register("email", {
241
- required: true
242
- }),
243
- type: "email",
244
- label: "Email",
245
- sizes: "medium",
246
- placeholder: "Email",
247
- required: true,
248
- error: !!errors.email,
249
- helperText: errors.email?.message,
250
- variant
251
- }
252
- ) }),
253
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
254
- InputPhone,
255
- {
256
- id: "phone",
257
- ...register("phone", { required: true, maxLength: 12 }),
258
- label: "Phone",
259
- sizes: "medium",
260
- placeholder: "Phone",
261
- type: "tel",
262
- required: true,
263
- error: !!errors.phone,
264
- helperText: errors.phone?.message,
265
- variant
266
- }
267
- ) }),
268
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
269
- Input,
270
- {
271
- id: "NMLS_ID__c",
272
- ...register("NMLS_ID__c", {
273
- required: true,
274
- min: 6,
275
- max: 7
276
- }),
277
- label: "Company NMLS ID",
278
- placeholder: "Company NMLS ID",
279
- sizes: "medium",
280
- required: true,
281
- error: !!errors.NMLS_ID__c,
282
- helperText: errors.NMLS_ID__c?.message,
283
- variant
284
- }
285
- ) })
286
- ] }),
287
- children,
288
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
289
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
290
- Button,
291
- {
292
- color: getVariant(callToAction?.variant),
293
- as: "button",
294
- type: "submit",
295
- disabled: !isValid || isSubmitting,
296
- children: callToAction?.displayText
297
- }
298
- ) })
299
- ] })
222
+ /* @__PURE__ */ jsxs(
223
+ "form",
224
+ {
225
+ className: form,
226
+ onSubmit: async (e) => {
227
+ onValidate && onValidate(e);
228
+ await handleSubmit(submitForm)(e);
229
+ e.preventDefault();
230
+ },
231
+ children: [
232
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
233
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
234
+ Input,
235
+ {
236
+ id: "first_name",
237
+ ...register("first_name", { required: true }),
238
+ label: "First Name",
239
+ sizes: "medium",
240
+ placeholder: "First Name",
241
+ required: true,
242
+ error: !!errors.first_name,
243
+ helperText: errors.first_name?.message,
244
+ variant
245
+ }
246
+ ) }),
247
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
248
+ Input,
249
+ {
250
+ id: "last_name",
251
+ ...register("last_name", { required: true }),
252
+ label: "Last Name",
253
+ sizes: "medium",
254
+ placeholder: "Last Name",
255
+ required: true,
256
+ error: !!errors.last_name,
257
+ helperText: errors.last_name?.message,
258
+ variant
259
+ }
260
+ ) }),
261
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
262
+ Input,
263
+ {
264
+ id: "email",
265
+ ...register("email", {
266
+ required: true
267
+ }),
268
+ type: "email",
269
+ label: "Email",
270
+ sizes: "medium",
271
+ placeholder: "Email",
272
+ required: true,
273
+ error: !!errors.email,
274
+ helperText: errors.email?.message,
275
+ variant
276
+ }
277
+ ) }),
278
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
279
+ InputPhone,
280
+ {
281
+ id: "phone",
282
+ ...register("phone", { required: true, maxLength: 12 }),
283
+ label: "Phone",
284
+ sizes: "medium",
285
+ placeholder: "Phone",
286
+ type: "tel",
287
+ required: true,
288
+ error: !!errors.phone,
289
+ helperText: errors.phone?.message,
290
+ variant
291
+ }
292
+ ) }),
293
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
294
+ Input,
295
+ {
296
+ id: "NMLS_ID__c",
297
+ ...register("NMLS_ID__c", {
298
+ required: true,
299
+ min: 6,
300
+ max: 7
301
+ }),
302
+ label: "Company NMLS ID",
303
+ placeholder: "Company NMLS ID",
304
+ sizes: "medium",
305
+ required: true,
306
+ error: !!errors.NMLS_ID__c,
307
+ helperText: errors.NMLS_ID__c?.message,
308
+ variant
309
+ }
310
+ ) }),
311
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
312
+ ] }),
313
+ children,
314
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
315
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
316
+ Button,
317
+ {
318
+ color: getVariant(callToAction?.variant),
319
+ as: "button",
320
+ type: "submit",
321
+ disabled: !isValid || isSubmitting,
322
+ children: callToAction?.displayText
323
+ }
324
+ ) })
325
+ ]
326
+ }
327
+ )
300
328
  ] }) }) }, id);
301
329
  };
302
330
  export {
@@ -24,4 +24,4 @@ export type CpraInputs = {
24
24
  Zip_Code: string;
25
25
  Contact_Method: "Email" | "Postal Mail";
26
26
  };
27
- export declare const CpraRequest: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const CpraRequest: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;