@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, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
35
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
35
36
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
36
37
  const DealerServices = ({
37
38
  icon = false,
@@ -45,13 +46,13 @@ const DealerServices = ({
45
46
  description,
46
47
  callToAction,
47
48
  validateEmail,
49
+ onValidate,
48
50
  id
49
51
  }) => {
50
52
  const schema = z.object({
51
53
  first_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
52
54
  last_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
53
55
  email: z.string().email({ message: "Email is required." }),
54
- // .refine(async (val: string) => await validateEmail(val)),
55
56
  phone: z.string({ message: "Phone is required." }).regex(/[\d-]{10}/, "Invalid phone number.").min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
56
57
  const removeDashes = val.replace(/-/gi, "");
57
58
  if (removeDashes.length !== 10) {
@@ -81,8 +82,16 @@ const DealerServices = ({
81
82
  zip: z.string().trim().max(20).min(1, { message: "Zip code is required." }),
82
83
  description: z.string().trim().max(32e3)
83
84
  });
85
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
86
+ if (!isValidHoneyPot(data)) {
87
+ ctx.addIssue({
88
+ code: z.ZodIssueCode.custom,
89
+ message: "fields are not valid."
90
+ });
91
+ }
92
+ });
84
93
  const methods = useForm({
85
- resolver: zodResolver(schema.merge(SalesforceSchema), {
94
+ resolver: zodResolver(gen_schema, {
86
95
  async: true
87
96
  }),
88
97
  mode: "all",
@@ -118,209 +127,221 @@ const DealerServices = ({
118
127
  }
119
128
  )
120
129
  ] }),
121
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
122
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
123
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
124
- Input,
125
- {
126
- id: "first_name",
127
- ...register("first_name", { required: true }),
128
- label: "First Name",
129
- sizes: "medium",
130
- placeholder: "First Name",
131
- required: true,
132
- error: !!errors.first_name,
133
- helperText: errors.first_name?.message,
134
- variant
135
- }
136
- ) }),
137
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
138
- Input,
139
- {
140
- id: "last_name",
141
- ...register("last_name", { required: true }),
142
- label: "Last Name",
143
- sizes: "medium",
144
- placeholder: "Last Name",
145
- required: true,
146
- error: !!errors.last_name,
147
- helperText: errors.last_name?.message,
148
- variant
149
- }
150
- ) }),
151
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
152
- Input,
153
- {
154
- id: "email",
155
- ...register("email", {
156
- required: true,
157
- validate: {
158
- isValid: async (val) => await associatedEmail(val) && await validateEmail(val)
130
+ /* @__PURE__ */ jsxs(
131
+ "form",
132
+ {
133
+ className: form,
134
+ onSubmit: async (e) => {
135
+ onValidate && onValidate(e);
136
+ await handleSubmit(submitForm)(e);
137
+ e.preventDefault();
138
+ },
139
+ children: [
140
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
141
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
142
+ Input,
143
+ {
144
+ id: "first_name",
145
+ ...register("first_name", { required: true }),
146
+ label: "First Name",
147
+ sizes: "medium",
148
+ placeholder: "First Name",
149
+ required: true,
150
+ error: !!errors.first_name,
151
+ helperText: errors.first_name?.message,
152
+ variant
159
153
  }
160
- }),
161
- label: "Email",
162
- sizes: "medium",
163
- placeholder: "Email",
164
- required: true,
165
- error: !!errors.email,
166
- helperText: errors.email?.message,
167
- variant
168
- }
169
- ) }),
170
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
171
- InputPhone,
172
- {
173
- id: "phone",
174
- ...register("phone", { required: true, maxLength: 12 }),
175
- label: "Phone",
176
- sizes: "medium",
177
- placeholder: "Phone",
178
- required: true,
179
- error: !!errors.phone,
180
- helperText: errors.phone?.message,
181
- variant
182
- }
183
- ) }),
184
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
185
- Input,
186
- {
187
- id: "title",
188
- ...register("title", { required: true }),
189
- label: "Title",
190
- sizes: "medium",
191
- placeholder: "Title",
192
- required: true,
193
- error: !!errors.title,
194
- helperText: errors.title?.message,
195
- variant
196
- }
197
- ) }),
198
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
199
- Input,
200
- {
201
- id: "company",
202
- ...register("company", { required: true }),
203
- label: "Company Name",
204
- sizes: "medium",
205
- placeholder: "Company Name",
206
- required: true,
207
- error: !!errors.company,
208
- helperText: errors.company?.message,
209
- variant
210
- }
211
- ) }),
212
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
213
- Dropdown,
214
- {
215
- id: "Dealer_Type__c",
216
- ...register("Dealer_Type__c", {
217
- required: true,
218
- maxLength: 12
219
- }),
220
- label: "Franchise or Independent",
221
- sizes: "medium",
222
- required: true,
223
- error: !!errors.Dealer_Type__c,
224
- helperText: errors.Dealer_Type__c?.message,
225
- variant,
226
- defaultValue: "Franchise",
227
- children: [
228
- /* @__PURE__ */ jsx("option", { value: "Franchise", children: "Franchise" }),
229
- /* @__PURE__ */ jsx("option", { value: "Independent", children: "Independent" })
230
- ]
231
- }
232
- ) }),
233
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
234
- Dropdown,
235
- {
236
- id: "Lead_Source_Detail_SFDC2__c2",
237
- ...register("Lead_Source_Detail_SFDC2__c2", {
238
- required: true,
239
- maxLength: 12
240
- }),
241
- label: "Dealer Services or Collector Car Program",
242
- sizes: "medium",
243
- required: true,
244
- error: !!errors.Lead_Source_Detail_SFDC2__c2,
245
- helperText: errors.Lead_Source_Detail_SFDC2__c2?.message,
246
- variant,
247
- defaultValue: "Dealer Services",
248
- children: [
249
- /* @__PURE__ */ jsx("option", { value: "Dealer Services", children: "Dealer Services" }),
250
- /* @__PURE__ */ jsx("option", { value: "Collector Car Program", children: "Collector Car Program" })
251
- ]
252
- }
253
- ) }),
254
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
255
- Input,
256
- {
257
- id: "city",
258
- ...register("city", { required: true }),
259
- label: "City",
260
- sizes: "medium",
261
- placeholder: "City",
262
- required: true,
263
- error: !!errors.city,
264
- helperText: errors.city?.message,
265
- variant
266
- }
267
- ) }),
268
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
269
- Input,
270
- {
271
- id: "state",
272
- ...register("state", { required: true }),
273
- label: "State",
274
- sizes: "medium",
275
- placeholder: "State",
276
- required: true,
277
- error: !!errors.state,
278
- helperText: errors.state?.message,
279
- variant
280
- }
281
- ) }),
282
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
283
- Input,
284
- {
285
- id: "zip",
286
- ...register("zip", { required: true }),
287
- label: "Zip Code",
288
- sizes: "medium",
289
- placeholder: "Zip Code",
290
- required: true,
291
- error: !!errors.zip,
292
- helperText: errors.zip?.message,
293
- variant
294
- }
295
- ) }),
296
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
297
- InputTextArea,
298
- {
299
- id: "description",
300
- ...register("description"),
301
- label: "Additional Details",
302
- sizes: "medium",
303
- placeholder: "Additional Details",
304
- error: !!errors.description,
305
- helperText: errors.description?.message,
306
- variant,
307
- rows: 1
308
- }
309
- ) })
310
- ] }),
311
- children,
312
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
313
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
314
- Button,
315
- {
316
- color: getVariant(callToAction?.variant),
317
- as: "button",
318
- type: "submit",
319
- disabled: !isValid || isSubmitting,
320
- children: callToAction?.displayText
321
- }
322
- ) })
323
- ] })
154
+ ) }),
155
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
156
+ Input,
157
+ {
158
+ id: "last_name",
159
+ ...register("last_name", { required: true }),
160
+ label: "Last Name",
161
+ sizes: "medium",
162
+ placeholder: "Last Name",
163
+ required: true,
164
+ error: !!errors.last_name,
165
+ helperText: errors.last_name?.message,
166
+ variant
167
+ }
168
+ ) }),
169
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
170
+ Input,
171
+ {
172
+ id: "email",
173
+ ...register("email", {
174
+ required: true,
175
+ validate: {
176
+ isValid: async (val) => await associatedEmail(val) && await validateEmail(val)
177
+ }
178
+ }),
179
+ label: "Email",
180
+ sizes: "medium",
181
+ placeholder: "Email",
182
+ required: true,
183
+ error: !!errors.email,
184
+ helperText: errors.email?.message,
185
+ variant
186
+ }
187
+ ) }),
188
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
189
+ InputPhone,
190
+ {
191
+ id: "phone",
192
+ ...register("phone", { required: true, maxLength: 12 }),
193
+ label: "Phone",
194
+ sizes: "medium",
195
+ placeholder: "Phone",
196
+ required: true,
197
+ error: !!errors.phone,
198
+ helperText: errors.phone?.message,
199
+ variant
200
+ }
201
+ ) }),
202
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
203
+ Input,
204
+ {
205
+ id: "title",
206
+ ...register("title", { required: true }),
207
+ label: "Title",
208
+ sizes: "medium",
209
+ placeholder: "Title",
210
+ required: true,
211
+ error: !!errors.title,
212
+ helperText: errors.title?.message,
213
+ variant
214
+ }
215
+ ) }),
216
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
217
+ Input,
218
+ {
219
+ id: "company",
220
+ ...register("company", { required: true }),
221
+ label: "Company Name",
222
+ sizes: "medium",
223
+ placeholder: "Company Name",
224
+ required: true,
225
+ error: !!errors.company,
226
+ helperText: errors.company?.message,
227
+ variant
228
+ }
229
+ ) }),
230
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
231
+ Dropdown,
232
+ {
233
+ id: "Dealer_Type__c",
234
+ ...register("Dealer_Type__c", {
235
+ required: true,
236
+ maxLength: 12
237
+ }),
238
+ label: "Franchise or Independent",
239
+ sizes: "medium",
240
+ required: true,
241
+ error: !!errors.Dealer_Type__c,
242
+ helperText: errors.Dealer_Type__c?.message,
243
+ variant,
244
+ defaultValue: "Franchise",
245
+ children: [
246
+ /* @__PURE__ */ jsx("option", { value: "Franchise", children: "Franchise" }),
247
+ /* @__PURE__ */ jsx("option", { value: "Independent", children: "Independent" })
248
+ ]
249
+ }
250
+ ) }),
251
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
252
+ Dropdown,
253
+ {
254
+ id: "Lead_Source_Detail_SFDC2__c2",
255
+ ...register("Lead_Source_Detail_SFDC2__c2", {
256
+ required: true,
257
+ maxLength: 12
258
+ }),
259
+ label: "Dealer Services or Collector Car Program",
260
+ sizes: "medium",
261
+ required: true,
262
+ error: !!errors.Lead_Source_Detail_SFDC2__c2,
263
+ helperText: errors.Lead_Source_Detail_SFDC2__c2?.message,
264
+ variant,
265
+ defaultValue: "Dealer Services",
266
+ children: [
267
+ /* @__PURE__ */ jsx("option", { value: "Dealer Services", children: "Dealer Services" }),
268
+ /* @__PURE__ */ jsx("option", { value: "Collector Car Program", children: "Collector Car Program" })
269
+ ]
270
+ }
271
+ ) }),
272
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
273
+ Input,
274
+ {
275
+ id: "city",
276
+ ...register("city", { required: true }),
277
+ label: "City",
278
+ sizes: "medium",
279
+ placeholder: "City",
280
+ required: true,
281
+ error: !!errors.city,
282
+ helperText: errors.city?.message,
283
+ variant
284
+ }
285
+ ) }),
286
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
287
+ Input,
288
+ {
289
+ id: "state",
290
+ ...register("state", { required: true }),
291
+ label: "State",
292
+ sizes: "medium",
293
+ placeholder: "State",
294
+ required: true,
295
+ error: !!errors.state,
296
+ helperText: errors.state?.message,
297
+ variant
298
+ }
299
+ ) }),
300
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
301
+ Input,
302
+ {
303
+ id: "zip",
304
+ ...register("zip", { required: true }),
305
+ label: "Zip Code",
306
+ sizes: "medium",
307
+ placeholder: "Zip Code",
308
+ required: true,
309
+ error: !!errors.zip,
310
+ helperText: errors.zip?.message,
311
+ variant
312
+ }
313
+ ) }),
314
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
315
+ InputTextArea,
316
+ {
317
+ id: "description",
318
+ ...register("description"),
319
+ label: "Additional Details",
320
+ sizes: "medium",
321
+ placeholder: "Additional Details",
322
+ error: !!errors.description,
323
+ helperText: errors.description?.message,
324
+ variant,
325
+ rows: 1
326
+ }
327
+ ) }),
328
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
329
+ ] }),
330
+ children,
331
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
332
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
333
+ Button,
334
+ {
335
+ color: getVariant(callToAction?.variant),
336
+ as: "button",
337
+ type: "submit",
338
+ disabled: !isValid || isSubmitting,
339
+ children: callToAction?.displayText
340
+ }
341
+ ) })
342
+ ]
343
+ }
344
+ )
324
345
  ] }) }) }, id);
325
346
  };
326
347
  export {
@@ -3,4 +3,4 @@ import { FormProps } from './FormProps';
3
3
  export type EmailOnlyInputs = {
4
4
  email: string;
5
5
  };
6
- export declare const EmailOnly: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const EmailOnly: ({ 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 */
@@ -42,9 +42,12 @@ import "../Calculators/ApyCalculator/ApyCalculator.css.js";
42
42
  import "../Table/Table.css.js";
43
43
  import "../Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js";
44
44
  import "../Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js";
45
+ import "../Input/PercentageInput.js";
45
46
  import { useForm, FormProvider } from "react-hook-form";
46
47
  import { z } from "zod";
48
+ import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
47
49
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
50
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
48
51
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
49
52
  /* empty css */
50
53
  /* empty css */
@@ -63,8 +66,6 @@ import "iframe-resizer";
63
66
  import "../Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js";
64
67
  import "../Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js";
65
68
  import "../Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js";
66
- import "../Input/PercentageInput.js";
67
- import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
68
69
  /* empty css */
69
70
  import "react-dom";
70
71
  /* empty css */
@@ -73,6 +74,12 @@ import "../Auth/SignInPassword.js";
73
74
  /* empty css */
74
75
  /* empty css */
75
76
  import "../Carousel/index.js";
77
+ /* empty css */
78
+ import "../Chatbot/store/chat.js";
79
+ import "../Chatbot/authenticate.js";
80
+ /* empty css */
81
+ import "../Chatbot/store/messages.js";
82
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
76
83
  /* empty css */
77
84
  import "../Comparison/Comparison.css.js";
78
85
  import "next/image.js";
@@ -139,18 +146,23 @@ const EmailOnly = ({
139
146
  description,
140
147
  callToAction,
141
148
  validateEmail,
149
+ onValidate,
142
150
  id
143
151
  }) => {
144
152
  const schema = z.object({
145
153
  email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val))
146
154
  });
155
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
156
+ if (!isValidHoneyPot(data)) {
157
+ ctx.addIssue({
158
+ code: z.ZodIssueCode.custom,
159
+ message: "fields are not valid."
160
+ });
161
+ }
162
+ });
147
163
  const methods = useForm({
148
164
  resolver: async (data, context, options) => {
149
- return zodResolver(schema.merge(SalesforceSchema))(
150
- data,
151
- context,
152
- options
153
- );
165
+ return zodResolver(gen_schema)(data, context, options);
154
166
  },
155
167
  mode: "all",
156
168
  defaultValues: {
@@ -183,38 +195,52 @@ const EmailOnly = ({
183
195
  }
184
196
  )
185
197
  ] }),
186
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
187
- /* @__PURE__ */ jsx("div", { className: clsx(formWrapper({ variant, formType })), children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
188
- Input,
189
- {
190
- id: "email",
191
- ...register("email", {
192
- required: true,
193
- validate: {
194
- isValid: associatedEmail
198
+ /* @__PURE__ */ jsxs(
199
+ "form",
200
+ {
201
+ className: form,
202
+ onSubmit: async (e) => {
203
+ onValidate && onValidate(e);
204
+ await handleSubmit(submitForm)(e);
205
+ e.preventDefault();
206
+ },
207
+ children: [
208
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant, formType })), children: [
209
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
210
+ Input,
211
+ {
212
+ id: "email",
213
+ ...register("email", {
214
+ required: true,
215
+ validate: {
216
+ isValid: associatedEmail
217
+ }
218
+ }),
219
+ sizes: "medium",
220
+ placeholder: "Enter Email",
221
+ required: true,
222
+ error: !!errors.email,
223
+ helperText: errors.email?.message,
224
+ variant
225
+ }
226
+ ) }),
227
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
228
+ ] }),
229
+ children,
230
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
231
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
232
+ Button,
233
+ {
234
+ color: getVariant(callToAction?.variant),
235
+ as: "button",
236
+ type: "submit",
237
+ disabled: !isValid || isSubmitting,
238
+ children: callToAction?.displayText
195
239
  }
196
- }),
197
- sizes: "medium",
198
- placeholder: "Enter Email",
199
- required: true,
200
- error: !!errors.email,
201
- helperText: errors.email?.message,
202
- variant
203
- }
204
- ) }) }),
205
- children,
206
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
207
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
208
- Button,
209
- {
210
- color: getVariant(callToAction?.variant),
211
- as: "button",
212
- type: "submit",
213
- disabled: !isValid || isSubmitting,
214
- children: callToAction?.displayText
215
- }
216
- ) })
217
- ] })
240
+ ) })
241
+ ]
242
+ }
243
+ )
218
244
  ] }) }) }, id);
219
245
  };
220
246
  export {
@@ -4,4 +4,4 @@ export type EmailUsInputs = {
4
4
  email: string;
5
5
  message: string;
6
6
  };
7
- export declare const EmailUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, validateEmail, description, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const EmailUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, validateEmail, onValidate, description, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;