@remoteoss/remote-flows 1.25.0 → 1.27.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/ButtonDefault-EPOEMC2J.js +2 -0
- package/dist/CheckboxFieldDefault-QLUSGCSO.js +2 -0
- package/dist/CountryFieldDefault-BNXTXEWS.js +2 -0
- package/dist/DatePickerFieldDefault-FJ7HVEV5.js +2 -0
- package/dist/DrawerDefault-WN7Z4LY7.js +2 -0
- package/dist/EmailFieldDefault-LTDNKVUW.js +2 -0
- package/dist/FieldsetToggleButtonDefault-4RZ3GTDF.js +2 -0
- package/dist/FileUploadFieldDefault-HSLW6SHB.js +2 -0
- package/dist/MultiSelectFieldDefault-GSJWVA5H.js +2 -0
- package/dist/NumberFieldDefault-NVOVVUNK.js +2 -0
- package/dist/RadioGroupFieldDefault-ZLKZ4B4D.js +2 -0
- package/dist/SelectFieldDefault-WU4CDEZD.js +2 -0
- package/dist/StatementDefault-T3RCCUE5.js +2 -0
- package/dist/TableFieldDefault-S5XRYF36.js +2 -0
- package/dist/TelFieldDefault-D5EW44ZU.js +2 -0
- package/dist/TextAreaFieldDefault-G5AIZNH7.js +2 -0
- package/dist/TextFieldDefault-FCVIHZTV.js +2 -0
- package/dist/WorkScheduleFieldDefault-5JZPKI2P.js +2 -0
- package/dist/ZendeskDrawerDefault-WQ32QQVE.js +2 -0
- package/dist/{chunk-R4PLUUI3.js → chunk-2OGPILJM.js} +2 -2
- package/dist/{chunk-RAVJ3LMO.js → chunk-2P4RPBIO.js} +2 -2
- package/dist/{chunk-MEOD4UGO.js → chunk-2UZ72KAQ.js} +2 -2
- package/dist/chunk-3DQ5RNLK.js +2 -0
- package/dist/chunk-3DQ5RNLK.js.map +1 -0
- package/dist/{chunk-IJDBUKEM.js → chunk-4Y2DWXQB.js} +2 -2
- package/dist/{chunk-FHGQELT7.js → chunk-5EDCZGZV.js} +2 -2
- package/dist/{chunk-HLR7IUW7.js → chunk-5QHQT6DL.js} +2 -2
- package/dist/{chunk-N4TAXXWW.js → chunk-5TGKHA2W.js} +2 -2
- package/dist/{chunk-QMPXBDDO.js → chunk-64AJX2DH.js} +2 -2
- package/dist/{chunk-YQMALPDQ.js → chunk-65K5T3GC.js} +2 -2
- package/dist/{chunk-3HAKPYWK.js → chunk-6K3ISPZ3.js} +2 -2
- package/dist/{chunk-5MJH36G3.js → chunk-6QJZMW6S.js} +2 -2
- package/dist/chunk-6S566ZMF.js +2 -0
- package/dist/chunk-6S566ZMF.js.map +1 -0
- package/dist/{chunk-5BGETBLF.js → chunk-6SDLOAEO.js} +2 -2
- package/dist/{chunk-JJDAJQG4.js → chunk-6Y4QJ7WK.js} +2 -2
- package/dist/{chunk-RXNDKUY6.js → chunk-72RFYT5Y.js} +2 -2
- package/dist/{chunk-74U3UMRA.js → chunk-75P5LUKA.js} +2 -2
- package/dist/chunk-7DQY3SRL.js +2 -0
- package/dist/chunk-7DQY3SRL.js.map +1 -0
- package/dist/{chunk-43MCQDBU.js → chunk-7N2A2ZJ5.js} +2 -2
- package/dist/chunk-7SRRP2D6.js +2 -0
- package/dist/chunk-7SRRP2D6.js.map +1 -0
- package/dist/{chunk-3HZOTQHD.js → chunk-7X56CYUV.js} +2 -2
- package/dist/chunk-7ZBLKUKE.js +2 -0
- package/dist/chunk-7ZBLKUKE.js.map +1 -0
- package/dist/{chunk-UB5WD4YM.js → chunk-ACKYD4QC.js} +2 -2
- package/dist/{chunk-3BEEU2N4.js → chunk-AL37BOFX.js} +2 -2
- package/dist/{chunk-WI6ZYN4S.js → chunk-ALF55LF2.js} +2 -2
- package/dist/{chunk-S3YIFNST.js → chunk-B5UGFNCU.js} +2 -2
- package/dist/{chunk-LZL5KK3N.js → chunk-B7HGVWIT.js} +2 -2
- package/dist/{chunk-OOEKN64P.js → chunk-BAE2OWEH.js} +2 -2
- package/dist/{chunk-VSBNYQZM.js → chunk-BC2H7WGB.js} +2 -2
- package/dist/{chunk-ZR6AKRA3.js → chunk-BFSBZTDB.js} +2 -2
- package/dist/{chunk-5EYREHAZ.js → chunk-BTP3NN3N.js} +2 -2
- package/dist/{chunk-R3HLTYHX.js → chunk-CLAVZQBC.js} +2 -2
- package/dist/{chunk-S6MU4NHQ.js → chunk-CMR5CIYN.js} +2 -2
- package/dist/chunk-CODZ7A6U.js +2 -0
- package/dist/chunk-CODZ7A6U.js.map +1 -0
- package/dist/{chunk-JHH66SSM.js → chunk-CUSAI2ZT.js} +2 -2
- package/dist/{chunk-DXHWEBVC.js → chunk-DHLSO7BU.js} +2 -2
- package/dist/{chunk-WVND2FCE.js → chunk-DR25AW5C.js} +2 -2
- package/dist/{chunk-OABRM5LK.js → chunk-DYNVJFJH.js} +2 -2
- package/dist/{chunk-LBNA4RGS.js → chunk-EC6ZM3SX.js} +2 -2
- package/dist/{chunk-7NZH3TF3.js → chunk-EN5ZMAYF.js} +2 -2
- package/dist/{chunk-IFD3RW53.js → chunk-ET4QWXWY.js} +2 -2
- package/dist/{chunk-552XBDTE.js → chunk-FFVTWWGX.js} +2 -2
- package/dist/{chunk-2Y7QAG2Q.js → chunk-FOBUW3RN.js} +2 -2
- package/dist/{chunk-L3XWJ35V.js → chunk-FTC4EFBO.js} +2 -2
- package/dist/{chunk-6PRPMEWS.js → chunk-GFM747IZ.js} +2 -2
- package/dist/{chunk-FYBXLFMI.js → chunk-GLJV3B55.js} +2 -2
- package/dist/{chunk-FZVUO3UU.js → chunk-HBX37YK2.js} +2 -2
- package/dist/{chunk-YTWEXSYT.js → chunk-HGBOZH6Q.js} +2 -2
- package/dist/{chunk-E3HFSANG.js → chunk-HGETJXZZ.js} +2 -2
- package/dist/{chunk-LBGZYTNR.js → chunk-HI7TK62N.js} +2 -2
- package/dist/{chunk-AGZHFGBR.js → chunk-INV4YWPR.js} +2 -2
- package/dist/{chunk-DA3D7BEQ.js → chunk-JBOUDOIM.js} +2 -2
- package/dist/chunk-JR6VISHQ.js +2 -0
- package/dist/chunk-JR6VISHQ.js.map +1 -0
- package/dist/{chunk-UFLWSKNE.js → chunk-JXWFFVQO.js} +2 -2
- package/dist/chunk-KFNCHTUX.js +2 -0
- package/dist/{chunk-5ISPVKB4.js.map → chunk-KFNCHTUX.js.map} +1 -1
- package/dist/{chunk-5XNFVJNM.js → chunk-KIUI7FHF.js} +2 -2
- package/dist/{chunk-766AUWUO.js → chunk-KMBA73YG.js} +2 -2
- package/dist/{chunk-237RQGWE.js → chunk-KVMWDA6O.js} +2 -2
- package/dist/{chunk-VJMCAVOL.js → chunk-L6V2G5TE.js} +2 -2
- package/dist/{chunk-Q6NTGZUW.js → chunk-L7TAT462.js} +2 -2
- package/dist/{chunk-ZZPQGX7X.js → chunk-LBJAKZ6V.js} +2 -2
- package/dist/{chunk-FUOTJMAO.js → chunk-M64UJF3B.js} +2 -2
- package/dist/chunk-MGVJ2TKE.js +2 -0
- package/dist/chunk-MGVJ2TKE.js.map +1 -0
- package/dist/{chunk-AEKGVWE5.js → chunk-MMIHT4V6.js} +2 -2
- package/dist/{chunk-UJJ5576U.js → chunk-MVPXUUUE.js} +2 -2
- package/dist/{chunk-Y4P3ZYQK.js → chunk-NORWRQQM.js} +2 -2
- package/dist/chunk-NTRKVVLQ.js +2 -0
- package/dist/chunk-NTRKVVLQ.js.map +1 -0
- package/dist/{chunk-R47Q7R6C.js → chunk-O5XQUEB5.js} +6 -6
- package/dist/chunk-O5XQUEB5.js.map +1 -0
- package/dist/{chunk-IKSPEKDA.js → chunk-O7TCU5D2.js} +2 -2
- package/dist/{chunk-7WV3GBEI.js → chunk-OGKH4RJL.js} +2 -2
- package/dist/{chunk-ZBJ4VEDO.js → chunk-OJTYP5W7.js} +2 -2
- package/dist/chunk-OSQ6VUDM.js +2 -0
- package/dist/chunk-OSQ6VUDM.js.map +1 -0
- package/dist/{chunk-MOM5PCKI.js → chunk-OVA2X5BB.js} +2 -2
- package/dist/{chunk-TPH6YQRJ.js → chunk-OXCSFW3F.js} +2 -2
- package/dist/{chunk-SHXQGRNL.js → chunk-PK2E2DJH.js} +2 -2
- package/dist/{chunk-SSBGIR74.js → chunk-PLKF2BTI.js} +2 -2
- package/dist/{chunk-RWMNB4RJ.js → chunk-PX6B2DBO.js} +2 -2
- package/dist/{chunk-32M6SNGV.js → chunk-PZFFXEI3.js} +2 -2
- package/dist/{chunk-COZWEBRG.js → chunk-QV4FEP6W.js} +2 -2
- package/dist/{chunk-QEIHXZIK.js → chunk-QV7CVQDJ.js} +2 -2
- package/dist/{chunk-PSBC73OL.js → chunk-R5WFXN2Z.js} +2 -2
- package/dist/{chunk-A3NABWR7.js → chunk-RRZ2GPQS.js} +2 -2
- package/dist/{chunk-YRAIYQ2K.js → chunk-RUYVQ6R6.js} +2 -2
- package/dist/{chunk-BTGWCFHJ.js → chunk-SBTZUZDR.js} +2 -2
- package/dist/{chunk-5FOI6SK4.js → chunk-SW7DKXXK.js} +2 -2
- package/dist/chunk-T5U7ZIBV.js +2 -0
- package/dist/chunk-T5U7ZIBV.js.map +1 -0
- package/dist/chunk-TVBZT6FA.js +2 -0
- package/dist/chunk-TVBZT6FA.js.map +1 -0
- package/dist/{chunk-K5XSOKKX.js → chunk-TXU6EUWN.js} +2 -2
- package/dist/{chunk-EVJ77XIZ.js → chunk-U4344VZW.js} +2 -2
- package/dist/{chunk-4Z2DLHAT.js → chunk-UBNSYRKM.js} +2 -2
- package/dist/{chunk-X5TMQDWS.js → chunk-UN4RAIAR.js} +2 -2
- package/dist/{chunk-R4F5WRKC.js → chunk-UOZUG2KL.js} +2 -2
- package/dist/{chunk-R3NDFTIM.js → chunk-UZNF4JV3.js} +2 -2
- package/dist/{chunk-GPXETIKG.js → chunk-V5OIMFSH.js} +2 -2
- package/dist/{chunk-S62HZDF7.js → chunk-VDVWAYXP.js} +2 -2
- package/dist/{chunk-DJOLLEOJ.js → chunk-VHAJRKCI.js} +2 -2
- package/dist/{chunk-TFJOJCCS.js → chunk-VKKORLLM.js} +2 -2
- package/dist/{chunk-AVJEDFND.js → chunk-VSXPCSKU.js} +2 -2
- package/dist/{chunk-GBQPG5OU.js → chunk-VZXZ7ELU.js} +2 -2
- package/dist/{chunk-JOHNIKN6.js → chunk-W2ZXKNL4.js} +2 -2
- package/dist/{chunk-LRPDJWIO.js → chunk-WXEBBNWP.js} +2 -2
- package/dist/{chunk-DJYO6IIO.js → chunk-XADVV6OP.js} +2 -2
- package/dist/{chunk-XULW2ME7.js → chunk-XK77JKBO.js} +2 -2
- package/dist/chunk-XO4DAKV7.js +2 -0
- package/dist/chunk-XO4DAKV7.js.map +1 -0
- package/dist/{chunk-65KMTRFL.js → chunk-XYV6WN5C.js} +2 -2
- package/dist/{chunk-423VHE7M.js → chunk-YYMGZZTO.js} +2 -2
- package/dist/{chunk-E37JLKX4.js → chunk-ZIFQZ33N.js} +2 -2
- package/dist/{chunk-YNMQONDL.js → chunk-ZNGMRPG6.js} +2 -2
- package/dist/{chunk-D3EUFZXJ.js → chunk-ZQZWWNXL.js} +2 -2
- package/dist/chunk-ZQZWWNXL.js.map +1 -0
- package/dist/{chunk-OOSCL4WD.js → chunk-ZSBQDVXM.js} +2 -2
- package/dist/{chunk-CHRRWZHW.js → chunk-ZX3JVVRL.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/ContractAmendmentConfirmationForm.js +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/ContractAmendment/utils.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +8 -20
- 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/ContractDetailsStep.d.ts +5 -5
- 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/ContractPreviewStatement.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -5
- 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 +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
- 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/context.d.ts +8 -7
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/utils.d.ts +4 -4
- 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/CostCalculatorResetButton.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.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/SummaryResults/SummaryResults.js +1 -1
- package/dist/flows/CostCalculator/api.d.ts +5 -9
- 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 +4 -4
- 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/CreateCompany/CreateCompany.d.ts +4 -4
- package/dist/flows/CreateCompany/CreateCompany.js +1 -1
- package/dist/flows/CreateCompany/api.d.ts +6 -14
- package/dist/flows/CreateCompany/api.js +1 -1
- package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
- package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
- package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
- package/dist/flows/CreateCompany/context.d.ts +7 -6
- package/dist/flows/CreateCompany/hooks.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.js +1 -1
- package/dist/flows/CreateCompany/index.d.ts +4 -4
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/CreateCompany/types.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +9 -17
- 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 +17 -9
- 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/Onboarding/utils.js +1 -1
- 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 +5 -5
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +8 -12
- package/dist/flows/Termination/api.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +7 -7
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +7 -7
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +7 -7
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.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/schema.d.ts +4 -4
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/Termination/utils.js +1 -1
- package/dist/flows/types.d.ts +4 -3
- package/dist/flows/utils.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +11 -11
- 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-k1bkfjOU.d.ts → mutations-B8Mignyp.d.ts} +1 -1
- package/dist/{remoteFlows-CizrXXw-.d.ts → remoteFlows-B_Qw-y-E.d.ts} +14 -2
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/{types-DWSLcaDI.d.ts → types-B5J_4wyN.d.ts} +41 -11
- package/dist/{types-Cg4eblxv.d.ts → types-BkwrqJ5I.d.ts} +4 -4
- package/dist/{types-CRnEmzMD.d.ts → types-D8HNn_KX.d.ts} +1 -1
- package/dist/{types-DoYYKUID.d.ts → types-XM7RZKic.d.ts} +3 -3
- package/dist/{types-VJHlrVxd.d.ts → types-b3-hzr00.d.ts} +2 -2
- package/dist/{types.gen-Dgw1W-SB.d.ts → types.gen-DowXAxCF.d.ts} +660 -20
- package/dist/{utils-DaoVOrzw.d.ts → utils-CqFJ189L.d.ts} +1 -1
- package/package.json +62 -62
- package/dist/ButtonDefault-A5JWQEZF.js +0 -2
- package/dist/CheckboxFieldDefault-2YCVL3MM.js +0 -2
- package/dist/CountryFieldDefault-IY664WKC.js +0 -2
- package/dist/DatePickerFieldDefault-UZ3W2B3R.js +0 -2
- package/dist/DrawerDefault-HQGPEMMY.js +0 -2
- package/dist/EmailFieldDefault-6GQMGBQV.js +0 -2
- package/dist/FieldsetToggleButtonDefault-NQCXWGRK.js +0 -2
- package/dist/FileUploadFieldDefault-L3LOK4A5.js +0 -2
- package/dist/MultiSelectFieldDefault-OE5NHM6A.js +0 -2
- package/dist/NumberFieldDefault-MV3FSZOG.js +0 -2
- package/dist/RadioGroupFieldDefault-J3ESFNPW.js +0 -2
- package/dist/SelectFieldDefault-F2MAJW7S.js +0 -2
- package/dist/StatementDefault-FTAOOAL4.js +0 -2
- package/dist/TableFieldDefault-LXHWAWPG.js +0 -2
- package/dist/TelFieldDefault-EHHOHIQD.js +0 -2
- package/dist/TextAreaFieldDefault-VXPH3YGT.js +0 -2
- package/dist/TextFieldDefault-QWGENVEE.js +0 -2
- package/dist/WorkScheduleFieldDefault-SJSAWRYV.js +0 -2
- package/dist/ZendeskDrawerDefault-SUUZWWY2.js +0 -2
- package/dist/chunk-3VALWCZ5.js +0 -2
- package/dist/chunk-3VALWCZ5.js.map +0 -1
- package/dist/chunk-5ISPVKB4.js +0 -2
- package/dist/chunk-D3EUFZXJ.js.map +0 -1
- package/dist/chunk-EARN6G25.js +0 -2
- package/dist/chunk-EARN6G25.js.map +0 -1
- package/dist/chunk-EJCCWBLQ.js +0 -2
- package/dist/chunk-EJCCWBLQ.js.map +0 -1
- package/dist/chunk-KQUKUR4T.js +0 -2
- package/dist/chunk-KQUKUR4T.js.map +0 -1
- package/dist/chunk-LXOYWRNU.js +0 -2
- package/dist/chunk-LXOYWRNU.js.map +0 -1
- package/dist/chunk-NZ7BAZNH.js +0 -2
- package/dist/chunk-NZ7BAZNH.js.map +0 -1
- package/dist/chunk-OORPUQ3N.js +0 -2
- package/dist/chunk-OORPUQ3N.js.map +0 -1
- package/dist/chunk-R47Q7R6C.js.map +0 -1
- package/dist/chunk-U7S4TUFV.js +0 -2
- package/dist/chunk-U7S4TUFV.js.map +0 -1
- package/dist/chunk-UITO344H.js +0 -2
- package/dist/chunk-UITO344H.js.map +0 -1
- package/dist/chunk-VJNTRMOS.js +0 -2
- package/dist/chunk-VJNTRMOS.js.map +0 -1
- package/dist/chunk-YZKXKNDS.js +0 -2
- package/dist/chunk-YZKXKNDS.js.map +0 -1
- package/dist/chunk-ZAQUO2SM.js +0 -2
- package/dist/chunk-ZAQUO2SM.js.map +0 -1
- /package/dist/{ButtonDefault-A5JWQEZF.js.map → ButtonDefault-EPOEMC2J.js.map} +0 -0
- /package/dist/{CheckboxFieldDefault-2YCVL3MM.js.map → CheckboxFieldDefault-QLUSGCSO.js.map} +0 -0
- /package/dist/{CountryFieldDefault-IY664WKC.js.map → CountryFieldDefault-BNXTXEWS.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-UZ3W2B3R.js.map → DatePickerFieldDefault-FJ7HVEV5.js.map} +0 -0
- /package/dist/{DrawerDefault-HQGPEMMY.js.map → DrawerDefault-WN7Z4LY7.js.map} +0 -0
- /package/dist/{EmailFieldDefault-6GQMGBQV.js.map → EmailFieldDefault-LTDNKVUW.js.map} +0 -0
- /package/dist/{FieldsetToggleButtonDefault-NQCXWGRK.js.map → FieldsetToggleButtonDefault-4RZ3GTDF.js.map} +0 -0
- /package/dist/{FileUploadFieldDefault-L3LOK4A5.js.map → FileUploadFieldDefault-HSLW6SHB.js.map} +0 -0
- /package/dist/{MultiSelectFieldDefault-OE5NHM6A.js.map → MultiSelectFieldDefault-GSJWVA5H.js.map} +0 -0
- /package/dist/{NumberFieldDefault-MV3FSZOG.js.map → NumberFieldDefault-NVOVVUNK.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-J3ESFNPW.js.map → RadioGroupFieldDefault-ZLKZ4B4D.js.map} +0 -0
- /package/dist/{SelectFieldDefault-F2MAJW7S.js.map → SelectFieldDefault-WU4CDEZD.js.map} +0 -0
- /package/dist/{StatementDefault-FTAOOAL4.js.map → StatementDefault-T3RCCUE5.js.map} +0 -0
- /package/dist/{TableFieldDefault-LXHWAWPG.js.map → TableFieldDefault-S5XRYF36.js.map} +0 -0
- /package/dist/{TelFieldDefault-EHHOHIQD.js.map → TelFieldDefault-D5EW44ZU.js.map} +0 -0
- /package/dist/{TextAreaFieldDefault-VXPH3YGT.js.map → TextAreaFieldDefault-G5AIZNH7.js.map} +0 -0
- /package/dist/{TextFieldDefault-QWGENVEE.js.map → TextFieldDefault-FCVIHZTV.js.map} +0 -0
- /package/dist/{WorkScheduleFieldDefault-SJSAWRYV.js.map → WorkScheduleFieldDefault-5JZPKI2P.js.map} +0 -0
- /package/dist/{ZendeskDrawerDefault-SUUZWWY2.js.map → ZendeskDrawerDefault-WQ32QQVE.js.map} +0 -0
- /package/dist/{chunk-R4PLUUI3.js.map → chunk-2OGPILJM.js.map} +0 -0
- /package/dist/{chunk-RAVJ3LMO.js.map → chunk-2P4RPBIO.js.map} +0 -0
- /package/dist/{chunk-MEOD4UGO.js.map → chunk-2UZ72KAQ.js.map} +0 -0
- /package/dist/{chunk-IJDBUKEM.js.map → chunk-4Y2DWXQB.js.map} +0 -0
- /package/dist/{chunk-FHGQELT7.js.map → chunk-5EDCZGZV.js.map} +0 -0
- /package/dist/{chunk-HLR7IUW7.js.map → chunk-5QHQT6DL.js.map} +0 -0
- /package/dist/{chunk-N4TAXXWW.js.map → chunk-5TGKHA2W.js.map} +0 -0
- /package/dist/{chunk-QMPXBDDO.js.map → chunk-64AJX2DH.js.map} +0 -0
- /package/dist/{chunk-YQMALPDQ.js.map → chunk-65K5T3GC.js.map} +0 -0
- /package/dist/{chunk-3HAKPYWK.js.map → chunk-6K3ISPZ3.js.map} +0 -0
- /package/dist/{chunk-5MJH36G3.js.map → chunk-6QJZMW6S.js.map} +0 -0
- /package/dist/{chunk-5BGETBLF.js.map → chunk-6SDLOAEO.js.map} +0 -0
- /package/dist/{chunk-JJDAJQG4.js.map → chunk-6Y4QJ7WK.js.map} +0 -0
- /package/dist/{chunk-RXNDKUY6.js.map → chunk-72RFYT5Y.js.map} +0 -0
- /package/dist/{chunk-74U3UMRA.js.map → chunk-75P5LUKA.js.map} +0 -0
- /package/dist/{chunk-43MCQDBU.js.map → chunk-7N2A2ZJ5.js.map} +0 -0
- /package/dist/{chunk-3HZOTQHD.js.map → chunk-7X56CYUV.js.map} +0 -0
- /package/dist/{chunk-UB5WD4YM.js.map → chunk-ACKYD4QC.js.map} +0 -0
- /package/dist/{chunk-3BEEU2N4.js.map → chunk-AL37BOFX.js.map} +0 -0
- /package/dist/{chunk-WI6ZYN4S.js.map → chunk-ALF55LF2.js.map} +0 -0
- /package/dist/{chunk-S3YIFNST.js.map → chunk-B5UGFNCU.js.map} +0 -0
- /package/dist/{chunk-LZL5KK3N.js.map → chunk-B7HGVWIT.js.map} +0 -0
- /package/dist/{chunk-OOEKN64P.js.map → chunk-BAE2OWEH.js.map} +0 -0
- /package/dist/{chunk-VSBNYQZM.js.map → chunk-BC2H7WGB.js.map} +0 -0
- /package/dist/{chunk-ZR6AKRA3.js.map → chunk-BFSBZTDB.js.map} +0 -0
- /package/dist/{chunk-5EYREHAZ.js.map → chunk-BTP3NN3N.js.map} +0 -0
- /package/dist/{chunk-R3HLTYHX.js.map → chunk-CLAVZQBC.js.map} +0 -0
- /package/dist/{chunk-S6MU4NHQ.js.map → chunk-CMR5CIYN.js.map} +0 -0
- /package/dist/{chunk-JHH66SSM.js.map → chunk-CUSAI2ZT.js.map} +0 -0
- /package/dist/{chunk-DXHWEBVC.js.map → chunk-DHLSO7BU.js.map} +0 -0
- /package/dist/{chunk-WVND2FCE.js.map → chunk-DR25AW5C.js.map} +0 -0
- /package/dist/{chunk-OABRM5LK.js.map → chunk-DYNVJFJH.js.map} +0 -0
- /package/dist/{chunk-LBNA4RGS.js.map → chunk-EC6ZM3SX.js.map} +0 -0
- /package/dist/{chunk-7NZH3TF3.js.map → chunk-EN5ZMAYF.js.map} +0 -0
- /package/dist/{chunk-IFD3RW53.js.map → chunk-ET4QWXWY.js.map} +0 -0
- /package/dist/{chunk-552XBDTE.js.map → chunk-FFVTWWGX.js.map} +0 -0
- /package/dist/{chunk-2Y7QAG2Q.js.map → chunk-FOBUW3RN.js.map} +0 -0
- /package/dist/{chunk-L3XWJ35V.js.map → chunk-FTC4EFBO.js.map} +0 -0
- /package/dist/{chunk-6PRPMEWS.js.map → chunk-GFM747IZ.js.map} +0 -0
- /package/dist/{chunk-FYBXLFMI.js.map → chunk-GLJV3B55.js.map} +0 -0
- /package/dist/{chunk-FZVUO3UU.js.map → chunk-HBX37YK2.js.map} +0 -0
- /package/dist/{chunk-YTWEXSYT.js.map → chunk-HGBOZH6Q.js.map} +0 -0
- /package/dist/{chunk-E3HFSANG.js.map → chunk-HGETJXZZ.js.map} +0 -0
- /package/dist/{chunk-LBGZYTNR.js.map → chunk-HI7TK62N.js.map} +0 -0
- /package/dist/{chunk-AGZHFGBR.js.map → chunk-INV4YWPR.js.map} +0 -0
- /package/dist/{chunk-DA3D7BEQ.js.map → chunk-JBOUDOIM.js.map} +0 -0
- /package/dist/{chunk-UFLWSKNE.js.map → chunk-JXWFFVQO.js.map} +0 -0
- /package/dist/{chunk-5XNFVJNM.js.map → chunk-KIUI7FHF.js.map} +0 -0
- /package/dist/{chunk-766AUWUO.js.map → chunk-KMBA73YG.js.map} +0 -0
- /package/dist/{chunk-237RQGWE.js.map → chunk-KVMWDA6O.js.map} +0 -0
- /package/dist/{chunk-VJMCAVOL.js.map → chunk-L6V2G5TE.js.map} +0 -0
- /package/dist/{chunk-Q6NTGZUW.js.map → chunk-L7TAT462.js.map} +0 -0
- /package/dist/{chunk-ZZPQGX7X.js.map → chunk-LBJAKZ6V.js.map} +0 -0
- /package/dist/{chunk-FUOTJMAO.js.map → chunk-M64UJF3B.js.map} +0 -0
- /package/dist/{chunk-AEKGVWE5.js.map → chunk-MMIHT4V6.js.map} +0 -0
- /package/dist/{chunk-UJJ5576U.js.map → chunk-MVPXUUUE.js.map} +0 -0
- /package/dist/{chunk-Y4P3ZYQK.js.map → chunk-NORWRQQM.js.map} +0 -0
- /package/dist/{chunk-IKSPEKDA.js.map → chunk-O7TCU5D2.js.map} +0 -0
- /package/dist/{chunk-7WV3GBEI.js.map → chunk-OGKH4RJL.js.map} +0 -0
- /package/dist/{chunk-ZBJ4VEDO.js.map → chunk-OJTYP5W7.js.map} +0 -0
- /package/dist/{chunk-MOM5PCKI.js.map → chunk-OVA2X5BB.js.map} +0 -0
- /package/dist/{chunk-TPH6YQRJ.js.map → chunk-OXCSFW3F.js.map} +0 -0
- /package/dist/{chunk-SHXQGRNL.js.map → chunk-PK2E2DJH.js.map} +0 -0
- /package/dist/{chunk-SSBGIR74.js.map → chunk-PLKF2BTI.js.map} +0 -0
- /package/dist/{chunk-RWMNB4RJ.js.map → chunk-PX6B2DBO.js.map} +0 -0
- /package/dist/{chunk-32M6SNGV.js.map → chunk-PZFFXEI3.js.map} +0 -0
- /package/dist/{chunk-COZWEBRG.js.map → chunk-QV4FEP6W.js.map} +0 -0
- /package/dist/{chunk-QEIHXZIK.js.map → chunk-QV7CVQDJ.js.map} +0 -0
- /package/dist/{chunk-PSBC73OL.js.map → chunk-R5WFXN2Z.js.map} +0 -0
- /package/dist/{chunk-A3NABWR7.js.map → chunk-RRZ2GPQS.js.map} +0 -0
- /package/dist/{chunk-YRAIYQ2K.js.map → chunk-RUYVQ6R6.js.map} +0 -0
- /package/dist/{chunk-BTGWCFHJ.js.map → chunk-SBTZUZDR.js.map} +0 -0
- /package/dist/{chunk-5FOI6SK4.js.map → chunk-SW7DKXXK.js.map} +0 -0
- /package/dist/{chunk-K5XSOKKX.js.map → chunk-TXU6EUWN.js.map} +0 -0
- /package/dist/{chunk-EVJ77XIZ.js.map → chunk-U4344VZW.js.map} +0 -0
- /package/dist/{chunk-4Z2DLHAT.js.map → chunk-UBNSYRKM.js.map} +0 -0
- /package/dist/{chunk-X5TMQDWS.js.map → chunk-UN4RAIAR.js.map} +0 -0
- /package/dist/{chunk-R4F5WRKC.js.map → chunk-UOZUG2KL.js.map} +0 -0
- /package/dist/{chunk-R3NDFTIM.js.map → chunk-UZNF4JV3.js.map} +0 -0
- /package/dist/{chunk-GPXETIKG.js.map → chunk-V5OIMFSH.js.map} +0 -0
- /package/dist/{chunk-S62HZDF7.js.map → chunk-VDVWAYXP.js.map} +0 -0
- /package/dist/{chunk-DJOLLEOJ.js.map → chunk-VHAJRKCI.js.map} +0 -0
- /package/dist/{chunk-TFJOJCCS.js.map → chunk-VKKORLLM.js.map} +0 -0
- /package/dist/{chunk-AVJEDFND.js.map → chunk-VSXPCSKU.js.map} +0 -0
- /package/dist/{chunk-GBQPG5OU.js.map → chunk-VZXZ7ELU.js.map} +0 -0
- /package/dist/{chunk-JOHNIKN6.js.map → chunk-W2ZXKNL4.js.map} +0 -0
- /package/dist/{chunk-LRPDJWIO.js.map → chunk-WXEBBNWP.js.map} +0 -0
- /package/dist/{chunk-DJYO6IIO.js.map → chunk-XADVV6OP.js.map} +0 -0
- /package/dist/{chunk-XULW2ME7.js.map → chunk-XK77JKBO.js.map} +0 -0
- /package/dist/{chunk-65KMTRFL.js.map → chunk-XYV6WN5C.js.map} +0 -0
- /package/dist/{chunk-423VHE7M.js.map → chunk-YYMGZZTO.js.map} +0 -0
- /package/dist/{chunk-E37JLKX4.js.map → chunk-ZIFQZ33N.js.map} +0 -0
- /package/dist/{chunk-YNMQONDL.js.map → chunk-ZNGMRPG6.js.map} +0 -0
- /package/dist/{chunk-OOSCL4WD.js.map → chunk-ZSBQDVXM.js.map} +0 -0
- /package/dist/{chunk-CHRRWZHW.js.map → chunk-ZX3JVVRL.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-KFNCHTUX.js";import"./chunk-AL37BOFX.js";import"./chunk-JXWFFVQO.js";import"./chunk-ET4QWXWY.js";import"./chunk-72RFYT5Y.js";import"./chunk-O5XQUEB5.js";import"./chunk-OSQ6VUDM.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CheckboxFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CheckboxFieldDefault-QLUSGCSO.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-ZNGMRPG6.js";import"./chunk-OXCSFW3F.js";import"./chunk-6SDLOAEO.js";import"./chunk-AL37BOFX.js";import"./chunk-FOBUW3RN.js";import"./chunk-YYMGZZTO.js";import"./chunk-XADVV6OP.js";import"./chunk-ET4QWXWY.js";import"./chunk-72RFYT5Y.js";import"./chunk-O5XQUEB5.js";import"./chunk-OSQ6VUDM.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CountryFieldDefault-BNXTXEWS.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-CODZ7A6U.js";import"./chunk-6SDLOAEO.js";import"./chunk-AL37BOFX.js";import"./chunk-XADVV6OP.js";import"./chunk-ET4QWXWY.js";import"./chunk-72RFYT5Y.js";import"./chunk-O5XQUEB5.js";import"./chunk-OSQ6VUDM.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
|
|
2
|
+
//# sourceMappingURL=DatePickerFieldDefault-FJ7HVEV5.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-7X56CYUV.js";import"./chunk-OXCSFW3F.js";import"./chunk-6SDLOAEO.js";import"./chunk-FOBUW3RN.js";import"./chunk-YYMGZZTO.js";import"./chunk-XADVV6OP.js";import"./chunk-72RFYT5Y.js";import"./chunk-OSQ6VUDM.js";import"./chunk-P37U34EQ.js";export{a as MultiSelectFieldDefault};
|
|
2
|
+
//# sourceMappingURL=MultiSelectFieldDefault-GSJWVA5H.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-L7TAT462.js";import"./chunk-AL37BOFX.js";import"./chunk-DYNVJFJH.js";import"./chunk-ET4QWXWY.js";import"./chunk-72RFYT5Y.js";import"./chunk-O5XQUEB5.js";import"./chunk-OSQ6VUDM.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
|
|
2
|
+
//# sourceMappingURL=RadioGroupFieldDefault-ZLKZ4B4D.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-T5U7ZIBV.js";import"./chunk-AL37BOFX.js";import"./chunk-ET4QWXWY.js";import"./chunk-72RFYT5Y.js";import"./chunk-O5XQUEB5.js";import"./chunk-OSQ6VUDM.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as TextAreaFieldDefault};
|
|
2
|
+
//# sourceMappingURL=TextAreaFieldDefault-G5AIZNH7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-2P4RPBIO.js";import"./chunk-YYMGZZTO.js";import"./chunk-UZNF4JV3.js";import"./chunk-XADVV6OP.js";import"./chunk-CLAVZQBC.js";import"./chunk-72RFYT5Y.js";import"./chunk-OSQ6VUDM.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as WorkScheduleFieldDefault};
|
|
2
|
+
//# sourceMappingURL=WorkScheduleFieldDefault-5JZPKI2P.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-NTRKVVLQ.js";import{f as a,h as d}from"./chunk-72RFYT5Y.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2OGPILJM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T,b as E,c as j,d as O,f as V}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T,b as E,c as j,d as O,f as V}from"./chunk-YYMGZZTO.js";import{a as $,d as w,e as x,f as B}from"./chunk-UZNF4JV3.js";import{b as F}from"./chunk-XADVV6OP.js";import{a as N}from"./chunk-CLAVZQBC.js";import{a as g,b as k,d as D,e as R,f as H,h as C}from"./chunk-72RFYT5Y.js";import{a as s}from"./chunk-P37U34EQ.js";import*as l from"yup";var P=s((t,a,r)=>{if(t&&"reportValidity"in t){let o=g(r,a);t.setCustomValidity(o&&o.message||""),t.reportValidity()}},"r"),b=s((t,a)=>{for(let r in a.fields){let o=a.fields[r];o&&o.ref&&"reportValidity"in o.ref?P(o.ref,r,t):o&&o.refs&&o.refs.forEach(u=>P(u,r,t))}},"o"),q=s((t,a)=>{a.shouldUseNativeValidation&&b(t,a);let r={};for(let o in t){let u=g(a.fields,o),i=Object.assign(t[o]||{},{ref:u&&u.ref});if(A(a.names||Object.keys(t),o)){let n=Object.assign({},g(r,o));k(n,"root",i),k(r,o,n)}else k(r,o,i)}return r},"s"),A=s((t,a)=>{let r=M(a);return t.some(o=>M(o).match(`^${r}\\.\\d+`))},"i");function M(t){return t.replace(/\]|\[/g,"")}s(M,"n");function L(t,a,r){return r===void 0&&(r={}),function(o,u,i){try{return Promise.resolve((function(n,_){try{var p=(a!=null&&a.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(t[r.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},a,{context:u}))).then(function(m){return i.shouldUseNativeValidation&&b({},i),{values:r.raw?Object.assign({},o):m,errors:{}}}))}catch(m){return _(m)}return p&&p.then?p.then(void 0,_):p})(0,function(n){if(!n.inner)throw n;return{values:{},errors:q((_=n,p=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(_.inner||[]).reduce(function(m,c){if(m[c.path]||(m[c.path]={message:c.message,type:c.type}),p){var S=m[c.path].types,y=S&&S[c.type];m[c.path]=D(c.path,p,m,c.type,y?[].concat(y,c.message):c.message)}return m},{})),i)};var _,p}))}catch(n){return Promise.reject(n)}}}s(L,"o");import{Fragment as Y,useState as z}from"react";import{jsx as e,jsxs as d}from"react/jsx-runtime";var K=l.object({day:l.string().required(),checked:l.boolean().required(),start_time:l.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:s(t=>t.required("Required"),"then"),otherwise:s(t=>t.optional().nullable(),"otherwise")}),end_time:l.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:s(t=>t.required("Required"),"then"),otherwise:s(t=>t.optional().nullable(),"otherwise")}),hours:l.number().default(0),break_duration_minutes:l.string().default("0")}),G=l.object({schedule:l.array(K)});function J({defaultSchedule:t,onSubmit:a}){let[r,o]=z(!1),u=$.map(f=>{let h=t.find(v=>v.day.toLowerCase()===x(f).toLowerCase()||v.day.toLowerCase()===f.toLowerCase());return h?{...h,day:x(f),checked:!0}:{...t[0],checked:!1,day:x(f)}}),i=H({defaultValues:{schedule:u},resolver:L(G)}),{handleSubmit:n,watch:_,reset:p,control:m,formState:c}=i,{fields:S}=R({name:"schedule",control:m}),y=_("schedule");function I(f){let h=f.schedule.filter(({checked:v})=>v).map(v=>({...v,hours:w(v)}));a(h),o(!1)}s(I,"handleSubmitWorkingHours");function U(){p(),o(!1)}return s(U,"handleCancel"),e("div",{className:"flex items-center justify-between",children:d(T,{open:r,onOpenChange:o,children:[e(E,{asChild:!0,children:e(F,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),d(j,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[e(O,{children:e(V,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),e(C,{...i,children:d("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[d("div",{className:"rounded-lg",children:[e("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),d("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[e("div",{className:"col-span-2"}),e("div",{className:"col-span-3 text-center",children:"START"}),e("div",{className:"col-span-1 text-center"}),e("div",{className:"col-span-3 text-center",children:"END"}),e("div",{className:"col-span-2 text-center",children:"HOURS"})]}),e("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:S.map((f,h)=>{let v=y[h],W=w(v);return d(Y,{children:[d("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[e("div",{className:"col-span-2 flex items-center gap-3",children:e(B,{label:f.day,name:`schedule.${h}.checked`})}),e("div",{className:"col-span-3",children:e(N,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),e("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),e("div",{className:"col-span-3",children:e(N,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),e("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(W)?"-":`${W} hours`})]}),d("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[e("div",{className:"col-span-2 text-gray-500",children:"Break"}),e("div",{className:"col-span-2",children:e(N,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),e("div",{className:"col-span-2 text-gray-500",children:"minutes"}),e("div",{className:"col-span-4"})]})]},f.id)})})]}),Object.keys(c.errors).length>0&&e("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),d("div",{className:"flex gap-4 pt-4",children:[e(F,{type:"button",className:"reset-button",variant:"outline",onClick:U,children:"Cancel"}),e(F,{type:"button",className:"submit-button",onClick:n(I),children:"Save Schedule"})]})]})})]})]})})}s(J,"WorkScheduleSelectionForm");var he=s(({fieldData:t})=>{let{defaultFormattedValue:a,currentSchedule:r,onSubmit:o}=t,{workHoursSummary:u,breakSummary:i,totalWorkHours:n}=a;return d("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[e("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),d("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[e("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:u.join(", ")}}),e("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:i.join()}),d("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",e("span",{children:n})," hours per week"]}),e(J,{defaultSchedule:r,onSubmit:o})]})]})},"WorkScheduleFieldDefault");export{he as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2P4RPBIO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as e}from"./chunk-XADVV6OP.js";import{c as t}from"./chunk-OSQ6VUDM.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";var s=o(({isExpanded:l,onToggle:n,className:m,...i})=>p(e,{type:"button",className:t("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",m),variant:"default",onClick:n,...i,children:l?"Remove":"Define"}),"FieldsetToggleButtonDefault");export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2UZ72KAQ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as D,b as k,c as j,e as L}from"./chunk-RRZ2GPQS.js";import{e as G}from"./chunk-KIUI7FHF.js";import{a as le}from"./chunk-HBX37YK2.js";import{a as ae}from"./chunk-NTRKVVLQ.js";import{a as E,c as P,d as I,e as J,f as _}from"./chunk-LBJAKZ6V.js";import{f as X,g as A,h as Q}from"./chunk-72RFYT5Y.js";import{c as T}from"./chunk-OSQ6VUDM.js";import{d as ee}from"./chunk-KQPDXXG3.js";import{a as v}from"./chunk-P37U34EQ.js";import*as O from"@radix-ui/react-collapsible";var ce=O.Root,be=O.CollapsibleTrigger,fe=O.CollapsibleContent;import*as w from"@radix-ui/react-tabs";import{jsx as U}from"react/jsx-runtime";function Y({className:e,...a}){return U(w.Root,{"data-slot":"tabs",className:T("flex flex-col gap-2",e),...a})}v(Y,"Tabs");function W({className:e,...a}){return U(w.List,{"data-slot":"tabs-list",className:T("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...a})}v(W,"TabsList");function K({className:e,...a}){return U(w.Trigger,{"data-slot":"tabs-trigger",className:T("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}v(K,"TabsTrigger");function ge({className:e,...a}){return U(w.Content,{"data-slot":"tabs-content",className:T("flex-1 outline-none",e),...a})}v(ge,"TabsContent");import*as $ from"react";import*as N from"@radix-ui/react-scroll-area";import{jsx as H,jsxs as ye}from"react/jsx-runtime";var te=$.forwardRef(({className:e,children:a,...l},n)=>ye(N.Root,{ref:n,className:T("relative overflow-hidden",e),...l,children:[H(N.Viewport,{className:"h-full w-full rounded-[inherit]",children:a}),H(se,{}),H(N.Corner,{})]}));te.displayName=N.Root.displayName;var se=$.forwardRef(({className:e,orientation:a="vertical",...l},n)=>H(N.ScrollAreaScrollbar,{ref:n,orientation:a,className:T("flex touch-none select-none transition-colors",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...l,children:H(N.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));se.displayName=N.ScrollAreaScrollbar.displayName;import{useState as B,useEffect as Ce,useMemo as we}from"react";import{useQuery as Re}from"@tanstack/react-query";import M from"fast-deep-equal";var oe=v(e=>e.name?e.type?!0:(console.warn(`Field "${e.name}" missing required "type" property`),!1):(console.warn('Field missing required "name" property:',e),!1),"validateField"),he=v((e,a)=>{if(M(e,a))return;let l=new Map((e||[]).map(t=>[t.value,t])),n=new Map((a||[]).map(t=>[t.value,t])),d=[],m=[],p=[];if(n.forEach((t,c)=>{l.has(c)||d.push({value:t.value,label:t.label})}),l.forEach((t,c)=>{if(!n.has(c))m.push({value:t.value,label:t.label});else{let g=n.get(c);if(!M(t,g)){let b={};t.label!==g.label&&(b.label={old:t.label,new:g.label}),Object.keys(b).length>0&&p.push({value:c,changes:b})}}}),!(d.length===0&&m.length===0&&p.length===0))return{added:d,removed:m,modified:p}},"compareOptions"),Ne=v((e,a)=>{let l=e.fields,n=a.fields;if(!l&&!n)return;let d=q(l||[],n||[]);if(d.added.length>0||d.removed.length>0||d.modified.length>0)return Array.from(d.fieldDiffs.values())},"compareNestedFields"),Se=v((e,a)=>{let l={label:e.label!==a.label,required:e.required!==a.required,inputType:e.inputType!==a.inputType,type:e.type!==a.type,jsonType:!M(e.jsonType,a.jsonType),name:e.name!==a.name,defaultValue:e.defaultValue!==a.defaultValue,minDate:e.minDate!==a.minDate,maxDate:e.maxDate!==a.maxDate,maxLength:e.maxLength!==a.maxLength,multiple:e.multiple!==a.multiple,isVisible:e.isVisible!==a.isVisible,options:!M(e.options,a.options)},n=(()=>{let m=e.fields,p=a.fields;if(!m&&!p)return!1;if(!m||!p)return!0;let t=q(m,p);return t.added.length>0||t.removed.length>0||t.modified.length>0})();return Object.values(l).some(m=>m)||n},"isFieldModified"),Te=v((e,a)=>{let l={};e.label!==a.label&&(l.label={old:e.label,new:a.label}),e.required!==a.required&&(l.required={old:e.required,new:a.required}),e.type!==a.type&&(l.type={old:e.type,new:a.type}),e.inputType!==a.inputType&&(l.inputType={old:e.inputType,new:a.inputType}),M(e.jsonType,a.jsonType)||(l.jsonType={old:e.jsonType,new:a.jsonType}),M(e.defaultValue,a.defaultValue)||(l.defaultValue={old:e.defaultValue,new:a.defaultValue}),e.minDate!==a.minDate&&(l.minDate={old:e.minDate||"",new:a.minDate||""}),e.maxDate!==a.maxDate&&(l.maxDate={old:e.maxDate||"",new:a.maxDate||""}),e.maxLength!==a.maxLength&&(l.maxLength={old:e.maxLength||0,new:a.maxLength||0}),e.multiple!==a.multiple&&(l.multiple={old:e.multiple||!1,new:a.multiple||!1}),e.isVisible!==a.isVisible&&(l.isVisible={old:e.isVisible,new:a.isVisible});let n=he(e.options,a.options);n&&(l.options=n);let d=Ne(e,a);return d&&(l.nestedFields=d),Object.keys(l).length>0?l:void 0},"getFieldChanges"),q=v((e=[],a=[])=>{let l=e.filter(oe),n=a.filter(oe),d=new Map(l.map(f=>[f.name,{field:f}])),m=new Map(n.map(f=>[f.name,{field:f}])),p=[],t=[],c=[],g=[],b=new Map;return m.forEach((f,i)=>{d.has(i)||(p.push(i),b.set(i,{fieldName:i,diffType:"added"}))}),d.forEach(({field:f},i)=>{if(!m.has(i))t.push(i),b.set(i,{fieldName:i,diffType:"removed"});else{let{field:h}=m.get(i);Se(f,h)?(c.push(i),b.set(i,{fieldName:i,diffType:"modified",changes:Te(f,h)})):(g.push(i),b.set(i,{fieldName:i,diffType:"unchanged"}))}}),{added:p,removed:t,modified:c,unchanged:g,fieldDiffs:b}},"compareFormFields"),ne=v(e=>{switch(e){case"added":return"bg-green-50 border-l-4 border-green-500";case"removed":return"bg-red-50 border-l-4 border-red-500";case"modified":return"bg-yellow-50 border-l-4 border-yellow-500";default:return""}},"getDiffStyles");import{useMemo as ie,useRef as z,useEffect as xe}from"react";import{jsx as s,jsxs as u}from"react/jsx-runtime";var Fe=v(({children:e,diffType:a,changes:l})=>{let n=ne(a);if(a==="unchanged")return s("div",{children:e});let m={added:s("span",{className:"text-xs font-semibold text-green-700 bg-green-100 px-2 py-1 rounded",children:"NEW"}),removed:s("span",{className:"text-xs font-semibold text-red-700 bg-red-100 px-2 py-1 rounded",children:"REMOVED"}),modified:s("span",{className:"text-xs font-semibold text-yellow-700 bg-yellow-100 px-2 py-1 rounded",children:"MODIFIED"})}[a],p=v(()=>{if(!l||a!=="modified")return null;let t=[];if(l.label&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Label:"})," ",s("span",{className:"line-through text-red-600",children:l.label.old})," ","\u2192 ",s("span",{className:"text-green-600",children:l.label.new})]},"label")),l.required&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Required:"})," ",s("span",{className:"line-through text-red-600",children:l.required.old?"Yes":"No"})," ","\u2192"," ",s("span",{className:"text-green-600",children:l.required.new?"Yes":"No"})]},"required")),l.type&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Type:"})," ",s("span",{className:"line-through text-red-600",children:l.type.old})," ","\u2192 ",s("span",{className:"text-green-600",children:l.type.new})]},"type")),l.inputType&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Input Type:"})," ",s("span",{className:"line-through text-red-600",children:l.inputType.old})," ","\u2192 ",s("span",{className:"text-green-600",children:l.inputType.new})]},"inputType")),l.jsonType){let c=Array.isArray(l.jsonType.old)?l.jsonType.old.join(" | "):l.jsonType.old,g=Array.isArray(l.jsonType.new)?l.jsonType.new.join(" | "):l.jsonType.new;t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"JSON Type:"})," ",s("span",{className:"line-through text-red-600",children:c})," \u2192"," ",s("span",{className:"text-green-600",children:g})]},"jsonType"))}return l.defaultValue!==void 0&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Default Value:"})," ",s("span",{className:"line-through text-red-600",children:JSON.stringify(l.defaultValue.old)})," ","\u2192"," ",s("span",{className:"text-green-600",children:JSON.stringify(l.defaultValue.new)})]},"defaultValue")),l.options&&(l.options.added.length>0&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold text-green-700",children:"Options Added:"})," ",l.options.added.map(c=>c.label).join(", ")]},"options-added")),l.options.removed.length>0&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold text-red-700",children:"Options Removed:"})," ",l.options.removed.map(c=>c.label).join(", ")]},"options-removed")),l.options.modified.length>0&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Options Modified:"})," ",l.options.modified.length," option(s)"]},"options-modified"))),l.nestedFields&&l.nestedFields.length>0&&t.push(u("div",{className:"text-xs",children:[s("span",{className:"font-semibold",children:"Nested Fields:"})," ",l.nestedFields.length," field(s) changed"]},"nestedFields")),t.length===0?null:u("div",{className:"mt-2 p-2 bg-yellow-50 rounded border border-yellow-200 space-y-1",children:[s("div",{className:"text-xs font-semibold text-yellow-800 mb-1",children:"Changes:"}),t]})},"renderChanges");return u("div",{className:`p-3 mb-2 rounded ${n} relative`,children:[s("div",{className:"absolute top-2 right-2",children:m}),e,p()]})},"FieldWrapper"),re=v(({version:e,fields:a,fieldsets:l,diffMap:n,title:d,scrollRef:m})=>{let p=X({mode:"onBlur"}),t=ie(()=>{let c=v((g,b)=>g.map(f=>{let i=b.get(f.name),h=i?.diffType||"unchanged",S=i?.changes,x=f.fields,R=f;if(x&&Array.isArray(x)){let V=new Map;S&&typeof S=="object"&&"nestedFields"in S&&Array.isArray(S.nestedFields)&&S.nestedFields.forEach(o=>{V.set(o.fieldName,{diffType:o.diffType,changes:o.changes})});let F=c(x,V);R={...f,fields:F}}return{...R,WrapperComponent:v(({children:V})=>s(Fe,{diffType:h,fieldName:f.name,changes:S,children:V}),"WrapperComponent")}}),"applyWrappers");return c(a,n)},[a,n]);return u(D,{className:"h-full",children:[s(k,{children:u(j,{children:[d," - Version ",e]})}),s(L,{ref:m,className:"overflow-y-auto max-h-[600px]",children:s(Q,{...p,children:s("form",{className:"space-y-4",children:s(ae,{fields:t,fieldsets:l,fieldValues:{}})})})})]})},"FormPanel"),de=v(({topVersion:e,bottomVersion:a,topFields:l,bottomFields:n,topFieldsets:d,bottomFieldsets:m,isLoading:p})=>{let t=ie(()=>q(l,n),[l,n]),c=z(null),g=z(null),b=z(!1);if(xe(()=>{let i=c.current,h=g.current;if(!i||!h)return;let S=v(()=>{b.current||(b.current=!0,h.scrollTop=i.scrollTop,requestAnimationFrame(()=>{b.current=!1}))},"handleLeftScroll"),x=v(()=>{b.current||(b.current=!0,i.scrollTop=h.scrollTop,requestAnimationFrame(()=>{b.current=!1}))},"handleRightScroll");return i.addEventListener("scroll",S),h.addEventListener("scroll",x),()=>{i.removeEventListener("scroll",S),h.removeEventListener("scroll",x)}},[l,n]),p)return s("div",{className:"flex items-center justify-center h-96",children:u("div",{className:"text-center",children:[s("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto"}),s("p",{className:"mt-4 text-gray-600",children:"Loading schemas..."})]})});let f=t.added.length===0&&t.removed.length===0&&t.modified.length===0;return u("div",{className:"space-y-6",children:[s(D,{children:s(L,{className:"pt-6",children:f?s("p",{className:"text-center text-gray-600",children:"No differences detected between the two versions"}):u("div",{className:"flex gap-6 justify-center",children:[t.added.length>0&&u("div",{className:"flex items-center gap-2",children:[s("span",{className:"w-4 h-4 bg-green-500 rounded"}),u("span",{className:"text-sm",children:[t.added.length," field",t.added.length>1?"s":""," ","added"]})]}),t.removed.length>0&&u("div",{className:"flex items-center gap-2",children:[s("span",{className:"w-4 h-4 bg-red-500 rounded"}),u("span",{className:"text-sm",children:[t.removed.length," field",t.removed.length>1?"s":""," removed"]})]}),t.modified.length>0&&u("div",{className:"flex items-center gap-2",children:[s("span",{className:"w-4 h-4 bg-yellow-500 rounded"}),u("span",{className:"text-sm",children:[t.modified.length," field",t.modified.length>1?"s":""," modified"]})]})]})})}),u("div",{className:"grid grid-cols-2 gap-6",children:[s(re,{version:e,fields:l,fieldsets:d,diffMap:t.fieldDiffs,title:"Left",scrollRef:c}),s(re,{version:a,fields:n,fieldsets:m,diffMap:t.fieldDiffs,title:"Right",scrollRef:g})]})]})},"SchemaFormComparison");var ve=[{value:1,label:"v1 (Legacy)"},{value:3,label:"v3 (Recommended)"}],Z={ALB:[{value:1,label:"v1"}],ARE:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],ARG:[{value:1,label:"v1"}],ARM:[{value:1,label:"v1"}],AUS:[{value:1,label:"v1"}],AUT:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BEL:[{value:1,label:"v1"},{value:2,label:"v2"}],BGD:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BGR:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BIH:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],BLR:[{value:1,label:"v1"},{value:2,label:"v2"}],BOL:[{value:1,label:"v1"}],BRA:[{value:1,label:"v1"}],CAN:[{value:1,label:"v1"},{value:2,label:"v2"}],CHE:[{value:1,label:"v1"},{value:2,label:"v2"}],CHL:[{value:1,label:"v1"}],CHN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],COL:[{value:1,label:"v1"}],CRI:[{value:1,label:"v1"}],CYP:[{value:1,label:"v1"}],CZE:[{value:1,label:"v1"},{value:2,label:"v2"}],DEU:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],DNK:[{value:1,label:"v1"}],DOM:[{value:1,label:"v1"}],ECU:[{value:1,label:"v1"}],EGY:[{value:1,label:"v1"},{value:2,label:"v2"}],ESP:[{value:1,label:"v1"},{value:2,label:"v2"}],EST:[{value:1,label:"v1"}],FIN:[{value:1,label:"v1"}],FRA:[{value:1,label:"v1"},{value:2,label:"v2"}],GBR:[{value:1,label:"v1"},{value:2,label:"v2"}],GEO:[{value:1,label:"v1"}],GRC:[{value:1,label:"v1"}],GTM:[{value:1,label:"v1"}],HKG:[{value:1,label:"v1"},{value:2,label:"v2"}],HND:[{value:1,label:"v1"}],HRV:[{value:1,label:"v1"},{value:2,label:"v2"}],HUN:[{value:1,label:"v1"}],IDN:[{value:1,label:"v1"}],IND:[{value:1,label:"v1"},{value:2,label:"v2"}],IRL:[{value:1,label:"v1"}],ISL:[{value:1,label:"v1"},{value:2,label:"v2"}],ISR:[{value:1,label:"v1"}],ITA:[{value:1,label:"v1"}],JAM:[{value:1,label:"v1"},{value:2,label:"v2"}],JPN:[{value:1,label:"v1"},{value:2,label:"v2"}],KEN:[{value:1,label:"v1"},{value:2,label:"v2"}],KGZ:[{value:1,label:"v1"}],KHM:[{value:1,label:"v1"}],KOR:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],LBN:[{value:1,label:"v1"},{value:2,label:"v2"}],LKA:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],LTU:[{value:1,label:"v1"}],LUX:[{value:1,label:"v1"}],LVA:[{value:1,label:"v1"},{value:2,label:"v2"}],MAR:[{value:1,label:"v1"}],MDA:[{value:1,label:"v1"}],MEX:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],MKD:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],MLT:[{value:1,label:"v1"}],MNG:[{value:1,label:"v1"}],MUS:[{value:1,label:"v1"},{value:2,label:"v2"}],MYS:[{value:1,label:"v1"},{value:2,label:"v2"}],NGA:[{value:1,label:"v1"},{value:2,label:"v2"}],NIC:[{value:1,label:"v1"}],NLD:[{value:1,label:"v1"}],NOR:[{value:1,label:"v1"},{value:2,label:"v2"}],NZL:[{value:1,label:"v1"},{value:2,label:"v2"}],PAK:[{value:1,label:"v1"},{value:2,label:"v2"}],PAN:[{value:1,label:"v1"}],PER:[{value:1,label:"v1"}],PHL:[{value:1,label:"v1"}],POL:[{value:1,label:"v1"}],PRI:[{value:1,label:"v1"}],PRT:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],PRY:[{value:1,label:"v1"}],ROU:[{value:1,label:"v1"}],SAU:[{value:1,label:"v1"},{value:2,label:"v2"}],SGP:[{value:1,label:"v1"},{value:2,label:"v2"}],SLV:[{value:1,label:"v1"}],SRB:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],SVK:[{value:1,label:"v1"}],SVN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],SWE:[{value:1,label:"v1"},{value:2,label:"v2"}],THA:[{value:1,label:"v1"},{value:2,label:"v2"}],TUN:[{value:1,label:"v1"},{value:2,label:"v2"},{value:3,label:"v3"}],TUR:[{value:1,label:"v1"}],TWN:[{value:1,label:"v1"}],UGA:[{value:1,label:"v1"}],UKR:[{value:1,label:"v1"}],URY:[{value:1,label:"v1"}],USA:[{value:1,label:"v1"}],VNM:[{value:1,label:"v1"},{value:2,label:"v2"}],XKX:[{value:1,label:"v1"}],ZAF:[{value:1,label:"v1"}],ZWE:[{value:1,label:"v1"}]},ue=Object.fromEntries(Object.entries(Z).filter(([,e])=>e.length>1)),me=[{value:"employment_basic_information",label:"Basic Information"},{value:"contract_details",label:"Contract Details"}];import{jsx as r,jsxs as y}from"react/jsx-runtime";var pe=v(()=>{let[e,a]=B("employment_basic_information"),[l,n]=B(1),[d,m]=B(1),[p,t]=B("ARE"),{client:c}=ee(),{data:g}=Re({...le(c,"schema-comparison"),select:v(o=>o.data?.data?.filter(C=>C.eor_onboarding).filter(C=>Object.keys(ue).includes(C.code)).map(C=>({label:C.name,value:C.code}))||[],"select")}),b=e==="contract_details",{data:f,isLoading:i}=G({countryCode:p,form:e,fieldValues:{},jsonSchemaVersion:l,options:{queryOptions:{enabled:!0}}}),{data:h,isLoading:S}=G({countryCode:p,form:e,fieldValues:{},jsonSchemaVersion:d,options:{queryOptions:{enabled:!0}}}),x=i||S,R=Z[p],V=R!==void 0,F=we(()=>e==="employment_basic_information"?ve:R||[{value:"latest",label:"Latest"}],[e,R]);return Ce(()=>{let o=F.map(C=>C.value);o.includes(l)||n(F[0].value),o.includes(d)||m(F[0].value)},[e,p,F,l,d]),y("div",{className:"space-y-6",children:[y(D,{children:[r(k,{children:r(j,{children:"Configuration"})}),y(L,{className:"space-y-4",children:[y("div",{children:[r(A,{className:"mb-2 block",children:"Form Type"}),r(Y,{value:e,onValueChange:o=>a(o),children:r(W,{className:"grid w-full grid-cols-2",children:me.map(o=>r(K,{value:o.value,children:o.label},o.value))})})]}),b&&!V&&r("div",{className:"rounded-md bg-yellow-50 p-4 border border-yellow-200",children:y("div",{className:"flex",children:[r("div",{className:"flex-shrink-0",children:r("svg",{className:"h-5 w-5 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:r("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),y("div",{className:"ml-3",children:[r("h3",{className:"text-sm font-medium text-yellow-800",children:"Version mappings not found"}),r("div",{className:"mt-2 text-sm text-yellow-700",children:y("p",{children:["Country"," ",r("span",{className:"font-semibold",children:p})," is not configured in COUNTRY_CONTRACT_VERSIONS. Using default (latest only)."]})})]})]})}),b&&y("div",{children:[r(A,{htmlFor:"country-select",className:"mb-2 block",children:"Country"}),y(E,{value:p,onValueChange:t,children:[r(I,{id:"country-select",children:r(P,{placeholder:"Select a country"})}),r(J,{children:g?.map(o=>r(_,{value:o.value,children:o.label},o.value))})]})]}),y("div",{className:"grid grid-cols-2 gap-4",children:[y("div",{children:[r(A,{htmlFor:"top-version",className:"mb-2 block",children:"Left Version"}),y(E,{value:String(l),onValueChange:o=>n(o==="latest"?"latest":Number(o)),children:[r(I,{id:"top-version",children:r(P,{placeholder:"Select version"})}),r(J,{children:F.map(o=>r(_,{value:String(o.value),children:o.label},String(o.value)))})]})]}),y("div",{children:[r(A,{htmlFor:"bottom-version",className:"mb-2 block",children:"Right Version"}),y(E,{value:String(d),onValueChange:o=>m(o==="latest"?"latest":Number(o)),children:[r(I,{id:"bottom-version",children:r(P,{placeholder:"Select version"})}),r(J,{children:F.map(o=>r(_,{value:String(o.value),children:o.label},String(o.value)))})]})]})]})]})]}),r(de,{topVersion:l,bottomVersion:d,topFields:f?.fields||[],bottomFields:h?.fields||[],topFieldsets:f?.meta?.["x-jsf-fieldsets"],bottomFieldsets:h?.meta?.["x-jsf-fieldsets"],isLoading:x})]})},"JsonSchemaComparison");export{ce as a,be as b,fe as c,Y as d,W as e,K as f,ge as g,te as h,pe as i};
|
|
2
|
+
//# sourceMappingURL=chunk-3DQ5RNLK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/collapsible.tsx","../src/components/ui/tabs.tsx","../src/components/ui/scroll-area.tsx","../src/components/JsonSchemaComparison/JsonSchemaComparison.tsx","../src/components/JsonSchemaComparison/formDiffDetector.ts","../src/components/JsonSchemaComparison/SchemaFormComparison.tsx","../src/components/JsonSchemaComparison/schemaVersions.ts"],"sourcesContent":["import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n","import * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot='tabs'\n className={cn('flex flex-col gap-2', className)}\n {...props}\n />\n );\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot='tabs-list'\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot='tabs-trigger'\n className={cn(\n \"data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot='tabs-content'\n className={cn('flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\n\nimport { cn } from '@/src/lib/utils';\n\nconst ScrollArea = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className='h-full w-full rounded-[inherit]'>\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none transition-colors',\n orientation === 'vertical' &&\n 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' &&\n 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className='relative flex-1 rounded-full bg-border' />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n","import { useState, useEffect, useMemo } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n} from '@/src/components/ui/card';\nimport { Label } from '@/src/components/ui/label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/src/components/ui/select';\nimport { Tabs, TabsList, TabsTrigger } from '@/src/components/ui/tabs';\nimport { useJSONSchemaForm } from '@/src/flows/Onboarding/api';\nimport { SchemaFormComparison } from './SchemaFormComparison';\nimport {\n BASIC_INFO_VERSIONS,\n COUNTRY_CONTRACT_VERSIONS,\n COUNTRY_CONTRACT_VERSIONS_WITH_MULTIPLE_VERSIONS,\n FORM_TYPES,\n type FormType,\n type SchemaVersion,\n} from './schemaVersions';\nimport { countriesOptions } from '@/src/common/api/countries';\nimport { useClient } from '@/src/context';\nimport type { Client } from '@/src/client/client';\nimport { JSFField } from '@/src/types/remoteFlows';\n\nexport const JsonSchemaComparison = () => {\n const [formType, setFormType] = useState<FormType>(\n 'employment_basic_information',\n );\n const [topVersion, setTopVersion] = useState<SchemaVersion>(1);\n const [bottomVersion, setBottomVersion] = useState<SchemaVersion>(1);\n const [countryCode, setCountryCode] = useState<string>('ARE');\n\n const { client } = useClient();\n\n const { data: countriesData } = useQuery({\n ...countriesOptions(client as Client, 'schema-comparison'),\n select: (response) =>\n response.data?.data\n ?.filter(\n (country: { eor_onboarding?: boolean }) => country.eor_onboarding,\n )\n .filter((country: { code: string }) =>\n Object.keys(\n COUNTRY_CONTRACT_VERSIONS_WITH_MULTIPLE_VERSIONS,\n ).includes(country.code),\n )\n .map((country: { name: string; code: string }) => ({\n label: country.name,\n value: country.code,\n })) || [],\n });\n\n const isContractDetails = formType === 'contract_details';\n\n const { data: topSchema, isLoading: isLoadingTop } = useJSONSchemaForm({\n countryCode: countryCode,\n form: formType,\n fieldValues: {},\n jsonSchemaVersion: topVersion,\n options: {\n queryOptions: {\n enabled: true,\n },\n },\n });\n\n const { data: bottomSchema, isLoading: isLoadingBottom } = useJSONSchemaForm({\n countryCode: countryCode,\n form: formType,\n fieldValues: {},\n jsonSchemaVersion: bottomVersion,\n options: {\n queryOptions: {\n enabled: true,\n },\n },\n });\n\n const isLoading = isLoadingTop || isLoadingBottom;\n\n const countryVersions = COUNTRY_CONTRACT_VERSIONS[countryCode];\n const hasCountryMapping = countryVersions !== undefined;\n\n const versionOptions = useMemo(() => {\n return formType === 'employment_basic_information'\n ? BASIC_INFO_VERSIONS\n : countryVersions || [{ value: 'latest', label: 'Latest' }];\n }, [formType, countryVersions]);\n\n useEffect(() => {\n const availableVersionValues = versionOptions.map((v) => v.value);\n\n if (!availableVersionValues.includes(topVersion)) {\n // WE NEED TO FIX: react-hooks/set-state-in-effect - Calling setState synchronously within an effect can trigger cascading renders\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setTopVersion(versionOptions[0].value);\n }\n if (!availableVersionValues.includes(bottomVersion)) {\n setBottomVersion(versionOptions[0].value);\n }\n }, [formType, countryCode, versionOptions, topVersion, bottomVersion]);\n\n return (\n <div className='space-y-6'>\n <Card>\n <CardHeader>\n <CardTitle>Configuration</CardTitle>\n </CardHeader>\n <CardContent className='space-y-4'>\n <div>\n <Label className='mb-2 block'>Form Type</Label>\n <Tabs\n value={formType}\n onValueChange={(value) => setFormType(value as FormType)}\n >\n <TabsList className='grid w-full grid-cols-2'>\n {FORM_TYPES.map((type) => (\n <TabsTrigger key={type.value} value={type.value}>\n {type.label}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n </div>\n\n {isContractDetails && !hasCountryMapping && (\n <div className='rounded-md bg-yellow-50 p-4 border border-yellow-200'>\n <div className='flex'>\n <div className='flex-shrink-0'>\n <svg\n className='h-5 w-5 text-yellow-400'\n viewBox='0 0 20 20'\n fill='currentColor'\n >\n <path\n fillRule='evenodd'\n d='M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z'\n clipRule='evenodd'\n />\n </svg>\n </div>\n <div className='ml-3'>\n <h3 className='text-sm font-medium text-yellow-800'>\n Version mappings not found\n </h3>\n <div className='mt-2 text-sm text-yellow-700'>\n <p>\n Country{' '}\n <span className='font-semibold'>{countryCode}</span> is\n not configured in COUNTRY_CONTRACT_VERSIONS. Using default\n (latest only).\n </p>\n </div>\n </div>\n </div>\n </div>\n )}\n\n {isContractDetails && (\n <div>\n <Label htmlFor='country-select' className='mb-2 block'>\n Country\n </Label>\n <Select value={countryCode} onValueChange={setCountryCode}>\n <SelectTrigger id='country-select'>\n <SelectValue placeholder='Select a country' />\n </SelectTrigger>\n <SelectContent>\n {countriesData?.map(\n (country: { label: string; value: string }) => (\n <SelectItem key={country.value} value={country.value}>\n {country.label}\n </SelectItem>\n ),\n )}\n </SelectContent>\n </Select>\n </div>\n )}\n\n <div className='grid grid-cols-2 gap-4'>\n <div>\n <Label htmlFor='top-version' className='mb-2 block'>\n Left Version\n </Label>\n <Select\n value={String(topVersion)}\n onValueChange={(value) =>\n setTopVersion(value === 'latest' ? 'latest' : Number(value))\n }\n >\n <SelectTrigger id='top-version'>\n <SelectValue placeholder='Select version' />\n </SelectTrigger>\n <SelectContent>\n {versionOptions.map((version) => (\n <SelectItem\n key={String(version.value)}\n value={String(version.value)}\n >\n {version.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n\n <div>\n <Label htmlFor='bottom-version' className='mb-2 block'>\n Right Version\n </Label>\n <Select\n value={String(bottomVersion)}\n onValueChange={(value) =>\n setBottomVersion(\n value === 'latest' ? 'latest' : Number(value),\n )\n }\n >\n <SelectTrigger id='bottom-version'>\n <SelectValue placeholder='Select version' />\n </SelectTrigger>\n <SelectContent>\n {versionOptions.map((version) => (\n <SelectItem\n key={String(version.value)}\n value={String(version.value)}\n >\n {version.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n </div>\n </CardContent>\n </Card>\n\n <SchemaFormComparison\n topVersion={topVersion}\n bottomVersion={bottomVersion}\n topFields={(topSchema?.fields as JSFField[]) || []}\n bottomFields={(bottomSchema?.fields as JSFField[]) || []}\n topFieldsets={topSchema?.meta?.['x-jsf-fieldsets']}\n bottomFieldsets={bottomSchema?.meta?.['x-jsf-fieldsets']}\n isLoading={isLoading}\n />\n </div>\n );\n};\n","import type { $TSFixMe, JSFField } from '@/src/types/remoteFlows';\nimport equal from 'fast-deep-equal';\n\nexport type DiffType = 'added' | 'removed' | 'modified' | 'unchanged';\n\nexport interface FieldDiff {\n fieldName: string;\n diffType: DiffType;\n changes?: {\n label?: { old: string; new: string };\n required?: { old: boolean; new: boolean };\n type?: { old: string; new: string };\n inputType?: { old: string; new: string };\n jsonType?: { old: string; new: string };\n defaultValue?: { old: unknown; new: unknown };\n minDate?: { old: string; new: string };\n maxDate?: { old: string; new: string };\n maxLength?: { old: number; new: number };\n multiple?: { old: boolean; new: boolean };\n isVisible?: { old: boolean; new: boolean };\n options?: {\n added: Array<{ value: string; label: string }>;\n removed: Array<{ value: string; label: string }>;\n modified: Array<{\n value: string;\n changes: { label?: { old: string; new: string } };\n }>;\n };\n nestedFields?: FieldDiff[];\n };\n}\n\nexport interface FormDiff {\n added: string[];\n removed: string[];\n modified: string[];\n unchanged: string[];\n fieldDiffs: Map<string, FieldDiff>;\n}\n\nconst validateField = (field: JSFField): boolean => {\n if (!field.name) {\n console.warn('Field missing required \"name\" property:', field);\n return false;\n }\n if (!field.type) {\n console.warn(`Field \"${field.name}\" missing required \"type\" property`);\n return false;\n }\n return true;\n};\n\nconst compareOptions = (\n options1: JSFField['options'],\n options2: JSFField['options'],\n):\n | {\n added: Array<{ value: string; label: string }>;\n removed: Array<{ value: string; label: string }>;\n modified: Array<{\n value: string;\n changes: { label?: { old: string; new: string } };\n }>;\n }\n | undefined => {\n if (equal(options1, options2)) return undefined;\n\n const map1 = new Map((options1 || []).map((o) => [o.value, o]));\n const map2 = new Map((options2 || []).map((o) => [o.value, o]));\n\n const added: Array<{ value: string; label: string }> = [];\n const removed: Array<{ value: string; label: string }> = [];\n const modified: Array<{\n value: string;\n changes: { label?: { old: string; new: string } };\n }> = [];\n\n map2.forEach((option, value) => {\n if (!map1.has(value)) {\n added.push({ value: option.value, label: option.label });\n }\n });\n\n map1.forEach((option1, value) => {\n if (!map2.has(value)) {\n removed.push({ value: option1.value, label: option1.label });\n } else {\n const option2 = map2.get(value)!;\n if (!equal(option1, option2)) {\n const changes: { label?: { old: string; new: string } } = {};\n if (option1.label !== option2.label) {\n changes.label = { old: option1.label, new: option2.label };\n }\n if (Object.keys(changes).length > 0) {\n modified.push({ value, changes });\n }\n }\n }\n });\n\n if (added.length === 0 && removed.length === 0 && modified.length === 0) {\n return undefined;\n }\n\n return { added, removed, modified };\n};\n\nconst compareNestedFields = (\n field1: JSFField,\n field2: JSFField,\n): FieldDiff[] | undefined => {\n const nestedFields1 = (field1 as $TSFixMe).fields;\n\n const nestedFields2 = (field2 as $TSFixMe).fields;\n\n if (!nestedFields1 && !nestedFields2) return undefined;\n\n const nestedDiff = compareFormFields(\n nestedFields1 || [],\n nestedFields2 || [],\n );\n\n const hasChanges =\n nestedDiff.added.length > 0 ||\n nestedDiff.removed.length > 0 ||\n nestedDiff.modified.length > 0;\n\n if (!hasChanges) return undefined;\n\n return Array.from(nestedDiff.fieldDiffs.values());\n};\n\nconst isFieldModified = (field1: JSFField, field2: JSFField): boolean => {\n // Only compare user-facing schema properties, not internal/computed ones\n // Ignore: schema (Yup), computedAttributes, scopedJsonSchema, errorMessage, meta, description\n // Note: nested fields are checked via compareNestedFields to avoid deep equal with problematic properties\n const checks = {\n label: field1.label !== field2.label,\n required: field1.required !== field2.required,\n inputType: field1.inputType !== field2.inputType,\n type: field1.type !== field2.type,\n jsonType: !equal(field1.jsonType, field2.jsonType), // Use equal since jsonType can be an array like ['string', 'null']\n name: field1.name !== field2.name,\n defaultValue: field1.defaultValue !== field2.defaultValue,\n minDate: field1.minDate !== field2.minDate,\n maxDate: field1.maxDate !== field2.maxDate,\n maxLength: field1.maxLength !== field2.maxLength,\n multiple: field1.multiple !== field2.multiple,\n isVisible: field1.isVisible !== field2.isVisible,\n options: !equal(field1.options, field2.options),\n };\n\n // Check for nested field changes using compareNestedFields to avoid deep isEqual\n const hasNestedChanges = (() => {\n const nestedFields1 = (field1 as $TSFixMe).fields;\n const nestedFields2 = (field2 as $TSFixMe).fields;\n\n // If both undefined or null, no changes\n if (!nestedFields1 && !nestedFields2) return false;\n\n // If one is defined and the other isn't, there's a change\n if (!nestedFields1 || !nestedFields2) return true;\n\n // Recursively compare using our proper comparison logic\n const nestedDiff = compareFormFields(nestedFields1, nestedFields2);\n return (\n nestedDiff.added.length > 0 ||\n nestedDiff.removed.length > 0 ||\n nestedDiff.modified.length > 0\n );\n })();\n\n const isModified =\n Object.values(checks).some((check) => check) || hasNestedChanges;\n\n return isModified;\n};\n\nconst getFieldChanges = (field1: JSFField, field2: JSFField) => {\n const changes: FieldDiff['changes'] = {};\n\n if (field1.label !== field2.label) {\n changes.label = { old: field1.label, new: field2.label };\n }\n\n if (field1.required !== field2.required) {\n changes.required = { old: field1.required, new: field2.required };\n }\n\n if (field1.type !== field2.type) {\n changes.type = { old: field1.type, new: field2.type };\n }\n\n if (field1.inputType !== field2.inputType) {\n changes.inputType = {\n old: field1.inputType,\n new: field2.inputType,\n };\n }\n\n if (!equal(field1.jsonType, field2.jsonType)) {\n changes.jsonType = {\n old: field1.jsonType,\n new: field2.jsonType,\n };\n }\n\n if (!equal(field1.defaultValue, field2.defaultValue)) {\n changes.defaultValue = {\n old: field1.defaultValue,\n new: field2.defaultValue,\n };\n }\n\n if (field1.minDate !== field2.minDate) {\n changes.minDate = {\n old: field1.minDate || '',\n new: field2.minDate || '',\n };\n }\n\n if (field1.maxDate !== field2.maxDate) {\n changes.maxDate = {\n old: field1.maxDate || '',\n new: field2.maxDate || '',\n };\n }\n\n if (field1.maxLength !== field2.maxLength) {\n changes.maxLength = {\n old: field1.maxLength || 0,\n new: field2.maxLength || 0,\n };\n }\n\n if (field1.multiple !== field2.multiple) {\n changes.multiple = {\n old: field1.multiple || false,\n new: field2.multiple || false,\n };\n }\n\n if (field1.isVisible !== field2.isVisible) {\n changes.isVisible = {\n old: field1.isVisible,\n new: field2.isVisible,\n };\n }\n\n const optionsDiff = compareOptions(field1.options, field2.options);\n if (optionsDiff) {\n changes.options = optionsDiff;\n }\n\n const nestedFieldsDiff = compareNestedFields(field1, field2);\n if (nestedFieldsDiff) {\n changes.nestedFields = nestedFieldsDiff;\n }\n\n return Object.keys(changes).length > 0 ? changes : undefined;\n};\n\nexport const compareFormFields = (\n fields1: JSFField[] = [],\n fields2: JSFField[] = [],\n): FormDiff => {\n const validFields1 = fields1.filter(validateField);\n const validFields2 = fields2.filter(validateField);\n\n const fieldMap1 = new Map(validFields1.map((f) => [f.name, { field: f }]));\n const fieldMap2 = new Map(validFields2.map((f) => [f.name, { field: f }]));\n\n const added: string[] = [];\n const removed: string[] = [];\n const modified: string[] = [];\n const unchanged: string[] = [];\n const fieldDiffs = new Map<string, FieldDiff>();\n\n fieldMap2.forEach((_, name) => {\n if (!fieldMap1.has(name)) {\n added.push(name);\n fieldDiffs.set(name, {\n fieldName: name,\n diffType: 'added',\n });\n }\n });\n\n fieldMap1.forEach(({ field: field1 }, name) => {\n if (!fieldMap2.has(name)) {\n removed.push(name);\n fieldDiffs.set(name, {\n fieldName: name,\n diffType: 'removed',\n });\n } else {\n const { field: field2 } = fieldMap2.get(name)!;\n\n if (isFieldModified(field1, field2)) {\n modified.push(name);\n fieldDiffs.set(name, {\n fieldName: name,\n diffType: 'modified',\n changes: getFieldChanges(field1, field2),\n });\n } else {\n unchanged.push(name);\n fieldDiffs.set(name, {\n fieldName: name,\n diffType: 'unchanged',\n });\n }\n }\n });\n\n return {\n added,\n removed,\n modified,\n unchanged,\n fieldDiffs,\n };\n};\n\nexport const getDiffStyles = (diffType: DiffType): string => {\n switch (diffType) {\n case 'added':\n return 'bg-green-50 border-l-4 border-green-500';\n case 'removed':\n return 'bg-red-50 border-l-4 border-red-500';\n case 'modified':\n return 'bg-yellow-50 border-l-4 border-yellow-500';\n case 'unchanged':\n default:\n return '';\n }\n};\n","import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { Form } from '@/src/components/ui/form';\nimport { useForm } from 'react-hook-form';\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n} from '@/src/components/ui/card';\nimport type { JSFField, JSFFieldset } from '@/src/types/remoteFlows';\nimport { compareFormFields, getDiffStyles } from './formDiffDetector';\nimport { useMemo, useRef, useEffect } from 'react';\n\ninterface SchemaFormComparisonProps {\n topVersion: string | number;\n bottomVersion: string | number;\n topFields: JSFField[];\n bottomFields: JSFField[];\n topFieldsets?: JSFFieldset | null;\n bottomFieldsets?: JSFFieldset | null;\n isLoading?: boolean;\n}\n\nconst FieldWrapper = ({\n children,\n diffType,\n changes,\n}: {\n children: React.ReactNode;\n diffType: 'added' | 'removed' | 'modified' | 'unchanged';\n fieldName: string;\n changes?: {\n label?: { old: string; new: string };\n required?: { old: boolean; new: boolean };\n type?: { old: string; new: string };\n inputType?: { old: string; new: string };\n jsonType?: { old: string; new: string };\n defaultValue?: { old: unknown; new: unknown };\n minDate?: { old: string; new: string };\n maxDate?: { old: string; new: string };\n maxLength?: { old: number; new: number };\n multiple?: { old: boolean; new: boolean };\n isVisible?: { old: boolean; new: boolean };\n options?: {\n added: Array<{ value: string; label: string }>;\n removed: Array<{ value: string; label: string }>;\n modified: Array<{\n value: string;\n changes: { label?: { old: string; new: string } };\n }>;\n };\n nestedFields?: unknown[];\n };\n}) => {\n const styles = getDiffStyles(diffType);\n\n if (diffType === 'unchanged') {\n return <div>{children}</div>;\n }\n\n const badges = {\n added: (\n <span className='text-xs font-semibold text-green-700 bg-green-100 px-2 py-1 rounded'>\n NEW\n </span>\n ),\n removed: (\n <span className='text-xs font-semibold text-red-700 bg-red-100 px-2 py-1 rounded'>\n REMOVED\n </span>\n ),\n modified: (\n <span className='text-xs font-semibold text-yellow-700 bg-yellow-100 px-2 py-1 rounded'>\n MODIFIED\n </span>\n ),\n };\n\n const badge = badges[diffType];\n\n const renderChanges = () => {\n if (!changes || diffType !== 'modified') return null;\n\n const changesList: React.ReactNode[] = [];\n\n if (changes.label) {\n changesList.push(\n <div key='label' className='text-xs'>\n <span className='font-semibold'>Label:</span>{' '}\n <span className='line-through text-red-600'>{changes.label.old}</span>{' '}\n → <span className='text-green-600'>{changes.label.new}</span>\n </div>,\n );\n }\n\n if (changes.required) {\n changesList.push(\n <div key='required' className='text-xs'>\n <span className='font-semibold'>Required:</span>{' '}\n <span className='line-through text-red-600'>\n {changes.required.old ? 'Yes' : 'No'}\n </span>{' '}\n →{' '}\n <span className='text-green-600'>\n {changes.required.new ? 'Yes' : 'No'}\n </span>\n </div>,\n );\n }\n\n if (changes.type) {\n changesList.push(\n <div key='type' className='text-xs'>\n <span className='font-semibold'>Type:</span>{' '}\n <span className='line-through text-red-600'>{changes.type.old}</span>{' '}\n → <span className='text-green-600'>{changes.type.new}</span>\n </div>,\n );\n }\n\n if (changes.inputType) {\n changesList.push(\n <div key='inputType' className='text-xs'>\n <span className='font-semibold'>Input Type:</span>{' '}\n <span className='line-through text-red-600'>\n {changes.inputType.old}\n </span>{' '}\n → <span className='text-green-600'>{changes.inputType.new}</span>\n </div>,\n );\n }\n\n if (changes.jsonType) {\n const oldJsonType = Array.isArray(changes.jsonType.old)\n ? changes.jsonType.old.join(' | ')\n : changes.jsonType.old;\n const newJsonType = Array.isArray(changes.jsonType.new)\n ? changes.jsonType.new.join(' | ')\n : changes.jsonType.new;\n\n changesList.push(\n <div key='jsonType' className='text-xs'>\n <span className='font-semibold'>JSON Type:</span>{' '}\n <span className='line-through text-red-600'>{oldJsonType}</span> →{' '}\n <span className='text-green-600'>{newJsonType}</span>\n </div>,\n );\n }\n\n if (changes.defaultValue !== undefined) {\n changesList.push(\n <div key='defaultValue' className='text-xs'>\n <span className='font-semibold'>Default Value:</span>{' '}\n <span className='line-through text-red-600'>\n {JSON.stringify(changes.defaultValue.old)}\n </span>{' '}\n →{' '}\n <span className='text-green-600'>\n {JSON.stringify(changes.defaultValue.new)}\n </span>\n </div>,\n );\n }\n\n if (changes.options) {\n if (changes.options.added.length > 0) {\n changesList.push(\n <div key='options-added' className='text-xs'>\n <span className='font-semibold text-green-700'>Options Added:</span>{' '}\n {changes.options.added.map((opt) => opt.label).join(', ')}\n </div>,\n );\n }\n if (changes.options.removed.length > 0) {\n changesList.push(\n <div key='options-removed' className='text-xs'>\n <span className='font-semibold text-red-700'>Options Removed:</span>{' '}\n {changes.options.removed.map((opt) => opt.label).join(', ')}\n </div>,\n );\n }\n if (changes.options.modified.length > 0) {\n changesList.push(\n <div key='options-modified' className='text-xs'>\n <span className='font-semibold'>Options Modified:</span>{' '}\n {changes.options.modified.length} option(s)\n </div>,\n );\n }\n }\n\n if (changes.nestedFields && changes.nestedFields.length > 0) {\n changesList.push(\n <div key='nestedFields' className='text-xs'>\n <span className='font-semibold'>Nested Fields:</span>{' '}\n {changes.nestedFields.length} field(s) changed\n </div>,\n );\n }\n\n if (changesList.length === 0) return null;\n\n return (\n <div className='mt-2 p-2 bg-yellow-50 rounded border border-yellow-200 space-y-1'>\n <div className='text-xs font-semibold text-yellow-800 mb-1'>\n Changes:\n </div>\n {changesList}\n </div>\n );\n };\n\n return (\n <div className={`p-3 mb-2 rounded ${styles} relative`}>\n <div className='absolute top-2 right-2'>{badge}</div>\n {children}\n {renderChanges()}\n </div>\n );\n};\n\nconst FormPanel = ({\n version,\n fields,\n fieldsets,\n diffMap,\n title,\n scrollRef,\n}: {\n version: string | number;\n fields: JSFField[];\n fieldsets?: JSFFieldset | null;\n diffMap: Map<\n string,\n {\n diffType: 'added' | 'removed' | 'modified' | 'unchanged';\n changes?: unknown;\n }\n >;\n title: string;\n scrollRef?: React.RefObject<HTMLDivElement | null>;\n}) => {\n const form = useForm({\n mode: 'onBlur',\n });\n\n const fieldsWithWrappers = useMemo(() => {\n // Recursive function to apply wrappers to fields and their nested fields\n const applyWrappers = (\n fields: JSFField[],\n diffMap: Map<\n string,\n {\n diffType: 'added' | 'removed' | 'modified' | 'unchanged';\n changes?: unknown;\n }\n >,\n ): JSFField[] => {\n return fields.map((field) => {\n const diff = diffMap.get(field.name);\n const diffType = diff?.diffType || 'unchanged';\n const changes = diff?.changes;\n\n // If this field has nested fields (e.g., fieldset), recursively apply wrappers\n const nestedFields = (field as never as { fields?: JSFField[] }).fields;\n let processedField = field;\n\n if (nestedFields && Array.isArray(nestedFields)) {\n // Build a nested diff map from the changes.nestedFields\n const nestedDiffMap = new Map<\n string,\n {\n diffType: 'added' | 'removed' | 'modified' | 'unchanged';\n changes?: unknown;\n }\n >();\n\n if (\n changes &&\n typeof changes === 'object' &&\n 'nestedFields' in changes &&\n Array.isArray(changes.nestedFields)\n ) {\n (\n changes.nestedFields as Array<{\n fieldName: string;\n diffType: 'added' | 'removed' | 'modified' | 'unchanged';\n changes?: unknown;\n }>\n ).forEach((nestedDiff) => {\n nestedDiffMap.set(nestedDiff.fieldName, {\n diffType: nestedDiff.diffType,\n changes: nestedDiff.changes,\n });\n });\n }\n\n // Recursively apply wrappers to nested fields\n const wrappedNestedFields = applyWrappers(\n nestedFields,\n nestedDiffMap,\n );\n processedField = {\n ...field,\n fields: wrappedNestedFields,\n } as JSFField;\n }\n\n return {\n ...processedField,\n WrapperComponent: ({ children }: { children: React.ReactNode }) => (\n <FieldWrapper\n diffType={diffType}\n fieldName={field.name}\n changes={changes as never}\n >\n {children}\n </FieldWrapper>\n ),\n };\n });\n };\n\n return applyWrappers(fields, diffMap);\n }, [fields, diffMap]);\n\n return (\n <Card className='h-full'>\n <CardHeader>\n <CardTitle>\n {title} - Version {version}\n </CardTitle>\n </CardHeader>\n <CardContent ref={scrollRef} className='overflow-y-auto max-h-[600px]'>\n <Form {...form}>\n <form className='space-y-4'>\n <JSONSchemaFormFields\n fields={fieldsWithWrappers}\n fieldsets={fieldsets}\n fieldValues={{}}\n />\n </form>\n </Form>\n </CardContent>\n </Card>\n );\n};\n\nexport const SchemaFormComparison = ({\n topVersion,\n bottomVersion,\n topFields,\n bottomFields,\n topFieldsets,\n bottomFieldsets,\n isLoading,\n}: SchemaFormComparisonProps) => {\n const diff = useMemo(\n () => compareFormFields(topFields, bottomFields),\n [topFields, bottomFields],\n );\n\n const leftScrollRef = useRef<HTMLDivElement>(null);\n const rightScrollRef = useRef<HTMLDivElement>(null);\n const isSyncing = useRef(false);\n\n useEffect(() => {\n const leftEl = leftScrollRef.current;\n const rightEl = rightScrollRef.current;\n\n if (!leftEl || !rightEl) return;\n\n const handleLeftScroll = () => {\n if (isSyncing.current) return;\n isSyncing.current = true;\n rightEl.scrollTop = leftEl.scrollTop;\n requestAnimationFrame(() => {\n isSyncing.current = false;\n });\n };\n\n const handleRightScroll = () => {\n if (isSyncing.current) return;\n isSyncing.current = true;\n leftEl.scrollTop = rightEl.scrollTop;\n requestAnimationFrame(() => {\n isSyncing.current = false;\n });\n };\n\n leftEl.addEventListener('scroll', handleLeftScroll);\n rightEl.addEventListener('scroll', handleRightScroll);\n\n return () => {\n leftEl.removeEventListener('scroll', handleLeftScroll);\n rightEl.removeEventListener('scroll', handleRightScroll);\n };\n }, [topFields, bottomFields]);\n\n if (isLoading) {\n return (\n <div className='flex items-center justify-center h-96'>\n <div className='text-center'>\n <div className='animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto'></div>\n <p className='mt-4 text-gray-600'>Loading schemas...</p>\n </div>\n </div>\n );\n }\n\n const hasNoDifferences =\n diff.added.length === 0 &&\n diff.removed.length === 0 &&\n diff.modified.length === 0;\n\n return (\n <div className='space-y-6'>\n <Card>\n <CardContent className='pt-6'>\n {hasNoDifferences ? (\n <p className='text-center text-gray-600'>\n No differences detected between the two versions\n </p>\n ) : (\n <div className='flex gap-6 justify-center'>\n {diff.added.length > 0 && (\n <div className='flex items-center gap-2'>\n <span className='w-4 h-4 bg-green-500 rounded'></span>\n <span className='text-sm'>\n {diff.added.length} field{diff.added.length > 1 ? 's' : ''}{' '}\n added\n </span>\n </div>\n )}\n {diff.removed.length > 0 && (\n <div className='flex items-center gap-2'>\n <span className='w-4 h-4 bg-red-500 rounded'></span>\n <span className='text-sm'>\n {diff.removed.length} field\n {diff.removed.length > 1 ? 's' : ''} removed\n </span>\n </div>\n )}\n {diff.modified.length > 0 && (\n <div className='flex items-center gap-2'>\n <span className='w-4 h-4 bg-yellow-500 rounded'></span>\n <span className='text-sm'>\n {diff.modified.length} field\n {diff.modified.length > 1 ? 's' : ''} modified\n </span>\n </div>\n )}\n </div>\n )}\n </CardContent>\n </Card>\n\n <div className='grid grid-cols-2 gap-6'>\n <FormPanel\n version={topVersion}\n fields={topFields}\n fieldsets={topFieldsets}\n diffMap={diff.fieldDiffs}\n title='Left'\n scrollRef={leftScrollRef}\n />\n <FormPanel\n version={bottomVersion}\n fields={bottomFields}\n fieldsets={bottomFieldsets}\n diffMap={diff.fieldDiffs}\n title='Right'\n scrollRef={rightScrollRef}\n />\n </div>\n </div>\n );\n};\n","export type SchemaVersion = number | 'latest';\n\nexport interface VersionOption {\n value: SchemaVersion;\n label: string;\n}\n\nexport const BASIC_INFO_VERSIONS: VersionOption[] = [\n { value: 1, label: 'v1 (Legacy)' },\n { value: 3, label: 'v3 (Recommended)' },\n];\n\n// AI generated from tiger\nexport const COUNTRY_CONTRACT_VERSIONS: Record<string, VersionOption[]> = {\n ALB: [{ value: 1, label: 'v1' }],\n ARE: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n ARG: [{ value: 1, label: 'v1' }],\n ARM: [{ value: 1, label: 'v1' }],\n AUS: [{ value: 1, label: 'v1' }],\n AUT: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n BEL: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n BGD: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n BGR: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n BIH: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n BLR: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n BOL: [{ value: 1, label: 'v1' }],\n BRA: [{ value: 1, label: 'v1' }],\n CAN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n CHE: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n CHL: [{ value: 1, label: 'v1' }],\n CHN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n COL: [{ value: 1, label: 'v1' }],\n CRI: [{ value: 1, label: 'v1' }],\n CYP: [{ value: 1, label: 'v1' }],\n CZE: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n DEU: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n DNK: [{ value: 1, label: 'v1' }],\n DOM: [{ value: 1, label: 'v1' }],\n ECU: [{ value: 1, label: 'v1' }],\n EGY: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n ESP: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n EST: [{ value: 1, label: 'v1' }],\n FIN: [{ value: 1, label: 'v1' }],\n FRA: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n //FRA_SAS: [{ value: 1, label: 'v1' }],\n GBR: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n GEO: [{ value: 1, label: 'v1' }],\n GRC: [{ value: 1, label: 'v1' }],\n GTM: [{ value: 1, label: 'v1' }],\n HKG: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n HND: [{ value: 1, label: 'v1' }],\n HRV: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n HUN: [{ value: 1, label: 'v1' }],\n IDN: [{ value: 1, label: 'v1' }],\n IND: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n IRL: [{ value: 1, label: 'v1' }],\n ISL: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n ISR: [{ value: 1, label: 'v1' }],\n ITA: [{ value: 1, label: 'v1' }],\n //ITA_APL: [{ value: 1, label: 'v1' }],\n JAM: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n JPN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n KEN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n KGZ: [{ value: 1, label: 'v1' }],\n KHM: [{ value: 1, label: 'v1' }],\n KOR: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n LBN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n LKA: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n LTU: [{ value: 1, label: 'v1' }],\n LUX: [{ value: 1, label: 'v1' }],\n LVA: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n MAR: [{ value: 1, label: 'v1' }],\n MDA: [{ value: 1, label: 'v1' }],\n MEX: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n MKD: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n MLT: [{ value: 1, label: 'v1' }],\n MNG: [{ value: 1, label: 'v1' }],\n MUS: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n MYS: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n NGA: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n NIC: [{ value: 1, label: 'v1' }],\n NLD: [{ value: 1, label: 'v1' }],\n NOR: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n NZL: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n PAK: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n PAN: [{ value: 1, label: 'v1' }],\n PER: [{ value: 1, label: 'v1' }],\n PHL: [{ value: 1, label: 'v1' }],\n POL: [{ value: 1, label: 'v1' }],\n PRI: [{ value: 1, label: 'v1' }],\n PRT: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n PRY: [{ value: 1, label: 'v1' }],\n ROU: [{ value: 1, label: 'v1' }],\n SAU: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n SGP: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n SLV: [{ value: 1, label: 'v1' }],\n SRB: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n SVK: [{ value: 1, label: 'v1' }],\n SVN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n SWE: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n THA: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n TUN: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n { value: 3, label: 'v3' },\n ],\n TUR: [{ value: 1, label: 'v1' }],\n TWN: [{ value: 1, label: 'v1' }],\n UGA: [{ value: 1, label: 'v1' }],\n UKR: [{ value: 1, label: 'v1' }],\n URY: [{ value: 1, label: 'v1' }],\n USA: [{ value: 1, label: 'v1' }],\n VNM: [\n { value: 1, label: 'v1' },\n { value: 2, label: 'v2' },\n ],\n XKX: [{ value: 1, label: 'v1' }],\n ZAF: [{ value: 1, label: 'v1' }],\n ZWE: [{ value: 1, label: 'v1' }],\n};\n\nexport const COUNTRY_CONTRACT_VERSIONS_WITH_MULTIPLE_VERSIONS =\n Object.fromEntries(\n Object.entries(COUNTRY_CONTRACT_VERSIONS).filter(\n ([, versions]) => versions.length > 1,\n ),\n ) as Record<string, VersionOption[]>;\n\nexport const FORM_TYPES = [\n { value: 'employment_basic_information', label: 'Basic Information' },\n { value: 'contract_details', label: 'Contract Details' },\n] as const;\n\nexport type FormType = (typeof FORM_TYPES)[number]['value'];\n"],"mappings":"0aAAA,UAAYA,MAA0B,8BAEtC,IAAMC,GAAmC,OAEnCC,GAA0C,qBAE1CC,GAA0C,qBCLhD,UAAYC,MAAmB,uBAS3B,cAAAC,MAAA,oBALJ,SAASC,EAAK,CACZ,UAAAC,EACA,GAAGC,CACL,EAAoD,CAClD,OACEH,EAAe,OAAd,CACC,YAAU,OACV,UAAWI,EAAG,sBAAuBF,CAAS,EAC7C,GAAGC,EACN,CAEJ,CAXSE,EAAAJ,EAAA,QAaT,SAASK,EAAS,CAChB,UAAAJ,EACA,GAAGC,CACL,EAAoD,CAClD,OACEH,EAAe,OAAd,CACC,YAAU,YACV,UAAWI,EACT,kGACAF,CACF,EACC,GAAGC,EACN,CAEJ,CAdSE,EAAAC,EAAA,YAgBT,SAASC,EAAY,CACnB,UAAAL,EACA,GAAGC,CACL,EAAuD,CACrD,OACEH,EAAe,UAAd,CACC,YAAU,eACV,UAAWI,EACT,0fACAF,CACF,EACC,GAAGC,EACN,CAEJ,CAdSE,EAAAE,EAAA,eAgBT,SAASC,GAAY,CACnB,UAAAN,EACA,GAAGC,CACL,EAAuD,CACrD,OACEH,EAAe,UAAd,CACC,YAAU,eACV,UAAWI,EAAG,sBAAuBF,CAAS,EAC7C,GAAGC,EACN,CAEJ,CAXSE,EAAAG,GAAA,eClDT,UAAYC,MAAW,QACvB,UAAYC,MAAyB,8BAQnC,OAKE,OAAAC,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ACF,GACF,GACF,GACF,GACF,EAEArD,EAACsD,GAAA,CACC,WAAY/C,EACZ,cAAeE,EACf,UAAYa,GAAW,QAAyB,CAAC,EACjD,aAAeG,GAAc,QAAyB,CAAC,EACvD,aAAcH,GAAW,OAAO,iBAAiB,EACjD,gBAAiBG,GAAc,OAAO,iBAAiB,EACvD,UAAWE,EACb,GACF,CAEJ,EAjOoC","names":["CollapsiblePrimitive","Collapsible","CollapsibleTrigger","CollapsibleContent","TabsPrimitive","jsx","Tabs","className","props","cn","__name","TabsList","TabsTrigger","TabsContent","React","ScrollAreaPrimitive","jsx","jsxs","ScrollArea","className","children","props","ref","cn","ScrollBar","orientation","useState","useEffect","useMemo","useQuery","equal","validateField","__name","field","compareOptions","options1","options2","equal","map1","o","map2","added","removed","modified","option","value","option1","option2","changes","compareNestedFields","field1","field2","nestedFields1","nestedFields2","nestedDiff","compareFormFields","isFieldModified","checks","hasNestedChanges","check","getFieldChanges","optionsDiff","nestedFieldsDiff","fields1","fields2","validFields1","validFields2","fieldMap1","fieldMap2","unchanged","fieldDiffs","_","name","getDiffStyles","diffType","useMemo","useRef","useEffect","jsx","jsxs","FieldWrapper","__name","children","diffType","changes","styles","getDiffStyles","badge","renderChanges","changesList","oldJsonType","newJsonType","opt","FormPanel","version","fields","fieldsets","diffMap","title","scrollRef","form","useForm","fieldsWithWrappers","useMemo","applyWrappers","field","diff","nestedFields","processedField","nestedDiffMap","nestedDiff","wrappedNestedFields","Card","CardHeader","CardTitle","CardContent","Form","JSONSchemaFormFields","SchemaFormComparison","topVersion","bottomVersion","topFields","bottomFields","topFieldsets","bottomFieldsets","isLoading","compareFormFields","leftScrollRef","useRef","rightScrollRef","isSyncing","useEffect","leftEl","rightEl","handleLeftScroll","handleRightScroll","hasNoDifferences","BASIC_INFO_VERSIONS","COUNTRY_CONTRACT_VERSIONS","COUNTRY_CONTRACT_VERSIONS_WITH_MULTIPLE_VERSIONS","versions","FORM_TYPES","jsx","jsxs","JsonSchemaComparison","__name","formType","setFormType","useState","topVersion","setTopVersion","bottomVersion","setBottomVersion","countryCode","setCountryCode","client","useClient","countriesData","useQuery","countriesOptions","response","country","COUNTRY_CONTRACT_VERSIONS_WITH_MULTIPLE_VERSIONS","isContractDetails","topSchema","isLoadingTop","useJSONSchemaForm","bottomSchema","isLoadingBottom","isLoading","countryVersions","COUNTRY_CONTRACT_VERSIONS","hasCountryMapping","versionOptions","useMemo","BASIC_INFO_VERSIONS","useEffect","availableVersionValues","v","Card","CardHeader","CardTitle","CardContent","Label","Tabs","value","TabsList","FORM_TYPES","type","TabsTrigger","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","version","SchemaFormComparison"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Wt,b as ee,c as ie,d as ne,e as re,f as oe,h as ae,i as se,j as ce,k as le,l as ue,m as de,n as pe,o as me,p as fe,q as ye,r as _e,s as ge,t as be}from"./chunk-D3EUFZXJ.js";import{a as Se,b as Ce,c as we}from"./chunk-LZL5KK3N.js";import{a as zt,b as Xt,f as Yt,g as Zt,h as te}from"./chunk-AHRG5QCS.js";import{a as $,b as nt,c as _,d as $t,g as Ht}from"./chunk-PX5PE6GX.js";import{a as Kt}from"./chunk-TFJOJCCS.js";import{e as Jt,g as Nt,h as Ut}from"./chunk-5XNFVJNM.js";import{a as Qt,e as y,f as D}from"./chunk-552XBDTE.js";import{L as xt}from"./chunk-R47Q7R6C.js";import{a as b,j as P,k as R}from"./chunk-EARN6G25.js";import{a as Gt}from"./chunk-TSPDJUGG.js";import{d as jt}from"./chunk-KQPDXXG3.js";import{a as u}from"./chunk-P37U34EQ.js";import{useEffect as T,useMemo as a,useRef as Pe,useState as q}from"react";import ve from"lodash.omit";import{useQuery as _i}from"@tanstack/react-query";var gi=u(()=>{let{client:L}=jt(),{data:A}=ee(),l=ie(A)?A?.company?.id??"":"";return _i({queryKey:["legal-entities",l],queryFn:u(()=>xt({client:L,path:{company_id:l},query:{page_size:100}}),"queryFn"),select:u(H=>H.data?.data?.legal_entities,"select"),enabled:!!l})},"useLegalEntities"),he=u(()=>{let{data:L}=gi();return L?.find(A=>A.is_default)},"useDefaultLegalEntity");var bi={select_country:null,basic_information:"employment_basic_information",contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},Si={employment_basic_information:"basic_information"},$i=u(({countryCode:L,externalId:A,employmentId:l,skipSteps:H,options:p,initialValues:d})=>{let Ee=p?.excludeProducts||[],ft=Pe(p?.onContractReviewed);T(()=>{ft.current=p?.onContractReviewed},[p?.onContractReviewed]);let[c,yt]=q(L||null),[r,Fe]=q(l),[v,_t]=q(void 0),W=Pe({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[z,Ve]=q(void 0),[gt,X]=q(!1),[bt,Oe]=q(!0),[rt,St]=q(null),{steps:Me,stepsArray:Ie}=a(()=>zt({includeSelectCountry:!H?.includes("select_country"),includeEligibilityQuestionnaire:gt,includeContractPreview:bt}),[gt,bt,H]),{fieldValues:s,stepState:e,setFieldValues:Ct,previousStep:Re,nextStep:De,goToStep:B,setStepValues:wt}=Gt(Me);T(()=>{rt&&(B(rt),St(null))},[rt,B]);let{data:o,isLoading:Te,refetch:ht}=Kt({employmentId:r,queryParams:{exclude_files:!0}}),qe=he(),{status:k}=o||{},S=k&&Yt.includes(k),Ae=k&&!Zt.includes(k),ke=a(()=>k==="invited"?"invited":"not_invited",[k]),Pt=Nt(),vt=Ut(c,p),ot=se(),Et=Wt(),{mutateAsync:Ft}=ue(ot,Et,s),Vt=fe(),Ot=ye(),{mutateAsyncOrThrow:Le}=b(vt),Mt=re(),It=ae(),Rt=_e(),{mutateAsyncOrThrow:Be}=b(Pt),{mutateAsyncOrThrow:xe}=b(ot),{mutateAsyncOrThrow:je}=b(Mt),{mutateAsyncOrThrow:Dt}=b(It),{mutateAsyncOrThrow:Qe}=b(Vt),{mutateAsyncOrThrow:Tt}=b(Ot),{mutateAsyncOrThrow:Je}=b(Rt);l&&o?.country?.code&&!c&&yt(o.country.code);let{selectCountryForm:Y,isLoading:Ne,countries:qt}=ge({jsfModify:p?.jsfModify?.select_country}),at=a(()=>qt?.find(t=>t.value===c),[qt,c]),Ue=a(()=>at?.label,[at]),Ke=e.currentStep.name==="pricing_plan"||!!l&&S,{form:E,isLoading:Ge,contractorSubscriptions:Z,refetch:st,isEligibilityQuestionnaireBlocked:x}=le(r,at,{jsonSchemaVersion:p?.jsonSchemaVersion,queryOptions:{enabled:Ke},excludeProducts:Ee,jsfModify:p?.jsfModify?.pricing_plan}),F=a(()=>!!Z?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.submitted_at,[Z]);T(()=>{if(F){X(!1);return}else X(z===_)},[F,z]),T(()=>{let t=o?.contractor_type==="cor";Oe(!t)},[o?.contractor_type]);let tt=a(()=>Z?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.responses,[Z]),$e=bi[e.currentStep.name]||"contractor_basic_information",He=Si[$e],We=o?.[He]||{},ze=u(({form:t,options:n={},query:f={}})=>{let g=Object.keys(s).length>0?{...d,...e.values?.[e.currentStep.name],...s}:{...d,...We};return Jt({countryCode:c,form:t,fieldValues:g,query:f,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}}})},"useJSONSchema"),Xe=!!(c&&(e.currentStep.name==="basic_information"||l)),Ye=!!(c==="GBR"&&l&&e.currentStep.name==="basic_information"),{data:j,isLoading:Ze}=de(l,{enabled:Ye}),{data:et,isLoading:ti}=pe(r,{enabled:!!r});T(()=>{et&&et.length>0&&!v&&_t(et[0].id)},[et,v]);let{data:C,isLoading:ei}=ze({form:"contractor_basic_information",options:{jsfModify:Ce(c,Ue,p),queryOptions:{enabled:Xe}}}),ii=a(()=>Xt(o?.basic_information?.provisional_start_date,s?.service_duration?.provisional_start_date),[o?.basic_information?.provisional_start_date,s?.service_duration?.provisional_start_date]),m=a(()=>{let t={standard:$,plus:nt,cor:_};if(s.subscription)return s.subscription;let n=e.values?.pricing_plan?.subscription;return n&&!x?n:F&&!x?_:x&&F?$:t[o?.contractor_type]||$},[s,e.values,F,o?.contractor_type,x]);T(()=>{m&&m!==z&&Ve(m)},[m,z]);let ni=a(()=>({...tt,...d,...e.values?.eligibility_questionnaire,...s}),[tt,d,e.values?.eligibility_questionnaire,s]),ri=a(()=>m===_&&e.currentStep.name==="eligibility_questionnaire"||!!l&&S&&m===_,[m,e.currentStep.name,l,S]),{data:V,isLoading:oi}=me({options:{queryOptions:{enabled:ri},jsfModify:p?.jsfModify?.eligibility_questionnaire},fieldValues:ni}),ai=!!(c&&e.currentStep.name==="contract_details"||S),{data:w,isLoading:si}=be({countryCode:c,fieldValues:s,employmentId:r,options:{queryOptions:{enabled:ai},jsfModify:Se(p?.jsfModify?.contract_details,ii,m,s,m===_)}}),ci=a(()=>e.currentStep.name==="contract_preview"||!!l&&S,[e.currentStep.name,l,S]),{data:O}=ne({fieldValues:s,options:{queryOptions:{enabled:ci},jsfModify:we(p,s)}}),{data:ct,isLoading:li}=oe({employmentId:r,contractDocumentId:v,options:{queryOptions:{enabled:!!v}}}),i=a(()=>({select_country:Y?.fields||[],basic_information:C?.fields||[],pricing_plan:E?.fields||[],eligibility_questionnaire:V?.fields||[],contract_details:w?.fields||[],contract_preview:O?.fields||[],review:[]}),[Y?.fields,C?.fields,E?.fields,w?.fields,O?.fields,V?.fields]),ui={select_country:null,basic_information:C?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:w?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},{country:di,basic_information:it={},contract_details:At={}}=o||{},kt=di?.code,Q=a(()=>D(i.select_country,{country:c||kt||""}),[i.select_country,c,kt]),lt=a(()=>j?.content?Qt(j.content,j.name):null,[j?.content,j?.name]),J=a(()=>{let t={...d,...it,ir35:o?.contract_details?.ir_35,nationality_status:o?.contract_details?.nationality,...lt&&{ir35_sds_file:[lt]}};return D(i.basic_information,t)},[d,it,o?.contract_details?.ir_35,o?.contract_details?.nationality,lt,i.basic_information]),N=a(()=>{let n={...{service_duration:{provisional_start_date:it.provisional_start_date}},...d,...At};return D(i.contract_details,n)},[i.contract_details,At,d,it]),U=a(()=>{let t=ct?.contract_document?.signatories?.find(f=>f.type==="company"),n={...d,signature:t?.signature};return D(i.contract_preview,n)},[i.contract_preview,d,ct]),K=a(()=>{let n={...{subscription:m},...d};return D(i.pricing_plan,n)},[i.pricing_plan,d,m]),G=a(()=>{let t={...d,...tt};return D(i.eligibility_questionnaire,t)},[i.eligibility_questionnaire,d,tt]),pi=a(()=>({select_country:Q,basic_information:J,contract_details:N,contract_preview:U,pricing_plan:K,eligibility_questionnaire:G}),[Q,J,N,U,K,G]),ut=!!(l&&S&&e.currentStep.name!=="review"),dt=Ne||ei||Te||si||Ge||li||Ze||ti||oi,Lt=a(()=>{let n=o?.contractor_type==="cor"||i.contract_preview.length>0;return!!(ut&&!dt&&v&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[ut,dt,v,i.basic_information.length,i.contract_details.length,i.contract_preview.length,o?.contractor_type]);T(()=>{Lt&&(W.current={select_country:P(Q,i.select_country),basic_information:P(J,i.basic_information),contract_details:P(N,i.contract_details),contract_preview:P(U,i.contract_preview),pricing_plan:P(K,i.pricing_plan),eligibility_questionnaire:P(G,i.eligibility_questionnaire)},wt({select_country:Q,basic_information:J,contract_details:N,contract_preview:U,pricing_plan:K,eligibility_questionnaire:G,review:{}}),B("review"))},[Lt,B,Q,J,N,wt,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,K,i.contract_preview,U,i.eligibility_questionnaire,G]);let mi=u(t=>{B(t)},"goTo"),Bt=u(async t=>Y&&e.currentStep.name==="select_country"?t:C&&e.currentStep.name==="basic_information"?await y(t,C?.fields,{isPartialValidation:!1}):w&&e.currentStep.name==="contract_details"?await y(t,w?.fields,{isPartialValidation:!1}):O&&e.currentStep.name==="contract_preview"?await y(t,O?.fields,{isPartialValidation:!1}):E&&e.currentStep.name==="pricing_plan"?await y(t,E?.fields,{isPartialValidation:!1}):V&&e.currentStep.name==="eligibility_questionnaire"?await y(t,V?.fields,{isPartialValidation:!1}):{},"parseFormValues"),fi=u(t=>{let n=t?.rawError?.error?.errors?.services_and_deliverables;return n?.source===Ht?{error:n.error,source:n.source,skippable:n.skippable}:null},"extractAiValidationError");async function yi(t){let n=e.currentStep.name;n in W.current&&(W.current[n]=P(t,i[n]));let f=await Bt(t);switch(e.currentStep.name){case"select_country":return yt(f.country),Promise.resolve({data:{countryCode:f.country}});case"basic_information":{let M=!r&&c,g=r&&c&&o?.country&&o?.country.code!==c;if(M||g){let I={basic_information:ve(f,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:c,external_id:A},pt=await Be(I),mt=pt?.data?.employment?.id;if(!mt)throw R("Employment ID not found");return await Ft({employmentId:mt}),Fe(mt),pt}else if(r){let h=ve(f,"nationality_status","ir35","ir35_sds_file");return await Ft({employmentId:r}),Le({employmentId:r,basic_information:h})}return}case"contract_details":{let M=s.services_and_deliverables_error_skippable===!0,g={contract_document:f,skip_ai_checks:M};try{let h=await xe({employmentId:r,payload:g}),I=h?.data?.contract_document?.id;if(!I)throw R("Contract document ID not found");return _t(I),h}catch(h){let I=fi(h);throw I&&Ct({...t,services_and_deliverables_ai_warning:te(m===_),services_and_deliverables_error_skippable:I.skippable}),h}}case"contract_preview":return await je({employmentId:r,contractDocumentId:v,payload:{signature:f.signature}});case"pricing_plan":{if(x&&[_,nt].includes(t.subscription))throw R(`This individual is not eligible for ${ce[t.subscription]}.`);if(t.subscription===$t)return Promise.resolve({data:{subscription:t.subscription}});if(F&&t.subscription!==_)try{await Je({employmentId:r}),await st()}catch(g){if(g?.response?.status!==404)throw g;await st()}if(t.subscription==$)return Dt({employmentId:r,payload:{operation:"downgrade"}});if(t.subscription==nt)return Dt({employmentId:r,payload:{operation:"upgrade"}});if(t.subscription==_)return F&&o?.contractor_type!=="cor"?Tt({employmentId:r}):Promise.resolve({data:{subscription:t.subscription}});throw R("invalid selection")}case"eligibility_questionnaire":try{if((await Qe({employmentId:r,payload:f}))?.data?.is_blocking)throw X(!1),St("pricing_plan"),R("This individual is not eligible for Contractor of Record.");return await Tt({employmentId:r})}finally{await st()}default:throw R("Invalid step state")}}return u(yi,"onSubmit"),{isLoading:dt||ut,fieldValues:s,stepState:e,checkFieldUpdates:Ct,markContractAsReviewed:u(()=>{ft.current?.()},"markContractAsReviewed"),back:Re,next:u(()=>{r&&ht(),De()},"handleNextStep"),goTo:mi,onSubmit:yi,fields:i[e.currentStep.name],meta:{fields:W.current,fieldsets:ui[e.currentStep.name]},parseFormValues:Bt,canSkipAiValidation:s.services_and_deliverables_error_skippable===!0,handleValidation:u(async t=>{if(e.currentStep.name==="select_country")return Y.handleValidation(t);if(C&&e.currentStep.name==="basic_information"){let n=await y(t,C?.fields,{isPartialValidation:!1});return C?.handleValidation(n)}if(w&&e.currentStep.name==="contract_details"){let n=await y(t,w?.fields,{isPartialValidation:!1});return w?.handleValidation(n)}if(O&&e.currentStep.name==="contract_preview"){let n=await y(t,O?.fields,{isPartialValidation:!0});return O?.handleValidation(n)}if(E&&e.currentStep.name==="pricing_plan"){let n=await y(t,E?.fields,{isPartialValidation:!1});return E?.handleValidation(n)}if(V&&e.currentStep.name==="eligibility_questionnaire"){let n=await y(t,V?.fields,{isPartialValidation:!1});return V?.handleValidation(n)}return null},"handleValidation"),initialValues:pi,employmentId:r,refetchEmployment:ht,isSubmitting:Pt.isPending||vt.isPending||ot.isPending||Mt.isPending||It.isPending||Et.isPending||Vt.isPending||Ot.isPending||Rt.isPending,documentPreviewPdf:ct,canInvite:Ae,isEmploymentReadOnly:S,invitedStatus:ke,employment:o,defaultLegalEntity:qe,steps:Ie}},"useContractorOnboarding");export{$i as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Wt,b as ee,c as ie,d as ne,e as re,f as oe,h as ae,i as se,j as ce,k as le,l as ue,m as de,n as pe,o as me,p as fe,q as ye,r as _e,s as ge,t as be}from"./chunk-ZQZWWNXL.js";import{a as Se,b as Ce,c as we}from"./chunk-B7HGVWIT.js";import{a as zt,b as Xt,f as Yt,g as Zt,h as te}from"./chunk-AHRG5QCS.js";import{a as $,b as nt,c as _,d as $t,g as Ht}from"./chunk-PX5PE6GX.js";import{a as Kt}from"./chunk-VKKORLLM.js";import{e as Jt,g as Nt,h as Ut}from"./chunk-KIUI7FHF.js";import{a as Qt,e as y,f as D}from"./chunk-FFVTWWGX.js";import{L as xt}from"./chunk-O5XQUEB5.js";import{a as b,j as P,k as R}from"./chunk-OSQ6VUDM.js";import{a as Gt}from"./chunk-TSPDJUGG.js";import{d as jt}from"./chunk-KQPDXXG3.js";import{a as u}from"./chunk-P37U34EQ.js";import{useEffect as T,useMemo as a,useRef as Pe,useState as q}from"react";import ve from"lodash.omit";import{useQuery as _i}from"@tanstack/react-query";var gi=u(()=>{let{client:L}=jt(),{data:A}=ee(),l=ie(A)?A?.company?.id??"":"";return _i({queryKey:["legal-entities",l],queryFn:u(()=>xt({client:L,path:{company_id:l},query:{page_size:100}}),"queryFn"),select:u(H=>H.data?.data?.legal_entities,"select"),enabled:!!l})},"useLegalEntities"),he=u(()=>{let{data:L}=gi();return L?.find(A=>A.is_default)},"useDefaultLegalEntity");var bi={select_country:null,basic_information:"employment_basic_information",contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},Si={employment_basic_information:"basic_information"},$i=u(({countryCode:L,externalId:A,employmentId:l,skipSteps:H,options:p,initialValues:d})=>{let Ee=p?.excludeProducts||[],ft=Pe(p?.onContractReviewed);T(()=>{ft.current=p?.onContractReviewed},[p?.onContractReviewed]);let[c,yt]=q(L||null),[r,Fe]=q(l),[v,_t]=q(void 0),W=Pe({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[z,Ve]=q(void 0),[gt,X]=q(!1),[bt,Oe]=q(!0),[rt,St]=q(null),{steps:Me,stepsArray:Ie}=a(()=>zt({includeSelectCountry:!H?.includes("select_country"),includeEligibilityQuestionnaire:gt,includeContractPreview:bt}),[gt,bt,H]),{fieldValues:s,stepState:e,setFieldValues:Ct,previousStep:Re,nextStep:De,goToStep:B,setStepValues:wt}=Gt(Me);T(()=>{rt&&(B(rt),St(null))},[rt,B]);let{data:o,isLoading:Te,refetch:ht}=Kt({employmentId:r,queryParams:{exclude_files:!0}}),qe=he(),{status:k}=o||{},S=k&&Yt.includes(k),Ae=k&&!Zt.includes(k),ke=a(()=>k==="invited"?"invited":"not_invited",[k]),Pt=Nt(),vt=Ut(c,p),ot=se(),Et=Wt(),{mutateAsync:Ft}=ue(ot,Et,s),Vt=fe(),Ot=ye(),{mutateAsyncOrThrow:Le}=b(vt),Mt=re(),It=ae(),Rt=_e(),{mutateAsyncOrThrow:Be}=b(Pt),{mutateAsyncOrThrow:xe}=b(ot),{mutateAsyncOrThrow:je}=b(Mt),{mutateAsyncOrThrow:Dt}=b(It),{mutateAsyncOrThrow:Qe}=b(Vt),{mutateAsyncOrThrow:Tt}=b(Ot),{mutateAsyncOrThrow:Je}=b(Rt);l&&o?.country?.code&&!c&&yt(o.country.code);let{selectCountryForm:Y,isLoading:Ne,countries:qt}=ge({jsfModify:p?.jsfModify?.select_country}),at=a(()=>qt?.find(t=>t.value===c),[qt,c]),Ue=a(()=>at?.label,[at]),Ke=e.currentStep.name==="pricing_plan"||!!l&&S,{form:E,isLoading:Ge,contractorSubscriptions:Z,refetch:st,isEligibilityQuestionnaireBlocked:x}=le(r,at,{jsonSchemaVersion:p?.jsonSchemaVersion,queryOptions:{enabled:Ke},excludeProducts:Ee,jsfModify:p?.jsfModify?.pricing_plan}),F=a(()=>!!Z?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.submitted_at,[Z]);T(()=>{if(F){X(!1);return}else X(z===_)},[F,z]),T(()=>{let t=o?.contractor_type==="cor";Oe(!t)},[o?.contractor_type]);let tt=a(()=>Z?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.responses,[Z]),$e=bi[e.currentStep.name]||"contractor_basic_information",He=Si[$e],We=o?.[He]||{},ze=u(({form:t,options:n={},query:f={}})=>{let g=Object.keys(s).length>0?{...d,...e.values?.[e.currentStep.name],...s}:{...d,...We};return Jt({countryCode:c,form:t,fieldValues:g,query:f,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}}})},"useJSONSchema"),Xe=!!(c&&(e.currentStep.name==="basic_information"||l)),Ye=!!(c==="GBR"&&l&&e.currentStep.name==="basic_information"),{data:j,isLoading:Ze}=de(l,{enabled:Ye}),{data:et,isLoading:ti}=pe(r,{enabled:!!r});T(()=>{et&&et.length>0&&!v&&_t(et[0].id)},[et,v]);let{data:C,isLoading:ei}=ze({form:"contractor_basic_information",options:{jsfModify:Ce(c,Ue,p),queryOptions:{enabled:Xe}}}),ii=a(()=>Xt(o?.basic_information?.provisional_start_date,s?.service_duration?.provisional_start_date),[o?.basic_information?.provisional_start_date,s?.service_duration?.provisional_start_date]),m=a(()=>{let t={standard:$,plus:nt,cor:_};if(s.subscription)return s.subscription;let n=e.values?.pricing_plan?.subscription;return n&&!x?n:F&&!x?_:x&&F?$:t[o?.contractor_type]||$},[s,e.values,F,o?.contractor_type,x]);T(()=>{m&&m!==z&&Ve(m)},[m,z]);let ni=a(()=>({...tt,...d,...e.values?.eligibility_questionnaire,...s}),[tt,d,e.values?.eligibility_questionnaire,s]),ri=a(()=>m===_&&e.currentStep.name==="eligibility_questionnaire"||!!l&&S&&m===_,[m,e.currentStep.name,l,S]),{data:V,isLoading:oi}=me({options:{queryOptions:{enabled:ri},jsfModify:p?.jsfModify?.eligibility_questionnaire},fieldValues:ni}),ai=!!(c&&e.currentStep.name==="contract_details"||S),{data:w,isLoading:si}=be({countryCode:c,fieldValues:s,employmentId:r,options:{queryOptions:{enabled:ai},jsfModify:Se(p?.jsfModify?.contract_details,ii,m,s,m===_)}}),ci=a(()=>e.currentStep.name==="contract_preview"||!!l&&S,[e.currentStep.name,l,S]),{data:O}=ne({fieldValues:s,options:{queryOptions:{enabled:ci},jsfModify:we(p,s)}}),{data:ct,isLoading:li}=oe({employmentId:r,contractDocumentId:v,options:{queryOptions:{enabled:!!v}}}),i=a(()=>({select_country:Y?.fields||[],basic_information:C?.fields||[],pricing_plan:E?.fields||[],eligibility_questionnaire:V?.fields||[],contract_details:w?.fields||[],contract_preview:O?.fields||[],review:[]}),[Y?.fields,C?.fields,E?.fields,w?.fields,O?.fields,V?.fields]),ui={select_country:null,basic_information:C?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:w?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},{country:di,basic_information:it={},contract_details:At={}}=o||{},kt=di?.code,Q=a(()=>D(i.select_country,{country:c||kt||""}),[i.select_country,c,kt]),lt=a(()=>j?.content?Qt(j.content,j.name):null,[j?.content,j?.name]),J=a(()=>{let t={...d,...it,ir35:o?.contract_details?.ir_35,nationality_status:o?.contract_details?.nationality,...lt&&{ir35_sds_file:[lt]}};return D(i.basic_information,t)},[d,it,o?.contract_details?.ir_35,o?.contract_details?.nationality,lt,i.basic_information]),N=a(()=>{let n={...{service_duration:{provisional_start_date:it.provisional_start_date}},...d,...At};return D(i.contract_details,n)},[i.contract_details,At,d,it]),U=a(()=>{let t=ct?.contract_document?.signatories?.find(f=>f.type==="company"),n={...d,signature:t?.signature};return D(i.contract_preview,n)},[i.contract_preview,d,ct]),K=a(()=>{let n={...{subscription:m},...d};return D(i.pricing_plan,n)},[i.pricing_plan,d,m]),G=a(()=>{let t={...d,...tt};return D(i.eligibility_questionnaire,t)},[i.eligibility_questionnaire,d,tt]),pi=a(()=>({select_country:Q,basic_information:J,contract_details:N,contract_preview:U,pricing_plan:K,eligibility_questionnaire:G}),[Q,J,N,U,K,G]),ut=!!(l&&S&&e.currentStep.name!=="review"),dt=Ne||ei||Te||si||Ge||li||Ze||ti||oi,Lt=a(()=>{let n=o?.contractor_type==="cor"||i.contract_preview.length>0;return!!(ut&&!dt&&v&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[ut,dt,v,i.basic_information.length,i.contract_details.length,i.contract_preview.length,o?.contractor_type]);T(()=>{Lt&&(W.current={select_country:P(Q,i.select_country),basic_information:P(J,i.basic_information),contract_details:P(N,i.contract_details),contract_preview:P(U,i.contract_preview),pricing_plan:P(K,i.pricing_plan),eligibility_questionnaire:P(G,i.eligibility_questionnaire)},wt({select_country:Q,basic_information:J,contract_details:N,contract_preview:U,pricing_plan:K,eligibility_questionnaire:G,review:{}}),B("review"))},[Lt,B,Q,J,N,wt,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,K,i.contract_preview,U,i.eligibility_questionnaire,G]);let mi=u(t=>{B(t)},"goTo"),Bt=u(async t=>Y&&e.currentStep.name==="select_country"?t:C&&e.currentStep.name==="basic_information"?await y(t,C?.fields,{isPartialValidation:!1}):w&&e.currentStep.name==="contract_details"?await y(t,w?.fields,{isPartialValidation:!1}):O&&e.currentStep.name==="contract_preview"?await y(t,O?.fields,{isPartialValidation:!1}):E&&e.currentStep.name==="pricing_plan"?await y(t,E?.fields,{isPartialValidation:!1}):V&&e.currentStep.name==="eligibility_questionnaire"?await y(t,V?.fields,{isPartialValidation:!1}):{},"parseFormValues"),fi=u(t=>{let n=t?.rawError?.error?.errors?.services_and_deliverables;return n?.source===Ht?{error:n.error,source:n.source,skippable:n.skippable}:null},"extractAiValidationError");async function yi(t){let n=e.currentStep.name;n in W.current&&(W.current[n]=P(t,i[n]));let f=await Bt(t);switch(e.currentStep.name){case"select_country":return yt(f.country),Promise.resolve({data:{countryCode:f.country}});case"basic_information":{let M=!r&&c,g=r&&c&&o?.country&&o?.country.code!==c;if(M||g){let I={basic_information:ve(f,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:c,external_id:A},pt=await Be(I),mt=pt?.data?.employment?.id;if(!mt)throw R("Employment ID not found");return await Ft({employmentId:mt}),Fe(mt),pt}else if(r){let h=ve(f,"nationality_status","ir35","ir35_sds_file");return await Ft({employmentId:r}),Le({employmentId:r,basic_information:h})}return}case"contract_details":{let M=s.services_and_deliverables_error_skippable===!0,g={contract_document:f,skip_ai_checks:M};try{let h=await xe({employmentId:r,payload:g}),I=h?.data?.contract_document?.id;if(!I)throw R("Contract document ID not found");return _t(I),h}catch(h){let I=fi(h);throw I&&Ct({...t,services_and_deliverables_ai_warning:te(m===_),services_and_deliverables_error_skippable:I.skippable}),h}}case"contract_preview":return await je({employmentId:r,contractDocumentId:v,payload:{signature:f.signature}});case"pricing_plan":{if(x&&[_,nt].includes(t.subscription))throw R(`This individual is not eligible for ${ce[t.subscription]}.`);if(t.subscription===$t)return Promise.resolve({data:{subscription:t.subscription}});if(F&&t.subscription!==_)try{await Je({employmentId:r}),await st()}catch(g){if(g?.response?.status!==404)throw g;await st()}if(t.subscription==$)return Dt({employmentId:r,payload:{operation:"downgrade"}});if(t.subscription==nt)return Dt({employmentId:r,payload:{operation:"upgrade"}});if(t.subscription==_)return F&&o?.contractor_type!=="cor"?Tt({employmentId:r}):Promise.resolve({data:{subscription:t.subscription}});throw R("invalid selection")}case"eligibility_questionnaire":try{if((await Qe({employmentId:r,payload:f}))?.data?.is_blocking)throw X(!1),St("pricing_plan"),R("This individual is not eligible for Contractor of Record.");return await Tt({employmentId:r})}finally{await st()}default:throw R("Invalid step state")}}return u(yi,"onSubmit"),{isLoading:dt||ut,fieldValues:s,stepState:e,checkFieldUpdates:Ct,markContractAsReviewed:u(()=>{ft.current?.()},"markContractAsReviewed"),back:Re,next:u(()=>{r&&ht(),De()},"handleNextStep"),goTo:mi,onSubmit:yi,fields:i[e.currentStep.name],meta:{fields:W.current,fieldsets:ui[e.currentStep.name]},parseFormValues:Bt,canSkipAiValidation:s.services_and_deliverables_error_skippable===!0,handleValidation:u(async t=>{if(e.currentStep.name==="select_country")return Y.handleValidation(t);if(C&&e.currentStep.name==="basic_information"){let n=await y(t,C?.fields,{isPartialValidation:!1});return C?.handleValidation(n)}if(w&&e.currentStep.name==="contract_details"){let n=await y(t,w?.fields,{isPartialValidation:!1});return w?.handleValidation(n)}if(O&&e.currentStep.name==="contract_preview"){let n=await y(t,O?.fields,{isPartialValidation:!0});return O?.handleValidation(n)}if(E&&e.currentStep.name==="pricing_plan"){let n=await y(t,E?.fields,{isPartialValidation:!1});return E?.handleValidation(n)}if(V&&e.currentStep.name==="eligibility_questionnaire"){let n=await y(t,V?.fields,{isPartialValidation:!1});return V?.handleValidation(n)}return null},"handleValidation"),initialValues:pi,employmentId:r,refetchEmployment:ht,isSubmitting:Pt.isPending||vt.isPending||ot.isPending||Mt.isPending||It.isPending||Et.isPending||Vt.isPending||Ot.isPending||Rt.isPending,documentPreviewPdf:ct,canInvite:Ae,isEmploymentReadOnly:S,invitedStatus:ke,employment:o,defaultLegalEntity:qe,steps:Ie}},"useContractorOnboarding");export{$i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4Y2DWXQB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-FFVTWWGX.js";import{a as e}from"./chunk-P37U34EQ.js";var d={form:{index:0,name:"form"},confirmation_form:{index:1,name:"confirmation_form"}};function f(t,r){if(!t)return{};if(!r)return{...t.contract_details,effective_date:"",reason_for_change:"",job_title:t.job_title,additional_comments:"",annual_gross_salary:o(t.contract_details?.annual_gross_salary)};let s=r.map(n=>n.name),i=Object.keys(t?.contract_details||{});return{...s.reduce((n,a)=>{if(i.includes(a)){let c=t?.contract_details;n[a]=c[a]}return n},{}),effective_date:"",reason_for_change:"",job_title:t.job_title,additional_comments:"",annual_gross_salary:o(t.contract_details?.annual_gross_salary),additional_comments_toggle:!1}}e(f,"buildInitialValues");export{d as a,f as b};
|
|
2
|
+
//# sourceMappingURL=chunk-5EDCZGZV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-RWMNB4RJ.js";import{a as C}from"./chunk-A3NABWR7.js";import{b as B}from"./chunk-DJYO6IIO.js";import{a as w,b as f}from"./chunk-IFD3RW53.js";import{c as i,d as t,g as F}from"./chunk-EARN6G25.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,{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,{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-PX6B2DBO.js";import{a as C}from"./chunk-RRZ2GPQS.js";import{b as B}from"./chunk-XADVV6OP.js";import{a as w,b as f}from"./chunk-ET4QWXWY.js";import{c as i,d as t,g as F}from"./chunk-OSQ6VUDM.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,{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,{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-5QHQT6DL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-XO4DAKV7.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-5TGKHA2W.js.map
|