@remoteoss/remote-flows 0.26.0 → 0.28.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.
Files changed (187) hide show
  1. package/dist/{ZendeskTriggerButton-FSCvhzTG.d.ts → ZendeskTriggerButton-DIV8pCPo.d.ts} +2 -1
  2. package/dist/{chunk-KH5SAWNH.js → chunk-2FKEF3OG.js} +2 -2
  3. package/dist/{chunk-AU6AILO2.js → chunk-53KVZ4BP.js} +2 -2
  4. package/dist/{chunk-46JFDBPC.js → chunk-5MYWJJBQ.js} +2 -2
  5. package/dist/{chunk-22JG4IMF.js → chunk-5NPET4ZO.js} +2 -2
  6. package/dist/{chunk-I3PGODII.js → chunk-6KIQIVKA.js} +2 -2
  7. package/dist/{chunk-T5LZSTW3.js → chunk-6LJRRFK2.js} +2 -2
  8. package/dist/chunk-7AC3W7WD.js +2 -0
  9. package/dist/chunk-7AC3W7WD.js.map +1 -0
  10. package/dist/chunk-7VOQAVM4.js +2 -0
  11. package/dist/chunk-7VOQAVM4.js.map +1 -0
  12. package/dist/chunk-ANQ4HVVK.js +2 -0
  13. package/dist/chunk-ANQ4HVVK.js.map +1 -0
  14. package/dist/{chunk-P4ZSYIA4.js → chunk-AODV6HT2.js} +2 -2
  15. package/dist/{chunk-S2KE2JLJ.js → chunk-AUZWLETL.js} +2 -2
  16. package/dist/{chunk-BGXVK7HL.js → chunk-AWDGLK2T.js} +2 -2
  17. package/dist/{chunk-VUP76ZMQ.js → chunk-BOTWQMOJ.js} +2 -2
  18. package/dist/{chunk-PHBQMNG3.js → chunk-CVIWZYO3.js} +2 -2
  19. package/dist/chunk-DB7ITLRX.js +2 -0
  20. package/dist/chunk-DB7ITLRX.js.map +1 -0
  21. package/dist/{chunk-2M7EBC4K.js → chunk-DZ7FZ4L2.js} +2 -2
  22. package/dist/{chunk-W5BJQRNM.js → chunk-E6OBNWMU.js} +2 -2
  23. package/dist/chunk-EHAZWZ3O.js +2 -0
  24. package/dist/chunk-EHAZWZ3O.js.map +1 -0
  25. package/dist/{chunk-4JVXDB5G.js → chunk-FFMKAMWP.js} +2 -2
  26. package/dist/{chunk-I52UTPHD.js → chunk-GWLOE7WJ.js} +2 -2
  27. package/dist/{chunk-LHSNAVGR.js → chunk-HMNHKZGD.js} +2 -2
  28. package/dist/{chunk-M6G27EJN.js → chunk-IQKZWU7I.js} +2 -2
  29. package/dist/chunk-IWA5B4U6.js +2 -0
  30. package/dist/chunk-IWA5B4U6.js.map +1 -0
  31. package/dist/{chunk-RNJWBKLA.js → chunk-JO4722R7.js} +2 -2
  32. package/dist/chunk-LMYJ6V44.js +2 -0
  33. package/dist/chunk-LMYJ6V44.js.map +1 -0
  34. package/dist/{chunk-74DRB7Z5.js → chunk-MGVP76ZI.js} +2 -2
  35. package/dist/{chunk-VVF4IZES.js → chunk-MRPXDND2.js} +2 -2
  36. package/dist/chunk-NP4G3N5P.js +2 -0
  37. package/dist/{chunk-4IXRU67S.js → chunk-OU4Y73FX.js} +2 -2
  38. package/dist/{chunk-BLZW25OE.js → chunk-PYKEYPGA.js} +2 -2
  39. package/dist/{chunk-7KNNJBO6.js → chunk-QDYWPG2R.js} +2 -2
  40. package/dist/{chunk-OCNL6L4L.js → chunk-QPTO4XXU.js} +2 -2
  41. package/dist/{chunk-EJ4COVQQ.js → chunk-QTYDDIVO.js} +2 -2
  42. package/dist/chunk-R3DJNVHR.js +2 -0
  43. package/dist/chunk-R3DJNVHR.js.map +1 -0
  44. package/dist/chunk-R645TMO5.js +2 -0
  45. package/dist/{chunk-2TADRH4W.js.map → chunk-R645TMO5.js.map} +1 -1
  46. package/dist/{chunk-JHPCP2ZX.js → chunk-RAHCZTQ3.js} +2 -2
  47. package/dist/{chunk-CT2ROVBF.js → chunk-TM7Q7RHH.js} +2 -2
  48. package/dist/chunk-UFBTCHEI.js +2 -0
  49. package/dist/{chunk-IUZ7DEXC.js.map → chunk-UFBTCHEI.js.map} +1 -1
  50. package/dist/{chunk-RDGF4PBB.js → chunk-UQOWSJ2B.js} +2 -2
  51. package/dist/chunk-VDRNNOVA.js +2 -0
  52. package/dist/chunk-VDRNNOVA.js.map +1 -0
  53. package/dist/chunk-VM2DQCZO.js +2 -0
  54. package/dist/chunk-VM2DQCZO.js.map +1 -0
  55. package/dist/chunk-W55MUSAS.js +2 -0
  56. package/dist/{chunk-NVYMAOQ7.js.map → chunk-W55MUSAS.js.map} +1 -1
  57. package/dist/{chunk-NWEXPORY.js → chunk-WCIJHQMP.js} +2 -2
  58. package/dist/chunk-WLBRCGTG.js +2 -0
  59. package/dist/{chunk-QKLIYOMA.js.map → chunk-WLBRCGTG.js.map} +1 -1
  60. package/dist/chunk-XPKVRYIU.js +2 -0
  61. package/dist/chunk-XPKVRYIU.js.map +1 -0
  62. package/dist/{chunk-3VYNEJMC.js → chunk-Z42H2QEW.js} +2 -2
  63. package/dist/{chunk-HCZWP44I.js → chunk-ZWZJ4XOY.js} +2 -2
  64. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  65. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  66. package/dist/flows/ContractAmendment/index.js +1 -1
  67. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  68. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  69. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  70. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  71. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  72. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  73. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  74. package/dist/flows/ContractorOnboarding/index.js +1 -1
  75. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  76. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  77. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  78. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  79. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  80. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  81. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  82. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  83. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  84. package/dist/flows/CostCalculator/hooks.js +1 -1
  85. package/dist/flows/CostCalculator/index.js +1 -1
  86. package/dist/flows/CostCalculator/utils.js +1 -1
  87. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  88. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  89. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  90. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  91. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  92. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  93. package/dist/flows/Onboarding/index.js +1 -1
  94. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  95. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  96. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  97. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  98. package/dist/flows/Termination/TerminationFlow.js +1 -1
  99. package/dist/flows/Termination/TerminationForm.js +1 -1
  100. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInfomationContainer.d.ts +10 -0
  101. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInfomationContainer.js +2 -0
  102. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInfomationContainer.js.map +1 -0
  103. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.d.ts +11 -0
  104. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +2 -0
  105. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js.map +1 -0
  106. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.d.ts +18 -0
  107. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +2 -0
  108. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js.map +1 -0
  109. package/dist/flows/Termination/components/AcknowledgeInformation/constants.d.ts +12 -0
  110. package/dist/flows/Termination/components/AcknowledgeInformation/constants.js +2 -0
  111. package/dist/flows/Termination/components/AcknowledgeInformation/constants.js.map +1 -0
  112. package/dist/flows/Termination/components/AcknowledgeInformation/types.d.ts +11 -0
  113. package/dist/flows/Termination/components/AcknowledgeInformation/types.js +1 -0
  114. package/dist/flows/Termination/components/AcknowledgeInformation/types.js.map +1 -0
  115. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  116. package/dist/flows/Termination/hooks.js +1 -1
  117. package/dist/flows/Termination/index.d.ts +4 -0
  118. package/dist/flows/Termination/index.js +1 -1
  119. package/dist/flows/Termination/json-schemas/additionalInformation.d.ts +17 -0
  120. package/dist/flows/Termination/json-schemas/additionalInformation.js +1 -1
  121. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +19 -0
  122. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  123. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +1 -0
  124. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  125. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  126. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +1 -0
  127. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  128. package/dist/flows/api.js +1 -1
  129. package/dist/index.css +1 -1
  130. package/dist/index.css.map +1 -1
  131. package/dist/index.d.ts +52 -1
  132. package/dist/index.js +1 -1
  133. package/dist/index.js.map +1 -1
  134. package/dist/internals.d.ts +1 -1
  135. package/dist/internals.js +1 -1
  136. package/package.json +1 -1
  137. package/dist/chunk-2TADRH4W.js +0 -2
  138. package/dist/chunk-32GSS4UM.js +0 -2
  139. package/dist/chunk-32GSS4UM.js.map +0 -1
  140. package/dist/chunk-4T6PRR6R.js +0 -2
  141. package/dist/chunk-4T6PRR6R.js.map +0 -1
  142. package/dist/chunk-GC23RRCI.js +0 -2
  143. package/dist/chunk-GC23RRCI.js.map +0 -1
  144. package/dist/chunk-HHWIJGDR.js +0 -2
  145. package/dist/chunk-HHWIJGDR.js.map +0 -1
  146. package/dist/chunk-IUZ7DEXC.js +0 -2
  147. package/dist/chunk-MP2T74PU.js +0 -2
  148. package/dist/chunk-MP2T74PU.js.map +0 -1
  149. package/dist/chunk-NVYMAOQ7.js +0 -2
  150. package/dist/chunk-Q3A4A2HL.js +0 -2
  151. package/dist/chunk-QEWB24WT.js +0 -2
  152. package/dist/chunk-QEWB24WT.js.map +0 -1
  153. package/dist/chunk-QKLIYOMA.js +0 -2
  154. package/dist/chunk-XSHHMBMT.js +0 -2
  155. package/dist/chunk-XSHHMBMT.js.map +0 -1
  156. /package/dist/{chunk-KH5SAWNH.js.map → chunk-2FKEF3OG.js.map} +0 -0
  157. /package/dist/{chunk-AU6AILO2.js.map → chunk-53KVZ4BP.js.map} +0 -0
  158. /package/dist/{chunk-46JFDBPC.js.map → chunk-5MYWJJBQ.js.map} +0 -0
  159. /package/dist/{chunk-22JG4IMF.js.map → chunk-5NPET4ZO.js.map} +0 -0
  160. /package/dist/{chunk-I3PGODII.js.map → chunk-6KIQIVKA.js.map} +0 -0
  161. /package/dist/{chunk-T5LZSTW3.js.map → chunk-6LJRRFK2.js.map} +0 -0
  162. /package/dist/{chunk-P4ZSYIA4.js.map → chunk-AODV6HT2.js.map} +0 -0
  163. /package/dist/{chunk-S2KE2JLJ.js.map → chunk-AUZWLETL.js.map} +0 -0
  164. /package/dist/{chunk-BGXVK7HL.js.map → chunk-AWDGLK2T.js.map} +0 -0
  165. /package/dist/{chunk-VUP76ZMQ.js.map → chunk-BOTWQMOJ.js.map} +0 -0
  166. /package/dist/{chunk-PHBQMNG3.js.map → chunk-CVIWZYO3.js.map} +0 -0
  167. /package/dist/{chunk-2M7EBC4K.js.map → chunk-DZ7FZ4L2.js.map} +0 -0
  168. /package/dist/{chunk-W5BJQRNM.js.map → chunk-E6OBNWMU.js.map} +0 -0
  169. /package/dist/{chunk-4JVXDB5G.js.map → chunk-FFMKAMWP.js.map} +0 -0
  170. /package/dist/{chunk-I52UTPHD.js.map → chunk-GWLOE7WJ.js.map} +0 -0
  171. /package/dist/{chunk-LHSNAVGR.js.map → chunk-HMNHKZGD.js.map} +0 -0
  172. /package/dist/{chunk-M6G27EJN.js.map → chunk-IQKZWU7I.js.map} +0 -0
  173. /package/dist/{chunk-RNJWBKLA.js.map → chunk-JO4722R7.js.map} +0 -0
  174. /package/dist/{chunk-74DRB7Z5.js.map → chunk-MGVP76ZI.js.map} +0 -0
  175. /package/dist/{chunk-VVF4IZES.js.map → chunk-MRPXDND2.js.map} +0 -0
  176. /package/dist/{chunk-Q3A4A2HL.js.map → chunk-NP4G3N5P.js.map} +0 -0
  177. /package/dist/{chunk-4IXRU67S.js.map → chunk-OU4Y73FX.js.map} +0 -0
  178. /package/dist/{chunk-BLZW25OE.js.map → chunk-PYKEYPGA.js.map} +0 -0
  179. /package/dist/{chunk-7KNNJBO6.js.map → chunk-QDYWPG2R.js.map} +0 -0
  180. /package/dist/{chunk-OCNL6L4L.js.map → chunk-QPTO4XXU.js.map} +0 -0
  181. /package/dist/{chunk-EJ4COVQQ.js.map → chunk-QTYDDIVO.js.map} +0 -0
  182. /package/dist/{chunk-JHPCP2ZX.js.map → chunk-RAHCZTQ3.js.map} +0 -0
  183. /package/dist/{chunk-CT2ROVBF.js.map → chunk-TM7Q7RHH.js.map} +0 -0
  184. /package/dist/{chunk-RDGF4PBB.js.map → chunk-UQOWSJ2B.js.map} +0 -0
  185. /package/dist/{chunk-NWEXPORY.js.map → chunk-WCIJHQMP.js.map} +0 -0
  186. /package/dist/{chunk-3VYNEJMC.js.map → chunk-Z42H2QEW.js.map} +0 -0
  187. /package/dist/{chunk-HCZWP44I.js.map → chunk-ZWZJ4XOY.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/terminationDetails.ts"],"sourcesContent":["import { FILE_TYPES, MAX_FILE_SIZE } from '@/src/lib/uploadConfig';\n\nexport const terminationDetailsSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n will_challenge_termination: {\n const: 'yes',\n },\n },\n required: ['will_challenge_termination'],\n },\n then: {\n properties: {\n will_challenge_termination_description: {\n type: 'string',\n },\n },\n required: ['will_challenge_termination_description'],\n },\n else: {\n properties: {\n will_challenge_termination_description: false,\n },\n },\n },\n ],\n properties: {\n termination_reason: {\n title: 'Termination reason',\n description:\n 'Make sure you choose an accurate termination reason to avoid unfair or unlawful dismissal claims.',\n type: 'string',\n oneOf: [\n {\n const: 'gross_misconduct',\n title: 'Gross misconduct',\n },\n {\n const: 'performance',\n title: 'Performance',\n },\n {\n const: 'workforce_reduction',\n title: 'Workforce Reduction',\n },\n {\n const: 'values',\n title: 'Values',\n },\n {\n const: 'compliance_issue',\n title: 'Compliance issue',\n },\n {\n const: 'incapacity_to_perform_inherent_duties',\n title: 'Incapacity To perform inherent duties',\n },\n {\n const: 'mutual_agreement',\n title: 'Mutual agreement',\n },\n {\n const: 'cancellation_before_start_date',\n title: 'Decision to cancel hiring before the employee starts',\n },\n {\n const: 'job_abandonment',\n title: 'Job abandonment',\n },\n {\n const: 'dissatisfaction_with_remote_service',\n title: 'Dissatisfaction with EOR service',\n },\n {\n const: 'end_of_fixed_term_contract_compliance_issue',\n title: 'End of fixed-term contract',\n },\n {\n const: 'other',\n title: 'Other',\n },\n ],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n reason_description: {\n description: '',\n maxLength: 1000,\n title: 'Termination reason details',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n additional_comments: {\n description: '',\n maxLength: 1000,\n title: 'Additional details regarding this termination process.',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n termination_reason_files: {\n description:\n 'Please upload any supporting documents regarding the termination reason.',\n title: 'Termination reason files',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: FILE_TYPES.document,\n multiple: true,\n maxSize: MAX_FILE_SIZE, // maxFileSize doesn't seem to work for some reason, found that this was fixed in @remoteoss/json-schema-form v1\n },\n },\n risk_assesment_info: {\n description: '',\n title: 'Risk assessment info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n risk_assessment_reasons: {\n description: '',\n title: 'This employee is...',\n type: 'array',\n items: {\n anyOf: [\n {\n const: 'sick_leave',\n title: 'Currently on or recently returned from sick leave',\n },\n {\n const: 'family_leave',\n title:\n 'Currently on or recently returned from maternity, paternity, or other family leave',\n },\n {\n const: 'pregnant_or_breastfeeding',\n title: 'Pregnant or breastfeeding',\n },\n {\n const: 'requested_medical_or_family_leave',\n title: 'Requested medical or family leave',\n },\n {\n const: 'disabled_or_health_condition',\n title: 'Disabled or has a health condition',\n },\n {\n const: 'member_of_union_or_works_council',\n title: 'A member of a union or works council',\n },\n {\n const: 'caring_responsibilities',\n title: 'Caring responsibilities',\n },\n {\n const: 'reported_concerns_with_workplace',\n title:\n 'Reported any wrongdoing; raised any allegations of discrimination, harassment, retaliation, etc.; or asserted their employment rights or raised complaints about their working conditions',\n },\n {\n const: 'none_of_these',\n title:\n 'To the best of my knowledge, I am not aware of any of these',\n },\n ],\n },\n 'x-jsf-presentation': {\n inputType: 'checkbox',\n direction: 'column',\n },\n },\n will_challenge_termination: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title:\n 'Do you consider it is likely that the employee will challenge their termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n will_challenge_termination_description: {\n description: '',\n maxLength: 1000,\n title:\n 'Please explain how the employee will challenge their termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n proposed_termination_date_info: {\n description: '',\n title: 'Proposed termination date info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n proposed_termination_date: {\n description: '',\n format: 'date',\n maxLength: 255,\n title: 'Proposed termination date',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n },\n required: [\n 'termination_reason',\n 'reason_description',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'proposed_termination_date',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'termination_reason',\n 'reason_description',\n 'additional_comments',\n 'termination_reason_files',\n 'risk_assesment_info',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'will_challenge_termination_description',\n 'proposed_termination_date_info',\n 'proposed_termination_date',\n ],\n },\n },\n};\n"],"mappings":"wCAEO,IAAMA,EAA2B,CACtC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CAAC,wCAAwC,CACrD,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,EAC1C,CACF,CACF,CACF,EACA,WAAY,CACV,mBAAoB,CAClB,MAAO,qBACP,YACE,oGACF,KAAM,SACN,MAAO,CACL,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,cACP,MAAO,aACT,EACA,CACE,MAAO,sBACP,MAAO,qBACT,EACA,CACE,MAAO,SACP,MAAO,QACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,wCACP,MAAO,uCACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,iCACP,MAAO,sDACT,EACA,CACE,MAAO,kBACP,MAAO,iBACT,EACA,CACE,MAAO,sCACP,MAAO,kCACT,EACA,CACE,MAAO,8CACP,MAAO,4BACT,EACA,CACE,MAAO,QACP,MAAO,OACT,CACF,EACA,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,mBAAoB,CAClB,YAAa,GACb,UAAW,IACX,MAAO,6BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,UAAW,IACX,MAAO,yDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,yBAA0B,CACxB,YACE,2EACF,MAAO,2BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,OACX,OAAQC,EAAW,SACnB,SAAU,GACV,QAAS,QACX,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,MAAO,uBACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,wBAAyB,CACvB,YAAa,GACb,MAAO,sBACP,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,MAAO,aACP,MAAO,mDACT,EACA,CACE,MAAO,eACP,MACE,oFACJ,EACA,CACE,MAAO,4BACP,MAAO,2BACT,EACA,CACE,MAAO,oCACP,MAAO,mCACT,EACA,CACE,MAAO,+BACP,MAAO,oCACT,EACA,CACE,MAAO,mCACP,MAAO,sCACT,EACA,CACE,MAAO,0BACP,MAAO,yBACT,EACA,CACE,MAAO,mCACP,MACE,2LACJ,EACA,CACE,MAAO,gBACP,MACE,6DACJ,CACF,CACF,EACA,qBAAsB,CACpB,UAAW,WACX,UAAW,QACb,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MACE,mFACF,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,uCAAwC,CACtC,YAAa,GACb,UAAW,IACX,MACE,mEACF,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,+BAAgC,CAC9B,YAAa,GACb,MAAO,iCACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,0BAA2B,CACzB,YAAa,GACb,OAAQ,OACR,UAAW,IACX,MAAO,4BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,CACF,EACA,SAAU,CACR,qBACA,qBACA,0BACA,6BACA,2BACF,EACA,KAAM,SACN,cAAe,CACb,qBACA,qBACA,sBACA,2BACA,sBACA,0BACA,6BACA,yCACA,iCACA,2BACF,CACF,CACF,CACF","names":["terminationDetailsSchema","FILE_TYPES"]}
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-ZSCKSEAA.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a,b as e}from"./chunk-ANQ4HVVK.js";import{b as n}from"./chunk-WVDTHFGS.js";import{b as s}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import{Info as f}from"lucide-react";import{Fragment as y,jsx as r,jsxs as t}from"react/jsx-runtime";function N({grossSalary:l,currency:p,hasExtraStatutoryPayment:c=!1}){return t("div",{children:[t("div",{className:"flex justify-between items-center mb-2",children:[t("div",{className:"flex items-center gap-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Gross Salary"}),c&&r(m,{content:t(y,{children:[r("span",{children:"This country respects extra payments on top of the gross salary."})," ",r(e,{zendeskId:a.extraPayments,children:"Learn more"})]}),children:t(n,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0 mt-2",children:[r(f,{className:"h-3 w-3 text-gray-400"}),r("span",{className:"sr-only",children:"Info"})]})})]}),r("span",{className:"font-semibold text-lg",children:s(l,p)})]}),r(i,{})]})}o(N,"CostCalculatorGrossSalary");export{N as a};
2
+ //# sourceMappingURL=chunk-R645TMO5.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/Results/CostCalculatorGrossSalary.tsx"],"sourcesContent":["import { Separator } from '@/src/components/ui/separator';\nimport { formatCurrency } from '@/src/lib/utils';\nimport { BasicTooltip } from '@/src/components/ui/basic-tooltip';\nimport { Button } from '@/src/components/ui/button';\nimport { Info } from 'lucide-react';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\n\ntype CostCalculatorGrossSalaryProps = {\n grossSalary: number;\n currency: string;\n hasExtraStatutoryPayment?: boolean;\n};\n\nexport function CostCalculatorGrossSalary({\n grossSalary,\n currency,\n hasExtraStatutoryPayment = false,\n}: CostCalculatorGrossSalaryProps) {\n return (\n <div>\n <div className='flex justify-between items-center mb-2'>\n <div className='flex items-center gap-2'>\n <h3 className='font-medium text-primary-foreground'>Gross Salary</h3>\n {hasExtraStatutoryPayment && (\n <BasicTooltip\n content={\n <>\n <span>\n This country respects extra payments on top of the gross\n salary.\n </span>{' '}\n <ZendeskTriggerButton\n zendeskId={zendeskArticles.extraPayments}\n >\n Learn more\n </ZendeskTriggerButton>\n </>\n }\n >\n <Button variant='ghost' size='icon' className='h-4 w-4 p-0 mt-2'>\n <Info className='h-3 w-3 text-gray-400' />\n <span className='sr-only'>Info</span>\n </Button>\n </BasicTooltip>\n )}\n </div>\n <span className='font-semibold text-lg'>\n {formatCurrency(grossSalary, currency)}\n </span>\n </div>\n <Separator />\n </div>\n );\n}\n"],"mappings":"mRAIA,OAAS,QAAAA,MAAY,eAmBX,OAIM,YAAAC,EAJN,OAAAC,EAIM,QAAAC,MAJN,oBATH,SAASC,EAA0B,CACxC,YAAAC,EACA,SAAAC,EACA,yBAAAC,EAA2B,EAC7B,EAAmC,CACjC,OACEJ,EAAC,OACC,UAAAA,EAAC,OAAI,UAAU,yCACb,UAAAA,EAAC,OAAI,UAAU,0BACb,UAAAD,EAAC,MAAG,UAAU,sCAAsC,wBAAY,EAC/DK,GACCL,EAACM,EAAA,CACC,QACEL,EAAAF,EAAA,CACE,UAAAC,EAAC,QAAK,4EAGN,EAAQ,IACRA,EAACO,EAAA,CACC,UAAWC,EAAgB,cAC5B,sBAED,GACF,EAGF,SAAAP,EAACQ,EAAA,CAAO,QAAQ,QAAQ,KAAK,OAAO,UAAU,mBAC5C,UAAAT,EAACU,EAAA,CAAK,UAAU,wBAAwB,EACxCV,EAAC,QAAK,UAAU,UAAU,gBAAI,GAChC,EACF,GAEJ,EACAA,EAAC,QAAK,UAAU,wBACb,SAAAW,EAAeR,EAAaC,CAAQ,EACvC,GACF,EACAJ,EAACY,EAAA,EAAU,GACb,CAEJ,CAxCgBC,EAAAX,EAAA","names":["Info","Fragment","jsx","jsxs","CostCalculatorGrossSalary","grossSalary","currency","hasExtraStatutoryPayment","BasicTooltip","ZendeskTriggerButton","zendeskArticles","Button","Info","formatCurrency","Separator","__name"]}
1
+ {"version":3,"sources":["../src/flows/CostCalculator/Results/CostCalculatorGrossSalary.tsx"],"sourcesContent":["import { Separator } from '@/src/components/ui/separator';\nimport { formatCurrency } from '@/src/lib/utils';\nimport { BasicTooltip } from '@/src/components/ui/basic-tooltip';\nimport { Button } from '@/src/components/ui/button';\nimport { Info } from 'lucide-react';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\n\ntype CostCalculatorGrossSalaryProps = {\n grossSalary: number;\n currency: string;\n hasExtraStatutoryPayment?: boolean;\n};\n\nexport function CostCalculatorGrossSalary({\n grossSalary,\n currency,\n hasExtraStatutoryPayment = false,\n}: CostCalculatorGrossSalaryProps) {\n return (\n <div>\n <div className='flex justify-between items-center mb-2'>\n <div className='flex items-center gap-2'>\n <h3 className='font-medium text-primary-foreground'>Gross Salary</h3>\n {hasExtraStatutoryPayment && (\n <BasicTooltip\n content={\n <>\n <span>\n This country respects extra payments on top of the gross\n salary.\n </span>{' '}\n <ZendeskTriggerButton\n zendeskId={zendeskArticles.extraPayments}\n >\n Learn more\n </ZendeskTriggerButton>\n </>\n }\n >\n <Button variant='ghost' size='icon' className='h-4 w-4 p-0 mt-2'>\n <Info className='h-3 w-3 text-gray-400' />\n <span className='sr-only'>Info</span>\n </Button>\n </BasicTooltip>\n )}\n </div>\n <span className='font-semibold text-lg'>\n {formatCurrency(grossSalary, currency)}\n </span>\n </div>\n <Separator />\n </div>\n );\n}\n"],"mappings":"kPAIA,OAAS,QAAAA,MAAY,eAmBX,OAIM,YAAAC,EAJN,OAAAC,EAIM,QAAAC,MAJN,oBATH,SAASC,EAA0B,CACxC,YAAAC,EACA,SAAAC,EACA,yBAAAC,EAA2B,EAC7B,EAAmC,CACjC,OACEJ,EAAC,OACC,UAAAA,EAAC,OAAI,UAAU,yCACb,UAAAA,EAAC,OAAI,UAAU,0BACb,UAAAD,EAAC,MAAG,UAAU,sCAAsC,wBAAY,EAC/DK,GACCL,EAACM,EAAA,CACC,QACEL,EAAAF,EAAA,CACE,UAAAC,EAAC,QAAK,4EAGN,EAAQ,IACRA,EAACO,EAAA,CACC,UAAWC,EAAgB,cAC5B,sBAED,GACF,EAGF,SAAAP,EAACQ,EAAA,CAAO,QAAQ,QAAQ,KAAK,OAAO,UAAU,mBAC5C,UAAAT,EAACU,EAAA,CAAK,UAAU,wBAAwB,EACxCV,EAAC,QAAK,UAAU,UAAU,gBAAI,GAChC,EACF,GAEJ,EACAA,EAAC,QAAK,UAAU,wBACb,SAAAW,EAAeR,EAAaC,CAAQ,EACvC,GACF,EACAJ,EAACY,EAAA,EAAU,GACb,CAEJ,CAxCgBC,EAAAX,EAAA","names":["Info","Fragment","jsx","jsxs","CostCalculatorGrossSalary","grossSalary","currency","hasExtraStatutoryPayment","BasicTooltip","ZendeskTriggerButton","zendeskArticles","Button","Info","formatCurrency","Separator","__name"]}
@@ -1,2 +1,2 @@
1
- import{a as P}from"./chunk-BCXRPHWY.js";import{a as S}from"./chunk-MQWVZSGH.js";import{a as v}from"./chunk-PHBQMNG3.js";import{a as B}from"./chunk-W5BJQRNM.js";import{a as N}from"./chunk-22JG4IMF.js";import{a as R}from"./chunk-2TADRH4W.js";import{a as x,b as k,c as i}from"./chunk-7R347KBY.js";import{a as h,b as p,c as g,d as w,e as T}from"./chunk-AFRA4BIW.js";import{b as f}from"./chunk-HPHWQU34.js";import{a as b}from"./chunk-43WMZDDH.js";import{a as _}from"./chunk-P37U34EQ.js";import{lazy as L,useState as V}from"react";import{Fragment as I,jsx as a,jsxs as r}from"react/jsx-runtime";var z=L(()=>import("./flows/CostCalculator/Results/CostCalculatorResultsChart.js"));function Y({employmentData:D,options:e}){let[o,E]=V("monthly"),n=D.employments?.[0];if(!n)return null;let t=n.employer_currency_costs,s=t.currency.symbol,m=o==="monthly"?t.monthly_gross_salary:t.annual_gross_salary,u=o==="monthly"?t.monthly_benefits_total:t.annual_benefits_total,y=o==="monthly"?t.monthly_contributions_total:t.annual_contributions_total,F=o==="monthly"?t.monthly_total:t.annual_total,l=o==="monthly"?null:t.extra_statutory_payments_breakdown,A=o==="monthly"?null:t.extra_statutory_payments_total,d=o==="monthly"?t.monthly_indirect_tax:t.annual_indirect_tax,c=o==="monthly"?t.monthly_benefits_breakdown:t.annual_benefits_breakdown,H=o==="monthly"?t.monthly_contributions_breakdown:t.annual_contributions_breakdown,C=[{name:"Gross Salary",value:m,color:e?.chartColors?.grossSalary??"#3b82f6"},{name:"Contributions",value:y,color:e?.chartColors?.contributions??"#f59e0b"}];return c&&C.push({name:"Benefits",value:u??0,color:e?.chartColors?.benefits??"#10b981"}),r(I,{children:[r("div",{className:"flex flex-col md:flex-row gap-4 md:items-center justify-between mb-6 RemoteFlows__CostCalculatorResults",children:[r("div",{className:"RemoteFlows__CostCalculatorResults__Header",children:[r("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[a("span",{className:"flex items-center gap-1",children:e?.title??"Cost Calculator"}),a(f,{className:"ml-2",children:n.country.name})]}),a("p",{className:"text-primary-foreground font-medium mt-1",children:e?.description??`Total cost of employment in ${n.country.name}`})]}),a(x,{value:o,onValueChange:G=>E(G),className:"w-full md:w-auto RemoteFlows__CostCalculatorResults__Tabs",children:r(k,{className:"grid w-full md:w-[200px] grid-cols-2",children:[a(i,{value:"monthly",children:"Monthly"}),a(i,{value:"annual",children:"Annual"})]})})]}),r("div",{className:b("grid grid-cols-1 gap-6",e?.showChart?"md:grid-cols-3":"","RemoteFlows__CostCalculatorResults_CostBreakdown"),children:[r(h,{className:"md:col-span-2 rounded-lg",children:[r(p,{className:"pb-2",children:[a(g,{children:"Cost Breakdown"}),a(w,{children:"Detailed breakdown of all employer costs"})]}),a(T,{children:r("div",{className:"space-y-6",children:[a(R,{grossSalary:m,currency:s,hasExtraStatutoryPayment:n.has_extra_statutory_payment}),c?a(v,{benefitsBreakdown:c,benefitsTotal:u,currency:s}):null,a(B,{contributionsBreakdown:H,contributionsTotal:y,currency:s}),Array.isArray(l)&&l.length>0?a(N,{extraStatutoryPaymentsBreakdown:l,extraStatutoryPaymentsTotal:A,currency:s}):null,d?a(P,{indirectTax:d,currency:s}):null,a(S,{totalCost:F,currency:s})]})})]}),e?.showChart&&a(z,{chartData:C,currency:s})]})]})}_(Y,"CostCalculatorResults");export{Y as a};
2
- //# sourceMappingURL=chunk-JHPCP2ZX.js.map
1
+ import{a as P}from"./chunk-BCXRPHWY.js";import{a as S}from"./chunk-MQWVZSGH.js";import{a as v}from"./chunk-CVIWZYO3.js";import{a as B}from"./chunk-E6OBNWMU.js";import{a as N}from"./chunk-5NPET4ZO.js";import{a as R}from"./chunk-R645TMO5.js";import{a as x,b as k,c as i}from"./chunk-7R347KBY.js";import{a as h,b as p,c as g,d as w,e as T}from"./chunk-AFRA4BIW.js";import{b as f}from"./chunk-HPHWQU34.js";import{a as b}from"./chunk-43WMZDDH.js";import{a as _}from"./chunk-P37U34EQ.js";import{lazy as L,useState as V}from"react";import{Fragment as I,jsx as a,jsxs as r}from"react/jsx-runtime";var z=L(()=>import("./flows/CostCalculator/Results/CostCalculatorResultsChart.js"));function Y({employmentData:D,options:e}){let[o,E]=V("monthly"),n=D.employments?.[0];if(!n)return null;let t=n.employer_currency_costs,s=t.currency.symbol,m=o==="monthly"?t.monthly_gross_salary:t.annual_gross_salary,u=o==="monthly"?t.monthly_benefits_total:t.annual_benefits_total,y=o==="monthly"?t.monthly_contributions_total:t.annual_contributions_total,F=o==="monthly"?t.monthly_total:t.annual_total,l=o==="monthly"?null:t.extra_statutory_payments_breakdown,A=o==="monthly"?null:t.extra_statutory_payments_total,d=o==="monthly"?t.monthly_indirect_tax:t.annual_indirect_tax,c=o==="monthly"?t.monthly_benefits_breakdown:t.annual_benefits_breakdown,H=o==="monthly"?t.monthly_contributions_breakdown:t.annual_contributions_breakdown,C=[{name:"Gross Salary",value:m,color:e?.chartColors?.grossSalary??"#3b82f6"},{name:"Contributions",value:y,color:e?.chartColors?.contributions??"#f59e0b"}];return c&&C.push({name:"Benefits",value:u??0,color:e?.chartColors?.benefits??"#10b981"}),r(I,{children:[r("div",{className:"flex flex-col md:flex-row gap-4 md:items-center justify-between mb-6 RemoteFlows__CostCalculatorResults",children:[r("div",{className:"RemoteFlows__CostCalculatorResults__Header",children:[r("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[a("span",{className:"flex items-center gap-1",children:e?.title??"Cost Calculator"}),a(f,{className:"ml-2",children:n.country.name})]}),a("p",{className:"text-primary-foreground font-medium mt-1",children:e?.description??`Total cost of employment in ${n.country.name}`})]}),a(x,{value:o,onValueChange:G=>E(G),className:"w-full md:w-auto RemoteFlows__CostCalculatorResults__Tabs",children:r(k,{className:"grid w-full md:w-[200px] grid-cols-2",children:[a(i,{value:"monthly",children:"Monthly"}),a(i,{value:"annual",children:"Annual"})]})})]}),r("div",{className:b("grid grid-cols-1 gap-6",e?.showChart?"md:grid-cols-3":"","RemoteFlows__CostCalculatorResults_CostBreakdown"),children:[r(h,{className:"md:col-span-2 rounded-lg",children:[r(p,{className:"pb-2",children:[a(g,{children:"Cost Breakdown"}),a(w,{children:"Detailed breakdown of all employer costs"})]}),a(T,{children:r("div",{className:"space-y-6",children:[a(R,{grossSalary:m,currency:s,hasExtraStatutoryPayment:n.has_extra_statutory_payment}),c?a(v,{benefitsBreakdown:c,benefitsTotal:u,currency:s}):null,a(B,{contributionsBreakdown:H,contributionsTotal:y,currency:s}),Array.isArray(l)&&l.length>0?a(N,{extraStatutoryPaymentsBreakdown:l,extraStatutoryPaymentsTotal:A,currency:s}):null,d?a(P,{indirectTax:d,currency:s}):null,a(S,{totalCost:F,currency:s})]})})]}),e?.showChart&&a(z,{chartData:C,currency:s})]})]})}_(Y,"CostCalculatorResults");export{Y as a};
2
+ //# sourceMappingURL=chunk-RAHCZTQ3.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-TOA3JILU.js";import{b as s}from"./chunk-CFIJKJXD.js";import{a as l}from"./chunk-RNJWBKLA.js";import{f as m,g as d}from"./chunk-CNDSIADP.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
- //# sourceMappingURL=chunk-CT2ROVBF.js.map
1
+ import{b as c}from"./chunk-TOA3JILU.js";import{b as s}from"./chunk-CFIJKJXD.js";import{a as l}from"./chunk-JO4722R7.js";import{f as m,g as d}from"./chunk-CNDSIADP.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
+ //# sourceMappingURL=chunk-TM7Q7RHH.js.map
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-HFI2MD3H.js";import{a as m,b as y}from"./chunk-ANQ4HVVK.js";import{c}from"./chunk-CNDSIADP.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(y,{className:"text-sm",zendeskId:m.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(l,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
2
+ //# sourceMappingURL=chunk-UFBTCHEI.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder) {\n const currentValue = getValues(props.name);\n\n if (currentValue) {\n setValue('salary_conversion', currentValue);\n setValue('salary_converted', 'salary_conversion');\n } else if (defaultValue) {\n // Fallback to defaultValue if no current value\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n } else {\n const conversionValue = getValues('salary_conversion');\n\n if (conversionValue) {\n setValue(props.name, conversionValue);\n setValue('salary_converted', props.name);\n } else if (defaultValue) {\n // Fallback to defaultValue if no conversion value\n setValue(props.name, defaultValue);\n setValue('salary_converted', props.name);\n }\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues, props.name]);\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n />\n );\n};\n"],"mappings":"mMAIA,OAAS,aAAAA,MAAiB,QA8BpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAbC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOP,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACe,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBX,EAAkB,oBAAsBI,EAAM,KAC9DQ,EAAsBZ,EACxBI,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACd,GAAIb,EAAiB,CACnB,IAAMc,EAAeR,EAAUF,EAAM,IAAI,EAErCU,GACFT,EAAS,oBAAqBS,CAAY,EAC1CT,EAAS,mBAAoB,mBAAmB,GACvCF,IAETE,EAAS,oBAAqBF,CAAY,EAC1CE,EAAS,mBAAoB,mBAAmB,EAEpD,KAAO,CACL,IAAMU,EAAkBT,EAAU,mBAAmB,EAEjDS,GACFV,EAASD,EAAM,KAAMW,CAAe,EACpCV,EAAS,mBAAoBD,EAAM,IAAI,GAC9BD,IAETE,EAASD,EAAM,KAAMD,CAAY,EACjCE,EAAS,mBAAoBD,EAAM,IAAI,EAE3C,CACF,EAAG,CAACJ,EAAiBG,EAAcE,EAAUC,EAAWF,EAAM,IAAI,CAAC,EAEjEV,EAACsB,EAAA,CACE,GAAGZ,EACJ,eAAgBN,EAChB,eAAgBC,EAChB,cAAeY,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBN,EAClB,CAEJ,EAnE2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","currentValue","conversionValue","CurrencyConversionField"]}
1
+ {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder) {\n const currentValue = getValues(props.name);\n\n if (currentValue) {\n setValue('salary_conversion', currentValue);\n setValue('salary_converted', 'salary_conversion');\n } else if (defaultValue) {\n // Fallback to defaultValue if no current value\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n } else {\n const conversionValue = getValues('salary_conversion');\n\n if (conversionValue) {\n setValue(props.name, conversionValue);\n setValue('salary_converted', props.name);\n } else if (defaultValue) {\n // Fallback to defaultValue if no conversion value\n setValue(props.name, defaultValue);\n setValue('salary_converted', props.name);\n }\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues, props.name]);\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n />\n );\n};\n"],"mappings":"kKAIA,OAAS,aAAAA,MAAiB,QA8BpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAbC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOP,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACe,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBX,EAAkB,oBAAsBI,EAAM,KAC9DQ,EAAsBZ,EACxBI,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACd,GAAIb,EAAiB,CACnB,IAAMc,EAAeR,EAAUF,EAAM,IAAI,EAErCU,GACFT,EAAS,oBAAqBS,CAAY,EAC1CT,EAAS,mBAAoB,mBAAmB,GACvCF,IAETE,EAAS,oBAAqBF,CAAY,EAC1CE,EAAS,mBAAoB,mBAAmB,EAEpD,KAAO,CACL,IAAMU,EAAkBT,EAAU,mBAAmB,EAEjDS,GACFV,EAASD,EAAM,KAAMW,CAAe,EACpCV,EAAS,mBAAoBD,EAAM,IAAI,GAC9BD,IAETE,EAASD,EAAM,KAAMD,CAAY,EACjCE,EAAS,mBAAoBD,EAAM,IAAI,EAE3C,CACF,EAAG,CAACJ,EAAiBG,EAAcE,EAAUC,EAAWF,EAAM,IAAI,CAAC,EAEjEV,EAACsB,EAAA,CACE,GAAGZ,EACJ,eAAgBN,EAChB,eAAgBC,EAChB,cAAeY,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBN,EAClB,CAEJ,EAnE2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","currentValue","conversionValue","CurrencyConversionField"]}
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-VVF4IZES.js";import{b as n}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function u({onSubmit:m}){let{terminationBag:i}=n();return a(r,{onSubmit:o(async t=>{await m?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(u,"TerminationDetailsForm");export{u as a};
2
- //# sourceMappingURL=chunk-RDGF4PBB.js.map
1
+ import{a as r}from"./chunk-MRPXDND2.js";import{b as n}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function u({onSubmit:m}){let{terminationBag:i}=n();return a(r,{onSubmit:o(async t=>{await m?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(u,"TerminationDetailsForm");export{u as a};
2
+ //# sourceMappingURL=chunk-UQOWSJ2B.js.map
@@ -0,0 +1,2 @@
1
+ var o={document:".pdf, .doc, .docx, .xls, .xlsx, .csv"};export{o as a};
2
+ //# sourceMappingURL=chunk-VDRNNOVA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/uploadConfig.ts"],"sourcesContent":["/**\n * As we aren't exposing the api/v1/upload-config to the Remote API this is a temporary solution to get the upload config.\n */\n\nexport const MAX_FILE_SIZE = 20 * 1024 * 1024; // 20MB\n\nexport const FILE_TYPES = {\n document: '.pdf, .doc, .docx, .xls, .xlsx, .csv',\n};\n"],"mappings":"AAMO,IAAMA,EAAa,CACxB,SAAU,sCACZ","names":["FILE_TYPES"]}
@@ -0,0 +1,2 @@
1
+ import{b as e}from"./chunk-ANQ4HVVK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
+ //# sourceMappingURL=chunk-VM2DQCZO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.tsx"],"sourcesContent":["import { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\n\n/**\n * The acknowledge information fees component props\n */\nexport type AcknowledgeInformationFeesProps = {\n /**\n * The Zendesk ID for the involuntary offboarding service charge\n */\n involuntaryOffboardingServiceChargeZendeskId: number;\n /**\n * The Zendesk ID for the reconciliation invoice\n */\n reconciliationInvoiceZendeskId: number;\n};\n\nexport const AcknowledgeInformationFees = ({\n involuntaryOffboardingServiceChargeZendeskId,\n reconciliationInvoiceZendeskId,\n}: AcknowledgeInformationFeesProps) => {\n return (\n <p className='RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]'>\n You'll receive an{' '}\n <ZendeskTriggerButton\n zendeskId={involuntaryOffboardingServiceChargeZendeskId}\n className='align-baseline'\n >\n involuntary offboarding service charge ↗\n </ZendeskTriggerButton>{' '}\n on your{' '}\n <ZendeskTriggerButton zendeskId={reconciliationInvoiceZendeskId}>\n reconciliation invoice ↗\n </ZendeskTriggerButton>\n </p>\n );\n};\n"],"mappings":"gFAqBI,OAEE,OAAAA,EAFF,QAAAC,MAAA,oBALG,IAAMC,EAA6BC,EAAA,CAAC,CACzC,6CAAAC,EACA,+BAAAC,CACF,IAEIJ,EAAC,KAAE,UAAU,iEAAiE,8BAC1D,IAClBD,EAACM,EAAA,CACC,UAAWF,EACX,UAAU,iBACX,yDAED,EAAwB,IAAI,UACpB,IACRJ,EAACM,EAAA,CAAqB,UAAWD,EAAgC,yCAEjE,GACF,EAjBsC","names":["jsx","jsxs","AcknowledgeInformationFees","__name","involuntaryOffboardingServiceChargeZendeskId","reconciliationInvoiceZendeskId","ZendeskTriggerButton"]}
@@ -0,0 +1,2 @@
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-DTHBG6BD.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-AFRA4BIW.js";import{a as w,b as f}from"./chunk-ANQ4HVVK.js";import{b as B}from"./chunk-WVDTHFGS.js";import{a as i,b as n,e as F}from"./chunk-43WMZDDH.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!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":`${a}-${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(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("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(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("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}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("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:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({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 Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("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&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(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:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("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:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("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?t("button",{onClick:()=>_(!a),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(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"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(T,{content:t(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($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(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"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),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(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),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:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
+ //# sourceMappingURL=chunk-W55MUSAS.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/shared/actions-dropdown/ActionsDropdown.tsx","../src/flows/CostCalculator/EstimationResults/EstimationResults.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport { cn } from '@/src/lib/utils';\nimport { MoreHorizontal } from 'lucide-react';\nimport { useState, type ReactNode } from 'react';\n\nexport interface DropdownAction {\n label: string;\n icon?: ReactNode;\n onClick: () => void;\n separator?: boolean;\n disabled?: boolean;\n}\n\ninterface ActionsDropdownProps {\n actions?: DropdownAction[];\n label?: string;\n className?: string;\n 'data-testid'?: string;\n}\n\nexport function ActionsDropdown({\n actions = [],\n className,\n label,\n 'data-testid': dataSelector,\n}: ActionsDropdownProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <div className={cn('relative', className)}>\n <Button\n data-testid={dataSelector}\n variant='ghost'\n aria-label={label}\n className='h-8 w-8 p-0'\n onClick={() => setIsOpen(!isOpen)}\n >\n <MoreHorizontal className='h-4 w-4' />\n </Button>\n\n {isOpen && (\n <>\n <div\n className='fixed inset-0 z-40'\n onClick={() => setIsOpen(false)}\n />\n <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]'>\n {actions.map((action, index) => (\n <button\n key={index}\n data-testid={`${dataSelector}-${action.label.toLowerCase().replace(' ', '-')}`}\n className={cn(\n 'w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100',\n action.disabled && 'opacity-50 cursor-not-allowed',\n )}\n onClick={() => {\n action.onClick();\n setIsOpen(false);\n }}\n disabled={action.disabled}\n >\n {action.label}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n );\n}\n","import { MinimalCountry, MinimalRegion } from '@/src/client';\nimport { ActionsDropdown } from '@/src/components/shared/actions-dropdown/ActionsDropdown';\nimport { Card } from '@/src/components/ui/card';\nimport { ChevronDown, Info } from 'lucide-react';\nimport Flag from 'react-flagpack';\nimport { useState } from 'react';\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/src/components/ui/accordion';\nimport { cn, formatCurrency, sanitizeHtml } from '@/src/lib/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { BasicTooltip } from '@/src/components/ui/basic-tooltip';\nimport { CostCalculatorEstimation } from '@/src/flows/CostCalculator/types';\n\nconst FLAG_CODE_MAPPING: Record<string, string> = {\n GB: 'GB-UKM',\n};\n\nconst EstimationResultsHeader = ({\n title,\n country,\n region,\n annualGrossSalary,\n onDelete,\n onExportPdf,\n onEdit,\n}: {\n title: string;\n country: MinimalCountry;\n region?: MinimalRegion;\n annualGrossSalary: string;\n onDelete: () => void;\n onExportPdf: () => void;\n onEdit: () => void;\n}) => {\n const actions = [\n {\n label: 'Edit',\n onClick: onEdit,\n },\n {\n label: 'Export',\n onClick: onExportPdf,\n },\n {\n label: 'Delete',\n onClick: onDelete,\n },\n ];\n return (\n <div className='RemoteFlows__EstimationResults__Header flex justify-between'>\n <div className='flex flex-row items-center gap-6'>\n <div className='RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]'>\n <Flag\n code={\n FLAG_CODE_MAPPING[country.alpha_2_code] || country.alpha_2_code\n }\n />\n </div>\n <div className='space-y-1'>\n <h2\n data-testid='estimation-results-header-title'\n className='RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]'\n >\n {title}\n </h2>\n <p className='RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]'>\n {country.name} {region ? ` (${region.name})` : ''}\n </p>\n <p\n data-testid='estimation-results-header-annual-gross-salary'\n className='RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]'\n >\n <span className='text-[#181818]'>\n Employee annual gross salary:\n </span>{' '}\n {annualGrossSalary}\n </p>\n </div>\n </div>\n <ActionsDropdown\n label='Actions'\n className='RemoteFlows__EstimationResults__ActionsDropdown'\n actions={actions}\n />\n </div>\n );\n};\n\ninterface OnboardingTimelineStep {\n title: string;\n description: string;\n id: string;\n}\n\ninterface OnboardingTimelineData {\n steps: OnboardingTimelineStep[];\n helpText: string;\n zendeskArticleId?: number;\n}\n\nconst getOnboardingTimelineData = (): OnboardingTimelineData => {\n return {\n steps: [\n {\n id: 'add-employment-details',\n title: 'Add employment details',\n description: 'You add employee employments details.',\n },\n {\n id: 'invite-employee',\n title: 'Invite employee',\n description:\n 'Hire receives an email invitation from Remote to start the self-enrollment process.',\n },\n {\n id: 'verify-information',\n title: 'Verify information',\n description:\n 'Remote prepares the Employment Agreement and verifies all the information.',\n },\n {\n id: 'sign-contract',\n title: 'Sign contract',\n description:\n 'All parties sign the Employment Agreement and are ready to start. 🎉',\n },\n ],\n helpText:\n \"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.\",\n zendeskArticleId: zendeskArticles.employeeOnboardingTimeline,\n };\n};\n\nfunction OnboardingTimeline({\n minimumOnboardingDays,\n data,\n className,\n}: {\n minimumOnboardingDays: number | null;\n data: OnboardingTimelineData;\n className?: string;\n}) {\n return (\n <Accordion\n type='single'\n collapsible\n className={cn(\n 'RemoteFlows__EstimationResults__OnboardingTimeline w-full',\n className,\n )}\n >\n <AccordionItem\n value='timeline'\n className='RemoteFlows__OnboardingTimeline__AccordionItem border-border'\n >\n <AccordionTrigger className='RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4'>\n <div className='flex items-center justify-between w-full'>\n <span className='RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]'>\n Onboarding timeline\n </span>\n {minimumOnboardingDays != null && (\n <span className='RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4'>\n {minimumOnboardingDays} days\n </span>\n )}\n </div>\n </AccordionTrigger>\n <AccordionContent className='px-0 pb-4'>\n <ul className='RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2'>\n {data.steps.map((step) => (\n <li key={step.id}>\n <strong className='font-medium text-[#09090B]'>\n {step.title}\n </strong>{' '}\n - {step.description}\n </li>\n ))}\n </ul>\n <p className='RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4'>\n {data.helpText}\n {data.zendeskArticleId && (\n <ZendeskTriggerButton zendeskId={data.zendeskArticleId}>\n Learn more\n </ZendeskTriggerButton>\n )}\n </p>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n\nfunction HiringSection({\n className,\n countryBenefitsUrl,\n countryGuideUrl,\n country,\n}: {\n className?: string;\n countryBenefitsUrl: string;\n countryGuideUrl: string;\n country: MinimalCountry;\n}) {\n return (\n <Accordion\n type='single'\n collapsible\n className={cn(\n 'RemoteFlows__EstimationResults__HiringSection w-full',\n className,\n )}\n >\n <AccordionItem\n value='timeline'\n className='RemoteFlows__HiringSection__AccordionItem border-border'\n >\n <AccordionTrigger className='RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4'>\n <div className='flex items-center justify-between w-full'>\n <span className='text-base font-medium text-[#0F172A]'>\n Hiring in {country.name}\n </span>\n </div>\n </AccordionTrigger>\n <AccordionContent>\n <div className='flex flex-col gap-1'>\n {countryGuideUrl && (\n <a\n href={countryGuideUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our complete guide ↗\n </a>\n )}\n {countryBenefitsUrl && (\n <a\n href={countryBenefitsUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our available benefits ↗\n </a>\n )}\n </div>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n\nfunction EstimationHeaders({\n isMultipleCurrency,\n className,\n}: {\n isMultipleCurrency: boolean;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n 'RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center',\n className,\n )}\n >\n <span aria-hidden />\n {isMultipleCurrency ? (\n <>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Employee currency\n </span>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Employer currency\n </span>\n </>\n ) : (\n <>\n <span></span>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Amount\n </span>\n </>\n )}\n </div>\n );\n}\n\nfunction EstimationRow({\n label,\n amounts,\n className,\n children,\n}: {\n label: string | React.ReactNode;\n amounts: string | string[];\n className?: string;\n children?: React.ReactNode;\n}) {\n const [isOpen, setIsOpen] = useState(true);\n\n return (\n <div className={cn('RemoteFlows__EstimationResults__Row', className)}>\n <div className='RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center'>\n <div className='RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2'>\n <span\n className={cn(\n 'RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]',\n )}\n >\n {label}\n </span>\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded'\n >\n <ChevronDown\n className={`h-4 w-4 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n </div>\n\n {Array.isArray(amounts) ? (\n amounts.map((amount, index) => (\n <span\n key={index}\n className={cn(\n 'RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]',\n )}\n >\n {amount}\n </span>\n ))\n ) : (\n <>\n <span></span>\n <span\n className={cn(\n 'RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]',\n )}\n >\n {amounts}\n </span>\n </>\n )}\n </div>\n\n {/* Collapsible content */}\n {isOpen && children && (\n <div className='RemoteFlows__EstimationRow__CollapsibleContent mt-4'>\n {children}\n </div>\n )}\n </div>\n );\n}\n\ninterface BreakdownItem {\n label: string;\n tooltip?: string;\n dataSelector?: string;\n regionalAmount?: string;\n employerAmount?: string;\n description?: string;\n zendeskId?: string;\n isCollapsible?: boolean;\n children?: BreakdownItem[];\n}\n\nfunction BreakdownListItem({\n item,\n isMultipleCurrency,\n level = 0,\n}: {\n item: BreakdownItem;\n isMultipleCurrency: boolean;\n level?: number;\n}) {\n const [isOpen, setIsOpen] = useState(false);\n const hasChildren = item.children && item.children.length > 0;\n const isNested = level > 0;\n const isCollapsible = item.isCollapsible || hasChildren;\n\n return (\n <li\n className={cn(\n 'RemoteFlows__BreakdownList__Item pb-3',\n isNested && 'pb-1',\n )}\n >\n <div\n className={cn(\n isMultipleCurrency\n ? 'RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between'\n : 'RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between',\n )}\n >\n <div\n className={cn(\n 'RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2',\n isNested && 'pl-3',\n )}\n >\n {!isNested && (\n <span\n className='RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0'\n aria-hidden='true'\n />\n )}\n\n {isCollapsible ? (\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1'\n >\n <span\n className={cn(\n isNested\n ? 'RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]'\n : 'RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]',\n )}\n >\n {item.label}\n </span>\n <ChevronDown\n className={`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n ) : (\n <span\n className={cn(\n isNested\n ? 'RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]'\n : 'RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1',\n )}\n >\n {item.label}\n </span>\n )}\n\n {item.tooltip && (\n <BasicTooltip\n content={\n <>\n <span\n dangerouslySetInnerHTML={{\n __html: sanitizeHtml(item.tooltip),\n }}\n />{' '}\n {item.zendeskId && (\n <ZendeskTriggerButton zendeskId={Number(item.zendeskId)}>\n Learn more\n </ZendeskTriggerButton>\n )}\n </>\n }\n >\n <button className='RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded'>\n <Info\n className={cn(\n 'RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground',\n isNested ? 'h-3 w-3' : 'h-4 w-4',\n )}\n />\n </button>\n </BasicTooltip>\n )}\n </div>\n\n {isMultipleCurrency ? (\n <>\n <span\n data-testid={\n item.dataSelector && item.dataSelector + '-employee-amount'\n }\n className={cn(\n 'RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.regionalAmount || '—'}\n </span>\n <span\n data-testid={\n item.dataSelector && item.dataSelector + '-employer-amount'\n }\n className={cn(\n 'RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.employerAmount || '—'}\n </span>\n </>\n ) : (\n <span\n data-testid={item.dataSelector}\n className={cn(\n 'RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.regionalAmount || '—'}\n </span>\n )}\n </div>\n\n {hasChildren && isOpen && (\n <div className='mt-1'>\n <BreakdownList\n items={item.children!}\n isMultipleCurrency={isMultipleCurrency}\n level={level + 1}\n />\n </div>\n )}\n </li>\n );\n}\n\ninterface BreakdownListProps {\n items: BreakdownItem[];\n isMultipleCurrency: boolean;\n className?: string;\n level?: number;\n}\n\nfunction BreakdownList({\n items,\n isMultipleCurrency,\n className,\n level,\n}: BreakdownListProps) {\n return (\n <ul className={cn('RemoteFlows__BreakdownList list-none', className)}>\n {items.map((item, index) => (\n <BreakdownListItem\n key={index}\n item={item}\n isMultipleCurrency={isMultipleCurrency}\n level={level}\n />\n ))}\n </ul>\n );\n}\n\ntype EstimationResultsComponents = {\n HiringSection?: React.ComponentType<{\n country: MinimalCountry;\n countryBenefitsUrl: string;\n countryGuideUrl: string;\n }>;\n OnboardingTimeline?: React.ComponentType<{\n minimumOnboardingDays: number | null;\n data: OnboardingTimelineData;\n }>;\n Header?: React.ComponentType<{\n title: string;\n region?: MinimalRegion;\n country: MinimalCountry;\n onDelete: () => void;\n onExportPdf: () => void;\n }>;\n Footer?: React.ComponentType;\n};\n\ntype EstimationResultsProps = {\n estimation: CostCalculatorEstimation;\n title: string;\n components?: EstimationResultsComponents;\n onDelete: () => void;\n onExportPdf: () => void;\n onEdit: () => void;\n};\n\nexport const EstimationResults = ({\n estimation,\n title,\n components,\n onDelete,\n onExportPdf,\n onEdit,\n}: EstimationResultsProps) => {\n const CustomHiringSection = components?.HiringSection || HiringSection;\n const CustomOnboardingTimeline =\n components?.OnboardingTimeline || OnboardingTimeline;\n const CustomHeader = components?.Header || EstimationResultsHeader;\n const CustomFooter = components?.Footer;\n\n const onboardingTimelineData = getOnboardingTimelineData();\n\n const isMultipleCurrency =\n estimation.employer_currency_costs.currency.code !==\n estimation.regional_currency_costs.currency.code;\n\n const hasManagementFee =\n estimation.employer_currency_costs.monthly_management_fee;\n\n const hasRegion = estimation.region.code !== estimation.country.code;\n\n const formattedSalary = formatCurrency(\n estimation.regional_currency_costs.annual_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n );\n\n return (\n <Card className='RemoteFlows__EstimationResults__Card p-10'>\n <div className='RemoteFlows__Separator'>\n <CustomHeader\n title={title}\n annualGrossSalary={formattedSalary}\n region={hasRegion ? estimation.region : undefined}\n country={estimation.country}\n onDelete={onDelete}\n onExportPdf={onExportPdf}\n onEdit={onEdit}\n />\n </div>\n <div className='RemoteFlows__Separator'>\n <EstimationHeaders\n isMultipleCurrency={isMultipleCurrency}\n className='mb-3'\n />\n <EstimationRow\n label='Monthly total cost'\n amounts={\n isMultipleCurrency\n ? [\n formatCurrency(\n estimation.regional_currency_costs.monthly_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n formatCurrency(\n estimation.employer_currency_costs.monthly_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n ]\n : formatCurrency(\n estimation.regional_currency_costs.monthly_total,\n estimation.regional_currency_costs.currency.symbol,\n )\n }\n >\n <BreakdownList\n items={[\n {\n label: 'Gross monthly salary',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.monthly_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.monthly_gross_salary,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: zendeskArticles.extraPayments.toString(),\n tooltip:\n 'This country respects extra payments on top of the gross salary.',\n },\n {\n label: 'Mandatory employer costs',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_contributions_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .monthly_contributions_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.monthly_contributions_breakdown?.map(\n (item, index) => {\n return {\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_contributions_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n };\n },\n ) || [],\n },\n {\n label: 'Benefits',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.monthly_benefits_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.monthly_benefits_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.monthly_benefits_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_benefits_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n ...(hasManagementFee\n ? [\n {\n label: 'Monthly fee',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_management_fee,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .monthly_management_fee,\n estimation.employer_currency_costs.currency.symbol,\n ),\n tooltip:\n 'Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more.',\n },\n ]\n : []),\n ]}\n isMultipleCurrency={isMultipleCurrency}\n />\n </EstimationRow>\n </div>\n <div className='RemoteFlows__Separator'>\n <EstimationRow\n label='Annual total cost'\n amounts={\n isMultipleCurrency\n ? [\n formatCurrency(\n estimation.regional_currency_costs.annual_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n formatCurrency(\n estimation.employer_currency_costs.annual_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n ]\n : formatCurrency(\n estimation.regional_currency_costs.annual_total,\n estimation.regional_currency_costs.currency.symbol,\n )\n }\n >\n <BreakdownList\n items={[\n {\n label: 'Gross annual salary',\n dataSelector: 'annual-gross-salary',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_gross_salary,\n estimation.employer_currency_costs.currency.symbol,\n ),\n },\n {\n label: 'Mandatory employer costs',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_contributions_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_contributions_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.annual_contributions_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_contributions_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n {\n label: 'Benefits',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_benefits_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_benefits_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.annual_benefits_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_benefits_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n {\n label: 'Extra statutory payments',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .extra_statutory_payments_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .extra_statutory_payments_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.extra_statutory_payments_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .extra_statutory_payments_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n ...(hasManagementFee\n ? [\n {\n label: 'Annual fee',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_management_fee,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .annual_management_fee,\n estimation.employer_currency_costs.currency.symbol,\n ),\n tooltip:\n 'Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more.',\n },\n ]\n : []),\n ]}\n isMultipleCurrency={isMultipleCurrency}\n />\n </EstimationRow>\n </div>\n <div className='RemoteFlows__Separator'>\n <CustomOnboardingTimeline\n minimumOnboardingDays={estimation.minimum_onboarding_time}\n data={onboardingTimelineData}\n />\n </div>\n\n <CustomHiringSection\n countryBenefitsUrl={estimation.country_benefits_details_url as string}\n countryGuideUrl={estimation.country_guide_url as string}\n country={estimation.country}\n />\n\n {CustomFooter && <Cust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,aAAe,MAC/B,EACF,GAAK,CAAC,CACV,EACA,GAAIkB,EACA,CACE,CACE,MAAO,aACP,eAAgBG,EACdV,EAAW,wBACR,sBACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdV,EAAW,wBACR,sBACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,QACE,qIACJ,CACF,EACA,CAAC,CACP,EACA,mBAAoBvB,EACtB,EACF,EACF,EACAhC,EAAC,OAAI,UAAU,yBACb,SAAAA,EAAC0D,EAAA,CACC,sBAAuBH,EAAW,wBAClC,KAAMM,EACR,EACF,EAEA7D,EAACyD,EAAA,CACC,mBAAoBF,EAAW,6BAC/B,gBAAiBA,EAAW,kBAC5B,QAASA,EAAW,QACtB,EAECK,GAAgB5D,EAAC4D,EAAA,EAAa,GACjC,CAEJ,EAzUiC","names":["MoreHorizontal","useState","Fragment","jsx","jsxs","ActionsDropdown","actions","className","label","dataSelector","isOpen","setIsOpen","useState","cn","Button","MoreHorizontal","action","index","__name","ChevronDown","Info","Flag","useState","Fragment","jsx","jsxs","FLAG_CODE_MAPPING","EstimationResultsHeader","__name","title","country","region","annualGrossSalary","onDelete","onExportPdf","onEdit","actions","Flag","ActionsDropdown","getOnboardingTimelineData","zendeskArticles","OnboardingTimeline","minimumOnboardingDays","data","className","Accordion","cn","AccordionItem","AccordionTrigger","AccordionContent","step","ZendeskTriggerButton","HiringSection","countryBenefitsUrl","countryGuideUrl","EstimationHeaders","isMultipleCurrency","EstimationRow","label","amounts","children","isOpen","setIsOpen","useState","ChevronDown","amount","index","BreakdownListItem","item","level","hasChildren","isNested","isCollapsible","BasicTooltip","sanitizeHtml","Info","BreakdownList","items","EstimationResults","estimation","components","CustomHiringSection","CustomOnboardingTimeline","CustomHeader","CustomFooter","onboardingTimelineData","hasManagementFee","hasRegion","formattedSalary","formatCurrency","Card"]}
1
+ {"version":3,"sources":["../src/components/shared/actions-dropdown/ActionsDropdown.tsx","../src/flows/CostCalculator/EstimationResults/EstimationResults.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport { cn } from '@/src/lib/utils';\nimport { MoreHorizontal } from 'lucide-react';\nimport { useState, type ReactNode } from 'react';\n\nexport interface DropdownAction {\n label: string;\n icon?: ReactNode;\n onClick: () => void;\n separator?: boolean;\n disabled?: boolean;\n}\n\ninterface ActionsDropdownProps {\n actions?: DropdownAction[];\n label?: string;\n className?: string;\n 'data-testid'?: string;\n}\n\nexport function ActionsDropdown({\n actions = [],\n className,\n label,\n 'data-testid': dataSelector,\n}: ActionsDropdownProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <div className={cn('relative', className)}>\n <Button\n data-testid={dataSelector}\n variant='ghost'\n aria-label={label}\n className='h-8 w-8 p-0'\n onClick={() => setIsOpen(!isOpen)}\n >\n <MoreHorizontal className='h-4 w-4' />\n </Button>\n\n {isOpen && (\n <>\n <div\n className='fixed inset-0 z-40'\n onClick={() => setIsOpen(false)}\n />\n <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]'>\n {actions.map((action, index) => (\n <button\n key={index}\n data-testid={`${dataSelector}-${action.label.toLowerCase().replace(' ', '-')}`}\n className={cn(\n 'w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100',\n action.disabled && 'opacity-50 cursor-not-allowed',\n )}\n onClick={() => {\n action.onClick();\n setIsOpen(false);\n }}\n disabled={action.disabled}\n >\n {action.label}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n );\n}\n","import { MinimalCountry, MinimalRegion } from '@/src/client';\nimport { ActionsDropdown } from '@/src/components/shared/actions-dropdown/ActionsDropdown';\nimport { Card } from '@/src/components/ui/card';\nimport { ChevronDown, Info } from 'lucide-react';\nimport Flag from 'react-flagpack';\nimport { useState } from 'react';\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/src/components/ui/accordion';\nimport { cn, formatCurrency, sanitizeHtml } from '@/src/lib/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { BasicTooltip } from '@/src/components/ui/basic-tooltip';\nimport { CostCalculatorEstimation } from '@/src/flows/CostCalculator/types';\n\nconst FLAG_CODE_MAPPING: Record<string, string> = {\n GB: 'GB-UKM',\n};\n\nconst EstimationResultsHeader = ({\n title,\n country,\n region,\n annualGrossSalary,\n onDelete,\n onExportPdf,\n onEdit,\n}: {\n title: string;\n country: MinimalCountry;\n region?: MinimalRegion;\n annualGrossSalary: string;\n onDelete: () => void;\n onExportPdf: () => void;\n onEdit: () => void;\n}) => {\n const actions = [\n {\n label: 'Edit',\n onClick: onEdit,\n },\n {\n label: 'Export',\n onClick: onExportPdf,\n },\n {\n label: 'Delete',\n onClick: onDelete,\n },\n ];\n return (\n <div className='RemoteFlows__EstimationResults__Header flex justify-between'>\n <div className='flex flex-row items-center gap-6'>\n <div className='RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]'>\n <Flag\n code={\n FLAG_CODE_MAPPING[country.alpha_2_code] || country.alpha_2_code\n }\n />\n </div>\n <div className='space-y-1'>\n <h2\n data-testid='estimation-results-header-title'\n className='RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]'\n >\n {title}\n </h2>\n <p className='RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]'>\n {country.name} {region ? ` (${region.name})` : ''}\n </p>\n <p\n data-testid='estimation-results-header-annual-gross-salary'\n className='RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]'\n >\n <span className='text-[#181818]'>\n Employee annual gross salary:\n </span>{' '}\n {annualGrossSalary}\n </p>\n </div>\n </div>\n <ActionsDropdown\n label='Actions'\n className='RemoteFlows__EstimationResults__ActionsDropdown'\n actions={actions}\n />\n </div>\n );\n};\n\ninterface OnboardingTimelineStep {\n title: string;\n description: string;\n id: string;\n}\n\ninterface OnboardingTimelineData {\n steps: OnboardingTimelineStep[];\n helpText: string;\n zendeskArticleId?: number;\n}\n\nconst getOnboardingTimelineData = (): OnboardingTimelineData => {\n return {\n steps: [\n {\n id: 'add-employment-details',\n title: 'Add employment details',\n description: 'You add employee employments details.',\n },\n {\n id: 'invite-employee',\n title: 'Invite employee',\n description:\n 'Hire receives an email invitation from Remote to start the self-enrollment process.',\n },\n {\n id: 'verify-information',\n title: 'Verify information',\n description:\n 'Remote prepares the Employment Agreement and verifies all the information.',\n },\n {\n id: 'sign-contract',\n title: 'Sign contract',\n description:\n 'All parties sign the Employment Agreement and are ready to start. 🎉',\n },\n ],\n helpText:\n \"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.\",\n zendeskArticleId: zendeskArticles.employeeOnboardingTimeline,\n };\n};\n\nfunction OnboardingTimeline({\n minimumOnboardingDays,\n data,\n className,\n}: {\n minimumOnboardingDays: number | null;\n data: OnboardingTimelineData;\n className?: string;\n}) {\n return (\n <Accordion\n type='single'\n collapsible\n className={cn(\n 'RemoteFlows__EstimationResults__OnboardingTimeline w-full',\n className,\n )}\n >\n <AccordionItem\n value='timeline'\n className='RemoteFlows__OnboardingTimeline__AccordionItem border-border'\n >\n <AccordionTrigger className='RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4'>\n <div className='flex items-center justify-between w-full'>\n <span className='RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]'>\n Onboarding timeline\n </span>\n {minimumOnboardingDays != null && (\n <span className='RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4'>\n {minimumOnboardingDays} days\n </span>\n )}\n </div>\n </AccordionTrigger>\n <AccordionContent className='px-0 pb-4'>\n <ul className='RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2'>\n {data.steps.map((step) => (\n <li key={step.id}>\n <strong className='font-medium text-[#09090B]'>\n {step.title}\n </strong>{' '}\n - {step.description}\n </li>\n ))}\n </ul>\n <p className='RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4'>\n {data.helpText}\n {data.zendeskArticleId && (\n <ZendeskTriggerButton zendeskId={data.zendeskArticleId}>\n Learn more\n </ZendeskTriggerButton>\n )}\n </p>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n\nfunction HiringSection({\n className,\n countryBenefitsUrl,\n countryGuideUrl,\n country,\n}: {\n className?: string;\n countryBenefitsUrl: string;\n countryGuideUrl: string;\n country: MinimalCountry;\n}) {\n return (\n <Accordion\n type='single'\n collapsible\n className={cn(\n 'RemoteFlows__EstimationResults__HiringSection w-full',\n className,\n )}\n >\n <AccordionItem\n value='timeline'\n className='RemoteFlows__HiringSection__AccordionItem border-border'\n >\n <AccordionTrigger className='RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4'>\n <div className='flex items-center justify-between w-full'>\n <span className='text-base font-medium text-[#0F172A]'>\n Hiring in {country.name}\n </span>\n </div>\n </AccordionTrigger>\n <AccordionContent>\n <div className='flex flex-col gap-1'>\n {countryGuideUrl && (\n <a\n href={countryGuideUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our complete guide ↗\n </a>\n )}\n {countryBenefitsUrl && (\n <a\n href={countryBenefitsUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our available benefits ↗\n </a>\n )}\n </div>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n\nfunction EstimationHeaders({\n isMultipleCurrency,\n className,\n}: {\n isMultipleCurrency: boolean;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n 'RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center',\n className,\n )}\n >\n <span aria-hidden />\n {isMultipleCurrency ? (\n <>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Employee currency\n </span>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Employer currency\n </span>\n </>\n ) : (\n <>\n <span></span>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Amount\n </span>\n </>\n )}\n </div>\n );\n}\n\nfunction EstimationRow({\n label,\n amounts,\n className,\n children,\n}: {\n label: string | React.ReactNode;\n amounts: string | string[];\n className?: string;\n children?: React.ReactNode;\n}) {\n const [isOpen, setIsOpen] = useState(true);\n\n return (\n <div className={cn('RemoteFlows__EstimationResults__Row', className)}>\n <div className='RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center'>\n <div className='RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2'>\n <span\n className={cn(\n 'RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]',\n )}\n >\n {label}\n </span>\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded'\n >\n <ChevronDown\n className={`h-4 w-4 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n </div>\n\n {Array.isArray(amounts) ? (\n amounts.map((amount, index) => (\n <span\n key={index}\n className={cn(\n 'RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]',\n )}\n >\n {amount}\n </span>\n ))\n ) : (\n <>\n <span></span>\n <span\n className={cn(\n 'RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]',\n )}\n >\n {amounts}\n </span>\n </>\n )}\n </div>\n\n {/* Collapsible content */}\n {isOpen && children && (\n <div className='RemoteFlows__EstimationRow__CollapsibleContent mt-4'>\n {children}\n </div>\n )}\n </div>\n );\n}\n\ninterface BreakdownItem {\n label: string;\n tooltip?: string;\n dataSelector?: string;\n regionalAmount?: string;\n employerAmount?: string;\n description?: string;\n zendeskId?: string;\n isCollapsible?: boolean;\n children?: BreakdownItem[];\n}\n\nfunction BreakdownListItem({\n item,\n isMultipleCurrency,\n level = 0,\n}: {\n item: BreakdownItem;\n isMultipleCurrency: boolean;\n level?: number;\n}) {\n const [isOpen, setIsOpen] = useState(false);\n const hasChildren = item.children && item.children.length > 0;\n const isNested = level > 0;\n const isCollapsible = item.isCollapsible || hasChildren;\n\n return (\n <li\n className={cn(\n 'RemoteFlows__BreakdownList__Item pb-3',\n isNested && 'pb-1',\n )}\n >\n <div\n className={cn(\n isMultipleCurrency\n ? 'RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between'\n : 'RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between',\n )}\n >\n <div\n className={cn(\n 'RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2',\n isNested && 'pl-3',\n )}\n >\n {!isNested && (\n <span\n className='RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0'\n aria-hidden='true'\n />\n )}\n\n {isCollapsible ? (\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1'\n >\n <span\n className={cn(\n isNested\n ? 'RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]'\n : 'RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]',\n )}\n >\n {item.label}\n </span>\n <ChevronDown\n className={`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n ) : (\n <span\n className={cn(\n isNested\n ? 'RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]'\n : 'RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1',\n )}\n >\n {item.label}\n </span>\n )}\n\n {item.tooltip && (\n <BasicTooltip\n content={\n <>\n <span\n dangerouslySetInnerHTML={{\n __html: sanitizeHtml(item.tooltip),\n }}\n />{' '}\n {item.zendeskId && (\n <ZendeskTriggerButton zendeskId={Number(item.zendeskId)}>\n Learn more\n </ZendeskTriggerButton>\n )}\n </>\n }\n >\n <button className='RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded'>\n <Info\n className={cn(\n 'RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground',\n isNested ? 'h-3 w-3' : 'h-4 w-4',\n )}\n />\n </button>\n </BasicTooltip>\n )}\n </div>\n\n {isMultipleCurrency ? (\n <>\n <span\n data-testid={\n item.dataSelector && item.dataSelector + '-employee-amount'\n }\n className={cn(\n 'RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.regionalAmount || '—'}\n </span>\n <span\n data-testid={\n item.dataSelector && item.dataSelector + '-employer-amount'\n }\n className={cn(\n 'RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.employerAmount || '—'}\n </span>\n </>\n ) : (\n <span\n data-testid={item.dataSelector}\n className={cn(\n 'RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.regionalAmount || '—'}\n </span>\n )}\n </div>\n\n {hasChildren && isOpen && (\n <div className='mt-1'>\n <BreakdownList\n items={item.children!}\n isMultipleCurrency={isMultipleCurrency}\n level={level + 1}\n />\n </div>\n )}\n </li>\n );\n}\n\ninterface BreakdownListProps {\n items: BreakdownItem[];\n isMultipleCurrency: boolean;\n className?: string;\n level?: number;\n}\n\nfunction BreakdownList({\n items,\n isMultipleCurrency,\n className,\n level,\n}: BreakdownListProps) {\n return (\n <ul className={cn('RemoteFlows__BreakdownList list-none', className)}>\n {items.map((item, index) => (\n <BreakdownListItem\n key={index}\n item={item}\n isMultipleCurrency={isMultipleCurrency}\n level={level}\n />\n ))}\n </ul>\n );\n}\n\ntype EstimationResultsComponents = {\n HiringSection?: React.ComponentType<{\n country: MinimalCountry;\n countryBenefitsUrl: string;\n countryGuideUrl: string;\n }>;\n OnboardingTimeline?: React.ComponentType<{\n minimumOnboardingDays: number | null;\n data: OnboardingTimelineData;\n }>;\n Header?: React.ComponentType<{\n title: string;\n region?: MinimalRegion;\n country: MinimalCountry;\n onDelete: () => void;\n onExportPdf: () => void;\n }>;\n Footer?: React.ComponentType;\n};\n\ntype EstimationResultsProps = {\n estimation: CostCalculatorEstimation;\n title: string;\n components?: EstimationResultsComponents;\n onDelete: () => void;\n onExportPdf: () => void;\n onEdit: () => void;\n};\n\nexport const EstimationResults = ({\n estimation,\n title,\n components,\n onDelete,\n onExportPdf,\n onEdit,\n}: EstimationResultsProps) => {\n const CustomHiringSection = components?.HiringSection || HiringSection;\n const CustomOnboardingTimeline =\n components?.OnboardingTimeline || OnboardingTimeline;\n const CustomHeader = components?.Header || EstimationResultsHeader;\n const CustomFooter = components?.Footer;\n\n const onboardingTimelineData = getOnboardingTimelineData();\n\n const isMultipleCurrency =\n estimation.employer_currency_costs.currency.code !==\n estimation.regional_currency_costs.currency.code;\n\n const hasManagementFee =\n estimation.employer_currency_costs.monthly_management_fee;\n\n const hasRegion = estimation.region.code !== estimation.country.code;\n\n const formattedSalary = formatCurrency(\n estimation.regional_currency_costs.annual_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n );\n\n return (\n <Card className='RemoteFlows__EstimationResults__Card p-10'>\n <div className='RemoteFlows__Separator'>\n <CustomHeader\n title={title}\n annualGrossSalary={formattedSalary}\n region={hasRegion ? estimation.region : undefined}\n country={estimation.country}\n onDelete={onDelete}\n onExportPdf={onExportPdf}\n onEdit={onEdit}\n />\n </div>\n <div className='RemoteFlows__Separator'>\n <EstimationHeaders\n isMultipleCurrency={isMultipleCurrency}\n className='mb-3'\n />\n <EstimationRow\n label='Monthly total cost'\n amounts={\n isMultipleCurrency\n ? [\n formatCurrency(\n estimation.regional_currency_costs.monthly_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n formatCurrency(\n estimation.employer_currency_costs.monthly_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n ]\n : formatCurrency(\n estimation.regional_currency_costs.monthly_total,\n estimation.regional_currency_costs.currency.symbol,\n )\n }\n >\n <BreakdownList\n items={[\n {\n label: 'Gross monthly salary',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.monthly_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.monthly_gross_salary,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: zendeskArticles.extraPayments.toString(),\n tooltip:\n 'This country respects extra payments on top of the gross salary.',\n },\n {\n label: 'Mandatory employer costs',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_contributions_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .monthly_contributions_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.monthly_contributions_breakdown?.map(\n (item, index) => {\n return {\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_contributions_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n };\n },\n ) || [],\n },\n {\n label: 'Benefits',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.monthly_benefits_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.monthly_benefits_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.monthly_benefits_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_benefits_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n ...(hasManagementFee\n ? [\n {\n label: 'Monthly fee',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_management_fee,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .monthly_management_fee,\n estimation.employer_currency_costs.currency.symbol,\n ),\n tooltip:\n 'Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more.',\n },\n ]\n : []),\n ]}\n isMultipleCurrency={isMultipleCurrency}\n />\n </EstimationRow>\n </div>\n <div className='RemoteFlows__Separator'>\n <EstimationRow\n label='Annual total cost'\n amounts={\n isMultipleCurrency\n ? [\n formatCurrency(\n estimation.regional_currency_costs.annual_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n formatCurrency(\n estimation.employer_currency_costs.annual_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n ]\n : formatCurrency(\n estimation.regional_currency_costs.annual_total,\n estimation.regional_currency_costs.currency.symbol,\n )\n }\n >\n <BreakdownList\n items={[\n {\n label: 'Gross annual salary',\n dataSelector: 'annual-gross-salary',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_gross_salary,\n estimation.employer_currency_costs.currency.symbol,\n ),\n },\n {\n label: 'Mandatory employer costs',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_contributions_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_contributions_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.annual_contributions_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_contributions_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n {\n label: 'Benefits',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_benefits_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_benefits_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.annual_benefits_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_benefits_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n {\n label: 'Extra statutory payments',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .extra_statutory_payments_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .extra_statutory_payments_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.extra_statutory_payments_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .extra_statutory_payments_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n ...(hasManagementFee\n ? [\n {\n label: 'Annual fee',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_management_fee,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .annual_management_fee,\n estimation.employer_currency_costs.currency.symbol,\n ),\n tooltip:\n 'Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more.',\n },\n ]\n : []),\n ]}\n isMultipleCurrency={isMultipleCurrency}\n />\n </EstimationRow>\n </div>\n <div className='RemoteFlows__Separator'>\n <CustomOnboardingTimeline\n minimumOnboardingDays={estimation.minimum_onboarding_time}\n data={onboardingTimelineData}\n />\n </div>\n\n <CustomHiringSection\n countryBenefitsUrl={estimation.country_benefits_details_url as string}\n countryGuideUrl={estimation.country_guide_url as string}\n country={estimation.country}\n />\n\n {CustomFooter && <CustomFooter />}\n </Card>\n );\n};\n"],"mappings":"kUAEA,OAAS,kBAAAA,MAAsB,eAC/B,OAAS,YAAAC,MAAgC,QAkCjC,OAIA,YAAAC,EAJA,OAAAC,EAIA,QAAAC,MAJA,oBAjBD,SAASC,EAAgB,CAC9B,QAAAC,EAAU,CAAC,EACX,UAAAC,EACA,MAAAC,EACA,cAAeC,CACjB,EAAyB,CACvB,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAE1C,OACER,EAAC,OAAI,UAAWS,EAAG,WAAYN,CAAS,EACtC,UAAAJ,EAACW,EAAA,CACC,cAAaL,EACb,QAAQ,QACR,aAAYD,EACZ,UAAU,cACV,QAAS,IAAMG,EAAU,CAACD,CAAM,EAEhC,SAAAP,EAACY,EAAA,CAAe,UAAU,UAAU,EACtC,EAECL,GACCN,EAAAF,EAAA,CACE,UAAAC,EAAC,OACC,UAAU,qBACV,QAAS,IAAMQ,EAAU,EAAK,EAChC,EACAR,EAAC,OAAI,UAAU,wGACZ,SAAAG,EAAQ,IAAI,CAACU,EAAQC,IACpBd,EAAC,UAEC,cAAa,GAAGM,CAAY,IAAIO,EAAO,MAAM,YAAY,EAAE,QAAQ,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WX,EAAK,oBAAsB,OACtC,QAASA,EAAK,aAAe,MAC/B,EACF,GAAK,CAAC,CACV,EACA,CACE,MAAO,2BACP,eAAgBqB,EACdV,EAAW,wBACR,+BACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdV,EAAW,wBACR,+BACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,SACEA,EAAW,wBAAwB,oCAAoC,IACrE,CAACX,EAAMF,KAAW,CAChB,MAAOE,EAAK,KACZ,eAAgBqB,EACdV,EAAW,wBACR,qCAAqCb,CAAK,GAAG,OAChDa,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdrB,EAAK,OACLW,EAAW,wBAAwB,SAAS,MAC9C,EACA,UAAWX,EAAK,oBAAsB,OACtC,QAASA,EAAK,aAAe,MAC/B,EACF,GAAK,CAAC,CACV,EACA,GAAIkB,EACA,CACE,CACE,MAAO,aACP,eAAgBG,EACdV,EAAW,wBACR,sBACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdV,EAAW,wBACR,sBACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,QACE,qIACJ,CACF,EACA,CAAC,CACP,EACA,mBAAoBvB,EACtB,EACF,EACF,EACAhC,EAAC,OAAI,UAAU,yBACb,SAAAA,EAAC0D,EAAA,CACC,sBAAuBH,EAAW,wBAClC,KAAMM,EACR,EACF,EAEA7D,EAACyD,EAAA,CACC,mBAAoBF,EAAW,6BAC/B,gBAAiBA,EAAW,kBAC5B,QAASA,EAAW,QACtB,EAECK,GAAgB5D,EAAC4D,EAAA,EAAa,GACjC,CAEJ,EAzUiC","names":["MoreHorizontal","useState","Fragment","jsx","jsxs","ActionsDropdown","actions","className","label","dataSelector","isOpen","setIsOpen","useState","cn","Button","MoreHorizontal","action","index","__name","ChevronDown","Info","Flag","useState","Fragment","jsx","jsxs","FLAG_CODE_MAPPING","EstimationResultsHeader","__name","title","country","region","annualGrossSalary","onDelete","onExportPdf","onEdit","actions","Flag","ActionsDropdown","getOnboardingTimelineData","zendeskArticles","OnboardingTimeline","minimumOnboardingDays","data","className","Accordion","cn","AccordionItem","AccordionTrigger","AccordionContent","step","ZendeskTriggerButton","HiringSection","countryBenefitsUrl","countryGuideUrl","EstimationHeaders","isMultipleCurrency","EstimationRow","label","amounts","children","isOpen","setIsOpen","useState","ChevronDown","amount","index","BreakdownListItem","item","level","hasChildren","isNested","isCollapsible","BasicTooltip","sanitizeHtml","Info","BreakdownList","items","EstimationResults","estimation","components","CustomHiringSection","CustomOnboardingTimeline","CustomHeader","CustomFooter","onboardingTimelineData","hasManagementFee","hasRegion","formattedSalary","formatCurrency","Card"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-46JFDBPC.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2YTBWEC7.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({onSubmit:l,onError:t,onSuccess:d}){let{onboardingBag:o}=n(),m=e(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r.data),o?.next();return}if(r?.error){let c=i(r?.fieldErrors||[],o.meta?.fields?.contract_details);t?.({error:r.error,rawError:r.rawError,fieldErrors:c})}}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit");return p(s,{defaultValues:o.stepState.values?.contract_details||o.initialValues.contract_details,onSubmit:m})}e(F,"ContractDetailsStep");export{F as a};
2
- //# sourceMappingURL=chunk-NWEXPORY.js.map
1
+ import{a as s}from"./chunk-5MYWJJBQ.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2YTBWEC7.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({onSubmit:l,onError:t,onSuccess:d}){let{onboardingBag:o}=n(),m=e(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r.data),o?.next();return}if(r?.error){let c=i(r?.fieldErrors||[],o.meta?.fields?.contract_details);t?.({error:r.error,rawError:r.rawError,fieldErrors:c})}}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit");return p(s,{defaultValues:o.stepState.values?.contract_details||o.initialValues.contract_details,onSubmit:m})}e(F,"ContractDetailsStep");export{F as a};
2
+ //# sourceMappingURL=chunk-WCIJHQMP.js.map
@@ -0,0 +1,2 @@
1
+ import{a as n,b as i}from"./chunk-ANQ4HVVK.js";import{a as e}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as m}from"react/jsx-runtime";var r=["You submit your termination request.","We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>m(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
2
+ //# sourceMappingURL=chunk-WLBRCGTG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.tsx"],"sourcesContent":["import { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\n\nconst terminationSteps = [\n 'You submit your termination request.',\n 'We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.',\n 'A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.',\n 'Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We’ll let you know if there are additional charges before proceeding.',\n 'Terms and conditions for the termination are finalized.',\n 'You verbally communicate the termination to the employee.',\n 'We share termination documents with the employee.',\n 'The employee signs the termination documents if required.',\n 'We process the final salary and offboard the employee.',\n];\n\nexport const TerminationDialogInfoContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationDialogInfoContent__Title')}>\n Please read carefully before you continue\n </h3>\n <p\n className={cn('RemoteFlows__TerminationDialogInfoContent__Description')}\n >\n Please do not inform the employee of the termination. We'll lead\n communication with them after you submit this form and we finalize the\n termination terms.\n </p>\n <p\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription',\n )}\n >\n If you already informed them, that's okay. We'll ask for the details\n regarding that communication and take it from there.\n </p>\n\n <ZendeskTriggerButton\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm',\n )}\n zendeskId={zendeskArticles.terminationEmployeeCommunication}\n >\n Learn more about employee communication\n </ZendeskTriggerButton>\n\n <h3\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessTitle',\n )}\n >\n The termination process\n </h3>\n\n <ul\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside',\n )}\n >\n {terminationSteps.map((step, index) => (\n <li\n key={index}\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessListItem',\n )}\n >\n {step}\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"gKAiBI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAdJ,IAAMC,EAAmB,CACvB,uCACA,mIACA,2GACA,4MACA,0DACA,4DACA,oDACA,4DACA,wDACF,EAEaC,EAA+BC,EAAA,IAExCH,EAAAF,EAAA,CACE,UAAAC,EAAC,MAAG,UAAWK,EAAG,kDAAkD,EAAG,qDAEvE,EACAL,EAAC,KACC,UAAWK,EAAG,wDAAwD,EACvE,sKAID,EACAL,EAAC,KACC,UAAWK,EACT,uHACF,EACD,qIAGD,EAEAL,EAACM,EAAA,CACC,UAAWD,EACT,yEACF,EACA,UAAWE,EAAgB,iCAC5B,mDAED,EAEAP,EAAC,MACC,UAAWK,EACT,yDACF,EACD,mCAED,EAEAL,EAAC,MACC,UAAWK,EACT,8EACF,EAEC,SAAAH,EAAiB,IAAI,CAACM,EAAMC,IAC3BT,EAAC,MAEC,UAAWK,EACT,4DACF,EAEC,SAAAG,GALIC,CAMP,CACD,EACH,GACF,EAvDwC","names":["Fragment","jsx","jsxs","terminationSteps","TerminationDialogInfoContent","__name","cn","ZendeskTriggerButton","zendeskArticles","step","index"]}
1
+ {"version":3,"sources":["../src/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.tsx"],"sourcesContent":["import { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\n\nconst terminationSteps = [\n 'You submit your termination request.',\n 'We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.',\n 'A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.',\n 'Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We’ll let you know if there are additional charges before proceeding.',\n 'Terms and conditions for the termination are finalized.',\n 'You verbally communicate the termination to the employee.',\n 'We share termination documents with the employee.',\n 'The employee signs the termination documents if required.',\n 'We process the final salary and offboard the employee.',\n];\n\nexport const TerminationDialogInfoContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationDialogInfoContent__Title')}>\n Please read carefully before you continue\n </h3>\n <p\n className={cn('RemoteFlows__TerminationDialogInfoContent__Description')}\n >\n Please do not inform the employee of the termination. We'll lead\n communication with them after you submit this form and we finalize the\n termination terms.\n </p>\n <p\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription',\n )}\n >\n If you already informed them, that's okay. We'll ask for the details\n regarding that communication and take it from there.\n </p>\n\n <ZendeskTriggerButton\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm',\n )}\n zendeskId={zendeskArticles.terminationEmployeeCommunication}\n >\n Learn more about employee communication\n </ZendeskTriggerButton>\n\n <h3\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessTitle',\n )}\n >\n The termination process\n </h3>\n\n <ul\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside',\n )}\n >\n {terminationSteps.map((step, index) => (\n <li\n key={index}\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessListItem',\n )}\n >\n {step}\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"+HAiBI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAdJ,IAAMC,EAAmB,CACvB,uCACA,mIACA,2GACA,4MACA,0DACA,4DACA,oDACA,4DACA,wDACF,EAEaC,EAA+BC,EAAA,IAExCH,EAAAF,EAAA,CACE,UAAAC,EAAC,MAAG,UAAWK,EAAG,kDAAkD,EAAG,qDAEvE,EACAL,EAAC,KACC,UAAWK,EAAG,wDAAwD,EACvE,sKAID,EACAL,EAAC,KACC,UAAWK,EACT,uHACF,EACD,qIAGD,EAEAL,EAACM,EAAA,CACC,UAAWD,EACT,yEACF,EACA,UAAWE,EAAgB,iCAC5B,mDAED,EAEAP,EAAC,MACC,UAAWK,EACT,yDACF,EACD,mCAED,EAEAL,EAAC,MACC,UAAWK,EACT,8EACF,EAEC,SAAAH,EAAiB,IAAI,CAACM,EAAMC,IAC3BT,EAAC,MAEC,UAAWK,EACT,4DACF,EAEC,SAAAG,GALIC,CAMP,CACD,EACH,GACF,EAvDwC","names":["Fragment","jsx","jsxs","terminationSteps","TerminationDialogInfoContent","__name","cn","ZendeskTriggerButton","zendeskArticles","step","index"]}
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-VDRNNOVA.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[{if:{properties:{agrees_to_pto_amount:{const:"no"}},required:["agrees_to_pto_amount"]},then:{properties:{agrees_to_pto_amount_notes:{type:"string"}},required:["agrees_to_pto_amount_notes"]},else:{properties:{agrees_to_pto_amount_notes:!1,timesheet_file:!1}}}],properties:{timeoff_statement:{type:"null",title:"Timeoff statement","x-jsf-presentation":{inputType:"hidden",statement:{title:"Make sure these paid time off records are correct",description:"You must pay the employee for any unused accrued paid time off, so please check these records carefully.",inputType:"statement",severity:"warning"},meta:{ignoreValue:!0}}},paid_time_off_info:{type:"null",title:"Paid time off info","x-jsf-presentation":{inputType:"hidden"},meta:{ignoreValue:!0}},agrees_to_pto_amount:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Are these paid time off records correct?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},agrees_to_pto_amount_notes:{description:"Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.",maxLength:1e3,title:"Provide time off details",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},timesheet_file:{description:"Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.",title:"Timesheet document",type:["string","null"],"x-jsf-presentation":{inputType:"file",accept:e.document,maxSize:20971520}}},required:["agrees_to_pto_amount"],type:"object","x-jsf-order":["timeoff_statement","paid_time_off_info","agrees_to_pto_amount","agrees_to_pto_amount_notes","timesheet_file"]}}};export{i as a};
2
+ //# sourceMappingURL=chunk-XPKVRYIU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/paidTimeOff.ts"],"sourcesContent":["import { FILE_TYPES, MAX_FILE_SIZE } from '@/src/lib/uploadConfig';\n\nexport const paidTimeOffSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n agrees_to_pto_amount: {\n const: 'no',\n },\n },\n required: ['agrees_to_pto_amount'],\n },\n then: {\n properties: {\n agrees_to_pto_amount_notes: {\n type: 'string',\n },\n },\n required: ['agrees_to_pto_amount_notes'],\n },\n else: {\n properties: {\n agrees_to_pto_amount_notes: false,\n timesheet_file: false,\n },\n },\n },\n ],\n properties: {\n timeoff_statement: {\n type: 'null',\n title: 'Timeoff statement',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n statement: {\n title: 'Make sure these paid time off records are correct',\n description:\n 'You must pay the employee for any unused accrued paid time off, so please check these records carefully.',\n inputType: 'statement',\n severity: 'warning',\n },\n meta: {\n ignoreValue: true,\n },\n },\n },\n paid_time_off_info: {\n type: 'null',\n title: 'Paid time off info',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n meta: {\n ignoreValue: true,\n },\n },\n agrees_to_pto_amount: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Are these paid time off records correct?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n agrees_to_pto_amount_notes: {\n description:\n 'Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.',\n maxLength: 1000,\n title: 'Provide time off details',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n timesheet_file: {\n description:\n 'Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.',\n title: 'Timesheet document',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: FILE_TYPES.document,\n maxSize: MAX_FILE_SIZE, // maxFileSize doesn't seem to work for some reason, found that this was fixed in @remoteoss/json-schema-form v1\n },\n },\n },\n required: ['agrees_to_pto_amount'],\n type: 'object',\n 'x-jsf-order': [\n 'timeoff_statement',\n 'paid_time_off_info',\n 'agrees_to_pto_amount',\n 'agrees_to_pto_amount_notes',\n 'timesheet_file',\n ],\n },\n },\n};\n"],"mappings":"wCAEO,IAAMA,EAAoB,CAC/B,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,qBAAsB,CACpB,MAAO,IACT,CACF,EACA,SAAU,CAAC,sBAAsB,CACnC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,CAC1B,KAAM,QACR,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,GAC5B,eAAgB,EAClB,CACF,CACF,CACF,EACA,WAAY,CACV,kBAAmB,CACjB,KAAM,OACN,MAAO,oBACP,qBAAsB,CACpB,UAAW,SACX,UAAW,CACT,MAAO,oDACP,YACE,2GACF,UAAW,YACX,SAAU,SACZ,EACA,KAAM,CACJ,YAAa,EACf,CACF,CACF,EACA,mBAAoB,CAClB,KAAM,OACN,MAAO,qBACP,qBAAsB,CACpB,UAAW,QACb,EACA,KAAM,CACJ,YAAa,EACf,CACF,EACA,qBAAsB,CACpB,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,2CACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,2BAA4B,CAC1B,YACE,sIACF,UAAW,IACX,MAAO,2BACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YACE,4HACF,MAAO,qBACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,OACX,OAAQC,EAAW,SACnB,QAAS,QACX,CACF,CACF,EACA,SAAU,CAAC,sBAAsB,EACjC,KAAM,SACN,cAAe,CACb,oBACA,qBACA,uBACA,6BACA,gBACF,CACF,CACF,CACF","names":["paidTimeOffSchema","FILE_TYPES"]}
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-RDGF4PBB.js";import{a as r}from"./chunk-P5WUODPR.js";import{a as t}from"./chunk-HHWIJGDR.js";import{a as f}from"./chunk-T5LZSTW3.js";import{a as e}from"./chunk-AU6AILO2.js";import{a as p}from"./chunk-KH5SAWNH.js";import{a as n}from"./chunk-6VRUYYUV.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
- //# sourceMappingURL=chunk-3VYNEJMC.js.map
1
+ import{a}from"./chunk-UQOWSJ2B.js";import{a as r}from"./chunk-P5WUODPR.js";import{a as t}from"./chunk-7AC3W7WD.js";import{a as f}from"./chunk-6LJRRFK2.js";import{a as e}from"./chunk-53KVZ4BP.js";import{a as p}from"./chunk-2FKEF3OG.js";import{a as n}from"./chunk-6VRUYYUV.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-Z42H2QEW.js.map
@@ -1,2 +1,2 @@
1
- import{a as X}from"./chunk-IUZ7DEXC.js";import{a as G}from"./chunk-VFRHMNLJ.js";import{a as I,b as z,c as Q,f as W}from"./chunk-RC3XP5WU.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as K}from"./chunk-CFIJKJXD.js";import{c as Y}from"./chunk-QEWB24WT.js";import{a as Z}from"./chunk-2YTBWEC7.js";import{c as V}from"./chunk-PAQW5BFW.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as oe}from"yup";import{createHeadlessForm as Ve,modify as je}from"@remoteoss/json-schema-form";import{useCallback as Re,useEffect as ee,useMemo as Pe,useRef as we,useState as j}from"react";import{string as te,ValidationError as ne}from"yup";import{jsx as re}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>{let{schema:i}=je(G.data.schema,t?.jsfModify||{});return Ve(i)},"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=we({fields:{}}),[k,E]=j(t),[R,P]=j(),[m,q]=j(),[H,se]=j(),{data:_,isLoading:le}=I({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=z(),ue=k||R?.value,{data:w,isLoading:me}=W(ue,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Q(),{mutateAsync:de}=Z(U),b=R?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=Re(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),J=s.showManagementFee,$=s.includeEstimationTitle,fe=Pe(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>re(X,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!J,Component:o(y=>re(Y,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!$}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,J,$,l]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...fe?.fields}}});ee(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&P(e)}},[t,_]),ee(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ge(e){return de(ae(e,s,a))}o(ge,"onSubmit");function ye(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?E(r.regionSlug):E(void 0),P(r)}o(ye,"onCountryChange");function pe(e){E(e)}o(pe,"onRegionChange");function Ce(e){se(e.target.value)}o(Ce,"onHiringBudgetChange");function _e(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(_e,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=R?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=pe,S.schema=e.length>0?te().transform(r=>typeof r=="string"?r:"").required("Region is required"):te()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=_e)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=Ce),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=ye)}let be=o(()=>{P(void 0),E(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...w?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ie(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let u=V(e,D);try{await N.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ne([],e)}}catch(h){let B=K(h);r={formErrors:Object.entries(B).reduce((T,[A,M])=>({...T,[A]:M.message}),{}),yupError:h}}let g=w?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ne(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:h,management:B,estimation_title:T,...A}=e,M=e.salary;y==="salary_conversion"&&(M=h);let he=V({country:r,region:u,salary:M,salary_converted:y,salary_conversion:h,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ee=V(A,w?.fields||[]),Fe={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Ee,...Fe}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:le&&ce&&me,onSubmit:ge,resetForm:be,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function ie(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=oe({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return oe(s)}o(ie,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function ae(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(ae,"buildPayload");export{ie as a,ae as b,O as c,Qe as d};
2
- //# sourceMappingURL=chunk-HCZWP44I.js.map
1
+ import{a as X}from"./chunk-UFBTCHEI.js";import{a as G}from"./chunk-VFRHMNLJ.js";import{a as I,b as z,c as Q,f as W}from"./chunk-RC3XP5WU.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as K}from"./chunk-CFIJKJXD.js";import{c as Y}from"./chunk-DB7ITLRX.js";import{a as Z}from"./chunk-2YTBWEC7.js";import{c as V}from"./chunk-PAQW5BFW.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as oe}from"yup";import{createHeadlessForm as Ve,modify as je}from"@remoteoss/json-schema-form";import{useCallback as Re,useEffect as ee,useMemo as Pe,useRef as we,useState as j}from"react";import{string as te,ValidationError as ne}from"yup";import{jsx as re}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>{let{schema:i}=je(G.data.schema,t?.jsfModify||{});return Ve(i)},"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=we({fields:{}}),[k,E]=j(t),[R,P]=j(),[m,q]=j(),[H,se]=j(),{data:_,isLoading:le}=I({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=z(),ue=k||R?.value,{data:w,isLoading:me}=W(ue,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Q(),{mutateAsync:de}=Z(U),b=R?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=Re(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),J=s.showManagementFee,$=s.includeEstimationTitle,fe=Pe(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>re(X,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!J,Component:o(y=>re(Y,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!$}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,J,$,l]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...fe?.fields}}});ee(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&P(e)}},[t,_]),ee(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ge(e){return de(ae(e,s,a))}o(ge,"onSubmit");function ye(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?E(r.regionSlug):E(void 0),P(r)}o(ye,"onCountryChange");function pe(e){E(e)}o(pe,"onRegionChange");function Ce(e){se(e.target.value)}o(Ce,"onHiringBudgetChange");function _e(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(_e,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=R?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=pe,S.schema=e.length>0?te().transform(r=>typeof r=="string"?r:"").required("Region is required"):te()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=_e)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=Ce),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=ye)}let be=o(()=>{P(void 0),E(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...w?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ie(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let u=V(e,D);try{await N.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ne([],e)}}catch(h){let B=K(h);r={formErrors:Object.entries(B).reduce((T,[A,M])=>({...T,[A]:M.message}),{}),yupError:h}}let g=w?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ne(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:h,management:B,estimation_title:T,...A}=e,M=e.salary;y==="salary_conversion"&&(M=h);let he=V({country:r,region:u,salary:M,salary_converted:y,salary_conversion:h,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ee=V(A,w?.fields||[]),Fe={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Ee,...Fe}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:le&&ce&&me,onSubmit:ge,resetForm:be,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function ie(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=oe({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return oe(s)}o(ie,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function ae(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(ae,"buildPayload");export{ie as a,ae as b,O as c,Qe as d};
2
+ //# sourceMappingURL=chunk-ZWZJ4XOY.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-74DRB7Z5.js";import"../../chunk-I3PGODII.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-RNJWBKLA.js";import"../../chunk-QEWB24WT.js";import"../../chunk-BV3PGYSH.js";import"../../chunk-OW5QGJD4.js";import"../../chunk-CYPGWEOO.js";import"../../chunk-KDUM4EZJ.js";import"../../chunk-SGE4DLC3.js";import"../../chunk-2YTBWEC7.js";import"../../chunk-JTOLQCOG.js";import"../../chunk-D6X2WCEG.js";import"../../chunk-HPHWQU34.js";import"../../chunk-MP2T74PU.js";import"../../chunk-PD24XKD6.js";import"../../chunk-TWIUL2P3.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-3O3Q24JL.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-EKKRQI6B.js";import"../../chunk-WVDTHFGS.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-LWGVLLBH.js";import"../../chunk-CNDSIADP.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-MQ6F5LE4.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-43WMZDDH.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
1
+ import{a}from"../../chunk-MGVP76ZI.js";import"../../chunk-6KIQIVKA.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-JO4722R7.js";import"../../chunk-DB7ITLRX.js";import"../../chunk-BV3PGYSH.js";import"../../chunk-OW5QGJD4.js";import"../../chunk-CYPGWEOO.js";import"../../chunk-KDUM4EZJ.js";import"../../chunk-SGE4DLC3.js";import"../../chunk-2YTBWEC7.js";import"../../chunk-JTOLQCOG.js";import"../../chunk-D6X2WCEG.js";import"../../chunk-HPHWQU34.js";import"../../chunk-ANQ4HVVK.js";import"../../chunk-PD24XKD6.js";import"../../chunk-TWIUL2P3.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-3O3Q24JL.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-EKKRQI6B.js";import"../../chunk-WVDTHFGS.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-LWGVLLBH.js";import"../../chunk-CNDSIADP.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-MQ6F5LE4.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-43WMZDDH.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
2
2
  //# sourceMappingURL=ContractAmendmentFlow.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-I3PGODII.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-RNJWBKLA.js";import"../../chunk-QEWB24WT.js";import"../../chunk-BV3PGYSH.js";import"../../chunk-D6X2WCEG.js";import"../../chunk-HPHWQU34.js";import"../../chunk-MP2T74PU.js";import"../../chunk-PD24XKD6.js";import"../../chunk-TWIUL2P3.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-3O3Q24JL.js";import"../../chunk-WVDTHFGS.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-CNDSIADP.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-MQ6F5LE4.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-43WMZDDH.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
1
+ import{a}from"../../chunk-6KIQIVKA.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-JO4722R7.js";import"../../chunk-DB7ITLRX.js";import"../../chunk-BV3PGYSH.js";import"../../chunk-D6X2WCEG.js";import"../../chunk-HPHWQU34.js";import"../../chunk-ANQ4HVVK.js";import"../../chunk-PD24XKD6.js";import"../../chunk-TWIUL2P3.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-3O3Q24JL.js";import"../../chunk-WVDTHFGS.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-CNDSIADP.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-MQ6F5LE4.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-43WMZDDH.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
2
2
  //# sourceMappingURL=ContractAmendmentForm.js.map