@gusto/embedded-react-sdk 0.54.0 → 0.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/components/Common/Loading/Loading.d.ts +6 -1
- package/dist/components/Common/Loading/Loading.js +13 -12
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +8 -8
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +18 -16
- package/dist/components/Common/UI/Alert/Alert.module.scss.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/Menu/Menu.js +19 -18
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js +2 -2
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +20 -19
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +20 -19
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +29 -28
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +24 -21
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +11 -11
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +14 -13
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -5
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +22 -21
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/fields.js +8 -8
- package/dist/components/Contractor/Landing/Landing.js +30 -29
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +18 -17
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +41 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +175 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.d.ts +18 -0
- package/dist/components/Contractor/Payments/{HistoricalPaymentAmounts → CreateHistoricalPayment}/useFormDictionary.js +37 -7
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.d.ts +30 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +56 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js +33 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +46 -131
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js +36 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +83 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +124 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/index.d.ts +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
- package/dist/components/Contractor/exports/contractorManagement.d.ts +2 -2
- package/dist/components/Contractor/exports/contractorManagement.js +20 -20
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Documents/management/DocumentManager.js +2 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/Landing/Landing.js +31 -30
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +59 -58
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +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/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Flow/Flow.js +27 -20
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +44 -44
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +108 -108
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +23 -23
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +4 -11
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/i18n/I18n.js +7 -7
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +5 -5
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +20 -18
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js +46 -44
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js +48 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/types.d.ts +219 -105
- package/dist/shared/constants.d.ts +12 -4
- package/dist/shared/constants.js +23 -19
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/docs/guides/endpoint-inventory.json +30 -1
- package/package.json +17 -16
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.d.ts +0 -33
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js +0 -62
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/index.d.ts +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.d.ts +0 -9
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.d.ts +0 -27
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js +0 -56
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/index.d.ts +0 -1
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js +0 -36
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js.map +0 -1
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js +0 -18
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaxRateHistorySection.js","sources":["../../../../../src/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useTaxRateManagement, type TaxRateKeyGroup } from './context'\nimport { extractRequirementColumns, toHistoryRows, type HistoryRow } from './toHistoryRows'\nimport { AddRateAction } from './AddRateAction'\nimport { DataView, EmptyData, Flex, useDataView } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface TaxRateHistorySectionProps {\n group: TaxRateKeyGroup\n /**\n * Whether to render this group's own heading + \"Add tax rate\" button.\n *\n * @remarks\n * Set to `false` when this is the only group for the state — the page-level header already\n * carries the title and the single add-rate action, so a repeated per-group header would be\n * redundant.\n *\n * @defaultValue `true`\n */\n showHeader?: boolean\n}\n\ntype BadgeStatus = 'success' | 'info' | 'warning'\n\nconst statusBadgeMap = {\n current: 'success',\n scheduled: 'info',\n historical: 'warning',\n} as const satisfies Record<HistoryRow['status'], BadgeStatus>\n\nconst statusLabelKeyMap = {\n current: 'currentBadge',\n scheduled: 'scheduledBadge',\n historical: 'historicalBadge',\n} as const satisfies Record<HistoryRow['status'], string>\n\n/** @internal */\nexport function TaxRateHistorySection({ group, showHeader = true }: TaxRateHistorySectionProps) {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'manageRates' })\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const { state } = useTaxRateManagement()\n\n const rows = useMemo(() => toHistoryRows(group.sets), [group.sets])\n const requirementColumns = useMemo(() => extractRequirementColumns(group.sets), [group.sets])\n\n const sectionLabel = group.label ?? group.key\n\n const { ...dataViewProps } = useDataView<HistoryRow>({\n data: rows,\n columns: [\n {\n key: 'effectiveFrom',\n title: t('effectiveDateColumnLabel'),\n render: row => dateFormatter.formatLongWithYear(row.effectiveFrom),\n },\n {\n key: 'status',\n title: ''
|
|
1
|
+
{"version":3,"file":"TaxRateHistorySection.js","sources":["../../../../../src/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useTaxRateManagement, type TaxRateKeyGroup } from './context'\nimport { extractRequirementColumns, toHistoryRows, type HistoryRow } from './toHistoryRows'\nimport { AddRateAction } from './AddRateAction'\nimport { DataView, EmptyData, Flex, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface TaxRateHistorySectionProps {\n group: TaxRateKeyGroup\n /**\n * Whether to render this group's own heading + \"Add tax rate\" button.\n *\n * @remarks\n * Set to `false` when this is the only group for the state — the page-level header already\n * carries the title and the single add-rate action, so a repeated per-group header would be\n * redundant.\n *\n * @defaultValue `true`\n */\n showHeader?: boolean\n}\n\ntype BadgeStatus = 'success' | 'info' | 'warning'\n\nconst statusBadgeMap = {\n current: 'success',\n scheduled: 'info',\n historical: 'warning',\n} as const satisfies Record<HistoryRow['status'], BadgeStatus>\n\nconst statusLabelKeyMap = {\n current: 'currentBadge',\n scheduled: 'scheduledBadge',\n historical: 'historicalBadge',\n} as const satisfies Record<HistoryRow['status'], string>\n\n/** @internal */\nexport function TaxRateHistorySection({ group, showHeader = true }: TaxRateHistorySectionProps) {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'manageRates' })\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const { state } = useTaxRateManagement()\n\n const rows = useMemo(() => toHistoryRows(group.sets), [group.sets])\n const requirementColumns = useMemo(() => extractRequirementColumns(group.sets), [group.sets])\n\n const sectionLabel = group.label ?? group.key\n\n const { ...dataViewProps } = useDataView<HistoryRow>({\n data: rows,\n columns: [\n {\n key: 'effectiveFrom',\n title: t('effectiveDateColumnLabel'),\n render: row => dateFormatter.formatLongWithYear(row.effectiveFrom),\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('statusColumnLabel')}</VisuallyHidden>,\n render: row => (\n <Components.Badge status={statusBadgeMap[row.status]}>\n {t(statusLabelKeyMap[row.status])}\n </Components.Badge>\n ),\n },\n ...requirementColumns.map(column => ({\n key: column.key,\n title: column.label ?? column.key,\n render: (row: HistoryRow) => row.values[column.key] ?? '',\n })),\n ],\n emptyState: () => (\n <EmptyData title={t('emptyHistoryTitle')} description={t('emptyHistoryDescription')} />\n ),\n })\n\n return (\n <section aria-label={sectionLabel}>\n <Flex flexDirection=\"column\" gap={16} alignItems=\"stretch\">\n {showHeader && (\n <Flex justifyContent=\"space-between\" alignItems=\"center\" gap={16}>\n <Components.Heading as=\"h3\">{sectionLabel}</Components.Heading>\n <AddRateAction state={state} group={group} />\n </Flex>\n )}\n <DataView label={sectionLabel} {...dataViewProps} />\n </Flex>\n </section>\n )\n}\n"],"names":["statusBadgeMap","statusLabelKeyMap","TaxRateHistorySection","group","showHeader","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","state","useTaxRateManagement","rows","useMemo","toHistoryRows","requirementColumns","extractRequirementColumns","sectionLabel","dataViewProps","useDataView","row","jsx","VisuallyHidden","column","EmptyData","jsxs","Flex","AddRateAction","DataView"],"mappings":";;;;;;;;;;;;;AA0BA,MAAMA,IAAiB;AAAA,EACrB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AACd,GAEMC,IAAoB;AAAA,EACxB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AACd;AAGO,SAASC,EAAsB,EAAE,OAAAC,GAAO,YAAAC,IAAa,MAAoC;AAC9F,QAAM,EAAE,GAAAC,MAAMC,EAAe,sBAAsB,EAAE,WAAW,eAAe,GACzEC,IAAaC,EAAA,GACbC,IAAgBC,EAAA,GAChB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAOC,EAAQ,MAAMC,EAAcZ,EAAM,IAAI,GAAG,CAACA,EAAM,IAAI,CAAC,GAC5Da,IAAqBF,EAAQ,MAAMG,EAA0Bd,EAAM,IAAI,GAAG,CAACA,EAAM,IAAI,CAAC,GAEtFe,IAAef,EAAM,SAASA,EAAM,KAEpC,EAAE,GAAGgB,EAAA,IAAkBC,EAAwB;AAAA,IACnD,MAAMP;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOR,EAAE,0BAA0B;AAAA,QACnC,QAAQ,CAAAgB,MAAOZ,EAAc,mBAAmBY,EAAI,aAAa;AAAA,MAAA;AAAA,MAEnE;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACC,GAAA,EAAgB,UAAAlB,EAAE,mBAAmB,GAAE;AAAA,QAC/C,QAAQ,CAAAgB,MACN,gBAAAC,EAACf,EAAW,OAAX,EAAiB,QAAQP,EAAeqB,EAAI,MAAM,GAChD,UAAAhB,EAAEJ,EAAkBoB,EAAI,MAAM,CAAC,EAAA,CAClC;AAAA,MAAA;AAAA,MAGJ,GAAGL,EAAmB,IAAI,CAAAQ,OAAW;AAAA,QACnC,KAAKA,EAAO;AAAA,QACZ,OAAOA,EAAO,SAASA,EAAO;AAAA,QAC9B,QAAQ,CAACH,MAAoBA,EAAI,OAAOG,EAAO,GAAG,KAAK;AAAA,MAAA,EACvD;AAAA,IAAA;AAAA,IAEJ,YAAY,MACV,gBAAAF,EAACG,GAAA,EAAU,OAAOpB,EAAE,mBAAmB,GAAG,aAAaA,EAAE,yBAAyB,EAAA,CAAG;AAAA,EAAA,CAExF;AAED,SACE,gBAAAiB,EAAC,WAAA,EAAQ,cAAYJ,GACnB,UAAA,gBAAAQ,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAAI,YAAW,WAC9C,UAAA;AAAA,IAAAvB,uBACEuB,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAAS,KAAK,IAC5D,UAAA;AAAA,MAAA,gBAAAL,EAACf,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAW,GAAa;AAAA,MAC1C,gBAAAI,EAACM,GAAA,EAAc,OAAAjB,GAAc,OAAAR,EAAA,CAAc;AAAA,IAAA,GAC7C;AAAA,IAEF,gBAAAmB,EAACO,GAAA,EAAS,OAAOX,GAAe,GAAGC,EAAA,CAAe;AAAA,EAAA,EAAA,CACpD,EAAA,CACF;AAEJ;"}
|
|
@@ -9,15 +9,13 @@ 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";
|
|
14
12
|
import "../../../../shared/constants.js";
|
|
15
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
14
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
17
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
18
|
-
const [
|
|
16
|
+
const [d, s] = t("TaxRateManagementContext");
|
|
19
17
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
s as TaxRateManagementProvider,
|
|
19
|
+
d as useTaxRateManagement
|
|
22
20
|
};
|
|
23
21
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/TaxRateManagement/context.ts"],"sourcesContent":["import type { TaxRequirementSet } from '@gusto/embedded-api/models/components/taxrequirementset'\nimport { createCompoundContext } from '@/components/Base'\n\n/**\n * A state's effective-dated requirement sets for a single key, grouped for history display,\n * plus any future-dated candidate sets available to schedule against.\n *\n * @internal\n */\nexport interface TaxRateKeyGroup {\n key: string\n label?: string\n sets: TaxRequirementSet[]\n candidateSets: TaxRequirementSet[]\n}\n\ninterface TaxRateManagementContextType {\n state: string\n groups: TaxRateKeyGroup[]\n isPendingUpdate: boolean\n handleCancel: () => void\n handleAddRate: (\n key: string,\n effectiveFrom: string,\n requirements: { key: string; value: string }[],\n ) => Promise<boolean>\n}\n\nconst [useTaxRateManagement, TaxRateManagementProvider] =\n createCompoundContext<TaxRateManagementContextType>('TaxRateManagementContext')\n\nexport { useTaxRateManagement, TaxRateManagementProvider }\n"],"names":["useTaxRateManagement","TaxRateManagementProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/TaxRateManagement/context.ts"],"sourcesContent":["import type { TaxRequirementSet } from '@gusto/embedded-api/models/components/taxrequirementset'\nimport { createCompoundContext } from '@/components/Base'\n\n/**\n * A state's effective-dated requirement sets for a single key, grouped for history display,\n * plus any future-dated candidate sets available to schedule against.\n *\n * @internal\n */\nexport interface TaxRateKeyGroup {\n key: string\n label?: string\n sets: TaxRequirementSet[]\n candidateSets: TaxRequirementSet[]\n}\n\ninterface TaxRateManagementContextType {\n state: string\n groups: TaxRateKeyGroup[]\n isPendingUpdate: boolean\n handleCancel: () => void\n handleAddRate: (\n key: string,\n effectiveFrom: string,\n requirements: { key: string; value: string }[],\n ) => Promise<boolean>\n}\n\nconst [useTaxRateManagement, TaxRateManagementProvider] =\n createCompoundContext<TaxRateManagementContextType>('TaxRateManagementContext')\n\nexport { useTaxRateManagement, TaxRateManagementProvider }\n"],"names":["useTaxRateManagement","TaxRateManagementProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA4BA,MAAM,CAACA,GAAsBC,CAAyB,IACpDC,EAAoD,0BAA0B;"}
|
package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { jsxs as m, Fragment as P, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as b } from "react";
|
|
3
|
-
import { useTranslation as
|
|
3
|
+
import { useTranslation as V } from "react-i18next";
|
|
4
4
|
import { Flex as d } from "../../../Common/Flex/Flex.js";
|
|
5
|
-
import { EmptyData as
|
|
5
|
+
import { EmptyData as M } from "../../../Common/EmptyData/EmptyData.js";
|
|
6
6
|
import { HamburgerMenu as y } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
7
7
|
import { useComponentContext as w } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
8
|
import { ContractorOnboardingStatusBadge as Y } from "../../../Common/OnboardingStatusBadge/index.js";
|
|
9
9
|
import F from "../../../../assets/icons/trashcan.svg.js";
|
|
10
10
|
import h from "../../../../assets/icons/x-circle.svg.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import H from "../../../../assets/icons/eye.svg.js";
|
|
12
|
+
import j from "../../../../assets/icons/slash-circle.svg.js";
|
|
13
13
|
import $ from "../../../../assets/icons/plus-circle.svg.js";
|
|
14
14
|
import { firstLastName as z } from "../../../../helpers/formattedStrings.js";
|
|
15
15
|
import { normalizeToDate as G, formatDateLong as W, formatDateLongWithYear as U } from "../../../../helpers/dateFormatting.js";
|
|
16
16
|
import { ContractorOnboardingStatus as C, CONTRACTOR_TYPE as X } from "../../../../shared/constants.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
17
|
+
import { VisuallyHidden as q } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
|
|
18
|
+
import { useDataView as J } from "../../../Common/DataView/useDataView.js";
|
|
19
|
+
import { DataView as K } from "../../../Common/DataView/DataView.js";
|
|
20
|
+
function Q(n) {
|
|
20
21
|
return n.type === X.BUSINESS ? n.businessName ?? "" : z({ first_name: n.firstName, last_name: n.lastName });
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function Z({ contractor: n }) {
|
|
23
24
|
const l = w();
|
|
24
25
|
return /* @__PURE__ */ m(d, { flexDirection: "column", gap: 0, children: [
|
|
25
|
-
/* @__PURE__ */ t(l.Text, { size: "sm", weight: "medium", children:
|
|
26
|
+
/* @__PURE__ */ t(l.Text, { size: "sm", weight: "medium", children: Q(n) }),
|
|
26
27
|
/* @__PURE__ */ t(l.Text, { variant: "supporting", size: "sm", children: n.type ?? "–" })
|
|
27
28
|
] });
|
|
28
29
|
}
|
|
@@ -30,10 +31,10 @@ function u(n) {
|
|
|
30
31
|
const l = G(n);
|
|
31
32
|
return l ? l.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? W(l) : U(l) : "";
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function ee(n) {
|
|
34
35
|
return n === C.ADMIN_ONBOARDING_REVIEW || n === C.SELF_ONBOARDING_REVIEW;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function ye({
|
|
37
38
|
contractors: n,
|
|
38
39
|
isFetching: l,
|
|
39
40
|
selectedTab: o,
|
|
@@ -50,7 +51,7 @@ function De({
|
|
|
50
51
|
onCancelRehire: O,
|
|
51
52
|
onAddContractor: B
|
|
52
53
|
}) {
|
|
53
|
-
const { t: e } =
|
|
54
|
+
const { t: e } = V("Contractor.ManagementContractorList"), r = w(), [g, p] = b(null), [s, c] = b(null), _ = [
|
|
54
55
|
{ id: "active", label: e("tabs.active"), content: null },
|
|
55
56
|
{ id: "onboarding", label: e("tabs.onboarding"), content: null },
|
|
56
57
|
{ id: "dismissed", label: e("tabs.dismissed"), content: null }
|
|
@@ -58,7 +59,7 @@ function De({
|
|
|
58
59
|
const a = {
|
|
59
60
|
key: "name",
|
|
60
61
|
title: e("nameLabel"),
|
|
61
|
-
render: (i) => /* @__PURE__ */ t(
|
|
62
|
+
render: (i) => /* @__PURE__ */ t(Z, { contractor: i })
|
|
62
63
|
};
|
|
63
64
|
return o === "active" ? [
|
|
64
65
|
a,
|
|
@@ -69,7 +70,7 @@ function De({
|
|
|
69
70
|
},
|
|
70
71
|
{
|
|
71
72
|
key: "status",
|
|
72
|
-
title: "",
|
|
73
|
+
title: /* @__PURE__ */ t(q, { children: e("statusColumnLabel") }),
|
|
73
74
|
render: (i) => i.upcomingEmployment?.startDate ? /* @__PURE__ */ t(r.Badge, { status: "info", children: e("startsBadge", {
|
|
74
75
|
date: u(i.upcomingEmployment.startDate)
|
|
75
76
|
}) }) : i.dismissalDate ? /* @__PURE__ */ t(r.Badge, { status: "warning", children: e("lastDayBadge", { date: u(i.dismissalDate) }) }) : null
|
|
@@ -100,7 +101,7 @@ function De({
|
|
|
100
101
|
render: (i) => i.dismissalDate ? u(i.dismissalDate) : "–"
|
|
101
102
|
}
|
|
102
103
|
];
|
|
103
|
-
}, { ...T } =
|
|
104
|
+
}, { ...T } = J({
|
|
104
105
|
data: n,
|
|
105
106
|
columns: x(),
|
|
106
107
|
itemMenu: (a) => {
|
|
@@ -126,7 +127,7 @@ function De({
|
|
|
126
127
|
onClick: () => {
|
|
127
128
|
A(a.uuid);
|
|
128
129
|
},
|
|
129
|
-
children:
|
|
130
|
+
children: ee(a.onboardingStatus) ? e("reviewCta") : e("continueCta")
|
|
130
131
|
}
|
|
131
132
|
),
|
|
132
133
|
/* @__PURE__ */ t(y, { items: f, triggerLabel: e("hamburgerTitle") })
|
|
@@ -138,7 +139,7 @@ function De({
|
|
|
138
139
|
onClick: () => {
|
|
139
140
|
L(a.uuid);
|
|
140
141
|
},
|
|
141
|
-
icon: /* @__PURE__ */ t(
|
|
142
|
+
icon: /* @__PURE__ */ t(H, { "aria-hidden": !0 })
|
|
142
143
|
}), a.allowedActions.includes("cancel_rehire") && i.push({
|
|
143
144
|
label: e("cancelRehireCta"),
|
|
144
145
|
onClick: () => {
|
|
@@ -156,7 +157,7 @@ function De({
|
|
|
156
157
|
onClick: () => {
|
|
157
158
|
I(a.uuid);
|
|
158
159
|
},
|
|
159
|
-
icon: /* @__PURE__ */ t(
|
|
160
|
+
icon: /* @__PURE__ */ t(j, { "aria-hidden": !0 })
|
|
160
161
|
}), a.allowedActions.includes("rehire") && i.push({
|
|
161
162
|
label: e("rehireCta"),
|
|
162
163
|
onClick: () => {
|
|
@@ -168,7 +169,7 @@ function De({
|
|
|
168
169
|
isFetching: l,
|
|
169
170
|
pagination: S,
|
|
170
171
|
emptyState: () => /* @__PURE__ */ t(
|
|
171
|
-
|
|
172
|
+
M,
|
|
172
173
|
{
|
|
173
174
|
title: e(`emptyState.${o}.title`),
|
|
174
175
|
description: e(`emptyState.${o}.description`)
|
|
@@ -193,7 +194,7 @@ function De({
|
|
|
193
194
|
"aria-label": e("tabsLabel")
|
|
194
195
|
}
|
|
195
196
|
),
|
|
196
|
-
/* @__PURE__ */ t(
|
|
197
|
+
/* @__PURE__ */ t(K, { label: e("contractorListLabel"), ...T })
|
|
197
198
|
] })
|
|
198
199
|
] }),
|
|
199
200
|
/* @__PURE__ */ t(
|
|
@@ -242,6 +243,6 @@ function De({
|
|
|
242
243
|
] });
|
|
243
244
|
}
|
|
244
245
|
export {
|
|
245
|
-
|
|
246
|
+
ye as ManagementContractorListView
|
|
246
247
|
};
|
|
247
248
|
//# sourceMappingURL=ManagementContractorListView.js.map
|
package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagementContractorListView.js","sources":["../../../../../src/components/Contractor/ContractorList/management/ManagementContractorListView.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { UseContractorListResult, ContractorWithActions } from '../shared/useContractorList'\nimport type { ContractorTab } from './ManagementContractorList'\nimport { DataView, EmptyData, useDataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { ContractorOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport XCircleSvg from '@/assets/icons/x-circle.svg?react'\nimport EyeSvg from '@/assets/icons/eye.svg?react'\nimport SlashCircleSvg from '@/assets/icons/slash-circle.svg?react'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport { normalizeToDate, formatDateLong, formatDateLongWithYear } from '@/helpers/dateFormatting'\nimport { CONTRACTOR_TYPE, ContractorOnboardingStatus } from '@/shared/constants'\n\n/** @internal */\nexport interface ManagementContractorListViewProps extends Pick<\n Extract<UseContractorListResult, { isLoading: false }>,\n 'pagination' | 'status'\n> {\n contractors: ContractorWithActions[]\n isFetching: boolean\n selectedTab: ContractorTab\n onTabChange: (tab: ContractorTab) => void\n onEdit: (contractorId: string) => void\n onView: (contractorId: string) => void\n onDismiss: (contractorId: string) => void\n onRehire: (contractorId: string) => void\n onDelete: (contractorId: string) => Promise<void>\n onCancelSelfOnboarding: (contractorId: string) => Promise<void>\n onCancelDismissal: (contractorId: string) => Promise<void>\n onCancelRehire: (contractorId: string) => Promise<void>\n onAddContractor: () => void\n}\n\nfunction contractorDisplayName(contractor: ContractorWithActions) {\n return contractor.type === CONTRACTOR_TYPE.BUSINESS\n ? (contractor.businessName ?? '')\n : firstLastName({ first_name: contractor.firstName, last_name: contractor.lastName })\n}\n\nfunction ContractorNameCell({ contractor }: { contractor: ContractorWithActions }) {\n const Components = useComponentContext()\n return (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text size=\"sm\" weight=\"medium\">\n {contractorDisplayName(contractor)}\n </Components.Text>\n <Components.Text variant=\"supporting\" size=\"sm\">\n {contractor.type ?? '–'}\n </Components.Text>\n </Flex>\n )\n}\n\nfunction formatBadgeDate(dateStr: string): string {\n const date = normalizeToDate(dateStr)\n if (!date) return ''\n const isSameYear = date.getFullYear() === new Date().getFullYear()\n return isSameYear ? formatDateLong(date) : formatDateLongWithYear(date)\n}\n\nfunction isOnboardingEditReview(onboardingStatus?: string | null) {\n return (\n onboardingStatus === ContractorOnboardingStatus.ADMIN_ONBOARDING_REVIEW ||\n onboardingStatus === ContractorOnboardingStatus.SELF_ONBOARDING_REVIEW\n )\n}\n\n/** @internal */\nexport function ManagementContractorListView({\n contractors,\n isFetching,\n selectedTab,\n onTabChange,\n status,\n pagination,\n onEdit,\n onView,\n onDismiss,\n onRehire,\n onDelete,\n onCancelSelfOnboarding,\n onCancelDismissal,\n onCancelRehire,\n onAddContractor,\n}: ManagementContractorListViewProps) {\n const { t } = useTranslation('Contractor.ManagementContractorList')\n const Components = useComponentContext()\n const [contractorToRemove, setContractorToRemove] = useState<string | null>(null)\n const [cancelAction, setCancelAction] = useState<{\n contractorId: string\n type: 'dismissal' | 'rehire'\n } | null>(null)\n\n const tabs = [\n { id: 'active', label: t('tabs.active'), content: null },\n { id: 'onboarding', label: t('tabs.onboarding'), content: null },\n { id: 'dismissed', label: t('tabs.dismissed'), content: null },\n ]\n\n const getColumns = () => {\n const nameColumn = {\n key: 'name',\n title: t('nameLabel'),\n render: (contractor: ContractorWithActions) => <ContractorNameCell contractor={contractor} />,\n }\n\n if (selectedTab === 'active') {\n return [\n nameColumn,\n {\n key: 'rate',\n title: t('rateLabel'),\n render: (contractor: ContractorWithActions) =>\n contractor.wageType === 'Hourly' && contractor.hourlyRate\n ? t('rateHourly', { rate: `$${contractor.hourlyRate}` })\n : (contractor.wageType ?? '–'),\n },\n {\n key: 'status',\n title: '',\n render: (contractor: ContractorWithActions) => {\n if (contractor.upcomingEmployment?.startDate) {\n return (\n <Components.Badge status=\"info\">\n {t('startsBadge', {\n date: formatBadgeDate(contractor.upcomingEmployment.startDate),\n })}\n </Components.Badge>\n )\n }\n if (contractor.dismissalDate) {\n return (\n <Components.Badge status=\"warning\">\n {t('lastDayBadge', { date: formatBadgeDate(contractor.dismissalDate) })}\n </Components.Badge>\n )\n }\n return null\n },\n },\n ]\n }\n\n if (selectedTab === 'onboarding') {\n return [\n nameColumn,\n {\n key: 'status',\n title: t('onboardingStatusLabel'),\n render: (contractor: ContractorWithActions) => (\n <Flex alignItems=\"center\" gap={8}>\n <ContractorOnboardingStatusBadge\n onboarded={contractor.onboarded}\n onboardingStatus={contractor.onboardingStatus}\n />\n {contractor.onboardingStatus === ContractorOnboardingStatus.ONBOARDING_COMPLETED &&\n contractor.upcomingEmployment?.startDate && (\n <Components.Badge status=\"info\">\n {t('startsBadge', {\n date: formatBadgeDate(contractor.upcomingEmployment.startDate),\n })}\n </Components.Badge>\n )}\n </Flex>\n ),\n },\n ]\n }\n\n return [\n nameColumn,\n {\n key: 'dismissalDate',\n title: t('dismissalDateLabel'),\n render: (contractor: ContractorWithActions) =>\n contractor.dismissalDate ? formatBadgeDate(contractor.dismissalDate) : '–',\n },\n ]\n }\n\n const { ...dataViewProps } = useDataView({\n data: contractors,\n columns: getColumns(),\n itemMenu: contractor => {\n if (selectedTab === 'onboarding') {\n const menuItems = []\n\n if (contractor.allowedActions.includes('cancel_self_onboarding')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: () => {\n void onCancelSelfOnboarding(contractor.uuid)\n },\n icon: <XCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('delete')) {\n menuItems.push({\n label: t('removeCta'),\n onClick: () => {\n setContractorToRemove(contractor.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return (\n <Flex alignItems=\"center\" justifyContent=\"flex-end\" gap={4}>\n {contractor.allowedActions.includes('edit') && (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEdit(contractor.uuid)\n }}\n >\n {isOnboardingEditReview(contractor.onboardingStatus)\n ? t('reviewCta')\n : t('continueCta')}\n </Components.Button>\n )}\n <HamburgerMenu items={menuItems} triggerLabel={t('hamburgerTitle')} />\n </Flex>\n )\n }\n\n const menuItems = []\n\n if (contractor.allowedActions.includes('view')) {\n menuItems.push({\n label: t('viewDetailsCta'),\n onClick: () => {\n onView(contractor.uuid)\n },\n icon: <EyeSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('cancel_rehire')) {\n menuItems.push({\n label: t('cancelRehireCta'),\n onClick: () => {\n setCancelAction({ contractorId: contractor.uuid, type: 'rehire' })\n },\n icon: <XCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('cancel_dismissal')) {\n menuItems.push({\n label: t('cancelDismissalCta'),\n onClick: () => {\n setCancelAction({ contractorId: contractor.uuid, type: 'dismissal' })\n },\n icon: <XCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('dismiss')) {\n menuItems.push({\n label: t('dismissCta'),\n onClick: () => {\n onDismiss(contractor.uuid)\n },\n icon: <SlashCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('rehire')) {\n menuItems.push({\n label: t('rehireCta'),\n onClick: () => {\n onRehire(contractor.uuid)\n },\n icon: <PlusCircleIcon aria-hidden />,\n })\n }\n\n return <HamburgerMenu items={menuItems} triggerLabel={t('hamburgerTitle')} />\n },\n isFetching,\n pagination,\n emptyState: () => (\n <EmptyData\n title={t(`emptyState.${selectedTab}.title`)}\n description={t(`emptyState.${selectedTab}.description`)}\n />\n ),\n })\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Components.Button variant=\"secondary\" onClick={onAddContractor}>\n {t('addContractorCta')}\n </Components.Button>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n onTabChange(id as ContractorTab)\n }}\n aria-label={t('tabsLabel')}\n />\n\n <DataView label={t('contractorListLabel')} {...dataViewProps} />\n </Flex>\n </Flex>\n\n <Components.Dialog\n isOpen={!!contractorToRemove}\n onClose={() => {\n setContractorToRemove(null)\n }}\n onPrimaryActionClick={async () => {\n if (contractorToRemove) {\n try {\n await onDelete(contractorToRemove)\n setContractorToRemove(null)\n } catch {\n // Keep dialog open on error\n }\n }\n }}\n isPrimaryActionLoading={status.isPending}\n isDestructive\n title={t('removeDialog.title')}\n primaryActionLabel={t('removeDialog.confirmCta')}\n closeActionLabel={t('removeDialog.cancelCta')}\n >\n {t('removeDialog.description')}\n </Components.Dialog>\n\n <Components.Dialog\n isOpen={!!cancelAction}\n onClose={() => {\n setCancelAction(null)\n }}\n onPrimaryActionClick={async () => {\n if (!cancelAction) return\n try {\n if (cancelAction.type === 'rehire') {\n await onCancelRehire(cancelAction.contractorId)\n } else {\n await onCancelDismissal(cancelAction.contractorId)\n }\n setCancelAction(null)\n } catch {\n // Keep dialog open on error\n }\n }}\n isPrimaryActionLoading={status.isPending}\n title={\n cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.title')\n : t('cancelDismissalDialog.title')\n }\n primaryActionLabel={\n cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.confirmCta')\n : t('cancelDismissalDialog.confirmCta')\n }\n closeActionLabel={\n cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.cancelCta')\n : t('cancelDismissalDialog.cancelCta')\n }\n >\n {cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.description')\n : t('cancelDismissalDialog.description')}\n </Components.Dialog>\n </>\n )\n}\n"],"names":["contractorDisplayName","contractor","CONTRACTOR_TYPE","firstLastName","ContractorNameCell","Components","useComponentContext","jsxs","Flex","jsx","formatBadgeDate","dateStr","date","normalizeToDate","formatDateLong","formatDateLongWithYear","isOnboardingEditReview","onboardingStatus","ContractorOnboardingStatus","ManagementContractorListView","contractors","isFetching","selectedTab","onTabChange","status","pagination","onEdit","onView","onDismiss","onRehire","onDelete","onCancelSelfOnboarding","onCancelDismissal","onCancelRehire","onAddContractor","t","useTranslation","contractorToRemove","setContractorToRemove","useState","cancelAction","setCancelAction","tabs","getColumns","nameColumn","ContractorOnboardingStatusBadge","dataViewProps","useDataView","menuItems","XCircleSvg","TrashCanSvg","HamburgerMenu","EyeSvg","SlashCircleSvg","PlusCircleIcon","EmptyData","Fragment","id","DataView"],"mappings":";;;;;;;;;;;;;;;;;;AAqCA,SAASA,EAAsBC,GAAmC;AAChE,SAAOA,EAAW,SAASC,EAAgB,WACtCD,EAAW,gBAAgB,KAC5BE,EAAc,EAAE,YAAYF,EAAW,WAAW,WAAWA,EAAW,UAAU;AACxF;AAEA,SAASG,EAAmB,EAAE,YAAAH,KAAqD;AACjF,QAAMI,IAAaC,EAAA;AACnB,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,IAAA,gBAAAC,EAACJ,EAAW,MAAX,EAAgB,MAAK,MAAK,QAAO,UAC/B,UAAAL,EAAsBC,CAAU,EAAA,CACnC;AAAA,IACA,gBAAAQ,EAACJ,EAAW,MAAX,EAAgB,SAAQ,cAAa,MAAK,MACxC,UAAAJ,EAAW,QAAQ,IAAA,CACtB;AAAA,EAAA,GACF;AAEJ;AAEA,SAASS,EAAgBC,GAAyB;AAChD,QAAMC,IAAOC,EAAgBF,CAAO;AACpC,SAAKC,IACcA,EAAK,YAAA,OAAkB,oBAAI,KAAA,GAAO,YAAA,IACjCE,EAAeF,CAAI,IAAIG,EAAuBH,CAAI,IAFpD;AAGpB;AAEA,SAAS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AAA,QAC/B,eAAa;AAAA,QACb,OAAOW,EAAE,oBAAoB;AAAA,QAC7B,oBAAoBA,EAAE,yBAAyB;AAAA,QAC/C,kBAAkBA,EAAE,wBAAwB;AAAA,QAE3C,YAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAG/B,gBAAA1B;AAAA,MAACJ,EAAW;AAAA,MAAX;AAAA,QACC,QAAQ,CAAC,CAACmC;AAAA,QACV,SAAS,MAAM;AACb,UAAAC,EAAgB,IAAI;AAAA,QACtB;AAAA,QACA,sBAAsB,YAAY;AAChC,cAAKD;AACL,gBAAI;AACF,cAAIA,EAAa,SAAS,WACxB,MAAMP,EAAeO,EAAa,YAAY,IAE9C,MAAMR,EAAkBQ,EAAa,YAAY,GAEnDC,EAAgB,IAAI;AAAA,YACtB,QAAQ;AAAA,YAER;AAAA,QACF;AAAA,QACA,wBAAwBjB,EAAO;AAAA,QAC/B,OACEgB,GAAc,SAAS,WACnBL,EAAE,0BAA0B,IAC5BA,EAAE,6BAA6B;AAAA,QAErC,oBACEK,GAAc,SAAS,WACnBL,EAAE,+BAA+B,IACjCA,EAAE,kCAAkC;AAAA,QAE1C,kBACEK,GAAc,SAAS,WACnBL,EAAE,8BAA8B,IAChCA,EAAE,iCAAiC;AAAA,QAGxC,aAAc,SAAS,WACpBA,EAAE,gCAAgC,IAClCA,EAAE,mCAAmC;AAAA,MAAA;AAAA,IAAA;AAAA,EAC3C,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ManagementContractorListView.js","sources":["../../../../../src/components/Contractor/ContractorList/management/ManagementContractorListView.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { UseContractorListResult, ContractorWithActions } from '../shared/useContractorList'\nimport type { ContractorTab } from './ManagementContractorList'\nimport { DataView, EmptyData, useDataView, Flex, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { ContractorOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport XCircleSvg from '@/assets/icons/x-circle.svg?react'\nimport EyeSvg from '@/assets/icons/eye.svg?react'\nimport SlashCircleSvg from '@/assets/icons/slash-circle.svg?react'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport { normalizeToDate, formatDateLong, formatDateLongWithYear } from '@/helpers/dateFormatting'\nimport { CONTRACTOR_TYPE, ContractorOnboardingStatus } from '@/shared/constants'\n\n/** @internal */\nexport interface ManagementContractorListViewProps extends Pick<\n Extract<UseContractorListResult, { isLoading: false }>,\n 'pagination' | 'status'\n> {\n contractors: ContractorWithActions[]\n isFetching: boolean\n selectedTab: ContractorTab\n onTabChange: (tab: ContractorTab) => void\n onEdit: (contractorId: string) => void\n onView: (contractorId: string) => void\n onDismiss: (contractorId: string) => void\n onRehire: (contractorId: string) => void\n onDelete: (contractorId: string) => Promise<void>\n onCancelSelfOnboarding: (contractorId: string) => Promise<void>\n onCancelDismissal: (contractorId: string) => Promise<void>\n onCancelRehire: (contractorId: string) => Promise<void>\n onAddContractor: () => void\n}\n\nfunction contractorDisplayName(contractor: ContractorWithActions) {\n return contractor.type === CONTRACTOR_TYPE.BUSINESS\n ? (contractor.businessName ?? '')\n : firstLastName({ first_name: contractor.firstName, last_name: contractor.lastName })\n}\n\nfunction ContractorNameCell({ contractor }: { contractor: ContractorWithActions }) {\n const Components = useComponentContext()\n return (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text size=\"sm\" weight=\"medium\">\n {contractorDisplayName(contractor)}\n </Components.Text>\n <Components.Text variant=\"supporting\" size=\"sm\">\n {contractor.type ?? '–'}\n </Components.Text>\n </Flex>\n )\n}\n\nfunction formatBadgeDate(dateStr: string): string {\n const date = normalizeToDate(dateStr)\n if (!date) return ''\n const isSameYear = date.getFullYear() === new Date().getFullYear()\n return isSameYear ? formatDateLong(date) : formatDateLongWithYear(date)\n}\n\nfunction isOnboardingEditReview(onboardingStatus?: string | null) {\n return (\n onboardingStatus === ContractorOnboardingStatus.ADMIN_ONBOARDING_REVIEW ||\n onboardingStatus === ContractorOnboardingStatus.SELF_ONBOARDING_REVIEW\n )\n}\n\n/** @internal */\nexport function ManagementContractorListView({\n contractors,\n isFetching,\n selectedTab,\n onTabChange,\n status,\n pagination,\n onEdit,\n onView,\n onDismiss,\n onRehire,\n onDelete,\n onCancelSelfOnboarding,\n onCancelDismissal,\n onCancelRehire,\n onAddContractor,\n}: ManagementContractorListViewProps) {\n const { t } = useTranslation('Contractor.ManagementContractorList')\n const Components = useComponentContext()\n const [contractorToRemove, setContractorToRemove] = useState<string | null>(null)\n const [cancelAction, setCancelAction] = useState<{\n contractorId: string\n type: 'dismissal' | 'rehire'\n } | null>(null)\n\n const tabs = [\n { id: 'active', label: t('tabs.active'), content: null },\n { id: 'onboarding', label: t('tabs.onboarding'), content: null },\n { id: 'dismissed', label: t('tabs.dismissed'), content: null },\n ]\n\n const getColumns = () => {\n const nameColumn = {\n key: 'name',\n title: t('nameLabel'),\n render: (contractor: ContractorWithActions) => <ContractorNameCell contractor={contractor} />,\n }\n\n if (selectedTab === 'active') {\n return [\n nameColumn,\n {\n key: 'rate',\n title: t('rateLabel'),\n render: (contractor: ContractorWithActions) =>\n contractor.wageType === 'Hourly' && contractor.hourlyRate\n ? t('rateHourly', { rate: `$${contractor.hourlyRate}` })\n : (contractor.wageType ?? '–'),\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('statusColumnLabel')}</VisuallyHidden>,\n render: (contractor: ContractorWithActions) => {\n if (contractor.upcomingEmployment?.startDate) {\n return (\n <Components.Badge status=\"info\">\n {t('startsBadge', {\n date: formatBadgeDate(contractor.upcomingEmployment.startDate),\n })}\n </Components.Badge>\n )\n }\n if (contractor.dismissalDate) {\n return (\n <Components.Badge status=\"warning\">\n {t('lastDayBadge', { date: formatBadgeDate(contractor.dismissalDate) })}\n </Components.Badge>\n )\n }\n return null\n },\n },\n ]\n }\n\n if (selectedTab === 'onboarding') {\n return [\n nameColumn,\n {\n key: 'status',\n title: t('onboardingStatusLabel'),\n render: (contractor: ContractorWithActions) => (\n <Flex alignItems=\"center\" gap={8}>\n <ContractorOnboardingStatusBadge\n onboarded={contractor.onboarded}\n onboardingStatus={contractor.onboardingStatus}\n />\n {contractor.onboardingStatus === ContractorOnboardingStatus.ONBOARDING_COMPLETED &&\n contractor.upcomingEmployment?.startDate && (\n <Components.Badge status=\"info\">\n {t('startsBadge', {\n date: formatBadgeDate(contractor.upcomingEmployment.startDate),\n })}\n </Components.Badge>\n )}\n </Flex>\n ),\n },\n ]\n }\n\n return [\n nameColumn,\n {\n key: 'dismissalDate',\n title: t('dismissalDateLabel'),\n render: (contractor: ContractorWithActions) =>\n contractor.dismissalDate ? formatBadgeDate(contractor.dismissalDate) : '–',\n },\n ]\n }\n\n const { ...dataViewProps } = useDataView({\n data: contractors,\n columns: getColumns(),\n itemMenu: contractor => {\n if (selectedTab === 'onboarding') {\n const menuItems = []\n\n if (contractor.allowedActions.includes('cancel_self_onboarding')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: () => {\n void onCancelSelfOnboarding(contractor.uuid)\n },\n icon: <XCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('delete')) {\n menuItems.push({\n label: t('removeCta'),\n onClick: () => {\n setContractorToRemove(contractor.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return (\n <Flex alignItems=\"center\" justifyContent=\"flex-end\" gap={4}>\n {contractor.allowedActions.includes('edit') && (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEdit(contractor.uuid)\n }}\n >\n {isOnboardingEditReview(contractor.onboardingStatus)\n ? t('reviewCta')\n : t('continueCta')}\n </Components.Button>\n )}\n <HamburgerMenu items={menuItems} triggerLabel={t('hamburgerTitle')} />\n </Flex>\n )\n }\n\n const menuItems = []\n\n if (contractor.allowedActions.includes('view')) {\n menuItems.push({\n label: t('viewDetailsCta'),\n onClick: () => {\n onView(contractor.uuid)\n },\n icon: <EyeSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('cancel_rehire')) {\n menuItems.push({\n label: t('cancelRehireCta'),\n onClick: () => {\n setCancelAction({ contractorId: contractor.uuid, type: 'rehire' })\n },\n icon: <XCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('cancel_dismissal')) {\n menuItems.push({\n label: t('cancelDismissalCta'),\n onClick: () => {\n setCancelAction({ contractorId: contractor.uuid, type: 'dismissal' })\n },\n icon: <XCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('dismiss')) {\n menuItems.push({\n label: t('dismissCta'),\n onClick: () => {\n onDismiss(contractor.uuid)\n },\n icon: <SlashCircleSvg aria-hidden />,\n })\n }\n\n if (contractor.allowedActions.includes('rehire')) {\n menuItems.push({\n label: t('rehireCta'),\n onClick: () => {\n onRehire(contractor.uuid)\n },\n icon: <PlusCircleIcon aria-hidden />,\n })\n }\n\n return <HamburgerMenu items={menuItems} triggerLabel={t('hamburgerTitle')} />\n },\n isFetching,\n pagination,\n emptyState: () => (\n <EmptyData\n title={t(`emptyState.${selectedTab}.title`)}\n description={t(`emptyState.${selectedTab}.description`)}\n />\n ),\n })\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Components.Button variant=\"secondary\" onClick={onAddContractor}>\n {t('addContractorCta')}\n </Components.Button>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n onTabChange(id as ContractorTab)\n }}\n aria-label={t('tabsLabel')}\n />\n\n <DataView label={t('contractorListLabel')} {...dataViewProps} />\n </Flex>\n </Flex>\n\n <Components.Dialog\n isOpen={!!contractorToRemove}\n onClose={() => {\n setContractorToRemove(null)\n }}\n onPrimaryActionClick={async () => {\n if (contractorToRemove) {\n try {\n await onDelete(contractorToRemove)\n setContractorToRemove(null)\n } catch {\n // Keep dialog open on error\n }\n }\n }}\n isPrimaryActionLoading={status.isPending}\n isDestructive\n title={t('removeDialog.title')}\n primaryActionLabel={t('removeDialog.confirmCta')}\n closeActionLabel={t('removeDialog.cancelCta')}\n >\n {t('removeDialog.description')}\n </Components.Dialog>\n\n <Components.Dialog\n isOpen={!!cancelAction}\n onClose={() => {\n setCancelAction(null)\n }}\n onPrimaryActionClick={async () => {\n if (!cancelAction) return\n try {\n if (cancelAction.type === 'rehire') {\n await onCancelRehire(cancelAction.contractorId)\n } else {\n await onCancelDismissal(cancelAction.contractorId)\n }\n setCancelAction(null)\n } catch {\n // Keep dialog open on error\n }\n }}\n isPrimaryActionLoading={status.isPending}\n title={\n cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.title')\n : t('cancelDismissalDialog.title')\n }\n primaryActionLabel={\n cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.confirmCta')\n : t('cancelDismissalDialog.confirmCta')\n }\n closeActionLabel={\n cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.cancelCta')\n : t('cancelDismissalDialog.cancelCta')\n }\n >\n {cancelAction?.type === 'rehire'\n ? t('cancelRehireDialog.description')\n : t('cancelDismissalDialog.description')}\n </Components.Dialog>\n </>\n )\n}\n"],"names":["contractorDisplayName","contractor","CONTRACTOR_TYPE","firstLastName","ContractorNameCell","Components","useComponentContext","jsxs","Flex","jsx","formatBadgeDate","dateStr","date","normalizeToDate","formatDateLong","formatDateLongWithYear","isOnboardingEditReview","onboardingStatus","ContractorOnboardingStatus","ManagementContractorListView","contractors","isFetching","selectedTab","onTabChange","status","pagination","onEdit","onView","onDismiss","onRehire","onDelete","onCancelSelfOnboarding","onCancelDismissal","onCancelRehire","onAddContractor","t","useTranslation","contractorToRemove","setContractorToRemove","useState","cancelAction","setCancelAction","tabs","getColumns","nameColumn","VisuallyHidden","ContractorOnboardingStatusBadge","dataViewProps","useDataView","menuItems","XCircleSvg","TrashCanSvg","HamburgerMenu","EyeSvg","SlashCircleSvg","PlusCircleIcon","EmptyData","Fragment","id","DataView"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,SAASA,EAAsBC,GAAmC;AAChE,SAAOA,EAAW,SAASC,EAAgB,WACtCD,EAAW,gBAAgB,KAC5BE,EAAc,EAAE,YAAYF,EAAW,WAAW,WAAWA,EAAW,UAAU;AACxF;AAEA,SAASG,EAAmB,EAAE,YAAAH,KAAqD;AACjF,QAAMI,IAAaC,EAAA;AACnB,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,IAAA,gBAAAC,EAACJ,EAAW,MAAX,EAAgB,MAAK,MAAK,QAAO,UAC/B,UAAAL,EAAsBC,CAAU,EAAA,CACnC;AAAA,IACA,gBAAAQ,EAACJ,EAAW,MAAX,EAAgB,SAAQ,cAAa,MAAK,MACxC,UAAAJ,EAAW,QAAQ,IAAA,CACtB;AAAA,EAAA,GACF;AAEJ;AAEA,SAASS,EAAgBC,GAAyB;AAChD,QAAMC,IAAOC,EAAgBF,CAAO;AACpC,SAAKC,IACcA,EAAK,YAAA,OAAkB,oBAAI,KAAA,GAAO,YAAA,IACjCE,EAAeF,CAAI,IAAIG,EAAuBH,CAAI,IAFpD;AAGpB;AAEA,SAASI,GAAuBC,GAAkC;AAChE,SACEA,MAAqBC,EAA2B,2BAChDD,MAAqBC,EAA2B;AAEpD;AAGO,SAASC,GAA6B;AAAA,EAC3C,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,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,QAAQ,CAAC,CAACmC;AAAA,QACV,SAAS,MAAM;AACb,UAAAC,EAAgB,IAAI;AAAA,QACtB;AAAA,QACA,sBAAsB,YAAY;AAChC,cAAKD;AACL,gBAAI;AACF,cAAIA,EAAa,SAAS,WACxB,MAAMP,EAAeO,EAAa,YAAY,IAE9C,MAAMR,EAAkBQ,EAAa,YAAY,GAEnDC,EAAgB,IAAI;AAAA,YACtB,QAAQ;AAAA,YAER;AAAA,QACF;AAAA,QACA,wBAAwBjB,EAAO;AAAA,QAC/B,OACEgB,GAAc,SAAS,WACnBL,EAAE,0BAA0B,IAC5BA,EAAE,6BAA6B;AAAA,QAErC,oBACEK,GAAc,SAAS,WACnBL,EAAE,+BAA+B,IACjCA,EAAE,kCAAkC;AAAA,QAE1C,kBACEK,GAAc,SAAS,WACnBL,EAAE,8BAA8B,IAChCA,EAAE,iCAAiC;AAAA,QAGxC,aAAc,SAAS,WACpBA,EAAE,gCAAgC,IAClCA,EAAE,mCAAmC;AAAA,MAAA;AAAA,IAAA;AAAA,EAC3C,GACF;AAEJ;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { normalizeSSN as i } from "../../../../../../helpers/ssn.js";
|
|
3
|
+
import { normalizeEin as o } from "../../../../../../helpers/federalEin.js";
|
|
2
4
|
import { TextInputHookField as r } from "../../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
3
|
-
import { SelectHookField as i } from "../../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
4
5
|
import { CheckboxHookField as t } from "../../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { normalizeEin as a } from "../../../../../../helpers/federalEin.js";
|
|
6
|
+
import { SelectHookField as m } from "../../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
7
|
+
import { RadioGroupHookField as a } from "../../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
8
8
|
function p(e) {
|
|
9
9
|
return /* @__PURE__ */ n(r, { ...e, name: "name" });
|
|
10
10
|
}
|
|
11
11
|
function x(e) {
|
|
12
|
-
return /* @__PURE__ */ n(
|
|
12
|
+
return /* @__PURE__ */ n(a, { ...e, name: "taxClassification" });
|
|
13
13
|
}
|
|
14
14
|
function A(e) {
|
|
15
15
|
return /* @__PURE__ */ n(r, { ...e, name: "homeAddressStreet1" });
|
|
@@ -24,10 +24,10 @@ function H(e) {
|
|
|
24
24
|
return /* @__PURE__ */ n(r, { ...e, name: "homeAddressZip" });
|
|
25
25
|
}
|
|
26
26
|
function h(e) {
|
|
27
|
-
return /* @__PURE__ */ n(r, { ...e, name: "ssn", transform:
|
|
27
|
+
return /* @__PURE__ */ n(r, { ...e, name: "ssn", transform: i });
|
|
28
28
|
}
|
|
29
29
|
function N(e) {
|
|
30
|
-
return /* @__PURE__ */ n(r, { ...e, name: "ein", transform:
|
|
30
|
+
return /* @__PURE__ */ n(r, { ...e, name: "ein", transform: o });
|
|
31
31
|
}
|
|
32
32
|
function g(e) {
|
|
33
33
|
return /* @__PURE__ */ n(r, { ...e, name: "signatureText" });
|
|
@@ -39,7 +39,7 @@ function T(e) {
|
|
|
39
39
|
return /* @__PURE__ */ n(r, { ...e, name: "businessName" });
|
|
40
40
|
}
|
|
41
41
|
function k(e) {
|
|
42
|
-
return /* @__PURE__ */ n(
|
|
42
|
+
return /* @__PURE__ */ n(m, { ...e, name: "llcClassificationCode" });
|
|
43
43
|
}
|
|
44
44
|
function b(e) {
|
|
45
45
|
return /* @__PURE__ */ n(r, { ...e, name: "otherText" });
|
|
@@ -1,58 +1,59 @@
|
|
|
1
1
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useContractorsGetSuspense as
|
|
4
|
-
import { useCompaniesGetSuspense as
|
|
2
|
+
import { useTranslation as g } from "react-i18next";
|
|
3
|
+
import { useContractorsGetSuspense as C } from "@gusto/embedded-api/react-query/contractorsGet";
|
|
4
|
+
import { useCompaniesGetSuspense as x } from "@gusto/embedded-api/react-query/companiesGet";
|
|
5
5
|
import c from "dompurify";
|
|
6
6
|
import { useMemo as m } from "react";
|
|
7
|
-
import { BaseComponent as
|
|
8
|
-
import { useBase as
|
|
7
|
+
import { BaseComponent as N } from "../../Base/Base.js";
|
|
8
|
+
import { useBase as y } from "../../Base/useBase.js";
|
|
9
9
|
import { Flex as a } from "../../Common/Flex/Flex.js";
|
|
10
|
-
import { ActionsLayout as
|
|
11
|
-
import { useComponentContext as
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import { componentEvents as
|
|
14
|
-
import
|
|
15
|
-
function
|
|
16
|
-
return
|
|
10
|
+
import { ActionsLayout as S } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
|
+
import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { useI18n as L, useComponentDictionary as R } from "../../../i18n/I18n.js";
|
|
13
|
+
import { componentEvents as T } from "../../../shared/constants.js";
|
|
14
|
+
import v from "../../../assets/icons/icon-arrow-right.svg.js";
|
|
15
|
+
function w(e) {
|
|
16
|
+
return /* @__PURE__ */ n(N, { ...e, children: /* @__PURE__ */ n(A, { ...e, children: e.children }) });
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const A = ({ contractorId: e, companyId: p, className: d, dictionary: l }) => {
|
|
19
|
+
L("Contractor.Landing"), R("Contractor.Landing", l);
|
|
20
|
+
const { onEvent: u } = y(), o = D(), { t } = g("Contractor.Landing"), {
|
|
20
21
|
data: { contractor: i }
|
|
21
|
-
} =
|
|
22
|
+
} = C({ contractorUuid: e }), f = m(
|
|
22
23
|
() => c.sanitize(i?.firstName ?? i?.businessName ?? t("fallbackName")),
|
|
23
24
|
[i, t]
|
|
24
25
|
), {
|
|
25
26
|
data: { company: s }
|
|
26
|
-
} =
|
|
27
|
-
return /* @__PURE__ */ n("section", { className:
|
|
28
|
-
|
|
27
|
+
} = x({ companyId: p }), h = m(() => c.sanitize(s?.name ?? ""), [s]);
|
|
28
|
+
return /* @__PURE__ */ n("section", { className: d, children: /* @__PURE__ */ n(
|
|
29
|
+
o.Box,
|
|
29
30
|
{
|
|
30
|
-
footer: /* @__PURE__ */ n(
|
|
31
|
-
|
|
31
|
+
footer: /* @__PURE__ */ n(S, { children: /* @__PURE__ */ r(
|
|
32
|
+
o.Button,
|
|
32
33
|
{
|
|
33
34
|
variant: "secondary",
|
|
34
35
|
onClick: () => {
|
|
35
|
-
|
|
36
|
+
u(T.CONTRACTOR_SELF_ONBOARDING_START);
|
|
36
37
|
},
|
|
37
38
|
children: [
|
|
38
39
|
t("getStartedCta"),
|
|
39
|
-
/* @__PURE__ */ n(
|
|
40
|
+
/* @__PURE__ */ n(v, { "aria-hidden": !0 })
|
|
40
41
|
]
|
|
41
42
|
}
|
|
42
43
|
) }),
|
|
43
44
|
children: /* @__PURE__ */ r(a, { alignItems: "center", flexDirection: "column", gap: 32, children: [
|
|
44
45
|
/* @__PURE__ */ r(a, { flexDirection: "column", gap: 4, children: [
|
|
45
|
-
/* @__PURE__ */ n(
|
|
46
|
-
contractorName:
|
|
47
|
-
companyName:
|
|
46
|
+
/* @__PURE__ */ n(o.Heading, { as: "h2", children: t("landingSubtitle", {
|
|
47
|
+
contractorName: f,
|
|
48
|
+
companyName: h,
|
|
48
49
|
interpolation: { escapeValue: !1 }
|
|
49
50
|
}) }),
|
|
50
|
-
/* @__PURE__ */ n(
|
|
51
|
+
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("landingDescription") })
|
|
51
52
|
] }),
|
|
52
53
|
/* @__PURE__ */ r(a, { flexDirection: "column", gap: 8, children: [
|
|
53
|
-
/* @__PURE__ */ n(
|
|
54
|
+
/* @__PURE__ */ n(o.Heading, { as: "h3", children: t("stepsSubtitle") }),
|
|
54
55
|
/* @__PURE__ */ n(
|
|
55
|
-
|
|
56
|
+
o.UnorderedList,
|
|
56
57
|
{
|
|
57
58
|
items: [
|
|
58
59
|
t("steps.profile"),
|
|
@@ -68,6 +69,6 @@ const v = ({ contractorId: o, companyId: d, className: p }) => {
|
|
|
68
69
|
) });
|
|
69
70
|
};
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
w as Landing
|
|
72
73
|
};
|
|
73
74
|
//# sourceMappingURL=Landing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Contractor/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useContractorsGetSuspense } from '@gusto/embedded-api/react-query/contractorsGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport DOMPurify from 'dompurify'\nimport { useMemo } from 'react'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\n\n/**\n * Props for the {@link Landing} component.\n *\n * @public\n */\nexport interface LandingProps extends BaseComponentInterface<'Contractor.Landing'> {\n /** UUID of the contractor entering the self-onboarding flow. */\n contractorId: string\n /** UUID of the company the contractor belongs to. */\n companyId: string\n}\n\n/**\n * Landing page for the contractor self-onboarding flow. Displays a welcome\n * message and the list of onboarding steps the contractor needs to complete.\n *\n * @public\n */\nexport function Landing(props: LandingProps) {\n
|
|
1
|
+
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Contractor/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useContractorsGetSuspense } from '@gusto/embedded-api/react-query/contractorsGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport DOMPurify from 'dompurify'\nimport { useMemo } from 'react'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\n\n/**\n * Props for the {@link Landing} component.\n *\n * @public\n */\nexport interface LandingProps extends BaseComponentInterface<'Contractor.Landing'> {\n /** UUID of the contractor entering the self-onboarding flow. */\n contractorId: string\n /** UUID of the company the contractor belongs to. */\n companyId: string\n}\n\n/**\n * Landing page for the contractor self-onboarding flow. Displays a welcome\n * message and the list of onboarding steps the contractor needs to complete.\n *\n * @public\n */\nexport function Landing(props: LandingProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ contractorId, companyId, className, dictionary }: LandingProps) => {\n useI18n('Contractor.Landing')\n useComponentDictionary('Contractor.Landing', dictionary)\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Contractor.Landing')\n\n const {\n data: { contractor },\n } = useContractorsGetSuspense({ contractorUuid: contractorId })\n const sanitizedContractorName = useMemo(\n () =>\n DOMPurify.sanitize(contractor?.firstName ?? contractor?.businessName ?? t('fallbackName')),\n [contractor, t],\n )\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const sanitizedCompanyName = useMemo(() => DOMPurify.sanitize(company?.name ?? ''), [company])\n\n return (\n <section className={className}>\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CONTRACTOR_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t('landingSubtitle', {\n contractorName: sanitizedContractorName,\n companyName: sanitizedCompanyName,\n interpolation: { escapeValue: false },\n })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('landingDescription')}</Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[\n t('steps.profile'),\n t('steps.address'),\n t('steps.paymentMethod'),\n t('steps.documents'),\n ]}\n />\n </Flex>\n </Flex>\n </Components.Box>\n </section>\n )\n}\n"],"names":["Landing","props","jsx","BaseComponent","Root","contractorId","companyId","className","dictionary","useI18n","useComponentDictionary","onEvent","useBase","Components","useComponentContext","useTranslation","contractor","useContractorsGetSuspense","sanitizedContractorName","useMemo","DOMPurify","company","useCompaniesGetSuspense","sanitizedCompanyName","ActionsLayout","jsxs","componentEvents","ArrowRightIcon","Flex"],"mappings":";;;;;;;;;;;;;;AA+BO,SAASA,EAAQC,GAAqB;AAC3C,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,cAAAC,GAAc,WAAAC,GAAW,WAAAC,GAAW,YAAAC,QAA+B;AACjF,EAAAC,EAAQ,oBAAoB,GAC5BC,EAAuB,sBAAsBF,CAAU;AACvD,QAAM,EAAE,SAAAG,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEb,EAAE,EAAA,IAAMC,EAAe,oBAAoB,GAE3C;AAAA,IACJ,MAAM,EAAE,YAAAC,EAAA;AAAA,EAAW,IACjBC,EAA0B,EAAE,gBAAgBZ,GAAc,GACxDa,IAA0BC;AAAA,IAC9B,MACEC,EAAU,SAASJ,GAAY,aAAaA,GAAY,gBAAgB,EAAE,cAAc,CAAC;AA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AA,YAAX;AAAA,cACC,OAAO;AAAA,gBACL,EAAE,eAAe;AAAA,gBACjB,EAAE,eAAe;AAAA,gBACjB,EAAE,qBAAqB;AAAA,gBACvB,EAAE,iBAAiB;AAAA,cAAA;AAAA,YACrB;AAAA,UAAA;AAAA,QACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { BaseComponent as
|
|
4
|
-
import { useBase as
|
|
2
|
+
import { useTranslation as s } from "react-i18next";
|
|
3
|
+
import { BaseComponent as l } from "../../Base/Base.js";
|
|
4
|
+
import { useBase as d } from "../../Base/useBase.js";
|
|
5
5
|
import { Flex as i } from "../../Common/Flex/Flex.js";
|
|
6
|
-
import { ActionsLayout as
|
|
7
|
-
import { useComponentContext as
|
|
6
|
+
import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
8
|
import { useI18n as f, useComponentDictionary as C } from "../../../i18n/I18n.js";
|
|
9
|
-
import { componentEvents as
|
|
10
|
-
function
|
|
11
|
-
return
|
|
9
|
+
import { componentEvents as h } from "../../../shared/constants.js";
|
|
10
|
+
function N(o) {
|
|
11
|
+
return /* @__PURE__ */ n(l, { ...o, children: /* @__PURE__ */ n(g, { ...o, children: o.children }) });
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const g = ({ contractorId: o, className: m, dictionary: c }) => {
|
|
14
|
+
f("Contractor.OnboardingSummary"), C("Contractor.OnboardingSummary", c);
|
|
15
|
+
const { onEvent: a } = d(), { t } = s("Contractor.OnboardingSummary"), r = p();
|
|
16
|
+
return /* @__PURE__ */ n("section", { className: m, children: /* @__PURE__ */ e(i, { flexDirection: "column", gap: 32, children: [
|
|
16
17
|
/* @__PURE__ */ e(i, { alignItems: "center", flexDirection: "column", gap: 8, children: [
|
|
17
|
-
/* @__PURE__ */ n(r.Heading, { as: "h2", textAlign: "center", children:
|
|
18
|
-
/* @__PURE__ */ n(r.Text, { textAlign: "center", children:
|
|
18
|
+
/* @__PURE__ */ n(r.Heading, { as: "h2", textAlign: "center", children: t("subtitle") }),
|
|
19
|
+
/* @__PURE__ */ n(r.Text, { textAlign: "center", children: t("description") })
|
|
19
20
|
] }),
|
|
20
|
-
/* @__PURE__ */ n(
|
|
21
|
+
/* @__PURE__ */ n(u, { justifyContent: "center", children: /* @__PURE__ */ n(
|
|
21
22
|
r.Button,
|
|
22
23
|
{
|
|
23
24
|
variant: "secondary",
|
|
24
25
|
onClick: () => {
|
|
25
|
-
|
|
26
|
+
a(h.CONTRACTOR_SELF_ONBOARDING_DONE, { contractorId: o });
|
|
26
27
|
},
|
|
27
|
-
children:
|
|
28
|
+
children: t("doneCta")
|
|
28
29
|
}
|
|
29
30
|
) })
|
|
30
31
|
] }) });
|
|
31
32
|
};
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
N as OnboardingSummary
|
|
34
35
|
};
|
|
35
36
|
//# sourceMappingURL=OnboardingSummary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingSummary.js","sources":["../../../../src/components/Contractor/OnboardingSummary/OnboardingSummary.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\n/**\n * Props for {@link OnboardingSummary}.\n *\n * @public\n */\nexport interface OnboardingSummaryProps extends BaseComponentInterface<'Contractor.OnboardingSummary'> {\n /** UUID of the contractor who completed self-onboarding. */\n contractorId: string\n}\n\n/**\n * Confirmation screen shown at the end of the contractor self-onboarding flow.\n * Lets the contractor know their information has been submitted and emits\n * `contractor/selfOnboarding/done` when they acknowledge it.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/selfOnboarding/done` | Fired when the contractor acknowledges completion and clicks the Done button | `{ contractorId: string }` |\n *\n * @public\n */\nexport function OnboardingSummary(props: OnboardingSummaryProps) {\n
|
|
1
|
+
{"version":3,"file":"OnboardingSummary.js","sources":["../../../../src/components/Contractor/OnboardingSummary/OnboardingSummary.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\n/**\n * Props for {@link OnboardingSummary}.\n *\n * @public\n */\nexport interface OnboardingSummaryProps extends BaseComponentInterface<'Contractor.OnboardingSummary'> {\n /** UUID of the contractor who completed self-onboarding. */\n contractorId: string\n}\n\n/**\n * Confirmation screen shown at the end of the contractor self-onboarding flow.\n * Lets the contractor know their information has been submitted and emits\n * `contractor/selfOnboarding/done` when they acknowledge it.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/selfOnboarding/done` | Fired when the contractor acknowledges completion and clicks the Done button | `{ contractorId: string }` |\n *\n * @public\n */\nexport function OnboardingSummary(props: OnboardingSummaryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ contractorId, className, dictionary }: OnboardingSummaryProps) => {\n useI18n('Contractor.OnboardingSummary')\n useComponentDictionary('Contractor.OnboardingSummary', dictionary)\n const { onEvent } = useBase()\n const { t } = useTranslation('Contractor.OnboardingSummary')\n const Components = useComponentContext()\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('subtitle')}\n </Components.Heading>\n <Components.Text textAlign=\"center\">{t('description')}</Components.Text>\n </Flex>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CONTRACTOR_SELF_ONBOARDING_DONE, { contractorId })\n }}\n >\n {t('doneCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </section>\n )\n}\n"],"names":["OnboardingSummary","props","jsx","BaseComponent","Root","contractorId","className","dictionary","useI18n","useComponentDictionary","onEvent","useBase","useTranslation","Components","useComponentContext","jsxs","Flex","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;AA8BO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,cAAAC,GAAc,WAAAC,GAAW,YAAAC,QAAyC;AAChF,EAAAC,EAAQ,8BAA8B,GACtCC,EAAuB,gCAAgCF,CAAU;AACjE,QAAM,EAAE,SAAAG,EAAA,IAAYC,EAAA,GACd,EAAE,EAAA,IAAMC,EAAe,8BAA8B,GACrDC,IAAaC,EAAA;AAEnB,SACE,gBAAAZ,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAS,EAACC,KAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,KAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,MAAA,gBAAAd,EAACW,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAA,EAAE,UAAU,EAAA,CACf;AAAA,MACA,gBAAAX,EAACW,EAAW,MAAX,EAAgB,WAAU,UAAU,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GACxD;AAAA,IACA,gBAAAX,EAACe,GAAA,EAAc,gBAAe,UAC5B,UAAA,gBAAAf;AAAA,MAACW,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAH,EAAQQ,EAAgB,iCAAiC,EAAE,cAAAb,EAAA,CAAc;AAAA,QAC3E;AAAA,QAEC,YAAE,SAAS;AAAA,MAAA;AAAA,IAAA,EACd,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { TextInputHookField as o } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
3
2
|
import { RadioGroupHookField as r } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
3
|
+
import { TextInputHookField as o } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
4
4
|
function m(e) {
|
|
5
5
|
return /* @__PURE__ */ n(o, { ...e, name: "name" });
|
|
6
6
|
}
|