@gusto/embedded-react-sdk 0.48.0 → 0.48.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 (177) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/components/Common/EmptyData/EmptyData.d.ts +1 -1
  3. package/dist/components/Common/EmptyData/EmptyData.js +10 -12
  4. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  5. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -10
  6. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  7. package/dist/components/Common/Form/Form.d.ts +1 -1
  8. package/dist/components/Common/Form/Form.js +8 -7
  9. package/dist/components/Common/Form/Form.js.map +1 -1
  10. package/dist/components/Common/UI/Card/Card.js +8 -8
  11. package/dist/components/Common/UI/Card/Card.js.map +1 -1
  12. package/dist/components/Common/UI/Card/Card.module.scss.js +5 -3
  13. package/dist/components/Common/UI/Card/Card.module.scss.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -13
  15. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -17
  16. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -17
  18. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -19
  20. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  21. package/dist/components/Company/BankAccount/BankAccount.js +6 -7
  22. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  23. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -17
  24. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  25. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -17
  26. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  27. package/dist/components/Company/DocumentSigner/DocumentSigner.js +2 -3
  28. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  29. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  30. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -26
  31. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  32. package/dist/components/Company/Industry/Context.js +6 -20
  33. package/dist/components/Company/Industry/Context.js.map +1 -1
  34. package/dist/components/Company/Industry/IndustrySelect.js +6 -8
  35. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  36. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -17
  37. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  38. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -17
  39. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  40. package/dist/components/Company/OnboardingOverview/context.js +4 -18
  41. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  42. package/dist/components/Company/PaySchedule/PayScheduleForm.js +5 -4
  43. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  44. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -17
  46. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -17
  48. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  49. package/dist/components/Contractor/Address/useAddress.js +5 -19
  50. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  51. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +2 -3
  52. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  53. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +2 -3
  54. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  55. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  56. package/dist/components/Contractor/Profile/useContractorProfile.js +39 -48
  57. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  58. package/dist/components/Employee/Compensation/management/Compensation.js +2 -3
  59. package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
  60. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js +8 -9
  61. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
  62. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js +2 -3
  63. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
  64. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +2 -3
  65. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  66. package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +2 -3
  67. package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
  68. package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.js +2 -3
  69. package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.js.map +1 -1
  70. package/dist/components/Employee/Compensation/onboarding/Compensation.js +2 -3
  71. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  72. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +2 -3
  73. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  74. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +6 -6
  75. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +10 -10
  76. package/dist/components/Employee/Deductions/management/Deductions.js +2 -3
  77. package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
  78. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +2 -3
  79. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
  80. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +1 -1
  81. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +2 -2
  82. package/dist/components/Employee/Documents/management/Documents.js +2 -3
  83. package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
  84. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -17
  85. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  86. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +11 -12
  87. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  88. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +16 -16
  89. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -1
  90. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  91. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js +3 -1
  92. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  93. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +2 -2
  94. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +9 -10
  95. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
  96. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +2 -3
  97. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  98. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +8 -9
  99. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  100. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +13 -14
  101. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
  102. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +1 -1
  103. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +2 -3
  104. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  105. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +6 -7
  106. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
  107. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +6 -7
  108. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
  109. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  110. package/dist/components/Employee/Profile/management/Profile.js +11 -12
  111. package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
  112. package/dist/components/Employee/Profile/management/ProfileEditForm.js +12 -13
  113. package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
  114. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +10 -11
  115. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  116. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +2 -3
  117. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
  118. package/dist/components/Employee/Profile/onboarding/Profile.js +11 -12
  119. package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
  120. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  121. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +6 -6
  122. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  123. package/dist/components/Employee/StateTaxes/management/StateTaxes.js +9 -10
  124. package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
  125. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +6 -7
  126. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
  127. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +2 -3
  128. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
  129. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +2 -3
  130. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  131. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  132. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +10 -10
  133. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +6 -7
  134. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  135. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +7 -8
  136. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  137. package/dist/components/InformationRequests/InformationRequests.js +7 -8
  138. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  139. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +16 -17
  140. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  141. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +2 -3
  142. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  143. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -8
  144. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +0 -1
  145. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  146. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +25 -34
  147. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  148. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
  149. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +2 -3
  150. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  151. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +6 -7
  152. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  153. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +6 -7
  154. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  155. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
  156. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  157. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +10 -10
  158. package/dist/components/Payroll/usePreparedPayrollData.js +22 -33
  159. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  160. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +2 -3
  161. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  162. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +2 -3
  163. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  164. package/dist/components/TimeOff/PolicyList/PolicyList.js +2 -3
  165. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  166. package/dist/i18n/en/common.json.d.ts +0 -1
  167. package/dist/i18n/en/common.json.js +2 -2
  168. package/dist/node_modules/react-dnd/dist/core/DndProvider.js +1 -1
  169. package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -1
  170. package/dist/partner-hook-utils/composeErrorHandler.js +3 -1
  171. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
  172. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +1 -1
  173. package/dist/style.css +1 -1
  174. package/dist/types/i18next.d.ts +0 -1
  175. package/package.json +19 -7
  176. package/dist/assets/icons/magnifyingGlass.png.js +0 -5
  177. package/dist/assets/icons/magnifyingGlass.png.js.map +0 -1
@@ -1,31 +1,17 @@
1
- import { z as o } from "zod";
2
- import { FilingForm as r, TaxPayerType as e } from "@gusto/embedded-api-v-2025-11-15/models/components/federaltaxdetails";
3
- import "react/jsx-runtime";
4
- import "react";
5
- import "react-error-boundary";
6
- import "react-i18next";
7
- import "@tanstack/react-query";
8
- import "../../Base/useBase.js";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
12
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
13
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
14
- import "../../../shared/constants.js";
15
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
- import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const b = o.object({
19
- federalEin: o.string().optional(),
20
- taxPayerType: o.enum(Object.values(e)).optional(),
21
- filingForm: o.enum(Object.values(r)).optional(),
22
- legalName: o.string().min(1)
23
- }), [j, v] = t(
1
+ import { z as e } from "zod";
2
+ import { FilingForm as o, TaxPayerType as a } from "@gusto/embedded-api-v-2025-11-15/models/components/federaltaxdetails";
3
+ import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
4
+ const i = e.object({
5
+ federalEin: e.string().optional(),
6
+ taxPayerType: e.enum(Object.values(a)).optional(),
7
+ filingForm: e.enum(Object.values(o)).optional(),
8
+ legalName: e.string().min(1)
9
+ }), [l, p] = r(
24
10
  "CompanyFederalTaxesContext"
25
11
  );
26
12
  export {
27
- b as FederalTaxFormSchema,
28
- v as FederalTaxesProvider,
29
- j as useFederalTaxes
13
+ i as FederalTaxFormSchema,
14
+ p as FederalTaxesProvider,
15
+ l as useFederalTaxes
30
16
  };
31
17
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api-v-2025-11-15/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api-v-2025-11-15/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api-v-2025-11-15/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api-v-2025-11-15/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -1,27 +1,13 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-error-boundary";
4
- import "react-i18next";
5
- import "@tanstack/react-query";
6
- import "../../Base/useBase.js";
7
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "../../../shared/constants.js";
13
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
1
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [P, f] = t("IndustryItems", {
2
+ const [s, r] = t("IndustryItems", {
17
3
  items: []
18
- }), [v, x] = t("IndustryApi", {
4
+ }), [n, d] = t("IndustryApi", {
19
5
  isPending: !1
20
6
  });
21
7
  export {
22
- x as IndustryApiStateProvider,
23
- f as IndustryItemsProvider,
24
- v as useIndustryApiState,
25
- P as useIndustryItems
8
+ d as IndustryApiStateProvider,
9
+ r as IndustryItemsProvider,
10
+ n as useIndustryApiState,
11
+ s as useIndustryItems
26
12
  };
27
13
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -17,14 +17,12 @@ function C({
17
17
  }) {
18
18
  const m = h(), { handleSubmit: l, setValue: e } = m, [n, f] = u([]);
19
19
  return i(() => {
20
- (async () => {
21
- f(
22
- (await y()).map(({ title: a, code: d }) => ({
23
- label: a,
24
- value: d
25
- }))
26
- );
27
- })();
20
+ (async () => f(
21
+ (await y()).map(({ title: a, code: d }) => ({
22
+ label: a,
23
+ value: d
24
+ }))
25
+ ))();
28
26
  }, []), i(() => {
29
27
  r && e("naics_code", r);
30
28
  }, [r, e]), /* @__PURE__ */ o(x, { value: { items: n }, children: /* @__PURE__ */ o(v, { ...m, children: /* @__PURE__ */ o(b, { onSubmit: l(s), children: /* @__PURE__ */ o(P, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ p(c, { children: [
@@ -1 +1 @@
1
- {"version":3,"file":"IndustrySelect.js","sources":["../../../../src/components/Company/Industry/IndustrySelect.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport { useState, useEffect } from 'react'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { Actions } from './Actions'\nimport { IndustryItemsProvider } from './Context'\nimport { Edit } from './Edit'\nimport { Head } from './Head'\nimport type { IndustryFormFields } from './Edit'\nimport { Form } from '@/components/Common/Form'\nimport { loadAll } from '@/models/NAICSCodes'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { Flex } from '@/components/Common'\n\ninterface IndustrySelectProps extends PropsWithChildren {\n naics_code?: string | null | undefined\n onValid?: (data: IndustryFormFields) => Promise<void>\n}\n\nexport function IndustrySelect({\n children,\n naics_code,\n onValid = () => Promise.resolve(),\n}: IndustrySelectProps) {\n const formMethods = useForm<IndustryFormFields>()\n const { handleSubmit, setValue } = formMethods\n const [items, setItems] = useState<ComboBoxOption[]>([])\n\n useEffect(() => {\n const loadItems = async () => {\n setItems(\n (await loadAll()).map(({ title, code }) => ({\n label: title,\n value: code,\n })),\n )\n }\n void loadItems()\n }, [])\n\n useEffect(() => {\n if (naics_code) {\n setValue('naics_code', naics_code)\n }\n }, [naics_code, setValue])\n\n return (\n <IndustryItemsProvider value={{ items }}>\n <FormProvider {...formMethods}>\n <Form onSubmit={handleSubmit(onValid)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Edit />\n <Actions />\n </>\n )}\n </Flex>\n </Form>\n </FormProvider>\n </IndustryItemsProvider>\n )\n}\n"],"names":["IndustrySelect","children","naics_code","onValid","formMethods","useForm","handleSubmit","setValue","items","setItems","useState","useEffect","loadAll","title","code","jsx","IndustryItemsProvider","FormProvider","Form","Flex","jsxs","Fragment","Head","Edit","Actions"],"mappings":";;;;;;;;;;;;AAkBO,SAASA,EAAe;AAAA,EAC7B,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU,MAAM,QAAQ,QAAA;AAC1B,GAAwB;AACtB,QAAMC,IAAcC,EAAA,GACd,EAAE,cAAAC,GAAc,UAAAC,EAAA,IAAaH,GAC7B,CAACI,GAAOC,CAAQ,IAAIC,EAA2B,CAAA,CAAE;AAEvD,SAAAC,EAAU,MAAM;AASd,KARkB,YAAY;AAC5B,MAAAF;AAAA,SACG,MAAMG,KAAW,IAAI,CAAC,EAAE,OAAAC,GAAO,MAAAC,SAAY;AAAA,UAC1C,OAAOD;AAAA,UACP,OAAOC;AAAA,QAAA,EACP;AAAA,MAAA;AAAA,IAEN,GACK;AAAA,EACP,GAAG,CAAA,CAAE,GAELH,EAAU,MAAM;AACd,IAAIT,KACFK,EAAS,cAAcL,CAAU;AAAA,EAErC,GAAG,CAACA,GAAYK,CAAQ,CAAC,GAGvB,gBAAAQ,EAACC,GAAA,EAAsB,OAAO,EAAE,OAAAR,EAAA,GAC9B,UAAA,gBAAAO,EAACE,GAAA,EAAc,GAAGb,GAChB,UAAA,gBAAAW,EAACG,GAAA,EAAK,UAAUZ,EAAaH,CAAO,GAClC,UAAA,gBAAAY,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAlB,KAGC,gBAAAmB,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAN,EAACO,GAAA,EAAK;AAAA,sBACLC,GAAA,EAAK;AAAA,sBACLC,GAAA,CAAA,CAAQ;AAAA,EAAA,EAAA,CACX,EAAA,CAEJ,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"IndustrySelect.js","sources":["../../../../src/components/Company/Industry/IndustrySelect.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport { useState, useEffect } from 'react'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { Actions } from './Actions'\nimport { IndustryItemsProvider } from './Context'\nimport { Edit } from './Edit'\nimport { Head } from './Head'\nimport type { IndustryFormFields } from './Edit'\nimport { Form } from '@/components/Common/Form'\nimport { loadAll } from '@/models/NAICSCodes'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { Flex } from '@/components/Common'\n\ninterface IndustrySelectProps extends PropsWithChildren {\n naics_code?: string | null | undefined\n onValid?: (data: IndustryFormFields) => Promise<void>\n}\n\nexport function IndustrySelect({\n children,\n naics_code,\n onValid = () => Promise.resolve(),\n}: IndustrySelectProps) {\n const formMethods = useForm<IndustryFormFields>()\n const { handleSubmit, setValue } = formMethods\n const [items, setItems] = useState<ComboBoxOption[]>([])\n\n useEffect(() => {\n const loadItems = async () => {\n setItems(\n (await loadAll()).map(({ title, code }) => ({\n label: title,\n value: code,\n })),\n )\n }\n void loadItems()\n }, [])\n\n useEffect(() => {\n if (naics_code) {\n setValue('naics_code', naics_code)\n }\n }, [naics_code, setValue])\n\n return (\n <IndustryItemsProvider value={{ items }}>\n <FormProvider {...formMethods}>\n <Form onSubmit={handleSubmit(onValid)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Edit />\n <Actions />\n </>\n )}\n </Flex>\n </Form>\n </FormProvider>\n </IndustryItemsProvider>\n )\n}\n"],"names":["IndustrySelect","children","naics_code","onValid","formMethods","useForm","handleSubmit","setValue","items","setItems","useState","useEffect","loadAll","title","code","jsx","IndustryItemsProvider","FormProvider","Form","Flex","jsxs","Fragment","Head","Edit","Actions"],"mappings":";;;;;;;;;;;;AAkBO,SAASA,EAAe;AAAA,EAC7B,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU,MAAM,QAAQ,QAAA;AAC1B,GAAwB;AACtB,QAAMC,IAAcC,EAAA,GACd,EAAE,cAAAC,GAAc,UAAAC,EAAA,IAAaH,GAC7B,CAACI,GAAOC,CAAQ,IAAIC,EAA2B,CAAA,CAAE;AAEvD,SAAAC,EAAU,MAAM;AASd,KARkB,YAChBF;AAAA,OACG,MAAMG,KAAW,IAAI,CAAC,EAAE,OAAAC,GAAO,MAAAC,SAAY;AAAA,QAC1C,OAAOD;AAAA,QACP,OAAOC;AAAA,MAAA,EACP;AAAA,IAAA;AAAA,EAIR,GAAG,CAAA,CAAE,GAELH,EAAU,MAAM;AACd,IAAIT,KACFK,EAAS,cAAcL,CAAU;AAAA,EAErC,GAAG,CAACA,GAAYK,CAAQ,CAAC,GAGvB,gBAAAQ,EAACC,GAAA,EAAsB,OAAO,EAAE,OAAAR,EAAA,GAC9B,UAAA,gBAAAO,EAACE,GAAA,EAAc,GAAGb,GAChB,UAAA,gBAAAW,EAACG,GAAA,EAAK,UAAUZ,EAAaH,CAAO,GAClC,UAAA,gBAAAY,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAlB,KAGC,gBAAAmB,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAN,EAACO,GAAA,EAAK;AAAA,sBACLC,GAAA,EAAK;AAAA,sBACLC,GAAA,CAAA,CAAQ;AAAA,EAAA,EAAA,CACX,EAAA,CAEJ,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -1,23 +1,9 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-error-boundary";
4
- import "react-i18next";
5
- import "@tanstack/react-query";
6
- import "../../../Base/useBase.js";
7
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "../../../../shared/constants.js";
13
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
1
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [L, f] = o(
2
+ const [r, e] = o(
17
3
  "CompanyDocumentFormContext"
18
4
  );
19
5
  export {
20
- f as LocationsFormProvider,
21
- L as useLocationsForm
6
+ e as LocationsFormProvider,
7
+ r as useLocationsForm
22
8
  };
23
9
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,23 +1,9 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-error-boundary";
4
- import "react-i18next";
5
- import "@tanstack/react-query";
6
- import "../../../Base/useBase.js";
7
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "../../../../shared/constants.js";
13
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
1
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [f, v] = o(
2
+ const [e, n] = o(
17
3
  "CompanyDocumentListContext"
18
4
  );
19
5
  export {
20
- v as LocationsListProvider,
21
- f as useLocationsList
6
+ n as LocationsListProvider,
7
+ e as useLocationsList
22
8
  };
23
9
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api-v-2025-11-15/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api-v-2025-11-15/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";AAoBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,21 +1,7 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-error-boundary";
4
- import "react-i18next";
5
- import "@tanstack/react-query";
6
- import "../../Base/useBase.js";
7
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "../../../shared/constants.js";
13
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
- import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [C, c] = o("OnboardingOverviewContext");
1
+ import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
2
+ const [r, n] = e("OnboardingOverviewContext");
17
3
  export {
18
- c as OnboardingOverviewProvider,
19
- C as useOnboardingOverview
4
+ n as OnboardingOverviewProvider,
5
+ r as useOnboardingOverview
20
6
  };
21
7
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api-v-2025-11-15/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api-v-2025-11-15/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -4,7 +4,6 @@ import { useTranslation as w } from "react-i18next";
4
4
  import { usePayScheduleForm as C } from "./shared/usePayScheduleForm/usePayScheduleForm.js";
5
5
  import m from "./PayScheduleForm.module.scss.js";
6
6
  import { BaseBoundaries as R, BaseLayout as p } from "../../Base/Base.js";
7
- import "../../Base/useBase.js";
8
7
  import { SDKFormProvider as A } from "../../../partner-hook-utils/form/SDKFormProvider.js";
9
8
  import { Form as M } from "../../Common/Form/Form.js";
10
9
  import { Flex as y } from "../../Common/Flex/Flex.js";
@@ -13,7 +12,7 @@ import { ActionsLayout as L } from "../../Common/ActionsLayout/ActionsLayout.js"
13
12
  import { useComponentContext as O } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
13
  import { useDateFormatter as x } from "../../../hooks/useDateFormatter.js";
15
14
  import { componentEvents as u } from "../../../shared/constants.js";
16
- function z({ onEvent: d, ...h }) {
15
+ function V({ onEvent: d, ...h }) {
17
16
  return /* @__PURE__ */ a(R, { componentName: "Company.PayScheduleForm", children: /* @__PURE__ */ a(F, { onEvent: d, ...h }) });
18
17
  }
19
18
  function F({ onEvent: d, ...h }) {
@@ -35,7 +34,9 @@ function F({ onEvent: d, ...h }) {
35
34
  "1st15th": e("frequencyOptions.15thAndLast"),
36
35
  custom: e("frequencyOptions.custom")
37
36
  };
38
- return /* @__PURE__ */ a(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ a(A, { formHookResult: r, children: /* @__PURE__ */ a(M, { onSubmit: () => void D(), children: /* @__PURE__ */ s(y, { flexDirection: "column", children: [
37
+ return /* @__PURE__ */ a(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ a(A, { formHookResult: r, children: /* @__PURE__ */ a(M, { onSubmit: () => {
38
+ D();
39
+ }, children: /* @__PURE__ */ s(y, { flexDirection: "column", children: [
39
40
  /* @__PURE__ */ a(y, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ a("header", { children: /* @__PURE__ */ a(n.Heading, { as: "h2", children: r.status.mode === "create" ? e("headings.addPaySchedule") : e("headings.editPaySchedule") }) }) }),
40
41
  /* @__PURE__ */ a("div", { className: m.payScheduleContainer, children: /* @__PURE__ */ s(q, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
41
42
  /* @__PURE__ */ a("div", { className: m.payScheduleForm, children: /* @__PURE__ */ s(y, { flexDirection: "column", children: [
@@ -181,6 +182,6 @@ function F({ onEvent: d, ...h }) {
181
182
  ] }) }) }) });
182
183
  }
183
184
  export {
184
- z as PayScheduleForm
185
+ V as PayScheduleForm
185
186
  };
186
187
  //# sourceMappingURL=PayScheduleForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayScheduleForm.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { usePayScheduleForm } from './shared/usePayScheduleForm'\nimport type { UsePayScheduleFormProps, PayScheduleFrequency } from './shared/usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleFormProps extends UsePayScheduleFormProps {\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"Company.PayScheduleForm\">\n <PayScheduleFormRoot onEvent={onEvent} {...hookProps} />\n </BaseBoundaries>\n )\n}\n\nfunction PayScheduleFormRoot({ onEvent, ...hookProps }: PayScheduleFormProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n { paySchedule: result.data },\n )\n }\n }\n\n const { Fields } = paySchedule.form\n const { paymentSpeedDays, payPreviewLoading } = paySchedule.data\n const payPeriodPreview = paySchedule.data.payPeriodPreview\n\n const frequencyLabels: Record<PayScheduleFrequency, string> = {\n 'Every week': t('frequencies.everyWeek'),\n 'Every other week': t('frequencies.everyOtherWeek'),\n 'Twice per month': t('frequencies.twicePerMonth'),\n Monthly: t('frequencies.monthly'),\n }\n\n const twicePerMonthLabels: Record<string, string> = {\n '1st15th': t('frequencyOptions.15thAndLast'),\n custom: t('frequencyOptions.custom'),\n }\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create'\n ? t('headings.addPaySchedule')\n : t('headings.editPaySchedule')}\n </Components.Heading>\n </header>\n </Flex>\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <Fields.CustomName\n label={t('labels.name')}\n validationMessages={{ REQUIRED: t('validations.name') }}\n />\n <Fields.Frequency\n label={t('labels.frequency')}\n getOptionLabel={(entry: PayScheduleFrequency) => frequencyLabels[entry]}\n validationMessages={{ REQUIRED: t('validations.frequency') }}\n />\n {Fields.CustomTwicePerMonth && (\n <Fields.CustomTwicePerMonth\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n getOptionLabel={(entry: string) => twicePerMonthLabels[entry] ?? entry}\n />\n )}\n <Fields.AnchorPayDate\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n validationMessages={{ REQUIRED: t('validations.firstPayDate') }}\n minDate={new Date()}\n />\n <Fields.AnchorEndOfPayPeriod\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n validationMessages={{ REQUIRED: t('validations.firstPayPeriodEndDate') }}\n />\n {Fields.Day1 && (\n <Fields.Day1\n label={t('labels.firstPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.firstPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n {Fields.Day2 && (\n <Fields.Day2\n label={t('labels.lastPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.lastPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(\n payPeriodPreview[selectedPayPeriodIndex].startDate.toString(),\n ),\n end: new Date(\n payPeriodPreview[selectedPayPeriodIndex].endDate.toString(),\n ),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].checkDate.toString(),\n ),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].runPayrollBy.toString(),\n ),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["PayScheduleForm","onEvent","hookProps","jsx","BaseBoundaries","PayScheduleFormRoot","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","handleSubmit","result","componentEvents","Fields","paymentSpeedDays","payPreviewLoading","payPeriodPreview","frequencyLabels","twicePerMonthLabels","SDKFormProvider","Form","jsxs","Flex","style","Grid","entry","period","index","value","numericValue","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;AAkBO,SAASA,EAAgB,EAAE,SAAAC,GAAS,GAAGC,KAAmC;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,2BAC5B,4BAACC,GAAA,EAAoB,SAAAJ,GAAmB,GAAGC,EAAA,CAAW,EAAA,CACxD;AAEJ;AAEA,SAASG,EAAoB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C;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAP,EAAQmB,EAAgB,MAAM;AAAA,UAChC;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAjB,EAACK,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAY,OAAO,WAC5D,UAAAN,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"PayScheduleForm.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { usePayScheduleForm } from './shared/usePayScheduleForm'\nimport type { UsePayScheduleFormProps, PayScheduleFrequency } from './shared/usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleFormProps extends UsePayScheduleFormProps {\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"Company.PayScheduleForm\">\n <PayScheduleFormRoot onEvent={onEvent} {...hookProps} />\n </BaseBoundaries>\n )\n}\n\nfunction PayScheduleFormRoot({ onEvent, ...hookProps }: PayScheduleFormProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n { paySchedule: result.data },\n )\n }\n }\n\n const { Fields } = paySchedule.form\n const { paymentSpeedDays, payPreviewLoading } = paySchedule.data\n const payPeriodPreview = paySchedule.data.payPeriodPreview\n\n const frequencyLabels: Record<PayScheduleFrequency, string> = {\n 'Every week': t('frequencies.everyWeek'),\n 'Every other week': t('frequencies.everyOtherWeek'),\n 'Twice per month': t('frequencies.twicePerMonth'),\n Monthly: t('frequencies.monthly'),\n }\n\n const twicePerMonthLabels: Record<string, string> = {\n '1st15th': t('frequencyOptions.15thAndLast'),\n custom: t('frequencyOptions.custom'),\n }\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create'\n ? t('headings.addPaySchedule')\n : t('headings.editPaySchedule')}\n </Components.Heading>\n </header>\n </Flex>\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <Fields.CustomName\n label={t('labels.name')}\n validationMessages={{ REQUIRED: t('validations.name') }}\n />\n <Fields.Frequency\n label={t('labels.frequency')}\n getOptionLabel={(entry: PayScheduleFrequency) => frequencyLabels[entry]}\n validationMessages={{ REQUIRED: t('validations.frequency') }}\n />\n {Fields.CustomTwicePerMonth && (\n <Fields.CustomTwicePerMonth\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n getOptionLabel={(entry: string) => twicePerMonthLabels[entry] ?? entry}\n />\n )}\n <Fields.AnchorPayDate\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n validationMessages={{ REQUIRED: t('validations.firstPayDate') }}\n minDate={new Date()}\n />\n <Fields.AnchorEndOfPayPeriod\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n validationMessages={{ REQUIRED: t('validations.firstPayPeriodEndDate') }}\n />\n {Fields.Day1 && (\n <Fields.Day1\n label={t('labels.firstPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.firstPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n {Fields.Day2 && (\n <Fields.Day2\n label={t('labels.lastPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.lastPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(\n payPeriodPreview[selectedPayPeriodIndex].startDate.toString(),\n ),\n end: new Date(\n payPeriodPreview[selectedPayPeriodIndex].endDate.toString(),\n ),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].checkDate.toString(),\n ),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].runPayrollBy.toString(),\n ),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["PayScheduleForm","onEvent","hookProps","jsx","BaseBoundaries","PayScheduleFormRoot","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","handleSubmit","result","componentEvents","Fields","paymentSpeedDays","payPreviewLoading","payPeriodPreview","frequencyLabels","twicePerMonthLabels","SDKFormProvider","Form","jsxs","Flex","style","Grid","entry","period","index","value","numericValue","ActionsLayout"],"mappings":";;;;;;;;;;;;;;AAkBO,SAASA,EAAgB,EAAE,SAAAC,GAAS,GAAGC,KAAmC;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,2BAC5B,4BAACC,GAAA,EAAoB,SAAAJ,GAAmB,GAAGC,EAAA,CAAW,EAAA,CACxD;AAEJ;AAEA,SAASG,E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AA,MAAA,gBAAAnC;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAP,EAAQmB,EAAgB,MAAM;AAAA,UAChC;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAjB,EAACK,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAY,OAAO,WAC5D,UAAAN,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -1,17 +1,17 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
+ import { TextInputHookField as t } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
3
+ import { SelectHookField as i } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
2
4
  import { NumberInputHookField as n } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
3
5
  import { DatePickerHookField as r } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
4
- import { RadioGroupHookField as t } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
5
- import { SelectHookField as i } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
6
- import { TextInputHookField as m } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
6
+ import { RadioGroupHookField as m } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
7
7
  function F(e) {
8
- return /* @__PURE__ */ o(m, { ...e, name: "customName" });
8
+ return /* @__PURE__ */ o(t, { ...e, name: "customName" });
9
9
  }
10
10
  function p(e) {
11
11
  return /* @__PURE__ */ o(i, { ...e, name: "frequency" });
12
12
  }
13
13
  function y(e) {
14
- return /* @__PURE__ */ o(t, { ...e, name: "customTwicePerMonth" });
14
+ return /* @__PURE__ */ o(m, { ...e, name: "customTwicePerMonth" });
15
15
  }
16
16
  function P(e) {
17
17
  return /* @__PURE__ */ o(r, { ...e, name: "anchorPayDate" });
@@ -1,21 +1,7 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-error-boundary";
4
- import "react-i18next";
5
- import "@tanstack/react-query";
6
- import "../../../Base/useBase.js";
7
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "../../../../shared/constants.js";
13
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
1
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesFormContext");
2
+ const [o, r] = t("StateTaxesFormContext");
17
3
  export {
18
- u as StateTaxesFormProvider,
19
- d as useStateTaxesForm
4
+ r as StateTaxesFormProvider,
5
+ o as useStateTaxesForm
20
6
  };
21
7
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api-v-2025-11-15/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api-v-2025-11-15/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -1,21 +1,7 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-error-boundary";
4
- import "react-i18next";
5
- import "@tanstack/react-query";
6
- import "../../../Base/useBase.js";
7
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "../../../../shared/constants.js";
13
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
1
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesListContext");
2
+ const [o, s] = t("StateTaxesListContext");
17
3
  export {
18
- u as StateTaxesListProvider,
19
- d as useStateTaxesList
4
+ s as StateTaxesListProvider,
5
+ o as useStateTaxesList
20
6
  };
21
7
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api-v-2025-11-15/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api-v-2025-11-15/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
@@ -1,31 +1,17 @@
1
1
  import { z as t } from "zod";
2
- import "react/jsx-runtime";
3
- import "react";
4
- import "react-error-boundary";
5
- import "react-i18next";
6
- import "@tanstack/react-query";
7
- import "../../Base/useBase.js";
8
- import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
9
- import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
10
- import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
11
- import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
12
- import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
13
- import "../../../shared/constants.js";
14
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
2
  import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
17
- const z = t.object({
3
+ const o = t.object({
18
4
  street1: t.string().min(1),
19
5
  street2: t.string().optional(),
20
6
  city: t.string().min(1),
21
7
  state: t.string().min(1),
22
8
  zip: t.string().min(1)
23
- }), [b, h] = r(
9
+ }), [n, i] = r(
24
10
  "ContractorAddressContext"
25
11
  );
26
12
  export {
27
- z as AddressFormSchema,
28
- h as AddressProvider,
29
- b as useAddress
13
+ o as AddressFormSchema,
14
+ i as AddressProvider,
15
+ n as useAddress
30
16
  };
31
17
  //# sourceMappingURL=useAddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type {\n Contractor,\n ContractorType,\n} from '@gusto/embedded-api-v-2025-11-15/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api-v-2025-11-15/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAoBO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
1
+ {"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type {\n Contractor,\n ContractorType,\n} from '@gusto/embedded-api-v-2025-11-15/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api-v-2025-11-15/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;AAoBO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
@@ -7,8 +7,7 @@ import { useTranslation as h } from "react-i18next";
7
7
  import { PaymentStatementPresentation as w } from "./PaymentStatementPresentation.js";
8
8
  import { useComponentDictionary as C } from "../../../../i18n/I18n.js";
9
9
  import { BaseComponent as l } from "../../../Base/Base.js";
10
- import "../../../Base/useBase.js";
11
- function j(o) {
10
+ function b(o) {
12
11
  return /* @__PURE__ */ a(l, { ...o, children: /* @__PURE__ */ a(E, { ...o, children: o.children }) });
13
12
  }
14
13
  const E = ({ paymentGroupId: o, contractorUuid: c, dictionary: s }) => {
@@ -45,7 +44,7 @@ const E = ({ paymentGroupId: o, contractorUuid: c, dictionary: s }) => {
45
44
  );
46
45
  };
47
46
  export {
48
- j as PaymentStatement,
47
+ b as PaymentStatement,
49
48
  E as Root
50
49
  };
51
50
  //# sourceMappingURL=PaymentStatement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentStatement.js","sources":["../../../../../src/components/Contractor/Payments/PaymentStatement/PaymentStatement.tsx"],"sourcesContent":["import { useContractorPaymentGroupsGetSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/contractorPaymentGroupsGet'\nimport { useContractorsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/contractorsList'\nimport { useContractorPaymentsGetReceipt } from '@gusto/embedded-api-v-2025-11-15/react-query/contractorPaymentsGetReceipt'\nimport { GustoEmbeddedError } from '@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror'\nimport { useTranslation } from 'react-i18next'\nimport { PaymentStatementPresentation } from './PaymentStatementPresentation'\nimport { useComponentDictionary } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\n\ninterface PaymentStatementProps extends BaseComponentInterface<'Contractor.Payments.PaymentStatement'> {\n paymentGroupId: string\n contractorUuid: string\n}\n\nexport function PaymentStatement(props: PaymentStatementProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport const Root = ({ paymentGroupId, contractorUuid, dictionary }: PaymentStatementProps) => {\n useComponentDictionary('Contractor.Payments.PaymentStatement', dictionary)\n const { t } = useTranslation('Contractor.Payments.PaymentStatement')\n // Fetching entire payment\n const { data: paymentGroupResponse } = useContractorPaymentGroupsGetSuspense({\n contractorPaymentGroupUuid: paymentGroupId,\n })\n\n if (!paymentGroupResponse.contractorPaymentGroup) {\n throw new Error(t('errors.paymentGroupNotFound'))\n }\n\n const companyId = paymentGroupResponse.contractorPaymentGroup.companyUuid!\n // Fetching all contractors for the company\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = contractorList.contractors || []\n // Locating the payment for the selectedcontractor\n const payment = paymentGroupResponse.contractorPaymentGroup.contractorPayments?.find(\n p => p.contractorUuid === contractorUuid,\n )\n\n if (!payment) {\n throw new Error(t('errors.paymentNotFound'))\n }\n // Attempting to fetch the payment receipt\n // Note: 404 is expected for receipts that aren't available (e.g., non-direct deposit or not yet funded)\n const { data: paymentResponse } = useContractorPaymentsGetReceipt(\n {\n contractorPaymentUuid: payment.uuid!,\n },\n {\n retry: false,\n throwOnError: (error: Error) => {\n // Ignore 404 errors (receipt not available), but throw other errors\n if (error instanceof GustoEmbeddedError && error.httpMeta.response.status === 404) {\n return false\n }\n return true\n },\n },\n )\n const contractor = contractors.find(c => c.uuid === contractorUuid)\n if (!contractor) {\n throw new Error(t('errors.contractorNotFound'))\n }\n\n return (\n <PaymentStatementPresentation\n payment={payment}\n contractor={contractor}\n paymentReceipt={paymentResponse?.contractorPaymentReceipt}\n checkDate={paymentGroupResponse.contractorPaymentGroup.checkDate || ''}\n />\n )\n}\n"],"names":["PaymentStatement","props","jsx","BaseComponent","Root","paymentGroupId","contractorUuid","dictionary","useComponentDictionary","t","useTranslation","paymentGroupResponse","useContractorPaymentGroupsGetSuspense","companyId","contractorList","useContractorsListSuspense","contractors","payment","p","paymentResponse","useContractorPaymentsGetReceipt","error","GustoEmbeddedError","contractor","c","PaymentStatementPresentation"],"mappings":";;;;;;;;;;AAcO,SAASA,EAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,MAAMG,IAAO,CAAC,EAAE,gBAAAC,GAAgB,gBAAAC,GAAgB,YAAAC,QAAwC;AAC7F,EAAAC,EAAuB,wCAAwCD,CAAU;AACzE,QAAM,EAAE,GAAAE,EAAA,IAAMC,EAAe,sCAAsC,GAE7D,EAAE,MAAMC,EAAA,IAAyBC,EAAsC;AAAA,IAC3E,4BAA4BP;AAAA,EAAA,CAC7B;AAED,MAAI,CAACM,EAAqB;AACxB,UAAM,IAAI,MAAMF,EAAE,6BAA6B,CAAC;AAGlD,QAAMI,IAAYF,EAAqB,uBAAuB,aAExD,EAAE,MAAMG,EAAA,IAAmBC,EAA2B,EAAE,aAAaF,GAAW,GAChFG,IAAcF,EAAe,eAAe,CAAA,GAE5CG,IAAUN,EAAqB,uBAAuB,oBAAoB;AAAA,IAC9E,CAAAO,MAAKA,EAAE,mBAAmBZ;AAAA,EAAA;AAG5B,MAAI,CAACW;AACH,UAAM,IAAI,MAAMR,EAAE,wBAAwB,CAAC;AAI7C,QAAM,EAAE,MAAMU,EAAA,IAAoBC;AAAA,IAChC;AAAA,MACE,uBAAuBH,EAAQ;AAAA,IAAA;AAAA,IAEjC;AAAA,MACE,OAAO;AAAA,MACP,cAAc,CAACI,MAET,EAAAA,aAAiBC,KAAsBD,EAAM,SAAS,SAAS,WAAW;AAAA,IAIhF;AAAA,EACF,GAEIE,IAAaP,EAAY,KAAK,CAAAQ,MAAKA,EAAE,SAASlB,CAAc;AAClE,MAAI,CAACiB;AACH,UAAM,IAAI,MAAMd,EAAE,2BAA2B,CAAC;AAGhD,SACE,gBAAAP;AAAA,IAACuB;AAAA,IAAA;AAAA,MACC,SAAAR;AAAA,MACA,YAAAM;AAAA,MACA,gBAAgBJ,GAAiB;AAAA,MACjC,WAAWR,EAAqB,uBAAuB,aAAa;AAAA,IAAA;AAAA,EAAA;AAG1E;"}
1
+ {"version":3,"file":"PaymentStatement.js","sources":["../../../../../src/components/Contractor/Payments/PaymentStatement/PaymentStatement.tsx"],"sourcesContent":["import { useContractorPaymentGroupsGetSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/contractorPaymentGroupsGet'\nimport { useContractorsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/contractorsList'\nimport { useContractorPaymentsGetReceipt } from '@gusto/embedded-api-v-2025-11-15/react-query/contractorPaymentsGetReceipt'\nimport { GustoEmbeddedError } from '@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror'\nimport { useTranslation } from 'react-i18next'\nimport { PaymentStatementPresentation } from './PaymentStatementPresentation'\nimport { useComponentDictionary } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\n\ninterface PaymentStatementProps extends BaseComponentInterface<'Contractor.Payments.PaymentStatement'> {\n paymentGroupId: string\n contractorUuid: string\n}\n\nexport function PaymentStatement(props: PaymentStatementProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport const Root = ({ paymentGroupId, contractorUuid, dictionary }: PaymentStatementProps) => {\n useComponentDictionary('Contractor.Payments.PaymentStatement', dictionary)\n const { t } = useTranslation('Contractor.Payments.PaymentStatement')\n // Fetching entire payment\n const { data: paymentGroupResponse } = useContractorPaymentGroupsGetSuspense({\n contractorPaymentGroupUuid: paymentGroupId,\n })\n\n if (!paymentGroupResponse.contractorPaymentGroup) {\n throw new Error(t('errors.paymentGroupNotFound'))\n }\n\n const companyId = paymentGroupResponse.contractorPaymentGroup.companyUuid!\n // Fetching all contractors for the company\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = contractorList.contractors || []\n // Locating the payment for the selectedcontractor\n const payment = paymentGroupResponse.contractorPaymentGroup.contractorPayments?.find(\n p => p.contractorUuid === contractorUuid,\n )\n\n if (!payment) {\n throw new Error(t('errors.paymentNotFound'))\n }\n // Attempting to fetch the payment receipt\n // Note: 404 is expected for receipts that aren't available (e.g., non-direct deposit or not yet funded)\n const { data: paymentResponse } = useContractorPaymentsGetReceipt(\n {\n contractorPaymentUuid: payment.uuid!,\n },\n {\n retry: false,\n throwOnError: (error: Error) => {\n // Ignore 404 errors (receipt not available), but throw other errors\n if (error instanceof GustoEmbeddedError && error.httpMeta.response.status === 404) {\n return false\n }\n return true\n },\n },\n )\n const contractor = contractors.find(c => c.uuid === contractorUuid)\n if (!contractor) {\n throw new Error(t('errors.contractorNotFound'))\n }\n\n return (\n <PaymentStatementPresentation\n payment={payment}\n contractor={contractor}\n paymentReceipt={paymentResponse?.contractorPaymentReceipt}\n checkDate={paymentGroupResponse.contractorPaymentGroup.checkDate || ''}\n />\n )\n}\n"],"names":["PaymentStatement","props","jsx","BaseComponent","Root","paymentGroupId","contractorUuid","dictionary","useComponentDictionary","t","useTranslation","paymentGroupResponse","useContractorPaymentGroupsGetSuspense","companyId","contractorList","useContractorsListSuspense","contractors","payment","p","paymentResponse","useContractorPaymentsGetReceipt","error","GustoEmbeddedError","contractor","c","PaymentStatementPresentation"],"mappings":";;;;;;;;;AAcO,SAASA,EAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,MAAMG,IAAO,CAAC,EAAE,gBAAAC,GAAgB,gBAAAC,GAAgB,YAAAC,QAAwC;AAC7F,EAAAC,EAAuB,wCAAwCD,CAAU;AACzE,QAAM,EAAE,GAAAE,EAAA,IAAMC,EAAe,sCAAsC,GAE7D,EAAE,MAAMC,EAAA,IAAyBC,EAAsC;AAAA,IAC3E,4BAA4BP;AAAA,EAAA,CAC7B;AAED,MAAI,CAACM,EAAqB;AACxB,UAAM,IAAI,MAAMF,EAAE,6BAA6B,CAAC;AAGlD,QAAMI,IAAYF,EAAqB,uBAAuB,aAExD,EAAE,MAAMG,EAAA,IAAmBC,EAA2B,EAAE,aAAaF,GAAW,GAChFG,IAAcF,EAAe,eAAe,CAAA,GAE5CG,IAAUN,EAAqB,uBAAuB,oBAAoB;AAAA,IAC9E,CAAAO,MAAKA,EAAE,mBAAmBZ;AAAA,EAAA;AAG5B,MAAI,CAACW;AACH,UAAM,IAAI,MAAMR,EAAE,wBAAwB,CAAC;AAI7C,QAAM,EAAE,MAAMU,EAAA,IAAoBC;AAAA,IAChC;AAAA,MACE,uBAAuBH,EAAQ;AAAA,IAAA;AAAA,IAEjC;AAAA,MACE,OAAO;AAAA,MACP,cAAc,CAACI,MAET,EAAAA,aAAiBC,KAAsBD,EAAM,SAAS,SAAS,WAAW;AAAA,IAIhF;AAAA,EACF,GAEIE,IAAaP,EAAY,KAAK,CAAAQ,MAAKA,EAAE,SAASlB,CAAc;AAClE,MAAI,CAACiB;AACH,UAAM,IAAI,MAAMd,EAAE,2BAA2B,CAAC;AAGhD,SACE,gBAAAP;AAAA,IAACuB;AAAA,IAAA;AAAA,MACC,SAAAR;AAAA,MACA,YAAAM;AAAA,MACA,gBAAgBJ,GAAiB;AAAA,MACjC,WAAWR,EAAqB,uBAAuB,aAAa;AAAA,IAAA;AAAA,EAAA;AAG1E;"}
@@ -6,10 +6,9 @@ import { InformationRequestStatus as g } from "@gusto/embedded-api-v-2025-11-15/
6
6
  import { PaymentsListPresentation as E } from "./PaymentsListPresentation.js";
7
7
  import { useComponentDictionary as G } from "../../../../i18n/I18n.js";
8
8
  import { BaseComponent as v } from "../../../Base/Base.js";
9
- import "../../../Base/useBase.js";
10
9
  import { componentEvents as u } from "../../../../shared/constants.js";
11
10
  import { usePagination as U } from "../../../../hooks/usePagination/usePagination.js";
12
- function $(t) {
11
+ function Z(t) {
13
12
  return /* @__PURE__ */ p(v, { ...t, children: /* @__PURE__ */ p(Y, { ...t, children: t.children }) });
14
13
  }
15
14
  const W = (t = 3) => {
@@ -77,7 +76,7 @@ const W = (t = 3) => {
77
76
  );
78
77
  };
79
78
  export {
80
- $ as PaymentsList,
79
+ Z as PaymentsList,
81
80
  Y as Root
82
81
  };
83
82
  //# sourceMappingURL=PaymentsList.js.map