@gusto/embedded-react-sdk 0.55.0 → 0.55.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 (129) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/components/Common/TaxInputs/TaxInputs.js +65 -64
  3. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  4. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  5. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  6. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  7. package/dist/components/Common/UI/Select/Select.module.scss.js +5 -5
  8. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  9. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  10. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  11. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  12. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  13. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  14. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  15. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  16. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  17. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  18. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  19. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  20. package/dist/components/Company/Industry/Context.js +6 -7
  21. package/dist/components/Company/Industry/Context.js.map +1 -1
  22. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  23. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  24. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  25. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  26. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  27. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  28. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  29. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  30. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  31. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  32. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -4
  33. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  34. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +4 -2
  35. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +148 -117
  36. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
  37. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +56 -55
  38. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  39. package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.d.ts +1 -1
  40. package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js +15 -12
  41. package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js.map +1 -1
  42. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.d.ts +69 -0
  43. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js +48 -0
  44. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js.map +1 -0
  45. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.d.ts +20 -0
  46. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.js +25 -0
  47. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.js.map +1 -0
  48. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.d.ts +20 -0
  49. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.js +24 -0
  50. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.js.map +1 -0
  51. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/index.d.ts +2 -0
  52. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +16 -15
  53. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
  54. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  55. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +36 -23
  56. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  57. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +10 -8
  58. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +46 -25
  59. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  60. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +53 -52
  61. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  62. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +37 -47
  63. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  64. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +47 -44
  65. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  66. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +2 -1
  67. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +65 -53
  68. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  69. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +6 -4
  70. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -1
  71. package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.d.ts +1 -1
  72. package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js +22 -19
  73. package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js.map +1 -1
  74. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +2 -8
  75. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +43 -42
  76. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -1
  77. package/dist/components/Contractor/Payments/shared/paymentAmounts.d.ts +32 -0
  78. package/dist/components/Contractor/Payments/shared/paymentAmounts.js +11 -0
  79. package/dist/components/Contractor/Payments/shared/paymentAmounts.js.map +1 -0
  80. package/dist/components/Contractor/Payments/shared/paymentAmounts.test.d.ts +1 -0
  81. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +13 -4
  82. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +43 -38
  83. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -1
  84. package/dist/components/Contractor/exports/contractorManagement.d.ts +1 -0
  85. package/dist/components/Contractor/exports/contractorManagement.js +34 -32
  86. package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
  87. package/dist/components/Contractor/shared/SelectContractors/SelectContractors.d.ts +6 -1
  88. package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js +13 -12
  89. package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js.map +1 -1
  90. package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.d.ts +5 -1
  91. package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +34 -32
  92. package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -1
  93. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  94. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  95. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  96. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  97. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  98. package/dist/components/Flow/Flow.js +1 -1
  99. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  100. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  101. package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
  102. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  103. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -0
  104. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +36 -34
  105. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  106. package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.d.ts +22 -0
  107. package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.js +14 -0
  108. package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.js.map +1 -0
  109. package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.d.ts +19 -0
  110. package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.js +8 -0
  111. package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.js.map +1 -0
  112. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +41 -0
  113. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js +14 -0
  114. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -0
  115. package/dist/contexts/index.d.ts +1 -0
  116. package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +34 -32
  117. package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -1
  118. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +20 -18
  119. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -1
  120. package/dist/i18n/en/common.json.d.ts +0 -21
  121. package/dist/i18n/types.d.ts +10 -2
  122. package/dist/shared/constants.d.ts +2 -0
  123. package/dist/shared/constants.js +1 -0
  124. package/dist/shared/constants.js.map +1 -1
  125. package/dist/style.css +1 -1
  126. package/dist/test-utils/renderWithProviders.d.ts +4 -1
  127. package/dist/test-utils/tableQueries.d.ts +9 -0
  128. package/docs/guides/endpoint-inventory.json +7 -0
  129. package/package.json +18 -18
@@ -11,17 +11,16 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../shared/constants.js";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [P, f] = t("IndustryItems", {
15
+ const [A, P] = t("IndustryItems", {
17
16
  items: []
18
- }), [v, x] = t("IndustryApi", {
17
+ }), [f, v] = t("IndustryApi", {
19
18
  isPending: !1
20
19
  });
21
20
  export {
22
- x as IndustryApiStateProvider,
23
- f as IndustryItemsProvider,
24
- v as useIndustryApiState,
25
- P as useIndustryItems
21
+ v as IndustryApiStateProvider,
22
+ P as IndustryItemsProvider,
23
+ f as useIndustryApiState,
24
+ A as useIndustryItems
26
25
  };
27
26
  //# 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;"}
@@ -11,13 +11,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
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 [L, f] = o(
15
+ const [d, L] = o(
17
16
  "CompanyDocumentFormContext"
18
17
  );
19
18
  export {
20
- f as LocationsFormProvider,
21
- L as useLocationsForm
19
+ L as LocationsFormProvider,
20
+ d as useLocationsForm
22
21
  };
23
22
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -11,13 +11,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
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 [f, v] = o(
15
+ const [d, f] = o(
17
16
  "CompanyDocumentListContext"
18
17
  );
19
18
  export {
20
- v as LocationsListProvider,
21
- f as useLocationsList
19
+ f as LocationsListProvider,
20
+ d as useLocationsList
22
21
  };
23
22
  //# 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'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../shared/constants.js";
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 [C, c] = o("OnboardingOverviewContext");
15
+ const [x, C] = o("OnboardingOverviewContext");
17
16
  export {
18
- c as OnboardingOverviewProvider,
19
- C as useOnboardingOverview
17
+ C as OnboardingOverviewProvider,
18
+ x as useOnboardingOverview
20
19
  };
21
20
  //# 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;"}
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
13
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesFormContext");
15
+ const [c, d] = t("StateTaxesFormContext");
17
16
  export {
18
- u as StateTaxesFormProvider,
19
- d as useStateTaxesForm
17
+ d as StateTaxesFormProvider,
18
+ c as useStateTaxesForm
20
19
  };
21
20
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
13
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, u] = t("StateTaxesListContext");
15
+ const [c, d] = t("StateTaxesListContext");
17
16
  export {
18
- u as StateTaxesListProvider,
19
- d as useStateTaxesList
17
+ d as StateTaxesListProvider,
18
+ c as useStateTaxesList
20
19
  };
21
20
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n handleManageRates: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAWA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n handleManageRates: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAWA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
@@ -11,11 +11,10 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
13
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, s] = t("TaxRateManagementContext");
15
+ const [c, d] = t("TaxRateManagementContext");
17
16
  export {
18
- s as TaxRateManagementProvider,
19
- d as useTaxRateManagement
17
+ d as TaxRateManagementProvider,
18
+ c as useTaxRateManagement
20
19
  };
21
20
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/TaxRateManagement/context.ts"],"sourcesContent":["import type { TaxRequirementSet } from '@gusto/embedded-api/models/components/taxrequirementset'\nimport { createCompoundContext } from '@/components/Base'\n\n/**\n * A state's effective-dated requirement sets for a single key, grouped for history display,\n * plus any future-dated candidate sets available to schedule against.\n *\n * @internal\n */\nexport interface TaxRateKeyGroup {\n key: string\n label?: string\n sets: TaxRequirementSet[]\n candidateSets: TaxRequirementSet[]\n}\n\ninterface TaxRateManagementContextType {\n state: string\n groups: TaxRateKeyGroup[]\n isPendingUpdate: boolean\n handleCancel: () => void\n handleAddRate: (\n key: string,\n effectiveFrom: string,\n requirements: { key: string; value: string }[],\n ) => Promise<boolean>\n}\n\nconst [useTaxRateManagement, TaxRateManagementProvider] =\n createCompoundContext<TaxRateManagementContextType>('TaxRateManagementContext')\n\nexport { useTaxRateManagement, TaxRateManagementProvider }\n"],"names":["useTaxRateManagement","TaxRateManagementProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA4BA,MAAM,CAACA,GAAsBC,CAAyB,IACpDC,EAAoD,0BAA0B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/TaxRateManagement/context.ts"],"sourcesContent":["import type { TaxRequirementSet } from '@gusto/embedded-api/models/components/taxrequirementset'\nimport { createCompoundContext } from '@/components/Base'\n\n/**\n * A state's effective-dated requirement sets for a single key, grouped for history display,\n * plus any future-dated candidate sets available to schedule against.\n *\n * @internal\n */\nexport interface TaxRateKeyGroup {\n key: string\n label?: string\n sets: TaxRequirementSet[]\n candidateSets: TaxRequirementSet[]\n}\n\ninterface TaxRateManagementContextType {\n state: string\n groups: TaxRateKeyGroup[]\n isPendingUpdate: boolean\n handleCancel: () => void\n handleAddRate: (\n key: string,\n effectiveFrom: string,\n requirements: { key: string; value: string }[],\n ) => Promise<boolean>\n}\n\nconst [useTaxRateManagement, TaxRateManagementProvider] =\n createCompoundContext<TaxRateManagementContextType>('TaxRateManagementContext')\n\nexport { useTaxRateManagement, TaxRateManagementProvider }\n"],"names":["useTaxRateManagement","TaxRateManagementProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA4BA,MAAM,CAACA,GAAsBC,CAAyB,IACpDC,EAAoD,0BAA0B;"}
@@ -19,10 +19,12 @@ export interface CreateHistoricalPaymentProps extends BaseComponentInterface<'Co
19
19
  * Continue on the contractor-selection step is disabled until the paid date is valid and at least
20
20
  * one contractor is selected. Continue on the amounts step is disabled until at least one selected
21
21
  * contractor has a payment total greater than zero, and swaps the amounts grid for an in-place
22
- * review (mirroring `CreatePayment`'s preview step); Edit returns to the grid without losing
22
+ * review (mirroring `CreatePayment`'s preview step); Back returns to the grid without losing
23
23
  * entered amounts, and Submit creates the contractor payment group. Once creation succeeds, the
24
- * Edit and Submit buttons are replaced with a success message, since the creation token has been
24
+ * Back and Submit buttons are replaced with a success message, since the creation token has been
25
25
  * consumed and the host is expected to navigate away (e.g. to `HistoricalPaymentSummary`).
26
+ * The amounts step also has its own Back button, returning to contractor selection without losing
27
+ * the selected paid date, contractors, or any amounts already entered.
26
28
  *
27
29
  * @events
28
30
  * | Event | Description | Data |
@@ -1,175 +1,206 @@
1
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
- import { useContractorsListSuspense as j } from "@gusto/embedded-api/react-query/contractorsList";
3
- import { useContractorPaymentGroupsPreviewMutation as q } from "@gusto/embedded-api/react-query/contractorPaymentGroupsPreview";
4
- import { useContractorPaymentGroupsCreateMutation as W } from "@gusto/embedded-api/react-query/contractorPaymentGroupsCreate";
5
- import { RFCDate as O } from "@gusto/embedded-api/types/rfcdate";
6
- import { useMemo as U, useState as y } from "react";
7
- import { useTranslation as x } from "react-i18next";
8
- import { usePaymentAmountsEditor as K } from "../shared/usePaymentAmountsEditor.js";
9
- import { getHistoricalPaymentCheckDateBounds as V } from "../shared/historicalPaymentDateBounds.js";
10
- import { useCreateHistoricalPaymentDictionary as z, useCreateHistoricalPaymentReviewDictionary as J } from "./useFormDictionary.js";
11
- import { formatDateToStringDate as Q } from "../../../../helpers/dateFormatting.js";
12
- import { Flex as c, FlexItem as X } from "../../../Common/Flex/Flex.js";
13
- import { ActionsLayout as Z } from "../../../Common/ActionsLayout/ActionsLayout.js";
14
- import { BaseComponent as $ } from "../../../Base/Base.js";
15
- import { useBase as tt } from "../../../Base/useBase.js";
16
- import { useComponentContext as M } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
17
- import { useI18n as et, useComponentDictionary as nt } from "../../../../i18n/I18n.js";
18
- import { useDateFormatter as rt } from "../../../../hooks/useDateFormatter.js";
19
- import { componentEvents as p } from "../../../../shared/constants.js";
20
- import { SelectContractors as ot } from "../../shared/SelectContractors/SelectContractors.js";
21
- import { PaymentSummaryBlock as at } from "../shared/PaymentSummaryBlock/PaymentSummaryBlock.js";
22
- import { SetPaymentAmounts as it } from "../shared/SetPaymentAmounts/SetPaymentAmounts.js";
23
- const S = ["Historical Payment"];
24
- function Ot(a) {
25
- return /* @__PURE__ */ t($, { ...a, componentName: "Contractor.Payments.CreateHistoricalPayment", children: /* @__PURE__ */ t(ct, { ...a }) });
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { useContractorsListSuspense as W } from "@gusto/embedded-api/react-query/contractorsList";
3
+ import { useContractorPaymentGroupsPreviewMutation as K } from "@gusto/embedded-api/react-query/contractorPaymentGroupsPreview";
4
+ import { useContractorPaymentGroupsCreateMutation as V } from "@gusto/embedded-api/react-query/contractorPaymentGroupsCreate";
5
+ import { RFCDate as x } from "@gusto/embedded-api/types/rfcdate";
6
+ import { useMemo as z, useState as d } from "react";
7
+ import { useTranslation as _ } from "react-i18next";
8
+ import { usePaymentAmountsEditor as J } from "../shared/usePaymentAmountsEditor.js";
9
+ import { getHistoricalPaymentCheckDateBounds as Q } from "../shared/historicalPaymentDateBounds.js";
10
+ import { useCreateHistoricalPaymentDictionary as X, useCreateHistoricalPaymentReviewDictionary as Z } from "./useFormDictionary.js";
11
+ import { formatDateToStringDate as $ } from "../../../../helpers/dateFormatting.js";
12
+ import { Flex as s, FlexItem as tt } from "../../../Common/Flex/Flex.js";
13
+ import { ActionsLayout as et } from "../../../Common/ActionsLayout/ActionsLayout.js";
14
+ import { BaseComponent as nt } from "../../../Base/Base.js";
15
+ import { useBase as rt } from "../../../Base/useBase.js";
16
+ import { useComponentContext as O } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
17
+ import { useI18n as ot, useComponentDictionary as at } from "../../../../i18n/I18n.js";
18
+ import { useDateFormatter as it } from "../../../../hooks/useDateFormatter.js";
19
+ import { componentEvents as D } from "../../../../shared/constants.js";
20
+ import { SelectContractors as ct } from "../../shared/SelectContractors/SelectContractors.js";
21
+ import st from "../../../../assets/icons/caret-left.svg.js";
22
+ import { useUnstableFeature as lt } from "../../../../contexts/UnstableFeaturesProvider/useUnstableFeature.js";
23
+ import { PaymentSummaryBlock as ut } from "../shared/PaymentSummaryBlock/PaymentSummaryBlock.js";
24
+ import { SetPaymentAmounts as mt } from "../shared/SetPaymentAmounts/SetPaymentAmounts.js";
25
+ const L = ["Historical Payment"];
26
+ function Nt(r) {
27
+ return /* @__PURE__ */ t(nt, { ...r, componentName: "Contractor.Payments.CreateHistoricalPayment", children: /* @__PURE__ */ t(dt, { ...r }) });
26
28
  }
27
- function ct({ companyId: a, dictionary: R, onEvent: h }) {
28
- et("Contractor.Payments.CreateHistoricalPayment"), nt("Contractor.Payments.CreateHistoricalPayment", R);
29
- const { t: e } = x("Contractor.Payments.CreateHistoricalPayment"), { Heading: r, Text: f, Button: u, DatePicker: m } = M(), { minDate: d, maxDate: C } = U(() => V(), []), [o, I] = y(null), [P, E] = y([]), [l, D] = y(null);
30
- let s = null;
31
- o !== null && o > C ? s = e("select.dateInFutureError") : o !== null && o < d && (s = e("select.dateTooEarlyError", {
32
- year: o.getFullYear(),
33
- allowedYear: d.getFullYear()
29
+ function dt({ companyId: r, dictionary: C, onEvent: u }) {
30
+ lt("historicalPayments", { throwIfDisabled: !0 }), ot("Contractor.Payments.CreateHistoricalPayment"), at("Contractor.Payments.CreateHistoricalPayment", C);
31
+ const { t: e } = _("Contractor.Payments.CreateHistoricalPayment"), { Heading: S, Text: E, Button: o, DatePicker: T } = O(), { minDate: l, maxDate: y } = z(() => Q(), []), [a, g] = d(null), [p, H] = d([]), [h, v] = d(null), [P, f] = d(void 0);
32
+ let i = null;
33
+ a !== null && a > y ? i = e("select.dateInFutureError") : a !== null && a < l && (i = e("select.dateTooEarlyError", {
34
+ year: a.getFullYear(),
35
+ allowedYear: l.getFullYear()
34
36
  }));
35
- const T = P.length > 0 && o !== null && s === null, g = () => {
36
- if (!T) return;
37
- const A = Q(o);
38
- A && D({ contractorIds: P, checkDate: A });
37
+ const A = p.length > 0 && a !== null && i === null, w = () => {
38
+ if (!A) return;
39
+ const m = $(a);
40
+ m && v({ contractorIds: p, checkDate: m });
39
41
  };
40
- return l ? /* @__PURE__ */ t(
41
- st,
42
+ return h ? /* @__PURE__ */ t(
43
+ Ct,
42
44
  {
43
- companyId: a,
44
- contractorIds: l.contractorIds,
45
- checkDate: l.checkDate,
46
- onEvent: h
45
+ companyId: r,
46
+ contractorIds: h.contractorIds,
47
+ checkDate: h.checkDate,
48
+ onEvent: u,
49
+ preservedContractorPayments: P,
50
+ onBack: (m) => {
51
+ f(m), v(null);
52
+ }
47
53
  }
48
- ) : /* @__PURE__ */ i(c, { flexDirection: "column", gap: 32, children: [
49
- /* @__PURE__ */ i(c, { flexDirection: "column", gap: 4, children: [
50
- /* @__PURE__ */ t(r, { as: "h2", children: e("select.heading") }),
51
- /* @__PURE__ */ t(f, { variant: "supporting", children: e("select.subtitle") })
54
+ ) : /* @__PURE__ */ c(s, { flexDirection: "column", gap: 32, children: [
55
+ /* @__PURE__ */ c(s, { flexDirection: "column", gap: 4, children: [
56
+ /* @__PURE__ */ t(S, { as: "h2", children: e("select.heading") }),
57
+ /* @__PURE__ */ t(E, { variant: "supporting", children: e("select.subtitle") })
52
58
  ] }),
53
59
  /* @__PURE__ */ t(
54
- m,
60
+ T,
55
61
  {
56
62
  label: e("select.dateLabel"),
57
63
  isRequired: !0,
58
- value: o,
59
- onChange: I,
60
- minDate: d,
61
- maxDate: C,
62
- isInvalid: s !== null,
63
- errorMessage: s ?? void 0
64
+ value: a,
65
+ onChange: g,
66
+ minDate: l,
67
+ maxDate: y,
68
+ isInvalid: i !== null,
69
+ errorMessage: i ?? void 0
70
+ }
71
+ ),
72
+ /* @__PURE__ */ t(
73
+ ct,
74
+ {
75
+ companyId: r,
76
+ onSelectionChange: H,
77
+ initialSelectedIds: p
64
78
  }
65
79
  ),
66
- /* @__PURE__ */ t(ot, { companyId: a, onSelectionChange: E }),
67
- /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ t(u, { onClick: g, variant: "primary", isDisabled: !T, children: e("select.continueButton") }) })
80
+ /* @__PURE__ */ t(et, { children: /* @__PURE__ */ t(o, { onClick: w, variant: "primary", isDisabled: !A, children: e("select.continueButton") }) })
68
81
  ] });
69
82
  }
70
- function st({ companyId: a, contractorIds: R, checkDate: h, onEvent: e }) {
71
- const { t: r } = x("Contractor.Payments.CreateHistoricalPayment"), { Heading: f, Text: u, Button: m, Alert: d } = M(), { baseSubmitHandler: C } = tt(), { formatLongWithYear: o } = rt(), I = z(), P = J(), { data: E } = j({ companyUuid: a }), l = (E.contractors ?? []).filter(
72
- (n) => R.includes(n.uuid)
73
- ), { virtualContractorPayments: D, totals: s, editModal: T } = K({
74
- contractors: l,
75
- allowedPaymentMethods: S,
83
+ function Ct({
84
+ companyId: r,
85
+ contractorIds: C,
86
+ checkDate: u,
87
+ onEvent: e,
88
+ preservedContractorPayments: S,
89
+ onBack: E
90
+ }) {
91
+ const { t: o } = _("Contractor.Payments.CreateHistoricalPayment"), { Heading: T, Text: l, Button: y, Alert: a } = O(), { baseSubmitHandler: g } = rt(), { formatLongWithYear: p } = it(), H = X(), h = Z(), { data: v } = W({ companyUuid: r }), P = (v.contractors ?? []).filter(
92
+ (n) => C.includes(n.uuid)
93
+ ), { virtualContractorPayments: f, totals: i, editModal: A } = J({
94
+ contractors: P,
95
+ allowedPaymentMethods: L,
96
+ preservedContractorPayments: S,
76
97
  onEditOpen: () => {
77
- e(p.CONTRACTOR_HISTORICAL_PAYMENT_EDIT);
98
+ e(D.CONTRACTOR_HISTORICAL_PAYMENT_EDIT);
78
99
  },
79
100
  onEditSave: (n) => {
80
- e(p.CONTRACTOR_HISTORICAL_PAYMENT_UPDATE, n);
101
+ e(D.CONTRACTOR_HISTORICAL_PAYMENT_UPDATE, n);
81
102
  }
82
- }), g = s.total > 0, { mutateAsync: A, isPending: b } = q(), { mutateAsync: B, isPending: L } = W(), [w, k] = y(null), [_, N] = y(!1), H = () => D.filter((n) => n.isTouched).map(({ isTouched: n, ...v }) => v), Y = async () => {
83
- g && await C(null, async () => {
84
- const n = await A({
103
+ }), w = i.total > 0, { mutateAsync: m, isPending: N } = K(), { mutateAsync: Y, isPending: G } = V(), [k, B] = d(null), [I, F] = d(!1), b = () => f.filter((n) => n.isTouched).map(({ isTouched: n, ...R }) => R), q = async () => {
104
+ w && await g(null, async () => {
105
+ const n = await m({
85
106
  request: {
86
- companyId: a,
107
+ companyId: r,
87
108
  requestBody: {
88
- checkDate: new O(h),
89
- contractorPayments: H()
109
+ checkDate: new x(u),
110
+ contractorPayments: b()
90
111
  }
91
112
  }
92
113
  });
93
- k(n.contractorPaymentGroupPreview || null), e(
94
- p.CONTRACTOR_HISTORICAL_PAYMENT_PREVIEW,
114
+ B(n.contractorPaymentGroupPreview || null), e(
115
+ D.CONTRACTOR_HISTORICAL_PAYMENT_PREVIEW,
95
116
  n.contractorPaymentGroupPreview
96
117
  );
97
118
  });
98
- }, G = () => {
99
- k(null), e(p.CONTRACTOR_HISTORICAL_PAYMENT_BACK_TO_EDIT);
100
- }, F = async () => {
101
- const n = w?.creationToken;
102
- !n || _ || await C(null, async () => {
103
- const v = await B({
119
+ }, j = () => {
120
+ B(null), e(D.CONTRACTOR_HISTORICAL_PAYMENT_BACK_TO_EDIT);
121
+ }, U = async () => {
122
+ const n = k?.creationToken;
123
+ !n || I || await g(null, async () => {
124
+ const R = await Y({
104
125
  request: {
105
- companyId: a,
126
+ companyId: r,
106
127
  requestBody: {
107
- checkDate: new O(h),
128
+ checkDate: new x(u),
108
129
  creationToken: n,
109
- contractorPayments: H()
130
+ contractorPayments: b()
110
131
  }
111
132
  }
112
133
  });
113
- v.contractorPaymentGroup && (N(!0), e(
114
- p.CONTRACTOR_HISTORICAL_PAYMENT_CREATED,
115
- v.contractorPaymentGroup
134
+ R.contractorPaymentGroup && (F(!0), e(
135
+ D.CONTRACTOR_HISTORICAL_PAYMENT_CREATED,
136
+ R.contractorPaymentGroup
116
137
  ));
117
138
  });
118
139
  };
119
- return w ? /* @__PURE__ */ i(c, { flexDirection: "column", gap: 32, children: [
120
- /* @__PURE__ */ i(c, { justifyContent: "space-between", alignItems: "flex-start", gap: 16, children: [
121
- /* @__PURE__ */ i(c, { flexDirection: "column", gap: 4, children: [
122
- /* @__PURE__ */ t(f, { as: "h2", children: r("review.title") }),
123
- /* @__PURE__ */ t(u, { variant: "supporting", children: r("review.subtitle", {
124
- checkDate: o(w.checkDate ?? "")
140
+ return k ? /* @__PURE__ */ c(s, { flexDirection: "column", gap: 32, children: [
141
+ !I && /* @__PURE__ */ t(M, { onClick: j }),
142
+ /* @__PURE__ */ c(s, { justifyContent: "space-between", alignItems: "flex-start", gap: 16, children: [
143
+ /* @__PURE__ */ c(s, { flexDirection: "column", gap: 4, children: [
144
+ /* @__PURE__ */ t(T, { as: "h2", children: o("review.title") }),
145
+ /* @__PURE__ */ t(l, { variant: "supporting", children: o("review.subtitle", {
146
+ checkDate: p(k.checkDate ?? "")
125
147
  }) })
126
148
  ] }),
127
- !_ && /* @__PURE__ */ i(c, { justifyContent: "flex-end", gap: 16, children: [
128
- /* @__PURE__ */ t(m, { onClick: G, variant: "secondary", children: r("review.editButton") }),
129
- /* @__PURE__ */ t(m, { onClick: F, variant: "primary", isLoading: L, children: r("review.submitButton") })
130
- ] })
149
+ !I && /* @__PURE__ */ t(y, { onClick: U, variant: "primary", isLoading: G, children: o("review.submitButton") })
131
150
  ] }),
132
- _ && /* @__PURE__ */ t(d, { status: "success", label: r("review.successTitle"), children: /* @__PURE__ */ t(u, { children: r("review.successMessage") }) }),
151
+ I && /* @__PURE__ */ t(a, { status: "success", label: o("review.successTitle"), children: /* @__PURE__ */ t(l, { children: o("review.successMessage") }) }),
133
152
  /* @__PURE__ */ t(
134
- at,
153
+ ut,
135
154
  {
136
- contractorPaymentGroup: w,
137
- contractors: l,
155
+ contractorPaymentGroup: k,
156
+ contractors: P,
138
157
  showDebitColumns: !1,
139
- dictionary: P
158
+ dictionary: h
140
159
  }
141
160
  )
142
- ] }) : /* @__PURE__ */ i(c, { flexDirection: "column", gap: 32, children: [
143
- /* @__PURE__ */ i(c, { justifyContent: "flex-end", gap: 16, children: [
144
- /* @__PURE__ */ i(c, { flexDirection: "column", gap: 4, children: [
145
- /* @__PURE__ */ t(f, { as: "h2", children: r("amounts.heading") }),
146
- /* @__PURE__ */ t(u, { variant: "supporting", children: r("amounts.subtitle") })
161
+ ] }) : /* @__PURE__ */ c(s, { flexDirection: "column", gap: 32, children: [
162
+ /* @__PURE__ */ t(
163
+ M,
164
+ {
165
+ onClick: () => {
166
+ E(f);
167
+ }
168
+ }
169
+ ),
170
+ /* @__PURE__ */ c(s, { justifyContent: "flex-end", gap: 16, children: [
171
+ /* @__PURE__ */ c(s, { flexDirection: "column", gap: 4, children: [
172
+ /* @__PURE__ */ t(T, { as: "h2", children: o("amounts.heading") }),
173
+ /* @__PURE__ */ t(l, { variant: "supporting", children: o("amounts.subtitle") })
147
174
  ] }),
148
- /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t(
149
- m,
175
+ /* @__PURE__ */ t(tt, { children: /* @__PURE__ */ t(
176
+ y,
150
177
  {
151
- onClick: Y,
178
+ onClick: q,
152
179
  variant: "primary",
153
- isDisabled: !g,
154
- isLoading: b,
155
- children: r("amounts.continueButton")
180
+ isDisabled: !w,
181
+ isLoading: N,
182
+ children: o("amounts.continueButton")
156
183
  }
157
184
  ) })
158
185
  ] }),
159
186
  /* @__PURE__ */ t(
160
- it,
187
+ mt,
161
188
  {
162
- contractors: l,
163
- contractorPayments: D,
164
- totals: s,
165
- allowedPaymentMethods: S,
166
- editModal: T,
167
- dictionary: I
189
+ contractors: P,
190
+ contractorPayments: f,
191
+ totals: i,
192
+ allowedPaymentMethods: L,
193
+ editModal: A,
194
+ dictionary: H
168
195
  }
169
196
  )
170
197
  ] });
171
198
  }
199
+ function M({ onClick: r }) {
200
+ const { t: C } = _("Contractor.Payments.CreateHistoricalPayment"), { Button: u } = O();
201
+ return /* @__PURE__ */ t(u, { variant: "secondary", icon: /* @__PURE__ */ t(st, { "aria-hidden": "true" }), onClick: r, children: C("backButton") });
202
+ }
172
203
  export {
173
- Ot as CreateHistoricalPayment
204
+ Nt as CreateHistoricalPayment
174
205
  };
175
206
  //# sourceMappingURL=CreateHistoricalPayment.js.map