@gusto/embedded-react-sdk 0.56.2 → 0.56.3
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.
- package/CHANGELOG.md +25 -0
- package/dist/components/Common/FieldCaption/FieldCaption.js +18 -24
- package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js +3 -5
- package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.js +66 -62
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +9 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +6 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PaySchedule.js +60 -0
- package/dist/components/Company/PaySchedule/management/PaySchedule.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentReviewStepPresentation.js +67 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentReviewStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +59 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +57 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +46 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +101 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +81 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/stripNullAssignmentPreviewFields.js +18 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/stripNullAssignmentPreviewFields.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js +56 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +34 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js +77 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.module.scss.js +10 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.module.scss.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js +66 -0
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +75 -57
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +6 -3
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/requirementSetError.js +15 -0
- package/dist/components/Company/StateTaxes/shared/requirementSetError.js.map +1 -0
- package/dist/components/Company/exports/companyManagement.js +7 -0
- package/dist/components/Company/exports/companyManagement.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +6 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +28 -27
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +51 -58
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +12 -7
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +87 -85
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +55 -54
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +66 -62
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +129 -125
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +30 -27
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js +41 -30
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +159 -152
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +61 -59
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +32 -31
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +16 -16
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +61 -61
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +192 -193
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +27 -22
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +55 -53
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -41
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.js +72 -67
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +37 -25
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +23 -22
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/informationRequestEnumHook.js +30 -0
- package/dist/contexts/ApiProvider/informationRequestEnumHook.js.map +1 -0
- package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -1
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +9 -8
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/i18n/I18n.js +2 -0
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.Management.PaySchedule.json.js +24 -0
- package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -0
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +18 -0
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -0
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +12 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
- package/dist/i18n/en/common.json.js +36 -38
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.js +137 -135
- package/dist/index.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/dist/shared/constants.js +39 -31
- package/dist/shared/constants.js.map +1 -1
- package/dist/src/components/Company/PaySchedule/management/PaySchedule.d.ts +24 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentReviewStepPresentation.d.ts +10 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.d.ts +11 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +9 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +35 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +29 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/index.d.ts +1 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.d.ts +7 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/stripNullAssignmentPreviewFields.d.ts +12 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +9 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleManagementComponents.d.ts +20 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleOverview.d.ts +11 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.d.ts +18 -0
- package/dist/src/components/Company/PaySchedule/management/index.d.ts +1 -0
- package/dist/src/components/Company/PaySchedule/management/payScheduleManagementStateMachine.d.ts +12 -0
- package/dist/src/components/Company/StateTaxes/shared/requirementSetError.d.ts +18 -0
- package/dist/src/components/Company/StateTaxes/shared/requirementSetError.test.d.ts +1 -0
- package/dist/src/components/Company/exports/companyManagement.d.ts +2 -0
- package/dist/src/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +12 -0
- package/dist/src/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +6 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.d.ts +2 -2
- package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +6 -1
- package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +7 -1
- package/dist/src/components/Payroll/helpers.d.ts +34 -0
- package/dist/src/components/Payroll/usePreparedPayrollData.d.ts +6 -1
- package/dist/src/components/index.d.ts +12 -0
- package/dist/src/contexts/ApiProvider/informationRequestEnumHook.d.ts +14 -0
- package/dist/src/contexts/ApiProvider/informationRequestEnumHook.test.d.ts +1 -0
- package/dist/src/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +2 -0
- package/dist/src/helpers/dateFormatting.d.ts +2 -2
- package/dist/src/helpers/formattedStrings.d.ts +15 -0
- package/dist/src/i18n/en/common.json.d.ts +0 -1
- package/dist/src/i18n/types.d.ts +96 -6
- package/dist/src/models/external.d.ts +12 -0
- package/dist/src/shared/constants.d.ts +16 -0
- package/dist/style.css +1 -1
- package/dist/types/sdkError.js +32 -21
- package/dist/types/sdkError.js.map +1 -1
- package/docs/guides/endpoint-inventory.json +59 -10
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.56.3](https://github.com/Gusto/embedded-react-sdk/compare/v0.56.2...v0.56.3) (2026-10-01)
|
|
4
|
+
|
|
5
|
+
### Features & Enhancements
|
|
6
|
+
|
|
7
|
+
- Mark required form fields with an asterisk (`*`) instead of appending an `(optional)` suffix to non-required fields. The asterisk is CSS-generated, so each field's accessible name is unchanged ([#2770](https://github.com/Gusto/embedded-react-sdk/issues/2770))
|
|
8
|
+
- Add the alpha `CompanyManagement.PaySchedule` component with `PayScheduleOverview`, surfacing a company's pay schedule name, frequency, and AutoPilot status. Gated behind the `managePaySchedules` unstable feature flag ([#2746](https://github.com/Gusto/embedded-react-sdk/issues/2746))
|
|
9
|
+
- Add the alpha `CompanyManagement.PayScheduleAssignment`, a standalone flow for assigning a single pay schedule (type selector, schedule picker with inline creation, and a review-and-submit step) that can be mounted directly or launched from `PayScheduleOverview` ([#2762](https://github.com/Gusto/embedded-react-sdk/issues/2762))
|
|
10
|
+
|
|
11
|
+
### Fixes
|
|
12
|
+
|
|
13
|
+
- Update the bundled `@gusto/embedded-api` client to stable `0.3.1` ([#2863](https://github.com/Gusto/embedded-react-sdk/issues/2863))
|
|
14
|
+
- Handle Gusto-created tax reconciliation payrolls, which have no pay period and previously crashed `PayrollOverview` and left blank dates in `PayrollHistory` ([#2859](https://github.com/Gusto/embedded-react-sdk/issues/2859))
|
|
15
|
+
- Prepare transition payrolls without sending an employee roster, which the API rejects for a transition payroll ([#2850](https://github.com/Gusto/embedded-react-sdk/issues/2850))
|
|
16
|
+
- Disable transition payroll actions while a payroll blocker exists ([#2848](https://github.com/Gusto/embedded-react-sdk/issues/2848))
|
|
17
|
+
- Strip leading zeros from payroll number inputs ([#2831](https://github.com/Gusto/embedded-react-sdk/issues/2831))
|
|
18
|
+
- Stop the RFI payroll-blocker screen from crashing on unauthorized or unknown data ([#2833](https://github.com/Gusto/embedded-react-sdk/issues/2833))
|
|
19
|
+
- Fix the Calculate button loading state in the gross-up modal ([#2718](https://github.com/Gusto/embedded-react-sdk/issues/2718))
|
|
20
|
+
- Hide pagination page-size options that would render identically to a smaller one ([#2856](https://github.com/Gusto/embedded-react-sdk/issues/2856))
|
|
21
|
+
- Show a friendly message for incomplete state tax requirement sets ([#2829](https://github.com/Gusto/embedded-react-sdk/issues/2829))
|
|
22
|
+
|
|
23
|
+
### Chores & Maintenance
|
|
24
|
+
|
|
25
|
+
- Bump dev dependencies (`typescript-eslint`, `dotenv`)
|
|
26
|
+
- Apply grouped Dependabot security updates ([#2837](https://github.com/Gusto/embedded-react-sdk/issues/2837), [#2838](https://github.com/Gusto/embedded-react-sdk/issues/2838))
|
|
27
|
+
|
|
3
28
|
## [0.56.2](https://github.com/Gusto/embedded-react-sdk/compare/v0.56.1...v0.56.2) (2026-09-25)
|
|
4
29
|
|
|
5
30
|
### Fixes
|
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const u = ({
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import s from "classnames";
|
|
3
|
+
import a from "./FieldCaption.module.scss.js";
|
|
4
|
+
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { VisuallyHidden as d } from "../VisuallyHidden/VisuallyHidden.js";
|
|
6
|
+
const c = ({
|
|
8
7
|
children: t,
|
|
9
8
|
as: o = "label",
|
|
10
9
|
htmlFor: i,
|
|
11
|
-
isRequired:
|
|
12
|
-
isVisuallyHidden:
|
|
13
|
-
className:
|
|
10
|
+
isRequired: r = !1,
|
|
11
|
+
isVisuallyHidden: l = !1,
|
|
12
|
+
className: m
|
|
14
13
|
}) => {
|
|
15
|
-
const
|
|
14
|
+
const n = /* @__PURE__ */ e(
|
|
16
15
|
o,
|
|
17
16
|
{
|
|
18
|
-
className:
|
|
17
|
+
className: s(a.root, m),
|
|
19
18
|
htmlFor: o === "label" ? i : void 0,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
!a && /* @__PURE__ */ l("span", { className: s.optionalLabel, children: [
|
|
23
|
-
" ",
|
|
24
|
-
p("optionalLabel")
|
|
25
|
-
] })
|
|
26
|
-
]
|
|
19
|
+
"data-required": r || void 0,
|
|
20
|
+
children: t
|
|
27
21
|
}
|
|
28
22
|
);
|
|
29
|
-
return
|
|
30
|
-
},
|
|
31
|
-
const o =
|
|
32
|
-
return o.FieldCaption ? /* @__PURE__ */
|
|
23
|
+
return l ? /* @__PURE__ */ e(d, { children: n }) : n;
|
|
24
|
+
}, h = (t) => {
|
|
25
|
+
const o = p();
|
|
26
|
+
return o.FieldCaption ? /* @__PURE__ */ e(o.FieldCaption, { ...t }) : /* @__PURE__ */ e(c, { ...t });
|
|
33
27
|
};
|
|
34
28
|
export {
|
|
35
|
-
|
|
29
|
+
h as FieldCaption
|
|
36
30
|
};
|
|
37
31
|
//# sourceMappingURL=FieldCaption.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldCaption.js","sources":["../../../../src/components/Common/FieldCaption/FieldCaption.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"FieldCaption.js","sources":["../../../../src/components/Common/FieldCaption/FieldCaption.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport type { FieldCaptionProps } from './FieldCaptionTypes'\nimport styles from './FieldCaption.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst DefaultFieldCaption = ({\n children,\n as = 'label',\n htmlFor,\n isRequired = false,\n isVisuallyHidden = false,\n className,\n}: FieldCaptionProps) => {\n const Component = as\n\n const content = (\n <Component\n className={classNames(styles.root, className)}\n htmlFor={as === 'label' ? htmlFor : undefined}\n data-required={isRequired || undefined}\n >\n {children}\n </Component>\n )\n\n return isVisuallyHidden ? <VisuallyHidden>{content}</VisuallyHidden> : content\n}\n\n/** @internal */\nexport const FieldCaption = (props: FieldCaptionProps) => {\n const Components = useComponentContext()\n\n return Components.FieldCaption ? (\n <Components.FieldCaption {...props} />\n ) : (\n <DefaultFieldCaption {...props} />\n )\n}\n"],"names":["DefaultFieldCaption","children","as","htmlFor","isRequired","isVisuallyHidden","className","content","jsx","classNames","styles","VisuallyHidden","FieldCaption","props","Components","useComponentContext"],"mappings":";;;;;AAMA,MAAMA,IAAsB,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,kBAAAC,IAAmB;AAAA,EACnB,WAAAC;AACF,MAAyB;AAGvB,QAAMC,IACJ,gBAAAC;AAAA,IAHgBN;AAAA,IAGf;AAAA,MACC,WAAWO,EAAWC,EAAO,MAAMJ,CAAS;AAAA,MAC5C,SAASJ,MAAO,UAAUC,IAAU;AAAA,MACpC,iBAAeC,KAAc;AAAA,MAE5B,UAAAH;AAAA,IAAA;AAAA,EAAA;AAIL,SAAOI,IAAmB,gBAAAG,EAACG,GAAA,EAAgB,UAAAJ,EAAA,CAAQ,IAAoBA;AACzE,GAGaK,IAAe,CAACC,MAA6B;AACxD,QAAMC,IAAaC,EAAA;AAEnB,SAAOD,EAAW,eAChB,gBAAAN,EAACM,EAAW,cAAX,EAAyB,GAAGD,EAAA,CAAO,IAEpC,gBAAAL,EAACR,GAAA,EAAqB,GAAGa,EAAA,CAAO;AAEpC;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
root: o
|
|
3
|
-
optionalLabel: t
|
|
1
|
+
const o = "_root_15825_2", t = {
|
|
2
|
+
root: o
|
|
4
3
|
};
|
|
5
4
|
export {
|
|
6
|
-
|
|
7
|
-
t as optionalLabel,
|
|
5
|
+
t as default,
|
|
8
6
|
o as root
|
|
9
7
|
};
|
|
10
8
|
//# sourceMappingURL=FieldCaption.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldCaption.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldCaption.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,90 +1,94 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { Flex as
|
|
4
|
-
import
|
|
5
|
-
import { useComponentContext as
|
|
6
|
-
import
|
|
1
|
+
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as v } from "react-i18next";
|
|
3
|
+
import { Flex as C } from "../Flex/Flex.js";
|
|
4
|
+
import d from "./PaginationControl.module.scss.js";
|
|
5
|
+
import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import S from "../../../assets/icons/pagination_first.svg.js";
|
|
7
7
|
import I from "../../../assets/icons/pagination_previous.svg.js";
|
|
8
|
-
import
|
|
8
|
+
import P from "../../../assets/icons/pagination_next.svg.js";
|
|
9
9
|
import x from "../../../assets/icons/pagination_last.svg.js";
|
|
10
|
-
import { InlineSpinner as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
import { InlineSpinner as N } from "../InlineSpinner/InlineSpinner.js";
|
|
11
|
+
const L = 5, c = [5, 10, 25, 50], B = (n) => n === void 0 ? !0 : n === 0 ? !1 : n > L, D = (n, o) => {
|
|
12
|
+
if (n === void 0) return c;
|
|
13
|
+
const e = c.find((t) => t >= n), r = new Set(
|
|
14
|
+
c.filter((t) => t < n)
|
|
15
|
+
);
|
|
16
|
+
return r.add(o), e !== void 0 && r.add(e), c.filter((t) => r.has(t));
|
|
17
|
+
}, E = ({
|
|
18
|
+
currentPage: n,
|
|
19
|
+
totalPages: o,
|
|
20
|
+
totalCount: e,
|
|
21
|
+
isFetching: r,
|
|
22
|
+
handleFirstPage: t,
|
|
23
|
+
handlePreviousPage: u,
|
|
24
|
+
handleNextPage: f,
|
|
25
|
+
handleLastPage: b,
|
|
26
|
+
handleItemsPerPageChange: h,
|
|
27
|
+
itemsPerPage: m = 5
|
|
22
28
|
}) => {
|
|
23
|
-
const { t:
|
|
24
|
-
return
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
29
|
+
const { t: a } = v("common"), l = g();
|
|
30
|
+
return B(e) ? /* @__PURE__ */ i("section", { className: d.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ p(C, { justifyContent: "space-between", alignItems: "center", children: [
|
|
31
|
+
/* @__PURE__ */ i("div", { className: d.paginationControlCount, children: /* @__PURE__ */ i("section", { children: /* @__PURE__ */ i(
|
|
32
|
+
l.Select,
|
|
27
33
|
{
|
|
28
|
-
label:
|
|
34
|
+
label: a("labels.paginationControlCountLabel"),
|
|
29
35
|
placeholder: "",
|
|
30
36
|
shouldVisuallyHideLabel: !0,
|
|
31
|
-
value:
|
|
32
|
-
onChange: (
|
|
33
|
-
|
|
37
|
+
value: m.toString(),
|
|
38
|
+
onChange: (s) => {
|
|
39
|
+
h(Number(s));
|
|
34
40
|
},
|
|
35
|
-
options:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{ value: "50", label: "50" }
|
|
40
|
-
]
|
|
41
|
+
options: D(e, m).map((s) => ({
|
|
42
|
+
value: s.toString(),
|
|
43
|
+
label: s.toString()
|
|
44
|
+
}))
|
|
41
45
|
}
|
|
42
46
|
) }) }),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
+
/* @__PURE__ */ p("div", { className: d.paginationControlButtons, children: [
|
|
48
|
+
r && /* @__PURE__ */ i(N, { ariaLabel: a("labels.paginationFetchingLabel") }),
|
|
49
|
+
/* @__PURE__ */ i(
|
|
50
|
+
l.ButtonIcon,
|
|
47
51
|
{
|
|
48
|
-
"aria-label":
|
|
49
|
-
isDisabled:
|
|
50
|
-
onClick:
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
+
"aria-label": a("icons.paginationFirst"),
|
|
53
|
+
isDisabled: n === 1,
|
|
54
|
+
onClick: t,
|
|
55
|
+
children: /* @__PURE__ */ i(S, {})
|
|
52
56
|
}
|
|
53
57
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
58
|
+
/* @__PURE__ */ i(
|
|
59
|
+
l.ButtonIcon,
|
|
56
60
|
{
|
|
57
|
-
"aria-label":
|
|
61
|
+
"aria-label": a("icons.paginationPrev"),
|
|
58
62
|
"data-testid": "pagination-previous",
|
|
59
|
-
isDisabled:
|
|
60
|
-
onClick:
|
|
61
|
-
children: /* @__PURE__ */
|
|
63
|
+
isDisabled: n === 1,
|
|
64
|
+
onClick: u,
|
|
65
|
+
children: /* @__PURE__ */ i(I, {})
|
|
62
66
|
}
|
|
63
67
|
),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
68
|
+
/* @__PURE__ */ i(
|
|
69
|
+
l.ButtonIcon,
|
|
66
70
|
{
|
|
67
|
-
"aria-label":
|
|
71
|
+
"aria-label": a("icons.paginationNext"),
|
|
68
72
|
"data-testid": "pagination-next",
|
|
69
|
-
isDisabled:
|
|
70
|
-
onClick:
|
|
71
|
-
children: /* @__PURE__ */
|
|
73
|
+
isDisabled: n === o,
|
|
74
|
+
onClick: f,
|
|
75
|
+
children: /* @__PURE__ */ i(P, {})
|
|
72
76
|
}
|
|
73
77
|
),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
78
|
+
/* @__PURE__ */ i(
|
|
79
|
+
l.ButtonIcon,
|
|
76
80
|
{
|
|
77
|
-
"aria-label":
|
|
78
|
-
isDisabled:
|
|
79
|
-
onClick:
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
"aria-label": a("icons.paginationLast"),
|
|
82
|
+
isDisabled: n === o,
|
|
83
|
+
onClick: b,
|
|
84
|
+
children: /* @__PURE__ */ i(x, {})
|
|
81
85
|
}
|
|
82
86
|
)
|
|
83
87
|
] })
|
|
84
88
|
] }) }) : null;
|
|
85
|
-
}, G = (
|
|
86
|
-
const
|
|
87
|
-
return
|
|
89
|
+
}, G = (n) => {
|
|
90
|
+
const o = g();
|
|
91
|
+
return o.PaginationControl ? /* @__PURE__ */ i(o.PaginationControl, { ...n }) : /* @__PURE__ */ i(E, { ...n });
|
|
88
92
|
};
|
|
89
93
|
export {
|
|
90
94
|
G as PaginationControl
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst MINIMUM_PAGE_SIZE = 5\n\nconst shouldShowPagination = (totalCount: number | undefined): boolean => {\n if (totalCount === undefined) return true\n if (totalCount === 0) return false\n return totalCount > MINIMUM_PAGE_SIZE\n}\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n totalCount,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (!shouldShowPagination(totalCount)) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControlCountLabel')}\n placeholder=\"\"\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={
|
|
1
|
+
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst MINIMUM_PAGE_SIZE = 5\n\nconst ITEMS_PER_PAGE_OPTIONS: PaginationItemsPerPage[] = [5, 10, 25, 50]\n\nconst shouldShowPagination = (totalCount: number | undefined): boolean => {\n if (totalCount === undefined) return true\n if (totalCount === 0) return false\n return totalCount > MINIMUM_PAGE_SIZE\n}\n\nconst getVisibleItemsPerPageOptions = (\n totalCount: number | undefined,\n itemsPerPage: PaginationItemsPerPage,\n): PaginationItemsPerPage[] => {\n if (totalCount === undefined) return ITEMS_PER_PAGE_OPTIONS\n\n const smallestOptionCoveringAll = ITEMS_PER_PAGE_OPTIONS.find(option => option >= totalCount)\n const visible = new Set<PaginationItemsPerPage>(\n ITEMS_PER_PAGE_OPTIONS.filter(option => option < totalCount),\n )\n visible.add(itemsPerPage)\n if (smallestOptionCoveringAll !== undefined) visible.add(smallestOptionCoveringAll)\n\n return ITEMS_PER_PAGE_OPTIONS.filter(option => visible.has(option))\n}\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n totalCount,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (!shouldShowPagination(totalCount)) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControlCountLabel')}\n placeholder=\"\"\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={getVisibleItemsPerPageOptions(totalCount, itemsPerPage).map(option => ({\n value: option.toString(),\n label: option.toString(),\n }))}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\n/** @internal */\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["MINIMUM_PAGE_SIZE","ITEMS_PER_PAGE_OPTIONS","shouldShowPagination","totalCount","getVisibleItemsPerPageOptions","itemsPerPage","smallestOptionCoveringAll","option","visible","DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","t","useTranslation","Components","useComponentContext","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAAoB,GAEpBC,IAAmD,CAAC,GAAG,IAAI,IAAI,EAAE,GAEjEC,IAAuB,CAACC,MACxBA,MAAe,SAAkB,KACjCA,MAAe,IAAU,KACtBA,IAAaH,GAGhBI,IAAgC,CACpCD,GACAE,MAC6B;AAC7B,MAAIF,MAAe,OAAW,QAAOF;AAErC,QAAMK,IAA4BL,EAAuB,KAAK,CAAAM,MAAUA,KAAUJ,CAAU,GACtFK,IAAU,IAAI;AAAA,IAClBP,EAAuB,OAAO,CAAAM,MAAUA,IAASJ,CAAU;AAAA,EAAA;AAE7D,SAAAK,EAAQ,IAAIH,CAAY,GACpBC,MAA8B,UAAWE,EAAQ,IAAIF,CAAyB,GAE3EL,EAAuB,OAAO,CAAAM,MAAUC,EAAQ,IAAID,CAAM,CAAC;AACpE,GAEME,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAR;AAAA,EACA,YAAAS;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,cAAAZ,IAAe;AACjB,MAA8B;AAC5B,QAAM,EAAE,GAAAa,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA;AAEnB,SAAKnB,EAAqBC,CAAU,IAKlC,gBAAAmB,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACF,EAAW;AAAA,MAAX;AAAA,QACC,OAAOF,EAAE,oCAAoC;AAAA,QAC7C,aAAY;AAAA,QACZ,yBAAuB;AAAA,QACvB,OAAOb,EAAa,SAAA;AAAA,QACpB,UAAU,CAAAqB,MAAK;AACb,UAAAT,EAAyB,OAAOS,CAAC,CAA2B;AAAA,QAC9D;AAAA,QACA,SAAStB,EAA8BD,GAAYE,CAAY,EAAE,IAAI,CAAAE,OAAW;AAAA,UAC9E,OAAOA,EAAO,SAAA;AAAA,UACd,OAAOA,EAAO,SAAA;AAAA,QAAS,EACvB;AAAA,MAAA;AAAA,IAAA,GAEN,EAAA,CACF;AAAA,IACA,gBAAAiB,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAX,KAAc,gBAAAU,EAACK,GAAA,EAAc,WAAWT,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAI;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,uBAAuB;AAAA,UACrC,YAAYR,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACe,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYR,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYR,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,YAAYR,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,IAzDO;AA2DX,GAGaC,IAAoB,CAACC,MAAkC;AAClE,QAAMb,IAAaC,EAAA;AAEnB,SAAOD,EAAW,oBAChB,gBAAAE,EAACF,EAAW,mBAAX,EAA8B,GAAGa,EAAA,CAAO,IAEzC,gBAAAX,EAACb,GAAA,EAA0B,GAAGwB,EAAA,CAAO;AAEzC;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import h from "classnames";
|
|
3
|
-
import { Flex as u } from "../../Flex/Flex.js";
|
|
4
3
|
import { BreadcrumbsDefaults as C } from "./BreadcrumbsTypes.js";
|
|
5
4
|
import i from "./Breadcrumbs.module.scss.js";
|
|
6
5
|
import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
|
|
6
|
+
import { Flex as u } from "../../Flex/Flex.js";
|
|
7
7
|
function P(f) {
|
|
8
8
|
const p = x(f, C), {
|
|
9
9
|
className: s,
|
|
@@ -7,13 +7,13 @@ import { FileInputDefaults as K } from "./FileInputTypes.js";
|
|
|
7
7
|
import n from "./FileInput.module.scss.js";
|
|
8
8
|
import { applyMissingDefaults as L } from "../../../../helpers/applyMissingDefaults.js";
|
|
9
9
|
import { FieldLayout as O } from "../../FieldLayout/FieldLayout.js";
|
|
10
|
-
import { Flex as y } from "../../Flex/Flex.js";
|
|
11
10
|
import { ButtonIcon as R } from "../Button/ButtonIcon.js";
|
|
12
11
|
import W from "../../../../assets/icons/icon-trashcan.svg.js";
|
|
13
12
|
import Z from "../../../../assets/icons/icon-file-outline.svg.js";
|
|
14
13
|
import $ from "../../../../assets/icons/icon-file-pdf.svg.js";
|
|
15
14
|
import H from "../../../../assets/icons/icon-file-png.svg.js";
|
|
16
15
|
import V from "../../../../assets/icons/icon-file-jpg.svg.js";
|
|
16
|
+
import { Flex as y } from "../../Flex/Flex.js";
|
|
17
17
|
function Q(i) {
|
|
18
18
|
return i === "application/pdf" ? $ : i === "image/png" ? H : i === "image/jpeg" || i === "image/jpg" ? V : Z;
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "classnames";
|
|
3
|
-
import
|
|
4
|
-
import p from "
|
|
3
|
+
import n from "./ProgressBar.module.scss.js";
|
|
4
|
+
import { Flex as p } from "../../Flex/Flex.js";
|
|
5
5
|
import { VisuallyHidden as d } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
function y({
|
|
7
7
|
className: i,
|
|
@@ -13,9 +13,9 @@ function y({
|
|
|
13
13
|
const s = Math.max(1, Math.min(m, e)), l = {
|
|
14
14
|
"--g-progress-bar-width": `${s * 100 / e}%`
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */ t(
|
|
16
|
+
return /* @__PURE__ */ t(p, { flexDirection: "column", children: [
|
|
17
17
|
o && /* @__PURE__ */ r(o, {}),
|
|
18
|
-
/* @__PURE__ */ r("div", { className: c(
|
|
18
|
+
/* @__PURE__ */ r("div", { className: c(n.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
|
|
19
19
|
] });
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
@@ -9,12 +9,15 @@ 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";
|
|
16
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
17
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
18
|
+
const [f, v] = t("CreateSignatoryContext");
|
|
16
19
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
v as CreateSignatoryProvider,
|
|
21
|
+
f as useCreateSignatory
|
|
19
22
|
};
|
|
20
23
|
//# 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":"
|
|
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,12 +9,15 @@ 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";
|
|
16
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
17
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
18
|
+
const [s, u] = t("InviteSignatoryContext");
|
|
16
19
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
u as InviteSignatoryProvider,
|
|
21
|
+
s as useInviteSignatory
|
|
19
22
|
};
|
|
20
23
|
//# 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":"
|
|
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,16 +9,19 @@ 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";
|
|
16
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
17
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const
|
|
18
|
+
const C = {
|
|
16
19
|
createSignatory: "createSignatory",
|
|
17
20
|
inviteSignatory: "inviteSignatory"
|
|
18
|
-
}, [
|
|
21
|
+
}, [u, f] = t("AssignSignatoryContext");
|
|
19
22
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
f as AssignSignatoryProvider,
|
|
24
|
+
C as SignatoryAssignmentMode,
|
|
25
|
+
u as useAssignSignatory
|
|
23
26
|
};
|
|
24
27
|
//# 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":"
|
|
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,12 +9,15 @@ 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";
|
|
16
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
17
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
18
|
+
const [F, f] = o("BankAccountContext");
|
|
16
19
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
f as BankAccountFormProvider,
|
|
21
|
+
F as useBankAccountForm
|
|
19
22
|
};
|
|
20
23
|
//# 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":"
|
|
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,14 +9,17 @@ 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";
|
|
16
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
17
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
18
|
+
const [v, y] = t(
|
|
16
19
|
"CompanyDocumentListContext"
|
|
17
20
|
);
|
|
18
21
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
y as DocumentListProvider,
|
|
23
|
+
v as useDocumentList
|
|
21
24
|
};
|
|
22
25
|
//# 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":"
|
|
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
|
|
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,20 +11,23 @@ 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
|
|
17
|
-
|
|
18
|
+
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
19
|
+
import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
|
|
20
|
+
const v = o.object({
|
|
18
21
|
federalEin: o.string().optional(),
|
|
19
|
-
taxPayerType: o.enum(Object.values(
|
|
22
|
+
taxPayerType: o.enum(Object.values(t)).optional(),
|
|
20
23
|
filingForm: o.enum(Object.values(r)).optional(),
|
|
21
24
|
legalName: o.string().min(1)
|
|
22
|
-
}), [
|
|
25
|
+
}), [P, O] = e(
|
|
23
26
|
"CompanyFederalTaxesContext"
|
|
24
27
|
);
|
|
25
28
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
v as FederalTaxFormSchema,
|
|
30
|
+
O as FederalTaxesProvider,
|
|
31
|
+
P as useFederalTaxes
|
|
29
32
|
};
|
|
30
33
|
//# 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":"
|
|
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;"}
|