@remoteoss/remote-flows 1.2.2 → 1.2.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/dist/{chunk-ZP2BE7U6.js → chunk-3A5JJLQP.js} +2 -2
- package/dist/{chunk-BEWGN2JK.js → chunk-3I4WL35F.js} +2 -2
- package/dist/{chunk-KCXAXVC5.js → chunk-3YVCOYUM.js} +2 -2
- package/dist/{chunk-GBZXVNGQ.js → chunk-4PZNLTCY.js} +2 -2
- package/dist/{chunk-46FT5RHQ.js → chunk-5A7SON2J.js} +2 -2
- package/dist/{chunk-O37C4LZF.js → chunk-5Z47HXNS.js} +2 -2
- package/dist/{chunk-3ALAJXRV.js → chunk-7F742TXN.js} +2 -2
- package/dist/{chunk-RTKKWC4M.js → chunk-BKEIB7VP.js} +2 -2
- package/dist/{chunk-CULOWG5X.js → chunk-CG57ORFU.js} +2 -2
- package/dist/{chunk-5JLTIH7G.js → chunk-DHIFFMY4.js} +2 -2
- package/dist/{chunk-A3K4Q2U6.js → chunk-EI7F3Y3W.js} +2 -2
- package/dist/chunk-F2TLAIUP.js +2 -0
- package/dist/chunk-F2TLAIUP.js.map +1 -0
- package/dist/{chunk-BAWJZ6MA.js → chunk-FCGEB2PN.js} +2 -2
- package/dist/{chunk-DRGQQXWZ.js → chunk-IVMECZU7.js} +2 -2
- package/dist/{chunk-QJ5MCAIN.js → chunk-J5LWPODW.js} +2 -2
- package/dist/{chunk-HAV7FPRM.js → chunk-L5GWH3V7.js} +2 -2
- package/dist/{chunk-OUI554QS.js → chunk-MPQVMNI7.js} +2 -2
- package/dist/{chunk-LJUHIEEZ.js → chunk-MSLM2CQ4.js} +2 -2
- package/dist/{chunk-IOZFJ65G.js → chunk-NIEQ7YV4.js} +2 -2
- package/dist/{chunk-KY2JSZI3.js → chunk-TEC6BNTS.js} +2 -2
- package/dist/{chunk-QYWA5XM4.js → chunk-TP4HDSRT.js} +2 -2
- package/dist/{chunk-5S66VYFD.js → chunk-V3PJWSHI.js} +2 -2
- package/dist/{chunk-65HLULDL.js → chunk-V6HC5BRT.js} +2 -2
- package/dist/{chunk-3TZG2IN7.js → chunk-WMYWVMKM.js} +2 -2
- package/dist/{chunk-S2FD3J22.js → chunk-WO7VCDVI.js} +2 -2
- package/dist/{chunk-4STFNBEP.js → chunk-Y6OPZHC3.js} +2 -2
- package/dist/{chunk-5FYGD7NK.js → chunk-YP6LLUQK.js} +2 -2
- package/dist/{chunk-MNSIBSAM.js → chunk-YXJOEOXB.js} +2 -2
- package/dist/{chunk-UTWP5CJZ.js → chunk-ZAUH7QN6.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
- package/dist/flows/CostCalculator/api.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +3 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -2
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +4 -4
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +5 -5
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/types.d.ts +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/{mutations-CPqUOEmz.d.ts → mutations-Drqfzgy7.d.ts} +1 -1
- package/dist/{remoteFlows-CLgJcdkS.d.ts → remoteFlows-BgL1cZb_.d.ts} +1 -1
- package/dist/{types-epJRqrJU.d.ts → types-ANHgWME9.d.ts} +4 -4
- package/dist/{types-BGV7PQbp.d.ts → types-BLSDMvDI.d.ts} +2 -2
- package/dist/{types-Ckh2r3F3.d.ts → types-BdW8zb6v.d.ts} +1 -1
- package/dist/{types-B_ZvICFS.d.ts → types-CAEchQzj.d.ts} +3 -3
- package/dist/{types.gen-D2nbxMA0.d.ts → types.gen-er9sGXZD.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-XGVSEXYA.js +0 -2
- package/dist/chunk-XGVSEXYA.js.map +0 -1
- /package/dist/{chunk-ZP2BE7U6.js.map → chunk-3A5JJLQP.js.map} +0 -0
- /package/dist/{chunk-BEWGN2JK.js.map → chunk-3I4WL35F.js.map} +0 -0
- /package/dist/{chunk-KCXAXVC5.js.map → chunk-3YVCOYUM.js.map} +0 -0
- /package/dist/{chunk-GBZXVNGQ.js.map → chunk-4PZNLTCY.js.map} +0 -0
- /package/dist/{chunk-46FT5RHQ.js.map → chunk-5A7SON2J.js.map} +0 -0
- /package/dist/{chunk-O37C4LZF.js.map → chunk-5Z47HXNS.js.map} +0 -0
- /package/dist/{chunk-3ALAJXRV.js.map → chunk-7F742TXN.js.map} +0 -0
- /package/dist/{chunk-RTKKWC4M.js.map → chunk-BKEIB7VP.js.map} +0 -0
- /package/dist/{chunk-CULOWG5X.js.map → chunk-CG57ORFU.js.map} +0 -0
- /package/dist/{chunk-5JLTIH7G.js.map → chunk-DHIFFMY4.js.map} +0 -0
- /package/dist/{chunk-A3K4Q2U6.js.map → chunk-EI7F3Y3W.js.map} +0 -0
- /package/dist/{chunk-BAWJZ6MA.js.map → chunk-FCGEB2PN.js.map} +0 -0
- /package/dist/{chunk-DRGQQXWZ.js.map → chunk-IVMECZU7.js.map} +0 -0
- /package/dist/{chunk-QJ5MCAIN.js.map → chunk-J5LWPODW.js.map} +0 -0
- /package/dist/{chunk-HAV7FPRM.js.map → chunk-L5GWH3V7.js.map} +0 -0
- /package/dist/{chunk-OUI554QS.js.map → chunk-MPQVMNI7.js.map} +0 -0
- /package/dist/{chunk-LJUHIEEZ.js.map → chunk-MSLM2CQ4.js.map} +0 -0
- /package/dist/{chunk-IOZFJ65G.js.map → chunk-NIEQ7YV4.js.map} +0 -0
- /package/dist/{chunk-KY2JSZI3.js.map → chunk-TEC6BNTS.js.map} +0 -0
- /package/dist/{chunk-QYWA5XM4.js.map → chunk-TP4HDSRT.js.map} +0 -0
- /package/dist/{chunk-5S66VYFD.js.map → chunk-V3PJWSHI.js.map} +0 -0
- /package/dist/{chunk-65HLULDL.js.map → chunk-V6HC5BRT.js.map} +0 -0
- /package/dist/{chunk-3TZG2IN7.js.map → chunk-WMYWVMKM.js.map} +0 -0
- /package/dist/{chunk-S2FD3J22.js.map → chunk-WO7VCDVI.js.map} +0 -0
- /package/dist/{chunk-4STFNBEP.js.map → chunk-Y6OPZHC3.js.map} +0 -0
- /package/dist/{chunk-5FYGD7NK.js.map → chunk-YP6LLUQK.js.map} +0 -0
- /package/dist/{chunk-MNSIBSAM.js.map → chunk-YXJOEOXB.js.map} +0 -0
- /package/dist/{chunk-UTWP5CJZ.js.map → chunk-ZAUH7QN6.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as StepTerminationKeys } from '../../../types-
|
|
2
|
-
import '../../../types.gen-
|
|
1
|
+
import { S as StepTerminationKeys } from '../../../types-BLSDMvDI.js';
|
|
2
|
+
import '../../../types.gen-er9sGXZD.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import '../../../mutations-
|
|
5
|
-
import '../../../remoteFlows-
|
|
4
|
+
import '../../../mutations-Drqfzgy7.js';
|
|
5
|
+
import '../../../remoteFlows-BgL1cZb_.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'yup';
|
|
8
8
|
import '../../../types-Zg1n_9wh.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../types.gen-
|
|
2
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-
|
|
1
|
+
import '../../types.gen-er9sGXZD.js';
|
|
2
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-BLSDMvDI.js';
|
|
3
3
|
import './TerminationBack.js';
|
|
4
4
|
import './TerminationSubmit.js';
|
|
5
5
|
import '../types.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../mutations-
|
|
8
|
-
import '../../remoteFlows-
|
|
7
|
+
import '../../mutations-Drqfzgy7.js';
|
|
8
|
+
import '../../remoteFlows-BgL1cZb_.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'yup';
|
|
11
11
|
import '../../types-Zg1n_9wh.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../types.gen-
|
|
2
|
+
import '../../types.gen-er9sGXZD.js';
|
|
3
3
|
import '../useStepState.js';
|
|
4
|
-
export { f as STEPS, S as StepTerminationKeys, i as buildInitialValues, g as calculateMinTerminationDate, h as calculateProposedTerminationDateStatement } from '../../types-
|
|
4
|
+
export { f as STEPS, S as StepTerminationKeys, i as buildInitialValues, g as calculateMinTerminationDate, h as calculateProposedTerminationDateStatement } from '../../types-BLSDMvDI.js';
|
|
5
5
|
import 'react-hook-form';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../mutations-
|
|
8
|
-
import '../../remoteFlows-
|
|
7
|
+
import '../../mutations-Drqfzgy7.js';
|
|
8
|
+
import '../../remoteFlows-BgL1cZb_.js';
|
|
9
9
|
import 'yup';
|
|
10
10
|
import '../../types-Zg1n_9wh.js';
|
|
11
11
|
import '@remoteoss/json-schema-form-old';
|
package/dist/flows/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { J as JSFFieldset } from '../remoteFlows-
|
|
1
|
+
import { J as JSFFieldset } from '../remoteFlows-BgL1cZb_.js';
|
|
2
2
|
import { modify } from '@remoteoss/json-schema-form-old';
|
|
3
3
|
import { ModifyConfig, FormResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'yup';
|
|
6
|
-
import '../types.gen-
|
|
6
|
+
import '../types.gen-er9sGXZD.js';
|
|
7
7
|
import '../types-Zg1n_9wh.js';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
|
package/dist/index.d.ts
CHANGED
|
@@ -16,23 +16,23 @@ export { useContractAmendment } from './flows/ContractAmendment/hooks.js';
|
|
|
16
16
|
export { TerminationFlow } from './flows/Termination/TerminationFlow.js';
|
|
17
17
|
export { TerminationReasonsDetailContent } from './flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js';
|
|
18
18
|
export { TerminationDialogInfoContent } from './flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js';
|
|
19
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-
|
|
19
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-BLSDMvDI.js';
|
|
20
20
|
export { PaidTimeOffProps } from './flows/Termination/components/PaidTimeOff/PaidTimeOff.js';
|
|
21
21
|
export { AcknowledgeInformationFeesProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js';
|
|
22
22
|
export { AcknowledgeInformationProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js';
|
|
23
23
|
export { OnboardingFlow } from './flows/Onboarding/OnboardingFlow.js';
|
|
24
24
|
export { OnboardingInviteProps } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
25
|
-
export { B as BasicInformationFormPayload, c as BenefitsFormPayload, C as ContractDetailsFormPayload, e as CreditRiskState, d as CreditRiskStatus, E as Employment, f as OnboardingRenderProps, a as SelectCountryFormPayload, b as SelectCountrySuccess } from './types-
|
|
25
|
+
export { B as BasicInformationFormPayload, c as BenefitsFormPayload, C as ContractDetailsFormPayload, e as CreditRiskState, d as CreditRiskStatus, E as Employment, f as OnboardingRenderProps, a as SelectCountryFormPayload, b as SelectCountrySuccess } from './types-CAEchQzj.js';
|
|
26
26
|
export { ContractorOnboardingFlow } from './flows/ContractorOnboarding/ContractorOnboarding.js';
|
|
27
|
-
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, C as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, a as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-
|
|
28
|
-
export { u as useEmploymentQuery, e as useMagicLink, c as usePaidTimeoffBreakdownQuery, d as useTimeOffLeavePoliciesSummaryQuery, b as useTimeOffQuery } from './types-
|
|
27
|
+
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, C as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, a as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-ANHgWME9.js';
|
|
28
|
+
export { u as useEmploymentQuery, e as useMagicLink, c as usePaidTimeoffBreakdownQuery, d as useTimeOffLeavePoliciesSummaryQuery, b as useTimeOffQuery } from './types-BdW8zb6v.js';
|
|
29
29
|
export { t as transformYupErrorsIntoObject } from './utils-CjDMg_Yr.js';
|
|
30
30
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
31
31
|
import { PropsWithChildren } from 'react';
|
|
32
|
-
import { R as RemoteFlowsSDKProps } from './remoteFlows-
|
|
33
|
-
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, d as CountryComponentProps, e as DatePickerComponentProps, D as DrawerComponentProps, b as FieldComponentProps, F as FieldSetToggleComponentProps, c as FileComponentProps, M as Meta, S as StatementComponentProps, T as TextFieldComponentProps, W as WorkScheduleComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-
|
|
34
|
-
export {
|
|
35
|
-
export { F as FieldError, N as NormalizedFieldError } from './mutations-
|
|
32
|
+
import { R as RemoteFlowsSDKProps } from './remoteFlows-BgL1cZb_.js';
|
|
33
|
+
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, d as CountryComponentProps, e as DatePickerComponentProps, D as DrawerComponentProps, b as FieldComponentProps, F as FieldSetToggleComponentProps, c as FileComponentProps, M as Meta, S as StatementComponentProps, T as TextFieldComponentProps, W as WorkScheduleComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-BgL1cZb_.js';
|
|
34
|
+
export { t as Company, C as ContractAmendmentAutomatableResponse, p as CostCalculatorEmployment, i as CostCalculatorEstimateResponse, W as Currency, r as EmploymentCreationResponse, w as EmploymentResponse, O as OffboardingResponse, S as SuccessResponse } from './types.gen-er9sGXZD.js';
|
|
35
|
+
export { F as FieldError, N as NormalizedFieldError } from './mutations-Drqfzgy7.js';
|
|
36
36
|
import 'yup';
|
|
37
37
|
import './types-Zg1n_9wh.js';
|
|
38
38
|
import 'react-hook-form';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-FGBEOUQK.js";import{a as I}from"./chunk-FZDQ7EEI.js";import{a as D}from"./chunk-RNM46ZUE.js";import"./chunk-EC7QVRRX.js";import"./chunk-GULCZWSK.js";import{a as _}from"./chunk-YP6LLUQK.js";import{b as P,d as B}from"./chunk-TP4HDSRT.js";import"./chunk-RVIGZOGF.js";import{d as F,e as R}from"./chunk-XQL5I2GC.js";import"./chunk-HN5HLFTB.js";import"./chunk-VFRHMNLJ.js";import{a as S}from"./chunk-BKEIB7VP.js";import{a as A}from"./chunk-TVJYCR33.js";import{a as O}from"./chunk-SIYKTLFS.js";import"./chunk-KSHK3ZPX.js";import"./chunk-FZ7FWFJX.js";import{a as Y}from"./chunk-C74N2AWG.js";import{a as X}from"./chunk-4GDEWYZC.js";import{a as Z}from"./chunk-3I4WL35F.js";import"./chunk-6SRDRMBU.js";import"./chunk-EDVJBPCB.js";import"./chunk-Z7WBY27D.js";import"./chunk-T6HCUFYI.js";import"./chunk-7F742TXN.js";import"./chunk-3YVCOYUM.js";import"./chunk-DHIFFMY4.js";import"./chunk-NIEQ7YV4.js";import"./chunk-V6HC5BRT.js";import"./chunk-Y5P5IJRN.js";import"./chunk-F2TLAIUP.js";import"./chunk-FKLQBAJ5.js";import"./chunk-VAIBLWOY.js";import"./chunk-E25DZ75Z.js";import"./chunk-PGWKJ6FK.js";import{a as H}from"./chunk-MPQVMNI7.js";import"./chunk-5Z47HXNS.js";import"./chunk-XRI6PRXK.js";import"./chunk-NS4FRCEH.js";import"./chunk-IWA5B4U6.js";import"./chunk-AT7VHJMW.js";import"./chunk-BHYFPY64.js";import"./chunk-EHAZWZ3O.js";import"./chunk-I4XJ764Y.js";import"./chunk-QUQLW5YW.js";import"./chunk-4PZNLTCY.js";import"./chunk-CG57ORFU.js";import"./chunk-M2TLNSTK.js";import"./chunk-5A7SON2J.js";import"./chunk-LQBVRVXH.js";import"./chunk-2TILNBMK.js";import"./chunk-XOA7GG4P.js";import"./chunk-XFD3ULUF.js";import"./chunk-ZXGAFQXW.js";import"./chunk-LMYJ6V44.js";import"./chunk-RR55GUDT.js";import"./chunk-NX7MM6XR.js";import"./chunk-VDRNNOVA.js";import"./chunk-DFJNVGK4.js";import"./chunk-SGE4DLC3.js";import"./chunk-DKFUZO5P.js";import"./chunk-WMYWVMKM.js";import"./chunk-YXJOEOXB.js";import"./chunk-MRYRNB7Y.js";import"./chunk-A7ZJQCNU.js";import{a as $}from"./chunk-ZAUH7QN6.js";import"./chunk-MSLM2CQ4.js";import"./chunk-J5LWPODW.js";import"./chunk-EI7F3Y3W.js";import"./chunk-L5GWH3V7.js";import"./chunk-6P4DTWYK.js";import"./chunk-7RREQLI5.js";import"./chunk-ERRQIROU.js";import"./chunk-WO7VCDVI.js";import"./chunk-Y6OPZHC3.js";import"./chunk-TOA3JILU.js";import"./chunk-IVMECZU7.js";import"./chunk-23OYALRY.js";import"./chunk-WVJDCDGZ.js";import"./chunk-H6YNMT4M.js";import"./chunk-OAPK6TR7.js";import"./chunk-AP56UUME.js";import"./chunk-R2MHAPWD.js";import"./chunk-3UDG4IJO.js";import"./chunk-ZOTFS35J.js";import"./chunk-BVDT43OO.js";import"./chunk-MXLQEDRJ.js";import"./chunk-Z5WMKCRJ.js";import{a as q}from"./chunk-TEC6BNTS.js";import{a as V}from"./chunk-FCGEB2PN.js";import{a as j}from"./chunk-Y2NSR2N6.js";import{a as K}from"./chunk-CDCKGIF5.js";import{a as M,b as W,c as L,d as U,e as Q}from"./chunk-JA7UP6GN.js";import"./chunk-ZPN5N6BA.js";import"./chunk-LNV36S6D.js";import"./chunk-3A5JJLQP.js";import"./chunk-V3PJWSHI.js";import"./chunk-KGKDSOER.js";import{a as E,b as z}from"./chunk-E5PHO3SS.js";import"./chunk-2YTBWEC7.js";import{a as v,b as u}from"./chunk-NFUP6BFU.js";import"./chunk-ZIN2OWTH.js";import"./chunk-UOOUV52J.js";import"./chunk-72OH7PSF.js";import"./chunk-PJBAQZ6G.js";import"./chunk-F3KEIVSE.js";import"./chunk-6GTRAHWJ.js";import{a as h,c as m}from"./chunk-KQPDXXG3.js";import"./chunk-LJGCFFAT.js";import{a as N}from"./chunk-FUMA5UUB.js";import"./chunk-66N57DKF.js";import{b as C}from"./chunk-2SO4LW7V.js";import"./chunk-PMTKQME6.js";import"./chunk-TVZAFTPT.js";import{c as T,d as w}from"./chunk-L3Z2G32A.js";import{a as t}from"./chunk-P37U34EQ.js";import{QueryClient as dr,QueryClientProvider as pr}from"@tanstack/react-query";import{useMemo as gr}from"react";function l(r){let a=document.documentElement;Object.keys(r).forEach(e=>{let n=r[e];n&&a.style.setProperty(e,n)})}t(l,"setCssProperties");function G(r){let a={};return Object.keys(r).forEach(e=>{a[`--${e}`]=r[e]}),a}t(G,"mapThemeColors");function J(r){return{"--spacing":r}}t(J,"mapThemeSpacing");function rr(r){return{"--radius":r}}t(rr,"mapThemeBorderRadius");function ar(r){return{"--fontSizeBase":r.fontSizeBase}}t(ar,"mapThemeFont");function f(r){r?.colors&&l(G(r.colors)),r?.spacing&&l(J(r.spacing)),r?.borderRadius&&l(rr(r.borderRadius)),r?.font&&l(ar(r.font))}t(f,"applyTheme");import{createContext as tr,useEffect as er,useMemo as or}from"react";import{jsx as nr}from"react/jsx-runtime";var ir=tr({theme:{}});function b(r){er(()=>{r.theme&&Object.keys(r.theme).length>0&&f(r.theme)},[r.theme]);let a=or(()=>({theme:r.theme}),[r.theme]);return nr(ir.Provider,{value:a,children:r.children})}t(b,"ThemeProvider");var x={local:"http://localhost:4000/api/eor",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};var g="1.2.3";function sr(r){try{return new URL(r),!0}catch{return!1}}t(sr,"isValidUrl");function y(r,a){let e={current:null},n=a?.environment?x[a?.environment]:"https://gateway.remote.com",c=u.getConfig();a?.environment&&a?.environment!=="production"&&w(g);let s=!!a?.proxy&&sr(a.proxy.url);return a?.proxy&&!s&&console.error("Invalid proxy URL provided. Using default base URL."),v({...c,headers:{...c.headers,...s?a?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":g},baseUrl:s?a.proxy?.url:n,auth:t(async()=>{function p(o){return!o||Date.now()+6e4>o}if(t(p,"hasTokenExpired"),!e.current||p(e.current.expiresAt))try{let o=await r();e.current={accessToken:o.accessToken,expiresAt:Date.now()+o.expiresIn*1e3}}catch(o){console.error("Failed to fetch auth token:",o);return}return e.current?.accessToken},"auth")})}t(y,"createClient");import{Component as cr}from"react";import{jsx as k}from"react/jsx-runtime";var lr=t(()=>k("div",{style:{padding:"20px",border:"1px solid #dc2626",borderRadius:"4px",backgroundColor:"#fef2f2",color:"#991b1b"},children:"Something went wrong in RemoteFlows. Please refresh the page."}),"FallbackErrorBoundary"),d=class extends cr{static{t(this,"RemoteFlowsErrorBoundary")}constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,e){if(console.error("[RemoteFlows] Error caught:",a,e),this.props.errorBoundary?.useParentErrorBoundary)throw a}render(){return this.state.hasError&&this.state.error?this.props.errorBoundary?.fallback?typeof this.props.errorBoundary?.fallback=="function"?this.props.errorBoundary?.fallback(this.state.error):this.props.errorBoundary?.fallback:k(lr,{}):this.props.children}};import{jsx as i}from"react/jsx-runtime";var vr=new dr;function ur({children:r,client:a}){return i(m.Provider,{value:{client:a},children:r})}t(ur,"RemoteFlowContextWrapper");function hr({children:r,components:a}){return i(h.Provider,{value:a?{components:a}:{components:{}},children:r})}t(hr,"FormFieldsProvider");function mr({auth:r,children:a,components:e,theme:n,proxy:c,environment:s,errorBoundary:p={useParentErrorBoundary:!0}}){let o=gr(()=>y(r,{environment:s,proxy:c}),[r,s,c]);return i(d,{errorBoundary:p,children:i(pr,{client:vr,children:i(hr,{components:e,children:i(ur,{client:o,children:i(b,{theme:n,children:a})})})})})}t(mr,"RemoteFlows");export{N as ContractAmendmentConfirmationForm,q as ContractAmendmentFlow,V as ContractAmendmentForm,j as ContractAmendmentSubmit,$ as ContractorOnboardingFlow,_ as CostCalculatorFlow,S as CostCalculatorForm,A as CostCalculatorResetButton,O as CostCalculatorSubmitButton,D as EstimationResults,Z as OnboardingFlow,mr as RemoteFlows,I as SummaryResults,Y as TerminationDialogInfoContent,H as TerminationFlow,X as TerminationReasonsDetailContent,z as ZendeskTriggerButton,P as buildCostCalculatorEstimationPayload,C as convertFromCents,T as transformYupErrorsIntoObject,K as useContractAmendment,B as useCostCalculator,R as useCostCalculatorEstimationCsv,F as useCostCalculatorEstimationPdf,M as useEmploymentQuery,Q as useMagicLink,L as usePaidTimeoffBreakdownQuery,U as useTimeOffLeavePoliciesSummaryQuery,W as useTimeOffQuery,E as zendeskArticles};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { AnySchema } from 'yup';
|
|
3
|
-
import { Y as HelpCenterArticle } from './types.gen-
|
|
3
|
+
import { Y as HelpCenterArticle } from './types.gen-er9sGXZD.js';
|
|
4
4
|
import { S as SupportedTypes } from './types-Zg1n_9wh.js';
|
|
5
5
|
import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
|
|
6
6
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { E as Employment,
|
|
1
|
+
import { E as Employment, e as File, g as CreateContractDocumentResponse, d as SignContractDocument, S as SuccessResponse } from './types.gen-er9sGXZD.js';
|
|
2
2
|
import { OnboardingBack } from './flows/ContractorOnboarding/components/OnboardingBack.js';
|
|
3
3
|
import { OnboardingSubmit } from './flows/ContractorOnboarding/components/OnboardingSubmit.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { N as NormalizedFieldError } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError } from './mutations-Drqfzgy7.js';
|
|
6
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
8
|
import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
9
9
|
import { STEPS } from './flows/ContractorOnboarding/utils.js';
|
|
10
10
|
import { Step } from './flows/useStepState.js';
|
|
11
|
-
import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-
|
|
11
|
+
import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-BgL1cZb_.js';
|
|
12
12
|
import { Fields } from '@remoteoss/json-schema-form-old';
|
|
13
13
|
import { FieldValues } from 'react-hook-form';
|
|
14
14
|
import { BasicInformationStep } from './flows/ContractorOnboarding/components/BasicInformationStep.js';
|
|
15
|
-
import { g as SelectCountryStep } from './types-
|
|
15
|
+
import { g as SelectCountryStep } from './types-CAEchQzj.js';
|
|
16
16
|
import { FlowOptions, JSFModifyNext } from './flows/types.js';
|
|
17
17
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OffboardingResponse, X as PayrollCalendarEor, E as Employment,
|
|
1
|
+
import { O as OffboardingResponse, X as PayrollCalendarEor, E as Employment, T as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, s as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-er9sGXZD.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { E as ErrorResponse, S as SuccessResponse } from './mutations-
|
|
3
|
+
import { E as ErrorResponse, S as SuccessResponse } from './mutations-Drqfzgy7.js';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import * as _remoteoss_json_schema_form_old from '@remoteoss/json-schema-form-old';
|
|
6
6
|
import { $TSFixMe } from '@remoteoss/json-schema-form-old';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Employment, L as ListTimeoffResponse, G as TimeoffStatus, H as TimeoffType, I as ListLeavePoliciesSummaryResponse, J as MagicLinkResponse, U as UnprocessableEntityResponse, K as MagicLinkParams } from './types.gen-
|
|
1
|
+
import { E as Employment, L as ListTimeoffResponse, G as TimeoffStatus, H as TimeoffType, I as ListLeavePoliciesSummaryResponse, J as MagicLinkResponse, U as UnprocessableEntityResponse, K as MagicLinkParams } from './types.gen-er9sGXZD.js';
|
|
2
2
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as EmploymentCreationResponse,
|
|
1
|
+
import { r as EmploymentCreationResponse, w as EmploymentResponse, S as SuccessResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, s as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, u as ConflictResponse, F as ForbiddenResponse, E as Employment$1, v as EmploymentCreateParams } from './types.gen-er9sGXZD.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
|
|
4
4
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
5
|
-
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-Drqfzgy7.js';
|
|
6
6
|
import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
|
|
7
|
-
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-
|
|
7
|
+
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-BgL1cZb_.js';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as React$1 from 'react';
|
|
10
10
|
import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
@@ -1688,4 +1688,4 @@ type PostAutomatableContractAmendmentErrors = {
|
|
|
1688
1688
|
};
|
|
1689
1689
|
type PostAutomatableContractAmendmentError = PostAutomatableContractAmendmentErrors[keyof PostAutomatableContractAmendmentErrors];
|
|
1690
1690
|
|
|
1691
|
-
export type {
|
|
1691
|
+
export type { ConvertCurrencyParams as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, CreateContractEligibilityParams as D, Employment as E, ForbiddenResponse as F, TimeoffStatus as G, TimeoffType as H, ListLeavePoliciesSummaryResponse as I, MagicLinkResponse as J, MagicLinkParams as K, ListTimeoffResponse as L, ManageContractorPlusSubscriptionOperationsParams as M, NotFoundResponse as N, OffboardingResponse as O, PostCreateContractAmendmentError as P, CreateOffboardingParams as Q, RequestError as R, SuccessResponse as S, TerminationDetailsParams as T, UnprocessableEntityResponse as U, ValidationError as V, Currency as W, PayrollCalendarEor as X, HelpCenterArticle as Y, UnauthorizedResponse as a, ContractAmendmentResponse as b, PostAutomatableContractAmendmentError as c, SignContractDocument as d, File as e, ContractorSubscriptionsSummary as f, CreateContractDocumentResponse as g, CreateContractDocument as h, CostCalculatorEstimateResponse as i, CostCalculatorEstimatePdfResponse as j, CostCalculatorEstimateParams as k, CostCalculatorEstimateCsvResponse as l, MinimalRegion as m, MinimalCountry as n, EmploymentTermType as o, CostCalculatorEmployment as p, PostCreateEstimationError as q, EmploymentCreationResponse as r, TooManyRequestsResponse as s, Company as t, ConflictResponse as u, EmploymentCreateParams as v, EmploymentResponse as w, EmploymentFullParams as x, UnifiedEmploymentUpsertBenefitOffersRequest as y, ConvertCurrencyResponse as z };
|
package/package.json
CHANGED
package/dist/chunk-XGVSEXYA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as ke}from"./chunk-VAIBLWOY.js";import{a as we}from"./chunk-FKLQBAJ5.js";import{a as ge,b as Fe,c as Ee,f as he,g as Ve,h as Ce,i as Oe,j as Pe,k as Me,m as Te}from"./chunk-23OYALRY.js";import{a as ye,b as pe,c as _e,d as Se,f as be}from"./chunk-H6YNMT4M.js";import{a as N}from"./chunk-2YTBWEC7.js";import{a as Le}from"./chunk-PJBAQZ6G.js";import{c as V,d as L,f as W}from"./chunk-2SO4LW7V.js";import{g as C}from"./chunk-L3Z2G32A.js";import{a as l}from"./chunk-P37U34EQ.js";import{useEffect as at,useMemo as d,useRef as st,useState as Be}from"react";import rt from"lodash.mergewith";import{jsx as qe}from"react/jsx-runtime";var ct={employment_basic_information:"basic_information",contract_details:"contract_details"},lt={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},mt=l(({isLoadingBasicInformationForm:f,isLoadingContractDetailsForm:j,isLoadingEmployment:D,isLoadingBenefitsOffersSchema:J,isLoadingBenefitOffers:c,isLoadingCompany:I,isLoadingCountries:O,employmentStatus:a,employmentId:_,currentStepName:s,basicInformationFields:A,contractDetailsFields:o})=>{let P=f||j||D||J||c||I||O,r=a&&_e.includes(a),w=a&&!Se.includes(a),k=!!(_&&r&&s!=="review"),B=P||k,q=!!(k&&!P&&A.length>0&&o.length>0);return{isLoading:B,isNavigatingToReview:q,isEmploymentReadOnly:r,canInvite:w}},"getLoadingStates"),ht=l(({employmentId:f,companyId:j,countryCode:D,type:J,options:c,skipSteps:I,externalId:O,initialValues:a})=>{let _=st({select_country:{},basic_information:{},contract_details:{},benefits:{}}),[s,A]=Be(f),[o,P]=Be(D||null),{data:r,isLoading:w,refetch:k}=ge(s);f&&r?.country?.code&&!o&&P(r.country.code);let{data:B,isLoading:q}=Ee(s),{data:R,isLoading:G,refetch:Re}=Fe(j),ve=I?.includes("select_country")?pe:ye,{fieldValues:S,stepState:n,setFieldValues:Ne,previousStep:je,nextStep:De,goToStep:x,setStepValues:$}=Le(ve),{selectCountryForm:v,isLoading:z}=Me({jsfModify:c?.jsfModify?.select_country,queryOptions:{enabled:n.currentStep.name==="select_country"}}),K=Ce(),Y=Oe(o,c),Q=Pe(c),Je=Te(),{mutateAsync:Ie}=N(K),{mutateAsync:X}=N(Y),{mutateAsync:Ae}=N(Q),xe=lt[n.currentStep.name]||"employment_basic_information",Ue=ct[xe],He=r?.[Ue]||{},Z=l(({form:e,options:i={},query:m={},jsonSchemaVersion:h})=>{let H=Object.keys(S).length>0?{...a,...n.values?.[n.currentStep.name],...S}:{...a,...He};return he({countryCode:o,form:e,fieldValues:H,query:m,options:{...i,queryOptions:{enabled:i.queryOptions?.enabled??!0}},jsonSchemaVersion:h})},"useJSONSchema"),We=!!(o&&(n.currentStep.name==="basic_information"||f)),Ge=!!(o&&(n.currentStep.name==="contract_details"||f)),{data:u,isLoading:ee}=Z({form:"employment_basic_information",options:{jsfModify:c?.jsfModify?.basic_information,queryOptions:{enabled:We}}}),b=c?.jsfModify?.contract_details?.fields?.annual_gross_salary,U=b&&typeof b=="object"&&"presentation"in b?b.presentation:void 0,te=c?.jsfModify?.contract_details?.fields?.equity_compensation,$e=d(()=>({fields:{annual_gross_salary:{...b,presentation:{annual_gross_salary_conversion_properties:{label:U?.annual_gross_salary_conversion_properties?.label,description:U?.annual_gross_salary_conversion_properties?.description},desiredCurrency:R?.desired_currency,Component:l(e=>qe(we,{desiredCurrency:R?.desired_currency||"",...e}),"Component")}},equity_compensation:{...te,presentation:{calculateDynamicProperties:l((e,i)=>{let m=e.equity_compensation?.offer_equity_compensation,h=i?.meta?.cost;return{extra:qe(ke,{offerEquity:m,equityCost:h})}},"calculateDynamicProperties")}}}}),[b,U,R?.desired_currency,te]),ze=be(c,o),{data:y,isLoading:ne}=Z({form:"contract_details",query:{employment_id:s},options:{jsfModify:{...c?.jsfModify?.contract_details,fields:{...c?.jsfModify?.contract_details?.fields,...$e.fields}},queryOptions:{enabled:Ge}},jsonSchemaVersion:ze}),{data:M,isLoading:oe}=Ve(s,S,c),ie=d(()=>{if(n.currentStep.name==="benefits"){let e={...n.values?.[n.currentStep.name],...S};return rt({},B,e)}return{}},[n.currentStep.name,B,n.values,S]),t=d(()=>({select_country:v?.fields||[],basic_information:u?.fields||[],contract_details:y?.fields||[],benefits:M?.fields||[],review:[]}),[v?.fields,u?.fields,y?.fields,M?.fields]),Ke={select_country:null,basic_information:u?.meta["x-jsf-fieldsets"],contract_details:y?.meta["x-jsf-fieldsets"],benefits:null,review:null},{country:Ye,basic_information:ae={},contract_details:se={},status:re}=r||{},ce=Ye?.code,le=n.currentStep.name,g=d(()=>L(t.select_country,{country:o||ce||""}),[t.select_country,o,ce]),F=d(()=>{let e={...a,...ae};return L(t.basic_information,e)},[t.basic_information,ae,a]),p=d(()=>{let e={...a,...se};return L(t.contract_details,e)},[t.contract_details,se,a]),E=d(()=>{let e={...a,...ie};return L(t.benefits,e)},[t.benefits,ie,a]),Qe=d(()=>r?{select_country:g,basic_information:W(t.basic_information,F),contract_details:r?.contract_details!==null?W(t.contract_details,p):p,benefits:E}:{select_country:g,basic_information:F,contract_details:p,benefits:E},[g,F,p,E,r,t]),{isLoading:Xe,isNavigatingToReview:me,isEmploymentReadOnly:Ze,canInvite:et}=d(()=>mt({isLoadingBasicInformationForm:ee,isLoadingContractDetailsForm:ne,isLoadingEmployment:w,isLoadingBenefitsOffersSchema:oe,isLoadingBenefitOffers:q,isLoadingCompany:G,isLoadingCountries:z,employmentId:f,employmentStatus:re,basicInformationFields:t.basic_information,contractDetailsFields:t.contract_details,currentStepName:le}),[ee,ne,w,oe,q,G,z,f,re,t.basic_information,t.contract_details,le]);at(()=>{me&&(_.current={select_country:C(g,t.select_country),basic_information:C(F,t.basic_information),contract_details:C(p,t.contract_details),benefits:C(E,t.benefits)},$({select_country:g,basic_information:F,contract_details:p,benefits:E,review:{}}),x("review"))},[F,E,p,x,me,g,$,t.basic_information,t.benefits,t.contract_details,t.select_country]);let de=l(async e=>v&&n.currentStep.name==="select_country"?e:u&&n.currentStep.name==="basic_information"?await V(e,u?.fields,{isPartialValidation:!1}):y&&n.currentStep.name==="contract_details"?await V(e,y?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function tt(e){let i=n.currentStep.name;i in _.current&&(_.current[i]=C(e,t[i]));let m=await de(e);switch(Re(),n.currentStep.name){case"select_country":return P(m.country),Promise.resolve({data:{countryCode:m.country}});case"basic_information":{let h=!s&&o,fe=s&&o&&r?.country&&r?.country.code!==o;if(h||fe){let H={basic_information:m,type:J,country_code:o,external_id:O};try{let T=await Ie(H),ue=T.data?.data?.employment?.id;return A(ue),await Je.mutateAsync({employmentId:ue,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1}),T}catch(T){throw console.error("Error creating onboarding:",T),T}}else if(s)return X({employmentId:s,basic_information:m,pricing_plan_details:{frequency:"monthly"},external_id:O});return}case"contract_details":return X({employmentId:s,external_id:O,...{contract_details:m,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return Ae({employmentId:s,...e})}}l(tt,"onSubmit");function nt(){je()}l(nt,"back");function ot(){De()}l(ot,"next");function it(e){x(e)}return l(it,"goTo"),{employmentId:s,creditRiskStatus:R?.default_legal_entity_credit_risk_status,fieldValues:S,stepState:n,fields:t[n.currentStep.name],isLoading:Xe,isSubmitting:K.isPending||Y.isPending||Q.isPending,initialValues:Qe,handleValidation:l(async e=>{if(n.currentStep.name==="select_country")return v.handleValidation(e);if(n.currentStep.name==="benefits"&&M){let i=await V(e,M?.fields,{isPartialValidation:!1});return M?.handleValidation(i)}if(u&&n.currentStep.name==="basic_information"){let i=await V(e,u?.fields,{isPartialValidation:!1});return u?.handleValidation(i)}if(y&&n.currentStep.name==="contract_details"){let i=await V(e,y?.fields,{isPartialValidation:!1});return y?.handleValidation(i)}return null},"handleValidation"),checkFieldUpdates:Ne,parseFormValues:de,onSubmit:tt,back:nt,next:ot,goTo:it,meta:{fields:_.current,fieldsets:Ke[n.currentStep.name]},refetchEmployment:k,employment:r,isEmploymentReadOnly:Ze,canInvite:et}},"useOnboarding");export{ht as a};
|
|
2
|
-
//# sourceMappingURL=chunk-XGVSEXYA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/hooks.tsx"],"sourcesContent":["import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n Employment,\n EmploymentCreateParams,\n EmploymentFullParams,\n} from '@/src/client';\nimport { Fields } from '@remoteoss/json-schema-form-old';\nimport { useStepState, Step } from '@/src/flows/useStepState';\nimport {\n disabledInviteButtonEmploymentStatus,\n getContractDetailsSchemaVersion,\n reviewStepAllowedEmploymentStatus,\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n} from '@/src/flows/Onboarding/utils';\nimport { prettifyFormValues } from '@/src/lib/utils';\nimport {\n getInitialValues,\n enableAckFields,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { FieldValues } from 'react-hook-form';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport mergeWith from 'lodash.mergewith';\nimport {\n useBenefitOffers,\n useBenefitOffersSchema,\n useCompany,\n useCountriesSchemaField,\n useCreateEmployment,\n useEmployment,\n useJSONSchemaForm,\n useUpdateBenefitsOffers,\n useUpdateEmployment,\n useUpsertContractEligibility,\n} from '@/src/flows/Onboarding/api';\nimport { JSFModifyNext, JSONSchemaFormType } from '@/src/flows/types';\nimport { AnnualGrossSalary } from '@/src/flows/Onboarding/components/AnnualGrossSalary';\nimport { $TSFixMe, JSFField, JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport { EquityPriceDetails } from '@/src/flows/Onboarding/components/EquityPriceDetails';\n\ntype OnboardingHookProps = Omit<OnboardingFlowProps, 'render'>;\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n contract_details: 'contract_details',\n};\n\nconst stepToFormSchemaMap: Record<\n keyof typeof STEPS,\n JSONSchemaFormType | null\n> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: 'contract_details',\n benefits: null,\n review: null,\n};\n\nconst getLoadingStates = ({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentStatus,\n employmentId,\n currentStepName,\n basicInformationFields,\n contractDetailsFields,\n}: {\n isLoadingBasicInformationForm: boolean;\n isLoadingContractDetailsForm: boolean;\n isLoadingEmployment: boolean;\n isLoadingBenefitsOffersSchema: boolean;\n isLoadingBenefitOffers: boolean;\n isLoadingCompany: boolean;\n isLoadingCountries: boolean;\n employmentStatus?: Employment['status'];\n employmentId?: string;\n currentStepName: string;\n basicInformationFields: Fields;\n contractDetailsFields: Fields;\n}) => {\n const initialLoading =\n isLoadingBasicInformationForm ||\n isLoadingContractDetailsForm ||\n isLoadingEmployment ||\n isLoadingBenefitsOffersSchema ||\n isLoadingBenefitOffers ||\n isLoadingCompany ||\n isLoadingCountries;\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId && isEmploymentReadOnly && currentStepName !== 'review',\n );\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n const isNavigatingToReview = Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n basicInformationFields.length > 0 &&\n contractDetailsFields.length > 0,\n );\n\n return {\n isLoading,\n isNavigatingToReview,\n isEmploymentReadOnly,\n canInvite,\n };\n};\n\nexport const useOnboarding = ({\n employmentId,\n companyId,\n countryCode,\n type,\n options,\n skipSteps,\n externalId,\n initialValues: onboardingInitialValues,\n}: OnboardingHookProps) => {\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n benefits: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n benefits: {},\n });\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmployment(internalEmploymentId);\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const { data: benefitOffers, isLoading: isLoadingBenefitOffers } =\n useBenefitOffers(internalEmploymentId);\n\n const {\n data: company,\n isLoading: isLoadingCompany,\n refetch: refetchCompany,\n } = useCompany(companyId);\n const stepsToUse = skipSteps?.includes('select_country')\n ? STEPS_WITHOUT_SELECT_COUNTRY\n : STEPS;\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(\n stepsToUse as Record<keyof typeof STEPS, Step<keyof typeof STEPS>>,\n );\n\n const { selectCountryForm, isLoading: isLoadingCountries } =\n useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n queryOptions: {\n enabled: stepState.currentStep.name === 'select_country',\n },\n });\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options,\n );\n const updateBenefitsOffersMutation = useUpdateBenefitsOffers(options);\n const updateContractEligibilityMutation = useUpsertContractEligibility();\n const { mutateAsync: createEmploymentMutationAsync } = mutationToPromise(\n createEmploymentMutation,\n );\n const { mutateAsync: updateEmploymentMutationAsync } = mutationToPromise(\n updateEmploymentMutation,\n );\n const { mutateAsync: updateBenefitsOffersMutationAsync } = mutationToPromise(\n updateBenefitsOffersMutation,\n );\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'employment_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n jsonSchemaVersion,\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModifyNext;\n queryOptions?: { enabled?: boolean };\n };\n query?: Record<string, string>;\n jsonSchemaVersion?: number;\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n },\n jsonSchemaVersion,\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isContractDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'contract_details' ||\n Boolean(employmentId)),\n );\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'employment_basic_information',\n options: {\n jsfModify: options?.jsfModify?.basic_information,\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n });\n\n const annualGrossSalaryField =\n options?.jsfModify?.contract_details?.fields?.annual_gross_salary;\n const annualSalaryFieldPresentation =\n annualGrossSalaryField &&\n typeof annualGrossSalaryField === 'object' &&\n 'presentation' in annualGrossSalaryField\n ? (\n annualGrossSalaryField as {\n presentation?: {\n annual_gross_salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n };\n }\n ).presentation\n : undefined;\n\n const equityCompensationField =\n options?.jsfModify?.contract_details?.fields?.equity_compensation;\n\n const contractDetailsCustomFields = useMemo(\n () => ({\n fields: {\n annual_gross_salary: {\n ...annualGrossSalaryField,\n presentation: {\n annual_gross_salary_conversion_properties: {\n label:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.label,\n description:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.description,\n },\n desiredCurrency: company?.desired_currency,\n Component: (props: JSFField & { currency: string }) => {\n return (\n <AnnualGrossSalary\n desiredCurrency={company?.desired_currency || ''}\n {...props}\n />\n );\n },\n },\n },\n equity_compensation: {\n ...equityCompensationField,\n presentation: {\n calculateDynamicProperties: (\n values: FieldValues,\n field: JSFField,\n ) => {\n const offerEquity =\n values.equity_compensation?.offer_equity_compensation;\n const equityCost = field?.meta?.cost;\n\n return {\n extra: (\n <EquityPriceDetails\n offerEquity={offerEquity}\n equityCost={equityCost as $TSFixMe}\n />\n ),\n };\n },\n },\n },\n },\n }),\n [\n annualGrossSalaryField,\n annualSalaryFieldPresentation,\n company?.desired_currency,\n equityCompensationField,\n ],\n );\n\n const effectiveContractDetailsJsonSchemaVersion =\n getContractDetailsSchemaVersion(options, internalCountryCode);\n\n const { data: contractDetailsForm, isLoading: isLoadingContractDetailsForm } =\n useJSONSchema({\n form: 'contract_details',\n query: {\n employment_id: internalEmploymentId as string,\n },\n options: {\n jsfModify: {\n ...options?.jsfModify?.contract_details,\n fields: {\n ...options?.jsfModify?.contract_details?.fields,\n ...contractDetailsCustomFields.fields,\n },\n },\n queryOptions: {\n enabled: isContractDetailsEnabled,\n },\n },\n jsonSchemaVersion: effectiveContractDetailsJsonSchemaVersion,\n });\n\n const {\n data: benefitOffersSchema,\n isLoading: isLoadingBenefitsOffersSchema,\n } = useBenefitOffersSchema(\n internalEmploymentId as string,\n fieldValues,\n options,\n );\n\n const initialValuesBenefitOffers = useMemo(() => {\n if (stepState.currentStep.name === 'benefits') {\n const benefitsFormValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n return mergeWith({}, benefitOffers, benefitsFormValues);\n }\n return {};\n }, [\n stepState.currentStep.name,\n benefitOffers,\n stepState.values,\n fieldValues,\n ]);\n\n const stepFields: Record<keyof typeof STEPS, Fields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n contract_details: contractDetailsForm?.fields || [],\n benefits: benefitOffersSchema?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n contractDetailsForm?.fields,\n benefitOffersSchema?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n keyof typeof STEPS,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n contract_details: contractDetailsForm?.meta['x-jsf-fieldsets'],\n benefits: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n status: employmentStatus,\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n const currentStepName = stepState.currentStep.name;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n stepFields.basic_information,\n employmentBasicInformation,\n onboardingInitialValues,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n ]);\n\n const benefitsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...initialValuesBenefitOffers,\n };\n\n return getInitialValues(stepFields.benefits, initialValues);\n }, [\n stepFields.benefits,\n initialValuesBenefitOffers,\n onboardingInitialValues,\n ]);\n\n const initialValues = useMemo(() => {\n if (employment) {\n return {\n select_country: selectCountryInitialValues,\n // We don't store ack fields in the db, eg \"ack_start_date_ammendment\" for Argentina, and therefore is not returned in the employment response\n // So when an employmentId exists, it means that the user has already started the onboarding process, and we need to enable the ack fields\n basic_information: enableAckFields(\n stepFields['basic_information'],\n basicInformationInitialValues,\n ),\n contract_details:\n // if contract details is null, it means it has not been filled yet, so we can't enable the ack fields\n employment?.contract_details !== null\n ? enableAckFields(\n stepFields['contract_details'],\n contractDetailsInitialValues,\n )\n : contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n benefitsInitialValues,\n employment,\n stepFields,\n ]);\n\n const { isLoading, isNavigatingToReview, isEmploymentReadOnly, canInvite } =\n useMemo(\n () =>\n getLoadingStates({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus: employmentStatus,\n basicInformationFields: stepFields.basic_information,\n contractDetailsFields: stepFields.contract_details,\n currentStepName: currentStepName,\n }),\n [\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus,\n stepFields.basic_information,\n stepFields.contract_details,\n currentStepName,\n ],\n );\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n ),\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n ),\n benefits: prettifyFormValues(\n benefitsInitialValues,\n stepFields.benefits,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n review: {},\n });\n\n goToStep('review');\n }\n }, [\n basicInformationInitialValues,\n benefitsInitialValues,\n contractDetailsInitialValues,\n goToStep,\n isNavigatingToReview,\n selectCountryInitialValues,\n setStepValues,\n stepFields.basic_information,\n stepFields.benefits,\n stepFields.contract_details,\n stepFields.select_country,\n ]);\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return await parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(values, contractDetailsForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\n // Prettify values for the current step\n const currentStepName = stepState.currentStep.name;\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(values, stepFields[currentStepName]);\n }\n\n const parsedValues = await parseFormValues(values);\n refetchCompany();\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const payload: EmploymentCreateParams = {\n basic_information: parsedValues,\n type: type,\n country_code: internalCountryCode,\n external_id: externalId,\n };\n try {\n const response = await createEmploymentMutationAsync(payload);\n // @ts-expect-error the types from the response are not matching\n const employmentId = response.data?.data?.employment?.id;\n setInternalEmploymentId(employmentId);\n await updateContractEligibilityMutation.mutateAsync({\n employmentId: employmentId,\n eligible_to_work_in_residing_country: 'citizen',\n employer_or_work_restrictions: false,\n });\n\n return response;\n } catch (error) {\n console.error('Error creating onboarding:', error);\n throw error;\n }\n } else if (internalEmploymentId) {\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n external_id: externalId,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: EmploymentFullParams = {\n contract_details: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n };\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId as string,\n external_id: externalId,\n ...payload,\n });\n }\n\n case 'benefits': {\n return updateBenefitsOffersMutationAsync({\n employmentId: internalEmploymentId as string,\n ...values,\n });\n }\n }\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n function goTo(step: keyof typeof STEPS) {\n goToStep(step);\n }\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId: internalEmploymentId,\n\n /**\n * Credit risk status of the company, useful to know what to to show in the review step\n * The possible values are:\n * - not_started\n * - ready\n * - in_progress\n * - referred\n * - fail\n * - deposit_required\n * - no_deposit_required\n */\n\n creditRiskStatus: company?.default_legal_entity_credit_risk_status,\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n /**\n * Loading state indicating if the onboarding schema is being fetched\n */\n isLoading: isLoading,\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n updateBenefitsOffersMutation.isPending,\n /**\n * Initial form values\n */\n initialValues,\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: async (\n values: FieldValues,\n ): Promise<ValidationResult | null> => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n if (stepState.currentStep.name === 'benefits' && benefitOffersSchema) {\n const parsedValues = await parseJSFToValidate(\n values,\n benefitOffersSchema?.fields,\n { isPartialValidation: false },\n );\n\n return benefitOffersSchema?.handleValidation(parsedValues);\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractDetailsForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo,\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n },\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment,\n /**\n * Employment data\n */\n employment,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited, created_awaiting_reserve or created_reserve_paid\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n };\n};\n"],"mappings":"meAwBA,OAAS,aAAAA,GAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,OAAgB,QACrD,OAAOC,OAAe,mBAmTN,cAAAC,OAAA,oBA/RhB,IAAMC,GAEF,CACF,6BAA8B,oBAC9B,iBAAkB,kBACpB,EAEMC,GAGF,CACF,eAAgB,KAChB,kBAAmB,+BACnB,iBAAkB,mBAClB,SAAU,KACV,OAAQ,IACV,EAEMC,GAAmBC,EAAA,CAAC,CACxB,8BAAAC,EACA,6BAAAC,EACA,oBAAAC,EACA,8BAAAC,EACA,uBAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,uBAAAC,EACA,sBAAAC,CACF,IAaM,CACJ,IAAMC,EACJZ,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,EAEIO,EACJN,GACAO,GAAkC,SAASP,CAAgB,EAEvDQ,EACJR,GACA,CAACS,GAAqC,SAAST,CAAgB,EAE3DU,EAAiC,GACrCT,GAAgBK,GAAwBJ,IA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,OACrB,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAqB,iBAAiBwB,CAAY,CAC3D,CAEA,OAAO,IACT,EAxCkB,oBA6ClB,kBAAmBvE,GAOnB,gBAAAoE,GAOA,SAAAE,GAMA,KAAAO,GAMA,KAAAC,GAOA,KAAAC,GAKA,KAAM,CACJ,OAAQnG,EAAc,QACtB,UAAW0E,GAA4BvD,EAAU,YAAY,IAAI,CACnE,EAMA,kBAAAX,EAIA,WAAAD,EAMA,qBAAAtB,GAMA,UAAAE,EACF,CACF,EArwB6B","names":["useEffect","useMemo","useRef","useState","mergeWith","jsx","jsonSchemaToEmployment","stepToFormSchemaMap","getLoadingStates","__name","isLoadingBasicInformationForm","isLoadingContractDetailsForm","isLoadingEmployment","isLoadingBenefitsOffersSchema","isLoadingBenefitOffers","isLoadingCompany","isLoadingCountries","employmentStatus","employmentId","currentStepName","basicInformationFields","contractDetailsFields","initialLoading","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","shouldHandleReadOnlyEmployment","isLoading","isNavigatingToReview","useOnboarding","companyId","countryCode","type","options","skipSteps","externalId","onboardingInitialValues","fieldsMetaRef","useRef","internalEmploymentId","setInternalEmploymentId","useState","internalCountryCode","setInternalCountryCode","employment","refetchEmployment","useEmployment","benefitOffers","useBenefitOffers","company","refetchCompany","useCompany","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","selectCountryForm","useCountriesSchemaField","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","updateBenefitsOffersMutation","useUpdateBenefitsOffers","updateContractEligibilityMutation","useUpsertContractEligibility","createEmploymentMutationAsync","mutationToPromise","updateEmploymentMutationAsync","updateBenefitsOffersMutationAsync","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","jsonSchemaVersion","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isContractDetailsEnabled","basicInformationForm","annualGrossSalaryField","annualSalaryFieldPresentation","equityCompensationField","contractDetailsCustomFields","useMemo","props","AnnualGrossSalary","values","field","offerEquity","equityCost","EquityPriceDetails","effectiveContractDetailsJsonSchemaVersion","getContractDetailsSchemaVersion","contractDetailsForm","benefitOffersSchema","useBenefitOffersSchema","initialValuesBenefitOffers","benefitsFormValues","mergeWith","stepFields","stepFieldsWithFlatFieldsets","country","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","basicInformationInitialValues","initialValues","contractDetailsInitialValues","benefitsInitialValues","enableAckFields","useEffect","prettifyFormValues","parseFormValues","parseJSFToValidate","onSubmit","parsedValues","isEmploymentNotLoaded","hasChangedCountry","payload","response","error","back","next","goTo","step"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|