@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.
- package/README.md +2 -0
- package/dist/chunk-2EKC7DK3.js +2 -0
- package/dist/chunk-2EKC7DK3.js.map +1 -0
- package/dist/chunk-36UPHOJS.js +2 -0
- package/dist/chunk-36UPHOJS.js.map +1 -0
- package/dist/chunk-37DREOGC.js +2 -0
- package/dist/chunk-37DREOGC.js.map +1 -0
- package/dist/chunk-55VACCVZ.js +2 -0
- package/dist/{chunk-5UXOVZY5.js.map → chunk-55VACCVZ.js.map} +1 -1
- package/dist/chunk-5DQBY2TR.js +2 -0
- package/dist/chunk-5DQBY2TR.js.map +1 -0
- package/dist/chunk-6HGUGIYJ.js +2 -0
- package/dist/chunk-6HGUGIYJ.js.map +1 -0
- package/dist/chunk-6LTJBLSD.js +2 -0
- package/dist/chunk-6LTJBLSD.js.map +1 -0
- package/dist/chunk-A7ZJQCNU.js +1 -0
- package/dist/chunk-AYFHWLQZ.js +2 -0
- package/dist/chunk-AYFHWLQZ.js.map +1 -0
- package/dist/chunk-CKGTR44U.js +2 -0
- package/dist/chunk-CKGTR44U.js.map +1 -0
- package/dist/chunk-CTG3DYJR.js +2 -0
- package/dist/chunk-CTG3DYJR.js.map +1 -0
- package/dist/chunk-DZYFSFZ7.js +2 -0
- package/dist/chunk-DZYFSFZ7.js.map +1 -0
- package/dist/chunk-EQBNHLR4.js +2 -0
- package/dist/chunk-EQBNHLR4.js.map +1 -0
- package/dist/chunk-F5QJZKDL.js +2 -0
- package/dist/{chunk-Q6GIPVSE.js.map → chunk-F5QJZKDL.js.map} +1 -1
- package/dist/chunk-FZ2HS6G7.js +2 -0
- package/dist/chunk-FZ2HS6G7.js.map +1 -0
- package/dist/chunk-FZ7FWFJX.js +1 -0
- package/dist/chunk-FZ7FWFJX.js.map +1 -0
- package/dist/chunk-GW7GG5ZW.js +2 -0
- package/dist/chunk-GW7GG5ZW.js.map +1 -0
- package/dist/chunk-HP7ZP256.js +2 -0
- package/dist/chunk-HP7ZP256.js.map +1 -0
- package/dist/chunk-IJPE22L7.js +2 -0
- package/dist/chunk-IJPE22L7.js.map +1 -0
- package/dist/chunk-IPZEZMLD.js +2 -0
- package/dist/chunk-IPZEZMLD.js.map +1 -0
- package/dist/chunk-JLUDKN4H.js +2 -0
- package/dist/chunk-JLUDKN4H.js.map +1 -0
- package/dist/chunk-JODJFARP.js +2 -0
- package/dist/chunk-JODJFARP.js.map +1 -0
- package/dist/chunk-JRQSZHUU.js +2 -0
- package/dist/chunk-JRQSZHUU.js.map +1 -0
- package/dist/chunk-KPSFJ6BN.js +2 -0
- package/dist/chunk-KPSFJ6BN.js.map +1 -0
- package/dist/chunk-LNF27NTC.js +2 -0
- package/dist/chunk-LNF27NTC.js.map +1 -0
- package/dist/chunk-N5AQSLAU.js +2 -0
- package/dist/chunk-N5AQSLAU.js.map +1 -0
- package/dist/{chunk-KQCZ2KSO.js → chunk-NBD4VOG3.js} +2 -2
- package/dist/{chunk-KQCZ2KSO.js.map → chunk-NBD4VOG3.js.map} +1 -1
- package/dist/chunk-RCX4JUI3.js +2 -0
- package/dist/chunk-RCX4JUI3.js.map +1 -0
- package/dist/chunk-S56EWAS4.js +2 -0
- package/dist/chunk-S56EWAS4.js.map +1 -0
- package/dist/chunk-SABMDOWE.js +2 -0
- package/dist/chunk-SABMDOWE.js.map +1 -0
- package/dist/chunk-SEUQNAF6.js +2 -0
- package/dist/chunk-SEUQNAF6.js.map +1 -0
- package/dist/chunk-VX2UC3HG.js +2 -0
- package/dist/chunk-VX2UC3HG.js.map +1 -0
- package/dist/chunk-W5DG5WWJ.js +2 -0
- package/dist/chunk-W5DG5WWJ.js.map +1 -0
- package/dist/chunk-XFD3ULUF.js +2 -0
- package/dist/chunk-XFD3ULUF.js.map +1 -0
- package/dist/chunk-XULIEA44.js +2 -0
- package/dist/{chunk-YNLDKIE4.js.map → chunk-XULIEA44.js.map} +1 -1
- package/dist/{chunk-VV7RML2Q.js → chunk-YAHWFLDH.js} +2 -2
- package/dist/chunk-YBACB5A6.js +2 -0
- package/dist/chunk-YBACB5A6.js.map +1 -0
- package/dist/flows/ContractAmendment/ContractAmendmentBack.d.ts +5 -0
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js +2 -0
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js.map +1 -0
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +30 -0
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +2 -0
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js.map +1 -0
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +24 -7
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +26 -3
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentSubmit.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +26 -24
- package/dist/flows/ContractAmendment/context.js +1 -1
- package/dist/flows/ContractAmendment/hooks.d.ts +94 -6
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +8 -5
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/utils.d.ts +11 -0
- package/dist/flows/ContractAmendment/utils.js +2 -0
- package/dist/flows/ContractAmendment/utils.js.map +1 -0
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +2 -2
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +1 -1
- package/dist/flows/CostCalculator/hooks.d.ts +1 -1
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +1 -1
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Termination/TerminationBack.d.ts +5 -0
- package/dist/flows/Termination/TerminationBack.js +2 -0
- package/dist/flows/Termination/TerminationBack.js.map +1 -0
- package/dist/flows/Termination/TerminationFlow.d.ts +46 -0
- package/dist/flows/Termination/TerminationFlow.js +2 -0
- package/dist/flows/Termination/TerminationFlow.js.map +1 -0
- package/dist/flows/Termination/TerminationForm.d.ts +13 -0
- package/dist/flows/Termination/TerminationForm.js +2 -0
- package/dist/flows/Termination/TerminationForm.js.map +1 -0
- package/dist/flows/Termination/TerminationSubmit.d.ts +5 -0
- package/dist/flows/Termination/TerminationSubmit.js +2 -0
- package/dist/flows/Termination/TerminationSubmit.js.map +1 -0
- package/dist/flows/Termination/TimeOff.d.ts +11 -0
- package/dist/flows/Termination/TimeOff.js +2 -0
- package/dist/flows/Termination/TimeOff.js.map +1 -0
- package/dist/flows/Termination/context.d.ts +52 -0
- package/dist/flows/Termination/context.js +2 -0
- package/dist/flows/Termination/context.js.map +1 -0
- package/dist/flows/Termination/hooks.d.ts +86 -0
- package/dist/flows/Termination/hooks.js +2 -0
- package/dist/flows/Termination/hooks.js.map +1 -0
- package/dist/flows/Termination/index.d.ts +14 -0
- package/dist/flows/Termination/index.js +2 -0
- package/dist/flows/Termination/index.js.map +1 -0
- package/dist/flows/Termination/json-schemas/additionalInformation.d.ts +25 -0
- package/dist/flows/Termination/json-schemas/additionalInformation.js +2 -0
- package/dist/flows/Termination/json-schemas/additionalInformation.js.map +1 -0
- package/dist/flows/Termination/json-schemas/defaultSchema.d.ts +15 -0
- package/dist/flows/Termination/json-schemas/defaultSchema.js +2 -0
- package/dist/flows/Termination/json-schemas/defaultSchema.js.map +1 -0
- package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +133 -0
- package/dist/flows/Termination/json-schemas/employeeComunication.js +2 -0
- package/dist/flows/Termination/json-schemas/employeeComunication.js.map +1 -0
- package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +339 -0
- package/dist/flows/Termination/json-schemas/jsonSchema.js +2 -0
- package/dist/flows/Termination/json-schemas/jsonSchema.js.map +1 -0
- package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +71 -0
- package/dist/flows/Termination/json-schemas/paidTimeOff.js +2 -0
- package/dist/flows/Termination/json-schemas/paidTimeOff.js.map +1 -0
- package/dist/flows/Termination/json-schemas/schema.d.ts +8 -0
- package/dist/flows/Termination/json-schemas/schema.js +2 -0
- package/dist/flows/Termination/json-schemas/schema.js.map +1 -0
- package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +126 -0
- package/dist/flows/Termination/json-schemas/terminationDetails.js +2 -0
- package/dist/flows/Termination/json-schemas/terminationDetails.js.map +1 -0
- package/dist/flows/Termination/types.d.ts +23 -0
- package/dist/flows/Termination/types.js +1 -0
- package/dist/flows/Termination/types.js.map +1 -0
- package/dist/flows/Termination/utils.d.ts +8 -0
- package/dist/flows/Termination/utils.js +2 -0
- package/dist/flows/Termination/utils.js.map +1 -0
- package/dist/flows/useStepState.d.ts +49 -0
- package/dist/flows/useStepState.js +2 -0
- package/dist/flows/useStepState.js.map +1 -0
- package/dist/flows/utils.d.ts +20 -1
- package/dist/flows/utils.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +69 -8
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mutations-v9H353tz.d.ts +10 -0
- package/dist/{types.gen-DCJSPsGk.d.ts → types.gen-BgLeTAqP.d.ts} +1 -1
- package/package.json +2 -1
- package/dist/chunk-4QHHDFB2.js +0 -2
- package/dist/chunk-4QHHDFB2.js.map +0 -1
- package/dist/chunk-5UXOVZY5.js +0 -2
- package/dist/chunk-ANPGCYMT.js +0 -2
- package/dist/chunk-ANPGCYMT.js.map +0 -1
- package/dist/chunk-GCF5EF2A.js +0 -2
- package/dist/chunk-GCF5EF2A.js.map +0 -1
- package/dist/chunk-GKEURJR4.js +0 -2
- package/dist/chunk-GKEURJR4.js.map +0 -1
- package/dist/chunk-KY7BGW6H.js +0 -2
- package/dist/chunk-KY7BGW6H.js.map +0 -1
- package/dist/chunk-MKJHD77O.js +0 -1
- package/dist/chunk-Q6GIPVSE.js +0 -2
- package/dist/chunk-UTCIIPYZ.js +0 -2
- package/dist/chunk-UTCIIPYZ.js.map +0 -1
- package/dist/chunk-VTAHQOKR.js +0 -2
- package/dist/chunk-VTAHQOKR.js.map +0 -1
- package/dist/chunk-YGP3O2VJ.js +0 -2
- package/dist/chunk-YGP3O2VJ.js.map +0 -1
- package/dist/chunk-YNLDKIE4.js +0 -2
- package/dist/hooks-BQWrl9Bj.d.ts +0 -50
- /package/dist/{chunk-MKJHD77O.js.map → chunk-A7ZJQCNU.js.map} +0 -0
- /package/dist/{chunk-VV7RML2Q.js.map → chunk-YAHWFLDH.js.map} +0 -0
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|