@gusto/embedded-react-sdk 0.34.0 → 0.35.0-rc.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 (202) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/components/Base/Base.d.ts +6 -2
  3. package/dist/components/Base/Base.js +105 -59
  4. package/dist/components/Base/Base.js.map +1 -1
  5. package/dist/components/Base/useBase.d.ts +1 -0
  6. package/dist/components/Base/useBase.js.map +1 -1
  7. package/dist/components/Base/useBaseSubmit.d.ts +1 -1
  8. package/dist/components/Base/useBaseSubmit.js +60 -33
  9. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  10. package/dist/components/Common/HamburgerMenu/HamburgerMenu.d.ts +1 -1
  11. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +15 -13
  12. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  13. package/dist/components/Common/HamburgerMenu/HamburgerMenuTypes.d.ts +1 -0
  14. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  15. package/dist/components/Common/UI/Menu/Menu.js +26 -25
  16. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  17. package/dist/components/Common/UI/Menu/Menu.module.scss.js +7 -7
  18. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +5 -0
  19. package/dist/components/Common/UI/Menu/MenuTypes.js +4 -3
  20. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  21. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  22. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  30. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  31. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +1 -1
  32. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  33. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  34. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +1 -1
  35. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  36. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  37. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  38. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  39. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  40. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  41. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  42. package/dist/components/Company/Industry/Context.js +6 -7
  43. package/dist/components/Company/Industry/Context.js.map +1 -1
  44. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  45. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  47. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  48. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  49. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  50. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  51. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  52. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  53. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  54. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  55. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  56. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  57. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  58. package/dist/components/Contractor/Address/Form.js +1 -1
  59. package/dist/components/Contractor/Address/useAddress.js +5 -6
  60. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  61. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  62. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  63. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +119 -113
  64. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  65. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  66. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  67. package/dist/components/Employee/Compensation/Edit.js +70 -70
  68. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  69. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +9 -10
  70. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  71. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +10 -11
  72. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  73. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +10 -11
  74. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  75. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  76. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  77. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +18 -18
  78. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +7 -7
  79. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js +5 -5
  80. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +1 -1
  81. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js +8 -8
  82. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +1 -1
  83. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  84. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  85. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  86. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  87. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  88. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  89. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  90. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  91. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  92. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  93. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  94. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  95. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  96. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  97. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  98. package/dist/components/Employee/Profile/useProfile.js +3 -4
  99. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  100. package/dist/components/Employee/StateTaxes/StateTaxes.js +69 -61
  101. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  102. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  103. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  104. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  105. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  106. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  107. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +10 -10
  108. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  109. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  110. package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +2 -0
  111. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +101 -0
  112. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -0
  113. package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +16 -0
  114. package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js.map +1 -0
  115. package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +7 -0
  116. package/dist/components/Payroll/GrossUpModal/index.d.ts +3 -0
  117. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +86 -67
  118. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  119. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  120. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +83 -49
  121. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  122. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +6 -0
  123. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
  124. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +1 -1
  125. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +102 -0
  126. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -0
  127. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.module.scss.js +14 -0
  128. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.module.scss.js.map +1 -0
  129. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +52 -0
  130. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -0
  131. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +16 -0
  132. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -0
  133. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +12 -2
  134. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js +15 -0
  135. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -0
  136. package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +2 -1
  137. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +212 -120
  138. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  139. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  140. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +76 -64
  141. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  142. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +2 -0
  143. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +11 -0
  144. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -0
  145. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +67 -57
  146. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  147. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -36
  148. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +6 -6
  149. package/dist/components/Payroll/usePreparedPayrollData.js +44 -44
  150. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  151. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -0
  152. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +58 -39
  153. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  154. package/dist/contexts/ObservabilityProvider/ObservabilityContext.d.ts +5 -0
  155. package/dist/contexts/ObservabilityProvider/ObservabilityContext.js +6 -0
  156. package/dist/contexts/ObservabilityProvider/ObservabilityContext.js.map +1 -0
  157. package/dist/contexts/ObservabilityProvider/ObservabilityProvider.d.ts +7 -0
  158. package/dist/contexts/ObservabilityProvider/ObservabilityProvider.js +11 -0
  159. package/dist/contexts/ObservabilityProvider/ObservabilityProvider.js.map +1 -0
  160. package/dist/contexts/ObservabilityProvider/index.d.ts +5 -0
  161. package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +5 -0
  162. package/dist/contexts/ObservabilityProvider/observabilityUtils.js +45 -0
  163. package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +1 -0
  164. package/dist/contexts/ObservabilityProvider/sanitization.d.ts +19 -0
  165. package/dist/contexts/ObservabilityProvider/sanitization.js +95 -0
  166. package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -0
  167. package/dist/contexts/ObservabilityProvider/sanitization.test.d.ts +1 -0
  168. package/dist/contexts/ObservabilityProvider/useObservability.d.ts +2 -0
  169. package/dist/contexts/ObservabilityProvider/useObservability.js +11 -0
  170. package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -0
  171. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +8 -0
  172. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js +28 -0
  173. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -0
  174. package/dist/contexts/index.d.ts +2 -0
  175. package/dist/helpers/formattedStrings.js +12 -13
  176. package/dist/helpers/formattedStrings.js.map +1 -1
  177. package/dist/helpers/rem.d.ts +7 -3
  178. package/dist/helpers/rem.js +14 -10
  179. package/dist/helpers/rem.js.map +1 -1
  180. package/dist/helpers/rem.test.d.ts +1 -0
  181. package/dist/helpers/retryAsync.d.ts +7 -0
  182. package/dist/helpers/retryAsync.js +18 -0
  183. package/dist/helpers/retryAsync.js.map +1 -0
  184. package/dist/i18n/I18n.js +15 -15
  185. package/dist/i18n/I18n.js.map +1 -1
  186. package/dist/i18n/en/Company.PaySchedule.json.js +1 -1
  187. package/dist/i18n/en/Payroll.GrossUpModal.json.js +24 -0
  188. package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -0
  189. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +13 -11
  190. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js.map +1 -1
  191. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
  192. package/dist/index.d.ts +2 -0
  193. package/dist/index.js +19 -13
  194. package/dist/index.js.map +1 -1
  195. package/dist/shared/constants.d.ts +5 -0
  196. package/dist/shared/constants.js +11 -8
  197. package/dist/shared/constants.js.map +1 -1
  198. package/dist/style.css +1 -1
  199. package/dist/types/i18next.d.ts +26 -1
  200. package/dist/types/observability.d.ts +145 -0
  201. package/docs/reference/endpoint-inventory.json +10 -1
  202. package/package.json +21 -21
@@ -1,81 +1,115 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { useCallback as b } from "react";
3
- import { useFormContext as D } from "react-hook-form";
4
- import { useTranslation as c } from "react-i18next";
5
- import { OffCyclePayPeriodDateFormPresentation as P } from "../OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js";
6
- import { useI18n as a } from "../../../i18n/I18n.js";
7
- import { useComponentContext as E } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import { Flex as o } from "../../Common/Flex/Flex.js";
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { useMemo as F, useCallback as G } from "react";
3
+ import { useFormContext as w } from "react-hook-form";
4
+ import { useTranslation as n } from "react-i18next";
5
+ import { OffCyclePayPeriodDateFormPresentation as W } from "../OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js";
6
+ import { WAGE_TYPE_CATEGORIES as k } from "../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js";
7
+ import { useI18n as r } from "../../../i18n/I18n.js";
8
+ import { useComponentContext as v } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { Flex as l } from "../../Common/Flex/Flex.js";
9
10
  import "classnames";
10
11
  import "../../../shared/constants.js";
11
- import { RadioGroupField as S } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
12
- import { SwitchField as O } from "../../Common/Fields/SwitchField/SwitchField.js";
13
- import { OffCycleReasonSelectionPresentation as T } from "../OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js";
14
- import { MultiSelectComboBoxField as F } from "../../Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js";
15
- function q({
16
- employees: d,
17
- isLoadingEmployees: u,
18
- isPending: s
12
+ import { OffCycleReasonSelectionPresentation as L } from "../OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js";
13
+ import { MultiSelectComboBoxField as R } from "../../Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js";
14
+ import { RadioGroupField as j } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
15
+ import { OffCycleTaxWithholdingTable as I } from "../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js";
16
+ import { OffCycleTaxWithholdingModal as M } from "../OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js";
17
+ import { SwitchField as V } from "../../Common/Fields/SwitchField/SwitchField.js";
18
+ function ie({
19
+ employees: y,
20
+ isLoadingEmployees: h,
21
+ isPending: p,
22
+ taxWithholdingConfig: m,
23
+ isTaxWithholdingModalOpen: g,
24
+ onTaxWithholdingEditClick: C,
25
+ onTaxWithholdingModalDone: x,
26
+ onTaxWithholdingModalCancel: T
19
27
  }) {
20
- a("Payroll.OffCycleCreation"), a("Payroll.OffCycleDeductionsSetting"), a("Payroll.EmployeeSelection");
21
- const { t: l } = c("Payroll.OffCycleCreation"), { t: i } = c("Payroll.OffCycleDeductionsSetting"), { t } = c("Payroll.EmployeeSelection"), { Heading: m, Text: f, Button: y } = E(), { setValue: p, watch: h } = D(), g = h("includeAllEmployees"), C = b(
22
- (n) => {
23
- n && p("selectedEmployeeUuids", []);
28
+ r("Payroll.OffCycleCreation"), r("Payroll.OffCycleDeductionsSetting"), r("Payroll.EmployeeSelection"), r("Payroll.OffCycleTaxWithholding");
29
+ const { t: i } = n("Payroll.OffCycleCreation"), { t } = n("Payroll.OffCycleDeductionsSetting"), { t: a } = n("Payroll.EmployeeSelection"), { t: c } = n("Payroll.OffCycleTaxWithholding"), { Heading: d, Text: b, Button: D } = v(), E = F(
30
+ () => k.map((o) => {
31
+ const f = {
32
+ category: o,
33
+ label: c(`wageTypeGroups.${o}.label`)
34
+ };
35
+ return (o === "regular" || o === "supplemental") && (f.description = c(`wageTypeGroups.${o}.description`)), f;
36
+ }),
37
+ [c]
38
+ ), { setValue: u, watch: O } = w(), P = O("includeAllEmployees"), S = G(
39
+ (o) => {
40
+ o && u("selectedEmployeeUuids", []);
24
41
  },
25
- [p]
26
- ), x = [
42
+ [u]
43
+ ), A = [
27
44
  {
28
45
  value: !1,
29
- label: i("options.include.label")
46
+ label: t("options.include.label")
30
47
  },
31
48
  {
32
49
  value: !0,
33
- label: i("options.skip.label")
50
+ label: t("options.skip.label")
34
51
  }
35
52
  ];
36
- return /* @__PURE__ */ r(o, { flexDirection: "column", gap: 32, children: [
37
- /* @__PURE__ */ r(o, { flexDirection: "column", gap: 4, children: [
38
- /* @__PURE__ */ e(m, { as: "h2", children: l("pageTitle") }),
39
- /* @__PURE__ */ e(f, { variant: "supporting", children: l("pageDescription") })
53
+ return /* @__PURE__ */ s(l, { flexDirection: "column", gap: 32, children: [
54
+ /* @__PURE__ */ s(l, { flexDirection: "column", gap: 4, children: [
55
+ /* @__PURE__ */ e(d, { as: "h2", children: i("pageTitle") }),
56
+ /* @__PURE__ */ e(b, { variant: "supporting", children: i("pageDescription") })
40
57
  ] }),
41
- /* @__PURE__ */ e(o, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(P, {}) }),
42
- /* @__PURE__ */ e(o, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(T, { name: "reason" }) }),
43
- /* @__PURE__ */ r(o, { flexDirection: "column", gap: 12, children: [
44
- /* @__PURE__ */ e(m, { as: "h3", children: t("sectionTitle") }),
58
+ /* @__PURE__ */ e(l, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(W, {}) }),
59
+ /* @__PURE__ */ e(l, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(L, { name: "reason" }) }),
60
+ /* @__PURE__ */ s(l, { flexDirection: "column", gap: 12, children: [
61
+ /* @__PURE__ */ e(d, { as: "h3", children: a("sectionTitle") }),
45
62
  /* @__PURE__ */ e(
46
- O,
63
+ V,
47
64
  {
48
65
  name: "includeAllEmployees",
49
- label: l("includeAllEmployeesLabel"),
50
- onChange: C
66
+ label: i("includeAllEmployeesLabel"),
67
+ onChange: S
51
68
  }
52
69
  ),
53
- !g && /* @__PURE__ */ e(
54
- F,
70
+ !P && /* @__PURE__ */ e(
71
+ R,
55
72
  {
56
73
  name: "selectedEmployeeUuids",
57
- label: t("sectionTitle"),
74
+ label: a("sectionTitle"),
58
75
  shouldVisuallyHideLabel: !0,
59
- placeholder: t("searchPlaceholder"),
60
- options: d,
61
- isLoading: u
76
+ placeholder: a("searchPlaceholder"),
77
+ options: y,
78
+ isLoading: h
62
79
  }
63
80
  )
64
81
  ] }),
65
- /* @__PURE__ */ e(o, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(
66
- S,
82
+ /* @__PURE__ */ e(l, { flexDirection: "column", gap: 20, children: /* @__PURE__ */ e(
83
+ j,
67
84
  {
68
85
  name: "skipRegularDeductions",
69
- label: i("title"),
70
- description: i("description"),
71
- options: x,
72
- convertValueToString: (n) => String(n)
86
+ label: t("title"),
87
+ description: t("description"),
88
+ options: A,
89
+ convertValueToString: (o) => String(o)
73
90
  }
74
91
  ) }),
75
- /* @__PURE__ */ e(o, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(y, { type: "submit", isLoading: s, isDisabled: s, children: l("continueCta") }) })
92
+ /* @__PURE__ */ e(
93
+ I,
94
+ {
95
+ wageTypeGroups: E,
96
+ config: m,
97
+ onEditClick: C
98
+ }
99
+ ),
100
+ g && /* @__PURE__ */ e(
101
+ M,
102
+ {
103
+ isOpen: !0,
104
+ defaultConfig: m,
105
+ onDone: x,
106
+ onCancel: T
107
+ }
108
+ ),
109
+ /* @__PURE__ */ e(l, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(D, { type: "submit", isLoading: p, isDisabled: p, children: i("continueCta") }) })
76
110
  ] });
77
111
  }
78
112
  export {
79
- q as OffCycleCreationPresentation
113
+ ie as OffCycleCreationPresentation
80
114
  };
81
115
  //# sourceMappingURL=OffCycleCreationPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffCycleCreationPresentation.js","sources":["../../../../src/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.tsx"],"sourcesContent":["import { useCallback } from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { OffCycleReasonSelectionPresentation } from '../OffCycleReasonSelection'\nimport { OffCyclePayPeriodDateFormPresentation } from '../OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation'\nimport type {\n OffCycleCreationFormData,\n OffCycleCreationPresentationProps,\n} from './OffCycleCreationTypes'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, RadioGroupField, SwitchField, MultiSelectComboBoxField } from '@/components/Common'\n\nexport function OffCycleCreationPresentation({\n employees,\n isLoadingEmployees,\n isPending,\n}: OffCycleCreationPresentationProps) {\n useI18n('Payroll.OffCycleCreation')\n useI18n('Payroll.OffCycleDeductionsSetting')\n useI18n('Payroll.EmployeeSelection')\n const { t } = useTranslation('Payroll.OffCycleCreation')\n const { t: tDeductions } = useTranslation('Payroll.OffCycleDeductionsSetting')\n const { t: tEmployees } = useTranslation('Payroll.EmployeeSelection')\n const { Heading, Text, Button } = useComponentContext()\n\n const { setValue, watch } = useFormContext<OffCycleCreationFormData>()\n const includeAllEmployees = watch('includeAllEmployees')\n\n const handleToggleIncludeAll = useCallback(\n (checked: boolean) => {\n if (checked) {\n setValue('selectedEmployeeUuids', [])\n }\n },\n [setValue],\n )\n\n const deductionsOptions = [\n {\n value: false,\n label: tDeductions('options.include.label'),\n },\n {\n value: true,\n label: tDeductions('options.skip.label'),\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('pageTitle')}</Heading>\n <Text variant=\"supporting\">{t('pageDescription')}</Text>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={20}>\n <OffCyclePayPeriodDateFormPresentation />\n </Flex>\n\n <Flex flexDirection=\"column\" gap={20}>\n <OffCycleReasonSelectionPresentation name=\"reason\" />\n </Flex>\n\n <Flex flexDirection=\"column\" gap={12}>\n <Heading as=\"h3\">{tEmployees('sectionTitle')}</Heading>\n <SwitchField\n name=\"includeAllEmployees\"\n label={t('includeAllEmployeesLabel')}\n onChange={handleToggleIncludeAll}\n />\n {!includeAllEmployees && (\n <MultiSelectComboBoxField\n name=\"selectedEmployeeUuids\"\n label={tEmployees('sectionTitle')}\n shouldVisuallyHideLabel\n placeholder={tEmployees('searchPlaceholder')}\n options={employees}\n isLoading={isLoadingEmployees}\n />\n )}\n </Flex>\n\n <Flex flexDirection=\"column\" gap={20}>\n <RadioGroupField<boolean>\n name=\"skipRegularDeductions\"\n label={tDeductions('title')}\n description={tDeductions('description')}\n options={deductionsOptions}\n convertValueToString={value => String(value)}\n />\n </Flex>\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button type=\"submit\" isLoading={isPending} isDisabled={isPending}>\n {t('continueCta')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["OffCycleCreationPresentation","employees","isLoadingEmployees","isPending","useI18n","t","useTranslation","tDeductions","tEmployees","Heading","Text","Button","useComponentContext","setValue","watch","useFormContext","includeAllEmployees","handleToggleIncludeAll","useCallback","checked","deductionsOptions","jsxs","Flex","jsx","OffCyclePayPeriodDateFormPresentation","OffCycleReasonSelectionPresentation","SwitchField","MultiSelectComboBoxField","RadioGroupField","value"],"mappings":";;;;;;;;;;;;;;AAaO,SAASA,EAA6B;AAAA,EAC3C,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,WAAAC;AACF,GAAsC;AACpC,EAAAC,EAAQ,0BAA0B,GAClCA,EAAQ,mCAAmC,GAC3CA,EAAQ,2BAA2B;AACnC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAE,GAAGC,MAAgBD,EAAe,mCAAmC,GACvE,EAAEE,MAAkBF,EAAe,2BAA2B,GAC9D,EAAE,SAAAG,GAAS,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GAE5B,EAAE,UAAAC,GAAU,OAAAC,EAAA,IAAUC,EAAA,GACtBC,IAAsBF,EAAM,qBAAqB,GAEjDG,IAAyBC;AAAA,IAC7B,CAACC,MAAqB;AACpB,MAAIA,KACFN,EAAS,yBAAyB,EAAE;AAAA,IAExC;AAAA,IACA,CAACA,CAAQ;AAAA,EAAA,GAGLO,IAAoB;AAAA,IACxB;AAAA,MACE,OAAO;AAAA,MACP,OAAOb,EAAY,uBAAuB;AAAA,IAAA;AAAA,IAE5C;AAAA,MACE,OAAO;AAAA,MACP,OAAOA,EAAY,oBAAoB;AAAA,IAAA;AAAA,EACzC;AAGF,SACE,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,U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AAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA,gBAAAC,EAACZ,GAAA,EAAO,MAAK,UAAS,WAAWR,GAAW,YAAYA,GACrD,UAAAE,EAAE,aAAa,GAClB,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"OffCycleCreationPresentation.js","sources":["../../../../src/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { OffCycleReasonSelectionPresentation } from '../OffCycleReasonSelection'\nimport { OffCyclePayPeriodDateFormPresentation } from '../OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation'\nimport { OffCycleTaxWithholdingTable } from '../OffCycleTaxWithholdingTable'\nimport { OffCycleTaxWithholdingModal } from '../OffCycleTaxWithholdingModal'\nimport {\n WAGE_TYPE_CATEGORIES,\n type WageTypeGroup,\n} from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type {\n OffCycleCreationFormData,\n OffCycleCreationPresentationProps,\n} from './OffCycleCreationTypes'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, RadioGroupField, SwitchField, MultiSelectComboBoxField } from '@/components/Common'\n\nexport function OffCycleCreationPresentation({\n employees,\n isLoadingEmployees,\n isPending,\n taxWithholdingConfig,\n isTaxWithholdingModalOpen,\n onTaxWithholdingEditClick,\n onTaxWithholdingModalDone,\n onTaxWithholdingModalCancel,\n}: OffCycleCreationPresentationProps) {\n useI18n('Payroll.OffCycleCreation')\n useI18n('Payroll.OffCycleDeductionsSetting')\n useI18n('Payroll.EmployeeSelection')\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleCreation')\n const { t: tDeductions } = useTranslation('Payroll.OffCycleDeductionsSetting')\n const { t: tEmployees } = useTranslation('Payroll.EmployeeSelection')\n const { t: tWithholding } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Heading, Text, Button } = useComponentContext()\n\n const wageTypeGroups: WageTypeGroup[] = useMemo(\n () =>\n WAGE_TYPE_CATEGORIES.map(category => {\n const group: WageTypeGroup = {\n category,\n label: tWithholding(`wageTypeGroups.${category}.label`),\n }\n if (category === 'regular' || category === 'supplemental') {\n group.description = tWithholding(`wageTypeGroups.${category}.description`)\n }\n return group\n }),\n [tWithholding],\n )\n\n const { setValue, watch } = useFormContext<OffCycleCreationFormData>()\n const includeAllEmployees = watch('includeAllEmployees')\n\n const handleToggleIncludeAll = useCallback(\n (checked: boolean) => {\n if (checked) {\n setValue('selectedEmployeeUuids', [])\n }\n },\n [setValue],\n )\n\n const deductionsOptions = [\n {\n value: false,\n label: tDeductions('options.include.label'),\n },\n {\n value: true,\n label: tDeductions('options.skip.label'),\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('pageTitle')}</Heading>\n <Text variant=\"supporting\">{t('pageDescription')}</Text>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={20}>\n <OffCyclePayPeriodDateFormPresentation />\n </Flex>\n\n <Flex flexDirection=\"column\" gap={20}>\n <OffCycleReasonSelectionPresentation name=\"reason\" />\n </Flex>\n\n <Flex flexDirection=\"column\" gap={12}>\n <Heading as=\"h3\">{tEmployees('sectionTitle')}</Heading>\n <SwitchField\n name=\"includeAllEmployees\"\n label={t('includeAllEmployeesLabel')}\n onChange={handleToggleIncludeAll}\n />\n {!includeAllEmployees && (\n <MultiSelectComboBoxField\n name=\"selectedEmployeeUuids\"\n label={tEmployees('sectionTitle')}\n shouldVisuallyHideLabel\n placeholder={tEmployees('searchPlaceholder')}\n options={employees}\n isLoading={isLoadingEmployees}\n />\n )}\n </Flex>\n\n <Flex flexDirection=\"column\" gap={20}>\n <RadioGroupField<boolean>\n name=\"skipRegularDeductions\"\n label={tDeductions('title')}\n description={tDeductions('description')}\n options={deductionsOptions}\n convertValueToString={value => String(value)}\n />\n </Flex>\n\n <OffCycleTaxWithholdingTable\n wageTypeGroups={wageTypeGroups}\n config={taxWithholdingConfig}\n onEditClick={onTaxWithholdingEditClick}\n />\n {isTaxWithholdingModalOpen && (\n <OffCycleTaxWithholdingModal\n isOpen\n defaultConfig={taxWithholdingConfig}\n onDone={onTaxWithholdingModalDone}\n onCancel={onTaxWithholdingModalCancel}\n />\n )}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button type=\"submit\" isLoading={isPending} isDisabled={isPending}>\n {t('continueCta')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["OffCycleCreationPresentation","employees","isLoadingEmployees","isPending","taxWithholdingConfig","isTaxWithholdingModalOpen","onTaxWithholdingEditClick","onTaxWithholdingModalDone","onTaxWithholdingModalCancel","useI18n","t","useTranslation","tDeductions","tEmployees","tWithholding","Heading","Text","Button","useComponentContext","wageTypeGroups","useMemo","WAGE_TYPE_CATEGORIES","category","group","setValue","watch","useFormContext","includeAllEmployees","handleToggleIncludeAll","useCallback","checked","deductionsOptions","jsxs","Flex","jsx","OffCyclePayPeriodDateFormPresentation","OffCycleReasonSelectionPresentation","SwitchField","MultiSelectComboBoxField","RadioGroupField","value","OffCycleTaxWithholdingTable","OffCycleTaxWithholdingModal"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,SAASA,GAA6B;AAAA,EAC3C,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,6BAAAC;AACF,GAAsC;AACpC,EAAAC,EAAQ,0BAA0B,GAClCA,EAAQ,mCAAmC,GAC3CA,EAAQ,2BAA2B,GACnCA,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAEC,MAAmBD,EAAe,mC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AAA,sBAIbyB,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA,gBAAAC,EAACjB,GAAA,EAAO,MAAK,UAAS,WAAWd,GAAW,YAAYA,GACrD,UAAAO,EAAE,aAAa,GAClB,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,6 @@
1
1
  import { OffCycleReason } from '../OffCycleReasonSelection';
2
2
  import { OffCyclePayPeriodDateFormData, OffCyclePayrollDateType } from '../OffCyclePayPeriodDateForm';
3
+ import { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes';
3
4
  import { MultiSelectComboBoxOption } from '../../Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes';
4
5
  import { BaseComponentInterface } from '../../Base/Base';
5
6
  export interface OffCycleCreationProps extends BaseComponentInterface<'Payroll.OffCycleCreation'> {
@@ -16,4 +17,9 @@ export interface OffCycleCreationPresentationProps {
16
17
  employees: MultiSelectComboBoxOption[];
17
18
  isLoadingEmployees: boolean;
18
19
  isPending?: boolean;
20
+ taxWithholdingConfig: OffCycleTaxWithholdingConfig;
21
+ isTaxWithholdingModalOpen: boolean;
22
+ onTaxWithholdingEditClick: () => void;
23
+ onTaxWithholdingModalDone: (config: OffCycleTaxWithholdingConfig) => void;
24
+ onTaxWithholdingModalCancel: () => void;
19
25
  }
@@ -5,10 +5,10 @@ import a from "./OffCyclePayPeriodDateFormPresentation.module.scss.js";
5
5
  import { useI18n as f } from "../../../i18n/I18n.js";
6
6
  import "../../../shared/constants.js";
7
7
  import "classnames";
8
- import { DatePickerField as r } from "../../Common/Fields/DatePickerField/DatePickerField.js";
9
8
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
10
9
  import "react";
11
10
  import { CheckboxField as u } from "../../Common/Fields/CheckboxField/CheckboxField.js";
11
+ import { DatePickerField as r } from "../../Common/Fields/DatePickerField/DatePickerField.js";
12
12
  function q() {
13
13
  f("Payroll.OffCyclePayPeriodDateForm");
14
14
  const { t: e } = h("Payroll.OffCyclePayPeriodDateForm"), { control: i, setValue: l } = m(), n = d({ control: i, name: "isCheckOnly" }), c = (s) => {
@@ -3,8 +3,8 @@ import { useMemo as n } from "react";
3
3
  import { useTranslation as s } from "react-i18next";
4
4
  import "../../../shared/constants.js";
5
5
  import "classnames";
6
- import { RadioGroupField as l } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
7
6
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import { RadioGroupField as l } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
8
  function d({
9
9
  name: e,
10
10
  onChange: i
@@ -0,0 +1,102 @@
1
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
2
+ import { useRef as R, useMemo as u } from "react";
3
+ import { useForm as C, useWatch as x, FormProvider as O } from "react-hook-form";
4
+ import { useTranslation as L } from "react-i18next";
5
+ import { WithholdingPayPeriod as N } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
6
+ import { WITHHOLDING_PAY_PERIOD_I18N_KEY as p } from "../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js";
7
+ import l from "./OffCycleTaxWithholdingModal.module.scss.js";
8
+ import "../../../shared/constants.js";
9
+ import "classnames";
10
+ import { ActionsLayout as T } from "../../Common/ActionsLayout/ActionsLayout.js";
11
+ import { useComponentContext as W } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import { useI18n as w } from "../../../i18n/I18n.js";
13
+ import { SelectField as D } from "../../Common/Fields/SelectField/SelectField.js";
14
+ import { RadioGroupField as H } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
15
+ function z({
16
+ isOpen: h,
17
+ defaultConfig: f,
18
+ onDone: g,
19
+ onCancel: r
20
+ }) {
21
+ w("Payroll.OffCycleTaxWithholding");
22
+ const { t: e } = L("Payroll.OffCycleTaxWithholding"), { Modal: y, Heading: i, Text: n, Button: s } = W(), d = R(null), a = C({
23
+ defaultValues: f
24
+ }), S = x({
25
+ control: a.control,
26
+ name: "withholdingPayPeriod"
27
+ }), b = u(
28
+ () => Object.values(N).map((m) => ({
29
+ value: m,
30
+ label: e(p[m])
31
+ })),
32
+ [e]
33
+ ), c = e(
34
+ p[S]
35
+ ).toLowerCase(), v = u(
36
+ () => [
37
+ {
38
+ value: "supplemental",
39
+ label: e("modal.supplementalSection.useSupplementalRate"),
40
+ description: e("modal.supplementalSection.useSupplementalRateDescription")
41
+ },
42
+ {
43
+ value: "regular",
44
+ label: e("modal.supplementalSection.useRegularRate", {
45
+ frequency: c
46
+ }),
47
+ description: e("modal.supplementalSection.useRegularRateDescription")
48
+ }
49
+ ],
50
+ [e, c]
51
+ ), P = a.handleSubmit(g);
52
+ return /* @__PURE__ */ o(
53
+ y,
54
+ {
55
+ isOpen: h,
56
+ onClose: r,
57
+ containerRef: d,
58
+ footer: /* @__PURE__ */ t(T, { children: [
59
+ /* @__PURE__ */ o(s, { variant: "secondary", onClick: r, children: e("modal.cancelButton") }),
60
+ /* @__PURE__ */ o(s, { variant: "primary", onClick: P, children: e("modal.doneButton") })
61
+ ] }),
62
+ children: /* @__PURE__ */ o(O, { ...a, children: /* @__PURE__ */ t("div", { className: l.content, children: [
63
+ /* @__PURE__ */ o(i, { as: "h2", children: e("modal.title") }),
64
+ /* @__PURE__ */ t("div", { className: l.section, children: [
65
+ /* @__PURE__ */ o(i, { as: "h3", children: e("modal.regularSection.title") }),
66
+ /* @__PURE__ */ o(n, { variant: "supporting", children: e("modal.regularSection.subtitle") }),
67
+ /* @__PURE__ */ t("div", { className: l.rateInfo, children: [
68
+ /* @__PURE__ */ o(n, { weight: "semibold", children: e("modal.regularSection.rateLabel") }),
69
+ /* @__PURE__ */ o(n, { variant: "supporting", children: e("modal.regularSection.rateDescription") })
70
+ ] }),
71
+ /* @__PURE__ */ o(
72
+ D,
73
+ {
74
+ name: "withholdingPayPeriod",
75
+ label: e("modal.regularSection.rateLabel"),
76
+ options: b,
77
+ shouldVisuallyHideLabel: !0,
78
+ portalContainer: d.current ?? void 0
79
+ }
80
+ )
81
+ ] }),
82
+ /* @__PURE__ */ o("hr", { className: l.divider }),
83
+ /* @__PURE__ */ t("div", { className: l.section, children: [
84
+ /* @__PURE__ */ o(i, { as: "h3", children: e("modal.supplementalSection.title") }),
85
+ /* @__PURE__ */ o(
86
+ H,
87
+ {
88
+ name: "withholdingRate",
89
+ label: e("modal.supplementalSection.title"),
90
+ options: v,
91
+ shouldVisuallyHideLabel: !0
92
+ }
93
+ )
94
+ ] })
95
+ ] }) })
96
+ }
97
+ );
98
+ }
99
+ export {
100
+ z as OffCycleTaxWithholdingModal
101
+ };
102
+ //# sourceMappingURL=OffCycleTaxWithholdingModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCycleTaxWithholdingModal.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { FormProvider, useForm, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { WITHHOLDING_PAY_PERIOD_I18N_KEY } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport styles from './OffCycleTaxWithholdingModal.module.scss'\nimport type { OffCycleTaxWithholdingModalProps } from './OffCycleTaxWithholdingModalTypes'\nimport { ActionsLayout, SelectField, RadioGroupField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport function OffCycleTaxWithholdingModal({\n isOpen,\n defaultConfig,\n onDone,\n onCancel,\n}: OffCycleTaxWithholdingModalProps) {\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Modal, Heading, Text, Button } = useComponentContext()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const formHandlers = useForm<OffCycleTaxWithholdingConfig>({\n defaultValues: defaultConfig,\n })\n\n const currentWithholdingPayPeriod = useWatch({\n control: formHandlers.control,\n name: 'withholdingPayPeriod',\n })\n\n const frequencyOptions = useMemo(\n () =>\n Object.values(WithholdingPayPeriod).map(value => ({\n value,\n label: t(WITHHOLDING_PAY_PERIOD_I18N_KEY[value]),\n })),\n [t],\n )\n\n const frequencyDisplayText = t(\n WITHHOLDING_PAY_PERIOD_I18N_KEY[currentWithholdingPayPeriod],\n ).toLowerCase()\n\n const withholdingRateOptions = useMemo(\n () => [\n {\n value: 'supplemental' as const,\n label: t('modal.supplementalSection.useSupplementalRate'),\n description: t('modal.supplementalSection.useSupplementalRateDescription'),\n },\n {\n value: 'regular' as const,\n label: t('modal.supplementalSection.useRegularRate', {\n frequency: frequencyDisplayText,\n }),\n description: t('modal.supplementalSection.useRegularRateDescription'),\n },\n ],\n [t, frequencyDisplayText],\n )\n\n const handleSubmit = formHandlers.handleSubmit(onDone)\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('modal.cancelButton')}\n </Button>\n <Button variant=\"primary\" onClick={handleSubmit}>\n {t('modal.doneButton')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.content}>\n <Heading as=\"h2\">{t('modal.title')}</Heading>\n\n <div className={styles.section}>\n <Heading as=\"h3\">{t('modal.regularSection.title')}</Heading>\n <Text variant=\"supporting\">{t('modal.regularSection.subtitle')}</Text>\n\n <div className={styles.rateInfo}>\n <Text weight=\"semibold\">{t('modal.regularSection.rateLabel')}</Text>\n <Text variant=\"supporting\">{t('modal.regularSection.rateDescription')}</Text>\n </div>\n\n <SelectField\n name=\"withholdingPayPeriod\"\n label={t('modal.regularSection.rateLabel')}\n options={frequencyOptions}\n shouldVisuallyHideLabel\n portalContainer={modalContainerRef.current ?? undefined}\n />\n </div>\n\n <hr className={styles.divider} />\n\n <div className={styles.section}>\n <Heading as=\"h3\">{t('modal.supplementalSection.title')}</Heading>\n <RadioGroupField\n name=\"withholdingRate\"\n label={t('modal.supplementalSection.title')}\n options={withholdingRateOptions}\n shouldVisuallyHideLabel\n />\n </div>\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["OffCycleTaxWithholdingModal","isOpen","defaultConfig","onDone","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","useComponentContext","modalContainerRef","useRef","formHandlers","useForm","currentWithholdingPayPeriod","useWatch","frequencyOptions","useMemo","WithholdingPayPeriod","value","WITHHOLDING_PAY_PERIOD_I18N_KEY","frequencyDisplayText","withholdingRateOptions","handleSubmit","jsx","ActionsLayout","FormProvider","styles","jsxs","SelectField","RadioGroupField"],"mappings":";;;;;;;;;;;;;;AAYO,SAASA,EAA4B;AAAA,EAC1C,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AACF,GAAqC;AACnC,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,OAAAC,GAAO,SAAAC,GAAS,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GACnCC,IAAoBC,EAAuB,IAAI,GAE/CC,IAAeC,EAAsC;AAAA,IACzD,eAAed;AAAA,EAAA,CAChB,GAEKe,IAA8BC,EAAS;AAAA,IAC3C,SAASH,EAAa;AAAA,IACtB,MAAM;AAAA,EAAA,CACP,GAEKI,IAAmBC;AAAA,IACvB,MACE,OAAO,OAAOC,CAAoB,EAAE,IAAI,CAAAC,OAAU;AAAA,MAChD,OAAAA;AAAA,MACA,OAAOhB,EAAEiB,EAAgCD,CAAK,CAAC;AAAA,IAAA,EAC/C;AAAA,IACJ,CAAChB,CAAC;AAAA,EAAA,GAGEkB,IA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;AAAA,YAAA,gBAAAH,EAACjB,GAAA,EAAK,QAAO,YAAY,UAAAJ,EAAE,gCAAgC,GAAE;AAAA,8BAC5DI,GAAA,EAAK,SAAQ,cAAc,UAAAJ,EAAE,sCAAsC,EAAA,CAAE;AAAA,UAAA,GACxE;AAAA,UAEA,gBAAAqB;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO1B,EAAE,gCAAgC;AAAA,cACzC,SAASa;AAAA,cACT,yBAAuB;AAAA,cACvB,iBAAiBN,EAAkB,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QAChD,GACF;AAAA,QAEA,gBAAAc,EAAC,MAAA,EAAG,WAAWG,EAAO,QAAA,CAAS;AAAA,QAE/B,gBAAAC,EAAC,OAAA,EAAI,WAAWD,EAAO,SACrB,UAAA;AAAA,UAAA,gBAAAH,EAAClB,GAAA,EAAQ,IAAG,MAAM,UAAAH,EAAE,iCAAiC,GAAE;AAAA,UACvD,gBAAAqB;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO3B,EAAE,iCAAiC;AAAA,cAC1C,SAASmB;AAAA,cACT,yBAAuB;AAAA,YAAA;AAAA,UAAA;AAAA,QACzB,EAAA,CACF;AAAA,MAAA,EAAA,CACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,14 @@
1
+ const t = "_content_4ea1b_1", e = "_section_4ea1b_7", n = "_rateInfo_4ea1b_13", o = "_divider_4ea1b_19", _ = {
2
+ content: t,
3
+ section: e,
4
+ rateInfo: n,
5
+ divider: o
6
+ };
7
+ export {
8
+ t as content,
9
+ _ as default,
10
+ o as divider,
11
+ n as rateInfo,
12
+ e as section
13
+ };
14
+ //# sourceMappingURL=OffCycleTaxWithholdingModal.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCycleTaxWithholdingModal.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,52 @@
1
+ import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
+ import { useTranslation as f } from "react-i18next";
3
+ import n from "./OffCycleTaxWithholdingTable.module.scss.js";
4
+ import { WITHHOLDING_PAY_PERIOD_I18N_KEY as b } from "./OffCycleTaxWithholdingTableTypes.js";
5
+ import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import { useI18n as u } from "../../../i18n/I18n.js";
7
+ function k({
8
+ wageTypeGroups: s,
9
+ config: i,
10
+ onEditClick: d
11
+ }) {
12
+ u("Payroll.OffCycleTaxWithholding");
13
+ const { t: e } = f("Payroll.OffCycleTaxWithholding"), { Table: c, Button: h, Heading: y, Text: r } = g(), o = e(
14
+ b[i.withholdingPayPeriod]
15
+ ).toLowerCase(), m = {
16
+ regular: e("table.taxedAsRegular", { frequency: o }),
17
+ supplemental: i.withholdingRate === "supplemental" ? e("table.taxedAsSupplemental") : e("table.taxedAsRegular", { frequency: o }),
18
+ reimbursement: e("table.taxedAsNotTaxed")
19
+ }, p = [
20
+ { key: "wage-types", content: e("table.headers.wageTypes") },
21
+ { key: "taxed-as", content: e("table.headers.taxedAs") }
22
+ ], x = s.map((t) => ({
23
+ key: t.category,
24
+ data: [
25
+ {
26
+ key: `${t.category}-type`,
27
+ content: /* @__PURE__ */ l("div", { className: n.wageTypeCell, children: [
28
+ /* @__PURE__ */ a(r, { weight: "semibold", children: t.label }),
29
+ t.description && /* @__PURE__ */ a(r, { variant: "supporting", children: t.description })
30
+ ] })
31
+ },
32
+ {
33
+ key: `${t.category}-taxed-as`,
34
+ content: m[t.category]
35
+ }
36
+ ]
37
+ }));
38
+ return /* @__PURE__ */ l("div", { className: n.root, children: [
39
+ /* @__PURE__ */ l("div", { className: n.header, children: [
40
+ /* @__PURE__ */ l("div", { className: n.headerContent, children: [
41
+ /* @__PURE__ */ a(y, { as: "h3", children: e("title") }),
42
+ /* @__PURE__ */ a(r, { variant: "supporting", children: e("description") })
43
+ ] }),
44
+ /* @__PURE__ */ a(h, { variant: "secondary", onClick: d, children: e("editButton") })
45
+ ] }),
46
+ /* @__PURE__ */ a(c, { "aria-label": e("title"), headers: p, rows: x, className: n.table })
47
+ ] });
48
+ }
49
+ export {
50
+ k as OffCycleTaxWithholdingTable
51
+ };
52
+ //# sourceMappingURL=OffCycleTaxWithholdingTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCycleTaxWithholdingTable.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './OffCycleTaxWithholdingTable.module.scss'\nimport {\n WITHHOLDING_PAY_PERIOD_I18N_KEY,\n type OffCycleTaxWithholdingTableProps,\n type WageTypeCategory,\n} from './OffCycleTaxWithholdingTableTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport type { TableData, TableRow } from '@/components/Common/UI/Table/TableTypes'\n\nexport function OffCycleTaxWithholdingTable({\n wageTypeGroups,\n config,\n onEditClick,\n}: OffCycleTaxWithholdingTableProps) {\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Table, Button, Heading, Text } = useComponentContext()\n\n const frequencyText = t(\n WITHHOLDING_PAY_PERIOD_I18N_KEY[config.withholdingPayPeriod],\n ).toLowerCase()\n\n const taxedAsByCategory: Record<WageTypeCategory, string> = {\n regular: t('table.taxedAsRegular', { frequency: frequencyText }),\n supplemental:\n config.withholdingRate === 'supplemental'\n ? t('table.taxedAsSupplemental')\n : t('table.taxedAsRegular', { frequency: frequencyText }),\n reimbursement: t('table.taxedAsNotTaxed'),\n }\n\n const headers: TableData[] = [\n { key: 'wage-types', content: t('table.headers.wageTypes') },\n { key: 'taxed-as', content: t('table.headers.taxedAs') },\n ]\n\n const rows: TableRow[] = wageTypeGroups.map(group => ({\n key: group.category,\n data: [\n {\n key: `${group.category}-type`,\n content: (\n <div className={styles.wageTypeCell}>\n <Text weight=\"semibold\">{group.label}</Text>\n {group.description && <Text variant=\"supporting\">{group.description}</Text>}\n </div>\n ),\n },\n {\n key: `${group.category}-taxed-as`,\n content: taxedAsByCategory[group.category],\n },\n ],\n }))\n\n return (\n <div className={styles.root}>\n <div className={styles.header}>\n <div className={styles.headerContent}>\n <Heading as=\"h3\">{t('title')}</Heading>\n <Text variant=\"supporting\">{t('description')}</Text>\n </div>\n <Button variant=\"secondary\" onClick={onEditClick}>\n {t('editButton')}\n </Button>\n </div>\n <Table aria-label={t('title')} headers={headers} rows={rows} className={styles.table} />\n </div>\n )\n}\n"],"names":["OffCycleTaxWithholdingTable","wageTypeGroups","config","onEditClick","useI18n","t","useTranslation","Table","Button","Heading","Text","useComponentContext","frequencyText","WITHHOLDING_PAY_PERIOD_I18N_KEY","taxedAsByCategory","headers","rows","group","jsxs","styles","jsx"],"mappings":";;;;;;AAWO,SAASA,EAA4B;AAAA,EAC1C,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,GAAqC;AACnC,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA,GAEnCC,IAAgBP;AAAA,IACpBQ,EAAgCX,EAAO,oBAAoB;AAAA,EAAA,EAC3D,YAAA,GAEIY,IAAsD;AAAA,IAC1D,SAAST,EAAE,wBAAwB,EAAE,WAAWO,GAAe;AAAA,IAC/D,cACEV,EAAO,oBAAoB,iBACvBG,EAAE,2BAA2B,IAC7BA,EAAE,wBAAwB,EAAE,WAAWO,EAAA,CAAe;AAAA,IAC5D,eAAeP,EAAE,uBAAuB;AAAA,EAAA,GAGpCU,IAAuB;AAAA,IAC3B,EAAE,KAAK,cAAc,SAASV,EAAE,yBAAyB,EAAA;AAAA,IACzD,EAAE,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t = "_headerContent_izowe_14", _ = "_wageTypeCell_izowe_20", a = "_table_izowe_26", n = {
2
+ root: e,
3
+ header: o,
4
+ headerContent: t,
5
+ wageTypeCell: _,
6
+ table: a
7
+ };
8
+ export {
9
+ n as default,
10
+ o as header,
11
+ t as headerContent,
12
+ e as root,
13
+ a as table,
14
+ _ as wageTypeCell
15
+ };
16
+ //# sourceMappingURL=OffCycleTaxWithholdingTable.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCycleTaxWithholdingTable.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,10 +1,20 @@
1
1
  import { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls';
2
2
  import { WithholdingType } from '../OffCycleReasonSelection';
3
+ export declare const WITHHOLDING_PAY_PERIOD_I18N_KEY: {
4
+ readonly "Every week": "payPeriodFrequency.everyWeek";
5
+ readonly "Every other week": "payPeriodFrequency.everyOtherWeek";
6
+ readonly "Twice per month": "payPeriodFrequency.twicePerMonth";
7
+ readonly Monthly: "payPeriodFrequency.monthly";
8
+ readonly Quarterly: "payPeriodFrequency.quarterly";
9
+ readonly Semiannually: "payPeriodFrequency.semiannually";
10
+ readonly Annually: "payPeriodFrequency.annually";
11
+ };
12
+ export declare const WAGE_TYPE_CATEGORIES: readonly ["regular", "supplemental", "reimbursement"];
13
+ export type WageTypeCategory = (typeof WAGE_TYPE_CATEGORIES)[number];
3
14
  export interface WageTypeGroup {
4
- id: string;
15
+ category: WageTypeCategory;
5
16
  label: string;
6
17
  description?: string;
7
- category: 'regular' | 'supplemental' | 'reimbursement';
8
18
  }
9
19
  export interface OffCycleTaxWithholdingConfig {
10
20
  withholdingPayPeriod: WithholdingPayPeriod;
@@ -0,0 +1,15 @@
1
+ import { WithholdingPayPeriod as e } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
2
+ const y = {
3
+ [e.EveryWeek]: "payPeriodFrequency.everyWeek",
4
+ [e.EveryOtherWeek]: "payPeriodFrequency.everyOtherWeek",
5
+ [e.TwicePerMonth]: "payPeriodFrequency.twicePerMonth",
6
+ [e.Monthly]: "payPeriodFrequency.monthly",
7
+ [e.Quarterly]: "payPeriodFrequency.quarterly",
8
+ [e.Semiannually]: "payPeriodFrequency.semiannually",
9
+ [e.Annually]: "payPeriodFrequency.annually"
10
+ }, n = ["regular", "supplemental", "reimbursement"];
11
+ export {
12
+ n as WAGE_TYPE_CATEGORIES,
13
+ y as WITHHOLDING_PAY_PERIOD_I18N_KEY
14
+ };
15
+ //# sourceMappingURL=OffCycleTaxWithholdingTableTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCycleTaxWithholdingTableTypes.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.ts"],"sourcesContent":["import { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport type { WithholdingType } from '@/components/Payroll/OffCycleReasonSelection'\n\nexport const WITHHOLDING_PAY_PERIOD_I18N_KEY = {\n [WithholdingPayPeriod.EveryWeek]: 'payPeriodFrequency.everyWeek',\n [WithholdingPayPeriod.EveryOtherWeek]: 'payPeriodFrequency.everyOtherWeek',\n [WithholdingPayPeriod.TwicePerMonth]: 'payPeriodFrequency.twicePerMonth',\n [WithholdingPayPeriod.Monthly]: 'payPeriodFrequency.monthly',\n [WithholdingPayPeriod.Quarterly]: 'payPeriodFrequency.quarterly',\n [WithholdingPayPeriod.Semiannually]: 'payPeriodFrequency.semiannually',\n [WithholdingPayPeriod.Annually]: 'payPeriodFrequency.annually',\n} as const\n\nexport const WAGE_TYPE_CATEGORIES = ['regular', 'supplemental', 'reimbursement'] as const\nexport type WageTypeCategory = (typeof WAGE_TYPE_CATEGORIES)[number]\n\nexport interface WageTypeGroup {\n category: WageTypeCategory\n label: string\n description?: string\n}\n\nexport interface OffCycleTaxWithholdingConfig {\n withholdingPayPeriod: WithholdingPayPeriod\n withholdingRate: WithholdingType\n}\n\nexport interface OffCycleTaxWithholdingTableProps {\n wageTypeGroups: WageTypeGroup[]\n config: OffCycleTaxWithholdingConfig\n onEditClick: () => void\n}\n"],"names":["WITHHOLDING_PAY_PERIOD_I18N_KEY","WithholdingPayPeriod","WAGE_TYPE_CATEGORIES"],"mappings":";AAGO,MAAMA,IAAkC;AAAA,EAC7C,CAACC,EAAqB,SAAS,GAAG;AAAA,EAClC,CAACA,EAAqB,cAAc,GAAG;AAAA,EACvC,CAACA,EAAqB,aAAa,GAAG;AAAA,EACtC,CAACA,EAAqB,OAAO,GAAG;AAAA,EAChC,CAACA,EAAqB,SAAS,GAAG;AAAA,EAClC,CAACA,EAAqB,YAAY,GAAG;AAAA,EACrC,CAACA,EAAqB,QAAQ,GAAG;AACnC,GAEaC,IAAuB,CAAC,WAAW,gBAAgB,eAAe;"}
@@ -1,3 +1,4 @@
1
1
  import "./types/i18next.d.ts"
2
2
  export { OffCycleTaxWithholdingTable } from './OffCycleTaxWithholdingTable';
3
- export type { OffCycleTaxWithholdingConfig, OffCycleTaxWithholdingTableProps, WageTypeGroup, } from './OffCycleTaxWithholdingTableTypes';
3
+ export { WITHHOLDING_PAY_PERIOD_I18N_KEY, WAGE_TYPE_CATEGORIES, } from './OffCycleTaxWithholdingTableTypes';
4
+ export type { OffCycleTaxWithholdingConfig, OffCycleTaxWithholdingTableProps, WageTypeCategory, WageTypeGroup, } from './OffCycleTaxWithholdingTableTypes';