@axos-web-dev/shared-components 0.0.198 → 0.0.199

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,932 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import { Button } from "../Button/Button.js";
5
+ import "../Button/Button.css.js";
6
+ import "react";
7
+ import "react-use";
8
+ import "../Input/Checkbox.js";
9
+ import "../Input/CurrencyInput.js";
10
+ import "../Input/Dropdown.js";
11
+ import "../Input/Dropdown.css.js";
12
+ import { Input } from "../Input/Input.js";
13
+ import "../Input/Input.css.js";
14
+ import "../Input/InputAmount.js";
15
+ import { InputPhone } from "../Input/InputPhone.js";
16
+ import { InputTextArea } from "../Input/InputTextArea.js";
17
+ import "../Input/DownPaymentInput.js";
18
+ import "../Input/RadioButton.js";
19
+ import "../utils/allowedAxosDomains.js";
20
+ import { getVariant } from "../utils/getVariant.js";
21
+ import clsx from "clsx";
22
+ import { useForm, FormProvider } from "react-hook-form";
23
+ import { z } from "zod";
24
+ import { formContainer, form, formWrapper, form_row, descriptionField, actions } from "./Forms.css.js";
25
+ const VendorQuestionnaire = ({
26
+ children,
27
+ onSubmit = (values) => {
28
+ console.log(values);
29
+ },
30
+ variant: fullVariant = "primary",
31
+ validateEmail,
32
+ callToAction,
33
+ id
34
+ }) => {
35
+ const schema = z.object({
36
+ "name/0-2": z.string().min(1, { message: "Please complete this required field." }),
37
+ "dba/0-2": z.string(),
38
+ "phone/0-2": z.string().min(1, { message: "Please complete this required field." }),
39
+ "website/0-2": z.string().min(1, { message: "Please complete this required field." }),
40
+ "address/0-2": z.string().min(1, { message: "Please complete this required field." }),
41
+ "address2/0-2": z.string(),
42
+ "city/0-2": z.string().min(1, { message: "Please complete this required field." }),
43
+ "state/0-2": z.string().min(1, { message: "Please complete this required field." }),
44
+ "zip/0-2": z.string().min(1, { message: "Please complete this required field." }),
45
+ "description/0-2": z.string(),
46
+ "how_did_you_hear_about_us_/0-2": z.string(),
47
+ "owner_name_1/0-2": z.string().min(1, { message: "Please complete this required field." }),
48
+ "owner_phone_1/0-2": z.string().min(1, { message: "Please complete this required field." }),
49
+ "owner_email_1/0-2": z.string().min(1, { message: "Please complete this required field." }),
50
+ "owner_name_2/0-2": z.string(),
51
+ "owner_phone_2/0-2": z.string(),
52
+ "owner_email_2/0-2": z.string(),
53
+ "owner_name_3/0-2": z.string(),
54
+ "owner_phone_3/0-2": z.string(),
55
+ "owner_email_3/0-2": z.string(),
56
+ "owner_name_4/0-2": z.string(),
57
+ "owner_phone_4/0-2": z.string(),
58
+ "owner_email_4/0-2": z.string(),
59
+ "sales_contact_name/0-2": z.string().min(1, { message: "Please complete this required field." }),
60
+ "sales_contact_phone/0-2": z.string().min(1, { message: "Please complete this required field." }),
61
+ "sales_contact_email/0-2": z.string().min(1, { message: "Please complete this required field." }),
62
+ "finance_contact_name/0-2": z.string().min(1, { message: "Please complete this required field." }),
63
+ "finance_contact_phone/0-2": z.string().min(1, { message: "Please complete this required field." }),
64
+ "finance_contact_email/0-2": z.string().min(1, { message: "Please complete this required field." }),
65
+ "type_of_organization/0-2": z.string().min(1, { message: "Please complete this required field." }),
66
+ "founded_year/0-2": z.string().min(1, { message: "Please complete this required field." }),
67
+ "officer_name_1/0-2": z.string().min(1, { message: "Please complete this required field." }),
68
+ "officer_title_1/0-2": z.string().min(1, { message: "Please complete this required field." }),
69
+ "officer_name_2/0-2": z.string(),
70
+ "officer_title_2/0-2": z.string(),
71
+ "officer_name_3/0-2": z.string(),
72
+ "officer_title_3/0-2": z.string(),
73
+ "name_of_insurer/0-2": z.string().min(1, { message: "Please complete this required field." }),
74
+ "insurer_phone/0-2": z.string().min(1, { message: "Please complete this required field." }),
75
+ "insurer_email/0-2": z.string().min(1, { message: "Please complete this required field." }),
76
+ "forecasted_business/0-2": z.string(),
77
+ "forecasted_business_comments/0-2": z.string(),
78
+ "security_transit_approval_documents/0-2": z.string().min(1, { message: "Please complete this required field." }),
79
+ "security_transit_closing_documents/0-2": z.string().min(1, { message: "Please complete this required field." }),
80
+ "security_rest_electronic/0-2": z.string().min(1, { message: "Please complete this required field." }),
81
+ "security_rest_paper/0-2": z.string().min(1, { message: "Please complete this required field." }),
82
+ "security_time_of_disposal_paper/0-2": z.string().min(1, { message: "Please complete this required field." }),
83
+ "security_time_of_disposal_electronic/0-2": z.string().min(1, { message: "Please complete this required field." }),
84
+ "company/0-1": z.string().min(1, { message: "Please complete this required field." }),
85
+ "firstname/0-1": z.string().min(1, { message: "Please complete this required field." }),
86
+ "lastname/0-1": z.string().min(1, { message: "Please complete this required field." }),
87
+ "jobtitle/0-1": z.string().min(1, { message: "Please complete this required field." }),
88
+ "email/0-1": z.string().email({ message: "Please complete this required field." }).refine(async (val) => await validateEmail(val))
89
+ });
90
+ const methods = useForm({
91
+ resolver: zodResolver(schema, {
92
+ async: true
93
+ }),
94
+ mode: "all"
95
+ });
96
+ const {
97
+ handleSubmit,
98
+ register,
99
+ formState: { errors, isValid }
100
+ } = methods;
101
+ const submitForm = async (data) => {
102
+ const formattedFieldsData = Object.keys(data).map((key) => {
103
+ const [name, typeId] = key.split("/");
104
+ return { name, value: data[key], objectTypeId: typeId };
105
+ });
106
+ const contextData = {
107
+ pageUri: "https://lavictoirefinance.com/la-victoire-vendor-questionnaire",
108
+ pageName: "La Victoire",
109
+ pageId: "102797191008"
110
+ };
111
+ const legalConsentData = {
112
+ consent: {
113
+ consentToProcess: true,
114
+ text: "I agree to allow La Victoire Finance to store and process my personal data."
115
+ }
116
+ };
117
+ await onSubmit({
118
+ fields: formattedFieldsData,
119
+ context: contextData,
120
+ legalConsentOptions: legalConsentData
121
+ });
122
+ };
123
+ const variant = getVariant(fullVariant);
124
+ const formType = "questionnaire";
125
+ return /* @__PURE__ */ jsx(
126
+ "section",
127
+ {
128
+ id,
129
+ className: clsx(formContainer({ variant, formType })),
130
+ children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsx(FormProvider, { ...methods, children: /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
131
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant, formType })), children: [
132
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h4", { children: "COMPANY INFORMATION" }) }) }),
133
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
134
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
135
+ Input,
136
+ {
137
+ id: "name/0-2",
138
+ ...register("name/0-2", { required: true }),
139
+ sizes: "medium",
140
+ placeholder: "Company Name",
141
+ required: true,
142
+ error: !!errors["name/0-2"],
143
+ helperText: errors["name/0-2"]?.message,
144
+ variant
145
+ }
146
+ ) }),
147
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
148
+ Input,
149
+ {
150
+ id: "dba/0-2",
151
+ ...register("dba/0-2", { required: false }),
152
+ placeholder: "DBA",
153
+ sizes: "medium",
154
+ required: false,
155
+ variant
156
+ }
157
+ ) })
158
+ ] }),
159
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
160
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
161
+ InputPhone,
162
+ {
163
+ id: "phone/0-2",
164
+ ...register("phone/0-2", { required: true }),
165
+ placeholder: "Phone Number",
166
+ sizes: "medium",
167
+ required: true,
168
+ type: "tel",
169
+ error: !!errors["phone/0-2"],
170
+ helperText: errors["phone/0-2"]?.message,
171
+ variant
172
+ }
173
+ ) }),
174
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
175
+ Input,
176
+ {
177
+ id: "website/0-2",
178
+ ...register("website/0-2", { required: true }),
179
+ placeholder: "Website URL",
180
+ sizes: "medium",
181
+ required: true,
182
+ error: !!errors["website/0-2"],
183
+ helperText: errors["website/0-2"]?.message,
184
+ variant
185
+ }
186
+ ) })
187
+ ] }),
188
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
189
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
190
+ Input,
191
+ {
192
+ id: "address/0-2",
193
+ ...register("address/0-2", { required: true }),
194
+ placeholder: "Street Address",
195
+ sizes: "medium",
196
+ required: true,
197
+ error: !!errors["address/0-2"],
198
+ helperText: errors["address/0-2"]?.message,
199
+ variant
200
+ }
201
+ ) }),
202
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
203
+ Input,
204
+ {
205
+ id: "address2/0-2",
206
+ ...register("address2/0-2", { required: false }),
207
+ placeholder: "Street Address 2",
208
+ sizes: "medium",
209
+ required: false,
210
+ error: !!errors["address2/0-2"],
211
+ helperText: errors["address2/0-2"]?.message,
212
+ variant
213
+ }
214
+ ) })
215
+ ] }),
216
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
217
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
218
+ Input,
219
+ {
220
+ id: "city/0-2",
221
+ ...register("city/0-2", { required: true }),
222
+ placeholder: "City",
223
+ sizes: "medium",
224
+ required: true,
225
+ error: !!errors["city/0-2"],
226
+ helperText: errors["city/0-2"]?.message,
227
+ variant
228
+ }
229
+ ) }),
230
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
231
+ Input,
232
+ {
233
+ id: "state/0-2",
234
+ ...register("state/0-2", { required: true }),
235
+ placeholder: "State/Region",
236
+ sizes: "medium",
237
+ required: true,
238
+ error: !!errors["state/0-2"],
239
+ helperText: errors["state/0-2"]?.message,
240
+ variant
241
+ }
242
+ ) }),
243
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
244
+ Input,
245
+ {
246
+ id: "zip/0-2",
247
+ ...register("zip/0-2", { required: true }),
248
+ placeholder: "ZIP/Postal Code",
249
+ sizes: "medium",
250
+ required: true,
251
+ error: !!errors["zip/0-2"],
252
+ helperText: errors["zip/0-2"]?.message,
253
+ variant
254
+ }
255
+ ) })
256
+ ] }),
257
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
258
+ InputTextArea,
259
+ {
260
+ id: "description/0-2",
261
+ ...register("description/0-2", { required: false }),
262
+ label: "Description of current business (current brands, additional locations, etc.)",
263
+ placeholder: "Description",
264
+ sizes: "medium",
265
+ required: false,
266
+ error: !!errors["description/0-2"],
267
+ helperText: errors["description/0-2"]?.message,
268
+ variant
269
+ }
270
+ ) }) }),
271
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
272
+ Input,
273
+ {
274
+ id: "how_did_you_hear_about_us_/0-2",
275
+ ...register("how_did_you_hear_about_us_/0-2", {
276
+ required: false
277
+ }),
278
+ placeholder: "How did you hear about us?",
279
+ sizes: "medium",
280
+ required: false,
281
+ error: !!errors["how_did_you_hear_about_us_/0-2"],
282
+ helperText: errors["how_did_you_hear_about_us_/0-2"]?.message,
283
+ variant
284
+ }
285
+ ) }) }),
286
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsxs("div", { className: `${descriptionField({ variant, formType })}`, children: [
287
+ /* @__PURE__ */ jsx("h4", { children: "OWNER INFORMATION" }),
288
+ /* @__PURE__ */ jsx("p", { children: "Include all parties with at least 25% ownership." })
289
+ ] }) }),
290
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "OWNER ONE" }) }) }),
291
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
292
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
293
+ Input,
294
+ {
295
+ id: "owner_name_1/0-2",
296
+ ...register("owner_name_1/0-2", { required: true }),
297
+ placeholder: "Name",
298
+ sizes: "medium",
299
+ required: true,
300
+ error: !!errors["owner_name_1/0-2"],
301
+ helperText: errors["owner_name_1/0-2"]?.message,
302
+ variant
303
+ }
304
+ ) }),
305
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
306
+ Input,
307
+ {
308
+ id: "owner_phone_1/0-2",
309
+ ...register("owner_phone_1/0-2", { required: true }),
310
+ placeholder: "Phone",
311
+ sizes: "medium",
312
+ required: true,
313
+ error: !!errors["owner_phone_1/0-2"],
314
+ helperText: errors["owner_phone_1/0-2"]?.message,
315
+ variant
316
+ }
317
+ ) }),
318
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
319
+ Input,
320
+ {
321
+ id: "owner_email_1/0-2",
322
+ ...register("owner_email_1/0-2", { required: true }),
323
+ placeholder: "Email",
324
+ sizes: "medium",
325
+ required: true,
326
+ error: !!errors["owner_email_1/0-2"],
327
+ helperText: errors["owner_email_1/0-2"]?.message,
328
+ variant
329
+ }
330
+ ) })
331
+ ] }),
332
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "OWNER TWO" }) }) }),
333
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
334
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
335
+ Input,
336
+ {
337
+ id: "owner_name_2/0-2",
338
+ ...register("owner_name_2/0-2", { required: false }),
339
+ placeholder: "Name",
340
+ sizes: "medium",
341
+ required: false,
342
+ error: !!errors["owner_name_2/0-2"],
343
+ helperText: errors["owner_name_2/0-2"]?.message,
344
+ variant
345
+ }
346
+ ) }),
347
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
348
+ Input,
349
+ {
350
+ id: "owner_phone_2/0-2",
351
+ ...register("owner_phone_2/0-2", { required: false }),
352
+ placeholder: "Phone",
353
+ sizes: "medium",
354
+ required: false,
355
+ error: !!errors["owner_phone_2/0-2"],
356
+ helperText: errors["owner_phone_2/0-2"]?.message,
357
+ variant
358
+ }
359
+ ) }),
360
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
361
+ Input,
362
+ {
363
+ id: "owner_email_2/0-2",
364
+ ...register("owner_email_2/0-2", { required: false }),
365
+ placeholder: "Email",
366
+ sizes: "medium",
367
+ required: false,
368
+ error: !!errors["owner_email_2/0-2"],
369
+ helperText: errors["owner_email_2/0-2"]?.message,
370
+ variant
371
+ }
372
+ ) })
373
+ ] }),
374
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "OWNER THREE" }) }) }),
375
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
376
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
377
+ Input,
378
+ {
379
+ id: "owner_name_3/0-2",
380
+ ...register("owner_name_3/0-2", { required: false }),
381
+ placeholder: "Name",
382
+ sizes: "medium",
383
+ required: false,
384
+ error: !!errors["owner_name_3/0-2"],
385
+ helperText: errors["owner_name_3/0-2"]?.message,
386
+ variant
387
+ }
388
+ ) }),
389
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
390
+ Input,
391
+ {
392
+ id: "owner_phone_3/0-2",
393
+ ...register("owner_phone_3/0-2", { required: false }),
394
+ placeholder: "Phone",
395
+ sizes: "medium",
396
+ required: false,
397
+ error: !!errors["owner_phone_3/0-2"],
398
+ helperText: errors["owner_phone_3/0-2"]?.message,
399
+ variant
400
+ }
401
+ ) }),
402
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
403
+ Input,
404
+ {
405
+ id: "owner_email_3/0-2",
406
+ ...register("owner_email_3/0-2", { required: false }),
407
+ placeholder: "Email",
408
+ sizes: "medium",
409
+ required: false,
410
+ error: !!errors["owner_email_3/0-2"],
411
+ helperText: errors["owner_email_3/0-2"]?.message,
412
+ variant
413
+ }
414
+ ) })
415
+ ] }),
416
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "OWNER FOUR" }) }) }),
417
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
418
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
419
+ Input,
420
+ {
421
+ id: "owner_name_4/0-2",
422
+ ...register("owner_name_4/0-2", { required: false }),
423
+ placeholder: "Name",
424
+ sizes: "medium",
425
+ required: false,
426
+ error: !!errors["owner_name_4/0-2"],
427
+ helperText: errors["owner_name_4/0-2"]?.message,
428
+ variant
429
+ }
430
+ ) }),
431
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
432
+ Input,
433
+ {
434
+ id: "owner_phone_4/0-2",
435
+ ...register("owner_phone_4/0-2", { required: false }),
436
+ placeholder: "Phone",
437
+ sizes: "medium",
438
+ required: false,
439
+ error: !!errors["owner_phone_4/0-2"],
440
+ helperText: errors["owner_phone_4/0-2"]?.message,
441
+ variant
442
+ }
443
+ ) }),
444
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
445
+ Input,
446
+ {
447
+ id: "owner_email_4/0-2",
448
+ ...register("owner_email_4/0-2", { required: false }),
449
+ placeholder: "Email",
450
+ sizes: "medium",
451
+ required: false,
452
+ error: !!errors["owner_email_4/0-2"],
453
+ helperText: errors["owner_email_4/0-2"]?.message,
454
+ variant
455
+ }
456
+ ) })
457
+ ] }),
458
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h4", { children: "SALES & FINANCE CONTACTS" }) }) }),
459
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "SALES CONTACT" }) }) }),
460
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
461
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
462
+ Input,
463
+ {
464
+ id: "sales_contact_name/0-2",
465
+ ...register("sales_contact_name/0-2", { required: true }),
466
+ placeholder: "Name",
467
+ sizes: "medium",
468
+ required: true,
469
+ error: !!errors["sales_contact_name/0-2"],
470
+ helperText: errors["sales_contact_name/0-2"]?.message,
471
+ variant
472
+ }
473
+ ) }),
474
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
475
+ Input,
476
+ {
477
+ id: "sales_contact_phone/0-2",
478
+ ...register("sales_contact_phone/0-2", { required: true }),
479
+ placeholder: "Phone",
480
+ sizes: "medium",
481
+ required: true,
482
+ error: !!errors["sales_contact_phone/0-2"],
483
+ helperText: errors["sales_contact_phone/0-2"]?.message,
484
+ variant
485
+ }
486
+ ) }),
487
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
488
+ Input,
489
+ {
490
+ id: "sales_contact_email/0-2",
491
+ ...register("sales_contact_email/0-2", { required: true }),
492
+ placeholder: "Email",
493
+ sizes: "medium",
494
+ required: true,
495
+ error: !!errors["sales_contact_email/0-2"],
496
+ helperText: errors["sales_contact_email/0-2"]?.message,
497
+ variant
498
+ }
499
+ ) })
500
+ ] }),
501
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "FINANCE CONTACT" }) }) }),
502
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
503
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
504
+ Input,
505
+ {
506
+ id: "finance_contact_name/0-2",
507
+ ...register("finance_contact_name/0-2", {
508
+ required: true
509
+ }),
510
+ placeholder: "Name",
511
+ sizes: "medium",
512
+ required: true,
513
+ error: !!errors["finance_contact_name/0-2"],
514
+ helperText: errors["finance_contact_name/0-2"]?.message,
515
+ variant
516
+ }
517
+ ) }),
518
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
519
+ Input,
520
+ {
521
+ id: "finance_contact_phone/0-2",
522
+ ...register("finance_contact_phone/0-2", {
523
+ required: true
524
+ }),
525
+ placeholder: "Phone",
526
+ sizes: "medium",
527
+ required: true,
528
+ error: !!errors["finance_contact_phone/0-2"],
529
+ helperText: errors["finance_contact_phone/0-2"]?.message,
530
+ variant
531
+ }
532
+ ) }),
533
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
534
+ Input,
535
+ {
536
+ id: "finance_contact_email/0-2",
537
+ ...register("finance_contact_email/0-2", {
538
+ required: true
539
+ }),
540
+ placeholder: "Email",
541
+ sizes: "medium",
542
+ required: true,
543
+ error: !!errors["finance_contact_email/0-2"],
544
+ helperText: errors["finance_contact_email/0-2"]?.message,
545
+ variant
546
+ }
547
+ ) })
548
+ ] }),
549
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h4", { children: "CORPORATE INFORMATION" }) }) }),
550
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
551
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
552
+ Input,
553
+ {
554
+ id: "type_of_organization/0-2",
555
+ ...register("type_of_organization/0-2", {
556
+ required: true
557
+ }),
558
+ placeholder: "Type of Organization",
559
+ sizes: "medium",
560
+ required: true,
561
+ error: !!errors["type_of_organization/0-2"],
562
+ helperText: errors["type_of_organization/0-2"]?.message,
563
+ variant
564
+ }
565
+ ) }),
566
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
567
+ Input,
568
+ {
569
+ id: "founded_year/0-2",
570
+ ...register("founded_year/0-2", { required: true }),
571
+ placeholder: "Year Founded",
572
+ sizes: "medium",
573
+ required: true,
574
+ error: !!errors["founded_year/0-2"],
575
+ helperText: errors["founded_year/0-2"]?.message,
576
+ variant
577
+ }
578
+ ) })
579
+ ] }),
580
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "OFFICERS, DIRECTORS, MEMBERS OR PARTNERS" }) }) }),
581
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
582
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
583
+ Input,
584
+ {
585
+ id: "officer_name_1/0-2",
586
+ ...register("officer_name_1/0-2", { required: true }),
587
+ placeholder: "Name",
588
+ sizes: "medium",
589
+ required: true,
590
+ error: !!errors["officer_name_1/0-2"],
591
+ helperText: errors["officer_name_1/0-2"]?.message,
592
+ variant
593
+ }
594
+ ) }),
595
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
596
+ Input,
597
+ {
598
+ id: "officer_title_1/0-2",
599
+ ...register("officer_title_1/0-2", { required: true }),
600
+ placeholder: "Title",
601
+ sizes: "medium",
602
+ required: true,
603
+ error: !!errors["officer_title_1/0-2"],
604
+ helperText: errors["officer_title_1/0-2"]?.message,
605
+ variant
606
+ }
607
+ ) })
608
+ ] }),
609
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
610
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
611
+ Input,
612
+ {
613
+ id: "officer_name_2/0-2",
614
+ ...register("officer_name_2/0-2", { required: false }),
615
+ placeholder: "Name",
616
+ sizes: "medium",
617
+ required: false,
618
+ error: !!errors["officer_name_2/0-2"],
619
+ helperText: errors["officer_name_2/0-2"]?.message,
620
+ variant
621
+ }
622
+ ) }),
623
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
624
+ Input,
625
+ {
626
+ id: "officer_title_2/0-2",
627
+ ...register("officer_title_2/0-2", { required: false }),
628
+ placeholder: "Title",
629
+ sizes: "medium",
630
+ required: false,
631
+ error: !!errors["officer_title_2/0-2"],
632
+ helperText: errors["officer_title_2/0-2"]?.message,
633
+ variant
634
+ }
635
+ ) })
636
+ ] }),
637
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
638
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
639
+ Input,
640
+ {
641
+ id: "officer_name_3/0-2",
642
+ ...register("officer_name_3/0-2", { required: false }),
643
+ placeholder: "Name",
644
+ sizes: "medium",
645
+ required: false,
646
+ error: !!errors["officer_name_3/0-2"],
647
+ helperText: errors["officer_name_3/0-2"]?.message,
648
+ variant
649
+ }
650
+ ) }),
651
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
652
+ Input,
653
+ {
654
+ id: "officer_title_3/0-2",
655
+ ...register("officer_title_3/0-2", { required: false }),
656
+ placeholder: "Title",
657
+ sizes: "medium",
658
+ required: false,
659
+ error: !!errors["officer_title_3/0-2"],
660
+ helperText: errors["officer_title_3/0-2"]?.message,
661
+ variant
662
+ }
663
+ ) })
664
+ ] }),
665
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h4", { children: "INSURANCE INFORMATION" }) }) }),
666
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
667
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
668
+ Input,
669
+ {
670
+ id: "name_of_insurer/0-2",
671
+ ...register("name_of_insurer/0-2", { required: true }),
672
+ placeholder: "Insurer Name",
673
+ sizes: "medium",
674
+ required: true,
675
+ error: !!errors["name_of_insurer/0-2"],
676
+ helperText: errors["name_of_insurer/0-2"]?.message,
677
+ variant
678
+ }
679
+ ) }),
680
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
681
+ Input,
682
+ {
683
+ id: "insurer_phone/0-2",
684
+ ...register("insurer_phone/0-2", { required: true }),
685
+ placeholder: "Phone",
686
+ sizes: "medium",
687
+ required: true,
688
+ error: !!errors["insurer_phone/0-2"],
689
+ helperText: errors["insurer_phone/0-2"]?.message,
690
+ variant
691
+ }
692
+ ) }),
693
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
694
+ Input,
695
+ {
696
+ id: "insurer_email/0-2",
697
+ ...register("insurer_email/0-2", { required: true }),
698
+ placeholder: "Email",
699
+ sizes: "medium",
700
+ required: true,
701
+ error: !!errors["insurer_email/0-2"],
702
+ helperText: errors["insurer_email/0-2"]?.message,
703
+ variant
704
+ }
705
+ ) })
706
+ ] }),
707
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h4", { children: "FORECASTED BUSINESS" }) }) }),
708
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
709
+ InputTextArea,
710
+ {
711
+ id: "forecasted_business/0-2",
712
+ ...register("forecasted_business/0-2", {
713
+ required: false
714
+ }),
715
+ label: "Brands and anticipated volume.",
716
+ placeholder: "Forecasted Business",
717
+ sizes: "medium",
718
+ required: false,
719
+ error: !!errors["forecasted_business/0-2"],
720
+ helperText: errors["forecasted_business/0-2"]?.message,
721
+ variant
722
+ }
723
+ ) }) }),
724
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
725
+ InputTextArea,
726
+ {
727
+ id: "forecasted_business_comments/0-2",
728
+ ...register("forecasted_business_comments/0-2", {
729
+ required: false
730
+ }),
731
+ label: "Tell us what’s important to you.",
732
+ placeholder: "Comments",
733
+ sizes: "medium",
734
+ required: false,
735
+ error: !!errors["forecasted_business_comments/0-2"],
736
+ helperText: errors["forecasted_business_comments/0-2"]?.message,
737
+ variant
738
+ }
739
+ ) }) }),
740
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsxs("div", { className: `${descriptionField({ variant, formType })}`, children: [
741
+ /* @__PURE__ */ jsx("h4", { children: "SECURITY POLICY" }),
742
+ /* @__PURE__ */ jsx("p", { children: "In lieu of the questions below, you may attach a copy of your existing policy. Please indicate how you protect customer Non-Public Information when communicating with LaVictoire, or once in receipt of Customer Information." })
743
+ ] }) }),
744
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "IN TRANSIT" }) }) }),
745
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
746
+ InputTextArea,
747
+ {
748
+ id: "security_transit_approval_documents/0-2",
749
+ ...register("security_transit_approval_documents/0-2", {
750
+ required: true
751
+ }),
752
+ label: "When submitting applications and sharing miscellaneous documents during the approval process.",
753
+ sizes: "medium",
754
+ placeholder: "Approval Documents",
755
+ required: true,
756
+ error: !!errors["security_transit_approval_documents/0-2"],
757
+ helperText: errors["security_transit_approval_documents/0-2"]?.message,
758
+ variant
759
+ }
760
+ ) }) }),
761
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
762
+ InputTextArea,
763
+ {
764
+ id: "security_transit_closing_documents/0-2",
765
+ ...register("security_transit_closing_documents/0-2", {
766
+ required: true
767
+ }),
768
+ label: "When sharing closing and USCG documents, if applicable.",
769
+ sizes: "medium",
770
+ placeholder: "Closing Documents",
771
+ required: true,
772
+ error: !!errors["security_transit_closing_documents/0-2"],
773
+ helperText: errors["security_transit_closing_documents/0-2"]?.message,
774
+ variant
775
+ }
776
+ ) }) }),
777
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "AT REST" }) }) }),
778
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
779
+ InputTextArea,
780
+ {
781
+ id: "security_rest_electronic/0-2",
782
+ ...register("security_rest_electronic/0-2", {
783
+ required: true
784
+ }),
785
+ label: "Where are ELECTRONIC loan applications and closing documents saved, and how are they protected?",
786
+ sizes: "medium",
787
+ placeholder: "Electronic Documents",
788
+ required: true,
789
+ error: !!errors["security_rest_electronic/0-2"],
790
+ helperText: errors["security_rest_electronic/0-2"]?.message,
791
+ variant
792
+ }
793
+ ) }) }),
794
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
795
+ InputTextArea,
796
+ {
797
+ id: "security_rest_paper/0-2",
798
+ ...register("security_rest_paper/0-2", { required: true }),
799
+ label: "Where are PAPER loan applications and closing documents saved, and how are they protected? Is there an alarm system on the premises?",
800
+ sizes: "medium",
801
+ required: true,
802
+ placeholder: "Paper Documents",
803
+ error: !!errors["security_rest_paper/0-2"],
804
+ helperText: errors["security_rest_paper/0-2"]?.message,
805
+ variant
806
+ }
807
+ ) }) }),
808
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h5", { children: "AT TIME OF DISPOSAL" }) }) }),
809
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
810
+ InputTextArea,
811
+ {
812
+ id: "security_time_of_disposal_paper/0-2",
813
+ ...register("security_time_of_disposal_paper/0-2", {
814
+ required: true
815
+ }),
816
+ label: "How long do you retain paper documents, and how does your company dispose of them?",
817
+ sizes: "medium",
818
+ required: true,
819
+ placeholder: "Paper Disposal",
820
+ error: !!errors["security_time_of_disposal_paper/0-2"],
821
+ helperText: errors["security_time_of_disposal_paper/0-2"]?.message,
822
+ variant
823
+ }
824
+ ) }) }),
825
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
826
+ InputTextArea,
827
+ {
828
+ id: "security_time_of_disposal_electronic/0-2",
829
+ ...register("security_time_of_disposal_electronic/0-2", {
830
+ required: true
831
+ }),
832
+ label: "When you upgrade or dispose of company computers, how do you remove the customer confidential data?  Does your company have IT personnel wipe the hard drives and destroy prior to disposal?",
833
+ sizes: "medium",
834
+ required: true,
835
+ placeholder: "Electronic Disposal",
836
+ error: !!errors["security_time_of_disposal_electronic/0-2"],
837
+ helperText: errors["security_time_of_disposal_electronic/0-2"]?.message,
838
+ variant
839
+ }
840
+ ) }) }),
841
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsxs("div", { className: `${descriptionField({ variant, formType })}`, children: [
842
+ /* @__PURE__ */ jsx("p", { children: "I am submitting this Vendor Questionnaire on behalf of the business named herein. I certify that I made no misrepresentation in this Vendor Questionnaire or in any related documents, that all information is true and complete, that I did not omit any important information, and that I am obligated to amend and/or supplement the information provided in this Questionnaire if any of the material facts represented herein should change. Lender is authorized to verify with other parties and to make any investigation of our Business, either directly or through any agency employed by the Lender for that purpose. I understand that Lender will retain this Questionnaire and any other information Lender receives, even if a mutual Agreement is not obtained." }),
843
+ /* @__PURE__ */ jsx("p", { children: "The transmission of this application as an “electronic record” containing my “electronic signature,” as those terms are defined in applicable federal and/or state laws, shall be as effective, enforceable and valid as if a paper version of this application were delivered containing my original written signature." })
844
+ ] }) }),
845
+ /* @__PURE__ */ jsx("div", { className: `${form_row}`, children: /* @__PURE__ */ jsx("div", { className: `${descriptionField({ variant, formType })}`, children: /* @__PURE__ */ jsx("h4", { children: "AUTHORIZED REPRESENTATIVE" }) }) }),
846
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
847
+ Input,
848
+ {
849
+ id: "company/0-1",
850
+ ...register("company/0-1", { required: true }),
851
+ placeholder: "Company Name",
852
+ sizes: "medium",
853
+ required: true,
854
+ error: !!errors["company/0-1"],
855
+ helperText: errors["company/0-1"]?.message,
856
+ variant
857
+ }
858
+ ) }) }),
859
+ /* @__PURE__ */ jsxs("div", { className: form_row, children: [
860
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
861
+ Input,
862
+ {
863
+ id: "firstname/0-1",
864
+ ...register("firstname/0-1", { required: true }),
865
+ placeholder: "First Name",
866
+ sizes: "medium",
867
+ required: true,
868
+ error: !!errors["firstname/0-1"],
869
+ helperText: errors["firstname/0-1"]?.message,
870
+ variant
871
+ }
872
+ ) }),
873
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
874
+ Input,
875
+ {
876
+ id: "lastname/0-1",
877
+ ...register("lastname/0-1", { required: true }),
878
+ placeholder: "Last Name",
879
+ sizes: "medium",
880
+ required: true,
881
+ error: !!errors["lastname/0-1"],
882
+ helperText: errors["lastname/0-1"]?.message,
883
+ variant
884
+ }
885
+ ) }),
886
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
887
+ Input,
888
+ {
889
+ id: "jobtitle/0-1",
890
+ ...register("jobtitle/0-1", { required: true }),
891
+ placeholder: "Job Title",
892
+ sizes: "medium",
893
+ required: true,
894
+ error: !!errors["jobtitle/0-1"],
895
+ helperText: errors["jobtitle/0-1"]?.message,
896
+ variant
897
+ }
898
+ ) })
899
+ ] }),
900
+ /* @__PURE__ */ jsx("div", { className: form_row, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
901
+ Input,
902
+ {
903
+ id: "email/0-1",
904
+ ...register("email/0-1", { required: true }),
905
+ placeholder: "Email",
906
+ sizes: "medium",
907
+ required: true,
908
+ error: !!errors["email/0-1"],
909
+ helperText: errors["email/0-1"]?.message,
910
+ variant
911
+ }
912
+ ) }) })
913
+ ] }),
914
+ children,
915
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
916
+ Button,
917
+ {
918
+ color: getVariant(callToAction?.variant),
919
+ as: "button",
920
+ type: "submit",
921
+ disabled: !isValid,
922
+ children: callToAction?.displayText
923
+ }
924
+ ) })
925
+ ] }) }) })
926
+ },
927
+ id
928
+ );
929
+ };
930
+ export {
931
+ VendorQuestionnaire
932
+ };