@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoricalPaymentFlow.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useState } from 'react'\nimport { historicalPaymentMachine } from './historicalPaymentMachine'\nimport {\n CreateHistoricalPaymentContextual,\n type HistoricalPaymentFlowContextInterface,\n type HistoricalPaymentFlowProps,\n} from './HistoricalPaymentFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { FlowBreadcrumb } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport { useUnstableFeature } from '@/contexts/UnstableFeaturesProvider/useUnstableFeature'\n\nconst EMPTY_BREADCRUMBS: FlowBreadcrumb[] = []\n\n/**\n * Props for the flow-internal {@link HistoricalPaymentInternalFlow}, which layers a parent flow's\n * prefix breadcrumbs on top of the public {@link HistoricalPaymentFlowProps}.\n *\n * @internal\n */\nexport interface HistoricalPaymentInternalFlowProps extends HistoricalPaymentFlowProps {\n /**\n * Breadcrumbs prepended to this flow's trail. Set by a parent flow (e.g. `PaymentFlow`) so a\n * user can navigate out of this flow entirely -- this flow contributes no breadcrumb items of\n * its own (each of its own screens has its own Back button instead), so the trail is just\n * `prefixBreadcrumbs` passed straight through.\n */\n prefixBreadcrumbs?: FlowBreadcrumb[]\n}\n\n/**\n * Guided flow to record a historical contractor payment and review the resulting summary.\n *\n * @remarks\n * This is the inner flow that powers the historical-payment spoke of `ContractorManagement.PaymentFlow`.\n * Render it directly when you have built your own payments landing page and want to hand the user\n * off to the standard historical-payment experience without re-implementing it. A historical payment\n * already happened outside Gusto and does not move money, so unlike `CreatePaymentFlow` there is no\n * Fast ACH blocker or wire-transfer step.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/historicalPayments/edit` | The edit modal was opened for a contractor | — |\n * | `contractor/historicalPayments/update` | A contractor's payment values were updated locally | The updated form values (hours, wage, bonus, reimbursement, payment method, etc.) |\n * | `contractor/historicalPayments/preview` | The preview API call succeeded | The contractor payment group preview response |\n * | `contractor/historicalPayments/backToEdit` | The user returned from preview to continue editing | — |\n * | `contractor/historicalPayments/created` | The payment group was successfully created | The created `ContractorPaymentGroup` |\n * | `contractor/historicalPayments/exit` | User is done reviewing the summary | — |\n * | `breadcrumb/navigate` | Fired when the user clicks a breadcrumb injected via `prefixBreadcrumbs` | `{ key: string, onNavigate: (ctx) => ctx }` |\n *\n * @components\n * - {@link CreateHistoricalPayment}\n * - {@link HistoricalPaymentSummary}\n *\n * @param props - See {@link HistoricalPaymentFlowProps}.\n * @returns The composed historical-payment flow.\n * @alpha\n *\n * @example\n * ```tsx title=\"App.tsx\"\n * import { ContractorManagement } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <ContractorManagement.HistoricalPaymentFlow\n * companyId=\"a007e1ab-3595-43c2-ab4b-af7a5af2e365\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function HistoricalPaymentFlow(props: HistoricalPaymentFlowProps) {\n return <HistoricalPaymentInternalFlow {...props} />\n}\n\n/**\n * Flow-internal entry point for {@link HistoricalPaymentFlow} that additionally accepts\n * flow-injected `prefixBreadcrumbs`. Partners use {@link HistoricalPaymentFlow}; `PaymentFlow`\n * renders this directly to give the user a way back to the payments landing screen.\n *\n * @internal\n */\nexport function HistoricalPaymentInternalFlow(props: HistoricalPaymentInternalFlowProps) {\n useUnstableFeature('historicalPayments', { throwIfDisabled: true })\n\n // Remount and reset all state if companyId ever changes\n return <HistoricalPaymentFlowMachine key={props.companyId} {...props} />\n}\n\nfunction HistoricalPaymentFlowMachine({\n companyId,\n onEvent,\n prefixBreadcrumbs = EMPTY_BREADCRUMBS,\n}: HistoricalPaymentInternalFlowProps) {\n // Built once via a lazy useState initializer. If the companyId ever changes,\n // remount the entire component to reset all state, not just the state machine.\n const [historicalPaymentFlow] = useState(() => {\n const initialBreadcrumbContext = updateBreadcrumbs('createHistoricalPayment', {\n header: {\n type: 'breadcrumbs' as const,\n breadcrumbs: {\n createHistoricalPayment: prefixBreadcrumbs,\n historicalPaymentSummary: prefixBreadcrumbs,\n },\n },\n })\n\n return createMachine(\n 'createHistoricalPayment',\n historicalPaymentMachine,\n (initialContext: HistoricalPaymentFlowContextInterface) => ({\n ...initialContext,\n ...initialBreadcrumbContext,\n component: CreateHistoricalPaymentContextual,\n companyId,\n }),\n )\n })\n\n return <Flow machine={historicalPaymentFlow} onEvent={onEvent} />\n}\n"],"names":["EMPTY_BREADCRUMBS","HistoricalPaymentFlow","props","jsx","HistoricalPaymentInternalFlow","useUnstableFeature","HistoricalPaymentFlowMachine","companyId","onEvent","prefixBreadcrumbs","historicalPaymentFlow","useState","initialBreadcrumbContext","updateBreadcrumbs","createMachine","historicalPaymentMachine","initialContext","CreateHistoricalPaymentContextual","Flow"],"mappings":";;;;;;;;AAaA,MAAMA,IAAsC,CAAA;AA6DrC,SAASC,EAAsBC,GAAmC;AACvE,SAAO,gBAAAC,EAACC,GAAA,EAA+B,GAAGF,EAAA,CAAO;AACnD;AASO,SAASE,EAA8BF,GAA2C;AACvF,SAAAG,EAAmB,sBAAsB,EAAE,iBAAiB,GAAA,CAAM,GAG3D,gBAAAF,EAACG,GAAA,EAAoD,GAAGJ,EAAA,GAArBA,EAAM,SAAsB;AACxE;AAEA,SAASI,EAA6B;AAAA,EACpC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,mBAAAC,IAAoBT;AACtB,GAAuC;AAGrC,QAAM,CAACU,CAAqB,IAAIC,EAAS,MAAM;AAC7C,UAAMC,IAA2BC,EAAkB,2BAA2B;AAAA,MAC5E,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACX,yBAAyBJ;AAAA,UACzB,0BAA0BA;AAAA,QAAA;AAAA,MAC5B;AAAA,IACF,CACD;AAED,WAAOK;AAAA,MACL;AAAA,MACAC;AAAA,MACA,CAACC,OAA2D;AAAA,QAC1D,GAAGA;AAAA,QACH,GAAGJ;AAAA,QACH,WAAWK;AAAA,QACX,WAAAV;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ,CAAC;AAED,SAAO,gBAAAJ,EAACe,GAAA,EAAK,SAASR,GAAuB,SAAAF,EAAA,CAAkB;AACjE;"}
@@ -0,0 +1,20 @@
1
+ import { FlowContextInterface } from '../../../Flow/useFlow';
2
+ import { BaseComponentInterface } from '../../../Base';
3
+ /**
4
+ * Props for {@link HistoricalPaymentFlow}.
5
+ *
6
+ * @alpha
7
+ */
8
+ export interface HistoricalPaymentFlowProps extends BaseComponentInterface<never> {
9
+ /** The associated company identifier. */
10
+ companyId: string;
11
+ }
12
+ /** @internal */
13
+ export interface HistoricalPaymentFlowContextInterface extends FlowContextInterface {
14
+ companyId: string;
15
+ createdPaymentGroupId?: string;
16
+ }
17
+ /** @internal */
18
+ export declare function CreateHistoricalPaymentContextual(): import("react").JSX.Element;
19
+ /** @internal */
20
+ export declare function HistoricalPaymentSummaryContextual(): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { CreateHistoricalPayment as a } from "../CreateHistoricalPayment/CreateHistoricalPayment.js";
3
+ import { HistoricalPaymentSummary as i } from "../HistoricalPaymentSummary/HistoricalPaymentSummary.js";
4
+ import { useFlow as e } from "../../../Flow/useFlow.js";
5
+ import { ensureRequired as r } from "../../../../helpers/ensureRequired.js";
6
+ function d() {
7
+ const { companyId: t, onEvent: o } = e();
8
+ return /* @__PURE__ */ n(a, { onEvent: o, companyId: r(t) });
9
+ }
10
+ function f() {
11
+ const { createdPaymentGroupId: t, companyId: o, onEvent: m } = e();
12
+ return /* @__PURE__ */ n(
13
+ i,
14
+ {
15
+ onEvent: m,
16
+ paymentGroupId: r(t),
17
+ companyId: r(o)
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ d as CreateHistoricalPaymentContextual,
23
+ f as HistoricalPaymentSummaryContextual
24
+ };
25
+ //# sourceMappingURL=HistoricalPaymentFlowComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoricalPaymentFlowComponents.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.tsx"],"sourcesContent":["import { CreateHistoricalPayment } from '../CreateHistoricalPayment/CreateHistoricalPayment'\nimport { HistoricalPaymentSummary } from '../HistoricalPaymentSummary/HistoricalPaymentSummary'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link HistoricalPaymentFlow}.\n *\n * @alpha\n */\nexport interface HistoricalPaymentFlowProps extends BaseComponentInterface<never> {\n /** The associated company identifier. */\n companyId: string\n}\n\n/** @internal */\nexport interface HistoricalPaymentFlowContextInterface extends FlowContextInterface {\n companyId: string\n createdPaymentGroupId?: string\n}\n\n/** @internal */\nexport function CreateHistoricalPaymentContextual() {\n const { companyId, onEvent } = useFlow<HistoricalPaymentFlowContextInterface>()\n return <CreateHistoricalPayment onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\n/** @internal */\nexport function HistoricalPaymentSummaryContextual() {\n const { createdPaymentGroupId, companyId, onEvent } =\n useFlow<HistoricalPaymentFlowContextInterface>()\n\n return (\n <HistoricalPaymentSummary\n onEvent={onEvent}\n paymentGroupId={ensureRequired(createdPaymentGroupId)}\n companyId={ensureRequired(companyId)}\n />\n )\n}\n"],"names":["CreateHistoricalPaymentContextual","companyId","onEvent","useFlow","CreateHistoricalPayment","ensureRequired","HistoricalPaymentSummaryContextual","createdPaymentGroupId","jsx","HistoricalPaymentSummary"],"mappings":";;;;;AAuBO,SAASA,IAAoC;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAwB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAC1F;AAGO,SAASK,IAAqC;AACnD,QAAM,EAAE,uBAAAC,GAAuB,WAAAN,GAAW,SAAAC,EAAA,IACxCC,EAAA;AAEF,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAP;AAAA,MACA,gBAAgBG,EAAeE,CAAqB;AAAA,MACpD,WAAWF,EAAeJ,CAAS;AAAA,IAAA;AAAA,EAAA;AAGzC;"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Flow machine for {@link HistoricalPaymentFlow}.
3
+ *
4
+ * @remarks
5
+ * `historicalPaymentSummary` is a plain zero-transition state, not a robot3 `final()` state:
6
+ * `HistoricalPaymentFlow` can be mounted directly by a partner, so `contractor/historicalPayments/exit`
7
+ * bubbles up via `onEvent` without a local transition, keeping the summary screen interactive if the
8
+ * host doesn't unmount the component immediately (see SDK-1169).
9
+ *
10
+ * Unlike `createPaymentMachine`, neither state contributes its own breadcrumb item -- each of this
11
+ * flow's own screens has its own Back button instead. `updateBreadcrumbs` here only keeps
12
+ * `currentBreadcrumbId` in sync so a parent flow's injected `prefixBreadcrumbs` (see
13
+ * `HistoricalPaymentInternalFlow`) stays visible as the active trail across both states.
14
+ *
15
+ * @internal
16
+ */
17
+ export declare const historicalPaymentMachine: {
18
+ createHistoricalPayment: import('robot3').MachineState<any>;
19
+ historicalPaymentSummary: import('robot3').MachineState<any>;
20
+ };
@@ -0,0 +1,24 @@
1
+ import { state as t, transition as m, reduce as o } from "robot3";
2
+ import { HistoricalPaymentSummaryContextual as e } from "./HistoricalPaymentFlowComponents.js";
3
+ import { componentEvents as i } from "../../../../shared/constants.js";
4
+ import { updateBreadcrumbs as n } from "../../../../helpers/breadcrumbHelpers.js";
5
+ const p = {
6
+ createHistoricalPayment: t(
7
+ m(
8
+ i.CONTRACTOR_HISTORICAL_PAYMENT_CREATED,
9
+ "historicalPaymentSummary",
10
+ o(
11
+ (r, a) => ({
12
+ ...n("historicalPaymentSummary", r),
13
+ component: e,
14
+ createdPaymentGroupId: a.payload.uuid
15
+ })
16
+ )
17
+ )
18
+ ),
19
+ historicalPaymentSummary: t()
20
+ };
21
+ export {
22
+ p as historicalPaymentMachine
23
+ };
24
+ //# sourceMappingURL=historicalPaymentMachine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"historicalPaymentMachine.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.ts"],"sourcesContent":["import { reduce, state, transition } from 'robot3'\nimport type { ContractorPaymentGroup } from '@gusto/embedded-api/models/components/contractorpaymentgroup'\nimport {\n HistoricalPaymentSummaryContextual,\n type HistoricalPaymentFlowContextInterface,\n} from './HistoricalPaymentFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\ntype EventPayloads = {\n [componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_CREATED]: ContractorPaymentGroup\n}\n\n/**\n * Flow machine for {@link HistoricalPaymentFlow}.\n *\n * @remarks\n * `historicalPaymentSummary` is a plain zero-transition state, not a robot3 `final()` state:\n * `HistoricalPaymentFlow` can be mounted directly by a partner, so `contractor/historicalPayments/exit`\n * bubbles up via `onEvent` without a local transition, keeping the summary screen interactive if the\n * host doesn't unmount the component immediately (see SDK-1169).\n *\n * Unlike `createPaymentMachine`, neither state contributes its own breadcrumb item -- each of this\n * flow's own screens has its own Back button instead. `updateBreadcrumbs` here only keeps\n * `currentBreadcrumbId` in sync so a parent flow's injected `prefixBreadcrumbs` (see\n * `HistoricalPaymentInternalFlow`) stays visible as the active trail across both states.\n *\n * @internal\n */\nexport const historicalPaymentMachine = {\n createHistoricalPayment: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_CREATED,\n 'historicalPaymentSummary',\n reduce(\n (\n ctx: HistoricalPaymentFlowContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_CREATED\n >,\n ): HistoricalPaymentFlowContextInterface => {\n return {\n ...updateBreadcrumbs('historicalPaymentSummary', ctx),\n component: HistoricalPaymentSummaryContextual,\n createdPaymentGroupId: ev.payload.uuid,\n }\n },\n ),\n ),\n ),\n historicalPaymentSummary: state<MachineTransition>(),\n}\n"],"names":["historicalPaymentMachine","state","transition","componentEvents","reduce","ctx","ev","updateBreadcrumbs","HistoricalPaymentSummaryContextual"],"mappings":";;;;AA8BO,MAAMA,IAA2B;AAAA,EACtC,yBAAyBC;AAAA,IACvBC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OAKO;AAAA,UACL,GAAGC,EAAkB,4BAA4BF,CAAG;AAAA,UACpD,WAAWG;AAAA,UACX,uBAAuBF,EAAG,QAAQ;AAAA,QAAA;AAAA,MAEtC;AAAA,IACF;AAAA,EACF;AAAA,EAEF,0BAA0BL,EAAA;AAC5B;"}
@@ -0,0 +1,2 @@
1
+ export { HistoricalPaymentFlow } from './HistoricalPaymentFlow';
2
+ export type { HistoricalPaymentFlowProps } from './HistoricalPaymentFlowComponents';
@@ -4,22 +4,23 @@ import { useContractorPaymentGroupsGetSuspense as g } from "@gusto/embedded-api/
4
4
  import { useContractorsListSuspense as T } from "@gusto/embedded-api/react-query/contractorsList";
5
5
  import { useHistoricalPaymentSummaryDictionary as x } from "./useFormDictionary.js";
6
6
  import { Flex as a } from "../../../Common/Flex/Flex.js";
7
- import { BaseComponent as H } from "../../../Base/Base.js";
7
+ import { BaseComponent as b } from "../../../Base/Base.js";
8
8
  import "../../../Base/useBase.js";
9
- import { useComponentContext as G } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { useI18n as O, useComponentDictionary as b } from "../../../../i18n/I18n.js";
11
- import { useDateFormatter as A } from "../../../../hooks/useDateFormatter.js";
12
- import { ContractorOnboardingStatus as I, componentEvents as E } from "../../../../shared/constants.js";
13
- import { PaymentSummaryBlock as L } from "../shared/PaymentSummaryBlock/PaymentSummaryBlock.js";
14
- function q(r) {
15
- return /* @__PURE__ */ t(H, { ...r, componentName: "Contractor.Payments.HistoricalPaymentSummary", children: /* @__PURE__ */ t(N, { ...r }) });
9
+ import { useComponentContext as H } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { useI18n as G, useComponentDictionary as I } from "../../../../i18n/I18n.js";
11
+ import { useDateFormatter as O } from "../../../../hooks/useDateFormatter.js";
12
+ import { ContractorOnboardingStatus as A, componentEvents as E } from "../../../../shared/constants.js";
13
+ import { useUnstableFeature as L } from "../../../../contexts/UnstableFeaturesProvider/useUnstableFeature.js";
14
+ import { PaymentSummaryBlock as N } from "../shared/PaymentSummaryBlock/PaymentSummaryBlock.js";
15
+ function J(r) {
16
+ return /* @__PURE__ */ t(b, { ...r, componentName: "Contractor.Payments.HistoricalPaymentSummary", children: /* @__PURE__ */ t(R, { ...r }) });
16
17
  }
17
- function N({ paymentGroupId: r, companyId: c, dictionary: s, onEvent: u }) {
18
- O("Contractor.Payments.HistoricalPaymentSummary"), b("Contractor.Payments.HistoricalPaymentSummary", s);
19
- const { t: o } = S("Contractor.Payments.HistoricalPaymentSummary"), { Heading: l, Text: m, Button: y, Alert: p } = G(), { formatLongWithYear: f } = A(), d = x(), { data: C } = g({
18
+ function R({ paymentGroupId: r, companyId: s, dictionary: c, onEvent: u }) {
19
+ L("historicalPayments", { throwIfDisabled: !0 }), G("Contractor.Payments.HistoricalPaymentSummary"), I("Contractor.Payments.HistoricalPaymentSummary", c);
20
+ const { t: o } = S("Contractor.Payments.HistoricalPaymentSummary"), { Heading: l, Text: m, Button: y, Alert: p } = H(), { formatLongWithYear: f } = O(), d = x(), { data: C } = g({
20
21
  contractorPaymentGroupUuid: r
21
- }), n = C.contractorPaymentGroup, { data: P } = T({ companyUuid: c }), h = (P.contractors || []).filter(
22
- (i) => i.isActive && i.onboardingStatus === I.ONBOARDING_COMPLETED
22
+ }), n = C.contractorPaymentGroup, { data: P } = T({ companyUuid: s }), h = (P.contractors || []).filter(
23
+ (i) => i.isActive && i.onboardingStatus === A.ONBOARDING_COMPLETED
23
24
  );
24
25
  if (!n)
25
26
  return null;
@@ -40,7 +41,7 @@ function N({ paymentGroupId: r, companyId: c, dictionary: s, onEvent: u }) {
40
41
  /* @__PURE__ */ t(y, { onClick: D, variant: "primary", children: o("doneCta") })
41
42
  ] }),
42
43
  /* @__PURE__ */ t(
43
- L,
44
+ N,
44
45
  {
45
46
  contractorPaymentGroup: n,
46
47
  contractors: h,
@@ -51,6 +52,6 @@ function N({ paymentGroupId: r, companyId: c, dictionary: s, onEvent: u }) {
51
52
  ] });
52
53
  }
53
54
  export {
54
- q as HistoricalPaymentSummary
55
+ J as HistoricalPaymentSummary
55
56
  };
56
57
  //# sourceMappingURL=HistoricalPaymentSummary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HistoricalPaymentSummary.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useContractorPaymentGroupsGetSuspense } from '@gusto/embedded-api/react-query/contractorPaymentGroupsGet'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { PaymentSummaryBlock } from '../shared/PaymentSummaryBlock'\nimport { useHistoricalPaymentSummaryDictionary } from './useFormDictionary'\nimport { Flex } from '@/components/Common'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, ContractorOnboardingStatus } from '@/shared/constants'\n\n/**\n * Props for {@link HistoricalPaymentSummary}.\n *\n * @alpha\n */\nexport interface HistoricalPaymentSummaryProps extends BaseComponentInterface<'Contractor.Payments.HistoricalPaymentSummary'> {\n /** UUID of the historical contractor payment group to summarize. */\n paymentGroupId: string\n /** UUID of the company that owns the payment group. */\n companyId: string\n}\n\n/**\n * Displays the summary of a successfully recorded historical contractor payment.\n *\n * @remarks\n * Fetches the created contractor payment group by ID and renders a per-contractor breakdown.\n * Historical payments don't move money, so unlike `PaymentSummary` there is no debit account,\n * debit date, or wire-transfer confirmation to show.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/historicalPayments/exit` | User is done reviewing the summary. | — |\n *\n * @param props - See {@link HistoricalPaymentSummaryProps}.\n * @returns The rendered payment summary, or `null` when the payment group cannot be loaded.\n * @alpha\n */\nexport function HistoricalPaymentSummary(props: HistoricalPaymentSummaryProps) {\n return (\n <BaseComponent {...props} componentName=\"Contractor.Payments.HistoricalPaymentSummary\">\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ paymentGroupId, companyId, dictionary, onEvent }: HistoricalPaymentSummaryProps) {\n useI18n('Contractor.Payments.HistoricalPaymentSummary')\n useComponentDictionary('Contractor.Payments.HistoricalPaymentSummary', dictionary)\n const { t } = useTranslation('Contractor.Payments.HistoricalPaymentSummary')\n const { Heading, Text, Button, Alert } = useComponentContext()\n const { formatLongWithYear } = useDateFormatter()\n const summaryDictionary = useHistoricalPaymentSummaryDictionary()\n\n const { data: paymentGroupData } = useContractorPaymentGroupsGetSuspense({\n contractorPaymentGroupUuid: paymentGroupId,\n })\n const contractorPaymentGroup = paymentGroupData.contractorPaymentGroup\n\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = (contractorList.contractors || []).filter(\n contractor =>\n contractor.isActive &&\n contractor.onboardingStatus === ContractorOnboardingStatus.ONBOARDING_COMPLETED,\n )\n\n if (!contractorPaymentGroup) {\n return null\n }\n\n const handleDone = () => {\n onEvent(componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_EXIT)\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Alert status=\"success\" label={t('successTitle')}>\n <Text>\n {t('successMessage', {\n count: contractorPaymentGroup.contractorPayments?.length ?? 0,\n })}\n </Text>\n </Alert>\n\n <Flex justifyContent=\"space-between\" alignItems=\"flex-start\">\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('summaryTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('summarySubtitle', {\n checkDate: formatLongWithYear(contractorPaymentGroup.checkDate ?? ''),\n })}\n </Text>\n </Flex>\n <Button onClick={handleDone} variant=\"primary\">\n {t('doneCta')}\n </Button>\n </Flex>\n\n <PaymentSummaryBlock\n contractorPaymentGroup={contractorPaymentGroup}\n contractors={contractors}\n showDebitColumns={false}\n dictionary={summaryDictionary}\n />\n </Flex>\n )\n}\n"],"names":["HistoricalPaymentSummary","props","jsx","BaseComponent","Root","paymentGroupId","companyId","dictionary","onEvent","useI18n","useComponentDictionary","t","useTranslation","Heading","Text","Button","Alert","useComponentContext","formatLongWithYear","useDateFormatter","summaryDictionary","useHistoricalPaymentSummaryDictionary","paymentGroupData","useContractorPaymentGroupsGetSuspense","contractorPaymentGroup","contractorList","useContractorsListSuspense","contractors","contractor","ContractorOnboardingStatus","handleDone","componentEvents","jsxs","Flex","PaymentSummaryBlock"],"mappings":";;;;;;;;;;;;;AAyCO,SAASA,EAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,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,UAAA;AAAA,QAAA,gBAAA/B,EAACW,GAAA,EAAQ,IAAG,MAAM,UAAAF,EAAE,cAAc,GAAE;AAAA,QACpC,gBAAAT,EAACY,GAAA,EAAK,SAAQ,cACX,YAAE,mBAAmB;AAAA,UACpB,WAAWI,EAAmBM,EAAuB,aAAa,EAAE;AAAA,QAAA,CACrE,EAAA,CACH;AAAA,MAAA,GACF;AAAA,MACA,gBAAAtB,EAACa,KAAO,SAASe,GAAY,SAAQ,WAClC,UAAAnB,EAAE,SAAS,EAAA,CACd;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAT;AAAA,MAACgC;AAAA,MAAA;AAAA,QACC,wBAAAV;AAAA,QACA,aAAAG;AAAA,QACA,kBAAkB;AAAA,QAClB,YAAYP;AAAA,MAAA;AAAA,IAAA;AAAA,EACd,GACF;AAEJ;"}
1
+ {"version":3,"file":"HistoricalPaymentSummary.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useContractorPaymentGroupsGetSuspense } from '@gusto/embedded-api/react-query/contractorPaymentGroupsGet'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { PaymentSummaryBlock } from '../shared/PaymentSummaryBlock'\nimport { useHistoricalPaymentSummaryDictionary } from './useFormDictionary'\nimport { Flex } from '@/components/Common'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, ContractorOnboardingStatus } from '@/shared/constants'\nimport { useUnstableFeature } from '@/contexts/UnstableFeaturesProvider/useUnstableFeature'\n\n/**\n * Props for {@link HistoricalPaymentSummary}.\n *\n * @alpha\n */\nexport interface HistoricalPaymentSummaryProps extends BaseComponentInterface<'Contractor.Payments.HistoricalPaymentSummary'> {\n /** UUID of the historical contractor payment group to summarize. */\n paymentGroupId: string\n /** UUID of the company that owns the payment group. */\n companyId: string\n}\n\n/**\n * Displays the summary of a successfully recorded historical contractor payment.\n *\n * @remarks\n * Fetches the created contractor payment group by ID and renders a per-contractor breakdown.\n * Historical payments don't move money, so unlike `PaymentSummary` there is no debit account,\n * debit date, or wire-transfer confirmation to show.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/historicalPayments/exit` | User is done reviewing the summary. | — |\n *\n * @param props - See {@link HistoricalPaymentSummaryProps}.\n * @returns The rendered payment summary, or `null` when the payment group cannot be loaded.\n * @alpha\n */\nexport function HistoricalPaymentSummary(props: HistoricalPaymentSummaryProps) {\n return (\n <BaseComponent {...props} componentName=\"Contractor.Payments.HistoricalPaymentSummary\">\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ paymentGroupId, companyId, dictionary, onEvent }: HistoricalPaymentSummaryProps) {\n useUnstableFeature('historicalPayments', { throwIfDisabled: true })\n useI18n('Contractor.Payments.HistoricalPaymentSummary')\n useComponentDictionary('Contractor.Payments.HistoricalPaymentSummary', dictionary)\n const { t } = useTranslation('Contractor.Payments.HistoricalPaymentSummary')\n const { Heading, Text, Button, Alert } = useComponentContext()\n const { formatLongWithYear } = useDateFormatter()\n const summaryDictionary = useHistoricalPaymentSummaryDictionary()\n\n const { data: paymentGroupData } = useContractorPaymentGroupsGetSuspense({\n contractorPaymentGroupUuid: paymentGroupId,\n })\n const contractorPaymentGroup = paymentGroupData.contractorPaymentGroup\n\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = (contractorList.contractors || []).filter(\n contractor =>\n contractor.isActive &&\n contractor.onboardingStatus === ContractorOnboardingStatus.ONBOARDING_COMPLETED,\n )\n\n if (!contractorPaymentGroup) {\n return null\n }\n\n const handleDone = () => {\n onEvent(componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_EXIT)\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Alert status=\"success\" label={t('successTitle')}>\n <Text>\n {t('successMessage', {\n count: contractorPaymentGroup.contractorPayments?.length ?? 0,\n })}\n </Text>\n </Alert>\n\n <Flex justifyContent=\"space-between\" alignItems=\"flex-start\">\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('summaryTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('summarySubtitle', {\n checkDate: formatLongWithYear(contractorPaymentGroup.checkDate ?? ''),\n })}\n </Text>\n </Flex>\n <Button onClick={handleDone} variant=\"primary\">\n {t('doneCta')}\n </Button>\n </Flex>\n\n <PaymentSummaryBlock\n contractorPaymentGroup={contractorPaymentGroup}\n contractors={contractors}\n showDebitColumns={false}\n dictionary={summaryDictionary}\n />\n </Flex>\n )\n}\n"],"names":["HistoricalPaymentSummary","props","jsx","BaseComponent","Root","paymentGroupId","companyId","dictionary","onEvent","useUnstableFeature","useI18n","useComponentDictionary","t","useTranslation","Heading","Text","Button","Alert","useComponentContext","formatLongWithYear","useDateFormatter","summaryDictionary","useHistoricalPaymentSummaryDictionary","paymentGroupData","useContractorPaymentGroupsGetSuspense","contractorPaymentGroup","contractorList","useContractorsListSuspense","contractors","contractor","ContractorOnboardingStatus","handleDone","componentEvents","jsxs","Flex","PaymentSummaryBlock"],"mappings":";;;;;;;;;;;;;;AA0CO,SAASA,EAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GAAO,eAAc,gDACtC,UAAA,gBAAAC,EAACE,GAAA,EAAM,GAAGH,EAAA,CAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,gBAAAC,GAAgB,WAAAC,GAAW,YAAAC,GAAY,SAAAC,KAA0C;AAC/F,EAAAC,EAAmB,sBAAsB,EAAE,iBAAiB,GAAA,CAAM,GAClEC,EAAQ,8CAA8C,GACtDC,EAAuB,gDAAgDJ,CAAU;AACjF,QAAM,EAAE,GAAAK,EAAA,IAAMC,EAAe,8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AY,SAAQ,WAClC,UAAAnB,EAAE,SAAS,EAAA,CACd;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAV;AAAA,MAACiC;AAAA,MAAA;AAAA,QACC,wBAAAV;AAAA,QACA,aAAAG;AAAA,QACA,kBAAkB;AAAA,QAClB,YAAYP;AAAA,MAAA;AAAA,IAAA;AAAA,EACd,GACF;AAEJ;"}
@@ -23,4 +23,6 @@ export declare function CreatePaymentFlowContextual(): import("react").JSX.Eleme
23
23
  /** @internal */
24
24
  export declare function ViewPaymentFlowContextual(): import("react").JSX.Element;
25
25
  /** @internal */
26
+ export declare function HistoricalPaymentFlowContextual(): import("react").JSX.Element;
27
+ /** @internal */
26
28
  export declare function InformationRequestsContextual(): import("react").JSX.Element;
@@ -1,44 +1,56 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { PaymentsListInternal as i } from "../PaymentsList/PaymentsList.js";
3
- import { CreatePaymentInternalFlow as u } from "../CreatePaymentFlow/CreatePaymentFlow.js";
4
- import { ViewPaymentInternalFlow as c } from "../ViewPaymentFlow/ViewPaymentFlow.js";
5
- import { useFlow as o } from "../../../Flow/useFlow.js";
3
+ import { CreatePaymentInternalFlow as c } from "../CreatePaymentFlow/CreatePaymentFlow.js";
4
+ import { ViewPaymentInternalFlow as s } from "../ViewPaymentFlow/ViewPaymentFlow.js";
5
+ import { HistoricalPaymentInternalFlow as u } from "../HistoricalPaymentFlow/HistoricalPaymentFlow.js";
6
+ import { useFlow as e } from "../../../Flow/useFlow.js";
6
7
  import { ensureRequired as a } from "../../../../helpers/ensureRequired.js";
7
- import { InformationRequestsFlow as s } from "../../../InformationRequests/InformationRequests.js";
8
- function x() {
9
- const { companyId: n, onEvent: t, alerts: e } = o();
10
- return /* @__PURE__ */ r(i, { onEvent: t, companyId: a(n), alerts: e });
8
+ import { InformationRequestsFlow as d } from "../../../InformationRequests/InformationRequests.js";
9
+ function b() {
10
+ const { companyId: n, onEvent: t, alerts: o } = e();
11
+ return /* @__PURE__ */ r(i, { onEvent: t, companyId: a(n), alerts: o });
11
12
  }
12
13
  function m() {
13
- const { header: n } = o(), t = n?.type === "breadcrumbs" ? n.breadcrumbs?.landing?.[0] : void 0;
14
+ const { header: n } = e(), t = n?.type === "breadcrumbs" ? n.breadcrumbs?.landing?.[0] : void 0;
14
15
  return t ? [t] : void 0;
15
16
  }
16
- function b() {
17
- const { companyId: n, onEvent: t } = o(), e = m();
17
+ function F() {
18
+ const { companyId: n, onEvent: t } = e(), o = m();
18
19
  return /* @__PURE__ */ r(
19
- u,
20
+ c,
20
21
  {
21
22
  companyId: a(n),
22
23
  onEvent: t,
23
- prefixBreadcrumbs: e
24
+ prefixBreadcrumbs: o
24
25
  }
25
26
  );
26
27
  }
27
- function P() {
28
- const { currentPaymentId: n, onEvent: t } = o(), e = m();
28
+ function v() {
29
+ const { currentPaymentId: n, onEvent: t } = e(), o = m();
29
30
  return /* @__PURE__ */ r(
30
- c,
31
+ s,
31
32
  {
32
33
  paymentId: a(n),
33
34
  onEvent: t,
34
- prefixBreadcrumbs: e
35
+ prefixBreadcrumbs: o
35
36
  }
36
37
  );
37
38
  }
38
- function v() {
39
- const { companyId: n, onEvent: t } = o();
39
+ function C() {
40
+ const { companyId: n, onEvent: t } = e(), o = m();
40
41
  return /* @__PURE__ */ r(
41
- s,
42
+ u,
43
+ {
44
+ companyId: a(n),
45
+ onEvent: t,
46
+ prefixBreadcrumbs: o
47
+ }
48
+ );
49
+ }
50
+ function B() {
51
+ const { companyId: n, onEvent: t } = e();
52
+ return /* @__PURE__ */ r(
53
+ d,
42
54
  {
43
55
  companyId: a(n),
44
56
  withAlert: !1,
@@ -47,9 +59,10 @@ function v() {
47
59
  );
48
60
  }
49
61
  export {
50
- b as CreatePaymentFlowContextual,
51
- v as InformationRequestsContextual,
52
- x as PaymentListContextual,
53
- P as ViewPaymentFlowContextual
62
+ F as CreatePaymentFlowContextual,
63
+ C as HistoricalPaymentFlowContextual,
64
+ B as InformationRequestsContextual,
65
+ b as PaymentListContextual,
66
+ v as ViewPaymentFlowContextual
54
67
  };
55
68
  //# sourceMappingURL=PaymentFlowComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentFlowComponents.js","sources":["../../../../../src/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.tsx"],"sourcesContent":["import { PaymentsListInternal } from '../PaymentsList/PaymentsList'\nimport { CreatePaymentInternalFlow } from '../CreatePaymentFlow/CreatePaymentFlow'\nimport { ViewPaymentInternalFlow } from '../ViewPaymentFlow/ViewPaymentFlow'\nimport type { InternalAlert } from '../types'\nimport { InformationRequestsFlow } from '@/components/InformationRequests'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link PaymentFlow}.\n *\n * @public\n */\nexport interface PaymentFlowProps extends BaseComponentInterface<never> {\n /** The associated company identifier. */\n companyId: string\n}\n\n/** @internal */\nexport interface PaymentFlowContextInterface extends FlowContextInterface {\n companyId: string\n currentPaymentId?: string\n alerts?: InternalAlert[]\n}\n\n/** @internal */\nexport function PaymentListContextual() {\n const { companyId, onEvent, alerts } = useFlow<PaymentFlowContextInterface>()\n return (\n <PaymentsListInternal onEvent={onEvent} companyId={ensureRequired(companyId)} alerts={alerts} />\n )\n}\n\nfunction useLandingPrefixBreadcrumbs() {\n const { header } = useFlow<PaymentFlowContextInterface>()\n const landingBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.landing?.[0] : undefined\n return landingBreadcrumb ? [landingBreadcrumb] : undefined\n}\n\n/** @internal */\nexport function CreatePaymentFlowContextual() {\n const { companyId, onEvent } = useFlow<PaymentFlowContextInterface>()\n const prefixBreadcrumbs = useLandingPrefixBreadcrumbs()\n\n return (\n <CreatePaymentInternalFlow\n companyId={ensureRequired(companyId)}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n )\n}\n\n/** @internal */\nexport function ViewPaymentFlowContextual() {\n const { currentPaymentId, onEvent } = useFlow<PaymentFlowContextInterface>()\n const prefixBreadcrumbs = useLandingPrefixBreadcrumbs()\n\n return (\n <ViewPaymentInternalFlow\n paymentId={ensureRequired(currentPaymentId)}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n )\n}\n\n/** @internal */\nexport function InformationRequestsContextual() {\n const { companyId, onEvent } = useFlow<PaymentFlowContextInterface>()\n return (\n <InformationRequestsFlow\n companyId={ensureRequired(companyId)}\n withAlert={false}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PaymentListContextual","companyId","onEvent","alerts","useFlow","PaymentsListInternal","ensureRequired","useLandingPrefixBreadcrumbs","header","landingBreadcrumb","CreatePaymentFlowContextual","prefixBreadcrumbs","jsx","CreatePaymentInternalFlow","ViewPaymentFlowContextual","currentPaymentId","ViewPaymentInternalFlow","InformationRequestsContextual","InformationRequestsFlow"],"mappings":";;;;;;;AA2BO,SAASA,IAAwB;AACtC,QAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,QAAAC,EAAA,IAAWC,EAAA;AACvC,2BACGC,GAAA,EAAqB,SAAAH,GAAkB,WAAWI,EAAeL,CAAS,GAAG,QAAAE,GAAgB;AAElG;AAEA,SAASI,IAA8B;AACrC,QAAM,EAAE,QAAAC,EAAA,IAAWJ,EAAA,GACbK,IACJD,GAAQ,SAAS,gBAAgBA,EAAO,aAAa,UAAU,CAAC,IAAI;AACtE,SAAOC,IAAoB,CAACA,CAAiB,IAAI;AACnD;AAGO,SAASC,IAA8B;AAC5C,QAAM,EAAE,WAAAT,GAAW,SAAAC,EAAA,IAAYE,EAAA,GACzBO,IAAoBJ,EAAA;AAE1B,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWP,EAAeL,CAAS;AAAA,MACnC,SAAAC;AAAA,MACA,mBAAAS;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASG,IAA4B;AAC1C,QAAM,EAAE,kBAAAC,GAAkB,SAAAb,EAAA,IAAYE,EAAA,GAChCO,IAAoBJ,EAAA;AAE1B,SACE,gBAAAK;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,WAAWV,EAAeS,CAAgB;AAAA,MAC1C,SAAAb;AAAA,MACA,mBAAAS;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASM,IAAgC;AAC9C,QAAM,EAAE,WAAAhB,GAAW,SAAAC,EAAA,IAAYE,EAAA;AAC/B,SACE,gBAAAQ;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,WAAWZ,EAAeL,CAAS;AAAA,MACnC,WAAW;AAAA,MACX,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PaymentFlowComponents.js","sources":["../../../../../src/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.tsx"],"sourcesContent":["import { PaymentsListInternal } from '../PaymentsList/PaymentsList'\nimport { CreatePaymentInternalFlow } from '../CreatePaymentFlow/CreatePaymentFlow'\nimport { ViewPaymentInternalFlow } from '../ViewPaymentFlow/ViewPaymentFlow'\nimport { HistoricalPaymentInternalFlow } from '../HistoricalPaymentFlow/HistoricalPaymentFlow'\nimport type { InternalAlert } from '../types'\nimport { InformationRequestsFlow } from '@/components/InformationRequests'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link PaymentFlow}.\n *\n * @public\n */\nexport interface PaymentFlowProps extends BaseComponentInterface<never> {\n /** The associated company identifier. */\n companyId: string\n}\n\n/** @internal */\nexport interface PaymentFlowContextInterface extends FlowContextInterface {\n companyId: string\n currentPaymentId?: string\n alerts?: InternalAlert[]\n}\n\n/** @internal */\nexport function PaymentListContextual() {\n const { companyId, onEvent, alerts } = useFlow<PaymentFlowContextInterface>()\n return (\n <PaymentsListInternal onEvent={onEvent} companyId={ensureRequired(companyId)} alerts={alerts} />\n )\n}\n\nfunction useLandingPrefixBreadcrumbs() {\n const { header } = useFlow<PaymentFlowContextInterface>()\n const landingBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.landing?.[0] : undefined\n return landingBreadcrumb ? [landingBreadcrumb] : undefined\n}\n\n/** @internal */\nexport function CreatePaymentFlowContextual() {\n const { companyId, onEvent } = useFlow<PaymentFlowContextInterface>()\n const prefixBreadcrumbs = useLandingPrefixBreadcrumbs()\n\n return (\n <CreatePaymentInternalFlow\n companyId={ensureRequired(companyId)}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n )\n}\n\n/** @internal */\nexport function ViewPaymentFlowContextual() {\n const { currentPaymentId, onEvent } = useFlow<PaymentFlowContextInterface>()\n const prefixBreadcrumbs = useLandingPrefixBreadcrumbs()\n\n return (\n <ViewPaymentInternalFlow\n paymentId={ensureRequired(currentPaymentId)}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n )\n}\n\n/** @internal */\nexport function HistoricalPaymentFlowContextual() {\n const { companyId, onEvent } = useFlow<PaymentFlowContextInterface>()\n const prefixBreadcrumbs = useLandingPrefixBreadcrumbs()\n\n return (\n <HistoricalPaymentInternalFlow\n companyId={ensureRequired(companyId)}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n )\n}\n\n/** @internal */\nexport function InformationRequestsContextual() {\n const { companyId, onEvent } = useFlow<PaymentFlowContextInterface>()\n return (\n <InformationRequestsFlow\n companyId={ensureRequired(companyId)}\n withAlert={false}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PaymentListContextual","companyId","onEvent","alerts","useFlow","PaymentsListInternal","ensureRequired","useLandingPrefixBreadcrumbs","header","landingBreadcrumb","CreatePaymentFlowContextual","prefixBreadcrumbs","jsx","CreatePaymentInternalFlow","ViewPaymentFlowContextual","currentPaymentId","ViewPaymentInternalFlow","HistoricalPaymentFlowContextual","HistoricalPaym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AC/B,SACE,gBAAAQ;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,WAAWd,EAAeL,CAAS;AAAA,MACnC,WAAW;AAAA,MACX,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -3,9 +3,10 @@ import { BreadcrumbNodes } from '../../../Common/FlowBreadcrumbs/FlowBreadcrumbs
3
3
  * Hub-level breadcrumb nodes for {@link PaymentFlow}.
4
4
  *
5
5
  * @remarks
6
- * Only `landing` is defined here — the `createPayment` and `history` spokes own and render their
7
- * own breadcrumb trails (via `CreatePaymentFlow`/`ViewPaymentFlow`), prefixed with this `landing`
8
- * item so the trail reads continuously across the hub/spoke boundary.
6
+ * Only `landing` is defined here — the `createPayment`, `historicalPayment`, and `history` spokes
7
+ * own and render their own breadcrumb trails (via `CreatePaymentFlow`/`HistoricalPaymentFlow`/
8
+ * `ViewPaymentFlow`), prefixed with this `landing` item so the trail reads continuously across the
9
+ * hub/spoke boundary.
9
10
  *
10
11
  * @internal
11
12
  */
@@ -14,17 +15,18 @@ export declare const paymentFlowBreadcrumbsNodes: BreadcrumbNodes;
14
15
  * Hub machine for {@link PaymentFlow}.
15
16
  *
16
17
  * @remarks
17
- * `createPayment` and `history` each stay active for the full lifetime of their respective spoke
18
- * (`CreatePaymentFlow`, `ViewPaymentFlow`) rather than tracking the spoke's internal screen. The
19
- * spoke's own machine drives its internal steps and breadcrumb trail; events it can't handle
20
- * locally (e.g. the `landing` breadcrumb, or a terminal exit/cancel event) bubble up here to
21
- * transition the hub back to `landing`.
18
+ * `createPayment`, `historicalPayment`, and `history` each stay active for the full lifetime of
19
+ * their respective spoke (`CreatePaymentFlow`, `HistoricalPaymentFlow`, `ViewPaymentFlow`) rather
20
+ * than tracking the spoke's internal screen. The spoke's own machine drives its internal steps and
21
+ * breadcrumb trail; events it can't handle locally (e.g. the `landing` breadcrumb, or a terminal
22
+ * exit/cancel event) bubble up here to transition the hub back to `landing`.
22
23
  *
23
24
  * @internal
24
25
  */
25
26
  export declare const paymentMachine: {
26
27
  landing: import('robot3').MachineState<any>;
27
28
  createPayment: import('robot3').MachineState<any>;
29
+ historicalPayment: import('robot3').MachineState<any>;
28
30
  history: import('robot3').MachineState<any>;
29
31
  informationRequests: import('robot3').MachineState<any>;
30
32
  };
@@ -1,9 +1,9 @@
1
1
  import { state as i, transition as t, reduce as n } from "robot3";
2
- import { PaymentListContextual as o, CreatePaymentFlowContextual as s, ViewPaymentFlowContextual as u, InformationRequestsContextual as l } from "./PaymentFlowComponents.js";
3
- import { informationRequestEvents as c, componentEvents as a, payrollWireEvents as p } from "../../../../shared/constants.js";
4
- import { patchBreadcrumbsHeader as r } from "../../../../helpers/breadcrumbHelpers.js";
5
- import { createBreadcrumbNavigateTransition as R } from "../../../Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js";
6
- const y = {
2
+ import { PaymentListContextual as o, CreatePaymentFlowContextual as l, HistoricalPaymentFlowContextual as s, ViewPaymentFlowContextual as u, InformationRequestsContextual as R } from "./PaymentFlowComponents.js";
3
+ import { informationRequestEvents as d, componentEvents as r, payrollWireEvents as T } from "../../../../shared/constants.js";
4
+ import { patchBreadcrumbsHeader as a } from "../../../../helpers/breadcrumbHelpers.js";
5
+ import { createBreadcrumbNavigateTransition as C } from "../../../Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js";
6
+ const A = {
7
7
  landing: {
8
8
  parent: null,
9
9
  item: {
@@ -11,16 +11,25 @@ const y = {
11
11
  label: "breadcrumbLabel",
12
12
  namespace: "Contractor.Payments.PaymentsList",
13
13
  onNavigate: ((e) => ({
14
- ...r(e, { currentBreadcrumbId: void 0 }),
14
+ ...a(e, { currentBreadcrumbId: void 0 }),
15
15
  component: o
16
16
  }))
17
17
  }
18
18
  }
19
- }, d = R(), _ = {
19
+ }, c = C(), y = {
20
20
  landing: i(
21
21
  t(
22
- a.CONTRACTOR_PAYMENT_CREATE,
22
+ r.CONTRACTOR_PAYMENT_CREATE,
23
23
  "createPayment",
24
+ n((e) => ({
25
+ ...e,
26
+ component: l,
27
+ alerts: void 0
28
+ }))
29
+ ),
30
+ t(
31
+ r.CONTRACTOR_HISTORICAL_PAYMENT_CREATE,
32
+ "historicalPayment",
24
33
  n((e) => ({
25
34
  ...e,
26
35
  component: s,
@@ -28,7 +37,7 @@ const y = {
28
37
  }))
29
38
  ),
30
39
  t(
31
- a.CONTRACTOR_PAYMENT_VIEW,
40
+ r.CONTRACTOR_PAYMENT_VIEW,
32
41
  "history",
33
42
  n(
34
43
  (e, m) => ({
@@ -40,15 +49,15 @@ const y = {
40
49
  )
41
50
  ),
42
51
  t(
43
- a.CONTRACTOR_PAYMENT_RFI_RESPOND,
52
+ r.CONTRACTOR_PAYMENT_RFI_RESPOND,
44
53
  "informationRequests",
45
54
  n((e) => ({
46
- ...r(e, { currentBreadcrumbId: void 0 }),
47
- component: l
55
+ ...a(e, { currentBreadcrumbId: void 0 }),
56
+ component: R
48
57
  }))
49
58
  ),
50
59
  t(
51
- p.PAYROLL_WIRE_FORM_DONE,
60
+ T.PAYROLL_WIRE_FORM_DONE,
52
61
  "landing",
53
62
  n(
54
63
  (e, m) => ({
@@ -66,22 +75,34 @@ const y = {
66
75
  ),
67
76
  createPayment: i(
68
77
  t(
69
- a.CONTRACTOR_PAYMENT_EXIT,
78
+ r.CONTRACTOR_PAYMENT_EXIT,
79
+ "landing",
80
+ n((e) => ({
81
+ ...a(e, { currentBreadcrumbId: void 0 }),
82
+ component: o,
83
+ alerts: void 0
84
+ }))
85
+ ),
86
+ c("landing")
87
+ ),
88
+ historicalPayment: i(
89
+ t(
90
+ r.CONTRACTOR_HISTORICAL_PAYMENT_EXIT,
70
91
  "landing",
71
92
  n((e) => ({
72
- ...r(e, { currentBreadcrumbId: void 0 }),
93
+ ...a(e, { currentBreadcrumbId: void 0 }),
73
94
  component: o,
74
95
  alerts: void 0
75
96
  }))
76
97
  ),
77
- d("landing")
98
+ c("landing")
78
99
  ),
79
100
  history: i(
80
101
  t(
81
- a.CONTRACTOR_PAYMENT_CANCEL,
102
+ r.CONTRACTOR_PAYMENT_CANCEL,
82
103
  "landing",
83
104
  n((e) => ({
84
- ...r(e, { currentBreadcrumbId: void 0 }),
105
+ ...a(e, { currentBreadcrumbId: void 0 }),
85
106
  component: o,
86
107
  alerts: [
87
108
  {
@@ -91,29 +112,29 @@ const y = {
91
112
  ]
92
113
  }))
93
114
  ),
94
- d("landing")
115
+ c("landing")
95
116
  ),
96
117
  informationRequests: i(
97
118
  t(
98
- c.INFORMATION_REQUEST_FORM_DONE,
119
+ d.INFORMATION_REQUEST_FORM_DONE,
99
120
  "landing",
100
121
  n((e) => ({
101
- ...r(e, { currentBreadcrumbId: void 0 }),
122
+ ...a(e, { currentBreadcrumbId: void 0 }),
102
123
  component: o
103
124
  }))
104
125
  ),
105
126
  t(
106
- c.INFORMATION_REQUEST_FORM_CANCEL,
127
+ d.INFORMATION_REQUEST_FORM_CANCEL,
107
128
  "landing",
108
129
  n((e) => ({
109
- ...r(e, { currentBreadcrumbId: void 0 }),
130
+ ...a(e, { currentBreadcrumbId: void 0 }),
110
131
  component: o
111
132
  }))
112
133
  )
113
134
  )
114
135
  };
115
136
  export {
116
- y as paymentFlowBreadcrumbsNodes,
117
- _ as paymentMachine
137
+ A as paymentFlowBreadcrumbsNodes,
138
+ y as paymentMachine
118
139
  };
119
140
  //# sourceMappingURL=paymentStateMachine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paymentStateMachine.js","sources":["../../../../../src/components/Contractor/Payments/PaymentFlow/paymentStateMachine.ts"],"sourcesContent":["import { reduce, state, transition } from 'robot3'\nimport type { WireInRequest } from '@gusto/embedded-api/models/components/wireinrequest'\nimport {\n CreatePaymentFlowContextual,\n InformationRequestsContextual,\n PaymentListContextual,\n type PaymentFlowContextInterface,\n ViewPaymentFlowContextual,\n} from './PaymentFlowComponents'\nimport { componentEvents, informationRequestEvents, payrollWireEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { patchBreadcrumbsHeader } from '@/helpers/breadcrumbHelpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype EventPayloads = {\n [componentEvents.CONTRACTOR_PAYMENT_CREATE]: undefined\n [componentEvents.CONTRACTOR_PAYMENT_EXIT]: { uuid?: string | null }\n [componentEvents.CONTRACTOR_PAYMENT_VIEW]: { paymentId: string }\n [componentEvents.CONTRACTOR_PAYMENT_CANCEL]: { paymentId: string }\n [componentEvents.CONTRACTOR_PAYMENT_RFI_RESPOND]: undefined\n [componentEvents.BREADCRUMB_NAVIGATE]: {\n key: string\n onNavigate: (ctx: PaymentFlowContextInterface) => PaymentFlowContextInterface\n }\n [informationRequestEvents.INFORMATION_REQUEST_FORM_DONE]: undefined\n [informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL]: undefined\n [payrollWireEvents.PAYROLL_WIRE_FORM_DONE]: {\n wireInRequest: WireInRequest\n confirmationAlert: {\n title: string\n content?: string\n }\n }\n}\n\n/**\n * Hub-level breadcrumb nodes for {@link PaymentFlow}.\n *\n * @remarks\n * Only `landing` is defined here — the `createPayment` and `history` spokes own and render their\n * own breadcrumb trails (via `CreatePaymentFlow`/`ViewPaymentFlow`), prefixed with this `landing`\n * item so the trail reads continuously across the hub/spoke boundary.\n *\n * @internal\n */\nexport const paymentFlowBreadcrumbsNodes: BreadcrumbNodes = {\n landing: {\n parent: null,\n item: {\n id: 'landing',\n label: 'breadcrumbLabel',\n namespace: 'Contractor.Payments.PaymentsList',\n onNavigate: ((ctx: PaymentFlowContextInterface) => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n })) as (context: unknown) => unknown,\n },\n },\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PaymentFlowContextInterface>()\n\n/**\n * Hub machine for {@link PaymentFlow}.\n *\n * @remarks\n * `createPayment` and `history` each stay active for the full lifetime of their respective spoke\n * (`CreatePaymentFlow`, `ViewPaymentFlow`) rather than tracking the spoke's internal screen. The\n * spoke's own machine drives its internal steps and breadcrumb trail; events it can't handle\n * locally (e.g. the `landing` breadcrumb, or a terminal exit/cancel event) bubble up here to\n * transition the hub back to `landing`.\n *\n * @internal\n */\nexport const paymentMachine = {\n landing: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_PAYMENT_CREATE,\n 'createPayment',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...ctx,\n component: CreatePaymentFlowContextual,\n alerts: undefined,\n }\n }),\n ),\n transition(\n componentEvents.CONTRACTOR_PAYMENT_VIEW,\n 'history',\n reduce(\n (\n ctx: PaymentFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.CONTRACTOR_PAYMENT_VIEW>,\n ): PaymentFlowContextInterface => {\n return {\n ...ctx,\n component: ViewPaymentFlowContextual,\n currentPaymentId: ev.payload.paymentId,\n alerts: undefined,\n }\n },\n ),\n ),\n transition(\n componentEvents.CONTRACTOR_PAYMENT_RFI_RESPOND,\n 'informationRequests',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: InformationRequestsContextual,\n }\n }),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_DONE,\n 'landing',\n reduce(\n (\n ctx: PaymentFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof payrollWireEvents.PAYROLL_WIRE_FORM_DONE>,\n ): PaymentFlowContextInterface => {\n return {\n ...ctx,\n alerts: [\n {\n type: 'success',\n title: 'wireDetailsSubmitted',\n content: ev.payload.confirmationAlert.content,\n },\n ],\n }\n },\n ),\n ),\n ),\n createPayment: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_PAYMENT_EXIT,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n alerts: undefined,\n }\n }),\n ),\n breadcrumbNavigateTransition('landing'),\n ),\n history: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_PAYMENT_CANCEL,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n alerts: [\n {\n type: 'success',\n title: 'paymentCancelledSuccessfully',\n },\n ],\n }\n }),\n ),\n breadcrumbNavigateTransition('landing'),\n ),\n informationRequests: state<MachineTransition>(\n transition(\n informationRequestEvents.INFORMATION_REQUEST_FORM_DONE,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n }\n }),\n ),\n transition(\n informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n }\n }),\n ),\n ),\n}\n"],"names":["paymentFlowBreadcrumbsNodes","ctx","patchBreadcrumbsHeader","PaymentListContextual","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","paymentMachine","state","transition","componentEvents","reduce","CreatePaymentFlowContextual","ev","ViewPaymentFlowContextual","InformationRequestsContextual","payrollWireEvents","informationRequestEvents"],"mappings":";;;;;AA8CO,MAAMA,IAA+C;AAAA,EAC1D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAsC;AAAA,QAClD,GAAGC,EAAuBD,GAAK,EAAE,qBA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,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACT,OACC;AAAA,QACL,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWE;AAAA,QACX,QAAQ;AAAA,UACN;AAAA,YACE,MAAM;AAAA,YACN,OAAO;AAAA,UAAA;AAAA,QACT;AAAA,MACF,EAEH;AAAA,IAAA;AAAA,IAEHC,EAA6B,SAAS;AAAA,EAAA;AAAA,EAExC,qBAAqBG;AAAA,IACnBC;AAAA,MACEQ,EAAyB;AAAA,MACzB;AAAA,MACAN,EAAO,CAACT,OACC;AAAA,QACL,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWE;AAAA,MAAA,EAEd;AAAA,IAAA;AAAA,IAEHK;AAAA,MACEQ,EAAyB;AAAA,MACzB;AAAA,MACAN,EAAO,CAACT,OACC;AAAA,QACL,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWE;AAAA,MAAA,EAEd;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"paymentStateMachine.js","sources":["../../../../../src/components/Contractor/Payments/PaymentFlow/paymentStateMachine.ts"],"sourcesContent":["import { reduce, state, transition } from 'robot3'\nimport type { WireInRequest } from '@gusto/embedded-api/models/components/wireinrequest'\nimport {\n CreatePaymentFlowContextual,\n HistoricalPaymentFlowContextual,\n InformationRequestsContextual,\n PaymentListContextual,\n type PaymentFlowContextInterface,\n ViewPaymentFlowContextual,\n} from './PaymentFlowComponents'\nimport { componentEvents, informationRequestEvents, payrollWireEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { patchBreadcrumbsHeader } from '@/helpers/breadcrumbHelpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype EventPayloads = {\n [componentEvents.CONTRACTOR_PAYMENT_CREATE]: undefined\n [componentEvents.CONTRACTOR_PAYMENT_EXIT]: { uuid?: string | null }\n [componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_CREATE]: undefined\n [componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_EXIT]: undefined\n [componentEvents.CONTRACTOR_PAYMENT_VIEW]: { paymentId: string }\n [componentEvents.CONTRACTOR_PAYMENT_CANCEL]: { paymentId: string }\n [componentEvents.CONTRACTOR_PAYMENT_RFI_RESPOND]: undefined\n [componentEvents.BREADCRUMB_NAVIGATE]: {\n key: string\n onNavigate: (ctx: PaymentFlowContextInterface) => PaymentFlowContextInterface\n }\n [informationRequestEvents.INFORMATION_REQUEST_FORM_DONE]: undefined\n [informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL]: undefined\n [payrollWireEvents.PAYROLL_WIRE_FORM_DONE]: {\n wireInRequest: WireInRequest\n confirmationAlert: {\n title: string\n content?: string\n }\n }\n}\n\n/**\n * Hub-level breadcrumb nodes for {@link PaymentFlow}.\n *\n * @remarks\n * Only `landing` is defined here — the `createPayment`, `historicalPayment`, and `history` spokes\n * own and render their own breadcrumb trails (via `CreatePaymentFlow`/`HistoricalPaymentFlow`/\n * `ViewPaymentFlow`), prefixed with this `landing` item so the trail reads continuously across the\n * hub/spoke boundary.\n *\n * @internal\n */\nexport const paymentFlowBreadcrumbsNodes: BreadcrumbNodes = {\n landing: {\n parent: null,\n item: {\n id: 'landing',\n label: 'breadcrumbLabel',\n namespace: 'Contractor.Payments.PaymentsList',\n onNavigate: ((ctx: PaymentFlowContextInterface) => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n })) as (context: unknown) => unknown,\n },\n },\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PaymentFlowContextInterface>()\n\n/**\n * Hub machine for {@link PaymentFlow}.\n *\n * @remarks\n * `createPayment`, `historicalPayment`, and `history` each stay active for the full lifetime of\n * their respective spoke (`CreatePaymentFlow`, `HistoricalPaymentFlow`, `ViewPaymentFlow`) rather\n * than tracking the spoke's internal screen. The spoke's own machine drives its internal steps and\n * breadcrumb trail; events it can't handle locally (e.g. the `landing` breadcrumb, or a terminal\n * exit/cancel event) bubble up here to transition the hub back to `landing`.\n *\n * @internal\n */\nexport const paymentMachine = {\n landing: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_PAYMENT_CREATE,\n 'createPayment',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...ctx,\n component: CreatePaymentFlowContextual,\n alerts: undefined,\n }\n }),\n ),\n transition(\n componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_CREATE,\n 'historicalPayment',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...ctx,\n component: HistoricalPaymentFlowContextual,\n alerts: undefined,\n }\n }),\n ),\n transition(\n componentEvents.CONTRACTOR_PAYMENT_VIEW,\n 'history',\n reduce(\n (\n ctx: PaymentFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.CONTRACTOR_PAYMENT_VIEW>,\n ): PaymentFlowContextInterface => {\n return {\n ...ctx,\n component: ViewPaymentFlowContextual,\n currentPaymentId: ev.payload.paymentId,\n alerts: undefined,\n }\n },\n ),\n ),\n transition(\n componentEvents.CONTRACTOR_PAYMENT_RFI_RESPOND,\n 'informationRequests',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: InformationRequestsContextual,\n }\n }),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_DONE,\n 'landing',\n reduce(\n (\n ctx: PaymentFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof payrollWireEvents.PAYROLL_WIRE_FORM_DONE>,\n ): PaymentFlowContextInterface => {\n return {\n ...ctx,\n alerts: [\n {\n type: 'success',\n title: 'wireDetailsSubmitted',\n content: ev.payload.confirmationAlert.content,\n },\n ],\n }\n },\n ),\n ),\n ),\n createPayment: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_PAYMENT_EXIT,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n alerts: undefined,\n }\n }),\n ),\n breadcrumbNavigateTransition('landing'),\n ),\n historicalPayment: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_EXIT,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n alerts: undefined,\n }\n }),\n ),\n breadcrumbNavigateTransition('landing'),\n ),\n history: state<MachineTransition>(\n transition(\n componentEvents.CONTRACTOR_PAYMENT_CANCEL,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n alerts: [\n {\n type: 'success',\n title: 'paymentCancelledSuccessfully',\n },\n ],\n }\n }),\n ),\n breadcrumbNavigateTransition('landing'),\n ),\n informationRequests: state<MachineTransition>(\n transition(\n informationRequestEvents.INFORMATION_REQUEST_FORM_DONE,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n }\n }),\n ),\n transition(\n informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL,\n 'landing',\n reduce((ctx: PaymentFlowContextInterface): PaymentFlowContextInterface => {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PaymentListContextual,\n }\n }),\n ),\n ),\n}\n"],"names":["paymentFlowBreadcrumbsNodes","ctx","patchBreadcrumbsHeader","PaymentListContextual","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","paymentMachine","state","transition","componentEvents","reduce","CreatePaymentFlowContextual","HistoricalPaymentFlowContextual","ev","ViewPaymentFlowContextual","InformationRequestsContextual","payrollWireEvents","informationRequestEvents"],"mappings":";;;;;AAkDO,MAAMA,IAA+C;AAAA,EAC1D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAsC;AAAA,QAClD,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWE;AAAA,MAAA;AAAA,IACb;AAAA,EACF;AAEJ,GAEMC,IACJC,EAAA,GAcWC,IAAiB;AAAA,EAC5B,SAASC;AAAA,IACPC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACT,OACC;AAAA,QACL,GAAGA;AAAA,QACH,WAAWU;AAAA,QACX,QAAQ;AAAA,MAAA,EAEX;AAAA,IAAA;AAAA,IAEHH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACT,OACC;AAAA,QACL,GAAGA;AAAA,QACH,WAAWW;AAAA,QACX,QAAQ;AAAA,MAAA,EAEX;AAAA,IAAA;AAAA,IAEHJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACET,GACAY,OAEO;AAAA,UACL,GAAGZ;AAAA,UACH,WAAWa;AAAA,UACX,kBAAkBD,EAAG,QAAQ;AAAA,UAC7B,QAAQ;AAAA,QAAA;AAAA,MAEZ;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACT,OACC;AAAA,QACL,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWc;AAAA,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