@remoteoss/remote-flows 0.1.1 → 0.1.2

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 (147) hide show
  1. package/dist/chunk-2DWTIFOU.js +2 -0
  2. package/dist/chunk-2DWTIFOU.js.map +1 -0
  3. package/dist/chunk-36UPHOJS.js +2 -0
  4. package/dist/chunk-36UPHOJS.js.map +1 -0
  5. package/dist/chunk-37DREOGC.js +2 -0
  6. package/dist/chunk-37DREOGC.js.map +1 -0
  7. package/dist/chunk-5DQBY2TR.js +2 -0
  8. package/dist/chunk-5DQBY2TR.js.map +1 -0
  9. package/dist/{chunk-VV7RML2Q.js → chunk-5O2L2L25.js} +2 -2
  10. package/dist/chunk-5PXYSIYN.js +2 -0
  11. package/dist/chunk-5PXYSIYN.js.map +1 -0
  12. package/dist/chunk-5YDR5BIG.js +2 -0
  13. package/dist/chunk-5YDR5BIG.js.map +1 -0
  14. package/dist/chunk-6DMCAUPE.js +2 -0
  15. package/dist/chunk-6DMCAUPE.js.map +1 -0
  16. package/dist/chunk-6HGUGIYJ.js +2 -0
  17. package/dist/chunk-6HGUGIYJ.js.map +1 -0
  18. package/dist/chunk-A7ZJQCNU.js +1 -0
  19. package/dist/chunk-CKGTR44U.js +2 -0
  20. package/dist/chunk-CKGTR44U.js.map +1 -0
  21. package/dist/chunk-DZYFSFZ7.js +2 -0
  22. package/dist/chunk-DZYFSFZ7.js.map +1 -0
  23. package/dist/chunk-FZ7FWFJX.js +1 -0
  24. package/dist/chunk-FZ7FWFJX.js.map +1 -0
  25. package/dist/chunk-G2GI6FEO.js +2 -0
  26. package/dist/{chunk-5UXOVZY5.js.map → chunk-G2GI6FEO.js.map} +1 -1
  27. package/dist/chunk-HELGRHUB.js +2 -0
  28. package/dist/chunk-HELGRHUB.js.map +1 -0
  29. package/dist/chunk-JRQSZHUU.js +2 -0
  30. package/dist/chunk-JRQSZHUU.js.map +1 -0
  31. package/dist/chunk-JWMY3OVH.js +2 -0
  32. package/dist/chunk-JWMY3OVH.js.map +1 -0
  33. package/dist/chunk-LUCFM5TE.js +2 -0
  34. package/dist/chunk-LUCFM5TE.js.map +1 -0
  35. package/dist/chunk-QWZVBZED.js +2 -0
  36. package/dist/{chunk-Q6GIPVSE.js.map → chunk-QWZVBZED.js.map} +1 -1
  37. package/dist/chunk-RL2KU7BM.js +2 -0
  38. package/dist/chunk-RL2KU7BM.js.map +1 -0
  39. package/dist/chunk-ROPNMSSM.js +2 -0
  40. package/dist/{chunk-YNLDKIE4.js.map → chunk-ROPNMSSM.js.map} +1 -1
  41. package/dist/chunk-TIXDBKBM.js +2 -0
  42. package/dist/chunk-TIXDBKBM.js.map +1 -0
  43. package/dist/chunk-TPKAREI4.js +2 -0
  44. package/dist/chunk-TPKAREI4.js.map +1 -0
  45. package/dist/{chunk-KQCZ2KSO.js → chunk-WTGUGPHV.js} +2 -2
  46. package/dist/{chunk-KQCZ2KSO.js.map → chunk-WTGUGPHV.js.map} +1 -1
  47. package/dist/chunk-XFE56PM4.js +2 -0
  48. package/dist/chunk-XFE56PM4.js.map +1 -0
  49. package/dist/chunk-Y5UG6SJJ.js +2 -0
  50. package/dist/chunk-Y5UG6SJJ.js.map +1 -0
  51. package/dist/chunk-ZCG5JUUR.js +2 -0
  52. package/dist/chunk-ZCG5JUUR.js.map +1 -0
  53. package/dist/flows/ContractAmendment/ContractAmendmentBack.d.ts +5 -0
  54. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +2 -0
  55. package/dist/flows/ContractAmendment/ContractAmendmentBack.js.map +1 -0
  56. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +30 -0
  57. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +2 -0
  58. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js.map +1 -0
  59. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +24 -7
  60. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  61. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +26 -3
  62. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  63. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.d.ts +1 -1
  64. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  65. package/dist/flows/ContractAmendment/context.d.ts +26 -24
  66. package/dist/flows/ContractAmendment/context.js +1 -1
  67. package/dist/flows/ContractAmendment/hooks.d.ts +94 -6
  68. package/dist/flows/ContractAmendment/hooks.js +1 -1
  69. package/dist/flows/ContractAmendment/index.d.ts +8 -5
  70. package/dist/flows/ContractAmendment/index.js +1 -1
  71. package/dist/flows/ContractAmendment/utils.d.ts +11 -0
  72. package/dist/flows/ContractAmendment/utils.js +2 -0
  73. package/dist/flows/ContractAmendment/utils.js.map +1 -0
  74. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +2 -2
  75. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  76. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +1 -1
  77. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  78. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  79. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  80. package/dist/flows/CostCalculator/context.d.ts +1 -1
  81. package/dist/flows/CostCalculator/hooks.d.ts +1 -1
  82. package/dist/flows/CostCalculator/hooks.js +1 -1
  83. package/dist/flows/CostCalculator/index.d.ts +1 -1
  84. package/dist/flows/CostCalculator/index.js +1 -1
  85. package/dist/flows/CostCalculator/types.d.ts +1 -1
  86. package/dist/flows/CostCalculator/utils.d.ts +1 -1
  87. package/dist/flows/CostCalculator/utils.js +1 -1
  88. package/dist/flows/Termination/TerminationFlow.d.ts +20 -0
  89. package/dist/flows/Termination/TerminationFlow.js +2 -0
  90. package/dist/flows/Termination/TerminationFlow.js.map +1 -0
  91. package/dist/flows/Termination/TerminationForm.d.ts +13 -0
  92. package/dist/flows/Termination/TerminationForm.js +2 -0
  93. package/dist/flows/Termination/TerminationForm.js.map +1 -0
  94. package/dist/flows/Termination/TerminationSubmit.d.ts +5 -0
  95. package/dist/flows/Termination/TerminationSubmit.js +2 -0
  96. package/dist/flows/Termination/TerminationSubmit.js.map +1 -0
  97. package/dist/flows/Termination/context.d.ts +43 -0
  98. package/dist/flows/Termination/context.js +2 -0
  99. package/dist/flows/Termination/context.js.map +1 -0
  100. package/dist/flows/Termination/hooks.d.ts +40 -0
  101. package/dist/flows/Termination/hooks.js +2 -0
  102. package/dist/flows/Termination/hooks.js.map +1 -0
  103. package/dist/flows/Termination/index.d.ts +10 -0
  104. package/dist/flows/Termination/index.js +2 -0
  105. package/dist/flows/Termination/index.js.map +1 -0
  106. package/dist/flows/Termination/jsonSchema.d.ts +297 -0
  107. package/dist/flows/Termination/jsonSchema.js +2 -0
  108. package/dist/flows/Termination/jsonSchema.js.map +1 -0
  109. package/dist/flows/Termination/types.d.ts +23 -0
  110. package/dist/flows/Termination/types.js +1 -0
  111. package/dist/flows/Termination/types.js.map +1 -0
  112. package/dist/flows/useStepState.d.ts +49 -0
  113. package/dist/flows/useStepState.js +2 -0
  114. package/dist/flows/useStepState.js.map +1 -0
  115. package/dist/flows/utils.d.ts +20 -1
  116. package/dist/flows/utils.js +1 -1
  117. package/dist/index.css +1 -1
  118. package/dist/index.css.map +1 -1
  119. package/dist/index.d.ts +40 -5
  120. package/dist/index.js +1 -1
  121. package/dist/index.js.map +1 -1
  122. package/dist/mutations-v9H353tz.d.ts +10 -0
  123. package/dist/{types.gen-DCJSPsGk.d.ts → types.gen-BhkGMC9-.d.ts} +1 -1
  124. package/package.json +1 -1
  125. package/dist/chunk-4QHHDFB2.js +0 -2
  126. package/dist/chunk-4QHHDFB2.js.map +0 -1
  127. package/dist/chunk-5UXOVZY5.js +0 -2
  128. package/dist/chunk-ANPGCYMT.js +0 -2
  129. package/dist/chunk-ANPGCYMT.js.map +0 -1
  130. package/dist/chunk-GCF5EF2A.js +0 -2
  131. package/dist/chunk-GCF5EF2A.js.map +0 -1
  132. package/dist/chunk-GKEURJR4.js +0 -2
  133. package/dist/chunk-GKEURJR4.js.map +0 -1
  134. package/dist/chunk-KY7BGW6H.js +0 -2
  135. package/dist/chunk-KY7BGW6H.js.map +0 -1
  136. package/dist/chunk-MKJHD77O.js +0 -1
  137. package/dist/chunk-Q6GIPVSE.js +0 -2
  138. package/dist/chunk-UTCIIPYZ.js +0 -2
  139. package/dist/chunk-UTCIIPYZ.js.map +0 -1
  140. package/dist/chunk-VTAHQOKR.js +0 -2
  141. package/dist/chunk-VTAHQOKR.js.map +0 -1
  142. package/dist/chunk-YGP3O2VJ.js +0 -2
  143. package/dist/chunk-YGP3O2VJ.js.map +0 -1
  144. package/dist/chunk-YNLDKIE4.js +0 -2
  145. package/dist/hooks-BQWrl9Bj.d.ts +0 -50
  146. /package/dist/{chunk-VV7RML2Q.js.map → chunk-5O2L2L25.js.map} +0 -0
  147. /package/dist/{chunk-MKJHD77O.js.map → chunk-A7ZJQCNU.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-5DQBY2TR.js";import{a as c}from"./chunk-JWMY3OVH.js";import{a as e}from"./chunk-37DREOGC.js";import{a as m}from"./chunk-ZCG5JUUR.js";import{a as r}from"./chunk-5YDR5BIG.js";import{a as o}from"./chunk-6HGUGIYJ.js";import{a as n}from"./chunk-AYDF3IFZ.js";import f,{useId as s}from"react";function k({employmentId:d,countryCode:p,options:C,render:i}){let t=c({employmentId:d,countryCode:p,options:C}),A=s();return f.createElement(o.Provider,{value:{formId:A,contractAmendmentBag:t}},i({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}}))}n(k,"ContractAmendmentFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-2DWTIFOU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentFlow.tsx"],"sourcesContent":["import React, { useId } from 'react';\nimport { ContractAmendmentContext } from './context';\nimport { ContractAmendmentBack } from './ContractAmendmentBack';\nimport { ContractAmendmentConfirmationForm } from './ContractAmendmentConfirmationForm';\nimport { ContractAmendmentForm } from './ContractAmendmentForm';\nimport { ContractAmendmentSubmit } from './ContractAmendmentSubmit';\nimport { useContractAmendment } from './hooks';\nimport { ContractAmendmentParams } from './types';\n\ntype TUseContractAmendment = ReturnType<typeof useContractAmendment>;\n\nexport type RenderProps = {\n /**\n * The contract amendment bag returned by the useContractAmendment hook.\n * This bag contains all the methods and properties needed to handle the contract amendment flow.\n * @see {@link useContractAmendment}\n */\n contractAmendmentBag: TUseContractAmendment;\n /**\n * The components used in the contract amendment flow.\n * This includes the form, submit button, and confirmation form.\n * @see {@link ContractAmendmentForm}\n * @see {@link ContractAmendmentSubmit}\n * @see {@link ContractAmendmentConfirmationForm}\n */\n components: {\n Form: typeof ContractAmendmentForm;\n SubmitButton: typeof ContractAmendmentSubmit;\n ConfirmationForm: typeof ContractAmendmentConfirmationForm;\n BackButton: typeof ContractAmendmentBack;\n };\n};\n\ntype ContractAmendmentFlowProps = ContractAmendmentParams & {\n render: ({\n contractAmendmentBag,\n components,\n }: RenderProps) => React.ReactNode;\n};\n\nexport function ContractAmendmentFlow({\n employmentId,\n countryCode,\n options,\n render,\n}: ContractAmendmentFlowProps) {\n const contractAmendmentBag = useContractAmendment({\n employmentId,\n countryCode,\n options,\n });\n const formId = useId();\n\n return (\n <ContractAmendmentContext.Provider\n value={{\n formId: formId,\n contractAmendmentBag,\n }}\n >\n {render({\n contractAmendmentBag,\n components: {\n Form: ContractAmendmentForm,\n SubmitButton: ContractAmendmentSubmit,\n ConfirmationForm: ContractAmendmentConfirmationForm,\n BackButton: ContractAmendmentBack,\n },\n })}\n </ContractAmendmentContext.Provider>\n );\n}\n"],"mappings":"mRAAA,OAAOA,GAAS,SAAAC,MAAa,QAwCtB,SAASC,EAAsB,CACpC,aAAAC,EACA,YAAAC,EACA,QAAAC,EACA,OAAAC,CACF,EAA+B,CAC7B,IAAMC,EAAuBC,EAAqB,CAChD,aAAAL,EACA,YAAAC,EACA,QAAAC,CACF,CAAC,EACKI,EAASC,EAAM,EAErB,OACEC,EAAA,cAACC,EAAyB,SAAzB,CACC,MAAO,CACL,OAAQH,EACR,qBAAAF,CACF,GAECD,EAAO,CACN,qBAAAC,EACA,WAAY,CACV,KAAMM,EACN,aAAcC,EACd,iBAAkBC,EAClB,WAAYC,CACd,CACF,CAAC,CACH,CAEJ,CA/BgBC,EAAAf,EAAA","names":["React","useId","ContractAmendmentFlow","employmentId","countryCode","options","render","contractAmendmentBag","useContractAmendment","formId","useId","React","ContractAmendmentContext","ContractAmendmentForm","ContractAmendmentSubmit","ContractAmendmentConfirmationForm","ContractAmendmentBack","__name"]}
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-AYDF3IFZ.js";import{object as c}from"yup";function d(n){let t=n.reduce((e,r)=>(e[r.name]=r.schema,e),{});return c(t)}o(d,"buildValidationSchema");function u(n,t){return Object.entries(n).reduce((e,[r,a])=>(e[r]=t.includes(r)?a==="yes":a,e),{})}o(u,"parseFormRadioValues");export{d as a,u as b};
2
+ //# sourceMappingURL=chunk-36UPHOJS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/utils.ts"],"sourcesContent":["import { AnyObjectSchema, object } from 'yup';\nimport { Field } from './types';\n\n/**\n * Build the validation schema for the form.\n * @returns\n */\nexport function buildValidationSchema(fields: Field[]) {\n const fieldsSchema = fields.reduce<Record<string, AnyObjectSchema>>(\n (fieldsSchemaAcc, field) => {\n fieldsSchemaAcc[field.name] = field.schema as AnyObjectSchema;\n return fieldsSchemaAcc;\n },\n {},\n );\n return object(fieldsSchema) as AnyObjectSchema;\n}\n\ntype ParsedRadioValues = Record<string, unknown>;\n\n/**\n * Parses the form values to convert radio button values from 'yes'/'no' to boolean.\n *\n * @param values - The form values as a record of key-value pairs.\n * @param fieldKeys - An array of field keys that represent radio button fields.\n * @returns A new object with the parsed values, where radio button fields are converted to boolean.\n *\n * @example\n * const values = {\n * ack: 'yes',\n * confidential: 'no',\n * username: 'john_doe',\n * };\n * const fieldKeys = ['ack', 'confidential'];\n * const parsedValues = parseFormRadioValues(values, fieldKeys);\n * // Output: { ack: true, confidential: false, username: 'john_doe' }\n */\nexport function parseFormRadioValues(\n values: Record<string, unknown>,\n fieldKeys: string[],\n) {\n return Object.entries(values).reduce<ParsedRadioValues>(\n (acc, [key, value]) => {\n acc[key] = fieldKeys.includes(key) ? value === 'yes' : value;\n return acc;\n },\n {},\n );\n}\n"],"mappings":"wCAAA,OAA0B,UAAAA,MAAc,MAOjC,SAASC,EAAsBC,EAAiB,CACrD,IAAMC,EAAeD,EAAO,OAC1B,CAACE,EAAiBC,KAChBD,EAAgBC,EAAM,IAAI,EAAIA,EAAM,OAC7BD,GAET,CAAC,CACH,EACA,OAAOE,EAAOH,CAAY,CAC5B,CATgBI,EAAAN,EAAA,yBA8BT,SAASO,EACdC,EACAC,EACA,CACA,OAAO,OAAO,QAAQD,CAAM,EAAE,OAC5B,CAACE,EAAK,CAACC,EAAKC,CAAK,KACfF,EAAIC,CAAG,EAAIF,EAAU,SAASE,CAAG,EAAIC,IAAU,MAAQA,EAChDF,GAET,CAAC,CACH,CACF,CAXgBJ,EAAAC,EAAA","names":["object","buildValidationSchema","fields","fieldsSchema","fieldsSchemaAcc","field","object","__name","parseFormRadioValues","values","fieldKeys","acc","key","value"]}
@@ -0,0 +1,2 @@
1
+ import{b as n}from"./chunk-FI76EKUS.js";import{b as o}from"./chunk-6HGUGIYJ.js";import{a as t}from"./chunk-AYDF3IFZ.js";import i from"react";function C({children:r,...e}){let{contractAmendment:{back:m}}=o();return i.createElement(n,{...e,onClick:()=>{m()}},r)}t(C,"ContractAmendmentBack");export{C as a};
2
+ //# sourceMappingURL=chunk-37DREOGC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentBack.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useContractAmendmentContext } from './context';\n\nexport function ContractAmendmentBack({\n children,\n ...props\n}: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>) {\n const {\n contractAmendment: { back },\n } = useContractAmendmentContext();\n\n return (\n <Button\n {...props}\n onClick={() => {\n back();\n }}\n >\n {children}\n </Button>\n );\n}\n"],"mappings":"wHACA,OAAOA,MAAwD,QAGxD,SAASC,EAAsB,CACpC,SAAAC,EACA,GAAGC,CACL,EAA+D,CAC7D,GAAM,CACJ,kBAAmB,CAAE,KAAAC,CAAK,CAC5B,EAAIC,EAA4B,EAEhC,OACEC,EAAA,cAACC,EAAA,CACE,GAAGJ,EACJ,QAAS,IAAM,CACbC,EAAK,CACP,GAECF,CACH,CAEJ,CAlBgBM,EAAAP,EAAA","names":["React","ContractAmendmentBack","children","props","back","useContractAmendmentContext","React","Button","__name"]}
@@ -0,0 +1,2 @@
1
+ import{b as o}from"./chunk-FI76EKUS.js";import{b as n}from"./chunk-6HGUGIYJ.js";import{a as t}from"./chunk-AYDF3IFZ.js";import i from"react";function B({children:r,...e}){let{formId:m}=n();return i.createElement(o,{...e,form:m},r)}t(B,"ContractAmendmentSubmit");export{B as a};
2
+ //# sourceMappingURL=chunk-5DQBY2TR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentSubmit.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useContractAmendmentContext } from './context';\n\nexport function ContractAmendmentSubmit({\n children,\n ...props\n}: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>) {\n const { formId } = useContractAmendmentContext();\n\n return (\n <Button {...props} form={formId}>\n {children}\n </Button>\n );\n}\n"],"mappings":"wHACA,OAAOA,MAAwD,QAGxD,SAASC,EAAwB,CACtC,SAAAC,EACA,GAAGC,CACL,EAA+D,CAC7D,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAA4B,EAE/C,OACEC,EAAA,cAACC,EAAA,CAAQ,GAAGJ,EAAO,KAAMC,GACtBF,CACH,CAEJ,CAXgBM,EAAAP,EAAA","names":["React","ContractAmendmentSubmit","children","props","formId","useContractAmendmentContext","React","Button","__name"]}
@@ -1,2 +1,2 @@
1
- import{a as P}from"./chunk-YVC4OEFJ.js";import{a as y,b as v,c as h,d as _,e as w}from"./chunk-XEQTLVMV.js";import{a as k}from"./chunk-DOA6BAUQ.js";import{a as x}from"./chunk-J2RINDSC.js";import{a as T}from"./chunk-4F7PYKUZ.js";import{a as n}from"./chunk-SJ56GVNV.js";import{a as s}from"./chunk-AYDF3IFZ.js";import{Euro as H}from"lucide-react";import t,{lazy as G,useState as A}from"react";import*as N from"react";import{Slot as z}from"@radix-ui/react-slot";import{cva as F}from"class-variance-authority";var E=F("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function B({className:a,variant:o,asChild:r=!1,...u}){return N.createElement(r?z:"span",{"data-slot":"badge",className:n(E({variant:o}),a),...u})}s(B,"Badge");import*as m from"react";import*as i from"@radix-ui/react-tabs";function S({className:a,...o}){return m.createElement(i.Root,{"data-slot":"tabs",className:n("flex flex-col gap-2",a),...o})}s(S,"Tabs");function V({className:a,...o}){return m.createElement(i.List,{"data-slot":"tabs-list",className:n("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",a),...o})}s(V,"TabsList");function b({className:a,...o}){return m.createElement(i.Trigger,{"data-slot":"tabs-trigger",className:n("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),...o})}s(b,"TabsTrigger");var M=G(()=>import("./flows/CostCalculator/Results/CostCalculatorResultsChart.js"));function st({employmentData:a,options:o}){let[r,u]=A("monthly"),l=a.employments?.[0];if(!l)return null;let e=l.employer_currency_costs,c=e.currency.symbol,f=r==="monthly"?e.monthly_gross_salary:e.annual_gross_salary,p=r==="monthly"?e.monthly_benefits_total:e.annual_benefits_total,g=r==="monthly"?e.monthly_contributions_total:e.annual_contributions_total,D=r==="monthly"?e.monthly_total:e.annual_total,d=r==="monthly"?e.monthly_benefits_breakdown:e.annual_benefits_breakdown,L=r==="monthly"?e.monthly_contributions_breakdown:e.annual_contributions_breakdown,C=[{name:"Gross Salary",value:f,color:o?.chartColors?.grossSalary??"#3b82f6"},{name:"Contributions",value:g,color:o?.chartColors?.contributions??"#f59e0b"}];return d&&C.push({name:"Benefits",value:p??0,color:o?.chartColors?.benefits??"#10b981"}),t.createElement(t.Fragment,null,t.createElement("div",{className:"flex flex-col md:flex-row gap-4 md:items-center justify-between mb-6 RemoteFlows__CostCalculatorResults"},t.createElement("div",{className:"RemoteFlows__CostCalculatorResults__Header"},t.createElement("h2",{className:"text-xl font-semibold flex items-center gap-2"},t.createElement("span",{className:"flex items-center gap-1"},t.createElement(H,{className:"h-5 w-5 text-gray-600"}),o?.title??"Cost Calculator"),t.createElement(B,{className:"ml-2"},l.country.name)),t.createElement("p",{className:"text-primary-foreground font-medium mt-1"},o?.description??`Total cost of employment in ${l.country.name}`)),t.createElement(S,{value:r,onValueChange:j=>u(j),className:"w-full md:w-auto RemoteFlows__CostCalculatorResults__Tabs"},t.createElement(V,{className:"grid w-full md:w-[200px] grid-cols-2"},t.createElement(b,{value:"monthly"},"Monthly"),t.createElement(b,{value:"annual"},"Annual")))),t.createElement("div",{className:n("grid grid-cols-1 gap-6",o?.showChart?"md:grid-cols-3":"","RemoteFlows__CostCalculatorResults_CostBreakdown")},t.createElement(y,{className:"md:col-span-2 rounded-lg"},t.createElement(v,{className:"pb-2"},t.createElement(h,null,"Cost Breakdown"),t.createElement(_,null,"Detailed breakdown of all employer costs")),t.createElement(w,null,t.createElement("div",{className:"space-y-6"},t.createElement(P,{grossSalary:f,currency:c}),d?t.createElement(x,{benefitsBreakdown:d,benefitsTotal:p,currency:c}):null,t.createElement(T,{contributionsBreakdown:L,contributionsTotal:g,currency:c}),t.createElement(k,{totalCost:D,currency:c})))),o?.showChart&&t.createElement(M,{chartData:C,currency:c})))}s(st,"CostCalculatorResults");export{st as a};
2
- //# sourceMappingURL=chunk-VV7RML2Q.js.map
1
+ import{a as x}from"./chunk-J2RINDSC.js";import{a as T}from"./chunk-4F7PYKUZ.js";import{a as P}from"./chunk-YVC4OEFJ.js";import{a as y,b as v,c as h,d as _,e as w}from"./chunk-XEQTLVMV.js";import{a as k}from"./chunk-DOA6BAUQ.js";import{a as n}from"./chunk-SJ56GVNV.js";import{a as s}from"./chunk-AYDF3IFZ.js";import{Euro as H}from"lucide-react";import t,{lazy as G,useState as A}from"react";import*as N from"react";import{Slot as z}from"@radix-ui/react-slot";import{cva as F}from"class-variance-authority";var E=F("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function B({className:a,variant:o,asChild:r=!1,...u}){return N.createElement(r?z:"span",{"data-slot":"badge",className:n(E({variant:o}),a),...u})}s(B,"Badge");import*as m from"react";import*as i from"@radix-ui/react-tabs";function S({className:a,...o}){return m.createElement(i.Root,{"data-slot":"tabs",className:n("flex flex-col gap-2",a),...o})}s(S,"Tabs");function V({className:a,...o}){return m.createElement(i.List,{"data-slot":"tabs-list",className:n("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",a),...o})}s(V,"TabsList");function b({className:a,...o}){return m.createElement(i.Trigger,{"data-slot":"tabs-trigger",className:n("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),...o})}s(b,"TabsTrigger");var M=G(()=>import("./flows/CostCalculator/Results/CostCalculatorResultsChart.js"));function st({employmentData:a,options:o}){let[r,u]=A("monthly"),l=a.employments?.[0];if(!l)return null;let e=l.employer_currency_costs,c=e.currency.symbol,f=r==="monthly"?e.monthly_gross_salary:e.annual_gross_salary,p=r==="monthly"?e.monthly_benefits_total:e.annual_benefits_total,g=r==="monthly"?e.monthly_contributions_total:e.annual_contributions_total,D=r==="monthly"?e.monthly_total:e.annual_total,d=r==="monthly"?e.monthly_benefits_breakdown:e.annual_benefits_breakdown,L=r==="monthly"?e.monthly_contributions_breakdown:e.annual_contributions_breakdown,C=[{name:"Gross Salary",value:f,color:o?.chartColors?.grossSalary??"#3b82f6"},{name:"Contributions",value:g,color:o?.chartColors?.contributions??"#f59e0b"}];return d&&C.push({name:"Benefits",value:p??0,color:o?.chartColors?.benefits??"#10b981"}),t.createElement(t.Fragment,null,t.createElement("div",{className:"flex flex-col md:flex-row gap-4 md:items-center justify-between mb-6 RemoteFlows__CostCalculatorResults"},t.createElement("div",{className:"RemoteFlows__CostCalculatorResults__Header"},t.createElement("h2",{className:"text-xl font-semibold flex items-center gap-2"},t.createElement("span",{className:"flex items-center gap-1"},t.createElement(H,{className:"h-5 w-5 text-gray-600"}),o?.title??"Cost Calculator"),t.createElement(B,{className:"ml-2"},l.country.name)),t.createElement("p",{className:"text-primary-foreground font-medium mt-1"},o?.description??`Total cost of employment in ${l.country.name}`)),t.createElement(S,{value:r,onValueChange:j=>u(j),className:"w-full md:w-auto RemoteFlows__CostCalculatorResults__Tabs"},t.createElement(V,{className:"grid w-full md:w-[200px] grid-cols-2"},t.createElement(b,{value:"monthly"},"Monthly"),t.createElement(b,{value:"annual"},"Annual")))),t.createElement("div",{className:n("grid grid-cols-1 gap-6",o?.showChart?"md:grid-cols-3":"","RemoteFlows__CostCalculatorResults_CostBreakdown")},t.createElement(y,{className:"md:col-span-2 rounded-lg"},t.createElement(v,{className:"pb-2"},t.createElement(h,null,"Cost Breakdown"),t.createElement(_,null,"Detailed breakdown of all employer costs")),t.createElement(w,null,t.createElement("div",{className:"space-y-6"},t.createElement(P,{grossSalary:f,currency:c}),d?t.createElement(x,{benefitsBreakdown:d,benefitsTotal:p,currency:c}):null,t.createElement(T,{contributionsBreakdown:L,contributionsTotal:g,currency:c}),t.createElement(k,{totalCost:D,currency:c})))),o?.showChart&&t.createElement(M,{chartData:C,currency:c})))}s(st,"CostCalculatorResults");export{st as a};
2
+ //# sourceMappingURL=chunk-5O2L2L25.js.map
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-AYDF3IFZ.js";import{useState as S}from"react";var m=s(n=>{let l=Object.keys(n);if(l.length===0)throw new Error("No steps provided to useStepState");let[r,u]=S({}),[a,c]=S({currentStep:n[l[0]],totalSteps:l.length,values:null});function i(){let{index:p}=a.currentStep,t=Object.values(n).find(e=>e.index===p+1);t&&(c(e=>({...e,currentStep:t,values:{...e.values,[e.currentStep.name]:{...e.values?.[e.currentStep.name],...r}}})),u({}))}s(i,"nextStep");function o(){let{index:p}=a.currentStep,t=Object.values(n).find(e=>e.index===p-1);t&&(c(e=>({...e,currentStep:t,values:{...e.values,[e.currentStep.name]:{...e.values?.[e.currentStep.name],...r}}})),u({}))}return s(o,"previousStep"),{nextStep:i,previousStep:o,stepState:a,fieldValues:r,setFieldValues:u}},"useStepState");export{m as a};
2
+ //# sourceMappingURL=chunk-5PXYSIYN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/useStepState.ts"],"sourcesContent":["import { useState } from 'react';\nimport { FieldValues } from 'react-hook-form';\n\nexport type Step = {\n index: number;\n name: string;\n};\n\ntype StepState<T extends string> = {\n currentStep: Step;\n totalSteps: number;\n values:\n | {\n [key in T]: FieldValues;\n }\n | null;\n};\n\nexport const useStepState = <T extends string>(steps: Record<T, Step>) => {\n const stepKeys = Object.keys(steps) as Array<keyof typeof steps>;\n\n if (stepKeys.length === 0) {\n throw new Error('No steps provided to useStepState');\n }\n\n const [fieldValues, setFieldValues] = useState<FieldValues>({});\n const [stepState, setStepState] = useState<StepState<T>>({\n currentStep: steps[stepKeys[0]],\n totalSteps: stepKeys.length,\n values: null,\n });\n\n function nextStep() {\n const { index } = stepState.currentStep;\n const stepValues = Object.values<Step>(steps);\n const nextStep = stepValues.find((step) => step.index === index + 1);\n\n if (nextStep) {\n setStepState((previousState) => ({\n ...previousState,\n currentStep: nextStep,\n values: {\n ...previousState.values,\n [previousState.currentStep.name]: {\n ...previousState.values?.[previousState.currentStep.name as T],\n ...fieldValues,\n },\n } as { [key in T]: FieldValues },\n }));\n setFieldValues({}); // Reset field values for the next step\n }\n }\n\n function previousStep() {\n const { index } = stepState.currentStep;\n const stepValues = Object.values<Step>(steps);\n const previousStep = stepValues.find((step) => step.index === index - 1);\n\n if (previousStep) {\n setStepState((previousState) => ({\n ...previousState,\n currentStep: previousStep,\n values: {\n ...previousState.values,\n [previousState.currentStep.name]: {\n ...previousState.values?.[previousState.currentStep.name as T],\n ...fieldValues,\n },\n } as { [key in T]: FieldValues },\n }));\n setFieldValues({}); // Reset field values for the previous step\n }\n }\n\n return {\n /**\n * Moves to the next step in the step state.\n * It updates the current step and resets the field values for the next step.\n * The field values for the current step are stored in the step state.\n * @returns {void}\n */\n nextStep,\n /**\n * Moves to the previous step in the step state.\n * It updates the current step and resets the field values for the previous step.\n * The field values for the current step are stored in the step state.\n * @returns {void}\n */\n previousStep,\n /**\n * The current step state containing the current step, total number of steps and\n * the form values for each step.\n * @returns {StepState<T>} The current step state.\n */\n stepState,\n /**\n * The field values for the current step.\n * @returns {FieldValues} The field values for the current step.\n */\n fieldValues,\n /**\n * Sets the field values for the current step.\n * @param values The field values to set.\n * @returns {void}\n */\n setFieldValues,\n };\n};\n"],"mappings":"wCAAA,OAAS,YAAAA,MAAgB,QAkBlB,IAAMC,EAAeC,EAAmBC,GAA2B,CACxE,IAAMC,EAAW,OAAO,KAAKD,CAAK,EAElC,GAAIC,EAAS,SAAW,EACtB,MAAM,IAAI,MAAM,mCAAmC,EAGrD,GAAM,CAACC,EAAaC,CAAc,EAAIC,EAAsB,CAAC,CAAC,EACxD,CAACC,EAAWC,CAAY,EAAIF,EAAuB,CACvD,YAAaJ,EAAMC,EAAS,CAAC,CAAC,EAC9B,WAAYA,EAAS,OACrB,OAAQ,IACV,CAAC,EAED,SAASM,GAAW,CAClB,GAAM,CAAE,MAAAC,CAAM,EAAIH,EAAU,YAEtBE,EADa,OAAO,OAAaP,CAAK,EAChB,KAAMS,GAASA,EAAK,QAAUD,EAAQ,CAAC,EAE/DD,IACFD,EAAcI,IAAmB,CAC/B,GAAGA,EACH,YAAaH,EACb,OAAQ,CACN,GAAGG,EAAc,OACjB,CAACA,EAAc,YAAY,IAAI,EAAG,CAChC,GAAGA,EAAc,SAASA,EAAc,YAAY,IAAS,EAC7D,GAAGR,CACL,CACF,CACF,EAAE,EACFC,EAAe,CAAC,CAAC,EAErB,CAnBSJ,EAAAQ,EAAA,YAqBT,SAASI,GAAe,CACtB,GAAM,CAAE,MAAAH,CAAM,EAAIH,EAAU,YAEtBM,EADa,OAAO,OAAaX,CAAK,EACZ,KAAMS,GAASA,EAAK,QAAUD,EAAQ,CAAC,EAEnEG,IACFL,EAAcI,IAAmB,CAC/B,GAAGA,EACH,YAAaC,EACb,OAAQ,CACN,GAAGD,EAAc,OACjB,CAACA,EAAc,YAAY,IAAI,EAAG,CAChC,GAAGA,EAAc,SAASA,EAAc,YAAY,IAAS,EAC7D,GAAGR,CACL,CACF,CACF,EAAE,EACFC,EAAe,CAAC,CAAC,EAErB,CAnBS,OAAAJ,EAAAY,EAAA,gBAqBF,CAOL,SAAAJ,EAOA,aAAAI,EAMA,UAAAN,EAKA,YAAAH,EAMA,eAAAC,CACF,CACF,EAzF4B","names":["useState","useStepState","__name","steps","stepKeys","fieldValues","setFieldValues","useState","stepState","setStepState","nextStep","index","step","previousState","previousStep"]}
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-LUCFM5TE.js";import{b as c}from"./chunk-A4RX3KRZ.js";import{a as d}from"./chunk-TIXDBKBM.js";import{b as u}from"./chunk-6HGUGIYJ.js";import{a as r}from"./chunk-AYDF3IFZ.js";import m,{useEffect as v}from"react";import{useForm as V}from"react-hook-form";var P=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:f,onError:s,onSuccess:F}){let{formId:p,contractAmendment:{checkFieldUpdates:_,fields:b,onSubmit:A,stepState:C,initialValues:a,handleValidation:h}}=u(),S=c(h),e=V({resolver:S,defaultValues:C.values?.form||a,shouldUnregister:!0,mode:"onBlur"});v(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&_(o)});return()=>t?.unsubscribe()},[]);let g=r(async t=>{let o=!1;for(let[i,y]of Object.entries(t))if(!P.includes(i)&&a[i]!==y){o=!0;break}if(!o)return s?.({message:"no_changes_detected_contract_details"});await f?.(t);let n=await A(t);n.error?s?.(n.error):F?.(n.data)},"handleSubmit");return m.createElement(d,{...e},m.createElement("form",{id:p,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(g),className:"space-y-4 RemoteFlows__ContractAmendmentForm"},m.createElement(l,{fields:b})))}r(x,"ContractAmendmentForm");export{x as a};
2
+ //# sourceMappingURL=chunk-5YDR5BIG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentForm.tsx"],"sourcesContent":["import {\n ContractAmendmentAutomatableResponse,\n PostAutomatableContractAmendmentError,\n} from '@/src/client';\nimport { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { useJsonSchemasValidationFormResolver } from '@/src/components/form/yupValidationResolver';\nimport { Form } from '@/src/components/ui/form';\nimport React, { useEffect } from 'react';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { useContractAmendmentContext } from './context';\n\ntype ContractAmendmentFormProps = {\n /**\n * Callback function to be called when the contract amendment form is submitted.\n * This function is called before the contract amendment is submitted.\n * It can be used to perform any additional validation or processing before\n * the contract amendment is submitted.\n * @param values\n * @returns\n */\n onSubmit?: (values: FieldValues) => Promise<void>;\n /**\n * Callback function to be called when the contract amendment fails.\n * @param error\n * @returns\n */\n onError?: (\n error:\n | PostAutomatableContractAmendmentError\n | { message: 'no_changes_detected_contract_details' },\n ) => void;\n /**\n * Callback function to be called when the contract amendment is successfully submitted.\n * This function is called after the contract amendment is submitted.\n * @param data\n * @returns\n */\n onSuccess?: (data: ContractAmendmentAutomatableResponse) => void;\n};\n\nconst commonFields = [\n 'effective_date',\n 'reason_for_change',\n 'reason_for_change_description',\n 'additional_comments',\n 'additional_comments_toggle',\n] as const;\n\ntype CommonFields = (typeof commonFields)[number];\n\nexport function ContractAmendmentForm({\n onSubmit,\n onError,\n onSuccess,\n}: ContractAmendmentFormProps) {\n const {\n formId,\n contractAmendment: {\n checkFieldUpdates,\n fields,\n onSubmit: submitContractAmendment,\n stepState,\n initialValues,\n handleValidation,\n },\n } = useContractAmendmentContext();\n\n const resolver = useJsonSchemasValidationFormResolver(\n // @ts-expect-error no matching type\n handleValidation,\n );\n\n const form = useForm({\n resolver,\n defaultValues:\n // stepState.values is used as defaultValues for the form when the form is\n // rendered when clicking on the back button after the user has submitted the form\n // and the confirmation form is displayed.\n // This is because the form is unmounted when the user submits the form.\n stepState.values?.form || initialValues,\n shouldUnregister: true,\n mode: 'onBlur',\n });\n\n useEffect(() => {\n const subscription = form?.watch((values) => {\n const isFormDirty =\n Object.keys(form.formState.dirtyFields).length > 0 ||\n form.formState.isDirty;\n if (isFormDirty) {\n checkFieldUpdates(values);\n }\n });\n return () => subscription?.unsubscribe();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleSubmit = async (values: FieldValues) => {\n let hasContractDetailsChanges = false;\n for (const [key, value] of Object.entries(values)) {\n if (\n !commonFields.includes(key as CommonFields) &&\n // @ts-expect-error error\n initialValues[key] !== value\n ) {\n hasContractDetailsChanges = true;\n break;\n }\n }\n\n if (!hasContractDetailsChanges) {\n return onError?.({\n message: 'no_changes_detected_contract_details',\n });\n }\n\n await onSubmit?.(values);\n\n const contractAmendmentResult = await submitContractAmendment(values);\n\n if (contractAmendmentResult.error) {\n onError?.(contractAmendmentResult.error);\n } else {\n onSuccess?.(\n contractAmendmentResult.data as ContractAmendmentAutomatableResponse,\n );\n }\n };\n\n return (\n <Form {...form}>\n <form\n id={formId}\n data-testid=\"contract-amendment-form\"\n onSubmit={form.handleSubmit(handleSubmit)}\n className=\"space-y-4 RemoteFlows__ContractAmendmentForm\"\n >\n <JSONSchemaFormFields fields={fields} />\n </form>\n </Form>\n );\n}\n"],"mappings":"wMAOA,OAAOA,GAAS,aAAAC,MAAiB,QACjC,OAAsB,WAAAC,MAAe,kBAgCrC,IAAMC,EAAe,CACnB,iBACA,oBACA,gCACA,sBACA,4BACF,EAIO,SAASC,EAAsB,CACpC,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA+B,CAC7B,GAAM,CACJ,OAAAC,EACA,kBAAmB,CACjB,kBAAAC,EACA,OAAAC,EACA,SAAUC,EACV,UAAAC,EACA,cAAAC,EACA,iBAAAC,CACF,CACF,EAAIC,EAA4B,EAE1BC,EAAWC,EAEfH,CACF,EAEMI,EAAOC,EAAQ,CACnB,SAAAH,EACA,cAKEJ,EAAU,QAAQ,MAAQC,EAC5B,iBAAkB,GAClB,KAAM,QACR,CAAC,EAEDO,EAAU,IAAM,CACd,IAAMC,EAAeH,GAAM,MAAOI,GAAW,EAEzC,OAAO,KAAKJ,EAAK,UAAU,WAAW,EAAE,OAAS,GACjDA,EAAK,UAAU,UAEfT,EAAkBa,CAAM,CAE5B,CAAC,EACD,MAAO,IAAMD,GAAc,YAAY,CAEzC,EAAG,CAAC,CAAC,EAEL,IAAME,EAAeC,EAAA,MAAOF,GAAwB,CAClD,IAAIG,EAA4B,GAChC,OAAW,CAACC,EAAKC,CAAK,IAAK,OAAO,QAAQL,CAAM,EAC9C,GACE,CAACnB,EAAa,SAASuB,CAAmB,GAE1Cb,EAAca,CAAG,IAAMC,EACvB,CACAF,EAA4B,GAC5B,KACF,CAGF,GAAI,CAACA,EACH,OAAOnB,IAAU,CACf,QAAS,sCACX,CAAC,EAGH,MAAMD,IAAWiB,CAAM,EAEvB,IAAMM,EAA0B,MAAMjB,EAAwBW,CAAM,EAEhEM,EAAwB,MAC1BtB,IAAUsB,EAAwB,KAAK,EAEvCrB,IACEqB,EAAwB,IAC1B,CAEJ,EA9BqB,gBAgCrB,OACEC,EAAA,cAACC,EAAA,CAAM,GAAGZ,GACRW,EAAA,cAAC,QACC,GAAIrB,EACJ,cAAY,0BACZ,SAAUU,EAAK,aAAaK,CAAY,EACxC,UAAU,gDAEVM,EAAA,cAACE,EAAA,CAAqB,OAAQrB,EAAQ,CACxC,CACF,CAEJ,CA3FgBc,EAAApB,EAAA","names":["React","useEffect","useForm","commonFields","ContractAmendmentForm","onSubmit","onError","onSuccess","formId","checkFieldUpdates","fields","submitContractAmendment","stepState","initialValues","handleValidation","useContractAmendmentContext","resolver","useJsonSchemasValidationFormResolver","form","useForm","useEffect","subscription","values","handleSubmit","__name","hasContractDetailsChanges","key","value","contractAmendmentResult","React","Form","JSONSchemaFormFields"]}
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-AYDF3IFZ.js";import A from"lodash/get";var R={TEXT:"text",TEXTAREA:"textarea",NUMBER:"number",SELECT:"select",COUNTRIES:"countries",TEL:"tel",EMAIL:"email",MONEY:"money",DATE:"date",DATE_RANGE:"date-range",CURRENCIES:"currencies",TIME:"time"},V={CHECKBOX:"checkbox",ACK_CHECK:"ack-check"},u={FILE:"file",RADIO:"radio",RADIO_CARD:"radio-card",GROUP_ARRAY:"group-array",EXTRA:"extra",STATEMENT:"statement",HIDDEN:"hidden",FIELDSET:"fieldset",FIELDSET_FLAT:"fieldset-flat",WORK_SCHEDULE:"work-schedule",WORK_WEEK_SCHEDULE:"work-week-schedule",BENEFITS:"benefits",SIGNATURE:"signature",SELECT_MULTIPLE:"select-multiple",...R,...V};function g(e){return Math.round((e+Number.EPSILON)*100)/100}i(g,"round");function T(e){return parseFloat(e.replace(/,/g,""))}i(T,"convertToValidCost");function I(e){if(e==null||e===""||Number.isNaN(e)||Array.isArray(e)||typeof e=="boolean")return null;let n;return typeof e=="string"?n=T(e):n=e,g(n*100)}i(I,"convertToCents");function O(e){if(e==null||Number.isNaN(e))return null;let n;return typeof e=="string"?n=T(e||"0"):n=e,g(n/100)}i(O,"convertFromCents");var m=i(e=>Object.entries(e||{}).reduce((n,[s,t])=>(Array.isArray(t)?n[s]=t.map(r=>typeof r=="object"&&r!==null?m(r):typeof r=="string"?r.trim():r):typeof t=="object"&&t!==null?n[s]=m(t):n[s]=typeof t=="string"?t.trim():t,n),{}),"trimStringValues");function p(e){let n={};return Object.entries(e).forEach(([s,t])=>{Array.isArray(t)?n[s]=t.map(r=>typeof r=="object"&&r!==null?p(r):r===""?null:r):typeof t=="object"&&t!==null?n[s]=p(t):n[s]=t===""?null:t}),n}i(p,"convertEmptyStringsToNull");function d(e,n){let s={};return n.forEach(t=>{let r=t.name;if(!(!Object.prototype.hasOwnProperty.call(e,r)&&!(t.type===u.FIELDSET&&t.valueGroupingDisabled))){if(t.type===u.FIELDSET&&t.valueGroupingDisabled){Object.assign(s,d(e,t.fields));return}t.readOnly&&t.defaultValue?s[r]=t.defaultValue:s[r]=e[r]}}),s}i(d,"prefillReadOnlyFields");function b(e,n){return e.reduce((s,t)=>(t.type===u.FIELDSET&&t.valueGroupingDisabled?Object.assign(s,b(t.fields,n)):Object.prototype.hasOwnProperty.call(n,t.name)&&(s[t.name]=n[t.name]),s),{})}i(b,"extractFieldsetFieldsValues");var E={[u.COUNTRIES]:{transformValueFromAPI:i(e=>n=>{if(!e.multiple)return n??"";let s;return typeof n=="string"?s=n.split(","):s=n||[],s.map(r=>e.countries?.find?.(a=>"name"in a&&a.name===r)||{name:r})},"transformValueFromAPI"),transformValueToAPI:i(e=>n=>!e.multiple||typeof n=="string"?n:n.map(s=>typeof s=="string"?s:s.name),"transformValueToAPI"),transformValue:i(e=>{let n=i(s=>s?.name||s?.value||s?.label,"getCountryValue");return Array.isArray(e)?e.map(n):n(e)||""},"transformValue")},[u.NUMBER]:{transformValueToAPI:i(()=>e=>{let n=Number(e);return Number.isNaN(n)?e:n},"transformValueToAPI")},[u.MONEY]:{transformValueFromAPI:i(()=>e=>O(e)??"","transformValueFromAPI"),transformValueToAPI:i(()=>I,"transformValueToAPI")},[u.RADIO]:{transformValueToAPI:i(e=>n=>e.transformToBool?n==="yes":n,"transformValueToAPI")},[u.CHECKBOX]:{transformValueToAPI:i(()=>e=>e===void 0?!1:e,"transformValueToAPI")},[u.SELECT]:{transformValue:i(e=>Array.isArray(e)?e.map(n=>n.value):e?.value??"","transformValue")}};function y(e={},n){return n.filter(r=>e[r.name]||r.type===u.FIELDSET&&r.valueGroupingDisabled).reduce((r,a)=>{switch(a.type){case u.FIELDSET:{let o=a;if(o.valueGroupingDisabled){let l=b(o.fields,e);Object.assign(r,y(l,o.fields))}else r[a.name]=y(e[a.name],o.fields);break}case u.TEXTAREA:case u.TEXT:{r[a.name]=e[a.name].replace(/\0/g,"");break}case u.GROUP_ARRAY:{let o=a?.fields?.().map(c=>({...c,name:c.nameKey||""})),l=e[a.name]?.map(c=>y(c,o));r[a.name]=l;break}case u.EXTRA:{let o=a;if(o.includeValueToApi!==!1){let l=e[o.name],c=o?.transformValueToAPI||E[o.type]?.transformValueToAPI;if(c){r[o.name]=c(a)(l);break}r[o.name]=l;break}r[o.name]=void 0;break}default:{let o=e[a.name],l=a?.transformValueToAPI||E[a.type]?.transformValueToAPI;if(l){r[a.name]=l(a)(o);break}r[a.name]=o;break}}return a.forcedValue!==void 0&&(r[a.name]=a.forcedValue),r},{...e})}i(y,"parseFormValuesToAPI");function D(e,n){return e.visibilityCondition?e.visibilityCondition(n):typeof e.isVisible<"u"?!!e.isVisible:!0}i(D,"isFieldVisible");function F(e,n){return e.calculateDynamicProperties?{...e,...e.calculateDynamicProperties(n)||{}}:e}i(F,"applyFieldDynamicProperties");function f(e,n,s,t){let r={};return n.map(a=>F(a,e)).forEach(a=>{let o=a.name;t&&(o=o?`${t}.${a.name}`:t);let l=A(e,o);if(!(!D(a,e)&&!(s&&l))&&!a.meta?.ignoreValue)if(a.type==="fieldset"&&a.valueGroupingDisabled)Object.assign(r,f(e,a.fields,s,o));else if(Array.isArray(a.fields))r[a.name]=f(e,a.fields,s,o);else{if(l===void 0)return;r[a.name]=l}}),r}i(f,"excludeValuesInvisible");function P(e,n,s){let t=s?.keepInvisibleValues?e:f(e,n),r=y(t,n),a=m(r),o=p(a);return d(o,n)}i(P,"parseSubmitValues");function S(e,n,s={isPartialValidation:!1}){return P(e,n,{keepInvisibleValues:s?.isPartialValidation})}i(S,"parseJSFToValidate");export{I as a,O as b,S as c};
2
+ //# sourceMappingURL=chunk-6DMCAUPE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/form/utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Fields } from '@remoteoss/json-schema-form';\nimport get from 'lodash/get';\n\nconst textInputTypes = {\n TEXT: 'text',\n TEXTAREA: 'textarea',\n NUMBER: 'number',\n SELECT: 'select',\n COUNTRIES: 'countries',\n TEL: 'tel',\n EMAIL: 'email',\n MONEY: 'money',\n DATE: 'date',\n DATE_RANGE: 'date-range',\n CURRENCIES: 'currencies',\n TIME: 'time',\n} as const;\n\nconst checkboxTypes = {\n CHECKBOX: 'checkbox',\n ACK_CHECK: 'ack-check',\n} as const;\n\nconst supportedTypes = {\n FILE: 'file',\n RADIO: 'radio',\n /** @deprecated */\n RADIO_CARD: 'radio-card',\n GROUP_ARRAY: 'group-array',\n EXTRA: 'extra',\n STATEMENT: 'statement',\n HIDDEN: 'hidden',\n FIELDSET: 'fieldset',\n FIELDSET_FLAT: 'fieldset-flat',\n WORK_SCHEDULE: 'work-schedule',\n WORK_WEEK_SCHEDULE: 'work-week-schedule',\n /** @deprecated we still display benefits in read-only contract details view, but never in any form */\n BENEFITS: 'benefits',\n SIGNATURE: 'signature',\n SELECT_MULTIPLE: 'select-multiple',\n ...textInputTypes,\n ...checkboxTypes,\n} as const;\n\nfunction round(value: number): number {\n return Math.round((value + Number.EPSILON) * 100) / 100;\n}\n\nfunction convertToValidCost(value: string) {\n return parseFloat(value.replace(/,/g, ''));\n}\n\nexport function convertToCents(\n amount?: number | string | string[] | null | boolean,\n) {\n if (\n amount == null ||\n amount === '' ||\n Number.isNaN(amount) ||\n Array.isArray(amount) ||\n typeof amount === 'boolean'\n ) {\n return null;\n }\n\n let validAmount: number;\n\n if (typeof amount === 'string') {\n validAmount = convertToValidCost(amount);\n } else {\n validAmount = amount;\n }\n\n return round(validAmount * 100);\n}\n\nexport function convertFromCents(amount?: number | string | null) {\n if (amount == null || Number.isNaN(amount)) return null;\n\n let normalizedValue: number;\n\n if (typeof amount === 'string') {\n normalizedValue = convertToValidCost(amount || '0');\n } else {\n normalizedValue = amount;\n }\n\n return round(normalizedValue / 100);\n}\n\nconst trimStringValues = (values: Record<string, any>) =>\n Object.entries(values || {}).reduce<Record<string, any>>(\n (result, [key, value]) => {\n if (Array.isArray(value)) {\n // If the value is an array, recursively process each element\n result[key] = value.map((item) =>\n typeof item === 'object' && item !== null\n ? trimStringValues(item)\n : typeof item === 'string'\n ? item.trim()\n : item,\n );\n } else if (typeof value === 'object' && value !== null) {\n // If the value is an object, recursively process it\n result[key] = trimStringValues(value);\n } else {\n // Otherwise, trim the string or keep the value as is\n result[key] = typeof value === 'string' ? value.trim() : value;\n }\n return result;\n },\n {},\n );\n\nfunction convertEmptyStringsToNull(values: Record<string, any>) {\n const result: Record<string, any> = {};\n\n Object.entries(values).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n // If the value is an array, recursively process each element\n result[key] = value.map((item) =>\n typeof item === 'object' && item !== null\n ? convertEmptyStringsToNull(item)\n : item === ''\n ? null\n : item,\n );\n } else if (typeof value === 'object' && value !== null) {\n // If the value is an object, recursively process it\n result[key] = convertEmptyStringsToNull(value);\n } else {\n // Otherwise, convert empty strings to null or keep the value as is\n result[key] = value === '' ? null : value;\n }\n });\n\n return result;\n}\n\n/**\n * Given a list of form values, modify the ones that are readOnly,\n * based on their field config, by adding its defaultValue.\n * This is needed to support readOnly fields that are also conditional\n * based on the \"pivotName\" workaround.\n * @param {Object} values - List with form values { name: value }.\n * @param {Array} fields - Respective form fields configuration.\n */\nfunction prefillReadOnlyFields(values: Record<string, any>, fields: any[]) {\n const newValues: Record<string, any> = {};\n\n fields.forEach((field) => {\n const fieldName = field.name;\n\n if (\n !Object.prototype.hasOwnProperty.call(values, fieldName!) &&\n !(field.type === supportedTypes.FIELDSET && field.valueGroupingDisabled)\n )\n return;\n\n if (field.type === supportedTypes.FIELDSET && field.valueGroupingDisabled) {\n Object.assign(newValues, prefillReadOnlyFields(values, field.fields));\n return;\n }\n\n if (field.readOnly && field.defaultValue) {\n newValues[fieldName!] = field.defaultValue;\n } else {\n newValues[fieldName!] = values[fieldName!];\n }\n });\n\n return newValues;\n}\n/**\n * Recursively extracts fieldsets' fields values and maps them to the field name\n * For nested fields that are fieldsets with valueGroupingDisabled, the values\n * are extracted one level up\n *\n * @param {Array} fields - Fieldset fields configuration.\n * @param {Object} formValues - List with form values { name: value }.\n * @return {Object} – Raw form values mapped to the field name\n */\nfunction extractFieldsetFieldsValues(\n fields: any[],\n formValues: Record<string, unknown>,\n) {\n return fields.reduce<Record<string, any>>((nestedAcc, subField) => {\n const isFieldsetValueGroupingDisabled =\n subField.type === supportedTypes.FIELDSET &&\n subField.valueGroupingDisabled;\n\n if (isFieldsetValueGroupingDisabled) {\n Object.assign(\n nestedAcc,\n extractFieldsetFieldsValues(subField.fields, formValues),\n );\n } else if (\n Object.prototype.hasOwnProperty.call(formValues, subField.name!)\n ) {\n nestedAcc[subField.name!] = formValues[subField.name!];\n }\n\n return nestedAcc;\n }, {});\n}\n\nexport const fieldTypesTransformations: Record<string, any> = {\n [supportedTypes.COUNTRIES]: {\n /**\n *\n * @param {Object} field - Field config that must contain field.countries\n * @param {String[]|String} value - Selected country\n * - Current data (multi): an array of country names - eg: ['Peru', 'Germany']\n * - Legacy data (multi): a string of country names - eg: \"Peru,Germany\"\n * @returns {String[]} Eg [{ label: 'PER', name: 'Peru' }]\n */\n transformValueFromAPI: (field: any) => (value: string) => {\n if (!field.multiple) {\n return value ?? '';\n }\n\n let countryNames;\n\n if (typeof value === 'string') {\n // support legacy data (when the fields were open text fields before)\n countryNames = value.split(',');\n } else {\n countryNames = value || [];\n }\n\n const countryValues = countryNames.map(\n // Return { name: countryName } as fallback to legacy data\n // The \"name\" is used at react-select, to connect to the country flag.\n (countryName) =>\n field.countries?.find?.(\n (country: any) => 'name' in country && country.name === countryName,\n ) || {\n name: countryName,\n },\n );\n\n return countryValues;\n },\n /**\n * @param {String[] | { name: String }[]} value\n * - Excepted: array of strings.\n * - Edge cases: array of objects. (when using dangerousTransformValue)\n * @returns {String[]} - List of countries\n * @example expected: ['Peru', 'Germany'] -> ['Peru', 'Germany']\n * @example edge cases: [{name: 'Peru'}, {name: 'Germany'}] -> ['Peru', 'Germany']\n */\n transformValueToAPI:\n (field: any) => (selectedCountries: string[] | { name: string }[]) => {\n if (!field.multiple || typeof selectedCountries === 'string') {\n return selectedCountries;\n }\n // NOTE: The value should be an array of strings, however legacy data can come as\n // an array of country objects. So, we always send an array of strings to normalize\n // the data (eg old form values being modified) until DB migration is done !5667\n return selectedCountries.map((option) =>\n typeof option === 'string' ? option : option.name,\n );\n },\n /**\n * Used for react-select, where the country selected is transformed\n * before saving on Formik state. Supports both solo and multi select\n * @param {Object|Object[]} selectedCountry[] - Current selected options\n * @param {String} selectedCountry[].value\n * @param {String} selectedCountry[].name\n * @param {String} selectedCountry[].label\n * @returns {String[]} - List of countries selected\n * @example\n * [{ value: 'Hungria' }] -> ['Hungria']\n */\n transformValue: (selectedCountry: any | any[]) => {\n // name or label are used in dragon. value is used in json-schema-form\n // TODO: it should be the same everywhere — read more at !5667\n const getCountryValue = (opt: any) =>\n opt?.name || opt?.value || opt?.label;\n return Array.isArray(selectedCountry)\n ? selectedCountry.map(getCountryValue) // support multi countries\n : getCountryValue(selectedCountry) || ''; // Fallback to '' in case user removes all countries\n },\n },\n [supportedTypes.NUMBER]: {\n transformValueToAPI: () => (value: string) => {\n // this prevents values with letters such as \"2r\" from being considered valid\n // if the input is invalid, number().cast will return NaN\n const castValue = Number(value);\n\n if (Number.isNaN(castValue)) {\n return value;\n }\n\n return castValue;\n },\n },\n [supportedTypes.MONEY]: {\n transformValueFromAPI: () => (value: string | number) =>\n convertFromCents(value) ?? '',\n transformValueToAPI: () => convertToCents,\n },\n [supportedTypes.RADIO]: {\n transformValueToAPI: (field: any) => (value: string) => {\n if (field.transformToBool) {\n return value === 'yes';\n }\n return value;\n },\n },\n [supportedTypes.CHECKBOX]: {\n transformValueToAPI: () => (value: string) => {\n if (value === undefined) {\n return false;\n }\n return value;\n },\n },\n [supportedTypes.SELECT]: {\n /**\n * Used for react-select, where the value is transformed\n * before saving on Formik state.\n * @param {Object | Object[]} option - Object structure with options config\n * @param {String} option[].value - Key for the API\n * @param {Array} this.options[].label - Friendly label\n * @example\n * [{ value: '1', label: 'One' }, { value: '2', label: 'Two' }] -> [\"One\", \"Two\"]\n * { value: '1', label: 'One' } -> \"One\"\n * {} -> \"\"\n */\n transformValue: (option: any | any[]) =>\n Array.isArray(option)\n ? option.map((opt) => opt.value) // multi-options\n : (option?.value ?? ''), // Fallback to '' in case user removes all options,\n },\n};\n\nexport function parseFormValuesToAPI(\n formValues: Record<string, any> = {},\n fields: any[],\n) {\n const filteredFields = fields.filter(\n (field) =>\n formValues[field.name!] ||\n (field.type === supportedTypes.FIELDSET && field.valueGroupingDisabled),\n );\n\n const parsedFormValues = filteredFields.reduce(\n (acc, field) => {\n switch (field.type) {\n case supportedTypes.FIELDSET: {\n const fieldset = field;\n if (fieldset.valueGroupingDisabled) {\n const nestedFormValues = extractFieldsetFieldsValues(\n fieldset.fields,\n formValues,\n );\n\n Object.assign(\n acc,\n parseFormValuesToAPI(nestedFormValues, fieldset.fields),\n );\n } else {\n acc[field.name!] = parseFormValuesToAPI(\n formValues[field.name!],\n fieldset.fields,\n );\n }\n break;\n }\n\n case supportedTypes.TEXTAREA:\n case supportedTypes.TEXT: {\n // Attempt to remove null bytes from form values - https://gitlab.com/remote-com/employ-starbase/tracker/-/issues/10670\n acc[field.name] = formValues[field.name].replace(/\\0/g, '');\n break;\n }\n\n case supportedTypes.GROUP_ARRAY: {\n // NOTE: The field `name` in group arrays represents a path, but we only\n // need the last part of it which is represented by `nameKey`.\n\n const transformedFields = field?.fields?.().map((subField: any) => ({\n ...subField,\n name: subField.nameKey || '',\n }));\n\n // Null check necessary for case where no fields are set due to optional check\n const parsedFieldValues = formValues[field.name]?.map(\n (fieldValues: Record<string, any>) =>\n parseFormValuesToAPI(fieldValues, transformedFields),\n );\n\n acc[field.name] = parsedFieldValues;\n break;\n }\n case supportedTypes.EXTRA: {\n const extraField = field;\n if (extraField.includeValueToApi !== false) {\n const formValue = formValues[extraField.name];\n const fieldTransformValueToAPI =\n extraField?.transformValueToAPI ||\n fieldTypesTransformations[extraField.type]?.transformValueToAPI;\n\n // logErrorOnMissingComplimentaryParams(field);\n\n if (fieldTransformValueToAPI) {\n acc[extraField.name] = fieldTransformValueToAPI(field)(formValue);\n break;\n }\n\n acc[extraField.name] = formValue;\n break;\n }\n acc[extraField.name] = undefined;\n break;\n }\n default: {\n const formValue = formValues[field.name];\n const fieldTransformValueToAPI =\n field?.transformValueToAPI ||\n fieldTypesTransformations[field.type]?.transformValueToAPI;\n // logErrorOnMissingComplimentaryParams(field);\n if (fieldTransformValueToAPI) {\n acc[field.name] = fieldTransformValueToAPI(field)(formValue);\n break;\n }\n acc[field.name] = formValue;\n break;\n }\n }\n\n // this occurs when const === default in a JSON Schema for a given field.\n // without this, values such as money types won't use the correct value.\n if (field.forcedValue !== undefined) {\n acc[field.name!] = field.forcedValue;\n }\n\n return acc;\n },\n { ...formValues },\n );\n\n return parsedFormValues;\n}\n\nfunction isFieldVisible(field: any, formValues: Record<string, unknown>) {\n if (field.visibilityCondition) {\n return field.visibilityCondition(formValues);\n }\n\n if (typeof field.isVisible !== 'undefined') {\n return Boolean(field.isVisible);\n }\n\n return true;\n}\n\nfunction applyFieldDynamicProperties(\n field: any,\n values: Record<string, unknown> | Record<string, unknown>[],\n) {\n if (field.calculateDynamicProperties) {\n return {\n ...field,\n ...(field.calculateDynamicProperties(values) || {}),\n };\n }\n\n return field;\n}\n\nfunction excludeValuesInvisible(\n values: any,\n fields: any[],\n keepTruthyInvisibleValues?: boolean,\n parentFieldKeyPath?: string,\n) {\n const valuesAsked: Record<string, any> = {};\n\n fields\n .map((field) => applyFieldDynamicProperties(field, values))\n .forEach((field) => {\n let fieldKeyPath = field.name;\n if (parentFieldKeyPath) {\n fieldKeyPath = fieldKeyPath\n ? `${parentFieldKeyPath}.${field.name}`\n : parentFieldKeyPath;\n }\n\n const valueOfField = get(values, fieldKeyPath!);\n\n // keepTruthyInvisibleValues: false/undefined -> remove invisible field\n // keepTruthyInvisibleValues: true -> keep invisible field if it has a value\n if (\n !isFieldVisible(field, values) &&\n !(keepTruthyInvisibleValues && !!valueOfField)\n ) {\n return;\n }\n\n if (field.meta?.ignoreValue) {\n return;\n }\n\n if (field.type === 'fieldset' && field.valueGroupingDisabled) {\n Object.assign(\n valuesAsked,\n excludeValuesInvisible(\n values,\n field.fields,\n keepTruthyInvisibleValues,\n fieldKeyPath,\n ),\n );\n } else if (Array.isArray(field.fields)) {\n valuesAsked[field.name!] = excludeValuesInvisible(\n values,\n field.fields,\n keepTruthyInvisibleValues,\n fieldKeyPath,\n );\n } else {\n if (valueOfField === undefined) {\n return;\n }\n valuesAsked[field.name!] = valueOfField;\n }\n });\n\n return valuesAsked;\n}\n\nexport function parseSubmitValues(\n formValues: Record<string, any>,\n fields: any[],\n config?: { keepInvisibleValues?: boolean },\n) {\n const visibleFormValues = config?.keepInvisibleValues\n ? formValues\n : excludeValuesInvisible(formValues, fields);\n const convertedFormValues = parseFormValuesToAPI(visibleFormValues, fields);\n const formValuesWithTrimmedStrings = trimStringValues(convertedFormValues);\n const formValuesWithUndefined = convertEmptyStringsToNull(\n formValuesWithTrimmedStrings,\n );\n const valuesWithReadOnly = prefillReadOnlyFields(\n formValuesWithUndefined,\n fields,\n );\n return valuesWithReadOnly;\n}\n\nexport function parseJSFToValidate(\n formValues: Record<string, any>,\n fields: Fields,\n config: { isPartialValidation: boolean } = {\n isPartialValidation: false,\n },\n) {\n const valuesParsed = parseSubmitValues(formValues, fields, {\n /* We cannot exclude invisible fields (excludeValuesInvisible) because\n they are needed for conditional fields validations */\n keepInvisibleValues: config?.isPartialValidation,\n });\n return valuesParsed;\n}\n"],"mappings":"wCAEA,OAAOA,MAAS,aAEhB,IAAMC,EAAiB,CACrB,KAAM,OACN,SAAU,WACV,OAAQ,SACR,OAAQ,SACR,UAAW,YACX,IAAK,MACL,MAAO,QACP,MAAO,QACP,KAAM,OACN,WAAY,aACZ,WAAY,aACZ,KAAM,MACR,EAEMC,EAAgB,CACpB,SAAU,WACV,UAAW,WACb,EAEMC,EAAiB,CACrB,KAAM,OACN,MAAO,QAEP,WAAY,aACZ,YAAa,cACb,MAAO,QACP,UAAW,YACX,OAAQ,SACR,SAAU,WACV,cAAe,gBACf,cAAe,gBACf,mBAAoB,qBAEpB,SAAU,WACV,UAAW,YACX,gBAAiB,kBACjB,GAAGF,EACH,GAAGC,CACL,EAEA,SAASE,EAAMC,EAAuB,CACpC,OAAO,KAAK,OAAOA,EAAQ,OAAO,SAAW,GAAG,EAAI,GACtD,CAFSC,EAAAF,EAAA,SAIT,SAASG,EAAmBF,EAAe,CACzC,OAAO,WAAWA,EAAM,QAAQ,KAAM,EAAE,CAAC,CAC3C,CAFSC,EAAAC,EAAA,sBAIF,SAASC,EACdC,EACA,CACA,GACEA,GAAU,MACVA,IAAW,IACX,OAAO,MAAMA,CAAM,GACnB,MAAM,QAAQA,CAAM,GACpB,OAAOA,GAAW,UAElB,OAAO,KAGT,IAAIC,EAEJ,OAAI,OAAOD,GAAW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IiC,CAC7B,CACF,CAAC,EAEIF,CACT,CA3DS/C,EAAA4C,EAAA,0BA6DF,SAASO,EACdhC,EACAL,EACAsC,EACA,CACA,IAAMC,EAAoBD,GAAQ,oBAC9BjC,EACAyB,EAAuBzB,EAAYL,CAAM,EACvCwC,EAAsBtB,EAAqBqB,EAAmBvC,CAAM,EACpEyC,EAA+BhD,EAAiB+C,CAAmB,EACnEE,EAA0B5C,EAC9B2C,CACF,EAKA,OAJ2B1C,EACzB2C,EACA1C,CACF,CAEF,CAlBgBd,EAAAmD,EAAA,qBAoBT,SAASM,EACdtC,EACAL,EACAsC,EAA2C,CACzC,oBAAqB,EACvB,EACA,CAMA,OALqBD,EAAkBhC,EAAYL,EAAQ,CAGzD,oBAAqBsC,GAAQ,mBAC/B,CAAC,CAEH,CAbgBpD,EAAAyD,EAAA","names":["get","textInputTypes","checkboxTypes","supportedTypes","round","value","__name","convertToValidCost","convertToCents","amount","validAmount","convertFromCents","normalizedValue","trimStringValues","values","result","key","item","convertEmptyStringsToNull","prefillReadOnlyFields","fields","newValues","field","fieldName","extractFieldsetFieldsValues","formValues","nestedAcc","subField","fieldTypesTransformations","countryNames","countryName","country","selectedCountries","option","selectedCountry","getCountryValue","opt","castValue","parseFormValuesToAPI","acc","fieldset","nestedFormValues","transformedFields","parsedFieldValues","fieldValues","extraField","formValue","fieldTransformValueToAPI","isFieldVisible","applyFieldDynamicProperties","excludeValuesInvisible","keepTruthyInvisibleValues","parentFieldKeyPath","valuesAsked","fieldKeyPath","valueOfField","get","parseSubmitValues","config","visibleFormValues","convertedFormValues","formValuesWithTrimmedStrings","formValuesWithUndefined","parseJSFToValidate"]}
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-AYDF3IFZ.js";import{createContext as e,useContext as o}from"react";var r=e({formId:void 0,contractAmendmentBag:null}),c=n(()=>{let t=o(r);if(!t.contractAmendmentBag)throw new Error("useContractAmendmentContext must be used within a ContractAmendmentProvider");return{formId:t.formId,contractAmendment:t.contractAmendmentBag}},"useContractAmendmentContext");export{r as a,c as b};
2
+ //# sourceMappingURL=chunk-6HGUGIYJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractAmendment/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { useContractAmendment } from './hooks';\n\nexport const ContractAmendmentContext = createContext<{\n formId: string | undefined;\n contractAmendmentBag: ReturnType<typeof useContractAmendment> | null;\n}>({ formId: undefined, contractAmendmentBag: null });\n\nexport const useContractAmendmentContext = () => {\n const context = useContext(ContractAmendmentContext);\n if (!context.contractAmendmentBag) {\n throw new Error(\n 'useContractAmendmentContext must be used within a ContractAmendmentProvider',\n );\n }\n\n return {\n formId: context.formId,\n contractAmendment: context.contractAmendmentBag,\n } as const;\n};\n"],"mappings":"wCAAA,OAAS,iBAAAA,EAAe,cAAAC,MAAkB,QAGnC,IAAMC,EAA2BC,EAGrC,CAAE,OAAQ,OAAW,qBAAsB,IAAK,CAAC,EAEvCC,EAA8BC,EAAA,IAAM,CAC/C,IAAMC,EAAUC,EAAWL,CAAwB,EACnD,GAAI,CAACI,EAAQ,qBACX,MAAM,IAAI,MACR,6EACF,EAGF,MAAO,CACL,OAAQA,EAAQ,OAChB,kBAAmBA,EAAQ,oBAC7B,CACF,EAZ2C","names":["createContext","useContext","ContractAmendmentContext","createContext","useContractAmendmentContext","__name","context","useContext"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-A7ZJQCNU.js.map
@@ -0,0 +1,2 @@
1
+ import{b as n}from"./chunk-DZYFSFZ7.js";import{b as r}from"./chunk-FI76EKUS.js";import{a as o}from"./chunk-AYDF3IFZ.js";import e from"react";function B(t){let{formId:i}=n();return e.createElement(r,{...t,form:i},t.children)}o(B,"TerminationSubmit");export{B as a};
2
+ //# sourceMappingURL=chunk-CKGTR44U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/TerminationSubmit.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useTerminationContext } from './context';\n\nexport function TerminationSubmit(\n props: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>,\n) {\n const { formId } = useTerminationContext();\n\n return (\n <Button {...props} form={formId}>\n {props.children}\n </Button>\n );\n}\n"],"mappings":"wHACA,OAAOA,MAAwD,QAGxD,SAASC,EACdC,EACA,CACA,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAsB,EAEzC,OACEC,EAAA,cAACC,EAAA,CAAQ,GAAGJ,EAAO,KAAMC,GACtBD,EAAM,QACT,CAEJ,CAVgBK,EAAAN,EAAA","names":["React","TerminationSubmit","props","formId","useTerminationContext","React","Button","__name"]}
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-AYDF3IFZ.js";import{createContext as e,useContext as o}from"react";var r=e({formId:void 0,terminationBag:null}),m=n(()=>{let t=o(r);if(!t.formId||!t.terminationBag)throw new Error("useTerminationContext must be used within a TerminationContextProvider");return{formId:t.formId,terminationBag:t.terminationBag}},"useTerminationContext");export{r as a,m as b};
2
+ //# sourceMappingURL=chunk-DZYFSFZ7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/context.ts"],"sourcesContent":["import type { useTermination } from '@/src/flows/Termination/hooks';\nimport { createContext, useContext } from 'react';\n\nexport const TerminationContext = createContext<{\n formId: string | undefined;\n terminationBag: ReturnType<typeof useTermination> | null;\n}>({\n formId: undefined,\n terminationBag: null,\n});\n\nexport const useTerminationContext = () => {\n const context = useContext(TerminationContext);\n if (!context.formId || !context.terminationBag) {\n throw new Error(\n 'useTerminationContext must be used within a TerminationContextProvider',\n );\n }\n\n return {\n formId: context.formId,\n terminationBag: context.terminationBag,\n } as const;\n};\n"],"mappings":"wCACA,OAAS,iBAAAA,EAAe,cAAAC,MAAkB,QAEnC,IAAMC,EAAqBC,EAG/B,CACD,OAAQ,OACR,eAAgB,IAClB,CAAC,EAEYC,EAAwBC,EAAA,IAAM,CACzC,IAAMC,EAAUC,EAAWL,CAAkB,EAC7C,GAAI,CAACI,EAAQ,QAAU,CAACA,EAAQ,eAC9B,MAAM,IAAI,MACR,wEACF,EAGF,MAAO,CACL,OAAQA,EAAQ,OAChB,eAAgBA,EAAQ,cAC1B,CACF,EAZqC","names":["createContext","useContext","TerminationContext","createContext","useTerminationContext","__name","context","useContext"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-FZ7FWFJX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-AYDF3IFZ.js";import{formDataBodySerializer as i}from"@hey-api/client-fetch";import{createClient as o,createConfig as n}from"@hey-api/client-fetch";var r=o(n({baseUrl:"https://gateway.remote.com/"}));var c=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var h=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var d=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimation");var m=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-pdf",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationPdf");var u=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateContractAmendment");var E=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/countries",...e}),"getIndexCountry");var y=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment");var w=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var C=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/automatable",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postAutomatableContractAmendment");var O=t(e=>(e?.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");export{r as a,c as b,h as c,d,m as e,u as f,E as g,y as h,w as i,C as j,O as k};
2
+ //# sourceMappingURL=chunk-G2GI6FEO.js.map