@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,5 @@
1
+ import React__default, { PropsWithChildren, ButtonHTMLAttributes } from 'react';
2
+
3
+ declare function TerminationBack({ children, ...props }: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>): React__default.JSX.Element;
4
+
5
+ export { TerminationBack };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-KPSFJ6BN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationBack};
2
+ //# sourceMappingURL=TerminationBack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,46 @@
1
+ import React__default from 'react';
2
+ import { useTermination } from './hooks.js';
3
+ import { JSFModify } from '../CostCalculator/types.js';
4
+ import { TerminationForm } from './TerminationForm.js';
5
+ import { TerminationSubmit } from './TerminationSubmit.js';
6
+ import { TimeOff } from './TimeOff.js';
7
+ import { TerminationBack } from './TerminationBack.js';
8
+ import '../../types.gen-BgLeTAqP.js';
9
+ import '../../mutations-v9H353tz.js';
10
+ import '@remoteoss/json-schema-form';
11
+ import '../useStepState.js';
12
+ import 'react-hook-form';
13
+ import './types.js';
14
+
15
+ type RenderProps = {
16
+ /**
17
+ * The termination bag returned by the useTermination hook.
18
+ * This bag contains all the methods and properties needed to handle the termination flow.
19
+ * @see {@link useTermination}
20
+ */
21
+ terminationBag: ReturnType<typeof useTermination>;
22
+ /**
23
+ * The components used in the contract amendment flow.
24
+ * This includes the form, submit button, and confirmation form.
25
+ * @see {@link TerminationForm}
26
+ * @see {@link TerminationSubmit}
27
+ * @see {@link TimeOff}
28
+ * @see {@link TerminationBack}
29
+ */
30
+ components: {
31
+ Form: typeof TerminationForm;
32
+ SubmitButton: typeof TerminationSubmit;
33
+ TimeOff: typeof TimeOff;
34
+ Back: typeof TerminationBack;
35
+ };
36
+ };
37
+ type TerminationFlowProps = {
38
+ employmentId: string;
39
+ render: ({ terminationBag, components }: RenderProps) => React__default.ReactNode;
40
+ options?: {
41
+ jsfModify?: JSFModify;
42
+ };
43
+ };
44
+ declare const TerminationFlow: ({ employmentId, render, options, }: TerminationFlowProps) => React__default.JSX.Element;
45
+
46
+ export { type RenderProps, TerminationFlow };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-LNF27NTC.js";import"../../chunk-SABMDOWE.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-CTG3DYJR.js";import"../../chunk-SEUQNAF6.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-IPZEZMLD.js";import"../../chunk-JODJFARP.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-FZ2HS6G7.js";import"../../chunk-KPSFJ6BN.js";import"../../chunk-HP7ZP256.js";import"../../chunk-CKGTR44U.js";import"../../chunk-EQBNHLR4.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-36UPHOJS.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-JLUDKN4H.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-S56EWAS4.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{a as TerminationFlow};
2
+ //# sourceMappingURL=TerminationFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+ import { TerminationFormValues } from './types.js';
3
+ import { h as PostCreateOffboardingError, O as OffboardingResponse } from '../../types.gen-BgLeTAqP.js';
4
+
5
+ type TerminationFormProps = {
6
+ username: string;
7
+ onSubmit?: (payload: TerminationFormValues) => Promise<void>;
8
+ onError?: (error: PostCreateOffboardingError) => void;
9
+ onSuccess?: (data: OffboardingResponse) => void;
10
+ };
11
+ declare function TerminationForm({ username, onSubmit, onError, onSuccess, }: TerminationFormProps): React__default.JSX.Element;
12
+
13
+ export { TerminationForm };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-HP7ZP256.js";import"../../chunk-DZYFSFZ7.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{a as TerminationForm};
2
+ //# sourceMappingURL=TerminationForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,5 @@
1
+ import React__default, { PropsWithChildren, ButtonHTMLAttributes } from 'react';
2
+
3
+ declare function TerminationSubmit(props: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>): React__default.JSX.Element;
4
+
5
+ export { TerminationSubmit };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-CKGTR44U.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-FI76EKUS.js";import"../../chunk-SJ56GVNV.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationSubmit};
2
+ //# sourceMappingURL=TerminationSubmit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,11 @@
1
+ import { E as EmploymentShowResponse, L as ListTimeoffResponse } from '../../types.gen-BgLeTAqP.js';
2
+ import React__default from 'react';
3
+
4
+ declare const TimeOff: ({ render, }: {
5
+ render: (props: {
6
+ employment: EmploymentShowResponse | undefined;
7
+ timeoff: ListTimeoffResponse | undefined;
8
+ }) => React__default.ReactNode;
9
+ }) => React__default.ReactNode;
10
+
11
+ export { TimeOff };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-EQBNHLR4.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-JLUDKN4H.js";import"../../chunk-55VACCVZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as TimeOff};
2
+ //# sourceMappingURL=TimeOff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,52 @@
1
+ import { O as OffboardingResponse, h as PostCreateOffboardingError } from '../../types.gen-BgLeTAqP.js';
2
+ import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
3
+ import * as React from 'react';
4
+ import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-v9H353tz.js';
5
+ import { Step } from '../useStepState.js';
6
+ import { useTermination } from './hooks.js';
7
+ import { TerminationFormValues } from './types.js';
8
+ import 'react-hook-form';
9
+ import '../CostCalculator/types.js';
10
+
11
+ declare const TerminationContext: React.Context<{
12
+ formId: string | undefined;
13
+ terminationBag: ReturnType<typeof useTermination> | null;
14
+ }>;
15
+ declare const useTerminationContext: () => {
16
+ readonly formId: string;
17
+ readonly terminationBag: {
18
+ employmentId: string;
19
+ stepState: {
20
+ currentStep: Step;
21
+ totalSteps: number;
22
+ values: {
23
+ paid_time_off: TerminationFormValues;
24
+ termination_details: TerminationFormValues;
25
+ employee_communication: TerminationFormValues;
26
+ additional_information: TerminationFormValues;
27
+ } | null;
28
+ };
29
+ fields: _remoteoss_json_schema_form.Fields;
30
+ isLoading: boolean;
31
+ isSubmitting: boolean;
32
+ initialValues: TerminationFormValues;
33
+ handleValidation: (values: TerminationFormValues) => {
34
+ yupError: _remoteoss_json_schema_form.$TSFixMe;
35
+ formErrors: _remoteoss_json_schema_form.$TSFixMe;
36
+ } | null;
37
+ checkFieldUpdates: (values: Partial<TerminationFormValues>) => void;
38
+ onSubmit: (values: TerminationFormValues) => Promise<(ErrorResponse<Error> | SuccessResponse<({
39
+ data: OffboardingResponse;
40
+ error: undefined;
41
+ } | {
42
+ data: undefined;
43
+ error: PostCreateOffboardingError;
44
+ }) & {
45
+ request: Request;
46
+ response: Response;
47
+ }>) | undefined>;
48
+ back: () => void;
49
+ };
50
+ };
51
+
52
+ export { TerminationContext, useTerminationContext };
@@ -0,0 +1,2 @@
1
+ import{a,b}from"../../chunk-DZYFSFZ7.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationContext,b as useTerminationContext};
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,86 @@
1
+ import { O as OffboardingResponse, h as PostCreateOffboardingError } from '../../types.gen-BgLeTAqP.js';
2
+ import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-v9H353tz.js';
3
+ import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
4
+ import { Step } from '../useStepState.js';
5
+ import { JSFModify } from '../CostCalculator/types.js';
6
+ import { TerminationFormValues } from './types.js';
7
+ import 'react';
8
+ import 'react-hook-form';
9
+
10
+ type TerminationHookProps = {
11
+ employmentId: string;
12
+ options?: {
13
+ jsfModify?: JSFModify;
14
+ };
15
+ };
16
+ declare const useTermination: ({ employmentId, options, }: TerminationHookProps) => {
17
+ /**
18
+ * Employment id passed useful to be used between components
19
+ */
20
+ employmentId: string;
21
+ /**
22
+ * Current step state containing the current step and total number of steps
23
+ */
24
+ stepState: {
25
+ currentStep: Step;
26
+ totalSteps: number;
27
+ values: {
28
+ paid_time_off: TerminationFormValues;
29
+ termination_details: TerminationFormValues;
30
+ employee_communication: TerminationFormValues;
31
+ additional_information: TerminationFormValues;
32
+ } | null;
33
+ };
34
+ /**
35
+ * Array of form fields from the contract amendment schema
36
+ */
37
+ fields: _remoteoss_json_schema_form.Fields;
38
+ /**
39
+ * Loading state indicating if the termination schema is being fetched
40
+ */
41
+ isLoading: boolean;
42
+ /**
43
+ * Loading state indicating if a contract amendment mutation is in progress
44
+ */
45
+ isSubmitting: boolean;
46
+ /**
47
+ * Initial form values
48
+ */
49
+ initialValues: TerminationFormValues;
50
+ /**
51
+ * Function to validate form values against the contract amendment schema
52
+ * @param values - Form values to validate
53
+ * @returns Validation result or null if no schema is available
54
+ */
55
+ handleValidation: (values: TerminationFormValues) => {
56
+ yupError: _remoteoss_json_schema_form.$TSFixMe;
57
+ formErrors: _remoteoss_json_schema_form.$TSFixMe;
58
+ } | null;
59
+ /**
60
+ * Function to update the current form field values
61
+ * @param values - New form values to set
62
+ */
63
+ checkFieldUpdates: (values: Partial<TerminationFormValues>) => void;
64
+ /**
65
+ * Function to handle form submission
66
+ * @param values - Form values to submit
67
+ * @returns Promise resolving to the mutation result
68
+ */
69
+ onSubmit: (values: TerminationFormValues) => Promise<(ErrorResponse<Error> | SuccessResponse<({
70
+ data: OffboardingResponse;
71
+ error: undefined;
72
+ } | {
73
+ data: undefined;
74
+ error: PostCreateOffboardingError;
75
+ }) & {
76
+ request: Request;
77
+ response: Response;
78
+ }>) | undefined>;
79
+ /**
80
+ * Function to handle going back to the previous step
81
+ * @returns {void}
82
+ */
83
+ back: () => void;
84
+ };
85
+
86
+ export { useTermination };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-SABMDOWE.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-CTG3DYJR.js";import"../../chunk-SEUQNAF6.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-IPZEZMLD.js";import"../../chunk-JODJFARP.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-FZ2HS6G7.js";import"../../chunk-36UPHOJS.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-S56EWAS4.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as useTermination};
2
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ export { TerminationFlow } from './TerminationFlow.js';
2
+ export { TerminationForm } from './TerminationForm.js';
3
+ export { TerminationSubmit } from './TerminationSubmit.js';
4
+ import 'react';
5
+ import './hooks.js';
6
+ import '../../types.gen-BgLeTAqP.js';
7
+ import '../../mutations-v9H353tz.js';
8
+ import '@remoteoss/json-schema-form';
9
+ import '../useStepState.js';
10
+ import 'react-hook-form';
11
+ import '../CostCalculator/types.js';
12
+ import './types.js';
13
+ import './TimeOff.js';
14
+ import './TerminationBack.js';
@@ -0,0 +1,2 @@
1
+ import"../../chunk-FZ7FWFJX.js";import{a as c}from"../../chunk-LNF27NTC.js";import"../../chunk-SABMDOWE.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-CTG3DYJR.js";import"../../chunk-SEUQNAF6.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-IPZEZMLD.js";import"../../chunk-JODJFARP.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-FZ2HS6G7.js";import"../../chunk-KPSFJ6BN.js";import{a}from"../../chunk-HP7ZP256.js";import{a as b}from"../../chunk-CKGTR44U.js";import"../../chunk-EQBNHLR4.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-36UPHOJS.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-JLUDKN4H.js";import"../../chunk-55VACCVZ.js";import"../../chunk-YBACB5A6.js";import"../../chunk-S56EWAS4.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{c as TerminationFlow,a as TerminationForm,b as TerminationSubmit};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,25 @@
1
+ declare const additionalInformationSchema: {
2
+ data: {
3
+ version: number;
4
+ schema: {
5
+ additionalProperties: boolean;
6
+ allOf: never[];
7
+ properties: {
8
+ acknowledge_termination_procedure: {
9
+ description: string;
10
+ title: string;
11
+ type: string;
12
+ 'x-jsf-presentation': {
13
+ direction: string;
14
+ inputType: string;
15
+ };
16
+ };
17
+ };
18
+ required: string[];
19
+ type: string;
20
+ 'x-jsf-order': string[];
21
+ };
22
+ };
23
+ };
24
+
25
+ export { additionalInformationSchema };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../../chunk-IPZEZMLD.js";import"../../../chunk-AYDF3IFZ.js";export{a as additionalInformationSchema};
2
+ //# sourceMappingURL=additionalInformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,15 @@
1
+ declare const defaultSchema: {
2
+ data: {
3
+ version: number;
4
+ schema: {
5
+ additionalProperties: boolean;
6
+ allOf: never[];
7
+ properties: {};
8
+ required: never[];
9
+ type: string;
10
+ 'x-jsf-order': never[];
11
+ };
12
+ };
13
+ };
14
+
15
+ export { defaultSchema };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../../chunk-XFD3ULUF.js";import"../../../chunk-AYDF3IFZ.js";export{a as defaultSchema};
2
+ //# sourceMappingURL=defaultSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,133 @@
1
+ declare const employeeComunicationSchema: {
2
+ data: {
3
+ version: number;
4
+ schema: {
5
+ additionalProperties: boolean;
6
+ allOf: ({
7
+ if: {
8
+ properties: {
9
+ personal_email: {
10
+ pattern: string;
11
+ };
12
+ customer_informed_employee?: undefined;
13
+ };
14
+ required?: undefined;
15
+ };
16
+ then: {
17
+ properties: {
18
+ personal_email: {
19
+ 'x-jsf-presentation': {
20
+ statement: {
21
+ title: string;
22
+ inputType: string;
23
+ severity: string;
24
+ };
25
+ };
26
+ };
27
+ customer_informed_employee_date?: undefined;
28
+ customer_informed_employee_description?: undefined;
29
+ };
30
+ required?: undefined;
31
+ };
32
+ else?: undefined;
33
+ } | {
34
+ if: {
35
+ properties: {
36
+ customer_informed_employee: {
37
+ const: string;
38
+ };
39
+ personal_email?: undefined;
40
+ };
41
+ required: string[];
42
+ };
43
+ then: {
44
+ properties: {
45
+ customer_informed_employee_date: {
46
+ type: string;
47
+ };
48
+ customer_informed_employee_description: {
49
+ type: string;
50
+ };
51
+ personal_email?: undefined;
52
+ };
53
+ required: string[];
54
+ };
55
+ else: {
56
+ properties: {
57
+ customer_informed_employee_date: boolean;
58
+ customer_informed_employee_description: boolean;
59
+ };
60
+ };
61
+ })[];
62
+ properties: {
63
+ confidential: {
64
+ description: string;
65
+ oneOf: {
66
+ const: string;
67
+ description: string;
68
+ title: string;
69
+ }[];
70
+ title: string;
71
+ type: string;
72
+ 'x-jsf-presentation': {
73
+ direction: string;
74
+ inputType: string;
75
+ statement: {
76
+ title: string;
77
+ inputType: string;
78
+ severity: string;
79
+ };
80
+ };
81
+ };
82
+ customer_informed_employee: {
83
+ description: string;
84
+ oneOf: {
85
+ const: string;
86
+ description: string;
87
+ title: string;
88
+ }[];
89
+ title: string;
90
+ type: string;
91
+ 'x-jsf-presentation': {
92
+ direction: string;
93
+ inputType: string;
94
+ };
95
+ };
96
+ customer_informed_employee_date: {
97
+ description: string;
98
+ format: string;
99
+ maxLength: number;
100
+ title: string;
101
+ type: string[];
102
+ 'x-jsf-presentation': {
103
+ inputType: string;
104
+ };
105
+ };
106
+ customer_informed_employee_description: {
107
+ description: string;
108
+ maxLength: number;
109
+ title: string;
110
+ type: string[];
111
+ 'x-jsf-presentation': {
112
+ inputType: string;
113
+ };
114
+ };
115
+ personal_email: {
116
+ description: string;
117
+ maxLength: number;
118
+ title: string;
119
+ format: string;
120
+ type: string;
121
+ 'x-jsf-presentation': {
122
+ inputType: string;
123
+ };
124
+ };
125
+ };
126
+ required: string[];
127
+ type: string;
128
+ 'x-jsf-order': string[];
129
+ };
130
+ };
131
+ };
132
+
133
+ export { employeeComunicationSchema };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../../chunk-JODJFARP.js";import"../../../chunk-AYDF3IFZ.js";export{a as employeeComunicationSchema};
2
+ //# sourceMappingURL=employeeComunication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}