@axos-web-dev/shared-components 1.0.99-dev.15 → 1.0.99-dev.16

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.
@@ -0,0 +1,11 @@
1
+ import { FormProps } from './FormProps';
2
+
3
+ export type MortgageWarehouseLendingInputs = {
4
+ first_name: string;
5
+ last_name: string;
6
+ email: string;
7
+ phone: string;
8
+ Company_NMLS_ID__c: string;
9
+ Business_Name__c: string;
10
+ };
11
+ export declare const MortgageWarehouseLending: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,338 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import "../Input/Checkbox.js";
5
+ import "../Input/CurrencyInput.js";
6
+ import "../Input/Dropdown.js";
7
+ import "../Input/Dropdown.css.js";
8
+ import { Input } from "../Input/Input.js";
9
+ import "../Input/Input.css.js";
10
+ import "../Input/InputAmount.js";
11
+ import { InputPhone } from "../Input/InputPhone.js";
12
+ import "../Input/InputTextArea.js";
13
+ import "../Input/DownPaymentInput.js";
14
+ import "../Input/RadioButton.js";
15
+ import "../icons/ArrowIcon/ArrowIcon.css.js";
16
+ import SvgAxosX from "../icons/AxosX/index.js";
17
+ import SvgComponent from "../icons/AxosX/Blue.js";
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 */
20
+ /* empty css */
21
+ /* empty css */
22
+ /* empty css */
23
+ /* empty css */
24
+ import "../Accordion/Accordion.js";
25
+ import "../Accordion/Accordion.css.js";
26
+ import { getVariant } from "../utils/getVariant.js";
27
+ import clsx from "clsx";
28
+ import "react";
29
+ import "../Chevron/Chevron.css.js";
30
+ import "../AlertBanner/AlertBanner.css.js";
31
+ import "../Article/Article.css.js";
32
+ import { Button } from "../Button/Button.js";
33
+ import "../Button/Button.css.js";
34
+ import "react-use";
35
+ import "../ArticlesSet/ArticlesSet.css.js";
36
+ import "../IconBillboard/IconBillboard.css.js";
37
+ import "../utils/allowedAxosDomains.js";
38
+ import "../Calculators/calculator.css.js";
39
+ import "../Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js";
40
+ import "../Calculators/ApyCalculator/ApyCalculator.css.js";
41
+ import "../Table/Table.css.js";
42
+ import "../Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js";
43
+ import "../Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js";
44
+ import "../Input/PercentageInput.js";
45
+ import { useForm, FormProvider } from "react-hook-form";
46
+ import { z } from "zod";
47
+ import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
48
+ import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
49
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
50
+ import { SalesforceSchema } from "./SalesforceFieldsForm.js";
51
+ /* empty css */
52
+ /* empty css */
53
+ import "../Input/RadioButton.css.js";
54
+ import "../Input/Checkbox.css.js";
55
+ import "../LoadingIndicator/LoadingIndicator.css.js";
56
+ import "../Interstitial/Interstitial-variants.css.js";
57
+ import "../Inputs/Input.css.js";
58
+ /* empty css */
59
+ /* empty css */
60
+ import "../Modal/contextApi/store.js";
61
+ import "../Hyperlink/Hyperlink.css.js";
62
+ /* empty css */
63
+ import "iframe-resizer";
64
+ /* empty css */
65
+ import "../Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js";
66
+ import "../Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js";
67
+ import "../Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js";
68
+ /* empty css */
69
+ import "react-dom";
70
+ /* empty css */
71
+ import "../Auth/SignInPassword.js";
72
+ /* empty css */
73
+ /* empty css */
74
+ /* empty css */
75
+ import "../Carousel/index.js";
76
+ /* empty css */
77
+ import "../Comparison/Comparison.css.js";
78
+ import "next/image.js";
79
+ import "../HeroBanner/HeroBanner.css.js";
80
+ import "../HeroBanner/LargeBanner.css.js";
81
+ import "../HeroBanner/SelectionBanner.css.js";
82
+ import "../SetContainer/SetContainer.css.js";
83
+ import "../Tab/Tab.css.js";
84
+ import "../icons/Star/Star.css.js";
85
+ import "../ContentBanner/ContentBanner.css.js";
86
+ /* empty css */
87
+ import "../ExecutiveBio/ExecutiveBio.css.js";
88
+ import "../FaqAccordion/index.js";
89
+ import "../FooterDisclosure/FooterDisclosure.css.js";
90
+ /* empty css */
91
+ /* empty css */
92
+ /* empty css */
93
+ import "../ImageBillboard/ImageBillboard.css.js";
94
+ import "next/script.js";
95
+ /* empty css */
96
+ /* empty css */
97
+ /* empty css */
98
+ /* empty css */
99
+ /* empty css */
100
+ /* empty css */
101
+ import "../LandingPageHeader/LandingPageHeader.css.js";
102
+ /* empty css */
103
+ import "next/navigation.js";
104
+ /* empty css */
105
+ /* empty css */
106
+ /* empty css */
107
+ import "next/link.js";
108
+ import "../NavigationMenu/AxosBank/MobileMenu/MobileNavData.js";
109
+ /* empty css */
110
+ import "../NavigationMenu/AxosBank/NavData.js";
111
+ /* empty css */
112
+ /* empty css */
113
+ import "../NavigationMenu/AxosALTS/NavData.js";
114
+ /* empty css */
115
+ /* empty css */
116
+ import "../NavigationMenu/LaVictoire/NavData.js";
117
+ import "../PageNavItem/PageNavItem.css.js";
118
+ import "react-slick";
119
+ /* empty css */
120
+ /* empty css */
121
+ /* empty css */
122
+ /* empty css */
123
+ import "../StepItem/StepItem.css.js";
124
+ import "../StepItemSet/StepItemSet.css.js";
125
+ /* empty css */
126
+ /* empty css */
127
+ /* empty css */
128
+ /* empty css */
129
+ /* empty css */
130
+ const MortgageWarehouseLending = ({
131
+ icon = false,
132
+ children,
133
+ onSubmit = (values) => {
134
+ console.log(values);
135
+ },
136
+ disclosure,
137
+ variant: fullVariant = "primary",
138
+ headline,
139
+ description,
140
+ callToAction,
141
+ validateEmail,
142
+ onValidate,
143
+ id
144
+ }) => {
145
+ const schema = z.object({
146
+ first_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
147
+ last_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
148
+ email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
149
+ 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) => {
150
+ const removeDashes = val.replace(/-/gi, "");
151
+ if (removeDashes.length !== 10) {
152
+ ctx.addIssue({
153
+ code: z.ZodIssueCode.custom,
154
+ message: "Phone must have at least 10 and no more than 10 characters."
155
+ });
156
+ return z.NEVER;
157
+ }
158
+ if (removeDashes.endsWith("00000") || removeDashes.startsWith("999") || removeDashes.length === 10 && /^[01]/.test(removeDashes)) {
159
+ ctx.addIssue({
160
+ code: z.ZodIssueCode.custom,
161
+ message: "Invalid phone number."
162
+ });
163
+ return z.NEVER;
164
+ }
165
+ return removeDashes;
166
+ }),
167
+ Company_NMLS_ID__c: z.string().min(6).max(7),
168
+ Business_Name__c: z.string().min(1)
169
+ });
170
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
171
+ if (!isValidHoneyPot(data)) {
172
+ ctx.addIssue({
173
+ code: z.ZodIssueCode.custom,
174
+ message: "fields are not valid."
175
+ });
176
+ }
177
+ });
178
+ const methods = useForm({
179
+ resolver: zodResolver(
180
+ gen_schema,
181
+ {
182
+ async: true
183
+ },
184
+ { mode: "async" }
185
+ ),
186
+ mode: "onChange",
187
+ shouldUnregister: true,
188
+ defaultValues: {
189
+ email: ""
190
+ }
191
+ });
192
+ const {
193
+ handleSubmit,
194
+ register,
195
+ formState: { errors, isValid, isSubmitting }
196
+ } = methods;
197
+ const submitForm = async (data) => {
198
+ await onSubmit(data);
199
+ };
200
+ const variant = getVariant(fullVariant);
201
+ return /* @__PURE__ */ jsx("section", { id, className: clsx(formContainer({ variant })), children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
202
+ icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
203
+ /* @__PURE__ */ jsxs("div", { className: `${headerContainer} text_center`, children: [
204
+ /* @__PURE__ */ jsx("h2", { className: clsx("header_2", headerForm({ variant })), children: headline }),
205
+ description && /* @__PURE__ */ jsx(
206
+ "div",
207
+ {
208
+ className: clsx(
209
+ "text_center",
210
+ form,
211
+ descriptionField({ variant })
212
+ ),
213
+ children: description
214
+ }
215
+ )
216
+ ] }),
217
+ /* @__PURE__ */ jsxs(
218
+ "form",
219
+ {
220
+ className: form,
221
+ onSubmit: async (e) => {
222
+ onValidate && onValidate(e);
223
+ await handleSubmit(submitForm)(e);
224
+ e.preventDefault();
225
+ },
226
+ children: [
227
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
228
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
229
+ Input,
230
+ {
231
+ id: "first_name",
232
+ ...register("first_name", { required: true }),
233
+ label: "First Name",
234
+ sizes: "medium",
235
+ required: true,
236
+ error: !!errors.first_name,
237
+ helperText: errors.first_name?.message,
238
+ variant
239
+ }
240
+ ) }),
241
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
242
+ Input,
243
+ {
244
+ id: "last_name",
245
+ ...register("last_name", { required: true }),
246
+ label: "Last Name",
247
+ sizes: "medium",
248
+ required: true,
249
+ error: !!errors.last_name,
250
+ helperText: errors.last_name?.message,
251
+ variant
252
+ }
253
+ ) }),
254
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
255
+ Input,
256
+ {
257
+ id: "email",
258
+ ...register("email", {
259
+ required: true
260
+ }),
261
+ type: "email",
262
+ label: "Business Email",
263
+ sizes: "medium",
264
+ required: true,
265
+ error: !!errors.email,
266
+ helperText: errors.email?.message,
267
+ variant
268
+ }
269
+ ) }),
270
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
271
+ InputPhone,
272
+ {
273
+ id: "phone",
274
+ ...register("phone", { required: true, maxLength: 12 }),
275
+ label: "Business Phone",
276
+ sizes: "medium",
277
+ type: "tel",
278
+ required: true,
279
+ error: !!errors.phone,
280
+ helperText: errors.phone?.message,
281
+ variant
282
+ }
283
+ ) }),
284
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
285
+ Input,
286
+ {
287
+ id: "Company_NMLS_ID__c",
288
+ ...register("Company_NMLS_ID__c", {
289
+ required: true,
290
+ min: 6,
291
+ max: 7
292
+ }),
293
+ label: "Company NMLS ID",
294
+ sizes: "medium",
295
+ required: true,
296
+ error: !!errors.Company_NMLS_ID__c,
297
+ helperText: errors.Company_NMLS_ID__c?.message,
298
+ variant
299
+ }
300
+ ) }),
301
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
302
+ Input,
303
+ {
304
+ id: "Business_Name__c",
305
+ ...register("Business_Name__c", {
306
+ required: true
307
+ }),
308
+ type: "text",
309
+ label: "Business Name",
310
+ sizes: "medium",
311
+ required: true,
312
+ error: !!errors.Business_Name__c,
313
+ helperText: errors.Business_Name__c?.message,
314
+ variant
315
+ }
316
+ ) }),
317
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
318
+ ] }),
319
+ children,
320
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
321
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
322
+ Button,
323
+ {
324
+ color: getVariant(callToAction?.variant),
325
+ as: "button",
326
+ type: "submit",
327
+ disabled: !isValid || isSubmitting,
328
+ children: callToAction?.displayText
329
+ }
330
+ ) })
331
+ ]
332
+ }
333
+ )
334
+ ] }) }) }, id);
335
+ };
336
+ export {
337
+ MortgageWarehouseLending
338
+ };
@@ -25,6 +25,7 @@ export * from './MortgageRate/MortgageRateForm';
25
25
  export * from './MortgageRate/MortgageRateModal';
26
26
  export * from './MortgageRate/MortgageRateQuoteFilters';
27
27
  export * from './MortgageRate/MortgageRateWatch';
28
+ export * from './MortgageWarehouseLending';
28
29
  export * from './QuickPricer';
29
30
  export * from './SalesforceFieldsForm';
30
31
  export * from './ScheduleCall';
@@ -28,6 +28,7 @@ import "../utils/allowedAxosDomains.js";
28
28
  import "../LoadingIndicator/LoadingIndicator.css.js";
29
29
  import "../Interstitial/Interstitial-variants.css.js";
30
30
  import { MortgageRateFilters } from "./MortgageRate/MortgageRateQuoteFilters.js";
31
+ import { MortgageWarehouseLending } from "./MortgageWarehouseLending.js";
31
32
  import { QuickPricer } from "./QuickPricer/QuickPricerForm.js";
32
33
  import { rate_table_title, results_container } from "./QuickPricer/QuickPricerResults.css.js";
33
34
  import { UserInformation } from "./QuickPricer/UserInformation.js";
@@ -61,6 +62,7 @@ export {
61
62
  HoneyPot,
62
63
  MortgageRate,
63
64
  MortgageRateFilters,
65
+ MortgageWarehouseLending,
64
66
  QuickPricer,
65
67
  RateWatchForm,
66
68
  SalesforceFieldsForm,
package/dist/main.js CHANGED
@@ -82,6 +82,7 @@ import { RateWatchForm } from "./Forms/MortgageRate/MortgageRateWatch.js";
82
82
  import { LoadingIndicator } from "./LoadingIndicator/index.js";
83
83
  import "./Interstitial/Interstitial-variants.css.js";
84
84
  import { MortgageRateFilters } from "./Forms/MortgageRate/MortgageRateQuoteFilters.js";
85
+ import { MortgageWarehouseLending } from "./Forms/MortgageWarehouseLending.js";
85
86
  import { QuickPricer } from "./Forms/QuickPricer/QuickPricerForm.js";
86
87
  import { rate_table_title, results_container } from "./Forms/QuickPricer/QuickPricerResults.css.js";
87
88
  import { UserInformation } from "./Forms/QuickPricer/UserInformation.js";
@@ -324,6 +325,7 @@ export {
324
325
  MonthlyPaymentLVFCalculator,
325
326
  MortgageRate,
326
327
  MortgageRateFilters,
328
+ MortgageWarehouseLending,
327
329
  default30 as NavBarAAS,
328
330
  default33 as NavBarAFS,
329
331
  default34 as NavBarALT,
@@ -6,7 +6,8 @@ const moreDomains = {
6
6
  "{AXA}": process.env.AXA_URL || "https://www.axosadvisor.com",
7
7
  "{AFS}": process.env.AFS_URL || "https://www.axosfiduciaryservices.com",
8
8
  "{NATIONWIDE}": process.env.NATIOWIDE_URL || "https://www.nationwide.axosbank.com",
9
- "{ENROLLMENT}": process.env.ENROLLMENT_URL || "https://enrollment.axosbank.com",
9
+ "{ENROLLMENT}": process.env.ENROLLMENT_URL || "https://onboard.axos.com",
10
+ "{LEGACYENROLLMENT}": process.env.LEGACY_ENROLLMENT_URL || "https://enrollment.axosbank.com",
10
11
  "{ASSETSURL}": "https://assets.axos.com",
11
12
  "{IMAGEASSETSURL}": "https://images.axos.com",
12
13
  "{ONLINEBANKING}": process.env.ONLINEBANKING_URL || "https://onlinebanking.uat.axosbank.com",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "1.0.99-dev.15",
4
+ "version": "1.0.99-dev.16",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",