@gusto/embedded-react-sdk 0.56.7 → 0.57.0

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 (92) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +1 -1
  3. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  4. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  5. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  6. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  7. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  8. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  9. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  10. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  11. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  12. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  13. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  14. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  15. package/dist/components/Company/Industry/Context.js +8 -7
  16. package/dist/components/Company/Industry/Context.js.map +1 -1
  17. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  18. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  19. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  20. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  21. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  22. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  23. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js +70 -0
  24. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js.map +1 -0
  25. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +30 -32
  26. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -1
  27. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +35 -27
  28. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -1
  29. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +52 -31
  30. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -1
  31. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +106 -66
  32. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -1
  33. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +36 -30
  34. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -1
  35. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js +7 -0
  36. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js.map +1 -0
  37. package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js +81 -0
  38. package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js.map +1 -0
  39. package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +46 -18
  40. package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -1
  41. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  42. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  43. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  44. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  45. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +5 -4
  46. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  47. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  48. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  49. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js +13 -13
  50. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
  51. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  52. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  53. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js +113 -111
  54. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js.map +1 -1
  55. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +27 -31
  56. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  57. package/dist/components/Payroll/PayrollList/PayrollList.js +31 -35
  58. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  59. package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js +5 -9
  60. package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js.map +1 -1
  61. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  62. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  63. package/dist/contexts/ApiProvider/createSdkQueryClient.js +4 -3
  64. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -1
  65. package/dist/contexts/ObservabilityProvider/sanitization.js +98 -47
  66. package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
  67. package/dist/helpers/validations.js +1 -1
  68. package/dist/helpers/validations.js.map +1 -1
  69. package/dist/i18n/en/Company.AssignSignatory.json.js +1 -1
  70. package/dist/i18n/en/Company.Management.PaySchedule.json.js +24 -14
  71. package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -1
  72. package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +12 -10
  73. package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -1
  74. package/dist/package.json.js +1 -1
  75. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.d.ts +15 -0
  76. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +3 -3
  77. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +7 -3
  78. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +20 -4
  79. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.d.ts +3 -0
  80. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +10 -1
  81. package/dist/src/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.d.ts +25 -0
  82. package/dist/src/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.test.d.ts +1 -0
  83. package/dist/src/contexts/ApiProvider/createSdkQueryClient.d.ts +2 -0
  84. package/dist/src/contexts/ApiProvider/createSdkQueryClient.test.d.ts +1 -0
  85. package/dist/src/contexts/ObservabilityProvider/sanitization.d.ts +8 -17
  86. package/dist/src/contexts/ObservabilityProvider/useSanitizedObservability.test.d.ts +1 -0
  87. package/dist/src/helpers/validations.test.d.ts +1 -0
  88. package/dist/src/i18n/types.d.ts +38 -2
  89. package/dist/src/models/external.d.ts +7 -6
  90. package/dist/src/types/observability.d.ts +59 -20
  91. package/docs/guides/endpoint-inventory.json +15 -0
  92. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.57.0](https://github.com/Gusto/embedded-react-sdk/compare/v0.56.7...v0.57.0) (2026-10-15)
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ - `customErrorSanitizer` and `customMetricSanitizer` (via `ObservabilityProvider`'s `sanitization` config) now run **inside** the SDK's own redaction instead of replacing it — your function receives already-redacted input, and its output is redacted again before being forwarded. Raw errors are stripped unless `includeRawError: true`, even if your sanitizer re-adds them, and this applies independently of `enabled: false`. Built-in sensitive-key coverage has also expanded ([#2908](https://github.com/Gusto/embedded-react-sdk/issues/2908))
8
+
9
+ ```tsx
10
+ // Before — sanitizer output was forwarded as-is, so returning the raw
11
+ // error bypassed SDK redaction entirely.
12
+ sanitization={{
13
+ customErrorSanitizer: (error) => ({ ...error, raw: originalError }),
14
+ }}
15
+
16
+ // After — raw is stripped again after your sanitizer runs unless you opt in.
17
+ sanitization={{
18
+ includeRawError: true,
19
+ customErrorSanitizer: (error) => ({ ...error, raw: originalError }),
20
+ }}
21
+ ```
22
+
23
+ ### Features & Enhancements
24
+
25
+ - Add support for assignment by compensation type ([#2881](https://github.com/Gusto/embedded-react-sdk/issues/2881))
26
+
27
+ ### Fixes
28
+
29
+ - Fix external payrolls incorrectly appearing in the payroll list and history ([#2909](https://github.com/Gusto/embedded-react-sdk/issues/2909))
30
+ - `@gusto/embedded-api` queries and mutations now run regardless of network state, instead of silently stalling when the browser reports itself offline ([#2895](https://github.com/Gusto/embedded-react-sdk/issues/2895))
31
+ - Trim whitespace from name fields and clarify the invalid-name error copy ([#2896](https://github.com/Gusto/embedded-react-sdk/issues/2896))
32
+ - Fix payroll employee edit defaults being skipped for employees with a `constructor`, `toString`, or other inherited `Object.prototype` key as their UUID ([#2900](https://github.com/Gusto/embedded-react-sdk/issues/2900))
33
+
34
+ ### Chores & Maintenance
35
+
36
+ - Bump dev dependencies (`@internationalized/number`, `@playwright/test`, `@storybook/addon-a11y`, `@storybook/addon-onboarding`, `axe-core`, `cspell`, `eslint-plugin-tsdoc`, `vite`, `vite-plugin-dts`) ([#2907](https://github.com/Gusto/embedded-react-sdk/issues/2907), [#2905](https://github.com/Gusto/embedded-react-sdk/issues/2905), [#2912](https://github.com/Gusto/embedded-react-sdk/issues/2912), [#2903](https://github.com/Gusto/embedded-react-sdk/issues/2903), [#2914](https://github.com/Gusto/embedded-react-sdk/issues/2914), [#2851](https://github.com/Gusto/embedded-react-sdk/issues/2851), [#2904](https://github.com/Gusto/embedded-react-sdk/issues/2904), [#2915](https://github.com/Gusto/embedded-react-sdk/issues/2915), [#2913](https://github.com/Gusto/embedded-react-sdk/issues/2913))
37
+ - Bump `msw` to 3.0.3 ([#2916](https://github.com/Gusto/embedded-react-sdk/issues/2916))
38
+ - Bump `katex` in `/docs-site` ([#2891](https://github.com/Gusto/embedded-react-sdk/issues/2891))
39
+
3
40
  ## [0.56.7](https://github.com/Gusto/embedded-react-sdk/compare/v0.56.6...v0.56.7) (2026-10-13)
4
41
 
5
42
  ### Fixes
package/README.md CHANGED
@@ -51,7 +51,7 @@ See the [SDK Dev App README](sdk-app/README.md) for full setup and usage details
51
51
  - [Appendix](docs/appendix/endpoint-reference.md)
52
52
  - [Endpoint Reference](docs/appendix/endpoint-reference.md)
53
53
  - [Jobs and Compensations](docs/appendix/jobs-and-compensations.md)
54
- - [Proxy Examples](docs/appendix/proxy-examples.md)
54
+ - [Reviewing SDK API access](docs/getting-started/reviewing-sdk-api-access.md)
55
55
  - [Workflows Overview](docs/workflows-overview/workflows-overview.md)
56
56
  - [Company Onboarding](docs/workflows-overview/company-onboarding.md)
57
57
  - [Contractor Onboarding](docs/workflows-overview/contractor-onboarding.md)
@@ -9,13 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [s, u] = t("CreateSignatoryContext");
17
+ const [u, f] = t("CreateSignatoryContext");
17
18
  export {
18
- u as CreateSignatoryProvider,
19
- s as useCreateSignatory
19
+ f as CreateSignatoryProvider,
20
+ u as useCreateSignatory
20
21
  };
21
22
  //# sourceMappingURL=useCreateSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,13 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [c, d] = t("InviteSignatoryContext");
17
+ const [d, s] = t("InviteSignatoryContext");
17
18
  export {
18
- d as InviteSignatoryProvider,
19
- c as useInviteSignatory
19
+ s as InviteSignatoryProvider,
20
+ d as useInviteSignatory
20
21
  };
21
22
  //# sourceMappingURL=useInviteSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,17 +9,18 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../shared/constants.js";
13
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const v = {
17
+ const x = {
17
18
  createSignatory: "createSignatory",
18
19
  inviteSignatory: "inviteSignatory"
19
- }, [x, C] = t("AssignSignatoryContext");
20
+ }, [C, u] = t("AssignSignatoryContext");
20
21
  export {
21
- C as AssignSignatoryProvider,
22
- v as SignatoryAssignmentMode,
23
- x as useAssignSignatory
22
+ u as AssignSignatoryProvider,
23
+ x as SignatoryAssignmentMode,
24
+ C as useAssignSignatory
24
25
  };
25
26
  //# sourceMappingURL=useAssignSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,13 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [d, s] = o("BankAccountContext");
17
+ const [s, F] = o("BankAccountContext");
17
18
  export {
18
- s as BankAccountFormProvider,
19
- d as useBankAccountForm
19
+ F as BankAccountFormProvider,
20
+ s as useBankAccountForm
20
21
  };
21
22
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport { type OnEventType } from '@/components/Base/useBase'\nimport { type EventType } from '@/shared/constants'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n isEditing: boolean\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport { type OnEventType } from '@/components/Base/useBase'\nimport { type EventType } from '@/shared/constants'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n isEditing: boolean\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
@@ -9,15 +9,16 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
16
- const [d, f] = t(
17
+ const [f, v] = t(
17
18
  "CompanyDocumentListContext"
18
19
  );
19
20
  export {
20
- f as DocumentListProvider,
21
- d as useDocumentList
21
+ v as DocumentListProvider,
22
+ f as useDocumentList
22
23
  };
23
24
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -1,5 +1,5 @@
1
1
  import { z as o } from "zod";
2
- import { FilingForm as r, TaxPayerType as e } from "@gusto/embedded-api/models/components/federaltaxdetails";
2
+ import { FilingForm as r, TaxPayerType as t } from "@gusto/embedded-api/models/components/federaltaxdetails";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-error-boundary";
@@ -11,21 +11,22 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
11
11
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
12
12
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
13
13
  import "@gusto/embedded-api/models/errors/httpclienterrors";
14
+ import "dompurify";
15
+ import "../../../contexts/LocaleProvider/useLocale.js";
14
16
  import "../../../shared/constants.js";
15
17
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
- import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const b = o.object({
18
+ import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
19
+ const j = o.object({
19
20
  federalEin: o.string().optional(),
20
- taxPayerType: o.enum(Object.values(e)).optional(),
21
+ taxPayerType: o.enum(Object.values(t)).optional(),
21
22
  filingForm: o.enum(Object.values(r)).optional(),
22
23
  legalName: o.string().min(1)
23
- }), [j, v] = t(
24
+ }), [v, P] = e(
24
25
  "CompanyFederalTaxesContext"
25
26
  );
26
27
  export {
27
- b as FederalTaxFormSchema,
28
- v as FederalTaxesProvider,
29
- j as useFederalTaxes
28
+ j as FederalTaxFormSchema,
29
+ P as FederalTaxesProvider,
30
+ v as useFederalTaxes
30
31
  };
31
32
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -9,19 +9,20 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../shared/constants.js";
13
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [P, f] = t("IndustryItems", {
17
+ const [f, v] = t("IndustryItems", {
17
18
  items: []
18
- }), [v, x] = t("IndustryApi", {
19
+ }), [x, C] = t("IndustryApi", {
19
20
  isPending: !1
20
21
  });
21
22
  export {
22
- x as IndustryApiStateProvider,
23
- f as IndustryItemsProvider,
24
- v as useIndustryApiState,
25
- P as useIndustryItems
23
+ C as IndustryApiStateProvider,
24
+ v as IndustryItemsProvider,
25
+ x as useIndustryApiState,
26
+ f as useIndustryItems
26
27
  };
27
28
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -9,15 +9,16 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [L, f] = o(
17
+ const [f, v] = o(
17
18
  "CompanyDocumentFormContext"
18
19
  );
19
20
  export {
20
- f as LocationsFormProvider,
21
- L as useLocationsForm
21
+ v as LocationsFormProvider,
22
+ f as useLocationsForm
22
23
  };
23
24
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -9,15 +9,16 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [f, v] = o(
17
+ const [v, y] = o(
17
18
  "CompanyDocumentListContext"
18
19
  );
19
20
  export {
20
- v as LocationsListProvider,
21
- f as useLocationsList
21
+ y as LocationsListProvider,
22
+ v as useLocationsList
22
23
  };
23
24
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n isFetching?: boolean\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n isFetching?: boolean\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -9,13 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../shared/constants.js";
13
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [C, c] = o("OnboardingOverviewContext");
17
+ const [c, s] = o("OnboardingOverviewContext");
17
18
  export {
18
- c as OnboardingOverviewProvider,
19
- C as useOnboardingOverview
19
+ s as OnboardingOverviewProvider,
20
+ c as useOnboardingOverview
20
21
  };
21
22
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -0,0 +1,70 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { z as a } from "zod";
3
+ import { useForm as f, FormProvider as P } from "react-hook-form";
4
+ import { zodResolver as b } from "@hookform/resolvers/zod";
5
+ import { useTranslation as C } from "react-i18next";
6
+ import { scheduleLabel as g } from "./scheduleLabel.js";
7
+ import { Flex as m } from "../../../../Common/Flex/Flex.js";
8
+ import { ActionsLayout as v } from "../../../../Common/ActionsLayout/ActionsLayout.js";
9
+ import { Form as x } from "../../../../Common/Form/Form.js";
10
+ import { useComponentContext as U } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { SelectField as c } from "../../../../Common/Fields/SelectField/SelectField.js";
12
+ const D = a.object({
13
+ hourlyPayScheduleUuid: a.string().min(1),
14
+ salariedPayScheduleUuid: a.string().min(1)
15
+ });
16
+ function V({
17
+ schedules: i,
18
+ hourlyPayScheduleUuid: u,
19
+ salariedPayScheduleUuid: s,
20
+ onBack: p,
21
+ onAddPaySchedule: h,
22
+ onContinue: S
23
+ }) {
24
+ const { t: o } = C("Company.Management.PayScheduleAssignment"), n = U(), r = f({
25
+ resolver: b(D),
26
+ defaultValues: {
27
+ hourlyPayScheduleUuid: u ?? i[0]?.uuid ?? "",
28
+ salariedPayScheduleUuid: s ?? i[0]?.uuid ?? ""
29
+ }
30
+ }), y = r.handleSubmit(S), l = i.map((d) => ({
31
+ value: d.uuid,
32
+ label: g(d)
33
+ }));
34
+ return /* @__PURE__ */ e(P, { ...r, children: /* @__PURE__ */ e(x, { onSubmit: () => {
35
+ y();
36
+ }, children: /* @__PURE__ */ t(m, { flexDirection: "column", gap: 32, children: [
37
+ /* @__PURE__ */ e(n.Heading, { as: "h2", children: o("compensationStep.heading") }),
38
+ /* @__PURE__ */ t(m, { flexDirection: "column", gap: 12, children: [
39
+ /* @__PURE__ */ e(
40
+ c,
41
+ {
42
+ name: "hourlyPayScheduleUuid",
43
+ label: o("compensationStep.hourlyPayScheduleLabel"),
44
+ description: o("compensationStep.hourlyPayScheduleDescription"),
45
+ placeholder: "",
46
+ options: l
47
+ }
48
+ ),
49
+ /* @__PURE__ */ e(
50
+ c,
51
+ {
52
+ name: "salariedPayScheduleUuid",
53
+ label: o("compensationStep.salariedPayScheduleLabel"),
54
+ description: o("compensationStep.salariedPayScheduleDescription"),
55
+ placeholder: "",
56
+ options: l
57
+ }
58
+ ),
59
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: h, children: o("compensationStep.addPayScheduleCta") }) })
60
+ ] }),
61
+ /* @__PURE__ */ t(v, { children: [
62
+ /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: p, children: o("backCta") }),
63
+ /* @__PURE__ */ e(n.Button, { variant: "primary", type: "submit", isDisabled: i.length === 0, children: o("continueCta") })
64
+ ] })
65
+ ] }) }) });
66
+ }
67
+ export {
68
+ V as AssignmentCompensationStepPresentation
69
+ };
70
+ //# sourceMappingURL=AssignmentCompensationStepPresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignmentCompensationStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport { scheduleLabel } from './scheduleLabel'\nimport { Flex, SelectField, ActionsLayout } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport interface AssignmentCompensationStepPresentationProps {\n schedules: PayScheduleShow[]\n hourlyPayScheduleUuid?: string\n salariedPayScheduleUuid?: string\n onBack: () => void\n onAddPaySchedule: () => void\n onContinue: (selection: {\n hourlyPayScheduleUuid: string\n salariedPayScheduleUuid: string\n }) => void\n}\n\nconst CompensationStepSchema = z.object({\n hourlyPayScheduleUuid: z.string().min(1),\n salariedPayScheduleUuid: z.string().min(1),\n})\n\ntype CompensationStepInputs = z.infer<typeof CompensationStepSchema>\n\n/** @internal */\nexport function AssignmentCompensationStepPresentation({\n schedules,\n hourlyPayScheduleUuid,\n salariedPayScheduleUuid,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentCompensationStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n\n const formMethods = useForm<CompensationStepInputs>({\n resolver: zodResolver(CompensationStepSchema),\n defaultValues: {\n hourlyPayScheduleUuid: hourlyPayScheduleUuid ?? schedules[0]?.uuid ?? '',\n salariedPayScheduleUuid: salariedPayScheduleUuid ?? schedules[0]?.uuid ?? '',\n },\n })\n\n const handleSubmit = formMethods.handleSubmit(onContinue)\n\n const options = schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('compensationStep.heading')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={12}>\n <SelectField\n name=\"hourlyPayScheduleUuid\"\n label={t('compensationStep.hourlyPayScheduleLabel')}\n description={t('compensationStep.hourlyPayScheduleDescription')}\n placeholder=\"\"\n options={options}\n />\n <SelectField\n name=\"salariedPayScheduleUuid\"\n label={t('compensationStep.salariedPayScheduleLabel')}\n description={t('compensationStep.salariedPayScheduleDescription')}\n placeholder=\"\"\n options={options}\n />\n <div>\n <Components.Button variant=\"secondary\" onClick={onAddPaySchedule}>\n {t('compensationStep.addPayScheduleCta')}\n </Components.Button>\n </div>\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={onBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={schedules.length === 0}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["CompensationStepSchema","z","AssignmentCompensationStepPresentation","schedules","hourlyPayScheduleUuid","salariedPayScheduleUuid","onBack","onAddPaySchedule","onContinue","t","useTranslation","Components","useComponentContext","formMethods","useForm","zodResolver","handleSubmit","options","schedule","scheduleLabel","FormProvider","jsx","Form","jsxs","Flex","SelectField","ActionsLayout"],"mappings":";;;;;;;;;;;AAuBA,MAAMA,IAAyBC,EAAE,OAAO;AAAA,EACtC,uBAAuBA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvC,yBAAyBA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC3C,CAAC;AAKM,SAASC,EAAuC;AAAA,EACrD,WAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC;AACF,GAAgD;AAC9C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0CAA0C,GACjEC,IAAaC,EAAA,GAEbC,IAAcC,EAAgC;AAAA,IAClD,UAAUC,EAAYf,CAAsB;AAAA,IAC5C,eAAe;AAAA,MACb,uBAAuBI,KAAyBD,EAAU,CAAC,GAAG,QAAQ;AAAA,MACtE,yBAAyBE,KAA2BF,EAAU,CAAC,GAAG,QAAQ;AAAA,IAAA;AAAA,EAC5E,CACD,GAEKa,IAAeH,EAAY,aAAaL,CAAU,GAElDS,IAAUd,EAAU,IAAI,CAAAe,OAAa;AAAA,IACzC,OAAOA,EAAS;AAAA,IAChB,OAAOC,EAAcD,CAAQ;AAAA,EAAA,EAC7B;AAEF,2BACGE,GAAA,EAAc,GAAGP,GAChB,UAAA,gBAAAQ,EAACC,KAAK,UAAU,MAAA;AAAM,IAAKN;KACzB,UAAA,gBAAAO,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAH,EAACV,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,0BAA0B,GAAE;AAAA,IAC3D,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOhB,EAAE,yCAAyC;AAAA,UAClD,aAAaA,EAAE,+CAA+C;AAAA,UAC9D,aAAY;AAAA,UACZ,SAAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,MAEF,gBAAAI;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOhB,EAAE,2CAA2C;AAAA,UACpD,aAAaA,EAAE,iDAAiD;AAAA,UAChE,aAAY;AAAA,UACZ,SAAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,MAEF,gBAAAI,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACV,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASJ,GAC7C,UAAAE,EAAE,oCAAoC,GACzC,EAAA,CACF;AAAA,IAAA,GACF;AAAA,sBACCiB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAL,EAACV,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASL,GAC7C,UAAAG,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAY,EAACV,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYR,EAAU,WAAW,GACjF,UAAAM,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -1,59 +1,57 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { z as l } from "zod";
3
- import { useForm as h, FormProvider as f } from "react-hook-form";
4
- import { zodResolver as S } from "@hookform/resolvers/zod";
2
+ import { z as a } from "zod";
3
+ import { useForm as h, FormProvider as S } from "react-hook-form";
4
+ import { zodResolver as f } from "@hookform/resolvers/zod";
5
5
  import { useTranslation as y } from "react-i18next";
6
+ import { scheduleLabel as b } from "./scheduleLabel.js";
6
7
  import { Flex as d } from "../../../../Common/Flex/Flex.js";
7
- import { ActionsLayout as b } from "../../../../Common/ActionsLayout/ActionsLayout.js";
8
- import { Form as g } from "../../../../Common/Form/Form.js";
9
- import { useComponentContext as v } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { SelectField as C } from "../../../../Common/Fields/SelectField/SelectField.js";
11
- const P = l.object({
12
- defaultPayScheduleUuid: l.string().min(1)
8
+ import { ActionsLayout as g } from "../../../../Common/ActionsLayout/ActionsLayout.js";
9
+ import { Form as v } from "../../../../Common/Form/Form.js";
10
+ import { useComponentContext as C } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { SelectField as P } from "../../../../Common/Fields/SelectField/SelectField.js";
12
+ const x = a.object({
13
+ defaultPayScheduleUuid: a.string().min(1)
13
14
  });
14
- function x(t) {
15
- return [t.customName, t.frequency].filter(Boolean).join(" — ");
16
- }
17
- function q({
18
- schedules: t,
15
+ function R({
16
+ schedules: n,
19
17
  defaultPayScheduleUuid: c,
20
- onBack: u,
21
- onAddPaySchedule: m,
18
+ onBack: m,
19
+ onAddPaySchedule: u,
22
20
  onContinue: s
23
21
  }) {
24
- const { t: o } = y("Company.Management.PayScheduleAssignment"), n = v(), a = h({
25
- resolver: S(P),
26
- defaultValues: { defaultPayScheduleUuid: c ?? t[0]?.uuid ?? "" }
27
- }), p = a.handleSubmit(({ defaultPayScheduleUuid: i }) => {
22
+ const { t } = y("Company.Management.PayScheduleAssignment"), o = C(), l = h({
23
+ resolver: f(x),
24
+ defaultValues: { defaultPayScheduleUuid: c ?? n[0]?.uuid ?? "" }
25
+ }), p = l.handleSubmit(({ defaultPayScheduleUuid: i }) => {
28
26
  s(i);
29
27
  });
30
- return /* @__PURE__ */ e(f, { ...a, children: /* @__PURE__ */ e(g, { onSubmit: () => {
28
+ return /* @__PURE__ */ e(S, { ...l, children: /* @__PURE__ */ e(v, { onSubmit: () => {
31
29
  p();
32
30
  }, children: /* @__PURE__ */ r(d, { flexDirection: "column", gap: 32, children: [
33
- /* @__PURE__ */ e(n.Heading, { as: "h2", children: o("scheduleStep.heading") }),
31
+ /* @__PURE__ */ e(o.Heading, { as: "h2", children: t("scheduleStep.heading") }),
34
32
  /* @__PURE__ */ r(d, { flexDirection: "column", gap: 12, children: [
35
33
  /* @__PURE__ */ e(
36
- C,
34
+ P,
37
35
  {
38
36
  name: "defaultPayScheduleUuid",
39
- label: o("scheduleStep.payScheduleLabel"),
40
- description: o("scheduleStep.payScheduleDescription"),
37
+ label: t("scheduleStep.payScheduleLabel"),
38
+ description: t("scheduleStep.payScheduleDescription"),
41
39
  placeholder: "",
42
- options: t.map((i) => ({
40
+ options: n.map((i) => ({
43
41
  value: i.uuid,
44
- label: x(i)
42
+ label: b(i)
45
43
  }))
46
44
  }
47
45
  ),
48
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: m, children: o("scheduleStep.addPayScheduleCta") }) })
46
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(o.Button, { variant: "secondary", onClick: u, children: t("scheduleStep.addPayScheduleCta") }) })
49
47
  ] }),
50
- /* @__PURE__ */ r(b, { children: [
51
- /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: u, children: o("backCta") }),
52
- /* @__PURE__ */ e(n.Button, { variant: "primary", type: "submit", isDisabled: t.length === 0, children: o("continueCta") })
48
+ /* @__PURE__ */ r(g, { children: [
49
+ /* @__PURE__ */ e(o.Button, { variant: "secondary", onClick: m, children: t("backCta") }),
50
+ /* @__PURE__ */ e(o.Button, { variant: "primary", type: "submit", isDisabled: n.length === 0, children: t("continueCta") })
53
51
  ] })
54
52
  ] }) }) });
55
53
  }
56
54
  export {
57
- q as AssignmentScheduleStepPresentation
55
+ R as AssignmentScheduleStepPresentation
58
56
  };
59
57
  //# sourceMappingURL=AssignmentScheduleStepPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignmentScheduleStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport { Flex, SelectField, ActionsLayout } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport interface AssignmentScheduleStepPresentationProps {\n schedules: PayScheduleShow[]\n defaultPayScheduleUuid?: string\n onBack: () => void\n onAddPaySchedule: () => void\n onContinue: (defaultPayScheduleUuid: string) => void\n}\n\nconst ScheduleStepSchema = z.object({\n defaultPayScheduleUuid: z.string().min(1),\n})\n\ntype ScheduleStepInputs = z.infer<typeof ScheduleStepSchema>\n\nfunction scheduleLabel(schedule: PayScheduleShow): string {\n return [schedule.customName, schedule.frequency].filter(Boolean).join(' — ')\n}\n\n/** @internal */\nexport function AssignmentScheduleStepPresentation({\n schedules,\n defaultPayScheduleUuid,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentScheduleStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n\n const formMethods = useForm<ScheduleStepInputs>({\n resolver: zodResolver(ScheduleStepSchema),\n defaultValues: { defaultPayScheduleUuid: defaultPayScheduleUuid ?? schedules[0]?.uuid ?? '' },\n })\n\n const handleSubmit = formMethods.handleSubmit(({ defaultPayScheduleUuid: uuid }) => {\n onContinue(uuid)\n })\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('scheduleStep.heading')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={12}>\n <SelectField\n name=\"defaultPayScheduleUuid\"\n label={t('scheduleStep.payScheduleLabel')}\n description={t('scheduleStep.payScheduleDescription')}\n placeholder=\"\"\n options={schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))}\n />\n <div>\n <Components.Button variant=\"secondary\" onClick={onAddPaySchedule}>\n {t('scheduleStep.addPayScheduleCta')}\n </Components.Button>\n </div>\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={onBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={schedules.length === 0}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["ScheduleStepSchema","z","scheduleLabel","schedule","AssignmentScheduleStepPresentation","schedules","defaultPayScheduleUuid","onBack","onAddPaySchedule","onContinue","t","useTranslation","Components","useComponentContext","formMethods","useForm","zodResolver","handleSubmit","uuid","FormProvider","jsx","Form","jsxs","Flex","SelectField","ActionsLayout"],"mappings":";;;;;;;;;;AAkBA,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EAClC,wBAAwBA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC1C,CAAC;AAID,SAASC,EAAcC,GAAmC;AACxD,SAAO,CAACA,EAAS,YAAYA,EAAS,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,KAAK;AAC7E;AAGO,SAASC,EAAmC;AAAA,EACjD,WAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0CAA0C,GACjEC,IAAaC,EAAA,GAEbC,IAAcC,EAA4B;AAAA,IAC9C,UAAUC,EAAYhB,CAAkB;AAAA,IACxC,eAAe,EAAE,wBAAwBM,KAA0BD,EAAU,CAAC,GAAG,QAAQ,GAAA;AAAA,EAAG,CAC7F,GAEKY,IAAeH,EAAY,aAAa,CAAC,EAAE,wBAAwBI,QAAW;AAClF,IAAAT,EAAWS,CAAI;AAAA,EACjB,CAAC;AAED,2BACGC,GAAA,EAAc,GAAGL,GAChB,UAAA,gBAAAM,EAACC,KAAK,UAAU,MAAA;AAAM,IAAKJ;KACzB,UAAA,gBAAAK,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAH,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,sBAAsB,GAAE;AAAA,IACvD,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOd,EAAE,+BAA+B;AAAA,UACxC,aAAaA,EAAE,qCAAqC;AAAA,UACpD,aAAY;AAAA,UACZ,SAASL,EAAU,IAAI,CAAAF,OAAa;AAAA,YAClC,OAAOA,EAAS;AAAA,YAChB,OAAOD,EAAcC,CAAQ;AAAA,UAAA,EAC7B;AAAA,QAAA;AAAA,MAAA;AAAA,MAEJ,gBAAAiB,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASJ,GAC7C,UAAAE,EAAE,gCAAgC,GACrC,EAAA,CACF;AAAA,IAAA,GACF;AAAA,sBACCe,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAL,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASL,GAC7C,UAAAG,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAU,EAACR,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYP,EAAU,WAAW,GACjF,UAAAK,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"AssignmentScheduleStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport { scheduleLabel } from './scheduleLabel'\nimport { Flex, SelectField, ActionsLayout } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport interface AssignmentScheduleStepPresentationProps {\n schedules: PayScheduleShow[]\n defaultPayScheduleUuid?: string\n onBack: () => void\n onAddPaySchedule: () => void\n onContinue: (defaultPayScheduleUuid: string) => void\n}\n\nconst ScheduleStepSchema = z.object({\n defaultPayScheduleUuid: z.string().min(1),\n})\n\ntype ScheduleStepInputs = z.infer<typeof ScheduleStepSchema>\n\n/** @internal */\nexport function AssignmentScheduleStepPresentation({\n schedules,\n defaultPayScheduleUuid,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentScheduleStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n\n const formMethods = useForm<ScheduleStepInputs>({\n resolver: zodResolver(ScheduleStepSchema),\n defaultValues: { defaultPayScheduleUuid: defaultPayScheduleUuid ?? schedules[0]?.uuid ?? '' },\n })\n\n const handleSubmit = formMethods.handleSubmit(({ defaultPayScheduleUuid: uuid }) => {\n onContinue(uuid)\n })\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('scheduleStep.heading')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={12}>\n <SelectField\n name=\"defaultPayScheduleUuid\"\n label={t('scheduleStep.payScheduleLabel')}\n description={t('scheduleStep.payScheduleDescription')}\n placeholder=\"\"\n options={schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))}\n />\n <div>\n <Components.Button variant=\"secondary\" onClick={onAddPaySchedule}>\n {t('scheduleStep.addPayScheduleCta')}\n </Components.Button>\n </div>\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={onBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={schedules.length === 0}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["ScheduleStepSchema","z","AssignmentScheduleStepPresentation","schedules","defaultPayScheduleUuid","onBack","onAddPaySchedule","onContinue","useTranslation","Components","useComponentContext","formMethods","useForm","zodResolver","handleSubmit","uuid","FormProvider","jsx","Form","jsxs","Flex","SelectField","schedule","scheduleLabel","ActionsLayout"],"mappings":";;;;;;;;;;;AAmBA,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EAClC,wBAAwBA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC1C,CAAC;AAKM,SAASC,EAAmC;AAAA,EACjD,WAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,EAAA,IAAMC,EAAe,0CAA0C,GACjEC,IAAaC,EAAA,GAEbC,IAAcC,EAA4B;AAAA,IAC9C,UAAUC,EAAYb,CAAkB;AAAA,IACxC,eAAe,EAAE,wBAAwBI,KAA0BD,EAAU,CAAC,GAAG,QAAQ,GAAA;AAAA,EAAG,CAC7F,GAEKW,IAAeH,EAAY,aAAa,CAAC,EAAE,wBAAwBI,QAAW;AAClF,IAAAR,EAAWQ,CAAI;AAAA,EACjB,CAAC;AAED,2BACGC,GAAA,EAAc,GAAGL,GAChB,UAAA,gBAAAM,EAACC,KAAK,UAAU,MAAA;AAAM,IAAKJ;KACzB,UAAA,gBAAAK,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAH,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,sBAAsB,GAAE;AAAA,IACvD,gBAAAU,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAO,EAAE,+BAA+B;AAAA,UACxC,aAAa,EAAE,qCAAqC;AAAA,UACpD,aAAY;AAAA,UACZ,SAASlB,EAAU,IAAI,CAAAmB,OAAa;AAAA,YAClC,OAAOA,EAAS;AAAA,YAChB,OAAOC,EAAcD,CAAQ;AAAA,UAAA,EAC7B;AAAA,QAAA;AAAA,MAAA;AAAA,MAEJ,gBAAAL,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,gCAAgC,GACrC,EAAA,CACF;AAAA,IAAA,GACF;AAAA,sBACCkB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAP,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASJ,GAC7C,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAY,EAACR,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYN,EAAU,WAAW,GACjF,UAAA,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}