@gusto/embedded-react-sdk 0.14.1 → 0.15.0

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 (258) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/assets/icons/feature-icon-check.svg.js +10 -0
  3. package/dist/assets/icons/feature-icon-check.svg.js.map +1 -0
  4. package/dist/components/Base/Base.js +4 -4
  5. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataView.js +19 -18
  7. package/dist/components/Common/DataView/DataView.js.map +1 -1
  8. package/dist/components/Common/PaginationControl/PaginationControl.js +36 -36
  9. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  10. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +3 -1
  11. package/dist/components/Common/SignatureForm/SignatureForm.js +14 -11
  12. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureFormActions.js +9 -7
  14. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormFields.js +15 -12
  16. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
  18. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
  20. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -7
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -15
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +12 -10
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/TitleSelect.js +5 -3
  38. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  40. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
  42. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -8
  44. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  46. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
  48. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
  50. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -4
  52. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
  54. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -9
  56. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  58. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  59. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +10 -8
  60. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  61. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  62. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  63. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  64. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  65. package/dist/components/Company/FederalTaxes/FederalTaxes.js +5 -3
  66. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  67. package/dist/components/Company/FederalTaxes/Form.js +7 -6
  68. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  69. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  70. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  71. package/dist/components/Company/Industry/Actions.js +9 -7
  72. package/dist/components/Company/Industry/Actions.js.map +1 -1
  73. package/dist/components/Company/Industry/Context.js +8 -7
  74. package/dist/components/Company/Industry/Context.js.map +1 -1
  75. package/dist/components/Company/Industry/Edit.js +7 -4
  76. package/dist/components/Company/Industry/Edit.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
  78. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  79. package/dist/components/Company/Locations/LocationForm/Form.js +7 -5
  80. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationForm/LocationForm.js +12 -10
  82. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  84. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  86. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  87. package/dist/components/Company/Locations/LocationsList/List.js +25 -22
  88. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  89. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -9
  90. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  91. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +3 -1
  92. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  93. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  94. package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
  95. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  96. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +11 -9
  97. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  98. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +9 -7
  99. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  100. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  101. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/PaySchedule.js +5 -4
  103. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
  105. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  106. package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
  107. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -9
  108. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  109. package/dist/components/Company/PaySchedule/_parts/List.js +18 -17
  110. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  111. package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -6
  112. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  113. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
  114. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  115. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  116. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  117. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
  118. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  119. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
  120. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  121. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  122. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  123. package/dist/components/Contractor/Address/Address.js +7 -5
  124. package/dist/components/Contractor/Address/Address.js.map +1 -1
  125. package/dist/components/Contractor/Address/Form.js +9 -7
  126. package/dist/components/Contractor/Address/Form.js.map +1 -1
  127. package/dist/components/Contractor/Address/useAddress.js +7 -6
  128. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  129. package/dist/components/Contractor/ContractorList/index.js +59 -57
  130. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  131. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -1
  132. package/dist/components/Contractor/ContractorList/useContractorList.js +7 -6
  133. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  134. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
  135. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  136. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +4 -2
  137. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  138. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  139. package/dist/components/Contractor/Profile/useContractorProfile.js +4 -3
  140. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  141. package/dist/components/Contractor/Submit/Submit.js +21 -20
  142. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  143. package/dist/components/Employee/Compensation/Actions.js +13 -12
  144. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  145. package/dist/components/Employee/Compensation/Edit.js +14 -14
  146. package/dist/components/Employee/Compensation/List.js +23 -22
  147. package/dist/components/Employee/Compensation/List.js.map +1 -1
  148. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +11 -10
  149. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  150. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +33 -32
  151. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  152. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  153. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +11 -11
  154. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +23 -22
  155. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  156. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  157. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  158. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +5 -3
  159. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  160. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +5 -2
  161. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  162. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  163. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  164. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +5 -3
  165. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  166. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  167. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  168. package/dist/components/Employee/EmployeeList/Actions.js +8 -6
  169. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  170. package/dist/components/Employee/EmployeeList/EmployeeList.js +17 -13
  171. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  172. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  173. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  174. package/dist/components/Employee/EmployeeList/List.js +45 -43
  175. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  176. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +3 -1
  177. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -4
  178. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  179. package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
  180. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  181. package/dist/components/Employee/FederalTaxes/FederalForm.js +13 -11
  182. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  183. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -4
  184. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  185. package/dist/components/Employee/Landing/Landing.js +11 -10
  186. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  187. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  188. package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
  189. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  190. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -3
  191. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  192. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
  193. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  194. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +4 -2
  195. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  196. package/dist/components/Employee/PaymentMethod/Split.js +7 -7
  197. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +7 -6
  198. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  199. package/dist/components/Employee/Profile/Actions.js +9 -7
  200. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  201. package/dist/components/Employee/Profile/AdminPersonalDetails.js +7 -6
  202. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  203. package/dist/components/Employee/Profile/HomeAddress.js +6 -5
  204. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  205. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +25 -23
  206. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  207. package/dist/components/Employee/Profile/useProfile.js +5 -4
  208. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  209. package/dist/components/Employee/StateTaxes/Actions.js +10 -8
  210. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  211. package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -4
  212. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  213. package/dist/components/Employee/Taxes/Actions.js +10 -8
  214. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  215. package/dist/components/Employee/Taxes/FederalForm.js +14 -12
  216. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  217. package/dist/components/Employee/Taxes/useTaxes.js +5 -4
  218. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  219. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +15 -13
  220. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  221. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +15 -13
  222. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  223. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +118 -88
  224. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  225. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  226. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +72 -76
  227. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  228. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +21 -20
  229. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  230. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
  231. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  232. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  233. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +21 -20
  234. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  235. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
  236. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  237. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +84 -78
  238. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  239. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +75 -74
  240. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  241. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  242. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  243. package/dist/components/Payroll/helpers.d.ts +2 -0
  244. package/dist/components/Payroll/helpers.js +38 -37
  245. package/dist/components/Payroll/helpers.js.map +1 -1
  246. package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
  247. package/dist/components/Payroll/usePreparedPayrollData.js +26 -19
  248. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  249. package/dist/components/index.d.ts +1 -1
  250. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +4 -2
  251. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  252. package/dist/i18n/en/Payroll.PayrollHistory.json.js +9 -9
  253. package/dist/index.js +1 -1
  254. package/dist/style.css +1 -1
  255. package/dist/types/i18next.d.ts +1 -1
  256. package/package.json +7 -7
  257. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +0 -23
  258. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +0 -6
@@ -2,12 +2,14 @@ import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
4
  import "classnames";
5
- import { ActionsLayout as i } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import "../../../../shared/constants.js";
6
+ import { ActionsLayout as r } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const E = () => {
8
- const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: a, handleCancel: r, handleContinue: s } = m(), t = u();
8
+ import "react";
9
+ const B = () => {
10
+ const { t: n } = l("Company.PaySchedule"), { mode: i, handleAdd: a, handleCancel: c, handleContinue: s } = m(), t = u();
9
11
  return /* @__PURE__ */ e(d, { children: [
10
- c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(i, { children: [
12
+ i === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(r, { children: [
11
13
  /* @__PURE__ */ o(
12
14
  t.Button,
13
15
  {
@@ -29,26 +31,26 @@ const E = () => {
29
31
  }
30
32
  )
31
33
  ] }),
32
- c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
34
+ i === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
33
35
  /* @__PURE__ */ o(
34
36
  t.Button,
35
37
  {
36
38
  variant: "secondary",
37
39
  onClick: () => {
38
- r();
40
+ c();
39
41
  },
40
42
  children: n("actions.cancel")
41
43
  }
42
44
  ),
43
45
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
44
46
  ] }),
45
- c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
47
+ i === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(r, { children: [
46
48
  /* @__PURE__ */ o(
47
49
  t.Button,
48
50
  {
49
51
  variant: "secondary",
50
52
  onClick: () => {
51
- r();
53
+ c();
52
54
  },
53
55
  children: n("actions.cancel")
54
56
  }
@@ -58,6 +60,6 @@ const E = () => {
58
60
  ] });
59
61
  };
60
62
  export {
61
- E as Actions
63
+ B as Actions
62
64
  };
63
65
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR,MAAS,0CACPS,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,EAAA,CACtD;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAA,GACpDC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR,MAAS,0CACPS,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAH,EAAA;AAAA,UACF;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAA,CAAE;AAAA,IAAA,EAAA,CACtD;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -7,23 +7,23 @@ import l from "./Edit.module.scss.js";
7
7
  import { Flex as h } from "../../../Common/Flex/Flex.js";
8
8
  import { Grid as x } from "../../../Common/Grid/Grid.js";
9
9
  import "classnames";
10
- import { useComponentContext as E } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { useLocale as O } from "../../../../contexts/LocaleProvider/useLocale.js";
12
- import { formatDateNamedWeekdayShortPlusDate as f } from "../../../../helpers/dateFormatting.js";
13
- import { TextInputField as R } from "../../../Common/Fields/TextInputField/TextInputField.js";
14
- import { SelectField as F } from "../../../Common/Fields/SelectField/SelectField.js";
15
- import { RadioGroupField as M } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
+ import { RadioGroupField as E } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
11
+ import { TextInputField as O } from "../../../Common/Fields/TextInputField/TextInputField.js";
12
+ import { DatePickerField as f } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
16
13
  import { NumberInputField as P } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
17
- import { DatePickerField as D } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
14
+ import { useComponentContext as R } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import { useLocale as F } from "../../../../contexts/LocaleProvider/useLocale.js";
16
+ import { formatDateNamedWeekdayShortPlusDate as D } from "../../../../helpers/dateFormatting.js";
17
+ import { SelectField as M } from "../../../Common/Fields/SelectField/SelectField.js";
18
18
  const Q = () => {
19
- const o = E(), { t: e } = S("Company.PaySchedule"), { locale: u } = O(), { payPeriodPreview: r, mode: p, payPreviewLoading: v } = N(), { setValue: d } = C(), [a, b] = g(0), i = y({ name: "frequency" }), n = y({ name: "customTwicePerMonth" }), w = i === "Twice per month" && n === "custom" || i === "Monthly", q = i === "Twice per month" && n === "custom";
19
+ const o = R(), { t: e } = S("Company.PaySchedule"), { locale: u } = F(), { payPeriodPreview: r, mode: p, payPreviewLoading: v } = N(), { setValue: d } = C(), [a, b] = g(0), i = y({ name: "frequency" }), n = y({ name: "customTwicePerMonth" }), w = i === "Twice per month" && n === "custom" || i === "Monthly", q = i === "Twice per month" && n === "custom";
20
20
  return T(() => {
21
21
  i === "Twice per month" && n === "1st15th" && (d("day1", 15), d("day2", 31));
22
22
  }, [i, n, d]), p !== "EDIT_PAY_SCHEDULE" && p !== "ADD_PAY_SCHEDULE" ? null : /* @__PURE__ */ t("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ m(x, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
23
23
  /* @__PURE__ */ t("div", { className: l.payScheduleForm, children: /* @__PURE__ */ m(h, { flexDirection: "column", children: [
24
- /* @__PURE__ */ t(R, { name: "customName", label: "Name", isRequired: !0 }),
24
+ /* @__PURE__ */ t(O, { name: "customName", label: "Name", isRequired: !0 }),
25
25
  /* @__PURE__ */ t(
26
- F,
26
+ M,
27
27
  {
28
28
  name: "frequency",
29
29
  label: e("labels.frequency"),
@@ -37,7 +37,7 @@ const Q = () => {
37
37
  }
38
38
  ),
39
39
  i === "Twice per month" && /* @__PURE__ */ t(
40
- M,
40
+ E,
41
41
  {
42
42
  name: "customTwicePerMonth",
43
43
  label: e("labels.frequencyOptions"),
@@ -49,7 +49,7 @@ const Q = () => {
49
49
  }
50
50
  ),
51
51
  /* @__PURE__ */ t(
52
- D,
52
+ f,
53
53
  {
54
54
  name: "anchorPayDate",
55
55
  label: e("labels.firstPayDate"),
@@ -58,7 +58,7 @@ const Q = () => {
58
58
  }
59
59
  ),
60
60
  /* @__PURE__ */ t(
61
- D,
61
+ f,
62
62
  {
63
63
  name: "anchorEndOfPayPeriod",
64
64
  label: e("labels.firstPayPeriodEndDate"),
@@ -77,7 +77,7 @@ const Q = () => {
77
77
  isRequired: !0,
78
78
  options: r.map((s, c) => ({
79
79
  value: String(c),
80
- label: `${f(s.startDate, u)} – ${f(s.endDate, u)}`
80
+ label: `${D(s.startDate, u)} – ${D(s.endDate, u)}`
81
81
  })),
82
82
  value: String(a),
83
83
  onChange: (s) => {
@@ -1,18 +1,20 @@
1
- import { jsx as e, jsxs as r, Fragment as o } from "react/jsx-runtime";
2
- import { useTranslation as c, Trans as a } from "react-i18next";
1
+ import { jsx as e, jsxs as s, Fragment as o } from "react/jsx-runtime";
2
+ import { useTranslation as c, Trans as r } from "react-i18next";
3
3
  import { usePaySchedule as d } from "../usePaySchedule.js";
4
4
  import { Flex as h } from "../../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
+ import "../../../../shared/constants.js";
6
7
  import { useComponentContext as l } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const D = () => {
8
- const { t } = c("Company.PaySchedule"), n = l(), { mode: s } = d();
8
+ import "react";
9
+ const x = () => {
10
+ const { t } = c("Company.PaySchedule"), n = l(), { mode: a } = d();
9
11
  let i = /* @__PURE__ */ e(o, {});
10
- switch (s) {
12
+ switch (a) {
11
13
  case "LIST_PAY_SCHEDULES":
12
- i = /* @__PURE__ */ r(o, { children: [
14
+ i = /* @__PURE__ */ s(o, { children: [
13
15
  /* @__PURE__ */ e(n.Heading, { as: "h2", children: t("headings.pageTitle") }),
14
16
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
15
- a,
17
+ r,
16
18
  {
17
19
  i18nKey: "listDescription",
18
20
  t,
@@ -22,7 +24,7 @@ const D = () => {
22
24
  }
23
25
  ) }),
24
26
  /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
25
- a,
27
+ r,
26
28
  {
27
29
  i18nKey: "listDescription2",
28
30
  t,
@@ -43,6 +45,6 @@ const D = () => {
43
45
  return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: i }) });
44
46
  };
45
47
  export {
46
- D as Head
48
+ x as Head
47
49
  };
48
50
  //# sourceMappingURL=Head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n how_to_choose_schedule: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n payment_law_doc: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,wBAAwB,gBAAAH,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UAC3C;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,iBAAiB,gBAAAH,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACpC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAK,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
1
+ {"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n how_to_choose_schedule: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n payment_law_doc: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,E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ime";
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
2
  import { useTranslation as h } from "react-i18next";
3
3
  import { usePaySchedule as y } from "../usePaySchedule.js";
4
4
  import o from "./List.module.scss.js";
5
5
  import { Flex as s } from "../../../Common/Flex/Flex.js";
6
6
  import "classnames";
7
- import f from "../../../../assets/icons/pencil.svg.js";
8
- import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import { VisuallyHidden as v } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
10
- import { HamburgerMenu as g } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
7
+ import "../../../../shared/constants.js";
8
+ import { HamburgerMenu as f } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
9
+ import S from "../../../../assets/icons/pencil.svg.js";
10
+ import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { VisuallyHidden as g } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
12
  import { useDataView as L } from "../../../Common/DataView/useDataView.js";
12
13
  import { DataView as C } from "../../../Common/DataView/DataView.js";
13
- const B = () => {
14
- const { t: n } = h("Company.PaySchedule"), r = S(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
14
+ const F = () => {
15
+ const { t: r } = h("Company.PaySchedule"), n = v(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
15
16
  data: m || [],
16
17
  columns: [
17
18
  {
18
- title: n("payScheduleList.name"),
19
+ title: r("payScheduleList.name"),
19
20
  key: "customName",
20
21
  render: (t) => {
21
22
  const a = !!t.name;
22
23
  let i = a ? t.name : t.customName;
23
24
  i && i.length > 1 ? i = i.charAt(0).toUpperCase() + i.slice(1) : i = t.customName;
24
- const u = t.customName;
25
- return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ p("div", { className: o.content, children: [
25
+ const p = t.customName;
26
+ return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ u("div", { className: o.content, children: [
26
27
  /* @__PURE__ */ e("div", { children: i }),
27
- a && /* @__PURE__ */ e("div", { children: u })
28
+ a && /* @__PURE__ */ e("div", { children: p })
28
29
  ] }) });
29
30
  }
30
31
  },
31
32
  {
32
- title: /* @__PURE__ */ e(v, { children: n("payScheduleList.active") }),
33
+ title: /* @__PURE__ */ e(g, { children: r("payScheduleList.active") }),
33
34
  key: "active",
34
- render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(r.Badge, { status: "success", children: n("payScheduleList.active") }) : /* @__PURE__ */ e(r.Badge, { status: "info", children: n("payScheduleList.inactive") }) }) })
35
+ render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(n.Badge, { status: "success", children: r("payScheduleList.active") }) : /* @__PURE__ */ e(n.Badge, { status: "info", children: r("payScheduleList.inactive") }) }) })
35
36
  }
36
37
  ],
37
38
  itemMenu: (t) => /* @__PURE__ */ e(
38
- g,
39
+ f,
39
40
  {
40
41
  triggerLabel: "Actions",
41
42
  items: [
42
43
  {
43
- label: n("payScheduleList.edit"),
44
+ label: r("payScheduleList.edit"),
44
45
  onClick: () => {
45
46
  l(t);
46
47
  },
47
- icon: /* @__PURE__ */ e(f, { "aria-hidden": !0 })
48
+ icon: /* @__PURE__ */ e(S, { "aria-hidden": !0 })
48
49
  }
49
50
  ]
50
51
  }
@@ -53,6 +54,6 @@ const B = () => {
53
54
  return c !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
54
55
  };
55
56
  export {
56
- B as List
57
+ F as List
57
58
  };
58
59
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","has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I,EAACZ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAF,EAAE,wBAAwB,EAAA,CAAE,IAEhE,gBAAAc,EAACZ,EAAW,OAAX,EAAiB,QAAO,QAAQ,UAAAF,EAAE,0BAA0B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,E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A,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
@@ -10,11 +10,12 @@ import "@tanstack/react-query";
10
10
  import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
12
  import "classnames";
13
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
14
  import "dompurify";
14
15
  import "../../../contexts/LocaleProvider/useLocale.js";
15
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
17
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
17
- const S = o.object({
18
+ const f = o.object({
18
19
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
19
20
  anchorPayDate: o.date().optional(),
20
21
  anchorEndOfPayPeriod: o.date().optional(),
@@ -22,10 +23,10 @@ const S = o.object({
22
23
  day2: o.number().min(1).max(31).optional(),
23
24
  customName: o.string().optional(),
24
25
  customTwicePerMonth: o.string().optional()
25
- }), [f, w] = t("PayScheduleContext");
26
+ }), [w, b] = t("PayScheduleContext");
26
27
  export {
27
- w as PayScheduleProvider,
28
- S as PayScheduleSchema,
29
- f as usePaySchedule
28
+ b as PayScheduleProvider,
29
+ f as PayScheduleSchema,
30
+ w as usePaySchedule
30
31
  };
31
32
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
@@ -2,9 +2,11 @@ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useStateTaxesForm as s } from "./context.js";
4
4
  import "classnames";
5
+ import "../../../../shared/constants.js";
5
6
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function x() {
8
+ import "react";
9
+ function h() {
8
10
  const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: r, isPending: e } = s(), o = c();
9
11
  return /* @__PURE__ */ i(m, { children: [
10
12
  /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: r, children: t("cancelCta") }),
@@ -12,6 +14,6 @@ function x() {
12
14
  ] });
13
15
  }
14
16
  export {
15
- x as Actions
17
+ h as Actions
16
18
  };
17
19
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
@@ -9,13 +9,14 @@ import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
11
  import "classnames";
12
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesFormContext");
17
+ const [u, f] = t("StateTaxesFormContext");
17
18
  export {
18
- u as StateTaxesFormProvider,
19
- d as useStateTaxesForm
19
+ f as StateTaxesFormProvider,
20
+ u as useStateTaxesForm
20
21
  };
21
22
  //# 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/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/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;"}
@@ -2,13 +2,15 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
3
  import { useStateTaxesList as e } from "./context.js";
4
4
  import "classnames";
5
+ import "../../../../shared/constants.js";
5
6
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function l() {
8
+ import "react";
9
+ function d() {
8
10
  const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
9
11
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
10
12
  }
11
13
  export {
12
- l as Actions
14
+ d as Actions
13
15
  };
14
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
@@ -2,11 +2,13 @@ import { jsx as s, Fragment as p } from "react/jsx-runtime";
2
2
  import { useTranslation as o } from "react-i18next";
3
3
  import { useStateTaxesList as l } from "./context.js";
4
4
  import "classnames";
5
+ import "../../../../shared/constants.js";
5
6
  import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
6
7
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import "react";
7
9
  import { useDataView as d } from "../../../Common/DataView/useDataView.js";
8
10
  import { DataView as C } from "../../../Common/DataView/DataView.js";
9
- const k = () => {
11
+ const w = () => {
10
12
  const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
11
13
  data: r,
12
14
  columns: [
@@ -36,6 +38,6 @@ const k = () => {
36
38
  return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
37
39
  };
38
40
  export {
39
- k as List
41
+ w as List
40
42
  };
41
43
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;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ourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
@@ -9,13 +9,14 @@ import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
11
  import "classnames";
12
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesListContext");
17
+ const [u, f] = t("StateTaxesListContext");
17
18
  export {
18
- u as StateTaxesListProvider,
19
- d as useStateTaxesList
19
+ f as StateTaxesListProvider,
20
+ u as useStateTaxesList
20
21
  };
21
22
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\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 { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\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;"}
@@ -11,12 +11,14 @@ import { Actions as B } from "./Actions.js";
11
11
  import { Form as N } from "../../Common/Form/Form.js";
12
12
  import { useComponentDictionary as j, useI18n as q } from "../../../i18n/I18n.js";
13
13
  import { Flex as w } from "../../Common/Flex/Flex.js";
14
- import "react-i18next";
15
14
  import "classnames";
15
+ import { contractorEvents as d } from "../../../shared/constants.js";
16
+ import "react-i18next";
17
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
18
+ import "react";
16
19
  import { BaseComponent as G } from "../../Base/Base.js";
17
20
  import { useBase as H } from "../../Base/useBase.js";
18
- import { contractorEvents as d } from "../../../shared/constants.js";
19
- function it(r) {
21
+ function mt(r) {
20
22
  return /* @__PURE__ */ t(G, { ...r, children: /* @__PURE__ */ t(M, { ...r, children: r.children }) });
21
23
  }
22
24
  function M({ contractorId: r, defaultValues: e, children: n, className: a, dictionary: p }) {
@@ -66,7 +68,7 @@ function M({ contractorId: r, defaultValues: e, children: n, className: a, dicti
66
68
  ) });
67
69
  }
68
70
  export {
69
- it as Address,
70
- it as default
71
+ mt as Address,
72
+ mt as default
71
73
  };
72
74
  //# sourceMappingURL=Address.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useContractorsGetSuspense } from '@gusto/embedded-api/react-query/contractorsGet'\nimport { useContractorsGetAddressSuspense } from '@gusto/embedded-api/react-query/contractorsGetAddress'\nimport { useContractorsUpdateAddressMutation } from '@gusto/embedded-api/react-query/contractorsUpdateAddress'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { AddressFormSchema, AddressProvider } from './useAddress'\nimport { Head } from './Head'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { AddressDefaultValues, AddressFormValues } from './useAddress'\nimport { Form as HtmlForm } from '@/components/Common/Form/Form'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { contractorEvents } from '@/shared/constants'\n\nexport interface AddressProps extends BaseComponentInterface<'Contractor.Address'> {\n contractorId: string\n defaultValues?: AddressDefaultValues\n children?: ReactNode\n className?: string\n}\n\nexport function Address(props: AddressProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ contractorId, defaultValues, children, className, dictionary }: AddressProps) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data: contractorData } = useContractorsGetSuspense({ contractorUuid: contractorId })\n const { data: addressData } = useContractorsGetAddressSuspense({ contractorUuid: contractorId })\n\n const { mutateAsync: updateAddress, isPending: isUpdatingAddressPending } =\n useContractorsUpdateAddressMutation()\n\n const contractor = contractorData.contractor\n const contractorType = contractorData.contractor?.type\n const address = addressData.contractorAddress\n\n const formDefaultValues = {\n street1: address?.street1 || defaultValues?.street1 || '',\n street2: address?.street2 || defaultValues?.street2 || '',\n city: address?.city || defaultValues?.city || '',\n state: address?.state || defaultValues?.state || '',\n zip: address?.zip || defaultValues?.zip || '',\n }\n\n const formMethods = useForm<AddressFormValues>({\n resolver: zodResolver(AddressFormSchema),\n defaultValues: formDefaultValues,\n })\n\n const onSubmit = async (data: AddressFormValues) => {\n await baseSubmitHandler(data, async payload => {\n const { contractorAddress } = await updateAddress({\n request: {\n contractorUuid: contractorId,\n requestBody: {\n version: address?.version as string,\n street1: payload.street1,\n street2: payload.street2,\n city: payload.city,\n state: payload.state,\n zip: payload.zip,\n },\n },\n })\n\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, contractorAddress)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n })\n }\n\n return (\n <section className={className}>\n <AddressProvider\n value={{\n contractor,\n contractorType,\n address,\n isPending: isUpdatingAddressPending,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </AddressProvider>\n </section>\n )\n}\n\nexport default Address\n"],"names":["Address","props","jsx","BaseComponent","Root","contractorId","defaultValues","children","className","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","contractorData","useContractorsGetSuspense","addressData","useContractorsGetAddressSuspense","updateAddress","isUpdatingAddressPending","useContractorsUpdateAddressMutation","contractor","contractorType","address","formDefaultValues","formMethods","useForm","zodResolver","AddressFormSchema","onSubmit","data","payload","contractorAddress","contractorEvents","AddressProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAQC,GAAqB;AAC3C,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,cAAAC,GAAc,eAAAC,GAAe,UAAAC,GAAU,WAAAC,GAAW,YAAAC,KAA4B;AAC5F,EAAAC,EAAuB,sBAAsBD,CAAU,GACvDE,EAAQ,oBAAoB;AAE5B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAMC,EAAA,IAAmBC,EAA0B,EAAE,gBAAgBX,GAAc,GACrF,EAAE,MAAMY,EAAA,IAAgBC,EAAiC,EAAE,gBAAgBb,GAAc,GAEzF,EAAE,aAAac,GAAe,WAAWC,EAAA,IAC7CC,EAAA,GAEIC,IAAaP,EAAe,YAC5BQ,IAAiBR,EAAe,YAAY,MAC5CS,IAAUP,EAAY,mBAEtBQ,IAAoB;AAAA,IACxB,SAASD,GAAS,WAAWlB,G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0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useContractorsGetSuspense } from '@gusto/embedded-api/react-query/contractorsGet'\nimport { useContractorsGetAddressSuspense } from '@gusto/embedded-api/react-query/contractorsGetAddress'\nimport { useContractorsUpdateAddressMutation } from '@gusto/embedded-api/react-query/contractorsUpdateAddress'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { AddressFormSchema, AddressProvider } from './useAddress'\nimport { Head } from './Head'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { AddressDefaultValues, AddressFormValues } from './useAddress'\nimport { Form as HtmlForm } from '@/components/Common/Form/Form'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { contractorEvents } from '@/shared/constants'\n\nexport interface AddressProps extends BaseComponentInterface<'Contractor.Address'> {\n contractorId: string\n defaultValues?: AddressDefaultValues\n children?: ReactNode\n className?: string\n}\n\nexport function Address(props: AddressProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ contractorId, defaultValues, children, className, dictionary }: AddressProps) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data: contractorData } = useContractorsGetSuspense({ contractorUuid: contractorId })\n const { data: addressData } = useContractorsGetAddressSuspense({ contractorUuid: contractorId })\n\n const { mutateAsync: updateAddress, isPending: isUpdatingAddressPending } =\n useContractorsUpdateAddressMutation()\n\n const contractor = contractorData.contractor\n const contractorType = contractorData.contractor?.type\n const address = addressData.contractorAddress\n\n const formDefaultValues = {\n street1: address?.street1 || defaultValues?.street1 || '',\n street2: address?.street2 || defaultValues?.street2 || '',\n city: address?.city || defaultValues?.city || '',\n state: address?.state || defaultValues?.state || '',\n zip: address?.zip || defaultValues?.zip || '',\n }\n\n const formMethods = useForm<AddressFormValues>({\n resolver: zodResolver(AddressFormSchema),\n defaultValues: formDefaultValues,\n })\n\n const onSubmit = async (data: AddressFormValues) => {\n await baseSubmitHandler(data, async payload => {\n const { contractorAddress } = await updateAddress({\n request: {\n contractorUuid: contractorId,\n requestBody: {\n version: address?.version as string,\n street1: payload.street1,\n street2: payload.street2,\n city: payload.city,\n state: payload.state,\n zip: payload.zip,\n },\n },\n })\n\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, contractorAddress)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n })\n }\n\n return (\n <section className={className}>\n <AddressProvider\n value={{\n contractor,\n contractorType,\n address,\n isPending: isUpdatingAddressPending,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </AddressProvider>\n </section>\n )\n}\n\nexport default Address\n"],"names":["Address","props","jsx","BaseComponent","Root","contractorId","defaultValues","children","className","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","contractorData","useContractorsGetSuspense","addressData","useContractorsGetAddressSuspense","updateAddress","isUpdatingAddressPending","useContractorsUpdateAddressMutation","contractor","contractorType","address","formDefaultValues","formMethods","useForm","zodResolver","AddressFormSchema","onSubmit","data","payload","contractorAddress","contractorEvents","AddressProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;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