@remoteoss/remote-flows 0.13.0 → 0.15.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 (139) hide show
  1. package/dist/{chunk-4OKR4SU7.js → chunk-4R3ITKOA.js} +2 -2
  2. package/dist/{chunk-56JXUCOX.js → chunk-6NKUEDYP.js} +2 -2
  3. package/dist/{chunk-DXABU6DZ.js → chunk-776QJKX5.js} +2 -2
  4. package/dist/{chunk-J4GIUQ4E.js → chunk-C4RJTN2F.js} +2 -2
  5. package/dist/{chunk-QDYQEQ3C.js → chunk-DSTM5RRQ.js} +2 -2
  6. package/dist/{chunk-47VYBPE2.js → chunk-DTGFQMCE.js} +2 -2
  7. package/dist/{chunk-47VYBPE2.js.map → chunk-DTGFQMCE.js.map} +1 -1
  8. package/dist/{chunk-RXVVLN7R.js → chunk-GNXVMZY7.js} +2 -2
  9. package/dist/{chunk-HH6GIAMX.js → chunk-H4KE45NG.js} +2 -2
  10. package/dist/{chunk-OPCY3UYH.js → chunk-HAL2L237.js} +2 -2
  11. package/dist/chunk-HBQDXOAG.js +2 -0
  12. package/dist/{chunk-4XFRZVAL.js.map → chunk-HBQDXOAG.js.map} +1 -1
  13. package/dist/chunk-HQI6W7PR.js +2 -0
  14. package/dist/chunk-HQI6W7PR.js.map +1 -0
  15. package/dist/chunk-HSIQ2OHT.js +2 -0
  16. package/dist/chunk-HSIQ2OHT.js.map +1 -0
  17. package/dist/{chunk-FH3NC6AK.js → chunk-I2A4EFDY.js} +2 -2
  18. package/dist/{chunk-5EDFVFNU.js → chunk-JQDP6SAT.js} +2 -2
  19. package/dist/{chunk-RJRLHA3V.js → chunk-JUGNVM2R.js} +2 -2
  20. package/dist/{chunk-NH4EITYM.js → chunk-KOPJY6WW.js} +2 -2
  21. package/dist/chunk-LBUNJ5J3.js +2 -0
  22. package/dist/chunk-LBUNJ5J3.js.map +1 -0
  23. package/dist/{chunk-UPE5ZMB5.js → chunk-MLB2I27G.js} +2 -2
  24. package/dist/chunk-N5I33LIN.js +2 -0
  25. package/dist/chunk-N5I33LIN.js.map +1 -0
  26. package/dist/{chunk-ARKAW4ZP.js → chunk-O4F6PGGV.js} +2 -2
  27. package/dist/{chunk-LUG32IOD.js → chunk-OC7VOBB4.js} +2 -2
  28. package/dist/chunk-SIUODCGO.js +2 -0
  29. package/dist/chunk-SIUODCGO.js.map +1 -0
  30. package/dist/chunk-V2YORDAL.js +2 -0
  31. package/dist/chunk-V2YORDAL.js.map +1 -0
  32. package/dist/{chunk-NQCSU6FR.js → chunk-ZZOY6KD4.js} +2 -2
  33. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  34. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +1 -1
  35. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  36. package/dist/flows/ContractAmendment/context.d.ts +2 -2
  37. package/dist/flows/ContractAmendment/hooks.d.ts +1 -1
  38. package/dist/flows/ContractAmendment/index.d.ts +1 -1
  39. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  40. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
  41. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +5 -1
  42. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  43. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +1 -1
  44. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +3 -2
  45. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  46. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  47. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  48. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  49. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  50. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  51. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  52. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  53. package/dist/flows/CostCalculator/api.d.ts +1 -1
  54. package/dist/flows/CostCalculator/api.js +1 -1
  55. package/dist/flows/CostCalculator/components/SalaryField.d.ts +3 -2
  56. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  57. package/dist/flows/CostCalculator/context.d.ts +2 -2
  58. package/dist/flows/CostCalculator/hooks.d.ts +1 -1
  59. package/dist/flows/CostCalculator/hooks.js +1 -1
  60. package/dist/flows/CostCalculator/index.d.ts +3 -3
  61. package/dist/flows/CostCalculator/index.js +1 -1
  62. package/dist/flows/CostCalculator/types.d.ts +1 -1
  63. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  64. package/dist/flows/CostCalculator/utils.js +1 -1
  65. package/dist/flows/Onboarding/OnboardingFlow.d.ts +2 -2
  66. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  67. package/dist/flows/Onboarding/api.d.ts +2 -2
  68. package/dist/flows/Onboarding/api.js +1 -1
  69. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +3 -2
  70. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  71. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +1 -1
  72. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  73. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +3 -3
  74. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  75. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +1 -1
  76. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  77. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +3 -3
  78. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  79. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +1 -1
  80. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  81. package/dist/flows/Onboarding/components/ReviewStep.d.ts +1 -1
  82. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +1 -1
  83. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  84. package/dist/flows/Onboarding/context.d.ts +2 -2
  85. package/dist/flows/Onboarding/hooks.d.ts +2 -2
  86. package/dist/flows/Onboarding/hooks.js +1 -1
  87. package/dist/flows/Onboarding/index.d.ts +2 -2
  88. package/dist/flows/Onboarding/index.js +1 -1
  89. package/dist/flows/Onboarding/types.d.ts +1 -1
  90. package/dist/flows/Onboarding/utils.d.ts +1 -1
  91. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
  92. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
  93. package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
  94. package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
  95. package/dist/flows/Termination/TerminationFlow.d.ts +1 -1
  96. package/dist/flows/Termination/TerminationForm.d.ts +1 -1
  97. package/dist/flows/Termination/TimeOff.d.ts +1 -1
  98. package/dist/flows/Termination/context.d.ts +2 -2
  99. package/dist/flows/Termination/hooks.d.ts +1 -1
  100. package/dist/flows/Termination/index.d.ts +1 -1
  101. package/dist/flows/Termination/types.d.ts +1 -1
  102. package/dist/index.css +1 -1
  103. package/dist/index.css.map +1 -1
  104. package/dist/index.d.ts +8 -6
  105. package/dist/index.js +1 -1
  106. package/dist/index.js.map +1 -1
  107. package/dist/internals.d.ts +4 -1
  108. package/dist/internals.js +1 -1
  109. package/dist/internals.js.map +1 -1
  110. package/dist/{remoteFlows-Zmw9pCN3.d.ts → remoteFlows-Clat4nYN.d.ts} +13 -2
  111. package/dist/{types.gen-_c0f1E7h.d.ts → types.gen-C9Y1S1pc.d.ts} +22 -1
  112. package/package.json +2 -2
  113. package/dist/chunk-4XFRZVAL.js +0 -2
  114. package/dist/chunk-5E44DBDD.js +0 -2
  115. package/dist/chunk-5E44DBDD.js.map +0 -1
  116. package/dist/chunk-5JT5MWOK.js +0 -2
  117. package/dist/chunk-5JT5MWOK.js.map +0 -1
  118. package/dist/chunk-DL5PZWF7.js +0 -2
  119. package/dist/chunk-DL5PZWF7.js.map +0 -1
  120. package/dist/chunk-GKT5UHG4.js +0 -2
  121. package/dist/chunk-GKT5UHG4.js.map +0 -1
  122. package/dist/chunk-U4YEXSAO.js +0 -2
  123. package/dist/chunk-U4YEXSAO.js.map +0 -1
  124. /package/dist/{chunk-4OKR4SU7.js.map → chunk-4R3ITKOA.js.map} +0 -0
  125. /package/dist/{chunk-56JXUCOX.js.map → chunk-6NKUEDYP.js.map} +0 -0
  126. /package/dist/{chunk-DXABU6DZ.js.map → chunk-776QJKX5.js.map} +0 -0
  127. /package/dist/{chunk-J4GIUQ4E.js.map → chunk-C4RJTN2F.js.map} +0 -0
  128. /package/dist/{chunk-QDYQEQ3C.js.map → chunk-DSTM5RRQ.js.map} +0 -0
  129. /package/dist/{chunk-RXVVLN7R.js.map → chunk-GNXVMZY7.js.map} +0 -0
  130. /package/dist/{chunk-HH6GIAMX.js.map → chunk-H4KE45NG.js.map} +0 -0
  131. /package/dist/{chunk-OPCY3UYH.js.map → chunk-HAL2L237.js.map} +0 -0
  132. /package/dist/{chunk-FH3NC6AK.js.map → chunk-I2A4EFDY.js.map} +0 -0
  133. /package/dist/{chunk-5EDFVFNU.js.map → chunk-JQDP6SAT.js.map} +0 -0
  134. /package/dist/{chunk-RJRLHA3V.js.map → chunk-JUGNVM2R.js.map} +0 -0
  135. /package/dist/{chunk-NH4EITYM.js.map → chunk-KOPJY6WW.js.map} +0 -0
  136. /package/dist/{chunk-UPE5ZMB5.js.map → chunk-MLB2I27G.js.map} +0 -0
  137. /package/dist/{chunk-ARKAW4ZP.js.map → chunk-O4F6PGGV.js.map} +0 -0
  138. /package/dist/{chunk-LUG32IOD.js.map → chunk-OC7VOBB4.js.map} +0 -0
  139. /package/dist/{chunk-NQCSU6FR.js.map → chunk-ZZOY6KD4.js.map} +0 -0
@@ -1142,6 +1142,27 @@ type TimeoffStatus = 'approved' | 'cancelled' | 'declined' | 'requested' | 'take
1142
1142
  type ForbiddenResponse = {
1143
1143
  message: string;
1144
1144
  };
1145
+ /**
1146
+ * Help Center Article
1147
+ */
1148
+ type HelpCenterArticle = {
1149
+ /**
1150
+ * Body of the article
1151
+ */
1152
+ body: string;
1153
+ /**
1154
+ * HTML URL of the article
1155
+ */
1156
+ html_url: string;
1157
+ /**
1158
+ * Title of the article
1159
+ */
1160
+ title: string;
1161
+ /**
1162
+ * Zendesk ID of the article
1163
+ */
1164
+ zendesk_id: number;
1165
+ };
1145
1166
  /**
1146
1167
  * Complete information of an employment
1147
1168
  */
@@ -1371,4 +1392,4 @@ type PostInviteEmploymentInvitationErrors = {
1371
1392
  };
1372
1393
  type PostInviteEmploymentInvitationError = PostInviteEmploymentInvitationErrors[keyof PostInviteEmploymentInvitationErrors];
1373
1394
 
1374
- export type { CreateContractEligibilityParams as A, CostCalculatorEmployment as B, ContractAmendmentAutomatableResponse as C, MinimalCountry as D, EmploymentShowResponse as E, PostCreateOffboardingError as F, TimeoffStatus as G, Currency as H, ListTimeoffResponse as L, MinimalRegion as M, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, CostCalculatorEstimateResponse as c, CostCalculatorEstimatePdfResponse as d, PostCreateEstimationPdfError as e, CostCalculatorEstimateParams as f, PostCreateEstimationError as g, EmploymentTermType as h, Employment as i, Company as j, PostInviteEmploymentInvitationError as k, PostCreateRiskReserveError as l, EmploymentCreationResponse as m, PostCreateEmployment2Error as n, EmploymentCreateParams as o, EmploymentResponse as p, PatchUpdateEmployment2Error as q, EmploymentFullParams as r, PutUpdateBenefitOfferError as s, MagicLinkResponse as t, UnprocessableEntityResponse as u, MagicLinkParams as v, ConvertCurrencyResponse as w, PostConvertRawCurrencyConverterError as x, ConvertCurrencyParams as y, PostCreateContractEligibilityError as z };
1395
+ export type { CreateContractEligibilityParams as A, CostCalculatorEmployment as B, ContractAmendmentAutomatableResponse as C, MinimalCountry as D, EmploymentShowResponse as E, PostCreateOffboardingError as F, TimeoffStatus as G, Currency as H, HelpCenterArticle as I, ListTimeoffResponse as L, MinimalRegion as M, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, CostCalculatorEstimateResponse as c, CostCalculatorEstimatePdfResponse as d, PostCreateEstimationPdfError as e, CostCalculatorEstimateParams as f, PostCreateEstimationError as g, EmploymentTermType as h, Employment as i, Company as j, PostInviteEmploymentInvitationError as k, PostCreateRiskReserveError as l, EmploymentCreationResponse as m, PostCreateEmployment2Error as n, EmploymentCreateParams as o, EmploymentResponse as p, PatchUpdateEmployment2Error as q, EmploymentFullParams as r, PutUpdateBenefitOfferError as s, MagicLinkResponse as t, UnprocessableEntityResponse as u, MagicLinkParams as v, ConvertCurrencyResponse as w, PostConvertRawCurrencyConverterError as x, ConvertCurrencyParams as y, PostCreateContractEligibilityError as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "scripts": {
5
5
  "build": "NODE_ENV=production tsup",
6
6
  "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run test",
@@ -72,7 +72,7 @@
72
72
  "@radix-ui/react-label": "^2.1.2",
73
73
  "@radix-ui/react-popover": "^1.1.6",
74
74
  "@radix-ui/react-radio-group": "^1.2.3",
75
- "@radix-ui/react-scroll-area": "^1.2.3",
75
+ "@radix-ui/react-scroll-area": "^1.2.10",
76
76
  "@radix-ui/react-select": "^2.1.6",
77
77
  "@radix-ui/react-separator": "^1.1.2",
78
78
  "@radix-ui/react-slot": "^1.1.2",
@@ -1,2 +0,0 @@
1
- import{b}from"./chunk-PGWKJ6FK.js";import{b as p}from"./chunk-CFIJKJXD.js";import{a as u}from"./chunk-LK4XMOCE.js";import{b as y}from"./chunk-QW4JPW6J.js";import{f,g as F}from"./chunk-3BREUYLG.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as d}from"react/jsx-runtime";function N({defaultValues:l,onSubmit:g,components:E}){let{formId:w,onboardingBag:o}=b(),h=p(o.handleValidation),r=f({resolver:h,defaultValues:l,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==l[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let k=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:c}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let B=o.stepState.currentStep.name,P=o.meta?.fields?.[B],O=y(n?.fieldErrors||[],P);c?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){c?.({error:a,rawError:a,fieldErrors:[]})}}else g(t)},"handleSubmit");return d(F,{...r,children:d("form",{id:w,onSubmit:r.handleSubmit(k),className:"space-y-4 RemoteFlows__OnboardingForm",children:d(u,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})})})}m(N,"OnboardingForm");export{N as a};
2
- //# sourceMappingURL=chunk-4XFRZVAL.js.map
@@ -1,2 +0,0 @@
1
- import{g as l,k as u,p as c,t as m,y as d}from"./chunk-EGQJ7UBR.js";import{d as s}from"./chunk-3ZWDIEEM.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as C,useQuery as a}from"@tanstack/react-query";import{createHeadlessForm as y,modify as g}from"@remoteoss/json-schema-form";var b=e(({includePremiumBenefits:t})=>{let{client:i}=s();return a({queryKey:["cost-calculator-countries",t],queryFn:e(()=>c({client:i,query:{include_premium_benefits:t}}),"queryFn"),select:e(n=>n.data?.data.map(o=>({value:o.region_slug,label:o.name,childRegions:o.child_regions,hasAdditionalFields:o.has_additional_fields,regionSlug:o.region_slug,currency:o.currency.code})),"select")})},"useCostCalculatorCountries"),x=e(()=>{let{client:t}=s();return a({queryKey:["company-currencies"],queryFn:e(()=>d({client:t}),"queryFn"),select:e(i=>i.data?.data?.company_currencies.map(n=>({value:n.slug,label:n.code})),"select")})},"useCompanyCurrencies"),P=e(()=>{let{client:t}=s();return C({mutationFn:e(i=>l({client:t,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),M=e(()=>{let{client:t}=s();return C({mutationFn:e(i=>u({client:t,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),S=e((t,{includePremiumBenefits:i,options:n})=>{let{client:o}=s();return a({queryKey:["cost-calculator-region-fields",t,i],queryFn:e(()=>m({client:o,path:{slug:t},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!t,select:e(({data:f})=>{let r=f?.data?.schema||{};if(n&&n.jsfModify){let{schema:p}=g(r,n.jsfModify);r=p}return y(r)},"select")})},"useRegionFields");export{b as a,x as b,P as c,M as d,S as e};
2
- //# sourceMappingURL=chunk-5E44DBDD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/api.ts"],"sourcesContent":["import {\n CostCalculatorEstimateParams,\n getIndexCompanyCurrency,\n getIndexCountry,\n getShowRegionField,\n postCreateEstimation,\n postCreateEstimationPdf,\n} from '@/src/client';\nimport { Client } from '@hey-api/client-fetch';\nimport { useClient } from '@/src/context';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { CostCalculatorEstimationOptions } from '@/src/flows/CostCalculator/types';\nimport { JSFModify } from '@/src/flows/types';\nimport { createHeadlessForm, modify } from '@remoteoss/json-schema-form';\n\n/**\n * Hook to fetch the countries for the cost calculator.\n * @returns\n */\nexport const useCostCalculatorCountries = ({\n includePremiumBenefits,\n}: {\n includePremiumBenefits: CostCalculatorEstimationOptions['includePremiumBenefits'];\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['cost-calculator-countries', includePremiumBenefits],\n queryFn: () => {\n return getIndexCountry({\n client: client as Client,\n query: {\n include_premium_benefits: includePremiumBenefits,\n },\n });\n },\n select: (data) =>\n data.data?.data.map((country) => ({\n value: country.region_slug,\n label: country.name,\n childRegions: country.child_regions,\n hasAdditionalFields: country.has_additional_fields,\n regionSlug: country.region_slug,\n currency: country.currency.code,\n })),\n });\n};\n\n/**\n * Hook to fetch the company currencies.\n * @returns\n */\nexport const useCompanyCurrencies = () => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['company-currencies'],\n queryFn: () => {\n return getIndexCompanyCurrency({\n client: client as Client,\n });\n },\n select: (data) =>\n data.data?.data?.company_currencies.map((currency) => ({\n value: currency.slug,\n label: currency.code,\n })),\n });\n};\n\n/**\n * Hook to create an estimation.\n * @returns\n */\nexport const useCostCalculatorEstimation = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimation({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Custom hook to create a PDF estimation.\n *\n * @returns\n */\nexport const useCostCalculatorEstimationPdf = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimationPdf({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Hook to fetch the region fields.\n * @param region\n * @returns\n */\nexport const useRegionFields = (\n region: string | undefined,\n {\n includePremiumBenefits,\n options,\n }: {\n includePremiumBenefits: CostCalculatorEstimationOptions['includePremiumBenefits'];\n options?: {\n jsfModify?: JSFModify;\n };\n },\n) => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['cost-calculator-region-fields', region, includePremiumBenefits],\n queryFn: () => {\n return getShowRegionField({\n client: client as Client,\n path: { slug: region as string },\n query: {\n include_premium_benefits: includePremiumBenefits,\n },\n });\n },\n enabled: !!region,\n select: ({ data }) => {\n let jsfSchema = data?.data?.schema || {};\n if (options && options.jsfModify) {\n const { schema } = modify(jsfSchema, options.jsfModify);\n jsfSchema = schema;\n }\n return createHeadlessForm(jsfSchema);\n },\n });\n};\n"],"mappings":"oJAUA,OAAS,eAAAA,EAAa,YAAAC,MAAgB,wBAGtC,OAAS,sBAAAC,EAAoB,UAAAC,MAAc,8BAMpC,IAAMC,EAA6BC,EAAA,CAAC,CACzC,uBAAAC,CACF,IAEM,CACJ,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,4BAA6BH,CAAsB,EAC9D,QAASD,EAAA,IACAK,EAAgB,CACrB,OAAQH,EACR,MAAO,CACL,yBAA0BD,CAC5B,CACF,CAAC,EANM,WAQT,OAAQD,EAACM,GACPA,EAAK,MAAM,KAAK,IAAKC,IAAa,CAChC,MAAOA,EAAQ,YACf,MAAOA,EAAQ,KACf,aAAcA,EAAQ,cACtB,oBAAqBA,EAAQ,sBAC7B,WAAYA,EAAQ,YACpB,SAAUA,EAAQ,SAAS,IAC7B,EAAE,EARI,SASV,CAAC,CACH,EA1B0C,8BAgC7BC,EAAuBR,EAAA,IAAM,CACxC,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,oBAAoB,EAC/B,QAASJ,EAAA,IACAS,EAAwB,CAC7B,OAAQP,CACV,CAAC,EAHM,WAKT,OAAQF,EAACM,GACPA,EAAK,MAAM,MAAM,mBAAmB,IAAKI,IAAc,CACrD,MAAOA,EAAS,KAChB,MAAOA,EAAS,IAClB,EAAE,EAJI,SAKV,CAAC,CACH,EAhBoC,wBAsBvBC,EAA8BX,EAAA,IAAM,CAC/C,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAE7B,OAAOS,EAAY,CACjB,WAAYZ,EAACa,GACJC,EAAqB,CAC1B,OAAQZ,EACR,KAAMW,CACR,CAAC,EAJS,aAMd,CAAC,CACH,EAX2C,+BAkB9BE,EAAiCf,EAAA,IAAM,CAClD,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAE7B,OAAOS,EAAY,CACjB,WAAYZ,EAACa,GACJG,EAAwB,CAC7B,OAAQd,EACR,KAAMW,CACR,CAAC,EAJS,aAMd,CAAC,CACH,EAX8C,kCAkBjCI,EAAkBjB,EAAA,CAC7BkB,EACA,CACE,uBAAAjB,EACA,QAAAkB,CACF,IAMG,CACH,GAAM,CAAE,OAAAjB,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,gCAAiCc,EAAQjB,CAAsB,EAC1E,QAASD,EAAA,IACAoB,EAAmB,CACxB,OAAQlB,EACR,KAAM,CAAE,KAAMgB,CAAiB,EAC/B,MAAO,CACL,yBAA0BjB,CAC5B,CACF,CAAC,EAPM,WAST,QAAS,CAAC,CAACiB,EACX,OAAQlB,EAAA,CAAC,CAAE,KAAAM,CAAK,IAAM,CACpB,IAAIe,EAAYf,GAAM,MAAM,QAAU,CAAC,EACvC,GAAIa,GAAWA,EAAQ,UAAW,CAChC,GAAM,CAAE,OAAAG,CAAO,EAAIC,EAAOF,EAAWF,EAAQ,SAAS,EACtDE,EAAYC,CACd,CACA,OAAOE,EAAmBH,CAAS,CACrC,EAPQ,SAQV,CAAC,CACH,EAnC+B","names":["useMutation","useQuery","createHeadlessForm","modify","useCostCalculatorCountries","__name","includePremiumBenefits","client","useClient","useQuery","getIndexCountry","data","country","useCompanyCurrencies","getIndexCompanyCurrency","currency","useCostCalculatorEstimation","useMutation","payload","postCreateEstimation","useCostCalculatorEstimationPdf","postCreateEstimationPdf","useRegionFields","region","options","getShowRegionField","jsfSchema","schema","modify","createHeadlessForm"]}
@@ -1,2 +0,0 @@
1
- import{c as f,d}from"./chunk-LUG32IOD.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as i}from"./chunk-KSHK3ZPX.js";import{b as g}from"./chunk-CFIJKJXD.js";import{f as m}from"./chunk-3BREUYLG.js";import{a as c}from"./chunk-P37U34EQ.js";import{useEffect as P,useId as _,useState as h}from"react";import{jsx as M}from"react/jsx-runtime";var y=c((r,e,t)=>t&&t[e]?t[e]:r[e]?r[e]/100:0,"getDefaultManagementFee"),T=c(({estimationOptions:r=f,defaultValues:e={countryRegionSlug:"",currencySlug:"",salary:""},options:t,render:S,version:p="standard"})=>{let F=_(),[R,C]=h("USD"),v=c(l=>{C(l);let o=y(u,l,r.managementFees);o&&a.setValue("management.management_fee",o)},"onCurrencyChange"),n=d({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:r,version:p,options:{...t,onCurrencyChange:v}}),K=g(n.handleValidation),E=e.currencySlug?"":y(u,R,r.managementFees),a=m({resolver:K,defaultValues:{country:e?.countryRegionSlug,currency:e?.currencySlug,region:"",salary:e?.salary,salary_conversion:"",salary_converted:"",management:{management_fee:E}},shouldUnregister:!1,mode:"onBlur"});return P(()=>{if(e.currencySlug&&n.currencies&&r.includeManagementFee){let o=n.currencies.find(s=>s.value===e.currencySlug)?.label;if(o){C(o);let s=y(u,o,r.managementFees);a.setValue("management.management_fee",s)}}},[e.currencySlug,n.currencies,r.includeManagementFee,r.managementFees,a]),M(i.Provider,{value:{form:a,formId:F,costCalculatorBag:n},children:S(n)})},"CostCalculatorFlow");export{T as a};
2
- //# sourceMappingURL=chunk-5JT5MWOK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/CostCalculatorFlow.tsx"],"sourcesContent":["import React, { useEffect, useId, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useJsonSchemasValidationFormResolver } from '@/src/components/form/yupValidationResolver';\nimport { CostCalculatorContext } from '@/src/flows/CostCalculator/context';\nimport {\n CostCalculatorVersion,\n defaultEstimationOptions,\n useCostCalculator,\n} from '@/src/flows/CostCalculator/hooks';\nimport {\n CostCalculatorEstimationOptions,\n CurrencyKey,\n UseCostCalculatorOptions,\n} from '@/src/flows/CostCalculator/types';\nimport { BASE_RATES } from '@/src/flows/CostCalculator/constants';\n\nexport type CostCalculatorFlowProps = {\n /**\n * Estimation params allows you to customize the parameters sent to the /cost-calculator/estimation endpoint.\n */\n estimationOptions?: CostCalculatorEstimationOptions;\n /**\n * Default values for the form fields.\n */\n defaultValues?: Partial<{\n /**\n * Default value for the country field.\n */\n countryRegionSlug: string;\n /**\n * Default value for the currency field.\n */\n currencySlug: string;\n /**\n * Default value for the salary field.\n */\n salary: string;\n }>;\n options?: UseCostCalculatorOptions;\n render: (\n costCalculatorBag: ReturnType<typeof useCostCalculator>,\n ) => React.ReactNode;\n /**\n * Whether to include annual_gross_salary in the estimation payload\n */\n version?: CostCalculatorVersion;\n};\n\nconst getDefaultManagementFee = (\n baseRates: Record<CurrencyKey, number>,\n currency: CurrencyKey,\n managementFees?: Partial<Record<CurrencyKey, number>>,\n) => {\n if (managementFees && managementFees[currency]) {\n return managementFees[currency];\n }\n if (baseRates[currency]) {\n return baseRates[currency] / 100;\n }\n return 0;\n};\n\nexport const CostCalculatorFlow = ({\n estimationOptions = defaultEstimationOptions,\n defaultValues = {\n countryRegionSlug: '',\n currencySlug: '',\n salary: '',\n },\n options,\n render,\n version = 'standard',\n}: CostCalculatorFlowProps) => {\n const formId = useId();\n const [currency, setCurrency] = useState<CurrencyKey>('USD');\n const onCurrencyChange = (currency: string) => {\n setCurrency(currency as CurrencyKey);\n const managementFee = getDefaultManagementFee(\n BASE_RATES,\n currency as CurrencyKey,\n estimationOptions.managementFees,\n );\n if (managementFee) {\n form.setValue('management.management_fee', managementFee);\n }\n };\n const costCalculatorBag = useCostCalculator({\n defaultRegion: defaultValues.countryRegionSlug,\n defaultCurrency: defaultValues.currencySlug,\n defaultSalary: defaultValues.salary,\n estimationOptions,\n version,\n options: {\n ...options,\n onCurrencyChange: onCurrencyChange,\n },\n });\n const resolver = useJsonSchemasValidationFormResolver(\n // @ts-expect-error no matching type\n costCalculatorBag.handleValidation,\n );\n\n const defaultManagementFee = defaultValues.currencySlug\n ? ''\n : getDefaultManagementFee(\n BASE_RATES,\n currency,\n estimationOptions.managementFees,\n );\n\n const form = useForm({\n resolver,\n defaultValues: {\n country: defaultValues?.countryRegionSlug,\n currency: defaultValues?.currencySlug,\n region: '',\n salary: defaultValues?.salary,\n salary_conversion: '',\n salary_converted: '',\n management: {\n management_fee: defaultManagementFee,\n },\n },\n shouldUnregister: false,\n mode: 'onBlur',\n });\n\n useEffect(() => {\n if (\n defaultValues.currencySlug &&\n costCalculatorBag.currencies &&\n estimationOptions.includeManagementFee\n ) {\n const currencyData = costCalculatorBag.currencies.find(\n (currency) => currency.value === defaultValues.currencySlug,\n );\n const currencyCode = currencyData?.label;\n if (currencyCode) {\n setCurrency(currencyCode as CurrencyKey);\n const defaultManagementFee = getDefaultManagementFee(\n BASE_RATES,\n currencyCode as CurrencyKey,\n estimationOptions.managementFees,\n );\n form.setValue('management.management_fee', defaultManagementFee);\n }\n }\n }, [\n defaultValues.currencySlug,\n costCalculatorBag.currencies,\n estimationOptions.includeManagementFee,\n estimationOptions.managementFees,\n form,\n ]);\n\n return (\n <CostCalculatorContext.Provider\n value={{\n form,\n formId: formId,\n costCalculatorBag,\n }}\n >\n {render(costCalculatorBag)}\n </CostCalculatorContext.Provider>\n );\n};\n"],"mappings":"kPAAA,OAAgB,aAAAA,EAAW,SAAAC,EAAO,YAAAC,MAAgB,QA4J9C,cAAAC,MAAA,oBA5GJ,IAAMC,EAA0BC,EAAA,CAC9BC,EACAC,EACAC,IAEIA,GAAkBA,EAAeD,CAAQ,EACpCC,EAAeD,CAAQ,EAE5BD,EAAUC,CAAQ,EACbD,EAAUC,CAAQ,EAAI,IAExB,EAXuB,2BAcnBE,EAAqBJ,EAAA,CAAC,CACjC,kBAAAK,EAAoBC,EACpB,cAAAC,EAAgB,CACd,kBAAmB,GACnB,aAAc,GACd,OAAQ,EACV,EACA,QAAAC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AAQ,CACF,EAEC,SAAAV,EAAOU,CAAiB,EAC3B,CAEJ,EAxGkC","names":["useEffect","useId","useState","jsx","getDefaultManagementFee","__name","baseRates","currency","managementFees","CostCalculatorFlow","estimationOptions","defaultEstimationOptions","defaultValues","options","render","version","formId","useId","setCurrency","useState","onCurrencyChange","managementFee","BASE_RATES","form","costCalculatorBag","useCostCalculator","resolver","useJsonSchemasValidationFormResolver","defaultManagementFee","useForm","useEffect","currencyCode","CostCalculatorContext"]}
@@ -1,2 +0,0 @@
1
- import{a as t}from"./chunk-DYB3RWP7.js";import{a as u,b as v,c as S,d as w,e as D,f as A,g as h}from"./chunk-ANXYPRBG.js";import{b as m}from"./chunk-7VUILYZ3.js";import{a as n}from"./chunk-3LOVCTCN.js";import{a as f}from"./chunk-P37U34EQ.js";import*as p from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as l,jsxs as P}from"react/jsx-runtime";var d=p.forwardRef(({className:o,children:a,...c},s)=>P(r.Root,{ref:s,className:n("relative overflow-hidden",o),...c,children:[l(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:a}),l(b,{}),l(r.Corner,{})]}));d.displayName=r.Root.displayName;var b=p.forwardRef(({className:o,orientation:a="vertical",...c},s)=>l(r.ScrollAreaScrollbar,{ref:s,orientation:a,className:n("flex touch-none select-none transition-colors",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...c,children:l(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));b.displayName=r.ScrollAreaScrollbar.displayName;import{X as C}from"lucide-react";import{jsx as e,jsxs as i}from"react/jsx-runtime";var B=f(({label:o="Disclaimer"})=>i(u,{children:[e(v,{asChild:!0,children:e(m,{variant:"link",size:"link",children:o})}),i(w,{children:[i(D,{children:[i(S,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e(C,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Close"})]}),e(A,{children:t?.data.title}),i(h,{children:["For more details read our"," ",e(m,{variant:"link",size:"link",asChild:!0,children:e("a",{href:t?.data.html_url,target:"_blank",rel:"noopener noreferrer",children:"Disclaimer"})})]})]}),e(d,{className:"px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area",children:e("div",{className:"cost-calculator-disclaimer-drawer-body",dangerouslySetInnerHTML:{__html:t?.data.body??""}})})]})]}),"CostCalculatorDisclaimer");export{B as a};
2
- //# sourceMappingURL=chunk-DL5PZWF7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/ui/scroll-area.tsx","../src/flows/CostCalculator/CostCalculatorDisclaimer.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\n\nimport { cn } from '@/src/lib/utils';\n\nconst ScrollArea = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className='h-full w-full rounded-[inherit]'>\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none transition-colors',\n orientation === 'vertical' &&\n 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' &&\n 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className='relative flex-1 rounded-full bg-border' />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n","import {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from '@/src/components/ui/drawer';\nimport { ScrollArea } from '@/src/components/ui/scroll-area';\nimport { X } from 'lucide-react';\nimport { Button } from '@/src/components/ui/button';\nimport { disclaimerData } from '@/src/flows/CostCalculator/disclaimerUtils';\n\ntype CostCalculatorDisclaimerProps = {\n label?: string;\n};\n\nexport const CostCalculatorDisclaimer = ({\n label = 'Disclaimer',\n}: CostCalculatorDisclaimerProps) => {\n return (\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant='link' size='link'>\n {label}\n </Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerClose className='absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none'>\n <X className='h-4 w-4' />\n <span className='sr-only'>Close</span>\n </DrawerClose>\n <DrawerTitle>{disclaimerData?.data.title}</DrawerTitle>\n <DrawerDescription>\n For more details read our{' '}\n <Button variant='link' size='link' asChild>\n <a\n href={disclaimerData?.data.html_url}\n target='_blank'\n rel='noopener noreferrer'\n >\n Disclaimer\n </a>\n </Button>\n </DrawerDescription>\n </DrawerHeader>\n <ScrollArea className='px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area'>\n <div\n className='cost-calculator-disclaimer-drawer-body'\n dangerouslySetInnerHTML={{\n __html: disclaimerData?.data.body ?? '',\n }}\n ></div>\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,EAACa,EAAA,CAAkB,sCACS,IAC1Bd,EAACO,EAAA,CAAO,QAAQ,OAAO,KAAK,OAAO,QAAO,GACxC,SAAAP,EAAC,KACC,KAAMa,GAAgB,KAAK,SAC3B,OAAO,SACP,IAAI,sBACL,sBAED,EACF,GACF,GACF,EACAb,EAACe,EAAA,CAAW,UAAU,mGACpB,SAAAf,EAAC,OACC,UAAU,yCACV,wBAAyB,CACvB,OAAQa,GAAgB,KAAK,MAAQ,EACvC,EACD,EACH,GACF,GACF,EAvCoC","names":["React","ScrollAreaPrimitive","jsx","jsxs","ScrollArea","className","children","props","ref","cn","ScrollBar","orientation","X","jsx","jsxs","CostCalculatorDisclaimer","__name","label","Drawer","DrawerTrigger","Button","DrawerContent","DrawerHeader","DrawerClose","X","DrawerTitle","disclaimerData","DrawerDescription","ScrollArea"]}
@@ -1,2 +0,0 @@
1
- import{a as w,b as R,c as x,d as A}from"./chunk-4RULC3AZ.js";import{a as C}from"./chunk-ZE3YT3Q6.js";import{a as f}from"./chunk-NBCZF2FO.js";import{a as F}from"./chunk-UHS3QRA3.js";import{a as b}from"./chunk-U4YEXSAO.js";import{b as k}from"./chunk-7VUILYZ3.js";import{a as c,b as n}from"./chunk-3LOVCTCN.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as D}from"lucide-react";import{useState as H}from"react";import{Fragment as M,jsx as y,jsxs as T}from"react/jsx-runtime";function B({actions:e=[],className:s}){let[a,l]=H(!1);return T("div",{className:c("relative",s),children:[y(k,{variant:"ghost",className:"h-8 w-8 p-0",onClick:()=>l(!a),children:y(D,{className:"h-4 w-4"})}),a&&T(M,{children:[y("div",{className:"fixed inset-0 z-40",onClick:()=>l(!1)}),y("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((i,_)=>y("button",{className:c("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",i.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{i.onClick(),l(!1)},disabled:i.disabled,children:i.label},_))})]})]})}m(B,"ActionsDropdown");import{ChevronDown as I,Info as S}from"lucide-react";import P from"react-flagpack";import{useState as O}from"react";import{Fragment as p,jsx as o,jsxs as t}from"react/jsx-runtime";var U=m(({title:e,country:s,region:a,onDelete:l,onExportPdf:i})=>{let _=[{label:"Edit",onClick:m(()=>{},"onClick"),disabled:!0},{label:"Export",onClick:i},{label:"Delete",onClick:l}];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-12 w-12 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(P,{code:s.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{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:[s.name," ",a?` (${a.name})`:""]})]})]}),o(B,{className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:_})]})},"EstimationResultsHeader"),j=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept our Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrolment.",zendeskArticleId:f.employeeOnboardingTimeline}),"getOnboardingTimelineData");function G({minimumOnboardingDays:e,data:s,className:a}){return o(w,{type:"single",collapsible:!0,className:c("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(R,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(x,{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"}),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:s.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[s.helpText,s.zendeskArticleId&&o(b,{zendeskId:s.zendeskArticleId,children:"Learn more"})]})]})]})})}m(G,"OnboardingTimeline");function Z({className:e,countryBenefitsUrl:s,countryGuideUrl:a,country:l}){return o(w,{type:"single",collapsible:!0,className:c("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(R,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(x,{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 ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),o("a",{href:s,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Z,"HiringSection");function $({isMultipleCurrency:e,className:s}){return t("div",{className:c("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",s),children:[o("span",{"aria-hidden":!0}),e?t(p,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(p,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m($,"EstimationHeaders");function E({label:e,amounts:s,className:a,children:l}){let[i,_]=O(!0);return t("div",{className:c("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"grid grid-cols-3 items-center",children:[t("div",{className:"flex items-center gap-2",children:[o("span",{className:c("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>_(!i),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(I,{className:`h-4 w-4 text-muted-foreground transition-transform ${i?"rotate-180":""}`})})]}),Array.isArray(s)?s.map((u,g)=>o("span",{className:c("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:u},g)):t(p,{children:[o("span",{}),o("span",{className:c("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:s})]})]}),i&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(E,"EstimationRow");function V({item:e,isMultipleCurrency:s,level:a=0}){let[l,i]=O(!1),_=e.children&&e.children.length>0,u=a>0;return t("li",{className:c("RemoteFlows__BreakdownList__Item pb-3",u&&"pb-1"),children:[t("div",{className:c(s?"grid grid-cols-3 items-center justify-between":"grid grid-cols-2 items-center justify-between"),children:[t("div",{className:c("flex items-center gap-2",u&&"pl-3"),children:[!u&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),o("span",{className:c(u?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),e.tooltip&&o(C,{content:t(p,{children:[o("span",{children:e.tooltip})," ",e.zendeskId&&o(b,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:c("text-muted-foreground",u?"h-3 w-3":"h-4 w-4")})})}),(e.isCollapsible||_)&&o("button",{onClick:()=>i(!l),className:"RemoteFlows__BreakdownList__CollapsibleButton p-1 hover:bg-gray-100 rounded",children:o(I,{className:`h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})})]}),s?t(p,{children:[o("span",{className:c("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",u?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{className:c("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",u?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{className:c("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",u?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),_&&l&&o("div",{className:"mt-1",children:o(N,{items:e.children,isMultipleCurrency:s,level:a+1})})]})}m(V,"BreakdownListItem");function N({items:e,isMultipleCurrency:s,className:a,level:l}){return o("ul",{className:c("RemoteFlows__BreakdownList list-none",a),children:e.map((i,_)=>o(V,{item:i,isMultipleCurrency:s,level:l},_))})}m(N,"BreakdownList");var me=m(({estimation:e,title:s,components:a,onDelete:l,onExportPdf:i})=>{let _=a?.HiringSection||Z,u=a?.OnboardingTimeline||G,g=a?.Header||U,h=a?.Footer,L=j(),d=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,z=e.region.code!==e.country.code;return t(F,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(g,{title:s,region:z?e.region:void 0,country:e.country,onDelete:l,onExportPdf:i})}),t("div",{className:"RemoteFlows__Separator",children:[o($,{isMultipleCurrency:d,className:"mb-3"}),o(E,{label:"Monthly total cost",amounts:d?[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(N,{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:f.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(r=>({label:r.name,regionalAmount:n(r.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(r.amount,e.employer_currency_costs.currency.symbol),zendeskId:r.zendesk_article_id||void 0,tooltip:r.description||void 0}))||[]},{label:"Core 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(r=>({label:r.name,regionalAmount:n(r.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(r.amount,e.employer_currency_costs.currency.symbol),zendeskId:r.zendesk_article_id||void 0,tooltip:r.description||void 0}))||[]},...v?[{label:"Management 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:d})})]}),o("div",{className:"RemoteFlows__Separator",children:o(E,{label:"Annual total cost",amounts:d?[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(N,{items:[{label:"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(r=>({label:r.name,regionalAmount:n(r.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(r.amount,e.employer_currency_costs.currency.symbol),zendeskId:r.zendesk_article_id||void 0,tooltip:r.description||void 0}))||[]},{label:"Core 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(r=>({label:r.name,regionalAmount:n(r.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(r.amount,e.employer_currency_costs.currency.symbol),zendeskId:r.zendesk_article_id||void 0,tooltip:r.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(r=>({label:r.name,regionalAmount:n(r.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(r.amount,e.employer_currency_costs.currency.symbol),zendeskId:r.zendesk_article_id||void 0,tooltip:r.description||void 0}))||[]},...v?[{label:"Management 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:d})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:L})}),o(_,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{me as a};
2
- //# sourceMappingURL=chunk-GKT5UHG4.js.map
@@ -1 +0,0 @@
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 className?: string;\n}\n\nexport function ActionsDropdown({\n actions = [],\n className,\n}: ActionsDropdownProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <div className={cn('relative', className)}>\n <Button\n variant='ghost'\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 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 {\n CostCalculatorEmployment,\n MinimalCountry,\n MinimalRegion,\n} 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 } 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';\n\nconst EstimationResultsHeader = ({\n title,\n country,\n region,\n onDelete,\n onExportPdf,\n}: {\n title: string;\n country: MinimalCountry;\n region?: MinimalRegion;\n onDelete: () => void;\n onExportPdf: () => void;\n}) => {\n const actions = [\n {\n label: 'Edit',\n onClick: () => {},\n disabled: true,\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-12 w-12 items-center justify-center rounded-lg bg-[#F4F4F5]'>\n <Flag code={country.alpha_2_code} />\n </div>\n <div className='space-y-1'>\n <h2 className='RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]'>\n {title}\n </h2>\n <p className='RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]'>\n {country.name} {region ? ` (${region.name})` : ''}\n </p>\n </div>\n </div>\n <ActionsDropdown\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 our Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrolment.',\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 <span className='RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4'>\n {minimumOnboardingDays} days\n </span>\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 <a\n href={countryGuideUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our complete guide ↗\n </a>\n <a\n href={countryBenefitsUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our available benefits ↗\n </a>\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='grid grid-cols-3 items-center'>\n <div className='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 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\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 ? 'grid grid-cols-3 items-center justify-between'\n : 'grid grid-cols-2 items-center justify-between',\n )}\n >\n <div className={cn('flex items-center gap-2', isNested && 'pl-3')}>\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 <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\n {item.tooltip && (\n <BasicTooltip\n content={\n <>\n <span>{item.tooltip}</span>{' '}\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 'text-muted-foreground',\n isNested ? 'h-3 w-3' : 'h-4 w-4',\n )}\n />\n </button>\n </BasicTooltip>\n )}\n\n {(item.isCollapsible || hasChildren) && (\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__BreakdownList__CollapsibleButton p-1 hover:bg-gray-100 rounded'\n >\n <ChevronDown\n className={`h-3 w-3 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n )}\n </div>\n\n {isMultipleCurrency ? (\n <>\n <span\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 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 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: CostCalculatorEmployment;\n title: string;\n components?: EstimationResultsComponents;\n onDelete: () => void;\n onExportPdf: () => void;\n};\n\nexport const EstimationResults = ({\n estimation,\n title,\n components,\n onDelete,\n onExportPdf,\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 return (\n <Card className='RemoteFlows__EstimationResults__Card p-10'>\n <div className='RemoteFlows__Separator'>\n <CustomHeader\n title={title}\n region={hasRegion ? estimation.region : undefined}\n country={estimation.country}\n onDelete={onDelete}\n onExportPdf={onExportPdf}\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) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n item.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: 'Core 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) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n item.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: 'Management 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: '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) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n item.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: 'Core 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) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n item.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) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n item.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: 'Management 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":"4VAEA,OAAS,kBAAAA,MAAsB,eAC/B,OAAS,YAAAC,MAAgC,QA4BjC,OAIA,YAAAC,EAJA,OAAAC,EAIA,QAAAC,MAJA,oBAbD,SAASC,EAAgB,CAC9B,QAAAC,EAAU,CAAC,EACX,UAAAC,CACF,EAAyB,CACvB,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAE1C,OACEN,EAAC,OAAI,UAAWO,EAAG,WAAYJ,CAAS,EACtC,UAAAJ,EAACS,EAAA,CACC,QAAQ,QACR,UAAU,cACV,QAAS,IAAMH,EAAU,CAACD,CAAM,EAEhC,SAAAL,EAACU,EAAA,CAAe,UAAU,UAAU,EACtC,EAECL,GACCJ,EAAAF,EAAA,CACE,UAAAC,EAAC,OACC,UAAU,qBAC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BAAwB,SAAS,MAC9C,EACA,QACE,qIACJ,CACF,EACA,CAAC,CACP,EACA,mBAAoBrB,EACtB,EACF,EACF,EACA7B,EAAC,OAAI,UAAU,yBACb,SAAAA,EAACqD,EAAA,CACC,sBAAuBH,EAAW,wBAClC,KAAMM,EACR,EACF,EAEAxD,EAACoD,EAAA,CACC,mBAAoBF,EAAW,6BAC/B,gBAAiBA,EAAW,kBAC5B,QAASA,EAAW,QACtB,EAECK,GAAgBvD,EAACuD,EAAA,EAAa,GACjC,CAEJ,EAzTiC","names":["MoreHorizontal","useState","Fragment","jsx","jsxs","ActionsDropdown","actions","className","isOpen","setIsOpen","useState","cn","Button","MoreHorizontal","action","index","__name","ChevronDown","Info","Flag","useState","Fragment","jsx","jsxs","EstimationResultsHeader","__name","title","country","region","onDelete","onExportPdf","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","BasicTooltip","Info","BreakdownList","items","EstimationResults","estimation","components","CustomHiringSection","CustomOnboardingTimeline","CustomHeader","CustomFooter","onboardingTimelineData","hasManagementFee","hasRegion","Card","formatCurrency"]}
@@ -1,2 +0,0 @@
1
- import{a as g,b as w,d as f,e as k,f as h,g as D}from"./chunk-ANXYPRBG.js";import{f as c}from"./chunk-EGQJ7UBR.js";import{d as m}from"./chunk-3ZWDIEEM.js";import{a as p,e as u}from"./chunk-3LOVCTCN.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as _}from"@tanstack/react-query";var b=e((r,n)=>{let{client:a}=m();return _({queryKey:["zendesk-article",r],queryFn:e(async()=>{let t=await c({client:a,path:{id:Number(r)}});if(t.error)throw new Error(t.error.message||"Failed to fetch article");return t},"queryFn"),select:e(t=>t.data?.data.help_center_article,"select"),retry:!1,...n})},"useZendeskArticle");import{jsx as o,jsxs as i}from"react/jsx-runtime";var y=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL"),C=e(({Trigger:r,zendeskId:n,open:a,onClose:t})=>{let l=y(n),s=e(()=>{t?.()},"handleClose"),{data:d,isLoading:v,error:x}=b(n,{enabled:a});return i(g,{open:a,onOpenChange:T=>!T&&s(),direction:"right",children:[o(w,{asChild:!0,children:r}),o(f,{className:"h-full w-[480px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:i("div",{className:"h-full flex flex-col",children:[i(k,{children:[o(h,{children:d?.title}),i(D,{children:["For more details see our"," ",o("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),v&&o("div",{children:"Loading..."}),x&&o("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),o("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:u(d?.body||"")}})]})})]})},"ZendeskDrawer");import{useState as N}from"react";import{jsx as Z}from"react/jsx-runtime";function K({zendeskId:r,className:n,onClick:a,children:t}){let[l,s]=N(!1);return Z(C,{zendeskId:r,open:l,onClose:()=>s(!1),Trigger:Z("button",{onClick:e(()=>{s(!0),a?.(r)},"handleClick"),className:p("RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0",n),children:t})})}e(K,"ZendeskTriggerButton");export{K as a};
2
- //# sourceMappingURL=chunk-U4YEXSAO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/shared/zendesk-drawer/api.ts","../src/components/shared/zendesk-drawer/ZendeskDrawer.tsx","../src/components/shared/zendesk-drawer/ZendeskTriggerButton.tsx"],"sourcesContent":["import { getShowHelpCenterArticle } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useZendeskArticle = (\n zendeskId: number | null,\n queryOptions?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['zendesk-article', zendeskId],\n queryFn: async () => {\n const response = await getShowHelpCenterArticle({\n client: client as Client,\n path: {\n id: Number(zendeskId),\n },\n });\n\n if (response.error) {\n throw new Error(response.error.message || 'Failed to fetch article');\n }\n\n return response;\n },\n select: (data) => data.data?.data.help_center_article,\n retry: false,\n ...queryOptions,\n });\n};\n","import { useZendeskArticle } from '@/src/components/shared/zendesk-drawer/api';\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerTitle,\n} from '@/src/components/ui/drawer';\nimport { sanitizeHtml } from '@/src/lib/utils';\n\nexport type ZendeskDrawerProps = {\n Trigger: React.ReactNode;\n zendeskId: number;\n open: boolean;\n onClose: () => void;\n};\n\nconst buildZendeskURL = (zendeskId: number) => {\n return `https://support.remote.com/hc/en-us/articles/${zendeskId}`;\n};\n\nexport const ZendeskDrawer = ({\n Trigger,\n zendeskId,\n open,\n onClose,\n}: ZendeskDrawerProps) => {\n const zendeskURL = buildZendeskURL(zendeskId);\n\n const handleClose = () => {\n onClose?.();\n };\n\n const { data, isLoading, error } = useZendeskArticle(zendeskId, {\n enabled: open,\n });\n\n return (\n <Drawer\n open={open}\n onOpenChange={(open) => !open && handleClose()}\n direction='right'\n >\n <DrawerTrigger asChild>{Trigger}</DrawerTrigger>\n <DrawerContent className='h-full w-[480px] mt-0 ml-auto RemoteFlows_ZendeskDrawer'>\n <div className='h-full flex flex-col'>\n <DrawerHeader>\n <DrawerTitle>{data?.title}</DrawerTitle>\n <DrawerDescription>\n For more details see our{' '}\n <a href={zendeskURL} target='_blank' rel='noopener noreferrer'>\n help article\n </a>{' '}\n </DrawerDescription>\n </DrawerHeader>\n {isLoading && <div>Loading...</div>}\n {error && (\n <div className='text-sm p-4 text-red-500'>\n Error loading article\n </div>\n )}\n <div\n className='flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content'\n dangerouslySetInnerHTML={{\n __html: sanitizeHtml(data?.body || ''),\n }}\n ></div>\n </div>\n </DrawerContent>\n </Drawer>\n );\n};\n","import { cn } from '@/src/lib/utils';\nimport { ZendeskDrawer } from './ZendeskDrawer';\nimport { useState } from 'react';\n\ninterface ZendeskTriggerButtonProps {\n zendeskId: number;\n className?: string;\n onClick?: (zendeskId: number) => void;\n children?: React.ReactNode;\n}\n\nexport function ZendeskTriggerButton({\n zendeskId,\n className,\n onClick,\n children,\n}: ZendeskTriggerButtonProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n const handleClick = () => {\n setIsOpen(true);\n onClick?.(zendeskId);\n };\n\n return (\n <ZendeskDrawer\n zendeskId={zendeskId}\n open={isOpen}\n onClose={() => setIsOpen(false)}\n Trigger={\n <button\n onClick={handleClick}\n className={cn(\n 'RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0',\n className,\n )}\n >\n {children}\n </button>\n }\n />\n );\n}\n"],"mappings":"kPAGA,OAAS,YAAAA,MAAgB,wBAElB,IAAMC,EAAoBC,EAAA,CAC/BC,EACAC,IACG,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,kBAAmBJ,CAAS,EACvC,QAASD,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMC,EAAyB,CAC9C,OAAQJ,EACR,KAAM,CACJ,GAAI,OAAOF,CAAS,CACtB,CACF,CAAC,EAED,GAAIK,EAAS,MACX,MAAM,IAAI,MAAMA,EAAS,MAAM,SAAW,yBAAyB,EAGrE,OAAOA,CACT,EAbS,WAcT,OAAQN,EAACQ,GAASA,EAAK,MAAM,KAAK,oBAA1B,UACR,MAAO,GACP,GAAGN,CACL,CAAC,CACH,EAzBiC,qBCuC3B,cAAAO,EAKM,QAAAC,M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AAC,UACC,QAZYU,EAAA,IAAM,CACxBH,EAAU,EAAI,EACdH,IAAUF,CAAS,CACrB,EAHoB,eAaZ,UAAWS,EACT,0IACAR,CACF,EAEC,SAAAE,EACH,EAEJ,CAEJ,CA/BgBK,EAAAT,EAAA","names":["useQuery","useZendeskArticle","__name","zendeskId","queryOptions","client","useClient","useQuery","response","getShowHelpCenterArticle","data","jsx","jsxs","buildZendeskURL","__name","zendeskId","ZendeskDrawer","Trigger","open","onClose","zendeskURL","handleClose","data","isLoading","error","useZendeskArticle","Drawer","DrawerTrigger","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","sanitizeHtml","useState","jsx","ZendeskTriggerButton","zendeskId","className","onClick","children","isOpen","setIsOpen","useState","ZendeskDrawer","__name","cn"]}