@remoteoss/remote-flows 0.1.1 → 0.2.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 (195) hide show
  1. package/README.md +2 -0
  2. package/dist/chunk-2EKC7DK3.js +2 -0
  3. package/dist/chunk-2EKC7DK3.js.map +1 -0
  4. package/dist/chunk-36UPHOJS.js +2 -0
  5. package/dist/chunk-36UPHOJS.js.map +1 -0
  6. package/dist/chunk-37DREOGC.js +2 -0
  7. package/dist/chunk-37DREOGC.js.map +1 -0
  8. package/dist/chunk-55VACCVZ.js +2 -0
  9. package/dist/{chunk-5UXOVZY5.js.map → chunk-55VACCVZ.js.map} +1 -1
  10. package/dist/chunk-5DQBY2TR.js +2 -0
  11. package/dist/chunk-5DQBY2TR.js.map +1 -0
  12. package/dist/chunk-6HGUGIYJ.js +2 -0
  13. package/dist/chunk-6HGUGIYJ.js.map +1 -0
  14. package/dist/chunk-6LTJBLSD.js +2 -0
  15. package/dist/chunk-6LTJBLSD.js.map +1 -0
  16. package/dist/chunk-A7ZJQCNU.js +1 -0
  17. package/dist/chunk-AYFHWLQZ.js +2 -0
  18. package/dist/chunk-AYFHWLQZ.js.map +1 -0
  19. package/dist/chunk-CKGTR44U.js +2 -0
  20. package/dist/chunk-CKGTR44U.js.map +1 -0
  21. package/dist/chunk-CTG3DYJR.js +2 -0
  22. package/dist/chunk-CTG3DYJR.js.map +1 -0
  23. package/dist/chunk-DZYFSFZ7.js +2 -0
  24. package/dist/chunk-DZYFSFZ7.js.map +1 -0
  25. package/dist/chunk-EQBNHLR4.js +2 -0
  26. package/dist/chunk-EQBNHLR4.js.map +1 -0
  27. package/dist/chunk-F5QJZKDL.js +2 -0
  28. package/dist/{chunk-Q6GIPVSE.js.map → chunk-F5QJZKDL.js.map} +1 -1
  29. package/dist/chunk-FZ2HS6G7.js +2 -0
  30. package/dist/chunk-FZ2HS6G7.js.map +1 -0
  31. package/dist/chunk-FZ7FWFJX.js +1 -0
  32. package/dist/chunk-FZ7FWFJX.js.map +1 -0
  33. package/dist/chunk-GW7GG5ZW.js +2 -0
  34. package/dist/chunk-GW7GG5ZW.js.map +1 -0
  35. package/dist/chunk-HP7ZP256.js +2 -0
  36. package/dist/chunk-HP7ZP256.js.map +1 -0
  37. package/dist/chunk-IJPE22L7.js +2 -0
  38. package/dist/chunk-IJPE22L7.js.map +1 -0
  39. package/dist/chunk-IPZEZMLD.js +2 -0
  40. package/dist/chunk-IPZEZMLD.js.map +1 -0
  41. package/dist/chunk-JLUDKN4H.js +2 -0
  42. package/dist/chunk-JLUDKN4H.js.map +1 -0
  43. package/dist/chunk-JODJFARP.js +2 -0
  44. package/dist/chunk-JODJFARP.js.map +1 -0
  45. package/dist/chunk-JRQSZHUU.js +2 -0
  46. package/dist/chunk-JRQSZHUU.js.map +1 -0
  47. package/dist/chunk-KPSFJ6BN.js +2 -0
  48. package/dist/chunk-KPSFJ6BN.js.map +1 -0
  49. package/dist/chunk-LNF27NTC.js +2 -0
  50. package/dist/chunk-LNF27NTC.js.map +1 -0
  51. package/dist/chunk-N5AQSLAU.js +2 -0
  52. package/dist/chunk-N5AQSLAU.js.map +1 -0
  53. package/dist/{chunk-KQCZ2KSO.js → chunk-NBD4VOG3.js} +2 -2
  54. package/dist/{chunk-KQCZ2KSO.js.map → chunk-NBD4VOG3.js.map} +1 -1
  55. package/dist/chunk-RCX4JUI3.js +2 -0
  56. package/dist/chunk-RCX4JUI3.js.map +1 -0
  57. package/dist/chunk-S56EWAS4.js +2 -0
  58. package/dist/chunk-S56EWAS4.js.map +1 -0
  59. package/dist/chunk-SABMDOWE.js +2 -0
  60. package/dist/chunk-SABMDOWE.js.map +1 -0
  61. package/dist/chunk-SEUQNAF6.js +2 -0
  62. package/dist/chunk-SEUQNAF6.js.map +1 -0
  63. package/dist/chunk-VX2UC3HG.js +2 -0
  64. package/dist/chunk-VX2UC3HG.js.map +1 -0
  65. package/dist/chunk-W5DG5WWJ.js +2 -0
  66. package/dist/chunk-W5DG5WWJ.js.map +1 -0
  67. package/dist/chunk-XFD3ULUF.js +2 -0
  68. package/dist/chunk-XFD3ULUF.js.map +1 -0
  69. package/dist/chunk-XULIEA44.js +2 -0
  70. package/dist/{chunk-YNLDKIE4.js.map → chunk-XULIEA44.js.map} +1 -1
  71. package/dist/{chunk-VV7RML2Q.js → chunk-YAHWFLDH.js} +2 -2
  72. package/dist/chunk-YBACB5A6.js +2 -0
  73. package/dist/chunk-YBACB5A6.js.map +1 -0
  74. package/dist/flows/ContractAmendment/ContractAmendmentBack.d.ts +5 -0
  75. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +2 -0
  76. package/dist/flows/ContractAmendment/ContractAmendmentBack.js.map +1 -0
  77. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +30 -0
  78. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +2 -0
  79. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js.map +1 -0
  80. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +24 -7
  81. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  82. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +26 -3
  83. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  84. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.d.ts +1 -1
  85. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  86. package/dist/flows/ContractAmendment/context.d.ts +26 -24
  87. package/dist/flows/ContractAmendment/context.js +1 -1
  88. package/dist/flows/ContractAmendment/hooks.d.ts +94 -6
  89. package/dist/flows/ContractAmendment/hooks.js +1 -1
  90. package/dist/flows/ContractAmendment/index.d.ts +8 -5
  91. package/dist/flows/ContractAmendment/index.js +1 -1
  92. package/dist/flows/ContractAmendment/utils.d.ts +11 -0
  93. package/dist/flows/ContractAmendment/utils.js +2 -0
  94. package/dist/flows/ContractAmendment/utils.js.map +1 -0
  95. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +2 -2
  96. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  97. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +1 -1
  98. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  99. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  100. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  101. package/dist/flows/CostCalculator/context.d.ts +1 -1
  102. package/dist/flows/CostCalculator/hooks.d.ts +1 -1
  103. package/dist/flows/CostCalculator/hooks.js +1 -1
  104. package/dist/flows/CostCalculator/index.d.ts +1 -1
  105. package/dist/flows/CostCalculator/index.js +1 -1
  106. package/dist/flows/CostCalculator/types.d.ts +1 -1
  107. package/dist/flows/CostCalculator/utils.d.ts +1 -1
  108. package/dist/flows/CostCalculator/utils.js +1 -1
  109. package/dist/flows/Termination/TerminationBack.d.ts +5 -0
  110. package/dist/flows/Termination/TerminationBack.js +2 -0
  111. package/dist/flows/Termination/TerminationBack.js.map +1 -0
  112. package/dist/flows/Termination/TerminationFlow.d.ts +46 -0
  113. package/dist/flows/Termination/TerminationFlow.js +2 -0
  114. package/dist/flows/Termination/TerminationFlow.js.map +1 -0
  115. package/dist/flows/Termination/TerminationForm.d.ts +13 -0
  116. package/dist/flows/Termination/TerminationForm.js +2 -0
  117. package/dist/flows/Termination/TerminationForm.js.map +1 -0
  118. package/dist/flows/Termination/TerminationSubmit.d.ts +5 -0
  119. package/dist/flows/Termination/TerminationSubmit.js +2 -0
  120. package/dist/flows/Termination/TerminationSubmit.js.map +1 -0
  121. package/dist/flows/Termination/TimeOff.d.ts +11 -0
  122. package/dist/flows/Termination/TimeOff.js +2 -0
  123. package/dist/flows/Termination/TimeOff.js.map +1 -0
  124. package/dist/flows/Termination/context.d.ts +52 -0
  125. package/dist/flows/Termination/context.js +2 -0
  126. package/dist/flows/Termination/context.js.map +1 -0
  127. package/dist/flows/Termination/hooks.d.ts +86 -0
  128. package/dist/flows/Termination/hooks.js +2 -0
  129. package/dist/flows/Termination/hooks.js.map +1 -0
  130. package/dist/flows/Termination/index.d.ts +14 -0
  131. package/dist/flows/Termination/index.js +2 -0
  132. package/dist/flows/Termination/index.js.map +1 -0
  133. package/dist/flows/Termination/json-schemas/additionalInformation.d.ts +25 -0
  134. package/dist/flows/Termination/json-schemas/additionalInformation.js +2 -0
  135. package/dist/flows/Termination/json-schemas/additionalInformation.js.map +1 -0
  136. package/dist/flows/Termination/json-schemas/defaultSchema.d.ts +15 -0
  137. package/dist/flows/Termination/json-schemas/defaultSchema.js +2 -0
  138. package/dist/flows/Termination/json-schemas/defaultSchema.js.map +1 -0
  139. package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +133 -0
  140. package/dist/flows/Termination/json-schemas/employeeComunication.js +2 -0
  141. package/dist/flows/Termination/json-schemas/employeeComunication.js.map +1 -0
  142. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +339 -0
  143. package/dist/flows/Termination/json-schemas/jsonSchema.js +2 -0
  144. package/dist/flows/Termination/json-schemas/jsonSchema.js.map +1 -0
  145. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +71 -0
  146. package/dist/flows/Termination/json-schemas/paidTimeOff.js +2 -0
  147. package/dist/flows/Termination/json-schemas/paidTimeOff.js.map +1 -0
  148. package/dist/flows/Termination/json-schemas/schema.d.ts +8 -0
  149. package/dist/flows/Termination/json-schemas/schema.js +2 -0
  150. package/dist/flows/Termination/json-schemas/schema.js.map +1 -0
  151. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +126 -0
  152. package/dist/flows/Termination/json-schemas/terminationDetails.js +2 -0
  153. package/dist/flows/Termination/json-schemas/terminationDetails.js.map +1 -0
  154. package/dist/flows/Termination/types.d.ts +23 -0
  155. package/dist/flows/Termination/types.js +1 -0
  156. package/dist/flows/Termination/types.js.map +1 -0
  157. package/dist/flows/Termination/utils.d.ts +8 -0
  158. package/dist/flows/Termination/utils.js +2 -0
  159. package/dist/flows/Termination/utils.js.map +1 -0
  160. package/dist/flows/useStepState.d.ts +49 -0
  161. package/dist/flows/useStepState.js +2 -0
  162. package/dist/flows/useStepState.js.map +1 -0
  163. package/dist/flows/utils.d.ts +20 -1
  164. package/dist/flows/utils.js +1 -1
  165. package/dist/index.css +1 -1
  166. package/dist/index.css.map +1 -1
  167. package/dist/index.d.ts +69 -8
  168. package/dist/index.js +1 -1
  169. package/dist/index.js.map +1 -1
  170. package/dist/mutations-v9H353tz.d.ts +10 -0
  171. package/dist/{types.gen-DCJSPsGk.d.ts → types.gen-BgLeTAqP.d.ts} +1 -1
  172. package/package.json +2 -1
  173. package/dist/chunk-4QHHDFB2.js +0 -2
  174. package/dist/chunk-4QHHDFB2.js.map +0 -1
  175. package/dist/chunk-5UXOVZY5.js +0 -2
  176. package/dist/chunk-ANPGCYMT.js +0 -2
  177. package/dist/chunk-ANPGCYMT.js.map +0 -1
  178. package/dist/chunk-GCF5EF2A.js +0 -2
  179. package/dist/chunk-GCF5EF2A.js.map +0 -1
  180. package/dist/chunk-GKEURJR4.js +0 -2
  181. package/dist/chunk-GKEURJR4.js.map +0 -1
  182. package/dist/chunk-KY7BGW6H.js +0 -2
  183. package/dist/chunk-KY7BGW6H.js.map +0 -1
  184. package/dist/chunk-MKJHD77O.js +0 -1
  185. package/dist/chunk-Q6GIPVSE.js +0 -2
  186. package/dist/chunk-UTCIIPYZ.js +0 -2
  187. package/dist/chunk-UTCIIPYZ.js.map +0 -1
  188. package/dist/chunk-VTAHQOKR.js +0 -2
  189. package/dist/chunk-VTAHQOKR.js.map +0 -1
  190. package/dist/chunk-YGP3O2VJ.js +0 -2
  191. package/dist/chunk-YGP3O2VJ.js.map +0 -1
  192. package/dist/chunk-YNLDKIE4.js +0 -2
  193. package/dist/hooks-BQWrl9Bj.d.ts +0 -50
  194. /package/dist/{chunk-MKJHD77O.js.map → chunk-A7ZJQCNU.js.map} +0 -0
  195. /package/dist/{chunk-VV7RML2Q.js.map → chunk-YAHWFLDH.js.map} +0 -0
@@ -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: (field: any) => (value: string | boolean) => {\n if (value === undefined) {\n return false;\n }\n\n if (field.const && value === true) {\n return field.const;\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;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oBT,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,5 @@
1
+ import React__default, { PropsWithChildren, ButtonHTMLAttributes } from 'react';
2
+
3
+ declare function ContractAmendmentBack({ children, ...props }: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>): React__default.JSX.Element;
4
+
5
+ export { ContractAmendmentBack };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-37DREOGC.js";import"../../chunk-FI76EKUS.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentBack};
2
+ //# sourceMappingURL=ContractAmendmentBack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,30 @@
1
+ import { b as PostCreateContractAmendmentError, a as ContractAmendmentResponse } from '../../types.gen-BgLeTAqP.js';
2
+ import React__default from 'react';
3
+ import { FieldValues } from 'react-hook-form';
4
+
5
+ type ContractAmendmentConfirmationFormProps = {
6
+ /**
7
+ * Callback function to be called when the contract amendment form is submitted.
8
+ * This function is called before the contract amendment is submitted.
9
+ * It can be used to perform any additional validation or processing before
10
+ * the contract amendment is submitted.
11
+ * @param values
12
+ * @returns
13
+ */
14
+ onSubmit?: (values: FieldValues) => Promise<void>;
15
+ /**
16
+ * Callback function to be called when the contract amendment fails.
17
+ * @param error
18
+ * @returns
19
+ */
20
+ onError?: (error: PostCreateContractAmendmentError) => void;
21
+ /**
22
+ * Callback function to be called when the contract amendment is successfully submitted.
23
+ * @param data
24
+ * @returns
25
+ */
26
+ onSuccess?: (data: ContractAmendmentResponse) => void;
27
+ };
28
+ declare function ContractAmendmentConfirmationForm({ onSubmit, onError, onSuccess, }: ContractAmendmentConfirmationFormProps): React__default.JSX.Element | null;
29
+
30
+ export { ContractAmendmentConfirmationForm };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-IJPE22L7.js";import"../../chunk-N5AQSLAU.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentConfirmationForm};
2
+ //# sourceMappingURL=ContractAmendmentConfirmationForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,19 +1,36 @@
1
+ import { ContractAmendmentConfirmationForm } from './ContractAmendmentConfirmationForm.js';
1
2
  import React__default from 'react';
3
+ import { ContractAmendmentBack } from './ContractAmendmentBack.js';
2
4
  import { ContractAmendmentForm } from './ContractAmendmentForm.js';
3
5
  import { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
4
- import { u as useContractAmendment } from '../../hooks-BQWrl9Bj.js';
6
+ import { useContractAmendment } from './hooks.js';
5
7
  import { ContractAmendmentParams } from './types.js';
6
- import '../../types.gen-DCJSPsGk.js';
7
- import 'yup';
8
- import '@remoteoss/json-schema-form';
8
+ import '../../types.gen-BgLeTAqP.js';
9
9
  import 'react-hook-form';
10
+ import '../../mutations-v9H353tz.js';
11
+ import '@remoteoss/json-schema-form';
12
+ import '../useStepState.js';
10
13
 
11
14
  type TUseContractAmendment = ReturnType<typeof useContractAmendment>;
12
15
  type RenderProps = {
16
+ /**
17
+ * The contract amendment bag returned by the useContractAmendment hook.
18
+ * This bag contains all the methods and properties needed to handle the contract amendment flow.
19
+ * @see {@link useContractAmendment}
20
+ */
13
21
  contractAmendmentBag: TUseContractAmendment;
22
+ /**
23
+ * The components used in the contract amendment flow.
24
+ * This includes the form, submit button, and confirmation form.
25
+ * @see {@link ContractAmendmentForm}
26
+ * @see {@link ContractAmendmentSubmit}
27
+ * @see {@link ContractAmendmentConfirmationForm}
28
+ */
14
29
  components: {
15
- ContractAmendmentForm: typeof ContractAmendmentForm;
16
- ContractAmendmentSubmit: typeof ContractAmendmentSubmit;
30
+ Form: typeof ContractAmendmentForm;
31
+ SubmitButton: typeof ContractAmendmentSubmit;
32
+ ConfirmationForm: typeof ContractAmendmentConfirmationForm;
33
+ BackButton: typeof ContractAmendmentBack;
17
34
  };
18
35
  };
19
36
  type ContractAmendmentFlowProps = ContractAmendmentParams & {
@@ -21,4 +38,4 @@ type ContractAmendmentFlowProps = ContractAmendmentParams & {
21
38
  };
22
39
  declare function ContractAmendmentFlow({ employmentId, countryCode, options, render, }: ContractAmendmentFlowProps): React__default.JSX.Element;
23
40
 
24
- export { ContractAmendmentFlow };
41
+ export { ContractAmendmentFlow, type RenderProps };
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-YGP3O2VJ.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-KY7BGW6H.js";import"../../chunk-UTCIIPYZ.js";import"../../chunk-4QHHDFB2.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-GCF5EF2A.js";import"../../chunk-GKEURJR4.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-VTAHQOKR.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentFlow};
1
+ import{a}from"../../chunk-2EKC7DK3.js";import"../../chunk-5DQBY2TR.js";import"../../chunk-GW7GG5ZW.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-JLUDKN4H.js";import"../../chunk-RCX4JUI3.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-S56EWAS4.js";import"../../chunk-37DREOGC.js";import"../../chunk-IJPE22L7.js";import"../../chunk-6LTJBLSD.js";import"../../chunk-AYFHWLQZ.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-FI76EKUS.js";import"../../chunk-N5AQSLAU.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentFlow};
2
2
  //# sourceMappingURL=ContractAmendmentFlow.js.map
@@ -1,9 +1,32 @@
1
+ import { P as PostAutomatableContractAmendmentError, C as ContractAmendmentAutomatableResponse } from '../../types.gen-BgLeTAqP.js';
1
2
  import React__default from 'react';
3
+ import { FieldValues } from 'react-hook-form';
2
4
 
3
5
  type ContractAmendmentFormProps = {
4
- onSubmit?: (values: any) => Promise<void>;
5
- onError?: (error: any) => void;
6
- onSuccess?: (data: any) => void;
6
+ /**
7
+ * Callback function to be called when the contract amendment form is submitted.
8
+ * This function is called before the contract amendment is submitted.
9
+ * It can be used to perform any additional validation or processing before
10
+ * the contract amendment is submitted.
11
+ * @param values
12
+ * @returns
13
+ */
14
+ onSubmit?: (values: FieldValues) => Promise<void>;
15
+ /**
16
+ * Callback function to be called when the contract amendment fails.
17
+ * @param error
18
+ * @returns
19
+ */
20
+ onError?: (error: PostAutomatableContractAmendmentError | {
21
+ message: 'no_changes_detected_contract_details';
22
+ }) => void;
23
+ /**
24
+ * Callback function to be called when the contract amendment is successfully submitted.
25
+ * This function is called after the contract amendment is submitted.
26
+ * @param data
27
+ * @returns
28
+ */
29
+ onSuccess?: (data: ContractAmendmentAutomatableResponse) => void;
7
30
  };
8
31
  declare function ContractAmendmentForm({ onSubmit, onError, onSuccess, }: ContractAmendmentFormProps): React__default.JSX.Element;
9
32
 
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-KY7BGW6H.js";import"../../chunk-UTCIIPYZ.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-GCF5EF2A.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentForm};
1
+ import{a}from"../../chunk-6LTJBLSD.js";import"../../chunk-AYFHWLQZ.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-FI76EKUS.js";import"../../chunk-N5AQSLAU.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentForm};
2
2
  //# sourceMappingURL=ContractAmendmentForm.js.map
@@ -1,5 +1,5 @@
1
1
  import React__default, { PropsWithChildren, ButtonHTMLAttributes } from 'react';
2
2
 
3
- declare function ContractAmendmentSubmit(props: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>): React__default.JSX.Element;
3
+ declare function ContractAmendmentSubmit({ children, ...props }: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>): React__default.JSX.Element;
4
4
 
5
5
  export { ContractAmendmentSubmit };
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-4QHHDFB2.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-GCF5EF2A.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentSubmit};
1
+ import{a}from"../../chunk-5DQBY2TR.js";import"../../chunk-FI76EKUS.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentSubmit};
2
2
  //# sourceMappingURL=ContractAmendmentSubmit.js.map
@@ -1,48 +1,49 @@
1
- import { u as useContractAmendment, S as SuccessResponse, E as ErrorResponse } from '../../hooks-BQWrl9Bj.js';
2
- import * as yup from 'yup';
3
- import { C as ContractAmendmentResponse, P as PostCreateContractAmendmentError } from '../../types.gen-DCJSPsGk.js';
1
+ import { S as SuccessResponse, E as ErrorResponse } from '../../mutations-v9H353tz.js';
2
+ import { C as ContractAmendmentAutomatableResponse, P as PostAutomatableContractAmendmentError, a as ContractAmendmentResponse, b as PostCreateContractAmendmentError } from '../../types.gen-BgLeTAqP.js';
4
3
  import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
5
4
  import * as React from 'react';
6
5
  import * as react_hook_form from 'react-hook-form';
7
- import { UseFormReturn } from 'react-hook-form';
6
+ import { useContractAmendment } from './hooks.js';
7
+ import { Step } from '../useStepState.js';
8
8
  import './types.js';
9
9
 
10
- type ContractAmendmentFormValues = {
11
- effective_date: string;
12
- job_title: string | undefined;
13
- additional_comments: string;
14
- };
15
10
  declare const ContractAmendmentContext: React.Context<{
16
- form: UseFormReturn<ContractAmendmentFormValues> | null;
17
11
  formId: string | undefined;
18
12
  contractAmendmentBag: ReturnType<typeof useContractAmendment> | null;
19
13
  }>;
20
14
  declare const useContractAmendmentContext: () => {
21
- readonly form: UseFormReturn<ContractAmendmentFormValues>;
22
15
  readonly formId: string | undefined;
23
16
  readonly contractAmendment: {
24
17
  stepState: {
25
- current: number;
26
- total: number;
27
- isLastStep: boolean;
18
+ currentStep: Step;
19
+ totalSteps: number;
20
+ values: {
21
+ form: react_hook_form.FieldValues;
22
+ confirmation_form: react_hook_form.FieldValues;
23
+ } | null;
28
24
  };
29
25
  fields: _remoteoss_json_schema_form.Fields;
30
26
  isLoading: boolean;
27
+ isError: boolean;
28
+ error: Error | null;
31
29
  isSubmitting: boolean;
32
- initialValues: {
33
- effective_date: string;
34
- reason_for_change: string;
35
- job_title: string | undefined;
36
- additional_comments: string;
37
- annual_gross_salary: number | null;
38
- };
39
- validationSchema: yup.AnyObjectSchema;
30
+ initialValues: {};
31
+ values: react_hook_form.FieldValues;
40
32
  handleValidation: (values: react_hook_form.FieldValues) => {
41
33
  yupError: _remoteoss_json_schema_form.$TSFixMe;
42
34
  formErrors: _remoteoss_json_schema_form.$TSFixMe;
43
35
  } | null;
44
- checkFieldUpdates: (values: react_hook_form.FieldValues) => void;
36
+ checkFieldUpdates: React.Dispatch<React.SetStateAction<react_hook_form.FieldValues>>;
45
37
  onSubmit: (values: react_hook_form.FieldValues) => Promise<SuccessResponse<({
38
+ data: ContractAmendmentAutomatableResponse;
39
+ error: undefined;
40
+ } | {
41
+ data: undefined;
42
+ error: PostAutomatableContractAmendmentError;
43
+ }) & {
44
+ request: Request;
45
+ response: Response;
46
+ }> | ErrorResponse<Error> | SuccessResponse<({
46
47
  data: ContractAmendmentResponse;
47
48
  error: undefined;
48
49
  } | {
@@ -51,7 +52,8 @@ declare const useContractAmendmentContext: () => {
51
52
  }) & {
52
53
  request: Request;
53
54
  response: Response;
54
- }> | ErrorResponse<Error>>;
55
+ }>>;
56
+ back: () => void;
55
57
  };
56
58
  };
57
59
 
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../chunk-GCF5EF2A.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentContext,b as useContractAmendmentContext};
1
+ import{a,b}from"../../chunk-6HGUGIYJ.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentContext,b as useContractAmendmentContext};
2
2
  //# sourceMappingURL=context.js.map
@@ -1,6 +1,94 @@
1
- export { u as useContractAmendment } from '../../hooks-BQWrl9Bj.js';
2
- import '../../types.gen-DCJSPsGk.js';
3
- import 'yup';
4
- import '@remoteoss/json-schema-form';
5
- import './types.js';
6
- import 'react-hook-form';
1
+ import { S as SuccessResponse, E as ErrorResponse } from '../../mutations-v9H353tz.js';
2
+ import { C as ContractAmendmentAutomatableResponse, P as PostAutomatableContractAmendmentError, a as ContractAmendmentResponse, b as PostCreateContractAmendmentError } from '../../types.gen-BgLeTAqP.js';
3
+ import * as React from 'react';
4
+ import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
5
+ import { Step } from '../useStepState.js';
6
+ import { ContractAmendmentParams } from './types.js';
7
+ import { FieldValues } from 'react-hook-form';
8
+
9
+ declare const useContractAmendment: ({ employmentId, countryCode, options, }: ContractAmendmentParams) => {
10
+ /**
11
+ * Current step state containing the current step and total number of steps
12
+ */
13
+ stepState: {
14
+ currentStep: Step;
15
+ totalSteps: number;
16
+ values: {
17
+ form: FieldValues;
18
+ confirmation_form: FieldValues;
19
+ } | null;
20
+ };
21
+ /**
22
+ * Array of form fields from the contract amendment schema
23
+ */
24
+ fields: _remoteoss_json_schema_form.Fields;
25
+ /**
26
+ * Loading state indicating if either employment or contract amendment data is being fetched
27
+ */
28
+ isLoading: boolean;
29
+ /**
30
+ * Error state indicating if there was an error fetching either employment or contract amendment data
31
+ */
32
+ isError: boolean;
33
+ /**
34
+ * Error object containing details about any errors that occurred during data fetching
35
+ */
36
+ error: Error | null;
37
+ /**
38
+ * Loading state indicating if a contract amendment mutation is in progress
39
+ */
40
+ isSubmitting: boolean;
41
+ /**
42
+ * Initial form values built from employment data and contract amendment fields
43
+ */
44
+ initialValues: {};
45
+ /**
46
+ * Current form field values
47
+ */
48
+ values: FieldValues;
49
+ /**
50
+ * Function to validate form values against the contract amendment schema
51
+ * @param values - Form values to validate
52
+ * @returns Validation result or null if no schema is available
53
+ */
54
+ handleValidation: (values: FieldValues) => {
55
+ yupError: _remoteoss_json_schema_form.$TSFixMe;
56
+ formErrors: _remoteoss_json_schema_form.$TSFixMe;
57
+ } | null;
58
+ /**
59
+ * Function to update the current form field values
60
+ * @param values - New form values to set
61
+ */
62
+ checkFieldUpdates: React.Dispatch<React.SetStateAction<FieldValues>>;
63
+ /**
64
+ * Function to handle form submission
65
+ * @param values - Form values to submit
66
+ * @returns Promise resolving to the mutation result
67
+ */
68
+ onSubmit: (values: FieldValues) => Promise<SuccessResponse<({
69
+ data: ContractAmendmentAutomatableResponse;
70
+ error: undefined;
71
+ } | {
72
+ data: undefined;
73
+ error: PostAutomatableContractAmendmentError;
74
+ }) & {
75
+ request: Request;
76
+ response: Response;
77
+ }> | ErrorResponse<Error> | SuccessResponse<({
78
+ data: ContractAmendmentResponse;
79
+ error: undefined;
80
+ } | {
81
+ data: undefined;
82
+ error: PostCreateContractAmendmentError;
83
+ }) & {
84
+ request: Request;
85
+ response: Response;
86
+ }>>;
87
+ /**
88
+ * Function to handle going back to the previous step
89
+ * @returns {void}
90
+ */
91
+ back: () => void;
92
+ };
93
+
94
+ export { useContractAmendment };
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-GKEURJR4.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-VTAHQOKR.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as useContractAmendment};
1
+ import{a}from"../../chunk-GW7GG5ZW.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-JLUDKN4H.js";import"../../chunk-RCX4JUI3.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-S56EWAS4.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as useContractAmendment};
2
2
  //# sourceMappingURL=hooks.js.map
@@ -1,10 +1,13 @@
1
- export { ContractAmendmentFlow } from './ContractAmendmentFlow.js';
1
+ export { ContractAmendmentConfirmationForm } from './ContractAmendmentConfirmationForm.js';
2
+ export { ContractAmendmentFlow, RenderProps } from './ContractAmendmentFlow.js';
2
3
  export { ContractAmendmentForm } from './ContractAmendmentForm.js';
3
4
  export { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
4
- export { u as useContractAmendment } from '../../hooks-BQWrl9Bj.js';
5
+ export { useContractAmendment } from './hooks.js';
6
+ import '../../types.gen-BgLeTAqP.js';
5
7
  import 'react';
8
+ import 'react-hook-form';
9
+ import './ContractAmendmentBack.js';
6
10
  import './types.js';
7
- import '../../types.gen-DCJSPsGk.js';
8
- import 'yup';
11
+ import '../../mutations-v9H353tz.js';
9
12
  import '@remoteoss/json-schema-form';
10
- import 'react-hook-form';
13
+ import '../useStepState.js';
@@ -1,2 +1,2 @@
1
- import"../../chunk-MKJHD77O.js";import{a as d}from"../../chunk-YGP3O2VJ.js";import"../../chunk-A4RX3KRZ.js";import{a}from"../../chunk-KY7BGW6H.js";import"../../chunk-UTCIIPYZ.js";import{a as b}from"../../chunk-4QHHDFB2.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-GCF5EF2A.js";import{a as c}from"../../chunk-GKEURJR4.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-VTAHQOKR.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{d as ContractAmendmentFlow,a as ContractAmendmentForm,b as ContractAmendmentSubmit,c as useContractAmendment};
1
+ import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-2EKC7DK3.js";import{a as c}from"../../chunk-5DQBY2TR.js";import{a as d}from"../../chunk-GW7GG5ZW.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-JLUDKN4H.js";import"../../chunk-RCX4JUI3.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-S56EWAS4.js";import"../../chunk-37DREOGC.js";import{a}from"../../chunk-IJPE22L7.js";import{a as b}from"../../chunk-6LTJBLSD.js";import"../../chunk-AYFHWLQZ.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-FI76EKUS.js";import"../../chunk-N5AQSLAU.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentConfirmationForm,e as ContractAmendmentFlow,b as ContractAmendmentForm,c as ContractAmendmentSubmit,d as useContractAmendment};
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
1
+ import { E as EmploymentShowResponse } from '../../types.gen-BgLeTAqP.js';
2
+ import { Fields } from '@remoteoss/json-schema-form';
3
+ import { Step } from '../useStepState.js';
4
+ import 'react';
5
+ import 'react-hook-form';
6
+
7
+ type StepKeys = 'form' | 'confirmation_form';
8
+ declare const STEPS: Record<StepKeys, Step>;
9
+ declare function buildInitialValues(employment: EmploymentShowResponse | undefined, fields?: Fields | undefined): {};
10
+
11
+ export { STEPS, buildInitialValues };
@@ -0,0 +1,2 @@
1
+ import{a,b}from"../../chunk-RCX4JUI3.js";import"../../chunk-YBACB5A6.js";import"../../chunk-AYDF3IFZ.js";export{a as STEPS,b as buildInitialValues};
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -3,7 +3,7 @@ import { CostCalculatorEstimationOptions, JSFModify } from './types.js';
3
3
  import React__default from 'react';
4
4
  import 'yup';
5
5
  import '@tanstack/react-query';
6
- import '../../types.gen-DCJSPsGk.js';
6
+ import '../../types.gen-BgLeTAqP.js';
7
7
  import '../types.js';
8
8
  import '@remoteoss/json-schema-form';
9
9
 
@@ -34,6 +34,6 @@ type CostCalculatorFlowProps = {
34
34
  };
35
35
  render: (costCalculatorBag: ReturnType<typeof useCostCalculator>) => React__default.ReactNode;
36
36
  };
37
- declare const CostCalculatorFlow: ({ estimationOptions, defaultValues, options, render, }: CostCalculatorFlowProps) => string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | React__default.JSX.Element | null | undefined;
37
+ declare const CostCalculatorFlow: ({ estimationOptions, defaultValues, options, render, }: CostCalculatorFlowProps) => React__default.JSX.Element;
38
38
 
39
39
  export { CostCalculatorFlow, type CostCalculatorFlowProps };
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-Q6GIPVSE.js";import"../../chunk-KQCZ2KSO.js";import"../../chunk-UPRUP24B.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as CostCalculatorFlow};
1
+ import{a}from"../../chunk-F5QJZKDL.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-NBD4VOG3.js";import"../../chunk-UPRUP24B.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as CostCalculatorFlow};
2
2
  //# sourceMappingURL=CostCalculatorFlow.js.map
@@ -1,4 +1,4 @@
1
- import { a as CostCalculatorEstimateResponse } from '../../types.gen-DCJSPsGk.js';
1
+ import { c as CostCalculatorEstimateResponse } from '../../types.gen-BgLeTAqP.js';
2
2
  import { EstimationError } from './hooks.js';
3
3
  import { CostCalculatorEstimationFormValues } from './types.js';
4
4
  import React__default from 'react';
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-YNLDKIE4.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-UTCIIPYZ.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as CostCalculatorForm};
1
+ import{a}from"../../chunk-XULIEA44.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-AYFHWLQZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-FI76EKUS.js";import"../../chunk-N5AQSLAU.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as CostCalculatorForm};
2
2
  //# sourceMappingURL=CostCalculatorForm.js.map
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { a as CostCalculatorEstimateResponse } from '../../../types.gen-DCJSPsGk.js';
2
+ import { c as CostCalculatorEstimateResponse } from '../../../types.gen-BgLeTAqP.js';
3
3
 
4
4
  interface CostCalculatorResultProps {
5
5
  employmentData: CostCalculatorEstimateResponse['data'];
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-VV7RML2Q.js";import"../../../chunk-YVC4OEFJ.js";import"../../../chunk-XEQTLVMV.js";import"../../../chunk-DOA6BAUQ.js";import"../../../chunk-J2RINDSC.js";import"../../../chunk-4F7PYKUZ.js";import"../../../chunk-AD7ZWPEI.js";import"../../../chunk-FCRDQVTB.js";import"../../../chunk-FI76EKUS.js";import"../../../chunk-SJ56GVNV.js";import"../../../chunk-AYDF3IFZ.js";export{a as CostCalculatorResults};
1
+ import{a}from"../../../chunk-YAHWFLDH.js";import"../../../chunk-XEQTLVMV.js";import"../../../chunk-DOA6BAUQ.js";import"../../../chunk-J2RINDSC.js";import"../../../chunk-4F7PYKUZ.js";import"../../../chunk-AD7ZWPEI.js";import"../../../chunk-YVC4OEFJ.js";import"../../../chunk-FCRDQVTB.js";import"../../../chunk-FI76EKUS.js";import"../../../chunk-SJ56GVNV.js";import"../../../chunk-AYDF3IFZ.js";export{a as CostCalculatorResults};
2
2
  //# sourceMappingURL=CostCalculatorResults.js.map
@@ -2,7 +2,7 @@ import { Result } from '../types.js';
2
2
  import { useCostCalculator, EstimationError } from './hooks.js';
3
3
  import { CostCalculatorEstimationFormValues } from './types.js';
4
4
  import * as React from 'react';
5
- import { a as CostCalculatorEstimateResponse } from '../../types.gen-DCJSPsGk.js';
5
+ import { c as CostCalculatorEstimateResponse } from '../../types.gen-BgLeTAqP.js';
6
6
  import { $TSFixMe } from '@remoteoss/json-schema-form';
7
7
  import * as yup from 'yup';
8
8
  import { UseFormReturn } from 'react-hook-form';
@@ -1,7 +1,7 @@
1
1
  import * as yup from 'yup';
2
2
  import { ValidationError } from 'yup';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
- import { a as CostCalculatorEstimateResponse, b as PostCreateEstimationError, c as CostCalculatorEstimatePdfResponse, d as PostCreateEstimationPdfError, e as CostCalculatorEstimateParams } from '../../types.gen-DCJSPsGk.js';
4
+ import { c as CostCalculatorEstimateResponse, d as PostCreateEstimationError, e as CostCalculatorEstimatePdfResponse, f as PostCreateEstimationPdfError, g as CostCalculatorEstimateParams } from '../../types.gen-BgLeTAqP.js';
5
5
  import { CostCalculatorEstimationOptions, JSFModify, CostCalculatorEstimationFormValues } from './types.js';
6
6
  import { Result } from '../types.js';
7
7
  import '@remoteoss/json-schema-form';
@@ -1,2 +1,2 @@
1
- import{c as a,d as b,e as c}from"../../chunk-KQCZ2KSO.js";import"../../chunk-UPRUP24B.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{b as defaultEstimationOptions,c as useCostCalculator,a as useCostCalculatorEstimationPdf};
1
+ import{c as a,d as b,e as c}from"../../chunk-NBD4VOG3.js";import"../../chunk-UPRUP24B.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{b as defaultEstimationOptions,c as useCostCalculator,a as useCostCalculatorEstimationPdf};
2
2
  //# sourceMappingURL=hooks.js.map
@@ -8,7 +8,7 @@ export { disclaimerData } from './disclaimerUtils.js';
8
8
  export { CostCalculatorResults } from './Results/CostCalculatorResults.js';
9
9
  export { buildPayload as buildCostCalculatorEstimationPayload } from './utils.js';
10
10
  import './types.js';
11
- import '../../types.gen-DCJSPsGk.js';
11
+ import '../../types.gen-BgLeTAqP.js';
12
12
  import '@remoteoss/json-schema-form';
13
13
  import 'react';
14
14
  import 'yup';
@@ -1,2 +1,2 @@
1
- import"../../chunk-FGBEOUQK.js";import{a as j}from"../../chunk-VV7RML2Q.js";import"../../chunk-YVC4OEFJ.js";import"../../chunk-XEQTLVMV.js";import"../../chunk-DOA6BAUQ.js";import"../../chunk-J2RINDSC.js";import"../../chunk-4F7PYKUZ.js";import"../../chunk-AD7ZWPEI.js";import"../../chunk-FCRDQVTB.js";import{a as i}from"../../chunk-IJWDAD54.js";import{a as h}from"../../chunk-DYB3RWP7.js";import{a as d}from"../../chunk-Q6GIPVSE.js";import{b as a,c as b,e as c}from"../../chunk-KQCZ2KSO.js";import"../../chunk-UPRUP24B.js";import{a as e}from"../../chunk-YNLDKIE4.js";import{a as g}from"../../chunk-OCNLZSS7.js";import{a as f}from"../../chunk-NZFES56Y.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-UTCIIPYZ.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{i as CostCalculatorDisclaimer,d as CostCalculatorFlow,e as CostCalculatorForm,g as CostCalculatorResetButton,j as CostCalculatorResults,f as CostCalculatorSubmitButton,a as buildCostCalculatorEstimationPayload,h as disclaimerData,c as useCostCalculator,b as useCostCalculatorEstimationPdf};
1
+ import"../../chunk-FGBEOUQK.js";import{a as j}from"../../chunk-YAHWFLDH.js";import"../../chunk-XEQTLVMV.js";import"../../chunk-DOA6BAUQ.js";import"../../chunk-J2RINDSC.js";import"../../chunk-4F7PYKUZ.js";import"../../chunk-AD7ZWPEI.js";import"../../chunk-YVC4OEFJ.js";import"../../chunk-FCRDQVTB.js";import{a as e}from"../../chunk-XULIEA44.js";import{a as g}from"../../chunk-OCNLZSS7.js";import{a as f}from"../../chunk-NZFES56Y.js";import{a as i}from"../../chunk-IJWDAD54.js";import{a as h}from"../../chunk-DYB3RWP7.js";import{a as d}from"../../chunk-F5QJZKDL.js";import"../../chunk-OLJ2S6A6.js";import{b as a,c as b,e as c}from"../../chunk-NBD4VOG3.js";import"../../chunk-UPRUP24B.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-AYFHWLQZ.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-FI76EKUS.js";import"../../chunk-N5AQSLAU.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{i as CostCalculatorDisclaimer,d as CostCalculatorFlow,e as CostCalculatorForm,g as CostCalculatorResetButton,j as CostCalculatorResults,f as CostCalculatorSubmitButton,a as buildCostCalculatorEstimationPayload,h as disclaimerData,c as useCostCalculator,b as useCostCalculatorEstimationPdf};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { E as EmploymentTermType } from '../../types.gen-DCJSPsGk.js';
1
+ import { i as EmploymentTermType } from '../../types.gen-BgLeTAqP.js';
2
2
  import { modify } from '@remoteoss/json-schema-form';
3
3
 
4
4
  type CostCalculatorEstimationFormValues = {
@@ -1,4 +1,4 @@
1
- import { e as CostCalculatorEstimateParams } from '../../types.gen-DCJSPsGk.js';
1
+ import { g as CostCalculatorEstimateParams } from '../../types.gen-BgLeTAqP.js';
2
2
  import { $TSFixMe } from '@remoteoss/json-schema-form';
3
3
  import { AnyObjectSchema } from 'yup';
4
4
  import { CostCalculatorEstimationFormValues, CostCalculatorEstimationOptions } from './types.js';
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../chunk-KQCZ2KSO.js";import"../../chunk-UPRUP24B.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-5UXOVZY5.js";import"../../chunk-ANPGCYMT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{b as buildPayload,a as buildValidationSchema};
1
+ import{a,b}from"../../chunk-NBD4VOG3.js";import"../../chunk-UPRUP24B.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{b as buildPayload,a as buildValidationSchema};
2
2
  //# sourceMappingURL=utils.js.map