@remoteoss/remote-flows 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CountryFieldDefault-LOWXZDAD.js → CountryFieldDefault-SFTKBP6V.js} +2 -2
- package/dist/DatePickerFieldDefault-GHHRA5MC.js +2 -0
- package/dist/RadioGroupFieldDefault-WSWNB62Y.js +2 -0
- package/dist/{chunk-IHLUQ477.js → chunk-2TPHCOVE.js} +2 -2
- package/dist/{chunk-BV5ALJ53.js → chunk-2UKAVWUS.js} +2 -2
- package/dist/{chunk-TP7ZSHZ3.js → chunk-3EK647EG.js} +2 -2
- package/dist/chunk-3FCX7SWN.js +2 -0
- package/dist/chunk-3FCX7SWN.js.map +1 -0
- package/dist/{chunk-QXTTO2MJ.js → chunk-3YKLEDVY.js} +2 -2
- package/dist/{chunk-OHQRA2NZ.js → chunk-43UKWTHS.js} +2 -2
- package/dist/{chunk-FKM2NCIV.js → chunk-4HVLMGRA.js} +2 -2
- package/dist/chunk-4TJ2QZ7P.js +2 -0
- package/dist/chunk-4TJ2QZ7P.js.map +1 -0
- package/dist/{chunk-NMDURBYL.js → chunk-5RFDYBDY.js} +2 -2
- package/dist/chunk-6CASSN2Z.js +2 -0
- package/dist/{chunk-CIVW6O46.js → chunk-6IFPFK23.js} +2 -2
- package/dist/{chunk-X5LRTFCO.js → chunk-7RC7EB47.js} +2 -2
- package/dist/{chunk-MSCROI55.js → chunk-AGUAPUCU.js} +2 -2
- package/dist/{chunk-F7E2ENZH.js → chunk-BKVBDV6E.js} +2 -2
- package/dist/{chunk-363GGPXU.js → chunk-BMFFLDYL.js} +2 -2
- package/dist/{chunk-VFN7G6LL.js → chunk-BOWNQTTR.js} +2 -2
- package/dist/{chunk-RV4IDUEI.js → chunk-BWMATZIU.js} +2 -2
- package/dist/{chunk-APHY5GJ6.js → chunk-BZ5XEZCL.js} +2 -2
- package/dist/{chunk-FJL46ZTU.js → chunk-CB7T2SPX.js} +2 -2
- package/dist/{chunk-FVOZEZJP.js → chunk-CE4ZEIWI.js} +2 -2
- package/dist/{chunk-RBVGOVSD.js → chunk-CWHIIHQP.js} +2 -2
- package/dist/chunk-DG3T5KLP.js +2 -0
- package/dist/chunk-DG3T5KLP.js.map +1 -0
- package/dist/chunk-DZGLLSY7.js +2 -0
- package/dist/chunk-DZGLLSY7.js.map +1 -0
- package/dist/chunk-E6256SK7.js +2 -0
- package/dist/chunk-E6256SK7.js.map +1 -0
- package/dist/{chunk-GVK4VLLD.js → chunk-EPLPD54O.js} +2 -2
- package/dist/{chunk-XFPUH6H2.js → chunk-FD2FTALC.js} +2 -2
- package/dist/{chunk-YV2MRBXB.js → chunk-GSSC5OVG.js} +2 -2
- package/dist/{chunk-MKSMTFPZ.js → chunk-HCJP6RDC.js} +2 -2
- package/dist/{chunk-AB3I4P3N.js → chunk-HPBYZOPP.js} +2 -2
- package/dist/{chunk-XQIVHGI3.js → chunk-HRK4FJGT.js} +2 -2
- package/dist/{chunk-BQ5A22TW.js → chunk-I3J7LKY3.js} +2 -2
- package/dist/chunk-I4CH573Y.js +2 -0
- package/dist/chunk-I4CH573Y.js.map +1 -0
- package/dist/{chunk-HO7BGGLQ.js → chunk-IAIHITHL.js} +2 -2
- package/dist/{chunk-CNGXYZQI.js → chunk-JHMIAK67.js} +2 -2
- package/dist/chunk-JRUJLG27.js +2 -0
- package/dist/{chunk-65ZDTC36.js.map → chunk-JRUJLG27.js.map} +1 -1
- package/dist/{chunk-UV242U4J.js → chunk-JYYCK5IN.js} +2 -2
- package/dist/{chunk-N4AO3L3N.js → chunk-K6WWMYKM.js} +2 -2
- package/dist/{chunk-HPA2A2WQ.js → chunk-L622FFV6.js} +2 -2
- package/dist/chunk-LHEF2FN7.js +2 -0
- package/dist/chunk-LHEF2FN7.js.map +1 -0
- package/dist/{chunk-WALC3PW7.js → chunk-MKT4MPUT.js} +2 -2
- package/dist/{chunk-XI6P2XA7.js → chunk-NFLKVFAD.js} +2 -2
- package/dist/{chunk-4SGF6UNL.js → chunk-NKPRRBFG.js} +2 -2
- package/dist/chunk-OPQTTZBK.js +2 -0
- package/dist/chunk-OPQTTZBK.js.map +1 -0
- package/dist/{chunk-A6KKKCLW.js → chunk-P4GE72PQ.js} +2 -2
- package/dist/chunk-PPY77NYV.js +2 -0
- package/dist/chunk-PPY77NYV.js.map +1 -0
- package/dist/{chunk-BYAU5GDU.js → chunk-Q5LU2ZBL.js} +2 -2
- package/dist/{chunk-LLGY2ZUZ.js → chunk-QE62LRON.js} +2 -2
- package/dist/{chunk-SLBEVNBG.js → chunk-RE2IHPDB.js} +2 -2
- package/dist/chunk-RXP4X2CU.js +2 -0
- package/dist/chunk-RXP4X2CU.js.map +1 -0
- package/dist/chunk-TSPDJUGG.js +2 -0
- package/dist/chunk-TSPDJUGG.js.map +1 -0
- package/dist/{chunk-JTKKY7II.js → chunk-TUJXQF4Q.js} +2 -2
- package/dist/{chunk-QW6TETWW.js → chunk-UBYT2TI4.js} +2 -2
- package/dist/{chunk-7G35F5CI.js → chunk-UP27IEE4.js} +2 -2
- package/dist/{chunk-5MXQRMNN.js → chunk-VON7RTMD.js} +2 -2
- package/dist/{chunk-YRC6EEM3.js → chunk-XGECMN4V.js} +2 -2
- package/dist/{chunk-6SB4KOSY.js → chunk-Y7NHXFRX.js} +2 -2
- package/dist/{chunk-ZHRMPK42.js → chunk-YAJJJ2JV.js} +2 -2
- package/dist/{chunk-ZHRMPK42.js.map → chunk-YAJJJ2JV.js.map} +1 -1
- package/dist/chunk-YHP23JNL.js +2 -0
- package/dist/chunk-YHP23JNL.js.map +1 -0
- package/dist/{chunk-UY2IFS7S.js → chunk-Z7A4LTSB.js} +2 -2
- package/dist/{chunk-E6NEMSIG.js → chunk-ZURHNW3D.js} +2 -2
- package/dist/{chunk-UCVXGG6B.js → chunk-ZYLVMO7E.js} +2 -2
- package/dist/default-components.d.ts +2 -2
- package/dist/default-components.js +1 -1
- 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/hooks.js +1 -1
- 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 +2 -2
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +8 -6
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +40 -4
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.d.ts +29 -0
- package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js +2 -0
- package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js.map +1 -0
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +8 -6
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +8 -6
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +7 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +8 -6
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +8 -6
- 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/components/StatementOfWorkDisclaimer.js +1 -1
- package/dist/flows/ContractorOnboarding/constants.d.ts +4 -1
- package/dist/flows/ContractorOnboarding/constants.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +12 -8
- package/dist/flows/ContractorOnboarding/hooks.d.ts +7 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +8 -7
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +10 -7
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.d.ts +23 -0
- package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js +2 -0
- package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js.map +1 -0
- package/dist/flows/ContractorOnboarding/types.d.ts +7 -5
- package/dist/flows/ContractorOnboarding/utils.d.ts +37 -2
- package/dist/flows/ContractorOnboarding/utils.js +1 -1
- 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/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
- package/dist/flows/CostCalculator/api.d.ts +2 -2
- package/dist/flows/CostCalculator/api.js +1 -1
- 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/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- 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/OnboardingInvite.js +1 -1
- 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 +6 -6
- 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/api.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- 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/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- 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/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- 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/flows/useStepState.d.ts +1 -0
- package/dist/flows/useStepState.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +30 -12
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +3 -3
- package/dist/internals.js +1 -1
- package/dist/{mutations-D9uKrVyZ.d.ts → mutations-Cviv4PN1.d.ts} +1 -1
- package/dist/{remoteFlows-C_jytkce.d.ts → remoteFlows-C41d3S6K.d.ts} +2 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/{types-DFiXoRxe.d.ts → types-B3j6CHqF.d.ts} +21 -8
- package/dist/{types-CReB0W2v.d.ts → types-C2Jm8UUR.d.ts} +1 -1
- package/dist/{types-CJGBgp6W.d.ts → types-DGsUn7MK.d.ts} +2 -2
- package/dist/{types-Bt9myqn7.d.ts → types-SHZYNK7B.d.ts} +3 -3
- package/dist/{types.gen-CU3zhQBc.d.ts → types.gen-f6p9DLeW.d.ts} +1 -1
- package/dist/{utils-CiZCA68j.d.ts → utils-4FdXJdn7.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/DatePickerFieldDefault-GWFIBBMB.js +0 -2
- package/dist/RadioGroupFieldDefault-M5CIDW2Y.js +0 -2
- package/dist/chunk-4MPMEB2P.js +0 -2
- package/dist/chunk-4MPMEB2P.js.map +0 -1
- package/dist/chunk-5BRMLRS7.js +0 -2
- package/dist/chunk-5BRMLRS7.js.map +0 -1
- package/dist/chunk-65ZDTC36.js +0 -2
- package/dist/chunk-6OKI4CS4.js +0 -2
- package/dist/chunk-6OKI4CS4.js.map +0 -1
- package/dist/chunk-DG7WU355.js +0 -2
- package/dist/chunk-DG7WU355.js.map +0 -1
- package/dist/chunk-O3G6HQ3B.js +0 -2
- package/dist/chunk-O3G6HQ3B.js.map +0 -1
- package/dist/chunk-VQZ6JMPG.js +0 -2
- package/dist/chunk-VQZ6JMPG.js.map +0 -1
- package/dist/chunk-Y6VOAJG5.js +0 -2
- package/dist/chunk-Y6VOAJG5.js.map +0 -1
- package/dist/chunk-ZF56VYDM.js +0 -2
- package/dist/chunk-ZF56VYDM.js.map +0 -1
- package/dist/chunk-ZVHB54PM.js +0 -2
- package/dist/chunk-ZVHB54PM.js.map +0 -1
- package/dist/chunk-ZVUQDK2E.js +0 -2
- /package/dist/{CountryFieldDefault-LOWXZDAD.js.map → CountryFieldDefault-SFTKBP6V.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-GWFIBBMB.js.map → DatePickerFieldDefault-GHHRA5MC.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-M5CIDW2Y.js.map → RadioGroupFieldDefault-WSWNB62Y.js.map} +0 -0
- /package/dist/{chunk-IHLUQ477.js.map → chunk-2TPHCOVE.js.map} +0 -0
- /package/dist/{chunk-BV5ALJ53.js.map → chunk-2UKAVWUS.js.map} +0 -0
- /package/dist/{chunk-TP7ZSHZ3.js.map → chunk-3EK647EG.js.map} +0 -0
- /package/dist/{chunk-QXTTO2MJ.js.map → chunk-3YKLEDVY.js.map} +0 -0
- /package/dist/{chunk-OHQRA2NZ.js.map → chunk-43UKWTHS.js.map} +0 -0
- /package/dist/{chunk-FKM2NCIV.js.map → chunk-4HVLMGRA.js.map} +0 -0
- /package/dist/{chunk-NMDURBYL.js.map → chunk-5RFDYBDY.js.map} +0 -0
- /package/dist/{chunk-ZVUQDK2E.js.map → chunk-6CASSN2Z.js.map} +0 -0
- /package/dist/{chunk-CIVW6O46.js.map → chunk-6IFPFK23.js.map} +0 -0
- /package/dist/{chunk-X5LRTFCO.js.map → chunk-7RC7EB47.js.map} +0 -0
- /package/dist/{chunk-MSCROI55.js.map → chunk-AGUAPUCU.js.map} +0 -0
- /package/dist/{chunk-F7E2ENZH.js.map → chunk-BKVBDV6E.js.map} +0 -0
- /package/dist/{chunk-363GGPXU.js.map → chunk-BMFFLDYL.js.map} +0 -0
- /package/dist/{chunk-VFN7G6LL.js.map → chunk-BOWNQTTR.js.map} +0 -0
- /package/dist/{chunk-RV4IDUEI.js.map → chunk-BWMATZIU.js.map} +0 -0
- /package/dist/{chunk-APHY5GJ6.js.map → chunk-BZ5XEZCL.js.map} +0 -0
- /package/dist/{chunk-FJL46ZTU.js.map → chunk-CB7T2SPX.js.map} +0 -0
- /package/dist/{chunk-FVOZEZJP.js.map → chunk-CE4ZEIWI.js.map} +0 -0
- /package/dist/{chunk-RBVGOVSD.js.map → chunk-CWHIIHQP.js.map} +0 -0
- /package/dist/{chunk-GVK4VLLD.js.map → chunk-EPLPD54O.js.map} +0 -0
- /package/dist/{chunk-XFPUH6H2.js.map → chunk-FD2FTALC.js.map} +0 -0
- /package/dist/{chunk-YV2MRBXB.js.map → chunk-GSSC5OVG.js.map} +0 -0
- /package/dist/{chunk-MKSMTFPZ.js.map → chunk-HCJP6RDC.js.map} +0 -0
- /package/dist/{chunk-AB3I4P3N.js.map → chunk-HPBYZOPP.js.map} +0 -0
- /package/dist/{chunk-XQIVHGI3.js.map → chunk-HRK4FJGT.js.map} +0 -0
- /package/dist/{chunk-BQ5A22TW.js.map → chunk-I3J7LKY3.js.map} +0 -0
- /package/dist/{chunk-HO7BGGLQ.js.map → chunk-IAIHITHL.js.map} +0 -0
- /package/dist/{chunk-CNGXYZQI.js.map → chunk-JHMIAK67.js.map} +0 -0
- /package/dist/{chunk-UV242U4J.js.map → chunk-JYYCK5IN.js.map} +0 -0
- /package/dist/{chunk-N4AO3L3N.js.map → chunk-K6WWMYKM.js.map} +0 -0
- /package/dist/{chunk-HPA2A2WQ.js.map → chunk-L622FFV6.js.map} +0 -0
- /package/dist/{chunk-WALC3PW7.js.map → chunk-MKT4MPUT.js.map} +0 -0
- /package/dist/{chunk-XI6P2XA7.js.map → chunk-NFLKVFAD.js.map} +0 -0
- /package/dist/{chunk-4SGF6UNL.js.map → chunk-NKPRRBFG.js.map} +0 -0
- /package/dist/{chunk-A6KKKCLW.js.map → chunk-P4GE72PQ.js.map} +0 -0
- /package/dist/{chunk-BYAU5GDU.js.map → chunk-Q5LU2ZBL.js.map} +0 -0
- /package/dist/{chunk-LLGY2ZUZ.js.map → chunk-QE62LRON.js.map} +0 -0
- /package/dist/{chunk-SLBEVNBG.js.map → chunk-RE2IHPDB.js.map} +0 -0
- /package/dist/{chunk-JTKKY7II.js.map → chunk-TUJXQF4Q.js.map} +0 -0
- /package/dist/{chunk-QW6TETWW.js.map → chunk-UBYT2TI4.js.map} +0 -0
- /package/dist/{chunk-7G35F5CI.js.map → chunk-UP27IEE4.js.map} +0 -0
- /package/dist/{chunk-5MXQRMNN.js.map → chunk-VON7RTMD.js.map} +0 -0
- /package/dist/{chunk-YRC6EEM3.js.map → chunk-XGECMN4V.js.map} +0 -0
- /package/dist/{chunk-6SB4KOSY.js.map → chunk-Y7NHXFRX.js.map} +0 -0
- /package/dist/{chunk-UY2IFS7S.js.map → chunk-Z7A4LTSB.js.map} +0 -0
- /package/dist/{chunk-E6NEMSIG.js.map → chunk-ZURHNW3D.js.map} +0 -0
- /package/dist/{chunk-UCVXGG6B.js.map → chunk-ZYLVMO7E.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=CountryFieldDefault-
|
|
1
|
+
import{a}from"./chunk-AGUAPUCU.js";import"./chunk-BWMATZIU.js";import"./chunk-T7CGGZOK.js";import"./chunk-CU3WQ2KN.js";import"./chunk-I3J7LKY3.js";import"./chunk-ZSJ6YADQ.js";import"./chunk-YAJJJ2JV.js";import"./chunk-OK3CYSHV.js";import"./chunk-AS4ND5IO.js";import"./chunk-4YPJKEHT.js";import"./chunk-2DCJODMR.js";import"./chunk-3PIJOIYR.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CountryFieldDefault-SFTKBP6V.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-5RFDYBDY.js";import"./chunk-BWMATZIU.js";import"./chunk-CU3WQ2KN.js";import"./chunk-I3J7LKY3.js";import"./chunk-ZSJ6YADQ.js";import"./chunk-YAJJJ2JV.js";import"./chunk-4YPJKEHT.js";import"./chunk-2DCJODMR.js";import"./chunk-3PIJOIYR.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
|
|
2
|
+
//# sourceMappingURL=DatePickerFieldDefault-GHHRA5MC.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-IAIHITHL.js";import"./chunk-BWMATZIU.js";import"./chunk-I3J7LKY3.js";import"./chunk-ZSJ6YADQ.js";import"./chunk-YAJJJ2JV.js";import"./chunk-JEULZR34.js";import"./chunk-2DCJODMR.js";import"./chunk-3PIJOIYR.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
|
|
2
|
+
//# sourceMappingURL=RadioGroupFieldDefault-WSWNB62Y.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-UP27IEE4.js";import{f as s,g as a}from"./chunk-ZSJ6YADQ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y}from"react";import{jsx as r}from"react/jsx-runtime";function A({defaultValues:u,fields:m,onSubmit:d}){let{formId:c,terminationBag:o}=f(),p=l(o.handleValidation),e=s({resolver:p,defaultValues:u,shouldUnregister:!1,mode:"onBlur"});y(()=>{let V=e?.watch(i=>{Object.keys(i).some(n=>i[n]!==o?.initialValues?.[n])&&o?.checkFieldUpdates(i)});return()=>V?.unsubscribe()},[]);let T=m||(o?.fields??[]);return r(a,{...e,children:r("form",{id:c,onSubmit:e.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:r(F,{fields:T})})})}t(A,"TerminationForm");export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2TPHCOVE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as v}from"./chunk-PGWKJ6FK.js";import{d as p,e as y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as v}from"./chunk-PGWKJ6FK.js";import{d as p,e as y}from"./chunk-4TJ2QZ7P.js";import{a as s}from"./chunk-X6ZAR7ZL.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function O({onSubmit:w,onSuccess:a,onError:t,render:f,...o}){let{components:E}=l(),{onboardingBag:r,setCreditScore:m}=v(),d=p(),u=y(),{mutateAsync:R}=s(d),{mutateAsync:g}=s(u),S=i(async()=>{try{if(await w?.(),r.creditRiskStatus==="deposit_required"&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await g({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await R({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),I=r.creditRiskStatus==="deposit_required"&&r.employment?.status&&!r.isEmploymentReadOnly,c=E?.button;if(!c)throw new Error("Button component not found");return b(c,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{S(),o.onClick?.(e)},children:f({employmentStatus:I?"created_awaiting_reserve":"invited"})})}i(O,"OnboardingInvite");export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2UKAVWUS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as d,d as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as d,d as S}from"./chunk-HCJP6RDC.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-ZSJ6YADQ.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3EK647EG.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b as l,e as s}from"./chunk-LHEF2FN7.js";import{a as o}from"./chunk-P37U34EQ.js";function b(e={}){let r=[{name:"select_country",label:"Select Country",visible:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"pricing_plan",label:"Pricing Plan",visible:!0},{name:"eligibility_questionnaire",label:"Eligibility Questionnaire",visible:!!e?.includeEligibilityQuestionnaire},{name:"choose_alternative_plan",label:"Choose Alternative Plan",visible:!1},{name:"contract_details",label:"Contract Details",visible:!0},{name:"contract_preview",label:"Contract Preview",visible:!0},{name:"review",label:"Review",visible:!0}].map((n,i)=>({name:n.name,index:i,label:n.label,visible:n.visible}));return{steps:r.reduce((n,i)=>(n[i.name]={index:i.index,name:i.name,visible:i.visible},n),{}),stepsArray:r}}o(b,"buildSteps");var m=o((e,t)=>{if(e&&t&&e!==t)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),v=o(e=>e===a||e===l,"isCMOrCMPlus"),u=["SAU","KWT","OMN","QAT","BHR"],y=o(e=>u.includes(e),"isNationalityCountryCode"),g=o((e,t)=>!t||t.length===0?!0:!t.some(r=>s[r]===e),"shouldIncludeProduct"),f=["invited"],_=["invited"];export{b as a,m as b,v as c,y as d,g as e,f,_ as g};
|
|
2
|
+
//# sourceMappingURL=chunk-3FCX7SWN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n ProductType,\n PRODUCT_IDENTIFIER_MAP,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'choose_alternative_plan'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'pricing_plan',\n label: 'Pricing Plan',\n visible: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n visible: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'choose_alternative_plan',\n label: 'Choose Alternative Plan',\n visible: false,\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: true,\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n visible: true,\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n const stepsArray = stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\nconst NATIONALITY_COUNTRY_CODES = ['SAU', 'KWT', 'OMN', 'QAT', 'BHR'];\n\n/**\n * Checks if the country code is a country code that requires nationality status field\n */\nexport const isNationalityCountryCode = (countryCode: string) => {\n return NATIONALITY_COUNTRY_CODES.includes(countryCode);\n};\n\n/**\n * Checks if a product should be included based on the excludeProducts list\n * @param productIdentifier - The product identifier to check\n * @param excludeProducts - Array of products to exclude\n * @returns true if the product should be included, false otherwise\n */\nexport const shouldIncludeProduct = (\n productIdentifier: string,\n excludeProducts?: ProductType[],\n): boolean => {\n if (!excludeProducts || excludeProducts.length === 0) {\n return true;\n }\n\n return !excludeProducts.some(\n (excluded) => PRODUCT_IDENTIFIER_MAP[excluded] === productIdentifier,\n );\n};\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'invited',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'invited',\n];\n"],"mappings":"yFAwBO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CAgDlD,IAAMC,EA3CD,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,eACN,MAAO,eACP,QAAS,EACX,EACA,CACE,KAAM,4BACN,MAAO,4BACP,QAAS,EAAQA,GAAQ,+BAC3B,EACA,CACE,KAAM,0BACN,MAAO,0BACP,QAAS,EACX,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAEmC,IAAI,CAACE,EAAMC,KAAW,CACvD,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcF,MAAO,CAAE,MAZKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CACf,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,QAASA,EAAK,OAChB,EACOE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CApEgBI,EAAAN,EAAA,cA0ET,IAAMO,EAA2CD,EAAA,CACtDE,EACAC,IACuB,CAMvB,GAJED,GACAC,GACAD,IAAmCC,EAMnC,MAAO,qEAHuB,kFAC5BD,CACF,0EACiG,EAGrG,EAhBwD,4CAqB3CE,EAAeJ,EAACK,GAEzBA,IAAiBC,GACjBD,IAAiBE,EAHO,gBAOtBC,EAA4B,CAAC,MAAO,MAAO,MAAO,MAAO,KAAK,EAKvDC,EAA2BT,EAACU,GAChCF,EAA0B,SAASE,CAAW,EADf,4BAU3BC,EAAuBX,EAAA,CAClCY,EACAC,IAEI,CAACA,GAAmBA,EAAgB,SAAW,EAC1C,GAGF,CAACA,EAAgB,KACrBC,GAAaC,EAAuBD,CAAQ,IAAMF,CACrD,EAVkC,wBAmBvBI,EAA4D,CACvE,SACF,EAEaC,EAA+D,CAC1E,SACF","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","NATIONALITY_COUNTRY_CODES","isNationalityCountryCode","countryCode","shouldIncludeProduct","productIdentifier","excludeProducts","excluded","PRODUCT_IDENTIFIER_MAP","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-KCTY6YAP.js";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-KCTY6YAP.js";import{a as r}from"./chunk-QE62LRON.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-Q5LU2ZBL.js";import{a as e}from"./chunk-D5AR26AI.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3YKLEDVY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-EUSCQL4H.js";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-EUSCQL4H.js";import{E as m,I as C,N as d,k as l,s as u,y as c}from"./chunk-YAJJJ2JV.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>l({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>C({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>m({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
|
|
2
|
+
//# sourceMappingURL=chunk-43UKWTHS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-2TPHCOVE.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4HVLMGRA.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as q}from"./chunk-STF3NTPS.js";import{a as j}from"./chunk-OPQTTZBK.js";import{a as O}from"./chunk-WVJDCDGZ.js";import{a as u}from"./chunk-EUSCQL4H.js";import{A as F,C as g,D as S,F as w,K as v,P as E,f,h as y,l as d,m as h,t as b,u as C,w as _}from"./chunk-YAJJJ2JV.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as r}from"./chunk-P37U34EQ.js";import{useMutation as m,useQuery as c}from"@tanstack/react-query";var W=r(e=>{let{client:n}=i();return c({queryKey:["employment",e],retry:!1,enabled:!!e,select:r(({data:t})=>t?.data.employment,"select"),queryFn:r(async()=>{let t=await g({client:n,headers:{Authorization:""},path:{employment_id:e}});if(t.error||!t.data)throw new Error("Failed to fetch employment data");return t},"queryFn")})},"useEmployment"),T=r(e=>{let{client:n}=i();return c({queryKey:["company",e],retry:!1,enabled:!!e,queryFn:r(async()=>{let t=await C({client:n,headers:{Authorization:""},path:{company_id:e}});if(t.error||!t.data)throw new Error("Failed to fetch employment data");return t},"queryFn"),select:r(({data:t})=>t.data.company,"select")})},"useCompany"),H=r(e=>{let{client:n}=i();return c({queryKey:["benefit-offers",e],retry:!1,enabled:!!e,queryFn:r(async()=>d({client:n,path:{employment_id:e}}).then(t=>{if(t.error||!t.data)throw new Error("Failed to fetch benefit offers data");return t}),"queryFn"),select:r(({data:t})=>t?.data?.reduce((a,o)=>({...a,[o.benefit_group.slug]:{value:o.benefit_tier?.slug??"no",...o.benefit_group?.filter?.slug?{filter:o.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),L=r(()=>{let{client:e}=i();return m({mutationFn:r(n=>E({client:e,headers:{Authorization:""},path:n}),"mutationFn")})},"useEmploymentInvite"),G=r(()=>{let{client:e}=i();return m({mutationFn:r(n=>b({client:e,body:n}),"mutationFn")})},"useCreateReserveInvoice"),X=r(({countryCode:e,form:n,fieldValues:t,options:a,query:o={},jsonSchemaVersion:s})=>{let{client:p}=i(),P=s?{json_schema_version:s}:{};return c({queryKey:["onboarding-json-schema-form",e,n],retry:!1,queryFn:r(async()=>{let l=await _({client:p,headers:{Authorization:""},path:{country_code:e,form:n},query:{skip_benefits:!0,...o,...P}});if(l.error||!l.data)throw new Error("Failed to fetch onboarding schema");return l},"queryFn"),enabled:a?.queryOptions?.enabled,select:r(({data:l})=>{let x=l?.data||{};return u(x,t,a)},"select")})},"useJSONSchemaForm"),Y=r((e,n,t)=>{let a=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:o}=i();return c({queryKey:["benefit-offers-schema",e],retry:!1,enabled:!!e,queryFn:r(async()=>{let s=await F({client:o,path:{employment_id:e},query:a});if(s.error||!s.data)throw new Error("Failed to fetch benefit offers schema");return s},"queryFn"),select:r(({data:s})=>{let p=s?.data?.schema||{};return u(p,n,{jsfModify:t?.jsfModify?.benefits})},"select")})},"useBenefitOffersSchema"),Z=r(()=>{let{client:e}=i(),n={json_schema_version:1};return m({mutationFn:r(t=>y({client:e,headers:{Authorization:""},body:t,query:{...n}}),"mutationFn")})},"useCreateEmployment"),$=r((e,n)=>{let{client:t}=i(),a={employment_basic_information_json_schema_version:1,contract_details_json_schema_version:q(n,e)||1};return m({mutationFn:r(({employmentId:o,...s})=>S({client:t,headers:{Authorization:""},body:s,path:{employment_id:o},query:{skip_benefits:!0,...a}}),"mutationFn")})},"useUpdateEmployment"),ee=r(e=>{let{client:n}=i();return m({mutationFn:r(({employmentId:t,...a})=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{};return h({client:n,body:a,path:{employment_id:t},query:{...o}})},"mutationFn")})},"useUpdateBenefitsOffers"),te=r(e=>{let{data:n,isLoading:t}=j({queryKey:"onboarding-countries",select:r(({data:o})=>o?.data?.filter(s=>s.eor_onboarding).map(s=>({label:s.name,value:s.code}))||[],"select"),enabled:e?.queryOptions?.enabled}),a=u(O.data.schema,{},e);if(n){let o=a.fields.find(s=>s.name==="country");o&&(o.options=n)}return{isLoading:t,selectCountryForm:a}},"useCountriesSchemaField"),re=r(({type:e="spread"})=>{let{client:n}=i();return m({mutationFn:r(t=>(e==="no_spread"?f:v)({client:n,body:t}),"mutationFn")})},"useConvertCurrency"),ne=r(()=>{let{client:e}=i();return m({mutationFn:r(({employmentId:n,...t})=>w({client:e,path:{employment_id:n},body:t}),"mutationFn")})},"useUpsertContractEligibility");export{W as a,T as b,H as c,L as d,G as e,X as f,Y as g,Z as h,$ as i,ee as j,te as k,re as l,ne as m};
|
|
2
|
+
//# sourceMappingURL=chunk-4TJ2QZ7P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/api.ts"],"sourcesContent":["import { useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport { Client } from '@/src/client/client';\nimport {\n ConvertCurrencyParams,\n CreateContractEligibilityParams,\n EmploymentCreateParams,\n EmploymentFullParams,\n getIndexBenefitOffer,\n getShowCompany,\n getShowEmployment,\n getShowFormCountry,\n getShowSchema,\n patchUpdateEmployment2,\n postConvertRawCurrencyConverter,\n postConvertWithSpreadCurrencyConverter,\n postCreateContractEligibility,\n postCreateEmployment2,\n postCreateRiskReserve,\n postInviteEmploymentInvitation,\n PostInviteEmploymentInvitationData,\n putUpdateBenefitOffer,\n UnifiedEmploymentUpsertBenefitOffersRequest,\n} from '@/src/client';\n\nimport { useClient } from '@/src/context';\nimport { selectCountryStepSchema } from '@/src/flows/Onboarding/json-schemas/selectCountryStep';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport {\n JSONSchemaFormResultWithFieldsets,\n JSONSchemaFormType,\n FlowOptions,\n} from '@/src/flows/types';\nimport { getContractDetailsSchemaVersion } from '@/src/flows/Onboarding/utils';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { useCountries } from '@/src/common/api/countries';\n\nexport const useEmployment = (employmentId: string | undefined) => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['employment', employmentId],\n retry: false,\n enabled: !!employmentId,\n select: ({ data }) => {\n return data?.data.employment;\n },\n queryFn: async () => {\n const response = await getShowEmployment({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n employment_id: employmentId as string,\n },\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch employment data');\n }\n\n return response;\n },\n });\n};\n\nexport const useCompany = (companyId: string) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['company', companyId],\n retry: false,\n enabled: !!companyId,\n queryFn: async () => {\n const response = await getShowCompany({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n company_id: companyId,\n },\n });\n\n if (response.error || !response.data) {\n throw new Error('Failed to fetch employment data');\n }\n\n return response;\n },\n select: ({ data }) => {\n return data.data.company;\n },\n });\n};\n\nexport const useBenefitOffers = (employmentId: string | undefined) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['benefit-offers', employmentId],\n retry: false,\n enabled: !!employmentId,\n queryFn: async () => {\n return getIndexBenefitOffer({\n client: client as Client,\n path: {\n employment_id: employmentId as string,\n },\n }).then((response) => {\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch benefit offers data');\n }\n\n return response;\n });\n },\n select: ({ data }) =>\n data?.data?.reduce(\n (acc, item) => {\n return {\n ...acc,\n [item.benefit_group.slug]: {\n value: item.benefit_tier?.slug ?? 'no',\n ...(item.benefit_group?.filter?.slug\n ? { filter: item.benefit_group?.filter?.slug }\n : {}),\n },\n };\n },\n {} as Record<string, { value: string }>,\n ),\n });\n};\n/**\n * Use this hook to invite an employee to the onboarding flow\n * @returns\n */\nexport const useEmploymentInvite = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: PostInviteEmploymentInvitationData['path']) => {\n return postInviteEmploymentInvitation({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: payload,\n });\n },\n });\n};\n\nexport const useCreateReserveInvoice = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: { employment_slug: string }) => {\n return postCreateRiskReserve({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Use this hook to get the JSON schema form for the onboarding flow\n * @param param0\n * @returns\n */\nexport const useJSONSchemaForm = ({\n countryCode,\n form,\n fieldValues,\n options,\n query = {},\n jsonSchemaVersion,\n}: {\n countryCode: string;\n form: JSONSchemaFormType;\n fieldValues: FieldValues;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n query?: Record<string, unknown>;\n jsonSchemaVersion?: number | 'latest';\n}): UseQueryResult<JSONSchemaFormResultWithFieldsets> => {\n const { client } = useClient();\n const jsonSchemaQueryParam = jsonSchemaVersion\n ? {\n json_schema_version: jsonSchemaVersion,\n }\n : {};\n return useQuery({\n queryKey: ['onboarding-json-schema-form', countryCode, form],\n retry: false,\n queryFn: async () => {\n const response = await getShowFormCountry({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n country_code: countryCode,\n form: form,\n },\n query: {\n skip_benefits: true,\n ...query,\n ...jsonSchemaQueryParam,\n },\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch onboarding schema');\n }\n\n return response;\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n const jsfSchema = data?.data || {};\n return createHeadlessForm(jsfSchema, fieldValues, options);\n },\n });\n};\n\nexport const useBenefitOffersSchema = (\n employmentId: string,\n fieldValues: FieldValues,\n options: OnboardingFlowProps['options'],\n) => {\n const jsonSchemaQueryParam = options?.jsonSchemaVersion\n ?.benefit_offers_form_schema\n ? {\n json_schema_version:\n options.jsonSchemaVersion.benefit_offers_form_schema,\n }\n : {};\n const { client } = useClient();\n return useQuery({\n queryKey: ['benefit-offers-schema', employmentId],\n retry: false,\n enabled: !!employmentId,\n queryFn: async () => {\n const response = await getShowSchema({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n query: jsonSchemaQueryParam,\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch benefit offers schema');\n }\n\n return response;\n },\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n\n return createHeadlessForm(jsfSchema, fieldValues, {\n jsfModify: options?.jsfModify?.benefits,\n });\n },\n });\n};\n\n/**\n * Use this hook to create an employment\n * @returns\n */\nexport const useCreateEmployment = () => {\n const { client } = useClient();\n // TODO: setting 1 as basic_information only supports v1 for now in the API\n const jsonSchemaQueryParam = {\n json_schema_version: 1,\n };\n return useMutation({\n mutationFn: (payload: EmploymentCreateParams) => {\n return postCreateEmployment2({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n query: {\n ...jsonSchemaQueryParam,\n },\n });\n },\n });\n};\n\nexport const useUpdateEmployment = (\n countryCode: string,\n options?: OnboardingFlowProps['options'],\n) => {\n const { client } = useClient();\n const jsonSchemaQueryParams = {\n // TODO: setting 1 as basic_information only supports v1 for now in the API\n employment_basic_information_json_schema_version: 1,\n contract_details_json_schema_version:\n getContractDetailsSchemaVersion(options, countryCode) || 1,\n };\n\n return useMutation({\n mutationFn: ({\n employmentId,\n ...payload\n }: EmploymentFullParams & { employmentId: string }) => {\n return patchUpdateEmployment2({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n path: {\n employment_id: employmentId,\n },\n query: {\n skip_benefits: true,\n ...jsonSchemaQueryParams,\n },\n });\n },\n });\n};\n\nexport const useUpdateBenefitsOffers = (\n options?: OnboardingFlowProps['options'],\n) => {\n const { client } = useClient();\n return useMutation({\n mutationFn: ({\n employmentId,\n ...payload\n }: UnifiedEmploymentUpsertBenefitOffersRequest & {\n employmentId: string;\n }) => {\n const jsonSchemaQueryParam = options?.jsonSchemaVersion\n ?.benefit_offers_form_schema\n ? {\n json_schema_version:\n options.jsonSchemaVersion.benefit_offers_form_schema,\n }\n : {};\n return putUpdateBenefitOffer({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n query: {\n ...jsonSchemaQueryParam,\n },\n });\n },\n });\n};\n\nexport const useCountriesSchemaField = (\n options?: Omit<FlowOptions, 'jsonSchemaVersion'> & {\n queryOptions?: { enabled?: boolean };\n },\n) => {\n const { data: countries, isLoading } = useCountries({\n queryKey: 'onboarding-countries',\n select: ({ data }) => {\n return (\n data?.data\n ?.filter((country) => country.eor_onboarding)\n .map((country) => {\n return {\n label: country.name,\n value: country.code,\n };\n }) || []\n );\n },\n enabled: options?.queryOptions?.enabled,\n });\n\n const selectCountryForm = createHeadlessForm(\n selectCountryStepSchema.data.schema,\n {},\n options,\n );\n\n if (countries) {\n const countryField = selectCountryForm.fields.find(\n (field) => field.name === 'country',\n );\n if (countryField) {\n countryField.options = countries;\n }\n }\n\n return {\n isLoading,\n selectCountryForm,\n };\n};\n\nexport const useConvertCurrency = ({\n type = 'spread',\n}: {\n type?: 'spread' | 'no_spread';\n}) => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: ConvertCurrencyParams) => {\n const apiFn =\n type === 'no_spread'\n ? postConvertRawCurrencyConverter\n : postConvertWithSpreadCurrencyConverter;\n return apiFn({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\nexport const useUpsertContractEligibility = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: ({\n employmentId,\n ...payload\n }: { employmentId: string } & CreateContractEligibilityParams) => {\n return postCreateContractEligibility({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n body: payload,\n });\n },\n });\n};\n"],"mappings":"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","names":["useMutation","useQuery","useEmployment","__name","employmentId","client","useClient","useQuery","data","response","getShowEmployment","useCompany","companyId","getShowCompany","useBenefitOffers","getIndexBenefitOffer","acc","item","useEmploymentInvite","useMutation","payload","postInviteEmploymentInvitation","useCreateReserveInvoice","postCreateRiskReserve","useJSONSchemaForm","countryCode","form","fieldValues","options","query","jsonSchemaVersion","jsonSchemaQueryParam","getShowFormCountry","jsfSchema","createHeadlessForm","useBenefitOffersSchema","getShowSchema","useCreateEmployment","postCreateEmployment2","useUpdateEmployment","jsonSchemaQueryParams","getContractDetailsSchemaVersion","patchUpdateEmployment2","useUpdateBenefitsOffers","putUpdateBenefitOffer","useCountriesSchemaField","countries","isLoading","useCountries","country","selectCountryForm","selectCountryStepSchema","countryField","field","useConvertCurrency","type","postConvertRawCurrencyConverter","postConvertWithSpreadCurrencyConverter","useUpsertContractEligibility","postCreateContractEligibility"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-BWMATZIU.js";import{a as C,b as w,c as F,d as P}from"./chunk-CU3WQ2KN.js";import{i as _,j as v,k as x,l as h,m as b}from"./chunk-ZSJ6YADQ.js";import{a as u,b as D}from"./chunk-4YPJKEHT.js";import{a as t}from"./chunk-3PIJOIYR.js";import{a as o}from"./chunk-P37U34EQ.js";import{CalendarIcon as L}from"lucide-react";import{format as R}from"date-fns";import{ChevronLeft as I,ChevronRight as M}from"lucide-react";import{DayPicker as z}from"react-day-picker";import{jsx as p}from"react/jsx-runtime";function N({className:r,classNames:i,showOutsideDays:s=!0,...n}){return p(z,{showOutsideDays:s,className:t("p-3",r),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:t(u({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:t("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:t(u({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...i},components:{IconLeft:o(({className:d,...l})=>p(I,{className:t("size-4",d),...l}),"IconLeft"),IconRight:o(({className:d,...l})=>p(M,{className:t("size-4",d),...l}),"IconRight")},...n})}o(N,"Calendar");import{Fragment as V,jsx as e,jsxs as m}from"react/jsx-runtime";function X({field:r,fieldData:i,fieldState:s}){let{name:n,label:d,description:l,minDate:f,maxDate:g}=i,c=f?new Date(f):void 0,y=g?new Date(g):void 0;return m(_,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[e(v,{className:"RemoteFlows__DatePickerField__Label",children:d}),m(w,{children:[e(F,{asChild:!0,children:e(x,{children:e("div",{children:m(D,{type:"button",variant:"outline",className:t("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[r.value&&e(V,{children:R(r.value,"yyyy-MM-dd")}),e(L,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),e(P,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:e(N,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:r.value?new Date(r.value):void 0,onSelect:a=>{r.onChange(a?R(a,"yyyy-MM-dd"):null)},defaultMonth:c,components:{DayContent:o(a=>e(C,{children:a.date.getDate()}),"DayContent")},disabled:a=>!!(c&&a<c||y&&a>y)})})]}),l?m(h,{children:[l," ",e(k,{helpCenter:i.meta?.helpCenter})]}):null,s.error&&e(b,{className:"RemoteFlows__DatePickerField__Error"})]})}o(X,"DatePickerFieldDefault");export{X as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5RFDYBDY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-NX7MM6XR.js";import{a as e}from"./chunk-ZXGAFQXW.js";import{a as i}from"./chunk-LMYJ6V44.js";import{a as o}from"./chunk-TC7EQZJK.js";var p={employee_communication:o,termination_details:e,paid_time_off:m,additional_information:i};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6CASSN2Z.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-CE4ZEIWI.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as n}from"./chunk-X6ZAR7ZL.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function S({onSubmit:d,onError:a,onSuccess:m}){let{onboardingBag:r}=s(),c=t(async i=>{try{let e=await r.parseFormValues(i);await d?.(e);let o=await r.onSubmit(i);if(o?.data){await m?.(o.data),r?.next();return}if(o?.error){let p=n(o?.fieldErrors||[],r.meta?.fields?.contract_details);a?.({error:o.error,rawError:o.rawError,fieldErrors:p})}}catch(e){a?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit");return E(l,{defaultValues:r.stepState.values?.contract_details||r.initialValues.contract_details,onSubmit:c})}t(S,"ContractDetailsStep");export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6IFPFK23.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-VON7RTMD.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7RC7EB47.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as F}from"./chunk-BWMATZIU.js";import{a as u}from"./chunk-T7CGGZOK.js";import{i as p,j as l,k as i,l as a,m as c}from"./chunk-ZSJ6YADQ.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as $,useState as v}from"react";import{jsx as n,jsxs as C}from"react/jsx-runtime";function L({field:t,fieldState:b,fieldData:o}){let[g,s]=v([]),_=m(e=>{let r=e.map(({value:S})=>S);t.onChange(r),s(e)},"handleChange");$(()=>{t.value&&o.options&&s(t.value.map(e=>o?.options?.find(r=>r.value===e)))},[t.value,o.options]);let y=[...Object.entries(o.$meta?.regions||{}).map(([e,r])=>({value:r,label:e,category:"Regions"})),...Object.entries(o.$meta?.subregions||{}).map(([e,r])=>({value:r,label:e,category:"Subregions"})),...o.options?.map(e=>({...e,value:e.value,label:e.label,category:"Countries"}))||[]];return C(p,{"data-field":t.name,className:`RemoteFlows__CountryField__Item__${t.name}`,children:[n(l,{className:"RemoteFlows__CountryField__Label",children:o.label}),n(i,{children:n(u,{options:y,selected:g,onChange:_})}),o.description&&C(a,{children:[o.description," ",n(F,{helpCenter:o.meta?.helpCenter})]}),b.error&&n(c,{})]})}m(L,"CountryFieldDefault");export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AGUAPUCU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-CB7T2SPX.js";import{a as n}from"./chunk-P4GE72PQ.js";import{a as p}from"./chunk-HRK4FJGT.js";import{a as s}from"./chunk-6IFPFK23.js";import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-2UKAVWUS.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{c as e}from"./chunk-TUJXQF4Q.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BKVBDV6E.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-2TPHCOVE.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({onSubmit:t}){let{terminationBag:o}=a(),n=i(async r=>{let m=await o?.parseFormValues(r);await t?.(m),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:n})}i(p,"TerminationDetailsForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BMFFLDYL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-UP27IEE4.js";import{g as C}from"./chunk-ZSJ6YADQ.js";import{h as E}from"./chunk-3PIJOIYR.js";import{b as f}from"./chunk-X6ZAR7ZL.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=p(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=await o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=f(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BOWNQTTR.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as t}from"./chunk-I3J7LKY3.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function p({helpCenter:e}){return e?n(t,{zendeskId:e.id,children:e.callToAction}):null}r(p,"HelpCenter");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BWMATZIU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-EPLPD54O.js";import{a as c}from"./chunk-HPBYZOPP.js";import{b as s}from"./chunk-Q3ALCPJN.js";import{c as l}from"./chunk-3FCX7SWN.js";import{j as e}from"./chunk-3PIJOIYR.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";function O({onSubmit:p,onSuccess:u,onError:S}){let{contractorOnboardingBag:r}=s(),C=a(async n=>{try{let t=await r.parseFormValues(n);await p?.(t);let o=await r.onSubmit(n);if(o?.data){await u?.(o?.data),r?.next();return}}catch(t){let o=e(t,r.meta?.fields?.contract_details);S?.(o)}},"handleSubmit"),f=r.stepState.values?.contract_details||r.initialValues.contract_details,i=r.stepState.values?.pricing_plan?.subscription,b=l(i);return g("div",{className:"space-y-4",children:[m(c,{defaultValues:f,onSubmit:C}),b&&m(d,{subscription:i})]})}a(O,"ContractDetailsStep");export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BZ5XEZCL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-CE4ZEIWI.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CB7T2SPX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as y}from"./chunk-PGWKJ6FK.js";import{b as F}from"./chunk-LNV36S6D.js";import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as y}from"./chunk-PGWKJ6FK.js";import{b as F}from"./chunk-LNV36S6D.js";import{a as u}from"./chunk-UP27IEE4.js";import{f,g as p}from"./chunk-ZSJ6YADQ.js";import{b as c}from"./chunk-X6ZAR7ZL.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function N({defaultValues:d,onSubmit:g,components:E}){let{formId:w,onboardingBag:o}=y(),k=F(o.handleValidation),r=f({resolver:k,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let P=o.stepState.currentStep.name,B=o.meta?.fields?.[P],O=c(n?.fieldErrors||[],B);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else await g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:w,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(u,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(N,"OnboardingForm");export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CE4ZEIWI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-6VQEAU6A.js";import{a as w,b as f}from"./chunk-BQ5A22TW.js";import{a as C}from"./chunk-JJEFWMLY.js";import{b as B}from"./chunk-4YPJKEHT.js";import{a as i,b as t,e as F}from"./chunk-3PIJOIYR.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?r("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(O,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(I,{content:r(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as x,c as N,d as A}from"./chunk-6VQEAU6A.js";import{a as w,b as f}from"./chunk-I3J7LKY3.js";import{a as C}from"./chunk-JJEFWMLY.js";import{b as B}from"./chunk-4YPJKEHT.js";import{a as i,b as t,e as F}from"./chunk-3PIJOIYR.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?r("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(O,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(I,{content:r(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CWHIIHQP.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as _}from"./chunk-3UDRMQNE.js";import{a as S}from"./chunk-CD6F3H7B.js";import{b as f}from"./chunk-IUCFOQAD.js";import{a as m}from"./chunk-VDRNNOVA.js";import{d as g}from"./chunk-3FCX7SWN.js";import{a as y}from"./chunk-LHEF2FN7.js";import{a as p,b as u}from"./chunk-I3J7LKY3.js";import{a as e}from"./chunk-P37U34EQ.js";import{format as w}from"date-fns";import{Fragment as P,jsx as d,jsxs as I}from"react/jsx-runtime";var C=e(n=>n===y,"isStandardPricingPlan"),b=e((n,i)=>{let t=i&&i<w(new Date,"yyyy-MM-dd");if(!n&&t)return f({severity:"warning",description:"Backdating the service start date is not supported in the selected Contractor Management plan."})},"showBackDateWarning"),A=e((n,i,t,o)=>{let r=C(t),s=o?.service_duration?.provisional_start_date,c=b(r,s);return{...n,fields:{...n?.fields,"service_duration.provisional_start_date":{description:i,"x-jsf-presentation":{minDate:r?void 0:w(new Date,"yyyy-MM-dd"),...c}}}}},"buildContractDetailsJsfModify"),O=e((n,i,t)=>{let o=n==="SAU",r=n==="GBR",s=g(n);if(!o&&!r&&!s)return t?.jsfModify?.basic_information;if(r)return{...t?.jsfModify?.basic_information,create:{...t?.jsfModify?.basic_information?.create,ir35:{title:"IR35 Status",description:e(()=>I(P,{children:["What's your contractor's employment status?"," ",d(u,{zendeskId:p.ir35Status,children:"Learn more about IR35"})]}),"description"),oneOf:[{const:"inside",title:"Inside IR35 (deemed employee)"},{const:"outside",title:"Outside IR35"},{const:"exempt",title:"Exempt from IR35"}],"x-jsf-presentation":{inputType:"select"}},ir35_sds_file:{title:"Upload SDS",description:"Status determination statement",type:"string","x-jsf-presentation":{inputType:"file",accept:m.document,multiple:!1,maxSize:20971520,calculateDynamicProperties:e(a=>{let l=a.ir35;return{isVisible:l==="inside"||l==="outside"}},"calculateDynamicProperties")}}},allOf:[{if:{properties:{ir35:{enum:["inside","outside"]}}},then:{required:["ir35_sds_file"]},else:{properties:{ir35_sds_file:!1}}}],required:["ir35"],orderRoot:e(a=>[...a,"ir35","ir35_sds_file"],"orderRoot")};let c=o?"Is your contractor a Saudi Arabia national, or a non-Saudi national contracting via a local business entity or under a Special Privilege Iqama visa?":`Is the contractor a ${i??"selected country"} national, or a non-${i??"selected country"} national contracting through their local business entity?`,h=o?"Please be aware that contracting with non-Saudi Arabia nationals that are not operating as a company or under a Special Privilege Iqama visa can lead to fines for operating without proper work authorization. If you are concerned, please speak with the Contractor and/or local Saudi Arabia counsel to ensure compliance.":`Be aware that the Contractor must be a ${i??"selected country"} national, or a non-${i??"selected country"} national operating through their company to comply with the legal requirements for performing services and deliverables as a contractor in ${i??"selected country"}. If you are concerned, speak with the Contractor and/or local counsel to ensure compliance.`;return{...t?.jsfModify?.basic_information,create:{...t?.jsfModify?.basic_information?.create,nationality_status:{title:c,description:"",type:"string",oneOf:[{const:"national",description:"",title:"Yes"},{const:"non-national",description:h,title:"No"}],"x-jsf-presentation":{inputType:"radio"}}},required:["nationality_status"],orderRoot:e(a=>[...a,"nationality_status"],"orderRoot")}},"buildBasicInformationJsfModify"),q=e((n,i)=>{let t=n?.jsfModify?.contract_preview?.fields;return{fields:{contract_preview_header:{...t?.contract_preview_header,"x-jsf-presentation":{Component:e(o=>{let r=t?.contract_preview_header?.["x-jsf-presentation"]?.Component||_;return d(r,{...o})},"Component")}},contract_preview_statement:{...t?.contract_preview_statement,"x-jsf-presentation":{Component:e(o=>{let r=t?.contract_preview_statement?.["x-jsf-presentation"]?.Component||S;return d(r,{reviewCompleted:!!i?.review_completed,...o})},"Component")}},signature:{...t?.signature,"x-jsf-presentation":{calculateDynamicProperties:e(o=>({isVisible:!!o.review_completed}),"calculateDynamicProperties"),...t?.signature?.["x-jsf-presentation"]}}}}},"buildContractPreviewJsfModify");export{A as a,O as b,q as c};
|
|
2
|
+
//# sourceMappingURL=chunk-DG3T5KLP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/jsfModify.tsx"],"sourcesContent":["import { createStatementProperty } from '@/src/components/form/jsf-utils/createFields';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { ContractPreviewHeader } from '@/src/flows/ContractorOnboarding/components/ContractPreviewHeader';\nimport { ContractPreviewStatement } from '@/src/flows/ContractorOnboarding/components/ContractPreviewStatement';\nimport { contractorStandardProductIdentifier } from '@/src/flows/ContractorOnboarding/constants';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport { isNationalityCountryCode } from '@/src/flows/ContractorOnboarding/utils';\nimport { JSFModify } from '@/src/flows/types';\nimport { FILE_TYPES, MAX_FILE_SIZE } from '@/src/lib/uploadConfig';\nimport { JSFCustomComponentProps } from '@/src/types/remoteFlows';\nimport { format } from 'date-fns';\nimport { FieldValues } from 'react-hook-form';\n\nconst isStandardPricingPlan = (pricingPlan: string | undefined) => {\n return pricingPlan === contractorStandardProductIdentifier;\n};\n\nconst showBackDateWarning = (\n isStandardPricingPlanSelected: boolean,\n provisionalStartDate: string | undefined,\n) => {\n const isStartDateBackdated =\n provisionalStartDate &&\n // Compare full days omitting time of the day\n provisionalStartDate < format(new Date(), 'yyyy-MM-dd');\n\n if (!isStandardPricingPlanSelected && isStartDateBackdated) {\n return createStatementProperty({\n severity: 'warning',\n description:\n 'Backdating the service start date is not supported in the selected Contractor Management plan.',\n });\n }\n\n return undefined;\n};\n\n/**\n * Merges internal jsfModify modifications with user-provided options for contract_details step\n * This abstracts the logic of applying internal field modifications (like dynamic descriptions)\n * while preserving user customizations\n */\nexport const buildContractDetailsJsfModify = (\n userJsfModify: JSFModify | undefined,\n provisionalStartDateDescription: string | undefined,\n selectedPricingPlan: string | undefined,\n fieldValues: FieldValues,\n): JSFModify => {\n const isStandardPricingPlanSelected =\n isStandardPricingPlan(selectedPricingPlan);\n const provisionalStartDate =\n fieldValues?.service_duration?.provisional_start_date;\n const statement = showBackDateWarning(\n isStandardPricingPlanSelected,\n provisionalStartDate,\n );\n return {\n ...userJsfModify,\n fields: {\n ...userJsfModify?.fields,\n ...{\n 'service_duration.provisional_start_date': {\n description: provisionalStartDateDescription,\n 'x-jsf-presentation': {\n minDate: !isStandardPricingPlanSelected\n ? format(new Date(), 'yyyy-MM-dd')\n : undefined,\n ...statement,\n },\n },\n },\n },\n };\n};\n\n/**\n * Builds the basic information jsf modify for the contractor onboarding flow\n * @param countryCode - The country code to use for the onboarding.\n * @param countryName - The name of the country to use for the onboarding.\n * @param options - The options to use for the onboarding.\n * @returns The basic information jsf modify for the contractor onboarding flow\n */\nexport const buildBasicInformationJsfModify = (\n countryCode: string,\n countryName: string | undefined,\n options: ContractorOnboardingFlowProps['options'] | undefined,\n) => {\n const isSaudiArabia = countryCode === 'SAU';\n const isUk = countryCode === 'GBR';\n const hasNationalityStatusField = isNationalityCountryCode(countryCode);\n\n if (!isSaudiArabia && !isUk && !hasNationalityStatusField) {\n return options?.jsfModify?.basic_information;\n }\n\n if (isUk) {\n return {\n ...options?.jsfModify?.basic_information,\n create: {\n ...options?.jsfModify?.basic_information?.create,\n ir35: {\n title: 'IR35 Status',\n description: () => (\n <>\n What's your contractor's employment status?{' '}\n <ZendeskTriggerButton zendeskId={zendeskArticles.ir35Status}>\n Learn more about IR35\n </ZendeskTriggerButton>\n </>\n ),\n oneOf: [\n {\n const: 'inside',\n title: 'Inside IR35 (deemed employee)',\n },\n {\n const: 'outside',\n title: 'Outside IR35',\n },\n {\n const: 'exempt',\n title: 'Exempt from IR35',\n },\n ],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n ir35_sds_file: {\n title: 'Upload SDS',\n description: 'Status determination statement',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: FILE_TYPES.document,\n multiple: false,\n maxSize: MAX_FILE_SIZE,\n calculateDynamicProperties: (\n fieldValues: Record<string, unknown>,\n ) => {\n const ir35Status = fieldValues.ir35;\n return {\n isVisible: ir35Status === 'inside' || ir35Status === 'outside',\n };\n },\n },\n },\n },\n allOf: [\n {\n if: {\n properties: {\n ir35: {\n enum: ['inside', 'outside'],\n },\n },\n },\n then: {\n required: ['ir35_sds_file'],\n },\n else: {\n properties: {\n ir35_sds_file: false,\n },\n },\n },\n ],\n required: ['ir35'],\n orderRoot: (originalOrder: string[]) => {\n return [...originalOrder, 'ir35', 'ir35_sds_file'];\n },\n };\n }\n\n const label = isSaudiArabia\n ? 'Is your contractor a Saudi Arabia national, or a non-Saudi national contracting via a local business entity or under a Special Privilege Iqama visa?'\n : `Is the contractor a ${countryName ?? 'selected country'} national, or a non-${countryName ?? 'selected country'} national contracting through their local business entity?`;\n\n const descriptionNonNationalRadio = isSaudiArabia\n ? `Please be aware that contracting with non-Saudi Arabia nationals that are not operating as a company or under a Special Privilege Iqama visa can lead to fines for operating without proper work authorization. If you are concerned, please speak with the Contractor and/or local Saudi Arabia counsel to ensure compliance.`\n : `Be aware that the Contractor must be a ${countryName ?? 'selected country'} national, or a non-${countryName ?? 'selected country'} national operating through their company to comply with the legal requirements for performing services and deliverables as a contractor in ${countryName ?? 'selected country'}. If you are concerned, speak with the Contractor and/or local counsel to ensure compliance.`;\n\n return {\n ...options?.jsfModify?.basic_information,\n create: {\n ...options?.jsfModify?.basic_information?.create,\n nationality_status: {\n title: label,\n description: '',\n type: 'string',\n oneOf: [\n {\n const: 'national',\n description: '',\n title: 'Yes',\n },\n {\n const: 'non-national',\n description: descriptionNonNationalRadio,\n title: 'No',\n },\n ],\n 'x-jsf-presentation': {\n inputType: 'radio',\n },\n },\n },\n required: ['nationality_status'],\n orderRoot: (originalOrder: string[]) => {\n return [...originalOrder, 'nationality_status'];\n },\n };\n};\n\nexport const buildContractPreviewJsfModify = (\n options: ContractorOnboardingFlowProps['options'] | undefined,\n fieldValues: FieldValues,\n) => {\n const userFields = options?.jsfModify?.contract_preview?.fields;\n\n return {\n fields: {\n contract_preview_header: {\n ...userFields?.contract_preview_header,\n 'x-jsf-presentation': {\n Component: (props: JSFCustomComponentProps) => {\n const CustomComponent =\n userFields?.contract_preview_header?.['x-jsf-presentation']\n ?.Component || ContractPreviewHeader;\n return <CustomComponent {...props} />;\n },\n },\n },\n contract_preview_statement: {\n ...userFields?.contract_preview_statement,\n 'x-jsf-presentation': {\n Component: (props: JSFCustomComponentProps) => {\n const CustomComponent =\n userFields?.contract_preview_statement?.['x-jsf-presentation']\n ?.Component || ContractPreviewStatement;\n\n return (\n <CustomComponent\n reviewCompleted={Boolean(fieldValues?.review_completed)}\n {...props}\n />\n );\n },\n },\n },\n signature: {\n ...userFields?.signature,\n 'x-jsf-presentation': {\n calculateDynamicProperties: (\n fieldValuesDynamicProperties: Record<string, unknown>,\n ) => {\n return {\n isVisible: Boolean(fieldValuesDynamicProperties.review_completed),\n };\n },\n // Merge any user-provided signature customizations\n ...userFields?.signature?.['x-jsf-presentation'],\n },\n },\n },\n };\n};\n"],"mappings":"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","names":["format","Fragment","jsx","jsxs","isStandardPricingPlan","__name","pricingPlan","contractorStandardProductIdentifier","showBackDateWarning","isStandardPricingPlanSelected","provisionalStartDate","isStartDateBackdated","format","createStatementProperty","buildContractDetailsJsfModify","userJsfModify","provisionalStartDateDescription","selectedPricingPlan","fieldValues","statement","buildBasicInformationJsfModify","countryCode","countryName","options","isSaudiArabia","isUk","hasNationalityStatusField","isNationalityCountryCode","ZendeskTriggerButton","zendeskArticles","FILE_TYPES","ir35Status","originalOrder","label","descriptionNonNationalRadio","buildContractPreviewJsfModify","userFields","props","CustomComponent","ContractPreviewHeader","ContractPreviewStatement","fieldValuesDynamicProperties"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunk-ZYLVMO7E.js";import{a as f}from"./chunk-RE2IHPDB.js";import{a as l}from"./chunk-P3QDMRCC.js";import{a as u}from"./chunk-JRUJLG27.js";import{a as n}from"./chunk-VAWEOFUO.js";import{a as s}from"./chunk-Z7A4LTSB.js";import{a as m}from"./chunk-WD5DNUSS.js";import{a as p}from"./chunk-ZURHNW3D.js";import{a}from"./chunk-JHMIAK67.js";import{a as d}from"./chunk-I4CH573Y.js";import{a as c}from"./chunk-BZ5XEZCL.js";import{a as r}from"./chunk-Q3ALCPJN.js";import{a as i}from"./chunk-RXP4X2CU.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as R,useRef as F,useMemo as y}from"react";import{jsx as V}from"react/jsx-runtime";var K=t(({render:S,employmentId:C,externalId:g,countryCode:b,skipSteps:P,initialValues:v,options:O})=>{let o=i({options:O,employmentId:C,externalId:g,countryCode:b,skipSteps:P,initialValues:v}),B=R(),w=F(void 0),I=y(()=>({setValue:w}),[]);return V(r.Provider,{value:{contractorOnboardingBag:o,formId:B,formRef:I},children:S({contractorOnboardingBag:o,components:{BasicInformationStep:a,SelectCountryStep:e,BackButton:n,SubmitButton:m,PricingPlanStep:p,EligibilityQuestionnaireStep:u,ChooseAlternativePlanStep:d,ContractDetailsStep:c,ContractPreviewStep:f,OnboardingInvite:s,ContractReviewButton:l}})})},"ContractorOnboardingFlow");export{K as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DZGLLSY7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/ContractorOnboarding.tsx"],"sourcesContent":["import { UseFormSetValue } from 'react-hook-form';\nimport { useId, useRef, useMemo } from 'react';\nimport { OnboardingBack } from '@/src/flows/ContractorOnboarding/components/OnboardingBack';\nimport { SelectCountryStep } from '@/src/flows/ContractorOnboarding/components/SelectCountryStep';\nimport { ContractorOnboardingContext } from '@/src/flows/ContractorOnboarding/context';\nimport { useContractorOnboarding } from '@/src/flows/ContractorOnboarding/hooks';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport { BasicInformationStep } from '@/src/flows/ContractorOnboarding/components/BasicInformationStep';\nimport { OnboardingSubmit } from '@/src/flows/ContractorOnboarding/components/OnboardingSubmit';\nimport { PricingPlanStep } from '@/src/flows/ContractorOnboarding/components/PricingPlan';\nimport { ContractDetailsStep } from '@/src/flows/ContractorOnboarding/components/ContractDetailsStep';\nimport { ContractPreviewStep } from '@/src/flows/ContractorOnboarding/components/ContractPreviewStep';\nimport { OnboardingInvite } from '@/src/flows/ContractorOnboarding/components/OnboardingInvite';\nimport { ContractReviewButton } from '@/src/flows/ContractorOnboarding/components/ContractReviewButton';\nimport { EligibilityQuestionnaireStep } from '@/src/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep';\nimport { ChooseAlternativePlanStep } from '@/src/flows/ContractorOnboarding/components/ChooseAlternativePlanStep';\n\nexport const ContractorOnboardingFlow = ({\n render,\n employmentId,\n externalId,\n countryCode,\n skipSteps,\n initialValues,\n options,\n}: ContractorOnboardingFlowProps) => {\n const contractorOnboardingBag = useContractorOnboarding({\n options,\n employmentId,\n externalId,\n countryCode,\n skipSteps,\n initialValues,\n });\n const formId = useId();\n // Store form's setValue method in ref to allow sibling components\n // to update form state directly (e.g., ContractReviewButton setting review_completed)\n const setValueRef = useRef<\n UseFormSetValue<Record<string, unknown>> | undefined\n >(undefined);\n const formRef = useMemo(() => ({ setValue: setValueRef }), []);\n\n return (\n <ContractorOnboardingContext.Provider\n value={{ contractorOnboardingBag, formId, formRef }}\n >\n {render({\n contractorOnboardingBag,\n components: {\n BasicInformationStep: BasicInformationStep,\n SelectCountryStep: SelectCountryStep,\n BackButton: OnboardingBack,\n SubmitButton: OnboardingSubmit,\n PricingPlanStep: PricingPlanStep,\n EligibilityQuestionnaireStep: EligibilityQuestionnaireStep,\n ChooseAlternativePlanStep: ChooseAlternativePlanStep,\n ContractDetailsStep: ContractDetailsStep,\n ContractPreviewStep: ContractPreviewStep,\n OnboardingInvite: OnboardingInvite,\n ContractReviewButton: ContractReviewButton,\n },\n })}\n </ContractorOnboardingContext.Provider>\n );\n};\n"],"mappings":"2iBACA,OAAS,SAAAA,EAAO,UAAAC,EAAQ,WAAAC,MAAe,QA0CnC,cAAAC,MAAA,oBA1BG,IAAMC,EAA2BC,EAAA,CAAC,CACvC,OAAAC,EACA,aAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,cAAAC,EACA,QAAAC,CACF,IAAqC,CACnC,IAAMC,EAA0BC,EAAwB,CACtD,QAAAF,EACA,aAAAL,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,cAAAC,CACF,CAAC,EACKI,EAASC,EAAM,EAGfC,EAAcC,EAElB,MAAS,EACLC,EAAUC,EAAQ,KAAO,CAAE,SAAUH,CAAY,GAAI,CAAC,CAAC,EAE7D,OACEd,EAACkB,EAA4B,SAA5B,CACC,MAAO,CAAE,wBAAAR,EAAyB,OAAAE,EAAQ,QAAAI,CAAQ,EAEjD,SAAAb,EAAO,CACN,wBAAAO,EACA,WAAY,CACV,qBAAsBS,EACtB,kBAAmBC,EACnB,WAAYC,EACZ,aAAcC,EACd,gBAAiBC,EACjB,6BAA8BC,EAC9B,0BAA2BC,EAC3B,oBAAqBC,EACrB,oBAAqBC,EACrB,iBAAkBC,EAClB,qBAAsBC,CACxB,CACF,CAAC,EACH,CAEJ,EA/CwC","names":["useId","useRef","useMemo","jsx","ContractorOnboardingFlow","__name","render","employmentId","externalId","countryCode","skipSteps","initialValues","options","contractorOnboardingBag","useContractorOnboarding","formId","useId","setValueRef","useRef","formRef","useMemo","ContractorOnboardingContext","BasicInformationStep","SelectCountryStep","OnboardingBack","OnboardingSubmit","PricingPlanStep","EligibilityQuestionnaireStep","ChooseAlternativePlanStep","ContractDetailsStep","ContractPreviewStep","OnboardingInvite","ContractReviewButton"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={data:{version:7,schema:{additionalProperties:!1,properties:{subscription:{title:"Choose a plan",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"radio"}}},required:["subscription"],type:"object","x-jsf-order":["subscription"]}}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E6256SK7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.ts"],"sourcesContent":["export const chooseAlternativePlanSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n properties: {\n subscription: {\n title: 'Choose a plan',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'radio',\n },\n },\n },\n required: ['subscription'],\n type: 'object',\n 'x-jsf-order': ['subscription'],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAA8B,CACzC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,WAAY,CACV,aAAc,CACZ,MAAO,gBACP,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,OACb,CACF,CACF,EACA,SAAU,CAAC,cAAc,EACzB,KAAM,SACN,cAAe,CAAC,cAAc,CAChC,CACF,CACF","names":["chooseAlternativePlanSchema"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r}from"./chunk-LHEF2FN7.js";import{a as t}from"./chunk-ZPG6GRAX.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";var n={[o]:" Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor. By use of the CSA, You release Remote from liability for any claim for damages or losses which may arise related to Your use thereof.",[r]:"Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor."},d=e(({subscription:i})=>a(t,{title:"Contractor Services Agreement",description:n[i],severity:"info"}),"StatementOfWorkDisclaimer");export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EPLPD54O.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-6CASSN2Z.js";import{a as S}from"./chunk-XFD3ULUF.js";import{a as m,b as u,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as b}from"./chunk-EUSCQL4H.js";import{U as g,c as D,z as T}from"./chunk-YAJJJ2JV.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";var y=n(e=>{let[t,r,o]=e.split("-").map(Number);return new Date(t,r-1,o)},"parseLocalDate");import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:r,options:o})=>{let{client:a}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>g({client:a,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:r}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let r=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${r} \u2192 ${o}`},"formatDateRange"),G=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(r=>({bookedDays:r?.data?.timeoffs?.reduce((o,a)=>o+(a?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:r?.data?.timeoffs?.map(o=>{let a=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:a,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:r})=>r,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[r,o])=>({...t,[r]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,r=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&r==="unlimited"?{value:t===0?20:t}:r==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function w(e,t){let r=0,o=0;return e.forEach(a=>{a.timeoff_days?.forEach(s=>{new Date(s.day)<=t?r+=s.hours||0:o+=s.hours||0})}),{before:r,after:o}}n(w,"getAllTimeoffHoursBeforeDate");var M=n(({employmentId:e,date:t,options:r})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:r?.enabled,select:n(o=>{let{before:a,after:s}=w(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:u(a),bookedDaysAfterTermination:u(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),de=n(({employmentId:e,proposedTerminationDate:t,employment:r})=>{let{value:o=0}=q(r),a=A({employmentId:e}),s=M({employmentId:e,date:t}),p=a.data?.data?.[0].annual_entitlement.type==="limited"?{days:a.data?.data?.[0].annual_entitlement.days,hours:a.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},d={days:a.data?.data?.[0].booked.days||0,hours:a.data?.data?.[0].booked.hours||0},f=a.data?.data?.[0].current_entitlement.type==="limited"?{days:a.data?.data?.[0].current_entitlement.days||0,hours:a.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:a.data?.data?.[0].used.days||0,hours:a.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},x=s.data?.bookedDaysAfterTermination||{days:0,hours:0},C=m(f.days,f.hours),H=m(l.days,l.hours),L=m(d.days,d.hours),P=C-H-L,O=_(u(P));return{data:{...F({entitledDays:p,bookedDays:d,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:x,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:r?.contract_details?.available_pto_type==="unlimited"},isLoading:a.isLoading||s.isLoading,isError:a.isError||s.isError,error:a.error||s.error}},"useSummaryTimeOffDataQuery"),fe=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),le=n(({formValues:e,jsfModify:t,step:r})=>Q({queryKey:["rmt-flows-termination-schema",r],queryFn:n(()=>k[r]??S,"queryFn"),select:n(({data:o})=>{let a=o?.schema||{};return b(a,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{y as a,c as b,G as c,A as d,M as e,de as f,fe as g,le as h};
|
|
2
|
+
//# sourceMappingURL=chunk-FD2FTALC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-2TPHCOVE.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GSSC5OVG.js.map
|