@remoteoss/remote-flows 0.4.0-alpha.0 → 0.4.0-alpha.1
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/dist/{chunk-RRFSGYAC.js → chunk-6TYJC6YS.js} +2 -2
- package/dist/{chunk-GYSK6CY5.js → chunk-ABR3B66K.js} +2 -2
- package/dist/{chunk-DPKJX4NS.js → chunk-ALRU77S5.js} +2 -2
- package/dist/chunk-CFRYIKSR.js +2 -0
- package/dist/chunk-CFRYIKSR.js.map +1 -0
- package/dist/{chunk-GPICG72A.js → chunk-CKEVRQRG.js} +2 -2
- package/dist/{chunk-2KK5HDYP.js → chunk-D3SD6MMV.js} +2 -2
- package/dist/{chunk-M5VZBMLC.js → chunk-DE5FSFYL.js} +2 -2
- package/dist/chunk-DHRIURRT.js +2 -0
- package/dist/{chunk-FNMWKUNJ.js.map → chunk-DHRIURRT.js.map} +1 -1
- package/dist/{chunk-XQ6WWP6K.js → chunk-DZSZOC2G.js} +2 -2
- package/dist/chunk-ED3CBUQL.js +2 -0
- package/dist/chunk-ED3CBUQL.js.map +1 -0
- package/dist/{chunk-XJMVWJZ4.js → chunk-GGAS4ZNQ.js} +2 -2
- package/dist/{chunk-SSIHUUZY.js → chunk-GOLOL2V6.js} +2 -2
- package/dist/{chunk-344TN4EG.js → chunk-GRYAM4FZ.js} +2 -2
- package/dist/{chunk-J6LUE5K7.js → chunk-HEPL5WDF.js} +2 -2
- package/dist/{chunk-JWIYUQ5X.js → chunk-JBG4RVXQ.js} +2 -2
- package/dist/{chunk-4HAR3Z2C.js → chunk-KQH5HLN5.js} +2 -2
- package/dist/chunk-LNKYOAKF.js +2 -0
- package/dist/chunk-LNKYOAKF.js.map +1 -0
- package/dist/chunk-MIHU6CEZ.js +2 -0
- package/dist/chunk-MIHU6CEZ.js.map +1 -0
- package/dist/chunk-NE547PW4.js +2 -0
- package/dist/chunk-NE547PW4.js.map +1 -0
- package/dist/{chunk-QEMICBEY.js → chunk-PNXZHV6W.js} +2 -2
- package/dist/{chunk-JIBRNWD2.js → chunk-PWKM2R6V.js} +2 -2
- package/dist/{chunk-YH5F6MGK.js → chunk-Q64URAIN.js} +2 -2
- package/dist/{chunk-NFEY2YL6.js → chunk-QOMUXX6W.js} +2 -2
- package/dist/chunk-QSHYMFMY.js +2 -0
- package/dist/chunk-QSHYMFMY.js.map +1 -0
- package/dist/{chunk-YDUUQU4R.js → chunk-SLD7DFLW.js} +2 -2
- package/dist/{chunk-D3XENMEM.js → chunk-UECSVYQ5.js} +2 -2
- package/dist/chunk-VRQXHCFR.js +2 -0
- package/dist/chunk-VRQXHCFR.js.map +1 -0
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +1 -1
- package/dist/flows/ContractAmendment/hooks.d.ts +1 -1
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +1 -1
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +1 -1
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/ContractAmendment/utils.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +1 -1
- 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/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/Onboarding/BasicInformationStep.d.ts +2 -2
- package/dist/flows/Onboarding/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/BenefitsStep.d.ts +8 -5
- package/dist/flows/Onboarding/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/ContractDetailsStep.d.ts +7 -4
- package/dist/flows/Onboarding/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/OnboardingForm.d.ts +3 -3
- package/dist/flows/Onboarding/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/OnboardingInvite.d.ts +1 -1
- package/dist/flows/Onboarding/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +7 -10
- package/dist/flows/Onboarding/hooks.d.ts +5 -8
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +2 -2
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +7 -2
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +1 -1
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +1 -1
- package/dist/flows/Termination/TimeOff.js +1 -1
- package/dist/flows/Termination/context.d.ts +1 -1
- package/dist/flows/Termination/hooks.d.ts +1 -1
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +1 -1
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/types.d.ts +1 -1
- package/dist/flows/types.d.ts +1 -1
- package/dist/flows/utils.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{types.gen-HC04kr7n.d.ts → types.gen-CsMdyQkb.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6CT35VQR.js +0 -2
- package/dist/chunk-6CT35VQR.js.map +0 -1
- package/dist/chunk-BKBIALOU.js +0 -2
- package/dist/chunk-BKBIALOU.js.map +0 -1
- package/dist/chunk-BKROCZRD.js +0 -2
- package/dist/chunk-BKROCZRD.js.map +0 -1
- package/dist/chunk-BL2HRBUQ.js +0 -2
- package/dist/chunk-BL2HRBUQ.js.map +0 -1
- package/dist/chunk-FNMWKUNJ.js +0 -2
- package/dist/chunk-RIAYBN32.js +0 -2
- package/dist/chunk-RIAYBN32.js.map +0 -1
- package/dist/chunk-RLS4PMWA.js +0 -2
- package/dist/chunk-RLS4PMWA.js.map +0 -1
- package/dist/chunk-XVOJ4RMC.js +0 -2
- package/dist/chunk-XVOJ4RMC.js.map +0 -1
- /package/dist/{chunk-RRFSGYAC.js.map → chunk-6TYJC6YS.js.map} +0 -0
- /package/dist/{chunk-GYSK6CY5.js.map → chunk-ABR3B66K.js.map} +0 -0
- /package/dist/{chunk-DPKJX4NS.js.map → chunk-ALRU77S5.js.map} +0 -0
- /package/dist/{chunk-GPICG72A.js.map → chunk-CKEVRQRG.js.map} +0 -0
- /package/dist/{chunk-2KK5HDYP.js.map → chunk-D3SD6MMV.js.map} +0 -0
- /package/dist/{chunk-M5VZBMLC.js.map → chunk-DE5FSFYL.js.map} +0 -0
- /package/dist/{chunk-XQ6WWP6K.js.map → chunk-DZSZOC2G.js.map} +0 -0
- /package/dist/{chunk-XJMVWJZ4.js.map → chunk-GGAS4ZNQ.js.map} +0 -0
- /package/dist/{chunk-SSIHUUZY.js.map → chunk-GOLOL2V6.js.map} +0 -0
- /package/dist/{chunk-344TN4EG.js.map → chunk-GRYAM4FZ.js.map} +0 -0
- /package/dist/{chunk-J6LUE5K7.js.map → chunk-HEPL5WDF.js.map} +0 -0
- /package/dist/{chunk-JWIYUQ5X.js.map → chunk-JBG4RVXQ.js.map} +0 -0
- /package/dist/{chunk-4HAR3Z2C.js.map → chunk-KQH5HLN5.js.map} +0 -0
- /package/dist/{chunk-QEMICBEY.js.map → chunk-PNXZHV6W.js.map} +0 -0
- /package/dist/{chunk-JIBRNWD2.js.map → chunk-PWKM2R6V.js.map} +0 -0
- /package/dist/{chunk-YH5F6MGK.js.map → chunk-Q64URAIN.js.map} +0 -0
- /package/dist/{chunk-NFEY2YL6.js.map → chunk-QOMUXX6W.js.map} +0 -0
- /package/dist/{chunk-YDUUQU4R.js.map → chunk-SLD7DFLW.js.map} +0 -0
- /package/dist/{chunk-D3XENMEM.js.map → chunk-UECSVYQ5.js.map} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { Fields } from '@remoteoss/json-schema-form';
|
|
3
|
-
import { BasicInformationFormPayload } from './types.js';
|
|
3
|
+
import { BasicInformationFormPayload, BenefitsFormPayload, ContractDetailsFormPayload } from './types.js';
|
|
4
4
|
import { C as Components } from '../../remoteFlows-CswYencu.js';
|
|
5
|
-
import '../../types.gen-
|
|
5
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
6
6
|
import '../types.js';
|
|
7
7
|
import '../CostCalculator/types.js';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
import 'yup';
|
|
10
10
|
|
|
11
11
|
type OnboardingFormProps = {
|
|
12
|
-
onSubmit: (payload: BasicInformationFormPayload) => void;
|
|
12
|
+
onSubmit: (payload: BasicInformationFormPayload | BenefitsFormPayload | ContractDetailsFormPayload) => void;
|
|
13
13
|
components?: Components;
|
|
14
14
|
fields?: Fields;
|
|
15
15
|
defaultValues: Record<string, unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-LNKYOAKF.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as OnboardingForm};
|
|
2
2
|
//# sourceMappingURL=OnboardingForm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { PropsWithChildren, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { S as SuccessResponse } from '../../types.gen-
|
|
2
|
+
import { S as SuccessResponse } from '../../types.gen-CsMdyQkb.js';
|
|
3
3
|
|
|
4
4
|
type OnboardingInviteProps = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
5
|
onSuccess?: (data: SuccessResponse) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ALRU77S5.js";import"../../chunk-NE547PW4.js";import"../../chunk-2PXGLWCY.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-DHRIURRT.js";import"../../chunk-S56EWAS4.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-VRQXHCFR.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as OnboardingInvite};
|
|
2
2
|
//# sourceMappingURL=OnboardingInvite.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-v9H353tz.js';
|
|
1
|
+
import { c as EmploymentCreationResponse, d as PostCreateEmployment2Error, e as EmploymentResponse, f as PatchUpdateEmployment2Error, S as SuccessResponse$1, g as PutUpdateBenefitOfferError } from '../../types.gen-CsMdyQkb.js';
|
|
3
2
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import * as react_hook_form from 'react-hook-form';
|
|
5
|
+
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-v9H353tz.js';
|
|
5
6
|
import { Step } from '../useStepState.js';
|
|
6
|
-
import * as React from 'react';
|
|
7
7
|
import { useOnboarding } from './hooks.js';
|
|
8
8
|
import '@tanstack/react-query';
|
|
9
9
|
import './types.js';
|
|
@@ -32,19 +32,16 @@ declare const useOnboardingContext: () => {
|
|
|
32
32
|
isLoading: boolean;
|
|
33
33
|
isSubmitting: boolean;
|
|
34
34
|
initialValues: {
|
|
35
|
-
basic_information:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
contract_details: {
|
|
39
|
-
[key: string]: unknown;
|
|
40
|
-
};
|
|
35
|
+
basic_information: Record<string, unknown>;
|
|
36
|
+
contract_details: Record<string, unknown>;
|
|
37
|
+
benefits: any;
|
|
41
38
|
};
|
|
42
39
|
handleValidation: (values: react_hook_form.FieldValues) => {
|
|
43
40
|
yupError: _remoteoss_json_schema_form.$TSFixMe;
|
|
44
41
|
formErrors: _remoteoss_json_schema_form.$TSFixMe;
|
|
45
42
|
} | null;
|
|
46
43
|
checkFieldUpdates: React.Dispatch<React.SetStateAction<react_hook_form.FieldValues>>;
|
|
47
|
-
parseFormValues: (values:
|
|
44
|
+
parseFormValues: (values: react_hook_form.FieldValues) => Record<string, any>;
|
|
48
45
|
onSubmit: (values: react_hook_form.FieldValues) => Promise<ErrorResponse<Error> | SuccessResponse<({
|
|
49
46
|
data: EmploymentCreationResponse;
|
|
50
47
|
error: undefined;
|
|
@@ -4,7 +4,7 @@ import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
|
4
4
|
import { Fields } from '@remoteoss/json-schema-form';
|
|
5
5
|
import { Step } from '../useStepState.js';
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
|
-
import {
|
|
7
|
+
import { c as EmploymentCreationResponse, d as PostCreateEmployment2Error, e as EmploymentResponse, f as PatchUpdateEmployment2Error, S as SuccessResponse$1, g as PutUpdateBenefitOfferError, h as PostInviteEmploymentInvitationError } from '../../types.gen-CsMdyQkb.js';
|
|
8
8
|
import { FieldValues } from 'react-hook-form';
|
|
9
9
|
import { OnboardingFlowParams } from './types.js';
|
|
10
10
|
import '../types.js';
|
|
@@ -61,12 +61,9 @@ declare const useOnboarding: ({ employmentId, countryCode, type, options, }: Onb
|
|
|
61
61
|
* Initial form values
|
|
62
62
|
*/
|
|
63
63
|
initialValues: {
|
|
64
|
-
basic_information:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
contract_details: {
|
|
68
|
-
[key: string]: unknown;
|
|
69
|
-
};
|
|
64
|
+
basic_information: Record<string, unknown>;
|
|
65
|
+
contract_details: Record<string, unknown>;
|
|
66
|
+
benefits: any;
|
|
70
67
|
};
|
|
71
68
|
/**
|
|
72
69
|
* Function to validate form values against the onboarding schema
|
|
@@ -87,7 +84,7 @@ declare const useOnboarding: ({ employmentId, countryCode, type, options, }: Onb
|
|
|
87
84
|
* @param values - Form values to parse
|
|
88
85
|
* @returns Parsed form values
|
|
89
86
|
*/
|
|
90
|
-
parseFormValues: (values:
|
|
87
|
+
parseFormValues: (values: FieldValues) => Record<string, any>;
|
|
91
88
|
/**
|
|
92
89
|
* Function to handle form submission
|
|
93
90
|
* @param values - Form values to submit
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-NE547PW4.js";import"../../chunk-2PXGLWCY.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-DHRIURRT.js";import"../../chunk-S56EWAS4.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-VRQXHCFR.js";import"../../chunk-AYDF3IFZ.js";export{a as useEmploymentInvite,b as useOnboarding};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { OnboardingFlow, OnboardingRenderProps } from './OnboardingFlow.js';
|
|
2
|
+
export { BasicInformationFormPayload, BenefitsFormPayload, ContractDetailsFormPayload } from './types.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import './hooks.js';
|
|
4
5
|
import '../../mutations-v9H353tz.js';
|
|
@@ -6,8 +7,7 @@ import '@remoteoss/json-schema-form';
|
|
|
6
7
|
import '../useStepState.js';
|
|
7
8
|
import 'react-hook-form';
|
|
8
9
|
import '@tanstack/react-query';
|
|
9
|
-
import '../../types.gen-
|
|
10
|
-
import './types.js';
|
|
10
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
11
11
|
import '../types.js';
|
|
12
12
|
import '../CostCalculator/types.js';
|
|
13
13
|
import './BasicInformationStep.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-GULCZWSK.js";import{a}from"../../chunk-
|
|
1
|
+
import"../../chunk-GULCZWSK.js";import{a}from"../../chunk-PWKM2R6V.js";import"../../chunk-QSHYMFMY.js";import"../../chunk-M7WCW7WD.js";import"../../chunk-ALRU77S5.js";import"../../chunk-MHKNAQLP.js";import"../../chunk-NE547PW4.js";import"../../chunk-2PXGLWCY.js";import"../../chunk-CFRYIKSR.js";import"../../chunk-ED3CBUQL.js";import"../../chunk-LNKYOAKF.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-DHRIURRT.js";import"../../chunk-S56EWAS4.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-VRQXHCFR.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as OnboardingFlow};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as EmploymentCreateParams } from '../../types.gen-CsMdyQkb.js';
|
|
2
2
|
import { FlowOptions } from '../types.js';
|
|
3
3
|
import '../CostCalculator/types.js';
|
|
4
4
|
import '@remoteoss/json-schema-form';
|
|
@@ -27,5 +27,10 @@ type BasicInformationFormPayload = {
|
|
|
27
27
|
};
|
|
28
28
|
seniority_date: string;
|
|
29
29
|
};
|
|
30
|
+
type BenefitsFormPayload = Record<string, {
|
|
31
|
+
value: string;
|
|
32
|
+
filter?: string;
|
|
33
|
+
}>;
|
|
34
|
+
type ContractDetailsFormPayload = Record<string, unknown>;
|
|
30
35
|
|
|
31
|
-
export type { BasicInformationFormPayload, OnboardingFlowParams };
|
|
36
|
+
export type { BasicInformationFormPayload, BenefitsFormPayload, ContractDetailsFormPayload, OnboardingFlowParams };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { TerminationFormValues } from './types.js';
|
|
3
|
-
import { O as OffboardingResponse } from '../../types.gen-
|
|
3
|
+
import { O as OffboardingResponse } from '../../types.gen-CsMdyQkb.js';
|
|
4
4
|
|
|
5
5
|
type AdditionalDetailsFormProps = {
|
|
6
6
|
requesterName: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-JBG4RVXQ.js";import"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as AdditionalDetailsForm};
|
|
2
2
|
//# sourceMappingURL=AdditionalDetailsForm.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { TerminationFormValues } from './types.js';
|
|
3
|
-
import '../../types.gen-
|
|
3
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
4
4
|
|
|
5
5
|
type EmployeeComunicationProps = {
|
|
6
6
|
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-SLD7DFLW.js";import"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as EmployeeCommunicationForm};
|
|
2
2
|
//# sourceMappingURL=EmployeeComunicationForm.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { TerminationFormValues } from './types.js';
|
|
3
|
-
import '../../types.gen-
|
|
3
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
4
4
|
|
|
5
5
|
type PaidTimeOffFormProps = {
|
|
6
6
|
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-CKEVRQRG.js";import"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as PaidTimeOffForm};
|
|
2
2
|
//# sourceMappingURL=PaidTimeOffForm.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { TerminationFormValues } from './types.js';
|
|
3
|
-
import '../../types.gen-
|
|
3
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
4
4
|
|
|
5
5
|
type TerminationDetailsFormProps = {
|
|
6
6
|
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-6TYJC6YS.js";import"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationDetailsForm};
|
|
2
2
|
//# sourceMappingURL=TerminationDetailsForm.js.map
|
|
@@ -9,7 +9,7 @@ import { TerminationDetailsForm } from './TerminationDetailsForm.js';
|
|
|
9
9
|
import { PaidTimeOffForm } from './PaidTimeOffForm.js';
|
|
10
10
|
import { AdditionalDetailsForm } from './AdditionalDetailsForm.js';
|
|
11
11
|
import './types.js';
|
|
12
|
-
import '../../types.gen-
|
|
12
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
13
13
|
import '../../mutations-v9H353tz.js';
|
|
14
14
|
import '@remoteoss/json-schema-form';
|
|
15
15
|
import '../useStepState.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-DZSZOC2G.js";import"../../chunk-GGAS4ZNQ.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-FZ2HS6G7.js";import"../../chunk-SLD7DFLW.js";import"../../chunk-CKEVRQRG.js";import"../../chunk-YOC3VDC7.js";import"../../chunk-6TYJC6YS.js";import"../../chunk-KSGPQCSG.js";import"../../chunk-D3SD6MMV.js";import"../../chunk-JBG4RVXQ.js";import"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-36UPHOJS.js";import"../../chunk-QOMUXX6W.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-DHRIURRT.js";import"../../chunk-S56EWAS4.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-VRQXHCFR.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationFlow};
|
|
2
2
|
//# sourceMappingURL=TerminationFlow.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { TerminationFormValues } from './types.js';
|
|
3
3
|
import { Fields } from '@remoteoss/json-schema-form';
|
|
4
|
-
import '../../types.gen-
|
|
4
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
5
5
|
|
|
6
6
|
type TerminationFormProps = {
|
|
7
7
|
onSubmit: (payload: TerminationFormValues) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationForm};
|
|
2
2
|
//# sourceMappingURL=TerminationForm.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EmploymentShowResponse, L as ListTimeoffResponse } from '../../types.gen-
|
|
1
|
+
import { E as EmploymentShowResponse, L as ListTimeoffResponse } from '../../types.gen-CsMdyQkb.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
declare const TimeOff: ({ render, }: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-D3SD6MMV.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-QOMUXX6W.js";import"../../chunk-DHRIURRT.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-AYDF3IFZ.js";export{a as TimeOff};
|
|
2
2
|
//# sourceMappingURL=TimeOff.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OffboardingResponse,
|
|
1
|
+
import { O as OffboardingResponse, p as PostCreateOffboardingError } from '../../types.gen-CsMdyQkb.js';
|
|
2
2
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-v9H353tz.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OffboardingResponse,
|
|
1
|
+
import { O as OffboardingResponse, p as PostCreateOffboardingError } from '../../types.gen-CsMdyQkb.js';
|
|
2
2
|
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-v9H353tz.js';
|
|
3
3
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
4
4
|
import { Step } from '../useStepState.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-GGAS4ZNQ.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-FZ2HS6G7.js";import"../../chunk-36UPHOJS.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-DHRIURRT.js";import"../../chunk-S56EWAS4.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-VRQXHCFR.js";import"../../chunk-AYDF3IFZ.js";export{a as useTermination};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -2,7 +2,7 @@ export { TerminationFlow, TerminationRenderProps } from './TerminationFlow.js';
|
|
|
2
2
|
export { TerminationFormValues } from './types.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './hooks.js';
|
|
5
|
-
import '../../types.gen-
|
|
5
|
+
import '../../types.gen-CsMdyQkb.js';
|
|
6
6
|
import '../../mutations-v9H353tz.js';
|
|
7
7
|
import '@remoteoss/json-schema-form';
|
|
8
8
|
import '../useStepState.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-M22FKNEY.js";import{a}from"../../chunk-
|
|
1
|
+
import"../../chunk-M22FKNEY.js";import{a}from"../../chunk-DZSZOC2G.js";import"../../chunk-GGAS4ZNQ.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-FZ2HS6G7.js";import"../../chunk-SLD7DFLW.js";import"../../chunk-CKEVRQRG.js";import"../../chunk-YOC3VDC7.js";import"../../chunk-6TYJC6YS.js";import"../../chunk-KSGPQCSG.js";import"../../chunk-D3SD6MMV.js";import"../../chunk-JBG4RVXQ.js";import"../../chunk-Q64URAIN.js";import"../../chunk-DZYFSFZ7.js";import"../../chunk-36UPHOJS.js";import"../../chunk-QOMUXX6W.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-DHRIURRT.js";import"../../chunk-S56EWAS4.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-MIHU6CEZ.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-VRQXHCFR.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as TerminationFlow};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/flows/types.d.ts
CHANGED
package/dist/flows/utils.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -15,10 +15,11 @@ export { useContractAmendment } from './flows/ContractAmendment/hooks.js';
|
|
|
15
15
|
export { TerminationFlow, TerminationRenderProps } from './flows/Termination/TerminationFlow.js';
|
|
16
16
|
export { TerminationFormValues } from './flows/Termination/types.js';
|
|
17
17
|
export { OnboardingFlow, OnboardingRenderProps } from './flows/Onboarding/OnboardingFlow.js';
|
|
18
|
+
export { BasicInformationFormPayload, BenefitsFormPayload, ContractDetailsFormPayload } from './flows/Onboarding/types.js';
|
|
18
19
|
export { CostCalculatorEstimationFormValues, CostCalculatorEstimationOptions, JSFModify } from './flows/CostCalculator/types.js';
|
|
19
20
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
20
|
-
import { E as EmploymentShowResponse, q as TimeoffStatus, L as ListTimeoffResponse } from './types.gen-
|
|
21
|
-
export { C as ContractAmendmentAutomatableResponse,
|
|
21
|
+
import { E as EmploymentShowResponse, q as TimeoffStatus, L as ListTimeoffResponse } from './types.gen-CsMdyQkb.js';
|
|
22
|
+
export { C as ContractAmendmentAutomatableResponse, j as CostCalculatorEstimateResponse, c as EmploymentCreationResponse, e as EmploymentResponse, O as OffboardingResponse, S as SuccessResponse } from './types.gen-CsMdyQkb.js';
|
|
22
23
|
import { ContractAmendmentParams } from './flows/ContractAmendment/types.js';
|
|
23
24
|
import { ValidationError } from 'yup';
|
|
24
25
|
import React__default, { PropsWithChildren } from 'react';
|
|
@@ -38,7 +39,6 @@ import './flows/Termination/TerminationDetailsForm.js';
|
|
|
38
39
|
import './flows/Termination/PaidTimeOffForm.js';
|
|
39
40
|
import './flows/Termination/AdditionalDetailsForm.js';
|
|
40
41
|
import './flows/Onboarding/hooks.js';
|
|
41
|
-
import './flows/Onboarding/types.js';
|
|
42
42
|
import './flows/Onboarding/BasicInformationStep.js';
|
|
43
43
|
import './flows/Onboarding/OnboardingSubmit.js';
|
|
44
44
|
import './flows/Onboarding/OnboardingBack.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-M22FKNEY.js";import{a as
|
|
1
|
+
import"./chunk-M22FKNEY.js";import{a as te}from"./chunk-DZSZOC2G.js";import"./chunk-GGAS4ZNQ.js";import"./chunk-HSW5HMHH.js";import"./chunk-VX2UC3HG.js";import"./chunk-XSHHMBMT.js";import"./chunk-XFD3ULUF.js";import"./chunk-JODJFARP.js";import"./chunk-WWANHPT7.js";import"./chunk-W5DG5WWJ.js";import"./chunk-FZ2HS6G7.js";import"./chunk-SLD7DFLW.js";import"./chunk-CKEVRQRG.js";import"./chunk-YOC3VDC7.js";import"./chunk-6TYJC6YS.js";import"./chunk-KSGPQCSG.js";import"./chunk-D3SD6MMV.js";import"./chunk-FGBEOUQK.js";import{a as E}from"./chunk-S4FKLPBB.js";import"./chunk-GMGKIQLI.js";import"./chunk-WQHKB5T7.js";import"./chunk-KH6QS5OU.js";import"./chunk-J55S4SEH.js";import"./chunk-3FVI5JIC.js";import"./chunk-6A3F6JG6.js";import"./chunk-MESREYTZ.js";import"./chunk-JBG4RVXQ.js";import"./chunk-Q64URAIN.js";import"./chunk-DZYFSFZ7.js";import"./chunk-GULCZWSK.js";import{a as S}from"./chunk-DGPRFQYK.js";import{a as _}from"./chunk-DYB3RWP7.js";import{a as z}from"./chunk-DE5FSFYL.js";import{b as y,c as k,e as C}from"./chunk-GRYAM4FZ.js";import"./chunk-UPRUP24B.js";import{a as P}from"./chunk-PNXZHV6W.js";import{a as R}from"./chunk-7CYG2RHP.js";import{a as F}from"./chunk-EAAIAMTY.js";import"./chunk-OLJ2S6A6.js";import{a as oe}from"./chunk-PWKM2R6V.js";import"./chunk-QSHYMFMY.js";import"./chunk-M7WCW7WD.js";import"./chunk-ALRU77S5.js";import"./chunk-MHKNAQLP.js";import"./chunk-NE547PW4.js";import"./chunk-2PXGLWCY.js";import"./chunk-A7ZJQCNU.js";import"./chunk-CFRYIKSR.js";import"./chunk-ED3CBUQL.js";import"./chunk-LNKYOAKF.js";import"./chunk-WS3C3WIJ.js";import"./chunk-36UPHOJS.js";import{a as ae}from"./chunk-KQH5HLN5.js";import{a as H}from"./chunk-XLFHHYVS.js";import{a as re}from"./chunk-GOLOL2V6.js";import{a as J,b as ee}from"./chunk-QOMUXX6W.js";import"./chunk-JRQSZHUU.js";import{a as p}from"./chunk-DHRIURRT.js";import"./chunk-UECSVYQ5.js";import"./chunk-S56EWAS4.js";import"./chunk-FMT2OTOL.js";import{a as Z}from"./chunk-ABR3B66K.js";import{a as $}from"./chunk-HEPL5WDF.js";import"./chunk-A4RX3KRZ.js";import"./chunk-MIHU6CEZ.js";import"./chunk-GFBF55NR.js";import{a as g,c as v}from"./chunk-WRDKLT4N.js";import"./chunk-56BNVYTD.js";import"./chunk-VRQXHCFR.js";import"./chunk-IDSJI7KQ.js";import"./chunk-6HGUGIYJ.js";import{c as T}from"./chunk-5ETXP2QF.js";import{a}from"./chunk-AYDF3IFZ.js";import{QueryClient as L,QueryClientProvider as q}from"@tanstack/react-query";import n from"react";function l(e){let r=document.documentElement;Object.keys(e).forEach(t=>{let o=e[t];o&&r.style.setProperty(t,o)})}a(l,"setCssProperties");function B(e){let r={};return Object.keys(e).forEach(t=>{r[`--${t}`]=e[t]}),r}a(B,"mapThemeColors");function j(e){return{"--spacing":e}}a(j,"mapThemeSpacing");function M(e){return{"--radius":e}}a(M,"mapThemeBorderRadius");function I(e){return{"--fontSizeBase":e.fontSizeBase}}a(I,"mapThemeFont");function u(e){e?.colors&&l(B(e.colors)),e?.spacing&&l(j(e.spacing)),e?.borderRadius&&l(M(e.borderRadius)),e?.font&&l(I(e.font))}a(u,"applyTheme");import A,{createContext as N,useEffect as O,useMemo as U}from"react";var D=N({theme:{}});function h(e){O(()=>{e.theme&&Object.keys(e.theme).length>0&&u(e.theme)},[e.theme]);let r=U(()=>({theme:e.theme}),[e.theme]);return A.createElement(D.Provider,{value:r},e.children)}a(h,"ThemeProvider");var m={staging:"https://gateway.niceremote.com",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com"};import{createClient as K}from"@hey-api/client-fetch";import{useQuery as V}from"@tanstack/react-query";import{useRef as f}from"react";function W(e){try{return new URL(e),!0}catch{return!1}}a(W,"isValidUrl");var w=a(({auth:e,options:r})=>{let t=f(null),{refetch:o}=V({queryKey:["auth"],queryFn:e,enabled:!1}),s=r.isTestingMode?m.partners:"https://gateway.remote.com",c=p.getConfig(),b="0.4.0-alpha.1",d=!!r.proxy&&W(r.proxy.url);return r.proxy&&!d&&console.error("Invalid proxy URL provided. Using default base URL."),f(K({...c,headers:{...c.headers,...d?r.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":b},baseUrl:d?r.proxy?.url:s,auth:a(async()=>{function x(i){return!i||Date.now()+6e4>i}if(a(x,"hasTokenExpired"),!t.current||x(t.current.expiresAt)){let{data:i}=await o();i&&(t.current={accessToken:i.accessToken,expiresAt:Date.now()+i.expiresIn*1e3})}return t.current?.accessToken},"auth")}))},"useAuth");var Q=new L;function X({children:e,auth:r,isTestingMode:t,proxy:o}){let s=w({auth:r,options:{isTestingMode:!!t,proxy:o}});return n.createElement(v.Provider,{value:{client:s.current}},e)}a(X,"RemoteFlowContextWrapper");function Y({children:e,components:r}){return n.createElement(g.Provider,{value:r?{components:r}:{components:{}}},e)}a(Y,"FormFieldsProvider");function G({auth:e,children:r,components:t,isTestingMode:o=!1,theme:s,proxy:c}){return n.createElement(q,{client:Q},n.createElement(Y,{components:t},n.createElement(X,{isTestingMode:o,auth:e,proxy:c},n.createElement(h,{theme:s},r))))}a(G,"RemoteFlows");export{Z as ContractAmendmentConfirmationForm,ae as ContractAmendmentFlow,$ as ContractAmendmentForm,H as ContractAmendmentSubmit,S as CostCalculatorDisclaimer,z as CostCalculatorFlow,P as CostCalculatorForm,R as CostCalculatorResetButton,E as CostCalculatorResults,F as CostCalculatorSubmitButton,oe as OnboardingFlow,G as RemoteFlows,te as TerminationFlow,y as buildCostCalculatorEstimationPayload,_ as disclaimerData,T as transformYupErrorsIntoObject,re as useContractAmendment,C as useCostCalculator,k as useCostCalculatorEstimationPdf,J as useEmploymentQuery,ee as useTimeOffQuery};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -944,4 +944,4 @@ type PostInviteEmploymentInvitationErrors = {
|
|
|
944
944
|
};
|
|
945
945
|
type PostInviteEmploymentInvitationError = PostInviteEmploymentInvitationErrors[keyof PostInviteEmploymentInvitationErrors];
|
|
946
946
|
|
|
947
|
-
export type { ContractAmendmentAutomatableResponse as C, EmploymentShowResponse as E, ListTimeoffResponse as L, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b,
|
|
947
|
+
export type { ContractAmendmentAutomatableResponse as C, EmploymentShowResponse as E, ListTimeoffResponse as L, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, EmploymentCreationResponse as c, PostCreateEmployment2Error as d, EmploymentResponse as e, PatchUpdateEmployment2Error as f, PutUpdateBenefitOfferError as g, PostInviteEmploymentInvitationError as h, EmploymentCreateParams as i, CostCalculatorEstimateResponse as j, PostCreateEstimationError as k, CostCalculatorEstimatePdfResponse as l, PostCreateEstimationPdfError as m, CostCalculatorEstimateParams as n, EmploymentTermType as o, PostCreateOffboardingError as p, TimeoffStatus as q };
|
package/package.json
CHANGED
package/dist/chunk-6CT35VQR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-RLS4PMWA.js";import{b as i}from"./chunk-WS3C3WIJ.js";import{a as r}from"./chunk-AYDF3IFZ.js";import c from"react";function l({onSubmit:m,onSuccess:s,onError:n}){let{onboardingBag:a}=i(),p=r(async t=>{try{await m?.(a.parseFormValues(t));let o=await a.onSubmit(t);if(o?.data?.data){s?.(o?.data?.data),a?.next();return}o?.error&&n?.(o?.error)}catch(o){n?.(o)}},"handleSubmit");return c.createElement(e,{defaultValues:a.stepState.values?.basic_information||a.initialValues.basic_information,onSubmit:p})}r(l,"BasicInformationStep");export{l as a};
|
|
2
|
-
//# sourceMappingURL=chunk-6CT35VQR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/BasicInformationStep.tsx"],"sourcesContent":["import React from 'react';\nimport { useOnboardingContext } from './context';\nimport { OnboardingForm } from '@/src/flows/Onboarding/OnboardingForm';\nimport { BasicInformationFormPayload } from '@/src/flows/Onboarding/types';\nimport { EmploymentCreationResponse } from '@/src/client';\n\ntype BasicInformationStepProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: BasicInformationFormPayload) => void | Promise<void>;\n /*\n * The function is called when the form submission is successful.\n */\n onSuccess?: (data: EmploymentCreationResponse) => void;\n /*\n * The function is called when an error occurs during form submission.\n */\n onError?: (error: unknown) => void;\n};\n\nexport function BasicInformationStep({\n onSubmit,\n onSuccess,\n onError,\n}: BasicInformationStepProps) {\n const { onboardingBag } = useOnboardingContext();\n const handleSubmit = async (payload: BasicInformationFormPayload) => {\n try {\n await onSubmit?.(\n onboardingBag.parseFormValues(payload) as BasicInformationFormPayload,\n );\n const response = await onboardingBag.onSubmit(payload);\n if (response?.data?.data) {\n onSuccess?.(response?.data?.data as EmploymentCreationResponse);\n onboardingBag?.next();\n return;\n }\n if (response?.error) {\n onError?.(response?.error);\n }\n } catch (error) {\n onError?.(error);\n }\n };\n\n return (\n <OnboardingForm\n defaultValues={\n onboardingBag.stepState.values?.basic_information ||\n onboardingBag.initialValues.basic_information\n }\n onSubmit={handleSubmit}\n />\n );\n}\n"],"mappings":"wHAAA,OAAOA,MAAW,QAqBX,SAASC,EAAqB,CACnC,SAAAC,EACA,UAAAC,EACA,QAAAC,CACF,EAA8B,CAC5B,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAAeC,EAAA,MAAOC,GAAyC,CACnE,GAAI,CACF,MAAMP,IACJG,EAAc,gBAAgBI,CAAO,CACvC,EACA,IAAMC,EAAW,MAAML,EAAc,SAASI,CAAO,EACrD,GAAIC,GAAU,MAAM,KAAM,CACxBP,IAAYO,GAAU,MAAM,IAAkC,EAC9DL,GAAe,KAAK,EACpB,MACF,CACIK,GAAU,OACZN,IAAUM,GAAU,KAAK,CAE7B,OAASC,EAAO,CACdP,IAAUO,CAAK,CACjB,CACF,EAjBqB,gBAmBrB,OACEC,EAAA,cAACC,EAAA,CACC,cACER,EAAc,UAAU,QAAQ,mBAChCA,EAAc,cAAc,kBAE9B,SAAUE,EACZ,CAEJ,CAlCgBC,EAAAP,EAAA","names":["React","BasicInformationStep","onSubmit","onSuccess","onError","onboardingBag","useOnboardingContext","handleSubmit","__name","payload","response","error","React","OnboardingForm"]}
|
package/dist/chunk-BKBIALOU.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-RLS4PMWA.js";import{b as n}from"./chunk-WS3C3WIJ.js";import{a}from"./chunk-AYDF3IFZ.js";import p from"react";function y({onSubmit:i,onError:e,onSuccess:l}){let{onboardingBag:t}=n(),m=a(async r=>{try{await i?.(t.parseFormValues(r));let o=await t.onSubmit(t.parseFormValues(r));if(o?.data){l?.(o.data),t?.next();return}o?.error&&e?.(o.error)}catch(o){e?.(o)}},"handleSubmit");return p.createElement(s,{defaultValues:t.stepState.values?.contract_details||t.initialValues.contract_details,onSubmit:m})}a(y,"ContractDetailsStep");export{y as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BKBIALOU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/ContractDetailsStep.tsx"],"sourcesContent":["import React from 'react';\nimport { useOnboardingContext } from './context';\nimport { OnboardingForm } from '@/src/flows/Onboarding/OnboardingForm';\nimport { EmploymentResponse } from '@/src/client';\n\ntype ContractDetailsPayload = Record<string, unknown>;\n\ntype ContractDetailsStepProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: ContractDetailsPayload) => void | Promise<void>;\n /*\n * The function is called when the form submission is successful.\n */\n onSuccess?: (response: EmploymentResponse) => void | Promise<void>;\n /*\n * The function is called when an error occurs during form submission.\n */\n onError?: (error: unknown) => void;\n};\n\nexport function ContractDetailsStep({\n onSubmit,\n onError,\n onSuccess,\n}: ContractDetailsStepProps) {\n const { onboardingBag } = useOnboardingContext();\n const handleSubmit = async (payload: ContractDetailsPayload) => {\n try {\n await onSubmit?.(\n onboardingBag.parseFormValues(payload) as ContractDetailsPayload,\n );\n const response = await onboardingBag.onSubmit(\n onboardingBag.parseFormValues(payload) as ContractDetailsPayload,\n );\n if (response?.data) {\n onSuccess?.(response.data as EmploymentResponse);\n onboardingBag?.next();\n return;\n }\n if (response?.error) {\n onError?.(response.error);\n }\n } catch (error) {\n onError?.(error);\n }\n };\n\n return (\n <OnboardingForm\n defaultValues={\n onboardingBag.stepState.values?.contract_details ||\n onboardingBag.initialValues.contract_details\n }\n onSubmit={handleSubmit}\n />\n );\n}\n"],"mappings":"mHAAA,OAAOA,MAAW,QAsBX,SAASC,EAAoB,CAClC,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA6B,CAC3B,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAAeC,EAAA,MAAOC,GAAoC,CAC9D,GAAI,CACF,MAAMP,IACJG,EAAc,gBAAgBI,CAAO,CACvC,EACA,IAAMC,EAAW,MAAML,EAAc,SACnCA,EAAc,gBAAgBI,CAAO,CACvC,EACA,GAAIC,GAAU,KAAM,CAClBN,IAAYM,EAAS,IAA0B,EAC/CL,GAAe,KAAK,EACpB,MACF,CACIK,GAAU,OACZP,IAAUO,EAAS,KAAK,CAE5B,OAASC,EAAO,CACdR,IAAUQ,CAAK,CACjB,CACF,EAnBqB,gBAqBrB,OACEC,EAAA,cAACC,EAAA,CACC,cACER,EAAc,UAAU,QAAQ,kBAChCA,EAAc,cAAc,iBAE9B,SAAUE,EACZ,CAEJ,CApCgBC,EAAAP,EAAA","names":["React","ContractDetailsStep","onSubmit","onError","onSuccess","onboardingBag","useOnboardingContext","handleSubmit","__name","payload","response","error","React","OnboardingForm"]}
|
package/dist/chunk-BKROCZRD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-GFBF55NR.js";import{b as F}from"./chunk-WRDKLT4N.js";import{a as me,b as U}from"./chunk-56BNVYTD.js";import{b as y,c as N,d as h,e as w,f as R,g as k}from"./chunk-IDSJI7KQ.js";import{a as s}from"./chunk-5ETXP2QF.js";import{a as o}from"./chunk-AYDF3IFZ.js";import H,{Fragment as At}from"react";import*as j from"react";import*as q from"@radix-ui/react-checkbox";import{Check as Ze}from"lucide-react";var te=j.forwardRef(({className:e,...t},r)=>j.createElement(q.Root,{ref:r,className:s("peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-checkbox data-[state=checked]:text-primary",e),...t},j.createElement(q.Indicator,{className:s("flex items-center justify-center text-current")},j.createElement(Ze,{className:"h-4 w-4"}))));te.displayName=q.Root.displayName;import*as D from"react";import{useFormContext as et}from"react-hook-form";function Fe({name:e,defaultValue:t,description:r,label:a,onChange:n,multiple:c,options:u,component:x,...C}){let{components:i}=F(),{control:d}=et(),p=o((m,l,g)=>{let _=g.value?[...g.value]:[];l?_.includes(m)||g.onChange([..._,m]):g.onChange(_.filter(z=>z!==m))},"handleCheckboxChange");return D.createElement(y,{control:d,name:e,defaultValue:t,render:({field:m,fieldState:l})=>{let g=x||i?.checkbox;if(g){let _={name:e,description:r,label:a,defaultValue:t,multiple:c,options:u,...C};return D.createElement(g,{field:{...m,onChange:o(z=>{if(c){let{checked:ee,value:I}=z.target;p(I,ee,m),n?.(ee);return}m.onChange(z),n?.(z)},"onChange")},fieldState:l,fieldData:_})}return D.createElement(N,{"data-field":e,className:s(`RemoteFlows__CheckBoxField__Item__${e}`)},D.createElement(w,null,D.createElement(D.Fragment,null,u&&c?D.createElement(h,null,a):null,u&&c?u.map(_=>D.createElement("div",{key:_.value,className:"flex space-x-2"},D.createElement(te,{id:_.value,onCheckedChange:z=>{p(_.value,z===!0,m),n?.(z,_.value)},checked:m.value?.includes(_.value),className:"RemoteFlows__CheckBox__Input"}),D.createElement(h,{htmlFor:_.value,className:"mb-0 RemoteFlows__CheckBox__Label"},_.label))):D.createElement("div",{className:"flex space-x-2"},D.createElement(te,{id:e,onCheckedChange:_=>{m.onChange(_),n?.(_)},checked:m.value,className:"RemoteFlows__CheckBox__Input"}),D.createElement(h,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label"},a)))),r&&D.createElement(R,null,r),l.error&&D.createElement(k,null))}})}o(Fe,"CheckBoxField");import{CalendarIcon as at}from"lucide-react";import*as P from"react";import{useFormContext as it}from"react-hook-form";import*as oe from"react";import{ChevronLeft as tt,ChevronRight as ot}from"lucide-react";import{DayPicker as rt}from"react-day-picker";function ve({className:e,classNames:t,showOutsideDays:r=!0,...a}){return oe.createElement(rt,{showOutsideDays:r,className:s("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:s(me({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:s("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",a.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:s(me({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:o(({className:n,...c})=>oe.createElement(tt,{className:s("size-4",n),...c}),"IconLeft"),IconRight:o(({className:n,...c})=>oe.createElement(ot,{className:s("size-4",n),...c}),"IconRight")},...a})}o(ve,"Calendar");import*as Y from"react";import*as B from"@radix-ui/react-popover";function re({...e}){return Y.createElement(B.Root,{"data-slot":"popover",...e})}o(re,"Popover");function ae({...e}){return Y.createElement(B.Trigger,{"data-slot":"popover-trigger",...e})}o(ae,"PopoverTrigger");function ie({className:e,align:t="center",sideOffset:r=4,...a}){return Y.createElement(B.Portal,null,Y.createElement(B.Content,{"data-slot":"popover-content",align:t,sideOffset:r,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a}))}o(ie,"PopoverContent");import{PopoverClose as nt}from"@radix-ui/react-popover";import{format as xe}from"date-fns";function Ce({description:e,label:t,name:r,minDate:a,onChange:n,component:c,...u}){let{components:x}=F(),{control:C}=it();return P.createElement(y,{control:C,name:r,render:({field:i,fieldState:d})=>{let p=c||x?.date;if(p){let m={description:e,label:t,name:r,minDate:a,onChange:n,...u};return P.createElement(p,{field:{...i,onChange:o(l=>{i.onChange(l),n?.(l)},"onChange")},fieldState:d,fieldData:m})}return P.createElement(N,{"data-field":r,className:`flex flex-col RemoteFlows__DatePickerField__Item__${r}`},P.createElement(h,{className:"RemoteFlows__DatePickerField__Label"},t),P.createElement(re,null,P.createElement(ae,{asChild:!0},P.createElement(w,null,P.createElement("div",null,P.createElement(U,{type:"button",variant:"outline",className:s("w-full pl-3 text-left font-normal",!i.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${r}`},i.value&&P.createElement(P.Fragment,null,xe(i.value,"yyyy-MM-dd")),P.createElement(at,{className:"ml-auto h-4 w-4 opacity-50"}))))),P.createElement(ie,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start"},P.createElement(ve,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:i.value?new Date(i.value):void 0,onSelect:m=>{i.onChange(m?xe(m,"yyyy-MM-dd"):null),n?.(m)},defaultMonth:a?new Date(a):void 0,components:{DayContent:o(m=>P.createElement(nt,null,m.date.getDate()),"DayContent")},...a&&{disabled:o(m=>m<new Date(a),"disabled")}}))),e?P.createElement(R,null,e):null,d.error&&P.createElement(k,{className:"RemoteFlows__DatePickerField__Error"}))}})}o(Ce,"DatePickerField");import*as $ from"react";function ye({label:e,name:t,fields:r,description:a}){return $.createElement("fieldset",{className:s("border-1 border-input p-4 rounded-xl",`RemoteFlows__FieldSetField__${t}`)},$.createElement("legend",{className:"text-sm font-semibold px-2"},e),a?$.createElement("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:a}}):null,$.createElement("div",{className:"grid gap-4"},r.map(n=>{let c=ne[n.type];return $.createElement(c,{...n,key:n.name,name:`${t}.${n.name}`})})))}o(ye,"FieldSetField");import*as E from"react";import{useFormContext as ct}from"react-hook-form";import L,{useState as st,useRef as lt}from"react";import{Upload as mt,X as dt}from"lucide-react";function _e({onChange:e,className:t,multiple:r}){let[a,n]=st([]),c=lt(null),u=o(i=>{i.preventDefault(),c.current?.click()},"handleClick"),x=o(i=>{if(i.target.files&&i.target.files.length>0){let d=Array.from(i.target.files);n(d),e(i)}},"handleChange"),C=o(i=>{n(d=>d.filter(p=>p!==i))},"onRemoveFile");return L.createElement("div",{className:s("flex flex-col items-start gap-4",t)},L.createElement("input",{type:"file",ref:c,onChange:x,className:"hidden","aria-label":"File upload",multiple:r}),L.createElement(U,{type:"button",onClick:u,className:"gap-2"},L.createElement(mt,{className:"h-4 w-4"}),"Choose File"),a.length===0&&L.createElement("div",{className:"text-sm"},r?L.createElement("span",{className:"font-medium"},"No files selected. You can select multiple files"):L.createElement("span",{className:"font-medium"},"No file selected.")),a.length>0&&a.map((i,d)=>L.createElement("div",{key:d,className:"text-sm flex items-center gap-2"},"Selected file: ",L.createElement("span",{className:"font-medium"},i.name)," (",Math.round(i.size/1024)," KB)",L.createElement(U,{variant:"ghost",onClick:()=>C(i)},L.createElement(dt,null)))))}o(_e,"FileUploader");var pt=o(e=>new Promise((t,r)=>{let a=new FileReader;a.readAsDataURL(e),a.onload=()=>t(a.result),a.onerror=n=>r(n)}),"toBase64"),he=o(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async a=>{let n=await pt(a);return{name:a.name,content:n.split(",")[1]}}))},"convertFilesToBase64");function Pe({name:e,description:t,label:r,multiple:a,onChange:n,component:c,...u}){let{components:x}=F(),{control:C}=ct();return E.createElement(y,{control:C,name:e,render:({field:i,fieldState:d})=>{let p=c||x?.file;if(p){let m={name:e,description:t,label:r,multiple:a,...u};return E.createElement(p,{field:{...i,value:null,onChange:o(async l=>{let g=await he(l);i.onChange(g),n?.(g)},"onChange")},fieldState:d,fieldData:m})}return E.createElement(N,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`},E.createElement(h,{className:"RemoteFlows__FileUpload__Label"},r),E.createElement(w,null,E.createElement(_e,{onChange:async m=>{let l=await he(m);i.onChange(l),n?.(l)},multiple:a,className:s("RemoteFlows__FileUpload__Input")})),t&&E.createElement("div",{className:"flex items-center justify-between"},E.createElement(R,{className:"RemoteFlows__FileUpload__Description"},t)),d.error&&E.createElement(k,{className:"RemoteFlows__FileUpload__Error"}))}})}o(Pe,"FileUploadField");import de from"react";import{useFormContext as ft}from"react-hook-form";import*as G from"react";import{useFormContext as ut}from"react-hook-form";import*as be from"react";function Se({className:e,type:t,...r}){return be.createElement("input",{type:t,"data-slot":"input",className:s("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}o(Se,"Input");function W({name:e,description:t,label:r,type:a,onChange:n,component:c,...u}){let{components:x}=F(),{control:C}=ut();return G.createElement(y,{control:C,name:e,render:({field:i,fieldState:d})=>{let p=c||x?.text;if(p){let m={name:e,description:t,label:r,type:a,onChange:n,...u};return G.createElement(p,{field:{...i,onChange:o(l=>{i.onChange(l),n?.(l)},"onChange")},fieldState:d,fieldData:m})}return G.createElement(N,{"data-field":e,className:`RemoteFlows__TextField__Item__${e}`},G.createElement(h,{className:"RemoteFlows__TextField__Label"},r),G.createElement(w,null,G.createElement(Se,{...i,value:i.value??"",onChange:m=>{i.onChange(m),n?.(m)},className:"RemoteFlows__TextField__Input",placeholder:r})),t&&G.createElement(R,{className:"RemoteFlows__TextField__Description"},t),d.error&&G.createElement(k,{className:"RemoteFlows__TextField__Error"}))}})}o(W,"TextField");function ce(e){let{components:t}=F(),{control:r}=ft(),a=e.component||t?.number;return a?de.createElement(y,{control:r,name:e.name,render:({field:n,fieldState:c})=>de.createElement(a,{field:{...n,onChange:o(u=>{n.onChange(u),e.onChange?.(u)},"onChange")},fieldState:c,fieldData:e})}):de.createElement(W,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}o(ce,"NumberField");import*as X from"@radix-ui/react-radio-group";import{CircleIcon as gt}from"lucide-react";import*as Q from"react";function Ne({className:e,...t}){return Q.createElement(X.Root,{"data-slot":"radio-group",className:s("grid gap-3",e),...t})}o(Ne,"RadioGroup");function we({className:e,...t}){return Q.createElement(X.Item,{"data-slot":"radio-group-item",className:s("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t},Q.createElement(X.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center"},Q.createElement(gt,{className:"fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})))}o(we,"RadioGroupItem");import*as b from"react";import{useFormContext as Ft}from"react-hook-form";function Re({name:e,defaultValue:t,description:r,label:a,options:n,onChange:c,component:u,...x}){let{components:C}=F(),{control:i}=Ft();return b.createElement(y,{control:i,name:e,defaultValue:t,render:({field:d,fieldState:p})=>{let m=u||C?.radio;if(m){let l={name:e,defaultValue:t,description:r,label:a,options:n,...x};return b.createElement(m,{field:{...d,onChange:o(g=>{d.onChange(g),c?.(g)},"onChange")},fieldState:p,fieldData:l})}return b.createElement(N,{className:s("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e},b.createElement(h,null,a),b.createElement(w,null,b.createElement(Ne,{"aria-label":a,onValueChange:l=>{d.onChange(l),c?.(l)},value:d.value,className:"flex flex-col space-y-3"},n?.map(l=>b.createElement(b.Fragment,null,b.createElement(N,{key:l.value,"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item"},b.createElement(w,null,b.createElement(we,{value:l.value,className:"RemoteFlows__RadioField__Input"})),b.createElement("div",null,b.createElement(h,{className:"font-normal mb-0 RemoteFlows__RadioField__Label"},l.label),l.description&&b.createElement(R,{className:"mt-2"},l.description))))))),r&&b.createElement(R,null,r),p.error&&b.createElement(k,null))}})}o(Re,"RadioGroupField");import*as T from"react";import*as v from"react";import*as f from"@radix-ui/react-select";import{CheckIcon as vt,ChevronDownIcon as De,ChevronUpIcon as xt}from"lucide-react";function ke({...e}){return v.createElement(f.Root,{"data-slot":"select",...e})}o(ke,"Select");function Te({...e}){return v.createElement(f.Group,{"data-slot":"select-group",...e})}o(Te,"SelectGroup");function Ie({...e}){return v.createElement(f.Value,{"data-slot":"select-value",...e})}o(Ie,"SelectValue");function Le({className:e,children:t,...r}){return v.createElement(f.Trigger,{"data-slot":"select-trigger",className:s("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",e),...r},t,v.createElement(f.Icon,{asChild:!0,className:"absolute right-4"},v.createElement(De,{className:"size-4"})))}o(Le,"SelectTrigger");function Me({className:e,children:t,position:r="popper",...a}){return v.createElement(f.Portal,null,v.createElement(f.Content,{"data-slot":"select-content",className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a},v.createElement(Ct,null),v.createElement(f.Viewport,{className:s(r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},t),v.createElement(yt,null)))}o(Me,"SelectContent");function ze({className:e,children:t,...r}){return v.createElement(f.Item,{"data-slot":"select-item",className:s("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r},v.createElement(f.ItemText,null,t),v.createElement("span",{className:"flex size-3.5 items-center justify-center"},v.createElement(f.ItemIndicator,null,v.createElement(vt,{className:"size-4"}))))}o(ze,"SelectItem");function Ct({className:e,...t}){return v.createElement(f.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:s("flex cursor-default items-center justify-center py-1",e),...t},v.createElement(xt,{className:"size-4"}))}o(Ct,"SelectScrollUpButton");function yt({className:e,...t}){return v.createElement(f.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:s("flex cursor-default items-center justify-center py-1",e),...t},v.createElement(De,{className:"size-4"}))}o(yt,"SelectScrollDownButton");import{useFormContext as _t}from"react-hook-form";function Ee({label:e,name:t,options:r,defaultValue:a,description:n,onChange:c,component:u,...x}){let{control:C}=_t(),{components:i}=F();return T.createElement(y,{defaultValue:a,control:C,name:t,render:({field:d,fieldState:p})=>{let m=u||i?.select;if(m){let l={label:e,name:t,options:r,defaultValue:a,description:n,onChange:c,...x};return T.createElement(m,{field:{...d,onChange:o(g=>{d.onChange(g),c?.(g)},"onChange")},fieldState:p,fieldData:l})}return T.createElement(N,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`},T.createElement(h,{className:"RemoteFlows__SelectField__Label"},e),T.createElement(w,null,T.createElement("div",{className:"relative"},T.createElement(ke,{value:d.value||"",onValueChange:l=>{d.onChange(l),c?.(l)}},T.createElement(Le,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!p.error,"aria-label":e},T.createElement("span",{className:"absolute"},T.createElement(Ie,{placeholder:e}))),T.createElement(Me,{className:"RemoteFlows__SelectField__Content"},T.createElement(Te,{className:"RemoteFlows__SelectField__Group"},r.map(l=>T.createElement(ze,{key:l.value,value:l.value,className:"RemoteFlows__SelectField__SelectItem"},l.label))))))),n&&T.createElement(R,null,n),p.error&&T.createElement(k,null))}})}o(Ee,"SelectField");import V,{useState as Rt}from"react";import{useFormContext as Dt}from"react-hook-form";import S,{Fragment as Pt,useState as bt}from"react";import{Check as St,ChevronDownIcon as Nt,X as wt}from"lucide-react";import*as J from"react";import{Command as K}from"cmdk";import{SearchIcon as Ir}from"lucide-react";import*as ht from"react";import*as O from"@radix-ui/react-dialog";import{XIcon as _r}from"lucide-react";function Ae({className:e,...t}){return J.createElement(K,{"data-slot":"command",className:s("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}o(Ae,"Command");function Be({className:e,...t}){return J.createElement(K.List,{"data-slot":"command-list",className:s("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}o(Be,"CommandList");function Ge({...e}){return J.createElement(K.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}o(Ge,"CommandEmpty");function Oe({className:e,...t}){return J.createElement(K.Group,{"data-slot":"command-group",className:s("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}o(Oe,"CommandGroup");function Ve({className:e,...t}){return J.createElement(K.Separator,{"data-slot":"command-separator",className:s("bg-border -mx-1 h-px",e),...t})}o(Ve,"CommandSeparator");function Ue({className:e,...t}){return J.createElement(K.Item,{"data-slot":"command-item",className:s("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}o(Ue,"CommandItem");function Je({options:e,selected:t,onChange:r,placeholder:a,...n}){let[c,u]=bt(!1),x=o(i=>{r(t.filter(d=>d.value!==i.value))},"handleUnselect"),C=e.reduce((i,d)=>{let p=d.category||"Uncategorized";return i[p]||(i[p]=[]),i[p].push(d),i},{});return S.createElement(re,{open:c,onOpenChange:u,...n},S.createElement(ae,null,S.createElement(U,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full justify-between font-normal",type:"button"},S.createElement("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center"},t.length>0?t.map(i=>S.createElement(ge,{key:i.label,variant:"secondary",className:"mr-1 mb-1"},i.label,S.createElement("div",{role:"button",tabIndex:0,"aria-label":`remove ${i.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:d=>{d.key==="Enter"&&x(i)},onMouseDown:d=>{d.preventDefault(),d.stopPropagation()},onClick:()=>x(i)},S.createElement(wt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})))):S.createElement("span",{className:"text-foreground"},a)),S.createElement(Nt,{className:"size-4"}))),S.createElement(ie,{align:"start",className:"w-full p-0"},S.createElement(Ae,null,S.createElement(Be,null,S.createElement(Ge,null,"No item found."),Object.entries(C).map(([i,d],p)=>S.createElement(Pt,{key:i},p>0&&S.createElement(Ve,null),S.createElement(Oe,{heading:i},d.map(m=>{let l=t.some(g=>g.value===m.value);return S.createElement(Ue,{key:m.label,onSelect:()=>{r(l?t.filter(g=>g.value!==m.value):[...t,m])}},S.createElement(St,{className:s("mr-2 h-4 w-4",l?"opacity-100":"opacity-0")}),m.label)}))))))))}o(Je,"MultiSelect");function He({label:e,name:t,options:r,defaultValue:a,description:n,onChange:c,$meta:u,component:x,...C}){let{control:i}=Dt(),{components:d}=F(),[p,m]=Rt([]);return V.createElement(y,{defaultValue:a,control:i,name:t,render:({field:l,fieldState:g})=>{let _=x||d?.countries;if(_){let I={label:e,name:t,options:r,defaultValue:a,description:n,onChange:c,$meta:u,...C};return V.createElement(_,{field:{...l,onChange:o(A=>{l.onChange(A),c?.(A)},"onChange")},fieldState:g,fieldData:I})}let z=[...Object.entries(u?.regions||{}).map(([I,A])=>({value:A,label:I,category:"Regions"})),...Object.entries(u?.subregions||{}).map(([I,A])=>({value:A,label:I,category:"Subregions"})),...r.map(I=>({...I,value:I.value,label:I.label,category:"Countries"}))],ee=o(I=>{let A=I.map(({value:Qe})=>Qe);l.onChange(A),c?.(A),m(I)},"handleChange");return V.createElement(N,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`},V.createElement(h,{className:"RemoteFlows__CountryField__Label"},e),V.createElement(w,null,V.createElement(Je,{options:z,selected:p,onChange:ee,...C})),n&&V.createElement(R,null,n),g.error&&V.createElement(k,null))}})}o(He,"CountryField");import*as M from"react";import{useFormContext as kt}from"react-hook-form";import*as se from"react";var pe=se.forwardRef(({className:e,...t},r)=>se.createElement("textarea",{className:s("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));pe.displayName="Textarea";function je({name:e,description:t,label:r,onChange:a,maxLength:n,component:c,...u}){let{components:x}=F(),{control:C}=kt();return M.createElement(y,{control:C,name:e,render:({field:i,fieldState:d})=>{let p=c||x?.textarea;if(p){let l={name:e,description:t,label:r,maxLength:n,...u};return M.createElement(p,{field:{...i,onChange:o(g=>{i.onChange(g),a?.(g)},"onChange")},fieldState:d,fieldData:l})}let m=i.value?.length??0;return M.createElement(N,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`},M.createElement(h,{className:"RemoteFlows__TextArea__Label"},r),M.createElement(w,null,M.createElement(pe,{...i,value:i.value??"",onChange:l=>{i.onChange(l),a?.(l)},className:s(d.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:r})),(t||n)&&M.createElement("div",{className:"flex items-center justify-between"},t&&M.createElement(R,{className:"RemoteFlows__TextArea__Description"},t),n&&M.createElement("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength"},m,"/",n)),d.error&&M.createElement(k,{className:"RemoteFlows__TextArea__Error"}))}})}o(je,"TextAreaField");import ue from"react";import{useFormContext as Tt}from"react-hook-form";function $e(e){let{components:t}=F(),{control:r}=Tt(),a=e.component||t?.email;return a?ue.createElement(y,{control:r,name:e.name,render:({field:n,fieldState:c})=>ue.createElement(a,{field:{...n,onChange:o(u=>{n.onChange(u),e.onChange?.(u)},"onChange")},fieldState:c,fieldData:e})}):ue.createElement(W,{...e,type:"email"})}o($e,"EmailField");var ne={checkbox:Fe,text:W,email:$e,money:ce,select:Ee,radio:Re,number:ce,file:Pe,fieldset:ye,date:Ce,textarea:je,countries:He};import{cva as It}from"class-variance-authority";import*as le from"react";var Lt=It("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-card bg-warning border-warning-border [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function We({className:e,variant:t,...r}){return le.createElement("div",{"data-slot":"alert",role:"alert",className:s(Lt({variant:t}),e),...r})}o(We,"Alert");function Xe({className:e,...t}){return le.createElement("div",{"data-slot":"alert-title",className:s("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}o(Xe,"AlertTitle");function Ke({className:e,...t}){return le.createElement("div",{"data-slot":"alert-description",className:s("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}o(Ke,"AlertDescription");import{AlertCircle as Mt}from"lucide-react";import Z from"react";function qe({title:e,description:t,severity:r}){let{components:a}=F();if(a?.statement){let n=a?.statement;return Z.createElement(n,{data:{title:e,description:t,severity:r}})}return Z.createElement(We,{variant:"warning"},Z.createElement(Mt,{className:"h-4 w-4"}),e&&Z.createElement(Xe,null,e),Z.createElement(Ke,null,t))}o(qe,"Statement");import fe,{useEffect as zt}from"react";import{useFormContext as Et}from"react-hook-form";function Ye({name:e,value:t,description:r,statement:a}){let{setValue:n}=Et();return zt(()=>{n(e,t)},[]),fe.createElement("div",null,fe.createElement("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:a.title}}),fe.createElement("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:a.description||r}}))}o(Ye,"ForcedValueField");function Bt(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}o(Bt,"checkFieldHasForcedValue");var Wa=o(({fields:e,components:t})=>!e||e.length===0?null:H.createElement(H.Fragment,null,e.map(r=>{if(r.isVisible===!1||r.deprecated)return null;if(Bt(r))return H.createElement(Ye,{key:r.name,name:r.name,description:r.description,value:r.const,statement:r.statement});let a=ne[r.inputType];return a?H.createElement(At,{key:r.name},H.createElement(a,{...r,component:t&&t[r.inputType]}),r.statement?H.createElement(qe,{...r.statement}):null):H.createElement("p",{className:"error"},"Field type ",r.inputType," not supported")})),"JSONSchemaFormFields");export{Wa as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BKROCZRD.js.map
|