@gusto/embedded-react-sdk 0.10.0 → 0.10.2

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 (155) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/components/Base/Base.d.ts +1 -1
  3. package/dist/components/Base/Base.js +57 -52
  4. package/dist/components/Base/Base.js.map +1 -1
  5. package/dist/components/Common/InternalError/InternalError.js.map +1 -1
  6. package/dist/components/Common/SignatureForm/SignatureFormActions.js +7 -8
  7. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureFormFields.js +4 -5
  9. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  10. package/dist/components/Common/UI/ComboBox/ComboBox.js +31 -33
  11. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  12. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  13. package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
  14. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  15. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  17. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  21. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  22. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  24. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  25. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  26. package/dist/components/Company/BankAccount/BankAccount.d.ts +2 -2
  27. package/dist/components/Company/BankAccount/BankAccount.js +25 -20
  28. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  29. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  30. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  31. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +30 -28
  32. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  33. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  34. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  35. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  36. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  37. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  38. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  39. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  40. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  41. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  42. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  43. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +5 -7
  44. package/dist/components/Company/DocumentSigner/DocumentSigner.js +24 -24
  45. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  46. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  47. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  48. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  49. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  50. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  51. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  52. package/dist/components/Company/Industry/Actions.js +5 -6
  53. package/dist/components/Company/Industry/Actions.js.map +1 -1
  54. package/dist/components/Company/Industry/Context.js +7 -6
  55. package/dist/components/Company/Industry/Context.js.map +1 -1
  56. package/dist/components/Company/Industry/Edit.js +10 -11
  57. package/dist/components/Company/Industry/Edit.js.map +1 -1
  58. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  59. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  60. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  61. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  62. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  63. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  64. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  65. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  66. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  67. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  68. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  69. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  70. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  71. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  72. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  73. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  74. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  75. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  76. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  77. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  78. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  79. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  80. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  81. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  82. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  83. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  84. package/dist/components/Contractor/Address/Form.js +8 -16
  85. package/dist/components/Contractor/Address/Form.js.map +1 -1
  86. package/dist/components/Contractor/Address/useAddress.js +6 -5
  87. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  88. package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +21 -0
  89. package/dist/components/Contractor/NewHireReport/NewHireReport.js +111 -0
  90. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -0
  91. package/dist/components/Contractor/NewHireReport/types.d.ts +4 -0
  92. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  93. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  94. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +60 -52
  95. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  96. package/dist/components/Contractor/index.d.ts +1 -0
  97. package/dist/components/Contractor/index.js +8 -6
  98. package/dist/components/Contractor/index.js.map +1 -1
  99. package/dist/components/Employee/Compensation/Actions.js +1 -1
  100. package/dist/components/Employee/Compensation/List.js +5 -6
  101. package/dist/components/Employee/Compensation/List.js.map +1 -1
  102. package/dist/components/Employee/Deductions/Actions.js +8 -9
  103. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  104. package/dist/components/Employee/Deductions/DeductionForm.js +2 -3
  105. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  106. package/dist/components/Employee/Deductions/DeductionsList.js +2 -3
  107. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  108. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +2 -3
  109. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  110. package/dist/components/Employee/Deductions/useDeductions.js +6 -5
  111. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  112. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  113. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  114. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  115. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  116. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  117. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  118. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  119. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  120. package/dist/components/Employee/EmployeeList/List.js +12 -12
  121. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  122. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  123. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  124. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  125. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  126. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  127. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  128. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  129. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  130. package/dist/components/Employee/Profile/Actions.js +6 -7
  131. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  132. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  133. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  134. package/dist/components/Employee/Profile/Profile.js +83 -81
  135. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  136. package/dist/components/Employee/Profile/useProfile.js +4 -3
  137. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  138. package/dist/components/Employee/Taxes/Actions.js +7 -8
  139. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  140. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  141. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  142. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  143. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  144. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +7 -8
  145. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  146. package/dist/i18n/I18n.js +5 -5
  147. package/dist/i18n/I18n.js.map +1 -1
  148. package/dist/i18n/en/Contractor.NewHireReport.json.js +24 -0
  149. package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -0
  150. package/dist/shared/constants.d.ts +4 -0
  151. package/dist/shared/constants.js +9 -7
  152. package/dist/shared/constants.js.map +1 -1
  153. package/dist/style.css +1 -1
  154. package/dist/types/i18next.d.ts +13 -1
  155. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Company/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { useMemo } from 'react'\nimport { AssignSignatory, DocumentList } from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport type { DocumentSignerContextInterface } from './useDocumentSigner'\nimport { SignatureForm } from './SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport const DocumentSigner = ({\n companyId,\n signatoryId,\n onEvent,\n dictionary,\n}: DocumentSignerProps) => {\n useComponentDictionary('Company.DocumentList', dictionary)\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n const doesSignatoryExist = signatories.length > 0\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n doesSignatoryExist ? 'documentList' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: doesSignatoryExist ? DocumentList : AssignSignatory,\n companyId,\n signatoryId,\n }),\n ),\n [companyId, signatoryId, doesSignatoryExist],\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n\nDocumentSigner.DocumentList = DocumentList\nDocumentSigner.SignatureForm = SignatureForm\n"],"names":["DocumentSigner","companyId","signatoryId","onEvent","dictionary","useComponentDictionary","signatoryList","useSignatoriesListSuspense","doesSignatoryExist","documentSigner","useMemo","createMachine","documentSignerMachine","initialContext","DocumentList","AssignSignatory","jsx","Flow","SignatureForm"],"mappings":";;;;;;;;;AAgBO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,MAA2B;AACzB,EAAAC,EAAuB,wBAAwBD,CAAU;AACnD,QAAA;AAAA,IACJ,MAAM,EAAE,eAAAE,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaN;AAAA,EAAA,CACd,GAEKO,IADcF,EACmB,SAAS,GAE1CG,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACEH,IAAqB,iBAAiB;AAAA,MACtCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAqBM,IAAeC;AAAA,QAC/C,WAAAd;AAAA,QACA,aAAAC;AAAA,MACF;AAAA,IACF;AAAA,IACF,CAACD,GAAWC,GAAaM,CAAkB;AAAA,EAC7C;AACA,SAAQ,gBAAAQ,EAAAC,GAAA,EAAK,SAASR,GAAgB,SAAAN,EAAkB,CAAA;AAC1D;AAEAH,EAAe,eAAec;AAC9Bd,EAAe,gBAAgBkB;"}
1
+ {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Company/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { useMemo } from 'react'\nimport { AssignSignatory, DocumentList } from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport type { DocumentSignerContextInterface } from './useDocumentSigner'\nimport { SignatureForm } from './SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nfunction DocumentSignerFlow({ companyId, signatoryId, onEvent, dictionary }: DocumentSignerProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n const doesSignatoryExist = signatories.length > 0\n\n const documentSigner = useMemo(\n () =>\n createMachine(\n doesSignatoryExist ? 'documentList' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: doesSignatoryExist ? DocumentList : AssignSignatory,\n companyId,\n signatoryId,\n }),\n ),\n [companyId, signatoryId, doesSignatoryExist],\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <DocumentSignerFlow {...props} />\n </BaseComponent>\n )\n}\n\nDocumentSigner.DocumentList = DocumentList\nDocumentSigner.SignatureForm = SignatureForm\n"],"names":["DocumentSignerFlow","companyId","signatoryId","onEvent","dictionary","useComponentDictionary","signatoryList","useSignatoriesListSuspense","doesSignatoryExist","documentSigner","useMemo","createMachine","documentSignerMachine","initialContext","DocumentList","AssignSignatory","jsx","Flow","DocumentSigner","props","BaseComponent","SignatureForm"],"mappings":";;;;;;;;;;;AAgBA,SAASA,EAAmB,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,GAAS,YAAAC,KAAmC;AAChG,EAAAC,EAAuB,wBAAwBD,CAAU;AACnD,QAAA;AAAA,IACJ,MAAM,EAAE,eAAAE,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaN;AAAA,EAAA,CACd,GAEKO,IADcF,EACmB,SAAS,GAE1CG,IAAiBC;AAAA,IACrB,MACEC;AAAA,MACEH,IAAqB,iBAAiB;AAAA,MACtCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAqBM,IAAeC;AAAA,QAC/C,WAAAd;AAAA,QACA,aAAAC;AAAA,MACF;AAAA,IACF;AAAA,IACF,CAACD,GAAWC,GAAaM,CAAkB;AAAA,EAC7C;AACA,SAAQ,gBAAAQ,EAAAC,GAAA,EAAK,SAASR,GAAgB,SAAAN,EAAkB,CAAA;AAC1D;AAEO,SAASe,EAAeC,GAA4B;AAEvD,SAAA,gBAAAH,EAACI,KAAe,GAAGD,GACjB,4BAACnB,GAAoB,EAAA,GAAGmB,GAAO,EACjC,CAAA;AAEJ;AAEAD,EAAe,eAAeJ;AAC9BI,EAAe,gBAAgBG;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [F, S] = o(
14
+ const [S, c] = o(
14
15
  "CompanySignatureFormContext"
15
16
  );
16
17
  export {
17
- S as SignatureFormProvider,
18
- F as useSignatureForm
18
+ c as SignatureFormProvider,
19
+ S as useSignatureForm
19
20
  };
20
21
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: FormSchema\n pdfUrl?: string | null\n isPending: boolean\n onBack: () => void\n}\n\nconst [useSignatureForm, SignatureFormProvider] = createCompoundContext<SignatureFormContextType>(\n 'CompanySignatureFormContext',\n)\n\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAUM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: FormSchema\n pdfUrl?: string | null\n isPending: boolean\n onBack: () => void\n}\n\nconst [useSignatureForm, SignatureFormProvider] = createCompoundContext<SignatureFormContextType>(\n 'CompanySignatureFormContext',\n)\n\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
- import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
- import "../../../shared/constants.js";
5
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
3
+ import { useFederalTaxes as s } from "./useFederalTaxes.js";
4
+ import { ActionsLayout as i } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const l = () => {
8
- const { t } = r("Company.FederalTaxes"), { isPending: n } = i(), e = m();
9
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
6
+ const f = () => {
7
+ const { t } = r("Company.FederalTaxes"), { isPending: n } = s(), e = m();
8
+ return /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("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/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAU,IAAIC,EAAgB,GAChCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAU,IAAIC,EAAgB,GAChCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -7,22 +7,23 @@ import "react-i18next";
7
7
  import "@gusto/embedded-api/models/errors/apierror";
8
8
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
9
9
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
10
+ import "@tanstack/react-query";
10
11
  import "../../Base/useBase.js";
11
12
  import "../../../shared/constants.js";
12
13
  import "dompurify";
13
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
15
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
15
- const g = o.object({
16
+ const y = o.object({
16
17
  federalEin: o.string().optional(),
17
18
  taxPayerType: o.enum(Object.values(r)).optional(),
18
19
  filingForm: o.enum(Object.values(e)).optional(),
19
20
  legalName: o.string().min(1)
20
- }), [y, C] = t(
21
+ }), [C, b] = t(
21
22
  "CompanyFederalTaxesContext"
22
23
  );
23
24
  export {
24
- g as FederalTaxFormSchema,
25
- C as FederalTaxesProvider,
26
- y as useFederalTaxes
25
+ y as FederalTaxFormSchema,
26
+ b as FederalTaxesProvider,
27
+ C as useFederalTaxes
27
28
  };
28
29
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASa,MAAAA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAS;AAAA,EACpF,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAS;AAAA,EAChF,WAAWF,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASa,MAAAA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAS;AAAA,EACpF,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAS;AAAA,EAChF,WAAWF,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { useIndustryApiState as s } from "./Context.js";
4
- import "../../../shared/constants.js";
2
+ import { useTranslation as s } from "react-i18next";
3
+ import { useIndustryApiState as i } from "./Context.js";
5
4
  import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const y = () => {
8
- const { t: o } = i("Company.Industry"), { isPending: n } = s(), r = e();
6
+ const f = () => {
7
+ const { t: o } = s("Company.Industry"), { isPending: n } = i(), r = e();
9
8
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
10
9
  };
11
10
  export {
12
- y 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/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAU,IAAIC,EAAoB,GACpCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAEF,EAAA,WAAW,EAChB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAU,IAAIC,EAAoB,GACpCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAEF,EAAA,WAAW,EAChB,CAAA,GACF;AAEJ;"}
@@ -5,20 +5,21 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../Base/useBase.js";
9
10
  import "../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
13
- const [a, c] = t("IndustryItems", {
14
+ const [c, A] = t("IndustryItems", {
14
15
  items: []
15
- }), [A, P] = t("IndustryApi", {
16
+ }), [P, f] = t("IndustryApi", {
16
17
  isPending: !1
17
18
  });
18
19
  export {
19
- P as IndustryApiStateProvider,
20
- c as IndustryItemsProvider,
21
- A as useIndustryApiState,
22
- a as useIndustryItems
20
+ f as IndustryApiStateProvider,
21
+ A as IndustryItemsProvider,
22
+ P as useIndustryApiState,
23
+ c as useIndustryItems
23
24
  };
24
25
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -1,15 +1,14 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as e } from "react-i18next";
3
- import { useIndustryItems as m } from "./Context.js";
4
- import "../../../shared/constants.js";
5
- import { ComboBoxField as s } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
6
- const d = () => {
7
- const { t: o } = e("Company.Industry"), { items: r } = m();
8
- return /* @__PURE__ */ t(
9
- s,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as t } from "react-i18next";
3
+ import { useIndustryItems as s } from "./Context.js";
4
+ import { ComboBoxField as m } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
5
+ const p = () => {
6
+ const { t: o } = t("Company.Industry"), { items: e } = s();
7
+ return /* @__PURE__ */ r(
8
+ m,
10
9
  {
11
10
  isRequired: !0,
12
- options: r,
11
+ options: e,
13
12
  label: o("label"),
14
13
  name: "naics_code",
15
14
  placeholder: o("placeholder")
@@ -17,6 +16,6 @@ const d = () => {
17
16
  );
18
17
  };
19
18
  export {
20
- d as Edit
19
+ p as Edit
21
20
  };
22
21
  //# sourceMappingURL=Edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAM,IAAIC,EAAiB;AAGjC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAM,IAAIC,EAAiB;AAGjC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
@@ -1,10 +1,9 @@
1
1
  import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useLocationsForm as e } from "./useLocationForm.js";
4
- import "../../../../shared/constants.js";
5
4
  import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const h = () => {
6
+ const f = () => {
8
7
  const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
9
8
  return /* @__PURE__ */ r(c, { children: [
10
9
  /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
@@ -12,6 +11,6 @@ const h = () => {
12
11
  ] });
13
12
  };
14
13
  export {
15
- h as Actions
14
+ f as Actions
16
15
  };
17
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAiB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAQ,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAEH,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAiB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAQ,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAEH,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [x, F] = o(
14
+ const [F, d] = o(
14
15
  "CompanyDocumentFormContext"
15
16
  );
16
17
  export {
17
- F as LocationsFormProvider,
18
- x as useLocationsForm
18
+ d as LocationsFormProvider,
19
+ F as useLocationsForm
19
20
  };
20
21
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAOM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAOM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,10 +1,9 @@
1
1
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as s } from "react-i18next";
3
3
  import { useLocationsList as a } from "./useLocationsList.js";
4
- import "../../../../shared/constants.js";
5
4
  import { ActionsLayout as e } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function L() {
6
+ function f() {
8
7
  const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), n = m();
9
8
  return /* @__PURE__ */ c(e, { children: [
10
9
  /* @__PURE__ */ t(n.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
@@ -12,6 +11,6 @@ function L() {
12
11
  ] });
13
12
  }
14
13
  export {
15
- L as Actions
14
+ f as Actions
16
15
  };
17
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAe,IAAIC,EAAiB,GACzDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,gBAAgB,EACrB,CAAA;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAE,CAAA;AAAA,EAAA,GAChE;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAe,IAAIC,EAAiB,GACzDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,gBAAgB,EACrB,CAAA;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAE,CAAA;AAAA,EAAA,GAChE;AAEJ;"}
@@ -2,7 +2,6 @@ import { jsx as t, Fragment as r, jsxs as n } from "react/jsx-runtime";
2
2
  import { useTranslation as L } from "react-i18next";
3
3
  import { useLocationsList as C } from "./useLocationsList.js";
4
4
  import P from "../../../../assets/icons/pencil.svg.js";
5
- import "../../../../shared/constants.js";
6
5
  import { EmptyData as b } from "../../../Common/EmptyData/EmptyData.js";
7
6
  import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
7
  import { HamburgerMenu as x } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
@@ -10,7 +9,7 @@ import { getStreet as A, getCityStateZip as T } from "../../../../helpers/format
10
9
  import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
10
  import { useDataView as D } from "../../../Common/DataView/useDataView.js";
12
11
  import { DataView as S } from "../../../Common/DataView/DataView.js";
13
- const q = () => {
12
+ const Z = () => {
14
13
  const a = y(), {
15
14
  locationList: o,
16
15
  handleEditLocation: s,
@@ -18,8 +17,8 @@ const q = () => {
18
17
  totalPages: l,
19
18
  handleFirstPage: m,
20
19
  handleItemsPerPageChange: c,
21
- handleLastPage: p,
22
- handleNextPage: g,
20
+ handleLastPage: g,
21
+ handleNextPage: p,
23
22
  handlePreviousPage: u,
24
23
  handleAddLocation: h
25
24
  } = C(), { t: e } = L("Company.Locations"), { ...f } = D({
@@ -61,9 +60,9 @@ const q = () => {
61
60
  }
62
61
  ),
63
62
  pagination: {
64
- handleNextPage: g,
63
+ handleNextPage: p,
65
64
  handleFirstPage: m,
66
- handleLastPage: p,
65
+ handleLastPage: g,
67
66
  handlePreviousPage: u,
68
67
  handleItemsPerPageChange: c,
69
68
  currentPage: d,
@@ -74,6 +73,6 @@ const q = () => {
74
73
  return /* @__PURE__ */ t(S, { label: e("locationListLabel"), ...f });
75
74
  };
76
75
  export {
77
- q as List
76
+ Z as List
78
77
  };
79
78
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n {getStreet(location)}\n <br />\n <small>{getCityStateZip(location)}</small>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLicationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAoB,GACjC;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAiB,GAEf,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMd;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOW,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAYI,MAEhB,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WACE,EAAA,UAAA;AAAA,UAAAC,EAAUH,CAAQ;AAAA,4BAClB,MAAG,EAAA;AAAA,UACH,gBAAAC,EAAA,SAAA,EAAO,UAAgBG,EAAAJ,CAAQ,EAAE,CAAA;AAAA,QAAA,EAAA,CACpC,EACF,CAAA;AAAA,MAGN;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAgB,EAAA,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAYI,MAGb,gBAAAM,EAAAJ,GAAA,EAAA,UAAA;AAAA,UAASF,EAAA,oCACPjB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAEa,EAAA,gBAAgB,EAAE,CAAA;AAAA,UAExDI,EAAS,iBACR,gBAAAC,EAAClB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAEa,EAAA,eAAe,EAAE,CAAA;AAAA,QAAA,GAE1D;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAYI,MAElB,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAV,EAAmBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QAEnB;AAAA,QACA,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAClC;AAAA,IAGJ,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IACF;AAAA,IACA,YAAY,MACT,gBAAAa,EAAAQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAC,gBAAAK,EAAAlB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAC1B,CAAA,EACF,CAAA;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAS,EAAA,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n {getStreet(location)}\n <br />\n <small>{getCityStateZip(location)}</small>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLicationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAoB,GACjC;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAiB,GAEf,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMd;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOW,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAYI,MAEhB,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WACE,EAAA,UAAA;AAAA,UAAAC,EAAUH,CAAQ;AAAA,4BAClB,MAAG,EAAA;AAAA,UACH,gBAAAC,EAAA,SAAA,EAAO,UAAgBG,EAAAJ,CAAQ,EAAE,CAAA;AAAA,QAAA,EAAA,CACpC,EACF,CAAA;AAAA,MAGN;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAgB,EAAA,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAYI,MAGb,gBAAAM,EAAAJ,GAAA,EAAA,UAAA;AAAA,UAASF,EAAA,oCACPjB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAEa,EAAA,gBAAgB,EAAE,CAAA;AAAA,UAExDI,EAAS,iBACR,gBAAAC,EAAClB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAEa,EAAA,eAAe,EAAE,CAAA;AAAA,QAAA,GAE1D;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAYI,MAElB,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAV,EAAmBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QAEnB;AAAA,QACA,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAClC;AAAA,IAGJ,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IACF;AAAA,IACA,YAAY,MACT,gBAAAa,EAAAQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAC,gBAAAK,EAAAlB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAC1B,CAAA,EACF,CAAA;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAS,EAAA,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -5,16 +5,17 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../../Base/useBase.js";
9
10
  import "../../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
13
- const [u, x] = o(
14
+ const [x, d] = o(
14
15
  "CompanyDocumentListContext"
15
16
  );
16
17
  export {
17
- x as LocationsListProvider,
18
- u as useLocationsList
18
+ d as LocationsListProvider,
19
+ x as useLocationsList
19
20
  };
20
21
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAiBM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAiBM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -5,14 +5,15 @@ import "react-i18next";
5
5
  import "@gusto/embedded-api/models/errors/apierror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import "@tanstack/react-query";
8
9
  import "../../Base/useBase.js";
9
10
  import "../../../shared/constants.js";
10
11
  import "dompurify";
11
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
13
- const [g, w] = o("OnboardingOverviewContext");
14
+ const [w, x] = o("OnboardingOverviewContext");
14
15
  export {
15
- w as OnboardingOverviewProvider,
16
- g as useOnboardingOverview
16
+ x as OnboardingOverviewProvider,
17
+ w as useOnboardingOverview
17
18
  };
18
19
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -1,19 +1,18 @@
1
1
  import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
- import "../../../../shared/constants.js";
5
- import { ActionsLayout as i } from "../../../Common/ActionsLayout/ActionsLayout.js";
4
+ import { ActionsLayout as a } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const E = () => {
8
- const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: a, handleCancel: r, handleContinue: s } = m(), t = u();
6
+ const S = () => {
7
+ const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: r, handleCancel: i, handleContinue: s } = m(), t = u();
9
8
  return /* @__PURE__ */ e(d, { children: [
10
- c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(i, { children: [
9
+ c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(a, { children: [
11
10
  /* @__PURE__ */ o(
12
11
  t.Button,
13
12
  {
14
13
  variant: "secondary",
15
14
  onClick: () => {
16
- a();
15
+ r();
17
16
  },
18
17
  children: n("addAnotherPayScheduleCta")
19
18
  }
@@ -29,26 +28,26 @@ const E = () => {
29
28
  }
30
29
  )
31
30
  ] }),
32
- c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
31
+ c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
33
32
  /* @__PURE__ */ o(
34
33
  t.Button,
35
34
  {
36
35
  variant: "secondary",
37
36
  onClick: () => {
38
- r();
37
+ i();
39
38
  },
40
39
  children: n("actions.cancel")
41
40
  }
42
41
  ),
43
42
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
44
43
  ] }),
45
- c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
44
+ c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
46
45
  /* @__PURE__ */ o(
47
46
  t.Button,
48
47
  {
49
48
  variant: "secondary",
50
49
  onClick: () => {
51
- r();
50
+ i();
52
51
  },
53
52
  children: n("actions.cancel")
54
53
  }
@@ -58,6 +57,6 @@ const E = () => {
58
57
  ] });
59
58
  };
60
59
  export {
61
- E as Actions
60
+ S as Actions
62
61
  };
63
62
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAe,GACnEC,IAAaC,EAAoB;AAEvC,SAEK,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAASR,MAAA,0CACPS,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACH,YAAAJ,EAAA;AAAA,UACZ;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAC/B;AAAA,MACA,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACE,YAAAF,EAAA;AAAA,UACjB;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,EACtD,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAe,GACnEC,IAAaC,EAAoB;AAEvC,SAEK,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAASR,MAAA,0CACPS,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACH,YAAAJ,EAAA;AAAA,UACZ;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAC/B;AAAA,MACA,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACE,YAAAF,EAAA;AAAA,UACjB;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,EACtD,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -6,12 +6,13 @@ import "react-i18next";
6
6
  import "@gusto/embedded-api/models/errors/apierror";
7
7
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
8
8
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
9
+ import "@tanstack/react-query";
9
10
  import "../../Base/useBase.js";
10
11
  import "../../../shared/constants.js";
11
12
  import "dompurify";
12
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
14
  import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
14
- const P = o.object({
15
+ const s = o.object({
15
16
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
16
17
  anchorPayDate: o.date().optional(),
17
18
  anchorEndOfPayPeriod: o.date().optional(),
@@ -20,10 +21,10 @@ const P = o.object({
20
21
  customName: o.string().optional(),
21
22
  customTwicePerMonth: o.string().optional(),
22
23
  payPeriodPreviewRange: o.number().optional()
23
- }), [s, w] = e("PayScheduleContext");
24
+ }), [w, x] = e("PayScheduleContext");
24
25
  export {
25
- w as PayScheduleProvider,
26
- P as PayScheduleSchema,
27
- s as usePaySchedule
26
+ x as PayScheduleProvider,
27
+ s as PayScheduleSchema,
28
+ w as usePaySchedule
28
29
  };
29
30
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n payPeriodPreviewRange: z.number().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AA2Ba,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAK,EAAE,SAAS;AAAA,EACjC,sBAAsBA,EAAE,KAAK,EAAE,SAAS;AAAA,EACxC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,qBAAqBA,EAAE,OAAO,EAAE,SAAS;AAAA,EACzC,uBAAuBA,EAAE,OAAO,EAAE,SAAS;AAC7C,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n payPeriodPreviewRange: z.number().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA2Ba,MAAAA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAK,EAAE,SAAS;AAAA,EACjC,sBAAsBA,EAAE,KAAK,EAAE,SAAS;AAAA,EACxC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzC,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,qBAAqBA,EAAE,OAAO,EAAE,SAAS;AAAA,EACzC,uBAAuBA,EAAE,OAAO,EAAE,SAAS;AAC7C,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}