bhl-forms 0.7.0 → 0.7.1

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 (85) hide show
  1. package/dist/forms/accidentsAndInjuries.es.js +49 -26
  2. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  3. package/dist/forms/accidentsAndInjuries.json +1 -1
  4. package/dist/forms/business.es.js +50 -31
  5. package/dist/forms/business.iife.js +1 -1
  6. package/dist/forms/business.json +1 -1
  7. package/dist/forms/childAndFamily.es.js +48 -26
  8. package/dist/forms/childAndFamily.iife.js +1 -1
  9. package/dist/forms/childAndFamily.json +1 -1
  10. package/dist/forms/childAndFamilySingle.es.js +50 -31
  11. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  12. package/dist/forms/childAndFamilySingle.json +1 -1
  13. package/dist/forms/civilLawsuit.es.js +50 -31
  14. package/dist/forms/civilLawsuit.iife.js +1 -1
  15. package/dist/forms/civilLawsuit.json +1 -1
  16. package/dist/forms/contracts.es.js +48 -26
  17. package/dist/forms/contracts.iife.js +1 -1
  18. package/dist/forms/contracts.json +1 -1
  19. package/dist/forms/criminal.es.js +50 -31
  20. package/dist/forms/criminal.iife.js +1 -1
  21. package/dist/forms/criminal.json +1 -1
  22. package/dist/forms/divorce.es.js +50 -31
  23. package/dist/forms/divorce.iife.js +1 -1
  24. package/dist/forms/divorce.json +1 -1
  25. package/dist/forms/employmentAndWorkplace.es.js +50 -31
  26. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  27. package/dist/forms/employmentAndWorkplace.json +1 -1
  28. package/dist/forms/generalHomeImprovement.es.js +61 -270
  29. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  30. package/dist/forms/generalHomeImprovement.json +1 -1
  31. package/dist/forms/generalLegal.es.js +85 -46
  32. package/dist/forms/generalLegal.iife.js +1 -1
  33. package/dist/forms/generalLegal.json +1 -1
  34. package/dist/forms/generalLegalJustAnswer.es.js +73 -65
  35. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  36. package/dist/forms/generalLegalJustAnswer.json +1 -1
  37. package/dist/forms/generalLegalPopUnder.es.js +85 -46
  38. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  39. package/dist/forms/generalLegalPopUnder.json +1 -1
  40. package/dist/forms/generalLegalPopUnderSingle.es.js +73 -65
  41. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  42. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  43. package/dist/forms/generalLegalSingle.es.js +73 -65
  44. package/dist/forms/generalLegalSingle.iife.js +1 -1
  45. package/dist/forms/generalLegalSingle.json +1 -1
  46. package/dist/forms/generalLegalThankYou.es.js +85 -46
  47. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  48. package/dist/forms/generalLegalThankYou.json +1 -1
  49. package/dist/forms/generalLegalThankYouConsultation.es.js +73 -65
  50. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  51. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  52. package/dist/forms/harassmentAndDiscrimination.es.js +48 -26
  53. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  54. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  55. package/dist/forms/landlordTenant.es.js +50 -31
  56. package/dist/forms/landlordTenant.iife.js +1 -1
  57. package/dist/forms/landlordTenant.json +1 -1
  58. package/dist/forms/malpractice.es.js +48 -26
  59. package/dist/forms/malpractice.iife.js +1 -1
  60. package/dist/forms/malpractice.json +1 -1
  61. package/dist/forms/mechanics.es.js +30 -18
  62. package/dist/forms/mechanics.iife.js +1 -1
  63. package/dist/forms/mechanics.json +1 -1
  64. package/dist/forms/patentsAndIP.es.js +50 -31
  65. package/dist/forms/patentsAndIP.iife.js +1 -1
  66. package/dist/forms/patentsAndIP.json +1 -1
  67. package/dist/forms/realEstate.es.js +85 -46
  68. package/dist/forms/realEstate.iife.js +1 -1
  69. package/dist/forms/realEstate.json +1 -1
  70. package/dist/forms/repossession.es.js +48 -26
  71. package/dist/forms/repossession.iife.js +1 -1
  72. package/dist/forms/repossession.json +1 -1
  73. package/dist/forms/ssdi.es.js +47 -32
  74. package/dist/forms/ssdi.iife.js +1 -1
  75. package/dist/forms/ssdi.json +1 -1
  76. package/dist/forms/testForm.es.js +28 -13
  77. package/dist/forms/testForm.iife.js +1 -1
  78. package/dist/forms/testForm.json +1 -1
  79. package/dist/forms/testRedirects.es.js +28 -13
  80. package/dist/forms/testRedirects.iife.js +1 -1
  81. package/dist/forms/testRedirects.json +1 -1
  82. package/dist/forms/willsAndTrusts.es.js +48 -26
  83. package/dist/forms/willsAndTrusts.iife.js +1 -1
  84. package/dist/forms/willsAndTrusts.json +1 -1
  85. package/package.json +1 -1
@@ -297,6 +297,7 @@ const verticalText = (updates) => {
297
297
  updates.wrapperClass = 't-flex t-justify-center';
298
298
  updates.messagesClass = 't-flex t-justify-center';
299
299
  updates.inputClass = 't-text-center';
300
+ updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
300
301
  return text(updates)
301
302
  };
302
303
 
@@ -396,71 +397,78 @@ const phone = (scope) => sbsText({
396
397
  helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
397
398
  });
398
399
 
399
- const zipcodeCenter = (updates = {}, scope) => text({
400
- placeholder: '#####',
401
- help: updates.help ?? "We try to match you with local help",
402
- name: scope ? scope + ':' + 'Zip' : 'Zip',
403
- maxlength: 5,
404
- inputmode: "numeric",
405
- autocomplete: 'postal-code',
406
- validation: 'required|matches:/^[0-9]{5}$/',
407
- validationMessages: {
408
- required: 'Zip Code is required',
409
- matches: 'Invalid Zip Code'
410
- },
411
- wrapperClass: 't-flex t-justify-center',
412
- messagesClass: 't-flex t-justify-center',
413
- inputClass: 't-text-center',
414
- helpClass: 't-mt-2.5 !t-text-sm t-text-center'
415
- });
416
400
 
417
- const amountPaymentsPastDueCenter = () => verticalSelect({
418
- name: 'Amount_Payments_Past_Due',
419
- options: [
420
- "$0 - $499",
421
- "$500 - $999",
422
- "$1,000 - $2,499",
423
- "$2,500 - $4,999",
424
- "$5,000 - $9,999",
425
- "$10,000 - $24,999",
426
- "$25,000 - $49,999",
427
- "$50,000 - $99,999",
428
- "More than $100,000"
429
- ]
430
- });
401
+ const zipcode$1 = (scope, vertical, updates = {}) => {
402
+ const func = vertical ? verticalText : sbsText;
403
+ const label = vertical ? (updates.label) : 'Zip Code:';
404
+ const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
405
+ return func({
406
+ label,
407
+ help,
408
+ placeholder: '#####',
409
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
410
+ maxlength: 5,
411
+ inputmode: "numeric",
412
+ autocomplete: 'postal-code',
413
+ validation: 'required|matches:/^[0-9]{5}$/',
414
+ validationMessages: {
415
+ required: 'Zip Code is required',
416
+ matches: 'Invalid Zip Code'
417
+ },
418
+ ...updates
419
+ })
420
+ };
431
421
 
432
- const applicantOccupationCenter = (scope) => verticalText({
433
- name: scope ? scope + ':' + 'Applicant_Occupation' : 'Applicant_Occupation',
434
- placeholder: "Occupation"
435
- });
422
+ const amountPaymentsPastDue$1 = (scope, vertical, updates = {}) => {
423
+ const func = vertical ? verticalSelect : sbsSelect;
424
+ const label = vertical ? (updates.label) : 'Total Amount of Payments that are Past Due:';
425
+ return func(merge({
426
+ label,
427
+ name: scope ? scope + ':' + 'Amount_Payments_Past_Due' : 'Amount_Payments_Past_Due',
428
+ options: [
429
+ "$0 - $499",
430
+ "$500 - $999",
431
+ "$1,000 - $2,499",
432
+ "$2,500 - $4,999",
433
+ "$5,000 - $9,999",
434
+ "$10,000 - $24,999",
435
+ "$25,000 - $49,999",
436
+ "$50,000 - $99,999",
437
+ "More than $100,000"
438
+ ]
439
+ }, updates))
440
+ };
436
441
 
437
- const applicantAge$1 = (scope) => sbsText({
438
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
439
- label: 'Age of Applicant?',
440
- placeholder: 'Age between 18 and 65',
441
- maxlength: 2,
442
- inputmode: "numeric",
443
- validation: "required|min:18,max:65",
444
- validationMessages: {
445
- required: 'Applicant Age is required',
446
- min: 'Invalid Age - must be between 18 and 65',
447
- max: 'Invalid Age - must be between 18 and 65',
448
- }
449
- });
442
+ const applicantOccupation$1 = (scope, vertical, updates = {}) => {
443
+ const func = vertical ? verticalText : sbsText;
444
+ const label = vertical ? (updates.label) : "What is the Applicant's Occupation?";
445
+ return func(merge({
446
+ label,
447
+ placeholder: "Occupation",
448
+ name: scope ? scope + ':' + 'Applicant_Occupation' : 'Applicant_Occupation',
449
+ }, updates))
450
+ };
450
451
 
451
- const applicantAgeCenter = (scope) => verticalText({
452
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
453
- value: "50",
454
- placeholder: 'Age between 18 and 65',
455
- maxlength: 2,
456
- inputmode: "numeric",
457
- validation: "required|min:18,max:65",
458
- validationMessages: {
459
- required: 'Applicant Age is required',
460
- min: 'Invalid Age - must be between 18 and 65',
461
- max: 'Invalid Age - must be between 18 and 65',
462
- },
463
- });
452
+ const applicantAge$1 = (scope, vertical, updates = {}) => {
453
+ const func = vertical ? verticalText : sbsText;
454
+ const label = vertical ? (updates.label) : 'Age of Applicant?';
455
+ const value = vertical ? (updates.value ?? "50") : null;
456
+ return func(merge({
457
+ label,
458
+ placeholder: 'Age between 18 and 65',
459
+ name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
460
+ value,
461
+ maxlength: 2,
462
+ inputmode: "numeric",
463
+ validation: "required|min:18,max:65",
464
+ validationMessages: {
465
+ required: 'Applicant Age is required',
466
+ min: 'Invalid Age - must be between 18 and 65',
467
+ max: 'Invalid Age - must be between 18 and 65',
468
+ },
469
+ ...updates
470
+ }))
471
+ };
464
472
 
465
473
  const applicantDisabilityHowObtainCenter = (scope) => verticalButtonRadio({
466
474
  name: scope ? scope + ':' + 'Applicant_Disability_How_Obtain' : 'Applicant_Disability_How_Obtain',
@@ -2228,7 +2236,7 @@ function firstAndLastV3(updates = {}, scope) {
2228
2236
  function zipcode(updates = {}) {
2229
2237
  return sqstep(
2230
2238
  'zipcode',
2231
- zipcodeCenter(updates, updates.scope),
2239
+ zipcode$1(updates.scope, true, updates),
2232
2240
  'Please verify your Zip Code',
2233
2241
  updates
2234
2242
  )
@@ -2823,7 +2831,7 @@ function haveCourtDate(updates = {}) {
2823
2831
  function applicantOccupation(updates = {}) {
2824
2832
  return sqstep(
2825
2833
  'applicantOccupation',
2826
- applicantOccupationCenter(),
2834
+ applicantOccupation$1(updates.scope, true, updates),
2827
2835
  'What is the applicant\'s occupation?',
2828
2836
  updates
2829
2837
  )
@@ -2832,7 +2840,7 @@ function applicantOccupation(updates = {}) {
2832
2840
  function applicantAge(updates = {}) {
2833
2841
  return sqstep(
2834
2842
  'applicantAge',
2835
- applicantAgeCenter(),
2843
+ applicantAge$1(updates.scope, true, updates),
2836
2844
  'What is the applicant\'s age?',
2837
2845
  updates
2838
2846
  )
@@ -2970,7 +2978,7 @@ function typeOfProperty(updates = {}) {
2970
2978
  function amountPaymentsPastDue(updates = {}) {
2971
2979
  return sqstep(
2972
2980
  'amountPaymentsPastDue',
2973
- amountPaymentsPastDueCenter(),
2981
+ amountPaymentsPastDue$1(updates.scope, true),
2974
2982
  'Total amount of payments past due:',
2975
2983
  updates
2976
2984
  )