@axos-web-dev/shared-components 1.0.69 → 1.0.70

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.
@@ -2,7 +2,6 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { z } from "zod";
4
4
  import { useForm, FormProvider } from "react-hook-form";
5
- import { SalesforceSchema } from "./SalesforceFieldsForm.js";
6
5
  import { zodResolver } from "@hookform/resolvers/zod";
7
6
  import "../utils/allowedAxosDomains.js";
8
7
  import { associatedEmail } from "../utils/EverestValidity.js";
@@ -61,15 +60,17 @@ const CommercialPremiumFinance = ({
61
60
  }).regex(/^[a-zA-Z]*(?:[a-zA-Z][a-zA-Z'-]*\s{0,1}){2,}$/g, {
62
61
  message: "Invalid last name"
63
62
  }).trim().min(1, { message: "Last Name is required." }),
64
- email: z.string().email({ message: "Business Email is required." }).refine(async (val) => await validateEmail(val)),
63
+ email: z.string().email({ message: "Invalid email address" }).refine(async (val) => await validateEmail(val), {
64
+ message: "Invalid email address"
65
+ }),
65
66
  Insurance_Company__c: z.string(),
66
67
  Type_of_Policy__c: z.string()
67
68
  });
68
69
  const methods = useForm({
69
- resolver: zodResolver(schema.merge(SalesforceSchema), {
70
+ resolver: zodResolver(schema, {
70
71
  async: true
71
72
  }),
72
- mode: "all",
73
+ mode: "onBlur",
73
74
  defaultValues: {
74
75
  email: ""
75
76
  }
@@ -99,80 +100,81 @@ const CommercialPremiumFinance = ({
99
100
  }
100
101
  )
101
102
  ] }),
102
- /* @__PURE__ */ jsx("form", { className: form, onSubmit: handleSubmit(submitForm), children: /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
103
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
104
- Input,
105
- {
106
- id: "first_name",
107
- ...register("first_name", { required: true }),
108
- label: "First Name",
109
- sizes: "medium",
110
- required: true,
111
- error: !!errors.first_name,
112
- helperText: errors.first_name?.message,
113
- variant
114
- }
115
- ) }),
116
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
117
- Input,
118
- {
119
- id: "last_name",
120
- ...register("last_name", { required: true }),
121
- label: "Last Name",
122
- sizes: "medium",
123
- required: true,
124
- error: !!errors.last_name,
125
- helperText: errors.last_name?.message,
126
- variant
127
- }
128
- ) }),
129
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
130
- Input,
131
- {
132
- id: "email",
133
- ...register("email", {
103
+ /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
104
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
105
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
106
+ Input,
107
+ {
108
+ id: "first_name",
109
+ ...register("first_name", { required: true }),
110
+ label: "First Name",
111
+ sizes: "medium",
134
112
  required: true,
135
- validate: {
136
- isValid: associatedEmail
137
- }
138
- }),
139
- label: "Business Email",
140
- sizes: "medium",
141
- required: true,
142
- error: !!errors.email,
143
- helperText: errors.email?.message,
144
- variant
145
- }
146
- ) }),
147
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
148
- Input,
149
- {
150
- id: "Insurance_Company__c",
151
- ...register("Insurance_Company__c", { required: true }),
152
- label: "Insurance Company",
153
- sizes: "medium",
154
- required: true,
155
- error: !!errors.Insurance_Company__c,
156
- helperText: errors.Insurance_Company__c?.message,
157
- variant
158
- }
159
- ) }),
160
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
161
- Dropdown,
162
- {
163
- id: "Type_of_Policy__c",
164
- ...register("Type_of_Policy__c", {}),
165
- label: "Type of Policy",
166
- sizes: "medium",
167
- variant,
168
- defaultValue: "",
169
- children: [
170
- /* @__PURE__ */ jsx("option", { value: "" }),
171
- /* @__PURE__ */ jsx("option", { value: "Whole life", children: "Whole life" }),
172
- /* @__PURE__ */ jsx("option", { value: "Index Universal Life", children: "Index Universal Life" })
173
- ]
174
- }
175
- ) }),
113
+ error: !!errors.first_name,
114
+ helperText: errors.first_name?.message,
115
+ variant
116
+ }
117
+ ) }),
118
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
119
+ Input,
120
+ {
121
+ id: "last_name",
122
+ ...register("last_name", { required: true }),
123
+ label: "Last Name",
124
+ sizes: "medium",
125
+ required: true,
126
+ error: !!errors.last_name,
127
+ helperText: errors.last_name?.message,
128
+ variant
129
+ }
130
+ ) }),
131
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
132
+ Input,
133
+ {
134
+ id: "email",
135
+ ...register("email", {
136
+ required: true,
137
+ validate: {
138
+ isValid: associatedEmail
139
+ }
140
+ }),
141
+ label: "Email",
142
+ sizes: "medium",
143
+ required: true,
144
+ error: !!errors.email,
145
+ helperText: errors.email?.message,
146
+ variant
147
+ }
148
+ ) }),
149
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
150
+ Input,
151
+ {
152
+ id: "Insurance_Company__c",
153
+ ...register("Insurance_Company__c", {}),
154
+ label: "Insurance Company",
155
+ sizes: "medium",
156
+ error: !!errors.Insurance_Company__c,
157
+ helperText: errors.Insurance_Company__c?.message,
158
+ variant
159
+ }
160
+ ) }),
161
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
162
+ Dropdown,
163
+ {
164
+ id: "Type_of_Policy__c",
165
+ ...register("Type_of_Policy__c", {}),
166
+ label: "Type of Policy",
167
+ sizes: "medium",
168
+ variant,
169
+ defaultValue: "",
170
+ children: [
171
+ /* @__PURE__ */ jsx("option", { value: "" }),
172
+ /* @__PURE__ */ jsx("option", { value: "Whole life", children: "Whole life" }),
173
+ /* @__PURE__ */ jsx("option", { value: "Index Universal Life", children: "Index Universal Life" })
174
+ ]
175
+ }
176
+ ) })
177
+ ] }),
176
178
  children,
177
179
  /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
178
180
  /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
@@ -191,7 +193,7 @@ const CommercialPremiumFinance = ({
191
193
  children: callToAction?.displayText
192
194
  }
193
195
  ) })
194
- ] }) })
196
+ ] })
195
197
  ] }) }) }, id);
196
198
  };
197
199
  export {
@@ -185,6 +185,7 @@ export declare const menuData: {
185
185
  "Small Balance Commercial Real Estate": string;
186
186
  "Leveraged Finance": string;
187
187
  "Marine Dealer Floorplan Finance": string;
188
+ "Premium Finance": string;
188
189
  };
189
190
  "Other Resources": {
190
191
  "Business Support": string;
@@ -497,7 +497,10 @@ const menuData = {
497
497
  "Leveraged Finance": findMoreAxosDomains(
498
498
  "{AXOSBANK}/commercial/lending/leveraged-finance"
499
499
  ),
500
- "Marine Dealer Floorplan Finance": "https://lavictoirefinance.com/dealers"
500
+ "Marine Dealer Floorplan Finance": "https://lavictoirefinance.com/dealers",
501
+ "Premium Finance": findMoreAxosDomains(
502
+ "{AXOSBANK}/commercial/lending/premium-finance"
503
+ )
501
504
  },
502
505
  "Other Resources": {
503
506
  "Business Support": findMoreAxosDomains("{AXOSBANK}/business/support"),
@@ -2899,6 +2899,15 @@ function SubNavBar() {
2899
2899
  href: `https://lavictoirefinance.com/dealers`,
2900
2900
  children: "Marine Dealer Floorplan Finance"
2901
2901
  }
2902
+ ) }),
2903
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
2904
+ Link,
2905
+ {
2906
+ href: findMoreAxosDomains(
2907
+ "{AXOSBANK}/commercial/lending/premium-finance"
2908
+ ),
2909
+ children: "Premium Finance"
2910
+ }
2902
2911
  ) })
2903
2912
  ] })
2904
2913
  ] }),
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.69",
4
+ "version": "1.0.70",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",