@gusto/embedded-react-sdk 0.10.6 → 0.10.7-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 (137) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/Common/SignatureForm/SignatureFormActions.js +7 -8
  3. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  4. package/dist/components/Common/SignatureForm/SignatureFormFields.js +4 -5
  5. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  6. package/dist/components/Common/TaxInputs/TaxInputs.d.ts +5 -1
  7. package/dist/components/Common/TaxInputs/TaxInputs.js +64 -56
  8. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  9. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  10. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  18. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  20. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  21. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  22. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  23. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  24. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  25. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  26. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  27. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  28. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  29. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  30. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  31. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  32. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  33. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  34. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  35. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  36. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  37. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  38. package/dist/components/Company/Industry/Actions.js +5 -6
  39. package/dist/components/Company/Industry/Actions.js.map +1 -1
  40. package/dist/components/Company/Industry/Context.js +6 -7
  41. package/dist/components/Company/Industry/Context.js.map +1 -1
  42. package/dist/components/Company/Industry/Edit.js +10 -11
  43. package/dist/components/Company/Industry/Edit.js.map +1 -1
  44. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  45. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  47. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  48. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  49. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  50. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  51. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  52. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  53. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  54. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  55. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  56. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  57. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  58. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  59. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  60. package/dist/components/Company/StateTaxes/StateTaxes.js +44 -23
  61. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  62. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +8 -6
  63. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +16 -15
  64. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  65. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  66. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  67. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +65 -59
  68. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  69. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  70. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  71. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  72. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  73. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  74. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  75. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  76. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  77. package/dist/components/Company/StateTaxes/stateTaxesReducer.d.ts +20 -0
  78. package/dist/components/Company/StateTaxes/stateTaxesReducer.js +40 -0
  79. package/dist/components/Company/StateTaxes/stateTaxesReducer.js.map +1 -0
  80. package/dist/components/Contractor/Address/Form.js +4 -4
  81. package/dist/components/Contractor/Address/useAddress.js +5 -6
  82. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  83. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  84. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  85. package/dist/components/Employee/Compensation/Actions.js +1 -1
  86. package/dist/components/Employee/Compensation/List.js +5 -6
  87. package/dist/components/Employee/Compensation/List.js.map +1 -1
  88. package/dist/components/Employee/Deductions/Actions.js +8 -9
  89. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  90. package/dist/components/Employee/Deductions/DeductionForm.js +2 -3
  91. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  92. package/dist/components/Employee/Deductions/DeductionsList.js +2 -3
  93. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  94. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +2 -3
  95. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  96. package/dist/components/Employee/Deductions/useDeductions.js +5 -6
  97. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  98. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  99. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  100. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  101. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  102. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  103. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  104. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  105. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  106. package/dist/components/Employee/EmployeeList/List.js +12 -12
  107. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  108. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  109. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  110. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  111. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  112. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  113. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  114. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  115. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  116. package/dist/components/Employee/Profile/Actions.js +6 -7
  117. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  118. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  119. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  120. package/dist/components/Employee/Profile/useProfile.js +3 -4
  121. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  122. package/dist/components/Employee/Taxes/Actions.js +7 -8
  123. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  124. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  125. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  126. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  127. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  128. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  129. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  130. package/dist/i18n/en/Company.StateTaxes.json.js +2 -1
  131. package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
  132. package/dist/style.css +1 -1
  133. package/dist/types/i18next.d.ts +1 -0
  134. package/package.json +2 -2
  135. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +0 -5
  136. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +0 -48
  137. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +0 -1
@@ -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;"}
@@ -1,14 +1,13 @@
1
1
  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
- import "../../../../shared/constants.js";
5
- import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function l() {
8
- const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
9
- return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
4
+ import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ function f() {
7
+ const { t: o } = i("Company.StateTaxes"), n = m(), { handleContinue: r } = e();
8
+ return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
10
9
  }
11
10
  export {
12
- l as Actions
11
+ f as Actions
13
12
  };
14
13
  //# 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,EAAoB,GACjC,EAAE,gBAAAC,EAAe,IAAIC,EAAkB;AAC7C,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAEJ,EAAA,kBAAkB,EACvB,CAAA,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,EAAoB,GACjC,EAAE,gBAAAC,EAAe,IAAIC,EAAkB;AAC7C,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAEJ,EAAA,kBAAkB,EACvB,CAAA,GACF;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  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
- import "../../../../shared/constants.js";
5
4
  import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
6
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
6
  import { useDataView as d } from "../../../Common/DataView/useDataView.js";
8
7
  import { DataView as C } from "../../../Common/DataView/DataView.js";
9
- const k = () => {
10
- const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
11
- data: r,
8
+ const S = () => {
9
+ const { stateTaxRequirements: n, handleChange: r } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
10
+ data: n,
12
11
  columns: [
13
12
  {
14
13
  key: "state",
@@ -26,7 +25,7 @@ const k = () => {
26
25
  {
27
26
  variant: "secondary",
28
27
  onClick: () => {
29
- n(e.state);
28
+ r(e.state);
30
29
  },
31
30
  children: e.setupComplete ? t("editStateTaxCta") : t("continueStateTaxSetupCta")
32
31
  }
@@ -36,6 +35,6 @@ const k = () => {
36
35
  return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
37
36
  };
38
37
  export {
39
- k as List
38
+ S as List
40
39
  };
41
40
  //# 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":";;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAa,IAAIC,EAAkB,GAC3DC,IAAaC,EAAoB,GAEjC,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAeS,MACb,gBAAAC,EAAA,QAAA,EAAM,UAAWJ,EAAAG,EAAY,KAAqC,GAAE;AAAA,MAEhF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAeA,6BAGjB,UAAC,gBAAAC,EAAAP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,EACvE,CAAA,GACF;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAeA,MAErB,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,IAClF;AAAA,IAIJ,YAAY,MACV,gBAAAC,EAACC,GAAU,EAAA,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAG,CAAA;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAS,EAAA,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
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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ants.js";
11
11
  import "dompurify";
12
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = t("StateTaxesListContext");
14
+ const [T, c] = t("StateTaxesListContext");
16
15
  export {
17
- d as StateTaxesListProvider,
18
- c as useStateTaxesList
16
+ c as StateTaxesListProvider,
17
+ T as useStateTaxesList
19
18
  };
20
19
  //# 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;"}
@@ -0,0 +1,20 @@
1
+ import { componentEvents } from '../../../shared/constants';
2
+ export type StateTaxesState = 'viewStateTaxes' | 'editStateTaxes' | 'done';
3
+ export interface StateTaxesStateData {
4
+ state: StateTaxesState;
5
+ selectedState?: string;
6
+ }
7
+ export type StateTaxesAction = {
8
+ type: typeof componentEvents.COMPANY_STATE_TAX_EDIT;
9
+ payload: {
10
+ state: string;
11
+ };
12
+ } | {
13
+ type: typeof componentEvents.COMPANY_STATE_TAX_UPDATED;
14
+ } | {
15
+ type: typeof componentEvents.COMPANY_STATE_TAX_DONE;
16
+ } | {
17
+ type: typeof componentEvents.CANCEL;
18
+ };
19
+ export declare const initialState: StateTaxesStateData;
20
+ export declare function stateTaxesReducer(state: StateTaxesStateData, action: StateTaxesAction): StateTaxesStateData;
@@ -0,0 +1,40 @@
1
+ import { componentEvents as t } from "../../../shared/constants.js";
2
+ const T = {
3
+ state: "viewStateTaxes",
4
+ selectedState: void 0
5
+ };
6
+ function d(e, a) {
7
+ switch (a.type) {
8
+ case t.COMPANY_STATE_TAX_EDIT:
9
+ return {
10
+ ...e,
11
+ state: "editStateTaxes",
12
+ selectedState: a.payload.state
13
+ };
14
+ case t.COMPANY_STATE_TAX_UPDATED:
15
+ return {
16
+ ...e,
17
+ state: "viewStateTaxes",
18
+ selectedState: void 0
19
+ };
20
+ case t.CANCEL:
21
+ return {
22
+ ...e,
23
+ state: "viewStateTaxes",
24
+ selectedState: void 0
25
+ };
26
+ case t.COMPANY_STATE_TAX_DONE:
27
+ return {
28
+ ...e,
29
+ state: "done",
30
+ selectedState: void 0
31
+ };
32
+ default:
33
+ return e;
34
+ }
35
+ }
36
+ export {
37
+ T as initialState,
38
+ d as stateTaxesReducer
39
+ };
40
+ //# sourceMappingURL=stateTaxesReducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stateTaxesReducer.js","sources":["../../../../src/components/Company/StateTaxes/stateTaxesReducer.ts"],"sourcesContent":["import { componentEvents } from '@/shared/constants'\n\nexport type StateTaxesState = 'viewStateTaxes' | 'editStateTaxes' | 'done'\n\nexport interface StateTaxesStateData {\n state: StateTaxesState\n selectedState?: string\n}\n\nexport type StateTaxesAction =\n | { type: typeof componentEvents.COMPANY_STATE_TAX_EDIT; payload: { state: string } }\n | { type: typeof componentEvents.COMPANY_STATE_TAX_UPDATED }\n | { type: typeof componentEvents.COMPANY_STATE_TAX_DONE }\n | { type: typeof componentEvents.CANCEL }\n\nexport const initialState: StateTaxesStateData = {\n state: 'viewStateTaxes',\n selectedState: undefined,\n}\n\nexport function stateTaxesReducer(\n state: StateTaxesStateData,\n action: StateTaxesAction,\n): StateTaxesStateData {\n switch (action.type) {\n case componentEvents.COMPANY_STATE_TAX_EDIT:\n return {\n ...state,\n state: 'editStateTaxes',\n selectedState: action.payload.state,\n }\n\n case componentEvents.COMPANY_STATE_TAX_UPDATED:\n return {\n ...state,\n state: 'viewStateTaxes',\n selectedState: undefined,\n }\n\n case componentEvents.CANCEL:\n return {\n ...state,\n state: 'viewStateTaxes',\n selectedState: undefined,\n }\n\n case componentEvents.COMPANY_STATE_TAX_DONE:\n return {\n ...state,\n state: 'done',\n selectedState: undefined,\n }\n\n default:\n return state\n }\n}\n"],"names":["initialState","stateTaxesReducer","state","action","componentEvents"],"mappings":";AAeO,MAAMA,IAAoC;AAAA,EAC/C,OAAO;AAAA,EACP,eAAe;AACjB;AAEgB,SAAAC,EACdC,GACAC,GACqB;AACrB,UAAQA,EAAO,MAAM;AAAA,IACnB,KAAKC,EAAgB;AACZ,aAAA;AAAA,QACL,GAAGF;AAAA,QACH,OAAO;AAAA,QACP,eAAeC,EAAO,QAAQ;AAAA,MAChC;AAAA,IAEF,KAAKC,EAAgB;AACZ,aAAA;AAAA,QACL,GAAGF;AAAA,QACH,OAAO;AAAA,QACP,eAAe;AAAA,MACjB;AAAA,IAEF,KAAKE,EAAgB;AACZ,aAAA;AAAA,QACL,GAAGF;AAAA,QACH,OAAO;AAAA,QACP,eAAe;AAAA,MACjB;AAAA,IAEF,KAAKE,EAAgB;AACZ,aAAA;AAAA,QACL,GAAGF;AAAA,QACH,OAAO;AAAA,QACP,eAAe;AAAA,MACjB;AAAA,IAEF;AACS,aAAAA;AAAA,EAAA;AAEb;"}
@@ -1,12 +1,12 @@
1
1
  import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
- import { STATES_ABBR as o } from "../../../shared/constants.js";
4
- import { Grid as l } from "../../Common/Grid/Grid.js";
3
+ import { Grid as o } from "../../Common/Grid/Grid.js";
4
+ import { STATES_ABBR as l } from "../../../shared/constants.js";
5
5
  import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
6
6
  import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
7
7
  function g() {
8
8
  const { t: e } = i("Contractor.Address");
9
- return /* @__PURE__ */ s(l, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
9
+ return /* @__PURE__ */ s(o, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
10
10
  /* @__PURE__ */ r(
11
11
  t,
12
12
  {
@@ -30,7 +30,7 @@ function g() {
30
30
  m,
31
31
  {
32
32
  name: "state",
33
- options: o.map((a) => ({
33
+ options: l.map((a) => ({
34
34
  label: e(`statesHash.${a}`, { ns: "common", defaultValue: a }),
35
35
  value: a
36
36
  })),
@@ -11,20 +11,19 @@ import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
12
  import "dompurify";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
16
- const u = t.object({
15
+ const f = t.object({
17
16
  street1: t.string().min(1),
18
17
  street2: t.string().optional(),
19
18
  city: t.string().min(1),
20
19
  state: t.string().min(1),
21
20
  zip: t.string().min(1)
22
- }), [z, b] = r(
21
+ }), [u, z] = r(
23
22
  "ContractorAddressContext"
24
23
  );
25
24
  export {
26
- u as AddressFormSchema,
27
- b as AddressProvider,
28
- z as useAddress
25
+ f as AddressFormSchema,
26
+ z as AddressProvider,
27
+ u as useAddress
29
28
  };
30
29
  //# sourceMappingURL=useAddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAiBa,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAO,EAAE,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
1
+ {"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAiBa,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAO,EAAE,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
@@ -1,9 +1,8 @@
1
1
  import { jsxs as n, Fragment as o, jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as t } from "react-i18next";
3
- import "../../../shared/constants.js";
4
3
  import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
5
4
  import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
6
- function p({ bankAccount: u }) {
5
+ function b({ bankAccount: u }) {
7
6
  const { t: e } = t("Contractor.PaymentMethod", { keyPrefix: "bankAccountForm" });
8
7
  return /* @__PURE__ */ n(o, { children: [
9
8
  /* @__PURE__ */ r(
@@ -48,6 +47,6 @@ function p({ bankAccount: u }) {
48
47
  ] });
49
48
  }
50
49
  export {
51
- p as BankAccountForm
50
+ b as BankAccountForm
52
51
  };
53
52
  //# sourceMappingURL=BankAccountForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BankAccountForm.js","sources":["../../../../src/components/Contractor/PaymentMethod/BankAccountForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { BankAccountFormProps } from './types'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\n\nexport function BankAccountForm({ bankAccount }: BankAccountFormProps) {\n const { t } = useTranslation('Contractor.PaymentMethod', { keyPrefix: 'bankAccountForm' })\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","bankAccount","t","useTranslation","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;AAIgB,SAAAA,EAAgB,EAAE,aAAAC,KAAqC;AAC/D,QAAA,EAAE,GAAAC,MAAMC,EAAe,4BAA4B,EAAE,WAAW,mBAAmB;AAEzF,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,WAAW;AAAA,QACpB,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,YAAU;AAAA,QACV,aAAaA,EAAE,0BAA0B;AAAA,QACzC,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC7C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,cAAcA,EAAE,2BAA2B;AAAA,QAC3C,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEA,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAON,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAE;AAAA,UACrD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAE;AAAA,QAAA;AAAA,MACrD;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"BankAccountForm.js","sources":["../../../../src/components/Contractor/PaymentMethod/BankAccountForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { BankAccountFormProps } from './types'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\n\nexport function BankAccountForm({ bankAccount }: BankAccountFormProps) {\n const { t } = useTranslation('Contractor.PaymentMethod', { keyPrefix: 'bankAccountForm' })\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","bankAccount","t","useTranslation","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;AAIgB,SAAAA,EAAgB,EAAE,aAAAC,KAAqC;AAC/D,QAAA,EAAE,GAAAC,MAAMC,EAAe,4BAA4B,EAAE,WAAW,mBAAmB;AAEzF,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,WAAW;AAAA,QACpB,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,YAAU;AAAA,QACV,aAAaA,EAAE,0BAA0B;AAAA,QACzC,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC7C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,cAAcA,EAAE,2BAA2B;AAAA,QAC3C,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEA,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAON,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAE;AAAA,UACrD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAE;AAAA,QAAA;AAAA,MACrD;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -2,8 +2,8 @@ import { jsxs as A, jsx as i } from "react/jsx-runtime";
2
2
  import { useFormContext as l, useWatch as d } from "react-hook-form";
3
3
  import { useTranslation as T } from "react-i18next";
4
4
  import { useCompensation as O } from "./useCompensation.js";
5
- import { FlsaStatus as a } from "../../../shared/constants.js";
6
5
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
6
+ import { FlsaStatus as a } from "../../../shared/constants.js";
7
7
  import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
8
  const B = () => {
9
9
  const { isPending: s, mode: t, submitWithEffect: o, handleAdd: D, handleCancelAddJob: I, primaryFlsaStatus: r } = O(), { t: n } = T("Employee.Compensation"), { control: m } = l(), c = d({ control: m, name: "flsaStatus" }), e = C();
@@ -3,12 +3,11 @@ import { useTranslation as p } from "react-i18next";
3
3
  import { useCompensation as d } from "./useCompensation.js";
4
4
  import C from "../../../assets/icons/pencil.svg.js";
5
5
  import c from "../../../assets/icons/trashcan.svg.js";
6
- import "../../../shared/constants.js";
7
6
  import { HamburgerMenu as f } from "../../Common/HamburgerMenu/HamburgerMenu.js";
8
7
  import { useDataView as y } from "../../Common/DataView/useDataView.js";
9
8
  import { DataView as g } from "../../Common/DataView/DataView.js";
10
- const P = () => {
11
- const { employeeJobs: i, mode: o, isPending: r, handleEdit: l, handleDelete: s } = d(), { t } = p("Employee.Compensation"), { ...m } = y({
9
+ const D = () => {
10
+ const { employeeJobs: i, mode: o, isPending: l, handleEdit: r, handleDelete: s } = d(), { t } = p("Employee.Compensation"), { ...m } = y({
12
11
  data: i,
13
12
  columns: [
14
13
  {
@@ -46,7 +45,7 @@ const P = () => {
46
45
  label: t("allCompensations.editCta"),
47
46
  icon: /* @__PURE__ */ a(C, { "aria-hidden": !0 }),
48
47
  onClick: () => {
49
- l(e.uuid);
48
+ r(e.uuid);
50
49
  }
51
50
  },
52
51
  ...e.primary ? [] : [
@@ -59,7 +58,7 @@ const P = () => {
59
58
  }
60
59
  ]
61
60
  ],
62
- isLoading: r
61
+ isLoading: l
63
62
  }
64
63
  )
65
64
  });
@@ -67,6 +66,6 @@ const P = () => {
67
66
  return /* @__PURE__ */ a(g, { "data-testid": "data-view", label: t("allCompensations.tableLabel"), ...m });
68
67
  };
69
68
  export {
70
- P as List
69
+ D as List
71
70
  };
72
71
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,MAAiBC,EAAgB,GAC9E,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACS,MAAaA,EAAI,SAAS;AAAA,MACrC;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,6BAA6B;AAAA,QACtC,QAAQ,CAACA,MAAa;AACd,gBAAAC,IAAaD,EAAI,eAAe;AAAA,YACpC,CAAAE,MAAQA,EAAK,SAASF,EAAI;AAAA,UAAA,GACzB;AACH,iBAAOC,MAAe,SAAY,EAAE,oBAAoBA,CAAU,EAAE,IAAI;AAAA,QAAA;AAAA,MAE5E;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,+BAA+B;AAAA,QACxC,QAAQ,CAACD,MAAaA,EAAI,MAAM,cAAc;AAAA,MAChD;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACA,MAAaA,EAAI,eAAe;AAAA,MAAA;AAAA,IAE7C;AAAA,IACA,UAAU,CAACA,MACT,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAc,EAAE,gBAAgB;AAAA,QAChC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,0BAA0B;AAAA,YACnC,MAAM,gBAAAD,EAACE,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,YAC7B,SAAS,MAAM;AACb,cAAAX,EAAWM,EAAI,IAAI;AAAA,YAAA;AAAA,UAEvB;AAAA,UACA,GAAKA,EAAI,UAUL,CAAA,IATA;AAAA,YACE;AAAA,cACE,OAAO,EAAE,4BAA4B;AAAA,cACrC,MAAM,gBAAAG,EAACG,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,cAC/B,SAAS,MAAM;AACb,gBAAAX,EAAaK,EAAI,IAAI;AAAA,cAAA;AAAA,YACvB;AAAA,UACF;AAAA,QAGR;AAAA,QACA,WAAWP;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,CAEH;AAED,MAAID,MAAS;AAKX,WAAA,gBAAAW,EAACI,KAAS,eAAY,aAAY,OAAO,EAAE,6BAA6B,GAAI,GAAGT,GAAe;AAElG;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,MAAiBC,EAAgB,GAC9E,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,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AAY,OAAO,EAAE,6BAA6B,GAAI,GAAGT,GAAe;AAElG;"}
@@ -1,26 +1,25 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { useTranslation as d } from "react-i18next";
3
3
  import { useDeductions as m } from "./useDeductions.js";
4
- import "../../../shared/constants.js";
5
4
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as l } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const L = () => {
8
- const { mode: o, handleAdd: i, handleCancel: r, handlePassthrough: s, isPending: c } = m(), { t: n } = d("Employee.Deductions"), t = l();
6
+ const y = () => {
7
+ const { mode: n, handleAdd: i, handleCancel: r, handlePassthrough: s, isPending: c } = m(), { t: o } = d("Employee.Deductions"), t = l();
9
8
  return /* @__PURE__ */ a(u, { children: [
10
- (o === "ADD" || o === "EDIT") && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: r, children: n("cancelCta") }),
11
- o === "LIST" && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: i, children: n("addDeductionCta") }),
9
+ (n === "ADD" || n === "EDIT") && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: r, children: o("cancelCta") }),
10
+ n === "LIST" && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: i, children: o("addDeductionCta") }),
12
11
  /* @__PURE__ */ e(
13
12
  t.Button,
14
13
  {
15
- type: o === "LIST" ? "button" : "submit",
14
+ type: n === "LIST" ? "button" : "submit",
16
15
  isLoading: c,
17
- onClick: o === "LIST" ? s : void 0,
18
- children: n("continueCta")
16
+ onClick: n === "LIST" ? s : void 0,
17
+ children: o("continueCta")
19
18
  }
20
19
  )
21
20
  ] });
22
21
  };
23
22
  export {
24
- L as Actions
23
+ y as Actions
25
24
  };
26
25
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Deductions/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { mode, handleAdd, handleCancel, handlePassthrough, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'EDIT') && (\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n {t('addDeductionCta')}\n </Components.Button>\n )}\n <Components.Button\n type={mode === 'LIST' ? 'button' : 'submit'}\n isLoading={isPending}\n onClick={mode === 'LIST' ? handlePassthrough : undefined}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","mode","handleAdd","handleCancel","handlePassthrough","isPending","useDeductions","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,mBAAAC,GAAmB,WAAAC,MAAcC,EAAc,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAoB;AAEvC,2BACGC,GACG,EAAA,UAAA;AAAA,KAAAV,MAAS,SAASA,MAAS,WAC3B,gBAAAW,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAC7C,UAAAI,EAAE,WAAW,GAChB;AAAA,IAEDN,MAAS,UACP,gBAAAW,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASP,GAC7C,UAAEK,EAAA,iBAAiB,EACtB,CAAA;AAAA,IAEF,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAMR,MAAS,SAAS,WAAW;AAAA,QACnC,WAAWI;AAAA,QACX,SAASJ,MAAS,SAASG,IAAoB;AAAA,QAE9C,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA;AAAA,EAClB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Deductions/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { mode, handleAdd, handleCancel, handlePassthrough, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'EDIT') && (\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n {t('addDeductionCta')}\n </Components.Button>\n )}\n <Components.Button\n type={mode === 'LIST' ? 'button' : 'submit'}\n isLoading={isPending}\n onClick={mode === 'LIST' ? handlePassthrough : undefined}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","mode","handleAdd","handleCancel","handlePassthrough","isPending","useDeductions","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,mBAAAC,GAAmB,WAAAC,MAAcC,EAAc,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAoB;AAEvC,2BACGC,GACG,EAAA,UAAA;AAAA,KAAAV,MAAS,SAASA,MAAS,WAC3B,gBAAAW,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAC7C,UAAAI,EAAE,WAAW,GAChB;AAAA,IAEDN,MAAS,UACP,gBAAAW,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASP,GAC7C,UAAEK,EAAA,iBAAiB,EACtB,CAAA;AAAA,IAEF,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAMR,MAAS,SAAS,WAAW;AAAA,QACnC,WAAWI;AAAA,QACX,SAASJ,MAAS,SAASG,IAAoB;AAAA,QAE9C,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA;AAAA,EAClB,GACF;AAEJ;"}
@@ -2,14 +2,13 @@ import { jsxs as l, Fragment as m, jsx as t } from "react/jsx-runtime";
2
2
  import { useFormContext as s, useWatch as i } from "react-hook-form";
3
3
  import { useTranslation as p } from "react-i18next";
4
4
  import { useDeductions as b } from "./useDeductions.js";
5
- import "../../../shared/constants.js";
6
5
  import { useI18n as f } from "../../../i18n/I18n.js";
7
6
  import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
7
  import { TextInputField as g } from "../../Common/Fields/TextInputField/TextInputField.js";
9
8
  import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
9
  import { NumberInputField as u } from "../../Common/Fields/NumberInputField/NumberInputField.js";
11
10
  import { CheckboxField as x } from "../../Common/Fields/CheckboxField/CheckboxField.js";
12
- const R = () => {
11
+ const I = () => {
13
12
  const { mode: n } = b(), { control: r } = s();
14
13
  f("Employee.Deductions");
15
14
  const { t: e } = p("Employee.Deductions"), o = D(), c = i({ control: r, name: "recurring" }), d = i({ control: r, name: "deductAsPercentage" });
@@ -72,6 +71,6 @@ const R = () => {
72
71
  ] });
73
72
  };
74
73
  export {
75
- R as DeductionForm
74
+ I as DeductionForm
76
75
  };
77
76
  //# sourceMappingURL=DeductionForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionForm.js","sources":["../../../../src/components/Employee/Deductions/DeductionForm.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions, type DeductionInputs } from './useDeductions'\nimport {\n CheckboxField,\n NumberInputField,\n RadioGroupField,\n TextInputField,\n} from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const DeductionForm = () => {\n const { mode } = useDeductions()\n const { control } = useFormContext<DeductionInputs>()\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n const watchedDeductAsPercentage = useWatch({ control, name: 'deductAsPercentage' })\n\n if (mode !== 'ADD' && mode !== 'EDIT') return\n\n return (\n <>\n <Components.Heading as=\"h2\">\n {mode === 'EDIT' ? t('editDeductionTitle') : t('addDeductionTitle')}\n </Components.Heading>\n <Components.Text>{t('addDeuctionDescription')}</Components.Text>\n <TextInputField\n name=\"description\"\n label={t('descriptionLabel')}\n isRequired\n errorMessage={t('validations.description')}\n />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n options={[\n { value: 'true', label: t('frequencyRecurringOption') },\n { value: 'false', label: t('frequencyOneTimeOption') },\n ]}\n />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabel')}\n options={[\n { value: 'true', label: t('deductionTypePercentageOption') },\n { value: 'false', label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <div className=\"deduction-amount-section\">\n <NumberInputField\n name=\"amount\"\n isRequired\n label={t('deductionAmountLabel')}\n format={watchedDeductAsPercentage === 'true' ? 'percent' : 'currency'}\n min={0}\n errorMessage={t('validations.amount')}\n />\n </div>\n {watchedRecurring === 'true' && (\n <NumberInputField\n name=\"annualMaximum\"\n label={t('annualMaxLabel')}\n format=\"currency\"\n min={0}\n />\n )}\n <CheckboxField name=\"courtOrdered\" label={t('courtOrderedLabel')} />\n </>\n )\n}\n"],"names":["DeductionForm","mode","useDeductions","control","useFormContext","useI18n","t","useTranslation","Components","useComponentContext","watchedRecurring","useWatch","watchedDeductAsPercentage","jsxs","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AOA,EAAE,+BAA+B,EAAE;AAAA,YAC3D,EAAE,OAAO,SAAS,OAAOA,EAAE,gCAAgC,EAAE;AAAA,UAAA;AAAA,QAC/D;AAAA,MACF;AAAA,MACA,gBAAAS,EAAC,OAAI,EAAA,WAAU,4BACb,UAAA,gBAAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOZ,EAAE,sBAAsB;AAAA,UAC/B,QAAQM,MAA8B,SAAS,YAAY;AAAA,UAC3D,KAAK;AAAA,UACL,cAAcN,EAAE,oBAAoB;AAAA,QAAA;AAAA,MAAA,GAExC;AAAA,MACCI,MAAqB,UACpB,gBAAAK;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOZ,EAAE,gBAAgB;AAAA,UACzB,QAAO;AAAA,UACP,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,wBAEDa,GAAc,EAAA,MAAK,gBAAe,OAAOb,EAAE,mBAAmB,EAAG,CAAA;AAAA,IAAA,GACpE;AAEJ;"}
1
+ {"version":3,"file":"DeductionForm.js","sources":["../../../../src/components/Employee/Deductions/DeductionForm.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions, type DeductionInputs } from './useDeductions'\nimport {\n CheckboxField,\n NumberInputField,\n RadioGroupField,\n TextInputField,\n} from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const DeductionForm = () => {\n const { mode } = useDeductions()\n const { control } = useFormContext<DeductionInputs>()\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n const watchedDeductAsPercentage = useWatch({ control, name: 'deductAsPercentage' })\n\n if (mode !== 'ADD' && mode !== 'EDIT') return\n\n return (\n <>\n <Components.Heading as=\"h2\">\n {mode === 'EDIT' ? t('editDeductionTitle') : t('addDeductionTitle')}\n </Components.Heading>\n <Components.Text>{t('addDeuctionDescription')}</Components.Text>\n <TextInputField\n name=\"description\"\n label={t('descriptionLabel')}\n isRequired\n errorMessage={t('validations.description')}\n />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n options={[\n { value: 'true', label: t('frequencyRecurringOption') },\n { value: 'false', label: t('frequencyOneTimeOption') },\n ]}\n />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabel')}\n options={[\n { value: 'true', label: t('deductionTypePercentageOption') },\n { value: 'false', label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <div className=\"deduction-amount-section\">\n <NumberInputField\n name=\"amount\"\n isRequired\n label={t('deductionAmountLabel')}\n format={watchedDeductAsPercentage === 'true' ? 'percent' : 'currency'}\n min={0}\n errorMessage={t('validations.amount')}\n />\n </div>\n {watchedRecurring === 'true' && (\n <NumberInputField\n name=\"annualMaximum\"\n label={t('annualMaxLabel')}\n format=\"currency\"\n min={0}\n />\n )}\n <CheckboxField name=\"courtOrdered\" label={t('courtOrderedLabel')} />\n </>\n )\n}\n"],"names":["DeductionForm","mode","useDeductions","control","useFormContext","useI18n","t","useTranslation","Components","useComponentContext","watchedRecurring","useWatch","watchedDeductAsPercentage","jsxs","Fragment","jsx","TextInputField","RadioGroupField","NumberInputField","CheckboxField"],"mappings":";;;;;;;;;;AAYO,MAAMA,IAAgB,MAAM;AAC3B,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAc,GACzB,EAAE,SAAAC,EAAQ,IAAIC,EAAgC;AACpD,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAoB,GAEjCC,IAAmBC,EAAS,EAAE,SAAAR,GAAS,MAAM,aAAa,GAC1DS,IAA4BD,EAAS,EAAE,SAAAR,GAAS,MAAM,sBAAsB;AAE9E,MAAA,E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,MAAqB,UACpB,gBAAAK;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOZ,EAAE,gBAAgB;AAAA,UACzB,QAAO;AAAA,UACP,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,wBAEDa,GAAc,EAAA,MAAK,gBAAe,OAAOb,EAAE,mBAAmB,EAAG,CAAA;AAAA,IAAA,GACpE;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as p } from "react-i18next";
3
3
  import { useDeductions as g } from "./useDeductions.js";
4
- import "../../../shared/constants.js";
5
4
  import o from "../../Common/hooks/useNumberFormatter.js";
6
5
  import b from "../../../assets/icons/pencil.svg.js";
7
6
  import C from "../../../assets/icons/trashcan.svg.js";
8
7
  import { HamburgerMenu as h } from "../../Common/HamburgerMenu/HamburgerMenu.js";
9
8
  import { useDataView as y } from "../../Common/DataView/useDataView.js";
10
9
  import { DataView as D } from "../../Common/DataView/DataView.js";
11
- const V = () => {
10
+ const S = () => {
12
11
  const { mode: i, deductions: m, handleDelete: a, handleEdit: u, isPending: c } = g(), { t: r } = p("Employee.Deductions"), s = o("currency"), l = o("percent"), d = m.filter((e) => e.active), { ...f } = y({
13
12
  data: d,
14
13
  columns: [
@@ -54,6 +53,6 @@ const V = () => {
54
53
  return /* @__PURE__ */ t(D, { label: r("deductionsTableLabel"), ...f });
55
54
  };
56
55
  export {
57
- V as DeductionsList
56
+ S as DeductionsList
58
57
  };
59
58
  //# sourceMappingURL=DeductionsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionsList.js","sources":["../../../../src/components/Employee/Deductions/DeductionsList.tsx"],"sourcesContent":["import type React from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { useDataView, DataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const DeductionsList: React.FC = () => {\n const { mode, deductions, handleDelete, handleEdit, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n { key: 'description', title: t('nameColumn') },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPending}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n return <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n}\n"],"names":["DeductionsList","mode","deductions","handleDelete","handleEdit","isPending","useDeductions","t","useTranslation","formatCurrency","useNumberFormatter","formatPercent","activeDeductions","deduction","dataViewProps","useDataView","formattedAmount","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;;AASO,MAAMA,IAA2B,MAAM;AAC5C,QAAM,EAAE,MAAAC,GAAM,YAAAC,GAAY,cAAAC,GAAc,YAAAC,GAAY,WAAAC,MAAcC,EAAc,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAiBC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QoB,GAAS,EAAA,OAAOd,EAAE,sBAAsB,GAAI,GAAGO,GAAe;AACxE;"}
1
+ {"version":3,"file":"DeductionsList.js","sources":["../../../../src/components/Employee/Deductions/DeductionsList.tsx"],"sourcesContent":["import type React from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { useDataView, DataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const DeductionsList: React.FC = () => {\n const { mode, deductions, handleDelete, handleEdit, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n { key: 'description', title: t('nameColumn') },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPending}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n return <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n}\n"],"names":["DeductionsList","mode","deductions","handleDelete","handleEdit","isPending","useDeductions","t","useTranslation","formatCurrency","useNumberFormatter","formatPercent","activeDeductions","deduction","dataViewProps","useDataView","formattedAmount","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AASO,MAAMA,IAA2B,MAAM;AAC5C,QAAM,EAAE,MAAAC,GAAM,YAAAC,GAAY,cAAAC,GAAc,YAAAC,GAAY,WAAAC,MAAcC,EAAc,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5CE,IAAmBV,EAAW,OAAO,CAAAW,MAAaA,EAAU,MAAM,GAElE,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMH;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,eAAe,OAAOL,EAAE,YAAY,EAAE;AAAA,MAC7C;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,iBAAiB;AAAA,QAC1B,QAAQ,CAAaM,MACZA,EAAU,YAAYN,EAAE,eAAe,IAAIA,EAAE,kBAAkB;AAAA,MAE1E;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAaM,MAAA;AACnB,gBAAMG,IAAkBH,EAAU,qBAC9BF,EAAc,OAAOE,EAAU,MAAM,CAAC,IACtCJ,EAAe,OAAOI,EAAU,MAAM,CAAC;AACpC,iBAAAA,EAAU,YACbN,EAAE,mBAAmB,EAAE,OAAOS,EAAiB,CAAA,IAC/CA;AAAA,QAAA;AAAA,MACN;AAAA,IAEJ;AAAA,IACA,UAAU,CAAaH,MAEnB,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAWb;AAAA,QACX,OAAO;AAAA,UACL;AAAA,YACE,OAAOE,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAH,EAAWS,CAAS;AAAA,YACtB;AAAA,YACA,MAAM,gBAAAI,EAACE,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,UAC/B;AAAA,UACA;AAAA,YACE,OAAOZ,EAAE,WAAW;AAAA,YACpB,SAAS,MAAM;AACb,cAAAJ,EAAaU,CAAS;AAAA,YACxB;AAAA,YACA,MAAM,gBAAAI,EAACG,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,UAAA;AAAA,QACjC;AAAA,MACF;AAAA,IACF;AAAA,EAEJ,CACD;AAED,MAAInB,MAAS;AACb,6BAAQoB,GAAS,EAAA,OAAOd,EAAE,sBAAsB,GAAI,GAAGO,GAAe;AACxE;"}
@@ -1,9 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useTranslation as n } from "react-i18next";
3
3
  import { useDeductions as t } from "./useDeductions.js";
4
- import "../../../shared/constants.js";
5
4
  import { RadioGroupField as u } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
6
- const m = () => {
5
+ const l = () => {
7
6
  const { mode: o } = t(), { t: e } = n("Employee.Deductions");
8
7
  if (o === "INITIAL")
9
8
  return /* @__PURE__ */ i(
@@ -20,6 +19,6 @@ const m = () => {
20
19
  );
21
20
  };
22
21
  export {
23
- m as IncludeDeductionsForm
22
+ l as IncludeDeductionsForm
24
23
  };
25
24
  //# sourceMappingURL=IncludeDeductionsForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IncludeDeductionsForm.js","sources":["../../../../src/components/Employee/Deductions/IncludeDeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { RadioGroupField } from '@/components/Common'\n\nexport const IncludeDeductionsForm = () => {\n const { mode } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n if (mode !== 'INITIAL') return\n return (\n <RadioGroupField\n name=\"includeDeductions\"\n label={t('includeDeductionsFormLabel')}\n description={t('includeDeductionsDescription')}\n options={[\n { value: 'Yes', label: t('includeDeductionsYes') },\n { value: 'No', label: t('includeDeductionsNo') },\n ]}\n />\n )\n}\n"],"names":["IncludeDeductionsForm","mode","useDeductions","t","useTranslation","jsx","RadioGroupField"],"mappings":";;;;;AAIO,MAAMA,IAAwB,MAAM;AACnC,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAc,GACzB,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAClD,MAAIH,MAAS;AAEX,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,4BAA4B;AAAA,QACrC,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAAS;AAAA,UACP,EAAE,OAAO,OAAO,OAAOA,EAAE,sBAAsB,EAAE;AAAA,UACjD,EAAE,OAAO,MAAM,OAAOA,EAAE,qBAAqB,EAAE;AAAA,QAAA;AAAA,MACjD;AAAA,IACF;AAEJ;"}
1
+ {"version":3,"file":"IncludeDeductionsForm.js","sources":["../../../../src/components/Employee/Deductions/IncludeDeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { RadioGroupField } from '@/components/Common'\n\nexport const IncludeDeductionsForm = () => {\n const { mode } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n if (mode !== 'INITIAL') return\n return (\n <RadioGroupField\n name=\"includeDeductions\"\n label={t('includeDeductionsFormLabel')}\n description={t('includeDeductionsDescription')}\n options={[\n { value: 'Yes', label: t('includeDeductionsYes') },\n { value: 'No', label: t('includeDeductionsNo') },\n ]}\n />\n )\n}\n"],"names":["IncludeDeductionsForm","mode","useDeductions","t","useTranslation","jsx","RadioGroupField"],"mappings":";;;;AAIO,MAAMA,IAAwB,MAAM;AACnC,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAc,GACzB,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAClD,MAAIH,MAAS;AAEX,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,4BAA4B;AAAA,QACrC,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAAS;AAAA,UACP,EAAE,OAAO,OAAO,OAAOA,EAAE,sBAAsB,EAAE;AAAA,UACjD,EAAE,OAAO,MAAM,OAAOA,EAAE,qBAAqB,EAAE;AAAA,QAAA;AAAA,MACjD;AAAA,IACF;AAEJ;"}
@@ -11,9 +11,8 @@ import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
12
  import "dompurify";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const D = r.object({
15
+ const x = r.object({
17
16
  active: r.boolean(),
18
17
  amount: r.number().min(0).transform(String),
19
18
  description: r.string().min(1),
@@ -24,10 +23,10 @@ const D = r.object({
24
23
  annualMaximum: r.number().min(0).transform((t) => t > 0 ? t.toString() : null).nullable(),
25
24
  payPeriodMaximum: r.number().min(0).transform((t) => t > 0 ? t.toString() : null).nullable(),
26
25
  deductAsPercentage: r.string().transform((t) => t === "true")
27
- }), [S, C] = o("DeductionsContext");
26
+ }), [D, S] = o("DeductionsContext");
28
27
  export {
29
- D as DeductionSchema,
30
- C as DeductionsProvider,
31
- S as useDeductions
28
+ x as DeductionSchema,
29
+ S as DeductionsProvider,
30
+ D as useDeductions
32
31
  };
33
32
  //# sourceMappingURL=useDeductions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDeductions.js","sources":["../../../../src/components/Employee/Deductions/useDeductions.ts"],"sourcesContent":["import type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE = 'ADD' | 'LIST' | 'INITIAL' | 'EDIT'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0).transform(String),\n description: z.string().min(1),\n courtOrdered: z.boolean(),\n times: z.number().nullable(), //The number of times to apply the garnishment. Ignored if recurring is true.\n recurring: z.string().transform(val => val === 'true'),\n annualMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n payPeriodMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.string().transform(val => val === 'true'),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ntype DeductionsContextType = {\n isPending: boolean\n deductions: Garnishment[]\n employeeId: string\n mode: MODE\n handleAdd: () => void\n handleCancel: () => void\n handleEdit: (deduction: Garnishment) => void\n handleDelete: (deduction: Garnishment) => void\n handlePassthrough: () => void\n}\nconst [useDeductions, DeductionsProvider] =\n createCompoundContext<DeductionsContextType>('DeductionsContext')\nexport { useDeductions, DeductionsProvider }\n"],"names":["DeductionSchema","z","val","useDeductions","DeductionsProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAMa,MAAAA,IAAkBC,EAAE,OAAO;AAAA,EACtC,QAAQA,EAAE,QAAQ;AAAA,EAClB,QAAQA,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,UAAU,MAAM;AAAA,EAC1C,aAAaA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC7B,cAAcA,EAAE,QAAQ;AAAA,EACxB,OAAOA,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAC3B,WAAWA,EAAE,SAAS,UAAU,CAAAC,MAAOA,MAAQ,MAAM;AAAA,EACrD,eAAeD,EACZ,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAQC,MAAAA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAS;AAAA,EACZ,kBAAkBD,EACf,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAQC,MAAAA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAS;AAAA,EACZ,oBAAoBD,EAAE,SAAS,UAAU,CAAAC,MAAOA,MAAQ,MAAM;AAChE,CAAC,GAgBK,CAACC,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
1
+ {"version":3,"file":"useDeductions.js","sources":["../../../../src/components/Employee/Deductions/useDeductions.ts"],"sourcesContent":["import type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE = 'ADD' | 'LIST' | 'INITIAL' | 'EDIT'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0).transform(String),\n description: z.string().min(1),\n courtOrdered: z.boolean(),\n times: z.number().nullable(), //The number of times to apply the garnishment. Ignored if recurring is true.\n recurring: z.string().transform(val => val === 'true'),\n annualMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n payPeriodMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.string().transform(val => val === 'true'),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ntype DeductionsContextType = {\n isPending: boolean\n deductions: Garnishment[]\n employeeId: string\n mode: MODE\n handleAdd: () => void\n handleCancel: () => void\n handleEdit: (deduction: Garnishment) => void\n handleDelete: (deduction: Garnishment) => void\n handlePassthrough: () => void\n}\nconst [useDeductions, DeductionsProvider] =\n createCompoundContext<DeductionsContextType>('DeductionsContext')\nexport { useDeductions, DeductionsProvider }\n"],"names":["DeductionSchema","z","val","useDeductions","DeductionsProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAMa,MAAAA,IAAkBC,EAAE,OAAO;AAAA,EACtC,QAAQA,EAAE,QAAQ;AAAA,EAClB,QAAQA,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,UAAU,MAAM;AAAA,EAC1C,aAAaA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC7B,cAAcA,EAAE,QAAQ;AAAA,EACxB,OAAOA,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAC3B,WAAWA,EAAE,SAAS,UAAU,CAAAC,MAAOA,MAAQ,MAAM;AAAA,EACrD,eAAeD,EACZ,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAQC,MAAAA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAS;AAAA,EACZ,kBAAkBD,EACf,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAQC,MAAAA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAS;AAAA,EACZ,oBAAoBD,EAAE,SAAS,UAAU,CAAAC,MAAOA,MAAQ,MAAM;AAChE,CAAC,GAgBK,CAACC,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}