@gusto/embedded-react-sdk 0.54.1 → 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 (135) hide show
  1. package/CHANGELOG.md +28 -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/OnboardingFlow/OnboardingFlow.d.ts +1 -1
  27. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -15
  28. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  29. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +8 -0
  30. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +12 -5
  31. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  32. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  33. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  34. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  35. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  36. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  37. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  38. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -4
  39. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  40. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +4 -2
  41. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +148 -117
  42. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
  43. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +56 -55
  44. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  45. package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.d.ts +1 -1
  46. package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js +15 -12
  47. package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js.map +1 -1
  48. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.d.ts +69 -0
  49. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js +48 -0
  50. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js.map +1 -0
  51. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.d.ts +20 -0
  52. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.js +25 -0
  53. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.js.map +1 -0
  54. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.d.ts +20 -0
  55. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.js +24 -0
  56. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/historicalPaymentMachine.js.map +1 -0
  57. package/dist/components/Contractor/Payments/HistoricalPaymentFlow/index.d.ts +2 -0
  58. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +16 -15
  59. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
  60. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  61. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +36 -23
  62. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  63. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +10 -8
  64. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +46 -25
  65. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  66. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +53 -52
  67. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  68. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +37 -47
  69. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  70. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +47 -44
  71. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  72. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +2 -1
  73. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +65 -53
  74. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  75. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +6 -4
  76. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -1
  77. package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.d.ts +1 -1
  78. package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js +22 -19
  79. package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js.map +1 -1
  80. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +2 -8
  81. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +43 -42
  82. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -1
  83. package/dist/components/Contractor/Payments/shared/paymentAmounts.d.ts +32 -0
  84. package/dist/components/Contractor/Payments/shared/paymentAmounts.js +11 -0
  85. package/dist/components/Contractor/Payments/shared/paymentAmounts.js.map +1 -0
  86. package/dist/components/Contractor/Payments/shared/paymentAmounts.test.d.ts +1 -0
  87. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +13 -4
  88. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +43 -38
  89. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -1
  90. package/dist/components/Contractor/exports/contractorManagement.d.ts +1 -0
  91. package/dist/components/Contractor/exports/contractorManagement.js +34 -32
  92. package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
  93. package/dist/components/Contractor/shared/SelectContractors/SelectContractors.d.ts +6 -1
  94. package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js +13 -12
  95. package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js.map +1 -1
  96. package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.d.ts +5 -1
  97. package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +34 -32
  98. package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -1
  99. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  100. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  101. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  102. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  103. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  104. package/dist/components/Flow/Flow.js +1 -1
  105. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  106. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  107. package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
  108. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  109. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -0
  110. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +36 -34
  111. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  112. package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.d.ts +22 -0
  113. package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.js +14 -0
  114. package/dist/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.js.map +1 -0
  115. package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.d.ts +19 -0
  116. package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.js +8 -0
  117. package/dist/contexts/UnstableFeaturesProvider/WithUnstableFeature.js.map +1 -0
  118. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +41 -0
  119. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js +14 -0
  120. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -0
  121. package/dist/contexts/index.d.ts +1 -0
  122. package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +34 -32
  123. package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -1
  124. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +20 -18
  125. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -1
  126. package/dist/i18n/en/common.json.d.ts +0 -21
  127. package/dist/i18n/types.d.ts +10 -2
  128. package/dist/shared/constants.d.ts +2 -0
  129. package/dist/shared/constants.js +1 -0
  130. package/dist/shared/constants.js.map +1 -1
  131. package/dist/style.css +1 -1
  132. package/dist/test-utils/renderWithProviders.d.ts +4 -1
  133. package/dist/test-utils/tableQueries.d.ts +9 -0
  134. package/docs/guides/endpoint-inventory.json +7 -0
  135. package/package.json +20 -20
@@ -1,33 +1,35 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { ErrorBoundary as P } from "react-error-boundary";
3
- import { I18nextProvider as k } from "react-i18next";
4
- import { useEffect as C, useMemo as S } from "react";
5
- import { ComponentsProvider as x } from "../ComponentAdapter/ComponentsProvider.js";
6
- import { ApiProvider as I } from "../ApiProvider/ApiProvider.js";
7
- import { LoadingIndicatorProvider as L } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { ErrorBoundary as k } from "react-error-boundary";
3
+ import { I18nextProvider as C } from "react-i18next";
4
+ import { useEffect as S, useMemo as x } from "react";
5
+ import { ComponentsProvider as I } from "../ComponentAdapter/ComponentsProvider.js";
6
+ import { ApiProvider as L } from "../ApiProvider/ApiProvider.js";
7
+ import { LoadingIndicatorProvider as U } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
8
8
  import { sanitizeError as z } from "../ObservabilityProvider/sanitization.js";
9
+ import { UnstableFeaturesProvider as D } from "../UnstableFeaturesProvider/UnstableFeaturesProvider.js";
9
10
  import { SDKI18next as m } from "./SDKI18next.js";
10
- import { InternalError as D } from "../../components/Common/InternalError/InternalError.js";
11
- import { LocaleProvider as U } from "../LocaleProvider/LocaleProvider.js";
11
+ import { InternalError as F } from "../../components/Common/InternalError/InternalError.js";
12
+ import { LocaleProvider as T } from "../LocaleProvider/LocaleProvider.js";
12
13
  import "../LocaleProvider/useLocale.js";
13
- import { ThemeProvider as T } from "../ThemeProvider/ThemeProvider.js";
14
- import { normalizeToSDKError as w } from "../../types/sdkError.js";
15
- import { NonceContext as A } from "../NonceProvider/useNonce.js";
16
- import { ObservabilityProvider as B } from "../ObservabilityProvider/ObservabilityProvider.js";
17
- function Z(l) {
14
+ import { ThemeProvider as w } from "../ThemeProvider/ThemeProvider.js";
15
+ import { normalizeToSDKError as A } from "../../types/sdkError.js";
16
+ import { NonceContext as B } from "../NonceProvider/useNonce.js";
17
+ import { ObservabilityProvider as K } from "../ObservabilityProvider/ObservabilityProvider.js";
18
+ function rr(l) {
18
19
  const {
19
20
  children: s,
20
- config: r,
21
+ config: o,
21
22
  dictionary: i,
22
23
  lng: n = "en",
23
24
  locale: c = "en-US",
24
25
  currency: d = "USD",
25
26
  theme: p,
26
27
  nonce: v,
27
- portalContainer: f,
28
- components: u,
28
+ portalContainer: u,
29
+ components: f,
29
30
  LoaderComponent: b,
30
- queryClient: h
31
+ queryClient: h,
32
+ unstableFeatures: y
31
33
  } = l;
32
34
  if (i)
33
35
  for (const t in i) {
@@ -41,33 +43,33 @@ function Z(l) {
41
43
  !0
42
44
  );
43
45
  }
44
- C(() => {
46
+ S(() => {
45
47
  (async () => await m.changeLanguage(n))();
46
48
  }, [n]);
47
- const y = S(() => {
48
- if (r.observability?.onError)
49
+ const E = x(() => {
50
+ if (o.observability?.onError)
49
51
  return (t, e) => {
50
- if (!r.observability?.onError) return;
51
- const E = {
52
- ...w(t),
52
+ if (!o.observability?.onError) return;
53
+ const P = {
54
+ ...A(t),
53
55
  timestamp: Date.now(),
54
56
  componentStack: e.componentStack ?? void 0
55
- }, g = z(E, r.observability.sanitization);
56
- r.observability.onError(g);
57
+ }, g = z(P, o.observability.sanitization);
58
+ o.observability.onError(g);
57
59
  };
58
- }, [r.observability]);
59
- return /* @__PURE__ */ o(A.Provider, { value: v, children: /* @__PURE__ */ o(x, { value: u, children: /* @__PURE__ */ o(L, { value: b, children: /* @__PURE__ */ o(B, { observability: r.observability, children: /* @__PURE__ */ o(P, { FallbackComponent: D, onError: y, children: /* @__PURE__ */ o(T, { theme: p, portalContainer: f, children: /* @__PURE__ */ o(U, { locale: c, currency: d, children: /* @__PURE__ */ o(k, { i18n: m, children: /* @__PURE__ */ o(
60
- I,
60
+ }, [o.observability]);
61
+ return /* @__PURE__ */ r(B.Provider, { value: v, children: /* @__PURE__ */ r(I, { value: f, children: /* @__PURE__ */ r(U, { value: b, children: /* @__PURE__ */ r(K, { observability: o.observability, children: /* @__PURE__ */ r(k, { FallbackComponent: F, onError: E, children: /* @__PURE__ */ r(w, { theme: p, portalContainer: u, children: /* @__PURE__ */ r(T, { locale: c, currency: d, children: /* @__PURE__ */ r(C, { i18n: m, children: /* @__PURE__ */ r(
62
+ L,
61
63
  {
62
- url: r.baseUrl,
63
- headers: r.headers,
64
- hooks: r.hooks,
64
+ url: o.baseUrl,
65
+ headers: o.headers,
66
+ hooks: o.hooks,
65
67
  queryClient: h,
66
- children: s
68
+ children: /* @__PURE__ */ r(D, { value: y, children: s })
67
69
  }
68
70
  ) }, n) }) }) }) }) }) }) });
69
71
  }
70
72
  export {
71
- Z as GustoProviderCustomUIAdapter
73
+ rr as GustoProviderCustomUIAdapter
72
74
  };
73
75
  //# sourceMappingURL=GustoProviderCustomUIAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport type { ErrorInfo, JSX, ReactNode } from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect, useMemo } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport { ObservabilityProvider } from '../ObservabilityProvider'\nimport { sanitizeError } from '../ObservabilityProvider/sanitization'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { NonceContext } from '@/contexts/NonceProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { GlobalResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\nimport type { ObservabilityHook } from '@/types/observability'\nimport { normalizeToSDKError } from '@/types/sdkError'\n\n/**\n * API client configuration passed to {@link GustoProvider} (and {@link GustoProviderCustomUIAdapter}).\n *\n * @public\n */\nexport interface APIConfig {\n /** URL of your backend proxy that forwards SDK requests to the Gusto Embedded API. SDK components never call Gusto directly. */\n baseUrl: string\n /** Extra headers applied to every API request. Combined with any headers your proxy adds. */\n headers?: HeadersInit\n /** Request interceptor hooks. Use these to inspect, modify, or react to requests and responses. See {@link SDKHooks}. */\n hooks?: SDKHooks\n /** Observability hook for surfacing errors and metrics from the SDK to your monitoring stack. See {@link ObservabilityHook}. */\n observability?: ObservabilityHook\n}\n\n/**\n * Shared configuration props accepted by {@link GustoProvider} and {@link GustoProviderCustomUIAdapter}.\n *\n * @public\n */\nexport interface GustoBaseProviderProps {\n /** API client configuration, including the proxy `baseUrl`, request hooks, and observability. See {@link APIConfig}. */\n config: APIConfig\n /** Translation overrides keyed by language and i18next namespace. Strings supplied here replace the SDK defaults for the matching keys. */\n dictionary?: GlobalResourceDictionary\n /** Active i18next language. Defaults to `'en'`. */\n lng?: string\n /** BCP 47 locale used for number, date, and currency formatting throughout the SDK. Defaults to `'en-US'`. */\n locale?: string\n /** ISO 4217 currency code used for monetary formatting. Defaults to `'USD'`. */\n currency?: string\n /** Theme overrides applied to SDK components. See {@link GustoSDKTheme}. */\n theme?: Partial<GustoSDKTheme>\n /**\n * CSP nonce to apply to runtime-injected `<style>` elements (theming, PDF download window).\n * Pass the same per-request nonce your app uses in its `style-src 'nonce-…'` directive.\n * Also exposed to custom UI components via `useNonce`.\n */\n nonce?: string\n /** Element to use as the portal container for SDK popovers and dropdowns. Useful when rendering inside a modal or shadow root. */\n portalContainer?: HTMLElement\n /** Optional TanStack Query `QueryClient`. When omitted, the SDK creates its own client configured for Gusto's API. */\n queryClient?: QueryClient\n /** Complete map of UI components the SDK renders. Required because this adapter ships no defaults. */\n components: ComponentsContextType\n /** Loading indicator rendered while SDK queries are pending. Overrides the SDK default spinner. */\n LoaderComponent?: ({ children }: { children?: ReactNode }) => JSX.Element\n}\n\n/**\n * Props for {@link GustoProviderCustomUIAdapter}.\n *\n * @public\n */\nexport interface GustoProviderCustomUIAdapterProps extends GustoBaseProviderProps {\n /** The application tree that should have access to the SDK. */\n children?: React.ReactNode\n}\n\n/**\n * Top-level provider that requires a complete component map and ships no UI defaults.\n *\n * @remarks\n * Use this adapter when you want full control over every UI primitive the SDK renders, or when\n * you want to avoid the React Aria dependency for tree-shaking. Unlike {@link GustoProvider}, the\n * `components` prop on {@link GustoProviderProps} is required and must supply every component the\n * SDK renders.\n *\n * @param props - See {@link GustoProviderCustomUIAdapterProps}.\n * @returns The configured provider tree wrapping `children`.\n * @public\n * @group Providers\n */\nexport function GustoProviderCustomUIAdapter(props: GustoProviderCustomUIAdapterProps) {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n nonce,\n portalContainer,\n components,\n LoaderComponent,\n queryClient,\n } = props\n\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n const handleTopLevelError = useMemo(() => {\n if (!config.observability?.onError) return undefined\n\n return (error: unknown, errorInfo: ErrorInfo) => {\n if (!config.observability?.onError) return\n\n const sdkError = normalizeToSDKError(error)\n\n const observabilityError = {\n ...sdkError,\n timestamp: Date.now(),\n componentStack: errorInfo.componentStack ?? undefined,\n }\n\n const sanitizedError = sanitizeError(observabilityError, config.observability.sanitization)\n\n config.observability.onError(sanitizedError)\n }\n }, [config.observability])\n return (\n <NonceContext.Provider value={nonce}>\n <ComponentsProvider value={components}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ObservabilityProvider observability={config.observability}>\n <ErrorBoundary FallbackComponent={InternalError} onError={handleTopLevelError}>\n <ThemeProvider theme={theme} portalContainer={portalContainer}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider\n url={config.baseUrl}\n headers={config.headers}\n hooks={config.hooks}\n queryClient={queryClient}\n >\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </ObservabilityProvider>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n </NonceContext.Provider>\n )\n}\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","nonce","portalContainer","components","LoaderComponent","queryClient","language","lang","ns","SDKI18next","useEffect","handleTopLevelError","useMemo","error","errorInfo","observabilityError","normalizeToSDKError","sanitizedError","sanitizeError","NonceContext","jsx","ComponentsProvider","LoadingIndicatorProvider","ObservabilityProvider","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;;;;AAiGO,SAASA,EAA6BC,GAA0C;AACrF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC;AAAA,EAAA,IACEZ;AAEJ,MAAIG;AACF,eAAWU,KAAYV,GAAY;AACjC,YAAMW,IAAOD;AACb,iBAAWE,KAAMZ,EAAWW,CAAI;AAC9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCZ,EAAWW,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAGF,EAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeZ,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC;AAER,QAAMc,IAAsBC,EAAQ,MAAM;AACxC,QAAKjB,EAAO,eAAe;AAE3B,aAAO,CAACkB,GAAgBC,MAAyB;AAC/C,YAAI,CAACnB,EAAO,eAAe,QAAS;AAIpC,cAAMoB,IAAqB;AAAA,UACzB,GAHeC,EAAoBH,CAAK;AAAA,UAIxC,WAAW,KAAK,IAAA;AAAA,UAChB,gBAAgBC,EAAU,kBAAkB;AAAA,QAAA,GAGxCG,IAAiBC,EAAcH,GAAoBpB,EAAO,cAAc,YAAY;AAE1F,QAAAA,EAAO,cAAc,QAAQsB,CAAc;AAAA,MAC7C;AAAA,EACF,GAAG,CAACtB,EAAO,aAAa,CAAC;AACzB,2BACGwB,EAAa,UAAb,EAAsB,OAAOlB,GAC5B,UAAA,gBAAAmB,EAACC,GAAA,EAAmB,OAAOlB,GACzB,4BAACmB,GAAA,EAAyB,OAAOlB,GAC/B,UAAA,gBAAAgB,EAACG,KAAsB,eAAe5B,EAAO,eAC3C,UAAA,gBAAAyB,EAACI,KAAc,mBAAmBC,GAAe,SAASd,GACxD,4BAACe,GAAA,EAAc,OAAA1B,GAAc,iBAAAE,GAC3B,UAAA,gBAAAkB,EAACO,KAAe,QAAA7B,GAAgB,UAAAC,GAC9B,UAAA,gBAAAqB,EAACQ,GAAA,EAAgB,MAAMnB,GACrB,UAAA,gBAAAW;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,KAAKlC,EAAO;AAAA,MACZ,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,MACd,aAAAU;AAAA,MAEC,UAAAX;AAAA,IAAA;AAAA,EAAA,KAPmCG,CASxC,EAAA,CACF,EAAA,CACF,GACF,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport type { ErrorInfo, JSX, ReactNode } from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect, useMemo } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport { ObservabilityProvider } from '../ObservabilityProvider'\nimport { sanitizeError } from '../ObservabilityProvider/sanitization'\nimport { UnstableFeaturesProvider } from '../UnstableFeaturesProvider/UnstableFeaturesProvider'\nimport type { UnstableFeatures } from '../UnstableFeaturesProvider/useUnstableFeature'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { NonceContext } from '@/contexts/NonceProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { GlobalResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\nimport type { ObservabilityHook } from '@/types/observability'\nimport { normalizeToSDKError } from '@/types/sdkError'\n\n/**\n * API client configuration passed to {@link GustoProvider} (and {@link GustoProviderCustomUIAdapter}).\n *\n * @public\n */\nexport interface APIConfig {\n /** URL of your backend proxy that forwards SDK requests to the Gusto Embedded API. SDK components never call Gusto directly. */\n baseUrl: string\n /** Extra headers applied to every API request. Combined with any headers your proxy adds. */\n headers?: HeadersInit\n /** Request interceptor hooks. Use these to inspect, modify, or react to requests and responses. See {@link SDKHooks}. */\n hooks?: SDKHooks\n /** Observability hook for surfacing errors and metrics from the SDK to your monitoring stack. See {@link ObservabilityHook}. */\n observability?: ObservabilityHook\n}\n\n/**\n * Shared configuration props accepted by {@link GustoProvider} and {@link GustoProviderCustomUIAdapter}.\n *\n * @public\n */\nexport interface GustoBaseProviderProps {\n /** API client configuration, including the proxy `baseUrl`, request hooks, and observability. See {@link APIConfig}. */\n config: APIConfig\n /** Translation overrides keyed by language and i18next namespace. Strings supplied here replace the SDK defaults for the matching keys. */\n dictionary?: GlobalResourceDictionary\n /** Active i18next language. Defaults to `'en'`. */\n lng?: string\n /** BCP 47 locale used for number, date, and currency formatting throughout the SDK. Defaults to `'en-US'`. */\n locale?: string\n /** ISO 4217 currency code used for monetary formatting. Defaults to `'USD'`. */\n currency?: string\n /** Theme overrides applied to SDK components. See {@link GustoSDKTheme}. */\n theme?: Partial<GustoSDKTheme>\n /**\n * CSP nonce to apply to runtime-injected `<style>` elements (theming, PDF download window).\n * Pass the same per-request nonce your app uses in its `style-src 'nonce-…'` directive.\n * Also exposed to custom UI components via `useNonce`.\n */\n nonce?: string\n /** Element to use as the portal container for SDK popovers and dropdowns. Useful when rendering inside a modal or shadow root. */\n portalContainer?: HTMLElement\n /** Optional TanStack Query `QueryClient`. When omitted, the SDK creates its own client configured for Gusto's API. */\n queryClient?: QueryClient\n /** Complete map of UI components the SDK renders. Required because this adapter ships no defaults. */\n components: ComponentsContextType\n /** Loading indicator rendered while SDK queries are pending. Overrides the SDK default spinner. */\n LoaderComponent?: ({ children }: { children?: ReactNode }) => JSX.Element\n /**\n * Opt-in flags for alpha SDK functionality. See {@link UnstableFeatures}.\n * @alpha\n */\n unstableFeatures?: UnstableFeatures\n}\n\n/**\n * Props for {@link GustoProviderCustomUIAdapter}.\n *\n * @public\n */\nexport interface GustoProviderCustomUIAdapterProps extends GustoBaseProviderProps {\n /** The application tree that should have access to the SDK. */\n children?: React.ReactNode\n}\n\n/**\n * Top-level provider that requires a complete component map and ships no UI defaults.\n *\n * @remarks\n * Use this adapter when you want full control over every UI primitive the SDK renders, or when\n * you want to avoid the React Aria dependency for tree-shaking. Unlike {@link GustoProvider}, the\n * `components` prop on {@link GustoProviderProps} is required and must supply every component the\n * SDK renders.\n *\n * @param props - See {@link GustoProviderCustomUIAdapterProps}.\n * @returns The configured provider tree wrapping `children`.\n * @public\n * @group Providers\n */\nexport function GustoProviderCustomUIAdapter(props: GustoProviderCustomUIAdapterProps) {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n nonce,\n portalContainer,\n components,\n LoaderComponent,\n queryClient,\n unstableFeatures,\n } = props\n\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n const handleTopLevelError = useMemo(() => {\n if (!config.observability?.onError) return undefined\n\n return (error: unknown, errorInfo: ErrorInfo) => {\n if (!config.observability?.onError) return\n\n const sdkError = normalizeToSDKError(error)\n\n const observabilityError = {\n ...sdkError,\n timestamp: Date.now(),\n componentStack: errorInfo.componentStack ?? undefined,\n }\n\n const sanitizedError = sanitizeError(observabilityError, config.observability.sanitization)\n\n config.observability.onError(sanitizedError)\n }\n }, [config.observability])\n return (\n <NonceContext.Provider value={nonce}>\n <ComponentsProvider value={components}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ObservabilityProvider observability={config.observability}>\n <ErrorBoundary FallbackComponent={InternalError} onError={handleTopLevelError}>\n <ThemeProvider theme={theme} portalContainer={portalContainer}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider\n url={config.baseUrl}\n headers={config.headers}\n hooks={config.hooks}\n queryClient={queryClient}\n >\n <UnstableFeaturesProvider value={unstableFeatures}>\n {children}\n </UnstableFeaturesProvider>\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </ObservabilityProvider>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n </NonceContext.Provider>\n )\n}\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","nonce","portalContainer","components","LoaderComponent","queryClient","unstableFeatures","language","lang","ns","SDKI18next","useEffect","handleTopLevelError","useMemo","error","errorInfo","observabilityError","normalizeToSDKError","sanitizedError","sanitizeError","NonceContext","jsx","ComponentsProvider","LoadingIndicatorProvider","ObservabilityProvider","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider","UnstableFeaturesProvider"],"mappings":";;;;;;;;;;;;;;;;;AAwGO,SAASA,GAA6BC,GAA0C;AACrF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,kBAAAC;AAAA,EAAA,IACEb;AAEJ,MAAIG;AACF,eAAWW,KAAYX,GAAY;AACjC,YAAMY,IAAOD;AACb,iBAAWE,KAAMb,EAAWY,CAAI;AAC9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCb,EAAWY,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAGF,EAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeb,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC;AAER,QAAMe,IAAsBC,EAAQ,MAAM;AACxC,QAAKlB,EAAO,eAAe;AAE3B,aAAO,CAACmB,GAAgBC,MAAyB;AAC/C,YAAI,CAACpB,EAAO,eAAe,QAAS;AAIpC,cAAMqB,IAAqB;AAAA,UACzB,GAHeC,EAAoBH,CAAK;AAAA,UAIxC,WAAW,KAAK,IAAA;AAAA,UAChB,gBAAgBC,EAAU,kBAAkB;AAAA,QAAA,GAGxCG,IAAiBC,EAAcH,GAAoBrB,EAAO,cAAc,YAAY;AAE1F,QAAAA,EAAO,cAAc,QAAQuB,CAAc;AAAA,MAC7C;AAAA,EACF,GAAG,CAACvB,EAAO,aAAa,CAAC;AACzB,2BACGyB,EAAa,UAAb,EAAsB,OAAOnB,GAC5B,UAAA,gBAAAoB,EAACC,GAAA,EAAmB,OAAOnB,GACzB,4BAACoB,GAAA,EAAyB,OAAOnB,GAC/B,UAAA,gBAAAiB,EAACG,KAAsB,eAAe7B,EAAO,eAC3C,UAAA,gBAAA0B,EAACI,KAAc,mBAAmBC,GAAe,SAASd,GACxD,4BAACe,GAAA,EAAc,OAAA3B,GAAc,iBAAAE,GAC3B,UAAA,gBAAAmB,EAACO,KAAe,QAAA9B,GAAgB,UAAAC,GAC9B,UAAA,gBAAAsB,EAACQ,GAAA,EAAgB,MAAMnB,GACrB,UAAA,gBAAAW;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,KAAKnC,EAAO;AAAA,MACZ,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,MACd,aAAAU;AAAA,MAEA,UAAA,gBAAAgB,EAACU,GAAA,EAAyB,OAAOzB,GAC9B,UAAAZ,EAAA,CACH;AAAA,IAAA;AAAA,EAAA,KAToCG,CAWxC,EAAA,CACF,EAAA,CACF,GACF,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ import { UnstableFeatures } from './useUnstableFeature';
3
+ /** @internal */
4
+ export interface UnstableFeaturesProviderProps {
5
+ children: ReactNode;
6
+ value?: UnstableFeatures;
7
+ }
8
+ /**
9
+ * Provides the {@link UnstableFeatures} flags to SDK components via {@link UnstableFeaturesContext}.
10
+ *
11
+ * @remarks
12
+ * Composed by `GustoProvider` so the `unstableFeatures` prop flows down to any SDK Flow or Block
13
+ * that checks {@link useUnstableFeature} before rendering alpha functionality. The context
14
+ * value is keyed on its sorted, serialized content rather than the `value` object's identity —
15
+ * the returned reference only changes when a flag's value actually changes, and adding a new flag to
16
+ * {@link UnstableFeatures} needs no update here.
17
+ *
18
+ * @param props - See {@link UnstableFeaturesProviderProps}.
19
+ * @returns A React subtree with the unstable-features context applied.
20
+ * @internal
21
+ */
22
+ export declare function UnstableFeaturesProvider({ children, value }: UnstableFeaturesProviderProps): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useRef as u } from "react";
3
+ import { UnstableFeaturesContext as a } from "./useUnstableFeature.js";
4
+ function f({ children: o, value: s }) {
5
+ const e = s ?? {}, r = JSON.stringify(e, Object.keys(e).sort()), t = u({
6
+ key: r,
7
+ value: e
8
+ });
9
+ return t.current.key !== r && (t.current = { key: r, value: e }), /* @__PURE__ */ n(a.Provider, { value: t.current.value, children: o });
10
+ }
11
+ export {
12
+ f as UnstableFeaturesProvider
13
+ };
14
+ //# sourceMappingURL=UnstableFeaturesProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnstableFeaturesProvider.js","sources":["../../../src/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useRef } from 'react'\nimport { UnstableFeaturesContext, type UnstableFeatures } from './useUnstableFeature'\n\n/** @internal */\nexport interface UnstableFeaturesProviderProps {\n children: ReactNode\n value?: UnstableFeatures\n}\n\n/**\n * Provides the {@link UnstableFeatures} flags to SDK components via {@link UnstableFeaturesContext}.\n *\n * @remarks\n * Composed by `GustoProvider` so the `unstableFeatures` prop flows down to any SDK Flow or Block\n * that checks {@link useUnstableFeature} before rendering alpha functionality. The context\n * value is keyed on its sorted, serialized content rather than the `value` object's identity —\n * the returned reference only changes when a flag's value actually changes, and adding a new flag to\n * {@link UnstableFeatures} needs no update here.\n *\n * @param props - See {@link UnstableFeaturesProviderProps}.\n * @returns A React subtree with the unstable-features context applied.\n * @internal\n */\nexport function UnstableFeaturesProvider({ children, value }: UnstableFeaturesProviderProps) {\n const resolvedValue = value ?? {}\n const key = JSON.stringify(resolvedValue, Object.keys(resolvedValue).sort())\n\n const stableRef = useRef<{ key: string; value: UnstableFeatures }>({\n key,\n value: resolvedValue,\n })\n if (stableRef.current.key !== key) {\n stableRef.current = { key, value: resolvedValue }\n }\n\n return (\n <UnstableFeaturesContext.Provider value={stableRef.current.value}>\n {children}\n </UnstableFeaturesContext.Provider>\n )\n}\n"],"names":["UnstableFeaturesProvider","children","value","resolvedValue","key","stableRef","useRef","jsx","UnstableFeaturesContext"],"mappings":";;;AAwBO,SAASA,EAAyB,EAAE,UAAAC,GAAU,OAAAC,KAAwC;AAC3F,QAAMC,IAAgBD,KAAS,CAAA,GACzBE,IAAM,KAAK,UAAUD,GAAe,OAAO,KAAKA,CAAa,EAAE,MAAM,GAErEE,IAAYC,EAAiD;AAAA,IACjE,KAAAF;AAAA,IACA,OAAOD;AAAA,EAAA,CACR;AACD,SAAIE,EAAU,QAAQ,QAAQD,MAC5BC,EAAU,UAAU,EAAE,KAAAD,GAAK,OAAOD,EAAA,IAIlC,gBAAAI,EAACC,EAAwB,UAAxB,EAAiC,OAAOH,EAAU,QAAQ,OACxD,UAAAJ,GACH;AAEJ;"}
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { UnstableFeatures } from './useUnstableFeature';
3
+ /** @internal */
4
+ export interface WithUnstableFeatureProps {
5
+ feature: keyof UnstableFeatures;
6
+ children: ReactNode;
7
+ }
8
+ /**
9
+ * Renders `children` only when `feature` is enabled in {@link UnstableFeatures}.
10
+ *
11
+ * @remarks
12
+ * `null` is a silent no-op, not an error — this gates new UX inside an already-released
13
+ * component, so the flag being off must leave that component's public behavior unchanged.
14
+ *
15
+ * @param props - See {@link WithUnstableFeatureProps}.
16
+ * @returns `children` when the flag is enabled, otherwise `null`.
17
+ * @internal
18
+ */
19
+ export declare function WithUnstableFeature({ feature, children }: WithUnstableFeatureProps): ReactNode;
@@ -0,0 +1,8 @@
1
+ import { useUnstableFeature as n } from "./useUnstableFeature.js";
2
+ function l({ feature: e, children: t }) {
3
+ return n(e) ? t : null;
4
+ }
5
+ export {
6
+ l as WithUnstableFeature
7
+ };
8
+ //# sourceMappingURL=WithUnstableFeature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithUnstableFeature.js","sources":["../../../src/contexts/UnstableFeaturesProvider/WithUnstableFeature.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useUnstableFeature, type UnstableFeatures } from './useUnstableFeature'\n\n/** @internal */\nexport interface WithUnstableFeatureProps {\n feature: keyof UnstableFeatures\n children: ReactNode\n}\n\n/**\n * Renders `children` only when `feature` is enabled in {@link UnstableFeatures}.\n *\n * @remarks\n * `null` is a silent no-op, not an error — this gates new UX inside an already-released\n * component, so the flag being off must leave that component's public behavior unchanged.\n *\n * @param props - See {@link WithUnstableFeatureProps}.\n * @returns `children` when the flag is enabled, otherwise `null`.\n * @internal\n */\nexport function WithUnstableFeature({ feature, children }: WithUnstableFeatureProps) {\n const isEnabled = useUnstableFeature(feature)\n return isEnabled ? children : null\n}\n"],"names":["WithUnstableFeature","feature","children","useUnstableFeature"],"mappings":";AAoBO,SAASA,EAAoB,EAAE,SAAAC,GAAS,UAAAC,KAAsC;AAEnF,SADkBC,EAAmBF,CAAO,IACzBC,IAAW;AAChC;"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Opt-in flags for SDK functionality that is still in active development.
3
+ *
4
+ * @remarks
5
+ * Pass to {@link GustoProvider} via the `unstableFeatures` prop to enable a feature ahead of its
6
+ * public release. Every flag defaults to disabled when omitted. When a feature graduates to
7
+ * public release, its flag is deleted from this interface along with the conditional checks that
8
+ * read it — there is no deprecation step. This interface may have no flags at all at any given
9
+ * time — e.g. immediately after the last active flag graduates and before the next one is added —
10
+ * the opt-in mechanism itself is permanent even when nothing is currently gated behind it.
11
+ *
12
+ * @alpha
13
+ */
14
+ export interface UnstableFeatures {
15
+ /** Enables recording past payments to contractors within the `ContractorManagement` flows. */
16
+ historicalPayments?: boolean;
17
+ }
18
+ /**
19
+ * React context backing {@link useUnstableFeature}.
20
+ *
21
+ * @internal
22
+ */
23
+ export declare const UnstableFeaturesContext: import('react').Context<UnstableFeatures>;
24
+ /**
25
+ * Reads whether `feature` is enabled via {@link GustoProvider}'s `unstableFeatures` prop.
26
+ *
27
+ * @remarks
28
+ * With `throwIfDisabled: true`, call unconditionally at the top of an alpha component's body —
29
+ * not inside {@link WithUnstableFeature} — so mounting the component without opting in fails
30
+ * loudly and immediately. This throws in every environment, including production: using an alpha
31
+ * component without its flag is an integration mistake, not a runtime state, the same as
32
+ * {@link useComponentContext} throwing when called outside a `ComponentsProvider`.
33
+ *
34
+ * @param feature - The {@link UnstableFeatures} flag to read.
35
+ * @param options - Set `throwIfDisabled` to throw instead of returning `false` when `feature` is disabled.
36
+ * @throws When `options.throwIfDisabled` is set and `feature` is not enabled.
37
+ * @internal
38
+ */
39
+ export declare const useUnstableFeature: (feature: keyof UnstableFeatures, options?: {
40
+ throwIfDisabled?: boolean;
41
+ }) => boolean;
@@ -0,0 +1,14 @@
1
+ import { useContext as s, createContext as o } from "react";
2
+ const a = o({}), l = (e, r = { throwIfDisabled: !1 }) => {
3
+ const t = !!s(a)[e];
4
+ if (r.throwIfDisabled && !t)
5
+ throw new Error(
6
+ `This component requires the unstable feature flag "${e}" to be enabled via GustoProvider's \`unstableFeatures\` prop.`
7
+ );
8
+ return t;
9
+ };
10
+ export {
11
+ a as UnstableFeaturesContext,
12
+ l as useUnstableFeature
13
+ };
14
+ //# sourceMappingURL=useUnstableFeature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUnstableFeature.js","sources":["../../../src/contexts/UnstableFeaturesProvider/useUnstableFeature.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\n/**\n * Opt-in flags for SDK functionality that is still in active development.\n *\n * @remarks\n * Pass to {@link GustoProvider} via the `unstableFeatures` prop to enable a feature ahead of its\n * public release. Every flag defaults to disabled when omitted. When a feature graduates to\n * public release, its flag is deleted from this interface along with the conditional checks that\n * read it — there is no deprecation step. This interface may have no flags at all at any given\n * time — e.g. immediately after the last active flag graduates and before the next one is added —\n * the opt-in mechanism itself is permanent even when nothing is currently gated behind it.\n *\n * @alpha\n */\nexport interface UnstableFeatures {\n /** Enables recording past payments to contractors within the `ContractorManagement` flows. */\n historicalPayments?: boolean\n}\n\n/**\n * React context backing {@link useUnstableFeature}.\n *\n * @internal\n */\nexport const UnstableFeaturesContext = createContext<UnstableFeatures>({})\n\n/**\n * Reads whether `feature` is enabled via {@link GustoProvider}'s `unstableFeatures` prop.\n *\n * @remarks\n * With `throwIfDisabled: true`, call unconditionally at the top of an alpha component's body —\n * not inside {@link WithUnstableFeature} — so mounting the component without opting in fails\n * loudly and immediately. This throws in every environment, including production: using an alpha\n * component without its flag is an integration mistake, not a runtime state, the same as\n * {@link useComponentContext} throwing when called outside a `ComponentsProvider`.\n *\n * @param feature - The {@link UnstableFeatures} flag to read.\n * @param options - Set `throwIfDisabled` to throw instead of returning `false` when `feature` is disabled.\n * @throws When `options.throwIfDisabled` is set and `feature` is not enabled.\n * @internal\n */\nexport const useUnstableFeature = (\n feature: keyof UnstableFeatures,\n options: { throwIfDisabled?: boolean } = { throwIfDisabled: false },\n): boolean => {\n const features = useContext(UnstableFeaturesContext)\n const isEnabled = !!features[feature]\n\n if (options.throwIfDisabled && !isEnabled) {\n throw new Error(\n `This component requires the unstable feature flag \"${feature}\" to be enabled via GustoProvider's \\`unstableFeatures\\` prop.`,\n )\n }\n\n return isEnabled\n}\n"],"names":["UnstableFeaturesContext","createContext","useUnstableFeature","feature","options","isEnabled","useContext"],"mappings":";AAyBO,MAAMA,IAA0BC,EAAgC,CAAA,CAAE,GAiB5DC,IAAqB,CAChCC,GACAC,IAAyC,EAAE,iBAAiB,SAChD;AAEZ,QAAMC,IAAY,CAAC,CADFC,EAAWN,CAAuB,EACtBG,CAAO;AAEpC,MAAIC,EAAQ,mBAAmB,CAACC;AAC9B,UAAM,IAAI;AAAA,MACR,sDAAsDF,CAAO;AAAA,IAAA;AAIjE,SAAOE;AACT;"}
@@ -5,3 +5,4 @@ export type { ComponentsContextType } from './ComponentAdapter/useComponentConte
5
5
  export * from './ComponentAdapter/componentAdapterTypes';
6
6
  export type { GustoSDKTheme, GustoSDKThemeColors } from './ThemeProvider/theme';
7
7
  export { useNonce } from './NonceProvider';
8
+ export type { UnstableFeatures } from './UnstableFeaturesProvider/useUnstableFeature';
@@ -1,36 +1,38 @@
1
- const t = { heading: "Record a historical payment", subtitle: "Log a contractor payment that already happened outside Gusto. Pick a paid date and the contractors you paid.", dateLabel: "Payment date", dateInFutureError: "You cannot issue historical payments for the future. Please choose a date in the past.", dateTooEarlyError: "You cannot create a payment in {{year}}. Please select a {{allowedYear}} date.", continueButton: "Continue" }, e = { heading: "Enter payment amounts", subtitle: "Enter the hours or wage paid to each contractor along with any bonuses and reimbursements.", continueButton: "Continue" }, a = "Hours and payments", o = { contractor: "Contractor", wageType: "Wage", paymentMethod: "Payment method", hours: "Hours", wage: "Fixed amount", bonus: "Bonus", reimbursement: "Reimbursement", total: "Total" }, n = "No contractors selected", r = "Select at least one contractor to record a payment.", s = "N/A", c = "Totals", i = "Edit contractor payment", l = "/hr", m = { fixed: "Fixed", hourly: "Hourly" }, u = { directDeposit: "Direct Deposit", check: "Check", historicalPayment: "Historical Payment" }, d = { contractorPaymentUpdated: "Pay updated for {{contractorName}}" }, y = { title: "Edit contractor pay", subtitle: `Edit contractor's hours, additional earnings, and reimbursements. Inputs not applicable to this contractor are disabled. Please click "Done" to apply the change.`, hoursLabel: "Hours", hoursAdornment: "hrs", hoursPayDescription: "{{rate}}/hr × hours = {{total}}", wageLabel: "Fixed amount", bonusLabel: "Bonus", reimbursementLabel: "Reimbursement", paymentMethodLabel: "Payment Method", cancelCta: "Cancel", saveCta: "Done", paymentMethods: { check: "Check", directDeposit: "Direct deposit", historicalPayment: "Historical payment" }, errors: { directDepositNotAvailable: "Direct Deposit is not available for contractors set up for Check payments", unsupportedPaymentMethod: "This payment method is not supported. Please select Check or Direct Deposit." } }, p = { title: "Review and submit", subtitle: "Historical payment for {{checkDate}}", editButton: "Edit", submitButton: "Submit historical payment", successTitle: "Historical payment recorded successfully", successMessage: "This payment has been recorded. View it from the payments list to see its full details.", paymentSummaryTitle: "Payment Summary", totalAmount: "Total Amount", contractorPayDate: "Contractor Pay Date", contractorPaymentsTitle: "Contractor Payments", contractor: "Contractor", wageType: "Wage Type", paymentMethod: "Payment Method", paymentMethods: { directDeposit: "Direct Deposit", check: "Check", historicalPayment: "Historical Payment" }, hours: "Hours", wage: "Wage", bonus: "Bonus", reimbursement: "Reimbursement", total: "Total", totalsLabel: "Totals", notAvailable: "N/A" }, h = {
2
- select: t,
3
- amounts: e,
4
- hoursAndPaymentsLabel: a,
5
- contractorTableHeaders: o,
6
- emptyTableTitle: n,
7
- emptyTableDescription: r,
8
- na: s,
9
- totalsLabel: c,
10
- editContractor: i,
11
- perHour: l,
12
- wageTypes: m,
13
- paymentMethods: u,
14
- alerts: d,
15
- editContractorPayment: y,
16
- review: p
1
+ const t = "Back", e = { heading: "Record a historical payment", subtitle: "Log a contractor payment that already happened outside Gusto. Pick a paid date and the contractors you paid.", dateLabel: "Payment date", dateInFutureError: "You cannot issue historical payments for the future. Please choose a date in the past.", dateTooEarlyError: "You cannot create a payment in {{year}}. Please select a {{allowedYear}} date.", continueButton: "Continue" }, a = { heading: "Enter payment amounts", subtitle: "Enter the hours or wage paid to each contractor along with any bonuses and reimbursements.", continueButton: "Continue" }, o = "Hours and payments", n = { contractor: "Contractor", wageType: "Wage", paymentMethod: "Payment method", hours: "Hours", wage: "Fixed amount", bonus: "Bonus", reimbursement: "Reimbursement", total: "Total" }, r = "No contractors selected", s = "Select at least one contractor to record a payment.", c = "N/A", i = "Totals", l = "Edit contractor payment", m = "/hr", u = { fixed: "Fixed", hourly: "Hourly" }, d = { directDeposit: "Direct Deposit", check: "Check", historicalPayment: "Historical Payment" }, y = { contractorPaymentUpdated: "Pay updated for {{contractorName}}" }, p = { title: "Edit contractor pay", subtitle: `Edit contractor's hours, additional earnings, and reimbursements. Inputs not applicable to this contractor are disabled. Please click "Done" to apply the change.`, hoursLabel: "Hours", hoursAdornment: "hrs", hoursPayDescription: "{{rate}}/hr × hours = {{total}}", wageLabel: "Fixed amount", bonusLabel: "Bonus", reimbursementLabel: "Reimbursement", paymentMethodLabel: "Payment Method", cancelCta: "Cancel", saveCta: "Done", paymentMethods: { check: "Check", directDeposit: "Direct deposit", historicalPayment: "Historical payment" }, errors: { directDepositNotAvailable: "Direct Deposit is not available for contractors set up for Check payments", unsupportedPaymentMethod: "This payment method is not supported. Please select Check or Direct Deposit." } }, h = { title: "Review and submit", subtitle: "Historical payment for {{checkDate}}", submitButton: "Submit historical payment", successTitle: "Historical payment recorded successfully", successMessage: "This payment has been recorded. View it from the payments list to see its full details.", paymentSummaryTitle: "Payment Summary", totalAmount: "Total Amount", contractorPayDate: "Contractor Pay Date", contractorPaymentsTitle: "Contractor Payments", contractor: "Contractor", wageType: "Wage Type", paymentMethod: "Payment Method", paymentMethods: { directDeposit: "Direct Deposit", check: "Check", historicalPayment: "Historical Payment" }, hours: "Hours", wage: "Wage", bonus: "Bonus", reimbursement: "Reimbursement", total: "Total", totalsLabel: "Totals", notAvailable: "N/A" }, b = {
2
+ backButton: t,
3
+ select: e,
4
+ amounts: a,
5
+ hoursAndPaymentsLabel: o,
6
+ contractorTableHeaders: n,
7
+ emptyTableTitle: r,
8
+ emptyTableDescription: s,
9
+ na: c,
10
+ totalsLabel: i,
11
+ editContractor: l,
12
+ perHour: m,
13
+ wageTypes: u,
14
+ paymentMethods: d,
15
+ alerts: y,
16
+ editContractorPayment: p,
17
+ review: h
17
18
  };
18
19
  export {
19
- d as alerts,
20
- e as amounts,
21
- o as contractorTableHeaders,
22
- h as default,
23
- i as editContractor,
24
- y as editContractorPayment,
25
- r as emptyTableDescription,
26
- n as emptyTableTitle,
27
- a as hoursAndPaymentsLabel,
28
- s as na,
29
- u as paymentMethods,
30
- l as perHour,
31
- p as review,
32
- t as select,
33
- c as totalsLabel,
34
- m as wageTypes
20
+ y as alerts,
21
+ a as amounts,
22
+ t as backButton,
23
+ n as contractorTableHeaders,
24
+ b as default,
25
+ l as editContractor,
26
+ p as editContractorPayment,
27
+ s as emptyTableDescription,
28
+ r as emptyTableTitle,
29
+ o as hoursAndPaymentsLabel,
30
+ c as na,
31
+ d as paymentMethods,
32
+ m as perHour,
33
+ h as review,
34
+ e as select,
35
+ i as totalsLabel,
36
+ u as wageTypes
35
37
  };
36
38
  //# sourceMappingURL=Contractor.Payments.CreateHistoricalPayment.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contractor.Payments.CreateHistoricalPayment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Contractor.Payments.CreateHistoricalPayment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1,36 +1,38 @@
1
- const e = "Contractor payments", t = "Upcoming and past payments", n = "Contractor payments", a = "New payment", s = "Start date", o = "Apply date", c = "Payment date", r = "Reimbursement total", m = "Wage total", i = "Actions", l = "View payment", y = "No payments found", u = "No contractor payments have been created yet. Create your first payment to get started.", p = { paymentCreatedSuccessfully_one: "Successfully created {{count}} contractor payment.", paymentCreatedSuccessfully_other: "Successfully created {{count}} contractor payments.", paymentCancelledSuccessfully: "Contractor payment cancelled successfully", wireDetailsSubmitted: "Wire details submitted", rfiPendingResponseTitle: "Payments may be blocked: Provide more information to run payments", rfiPendingResponseDescription: "We need some more information about your business. Please respond as soon as possible to run payments on time.", rfiPendingReviewTitle: "Payments may be blocked", rfiPendingReviewDescription: "We're reviewing information about your business. Payments may be blocked until review is complete.", rfiRespondCta: "Respond" }, d = { last3Months: "Last 3 months", last6Months: "Last 6 months", last12Months: "Last 12 months" }, b = {
2
- title: e,
3
- subtitle: t,
1
+ const t = "Contractor payments", e = "Upcoming and past payments", n = "Contractor payments", a = "New payment", o = "Start date", s = "Apply date", c = "Payment date", r = "Reimbursement total", i = "Wage total", m = "Actions", l = "View payment", y = "No payments found", u = "No contractor payments have been created yet. Create your first payment to get started.", d = { paymentCreatedSuccessfully_one: "Successfully created {{count}} contractor payment.", paymentCreatedSuccessfully_other: "Successfully created {{count}} contractor payments.", paymentCancelledSuccessfully: "Contractor payment cancelled successfully", wireDetailsSubmitted: "Wire details submitted", rfiPendingResponseTitle: "Payments may be blocked: Provide more information to run payments", rfiPendingResponseDescription: "We need some more information about your business. Please respond as soon as possible to run payments on time.", rfiPendingReviewTitle: "Payments may be blocked", rfiPendingReviewDescription: "We're reviewing information about your business. Payments may be blocked until review is complete.", rfiRespondCta: "Respond" }, p = { last3Months: "Last 3 months", last6Months: "Last 6 months", last12Months: "Last 12 months" }, b = { title: "Record a historical payment", description: "Add a contractor payment that was made outside of Gusto to keep your records complete.", button: "Record a historical payment" }, f = {
2
+ title: t,
3
+ subtitle: e,
4
4
  breadcrumbLabel: n,
5
5
  createPaymentCta: a,
6
- startDate: s,
7
- applyDate: o,
6
+ startDate: o,
7
+ applyDate: s,
8
8
  paymentDateColumnLabel: c,
9
9
  reimbursementTotalColumnLabel: r,
10
- wageTotalColumnLabel: m,
11
- actionColumnLabel: i,
10
+ wageTotalColumnLabel: i,
11
+ actionColumnLabel: m,
12
12
  viewPaymentCta: l,
13
13
  noPaymentsFound: y,
14
14
  noPaymentsDescription: u,
15
- alerts: p,
16
- dateRanges: d
15
+ alerts: d,
16
+ dateRanges: p,
17
+ historicalPaymentCta: b
17
18
  };
18
19
  export {
19
- i as actionColumnLabel,
20
- p as alerts,
21
- o as applyDate,
20
+ m as actionColumnLabel,
21
+ d as alerts,
22
+ s as applyDate,
22
23
  n as breadcrumbLabel,
23
24
  a as createPaymentCta,
24
- d as dateRanges,
25
- b as default,
25
+ p as dateRanges,
26
+ f as default,
27
+ b as historicalPaymentCta,
26
28
  u as noPaymentsDescription,
27
29
  y as noPaymentsFound,
28
30
  c as paymentDateColumnLabel,
29
31
  r as reimbursementTotalColumnLabel,
30
- s as startDate,
31
- t as subtitle,
32
- e as title,
32
+ o as startDate,
33
+ e as subtitle,
34
+ t as title,
33
35
  l as viewPaymentCta,
34
- m as wageTotalColumnLabel
36
+ i as wageTotalColumnLabel
35
37
  };
36
38
  //# sourceMappingURL=Contractor.Payments.PaymentsList.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contractor.Payments.PaymentsList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Contractor.Payments.PaymentsList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -85,27 +85,6 @@ declare const _default: {
85
85
  "yearly": "{{amount}} per year",
86
86
  "paycheck": "{{amount}} per paycheck"
87
87
  },
88
- "compensationRateFormats": {
89
- "hourly": "{{amount}} per hour",
90
- "weekly": "{{amount}} per week",
91
- "monthly": "{{amount}} per month",
92
- "yearly": "{{amount}} per year",
93
- "paycheck": "{{amount}} per paycheck"
94
- },
95
- "compensationRateFormats": {
96
- "hourly": "{{amount}} per hour",
97
- "weekly": "{{amount}} per week",
98
- "monthly": "{{amount}} per month",
99
- "yearly": "{{amount}} per year",
100
- "paycheck": "{{amount}} per paycheck"
101
- },
102
- "compensationRateFormats": {
103
- "hourly": "{{amount}} per hour",
104
- "weekly": "{{amount}} per week",
105
- "monthly": "{{amount}} per month",
106
- "yearly": "{{amount}} per year",
107
- "paycheck": "{{amount}} per paycheck"
108
- },
109
88
  "validations": {
110
89
  "accountName": "Account name is required",
111
90
  "routingNumber": "Routing number should be a number (9 digits)",
@@ -2411,6 +2411,8 @@ export namespace Translations {
2411
2411
  }
2412
2412
  /** Translation keys for the `Contractor.Payments.CreateHistoricalPayment` i18n namespace. */
2413
2413
  export interface ContractorPaymentsCreateHistoricalPayment {
2414
+ /** @defaultValue `"Back"` */
2415
+ backButton: string
2414
2416
  select: {
2415
2417
  /** @defaultValue `"Record a historical payment"` */
2416
2418
  heading: string
@@ -2526,8 +2528,6 @@ export namespace Translations {
2526
2528
  title: string
2527
2529
  /** @defaultValue `"Historical payment for {{checkDate}}"` */
2528
2530
  subtitle: string
2529
- /** @defaultValue `"Edit"` */
2530
- editButton: string
2531
2531
  /** @defaultValue `"Submit historical payment"` */
2532
2532
  submitButton: string
2533
2533
  /** @defaultValue `"Historical payment recorded successfully"` */
@@ -3071,6 +3071,14 @@ export namespace Translations {
3071
3071
  /** @defaultValue `"Last 12 months"` */
3072
3072
  last12Months: string
3073
3073
  }
3074
+ historicalPaymentCta: {
3075
+ /** @defaultValue `"Record a historical payment"` */
3076
+ title: string
3077
+ /** @defaultValue `"Add a contractor payment that was made outside of Gusto to keep your records complete."` */
3078
+ description: string
3079
+ /** @defaultValue `"Record a historical payment"` */
3080
+ button: string
3081
+ }
3074
3082
  }
3075
3083
  /** Translation keys for the `Contractor.Profile` i18n namespace. */
3076
3084
  export interface ContractorProfile {
@@ -270,6 +270,7 @@ export declare const contractorPaymentEvents: {
270
270
  * @public
271
271
  */
272
272
  export declare const contractorHistoricalPaymentEvents: {
273
+ readonly CONTRACTOR_HISTORICAL_PAYMENT_CREATE: "contractor/historicalPayments/create";
273
274
  readonly CONTRACTOR_HISTORICAL_PAYMENT_EDIT: "contractor/historicalPayments/edit";
274
275
  readonly CONTRACTOR_HISTORICAL_PAYMENT_UPDATE: "contractor/historicalPayments/update";
275
276
  readonly CONTRACTOR_HISTORICAL_PAYMENT_PREVIEW: "contractor/historicalPayments/preview";
@@ -541,6 +542,7 @@ export declare const componentEvents: {
541
542
  readonly TRANSITION_CREATED: "transition/created";
542
543
  readonly RUN_TRANSITION_PAYROLL: "transition/runPayroll";
543
544
  readonly TRANSITION_PAYROLL_SKIPPED: "transition/payrollSkipped";
545
+ readonly CONTRACTOR_HISTORICAL_PAYMENT_CREATE: "contractor/historicalPayments/create";
544
546
  readonly CONTRACTOR_HISTORICAL_PAYMENT_EDIT: "contractor/historicalPayments/edit";
545
547
  readonly CONTRACTOR_HISTORICAL_PAYMENT_UPDATE: "contractor/historicalPayments/update";
546
548
  readonly CONTRACTOR_HISTORICAL_PAYMENT_PREVIEW: "contractor/historicalPayments/preview";
@@ -217,6 +217,7 @@ const t = {
217
217
  CONTRACTOR_PAYMENT_EXIT: "contractor/payments/exit",
218
218
  CONTRACTOR_PAYMENT_RFI_RESPOND: "contractor/payments/rfi/respond"
219
219
  }, a = {
220
+ CONTRACTOR_HISTORICAL_PAYMENT_CREATE: "contractor/historicalPayments/create",
220
221
  CONTRACTOR_HISTORICAL_PAYMENT_EDIT: "contractor/historicalPayments/edit",
221
222
  CONTRACTOR_HISTORICAL_PAYMENT_UPDATE: "contractor/historicalPayments/update",
222
223
  CONTRACTOR_HISTORICAL_PAYMENT_PREVIEW: "contractor/historicalPayments/preview",