@remoteoss/remote-flows 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RJO534HJ.js → chunk-3ALAJXRV.js} +2 -2
- package/dist/{chunk-FXESMDKI.js → chunk-3TZG2IN7.js} +2 -2
- package/dist/{chunk-5KPB3KN7.js → chunk-46FT5RHQ.js} +2 -2
- package/dist/{chunk-4ZNCIMTR.js → chunk-4STFNBEP.js} +2 -2
- package/dist/{chunk-XRFBLWLZ.js → chunk-5FYGD7NK.js} +2 -2
- package/dist/{chunk-S6CCPQSN.js → chunk-5JLTIH7G.js} +2 -2
- package/dist/chunk-5S66VYFD.js +2 -0
- package/dist/chunk-5S66VYFD.js.map +1 -0
- package/dist/{chunk-LE4O6V7D.js → chunk-65HLULDL.js} +2 -2
- package/dist/chunk-6GTRAHWJ.js +2 -0
- package/dist/chunk-6GTRAHWJ.js.map +1 -0
- package/dist/chunk-6P4DTWYK.js +2 -0
- package/dist/chunk-6P4DTWYK.js.map +1 -0
- package/dist/{chunk-NVTGX5FY.js → chunk-6SRDRMBU.js} +2 -2
- package/dist/chunk-6SRDRMBU.js.map +1 -0
- package/dist/chunk-7RREQLI5.js +2 -0
- package/dist/chunk-7RREQLI5.js.map +1 -0
- package/dist/{chunk-KJZLQ77E.js → chunk-A3K4Q2U6.js} +2 -2
- package/dist/{chunk-3N4O7TE2.js → chunk-BAWJZ6MA.js} +2 -2
- package/dist/{chunk-X5GMCAS7.js → chunk-BEWGN2JK.js} +2 -2
- package/dist/{chunk-FFT7BPGS.js → chunk-CULOWG5X.js} +2 -2
- package/dist/{chunk-LZGN6WCB.js → chunk-DRGQQXWZ.js} +2 -2
- package/dist/chunk-E25DZ75Z.js +2 -0
- package/dist/chunk-E25DZ75Z.js.map +1 -0
- package/dist/chunk-EDVJBPCB.js +2 -0
- package/dist/chunk-EDVJBPCB.js.map +1 -0
- package/dist/chunk-ERRQIROU.js +2 -0
- package/dist/chunk-ERRQIROU.js.map +1 -0
- package/dist/chunk-F3KEIVSE.js +2 -0
- package/dist/chunk-F3KEIVSE.js.map +1 -0
- package/dist/{chunk-TYCDD66L.js → chunk-FKLQBAJ5.js} +2 -2
- package/dist/{chunk-SLD6QFPG.js → chunk-GBZXVNGQ.js} +2 -2
- package/dist/{chunk-VFZXJTBY.js → chunk-HAV7FPRM.js} +2 -2
- package/dist/{chunk-NMHISCDF.js → chunk-IOZFJ65G.js} +2 -2
- package/dist/{chunk-W3JY7GB5.js → chunk-KCXAXVC5.js} +2 -2
- package/dist/{chunk-S7INFMJB.js → chunk-KY2JSZI3.js} +2 -2
- package/dist/{chunk-EDP4HELT.js → chunk-LJUHIEEZ.js} +2 -2
- package/dist/chunk-LQBVRVXH.js +2 -0
- package/dist/chunk-LQBVRVXH.js.map +1 -0
- package/dist/chunk-M2TLNSTK.js +2 -0
- package/dist/chunk-M2TLNSTK.js.map +1 -0
- package/dist/{chunk-GMQ4GITD.js → chunk-MNSIBSAM.js} +2 -2
- package/dist/{chunk-K5P2NRJ3.js → chunk-O37C4LZF.js} +2 -2
- package/dist/{chunk-7Q3N2EY2.js → chunk-OUI554QS.js} +2 -2
- package/dist/{chunk-T2URGIP3.js → chunk-QJ5MCAIN.js} +2 -2
- package/dist/{chunk-W2SYJLOE.js → chunk-QYWA5XM4.js} +2 -2
- package/dist/{chunk-5RM36L5X.js → chunk-RTKKWC4M.js} +2 -2
- package/dist/{chunk-FMDAJQPU.js → chunk-RVIGZOGF.js} +2 -2
- package/dist/{chunk-26JXMVXY.js → chunk-S2FD3J22.js} +2 -2
- package/dist/chunk-SIYKTLFS.js +2 -0
- package/dist/chunk-SIYKTLFS.js.map +1 -0
- package/dist/chunk-T6HCUFYI.js +2 -0
- package/dist/chunk-T6HCUFYI.js.map +1 -0
- package/dist/{chunk-FLNGPYQ2.js → chunk-TVJYCR33.js} +2 -2
- package/dist/chunk-TVJYCR33.js.map +1 -0
- package/dist/{chunk-WKHYYISW.js → chunk-UTWP5CJZ.js} +2 -2
- package/dist/{chunk-A5BCZOOQ.js → chunk-XGVSEXYA.js} +2 -2
- package/dist/{chunk-2VW77NBC.js → chunk-XRI6PRXK.js} +2 -2
- package/dist/chunk-Y2NSR2N6.js +2 -0
- package/dist/chunk-Y2NSR2N6.js.map +1 -0
- package/dist/chunk-Y5P5IJRN.js +2 -0
- package/dist/chunk-Y5P5IJRN.js.map +1 -0
- package/dist/{chunk-N4232FEQ.js → chunk-ZP2BE7U6.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
- 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/ContractAmendmentSubmit.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingBack.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
- package/dist/flows/CostCalculator/api.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +3 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -2
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +4 -4
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SaveDraftButton.js +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/api.d.ts +5 -5
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/types.d.ts +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.js +1 -1
- package/dist/{mutations-B7nzyRmB.d.ts → mutations-CPqUOEmz.d.ts} +1 -1
- package/dist/{remoteFlows-CnmojyGF.d.ts → remoteFlows-CLgJcdkS.d.ts} +31 -15
- package/dist/{types-D2tc0MbF.d.ts → types-BGV7PQbp.d.ts} +2 -2
- package/dist/{types-DGKjcWLj.d.ts → types-B_ZvICFS.d.ts} +3 -3
- package/dist/{types-DDcdRWu_.d.ts → types-Ckh2r3F3.d.ts} +2 -2
- package/dist/{types-CbCzUTok.d.ts → types-epJRqrJU.d.ts} +4 -4
- package/dist/{types.gen-UyEyxhzQ.d.ts → types.gen-D2nbxMA0.d.ts} +1 -1
- package/package.json +6 -2
- package/dist/chunk-6YXSWOKH.js +0 -2
- package/dist/chunk-6YXSWOKH.js.map +0 -1
- package/dist/chunk-7WVNWNM2.js +0 -2
- package/dist/chunk-7WVNWNM2.js.map +0 -1
- package/dist/chunk-BIQPVUM2.js +0 -2
- package/dist/chunk-BIQPVUM2.js.map +0 -1
- package/dist/chunk-BZUYUGQF.js +0 -2
- package/dist/chunk-BZUYUGQF.js.map +0 -1
- package/dist/chunk-FLNGPYQ2.js.map +0 -1
- package/dist/chunk-FLXY4CUE.js +0 -2
- package/dist/chunk-FLXY4CUE.js.map +0 -1
- package/dist/chunk-FXRIYGSV.js +0 -2
- package/dist/chunk-FXRIYGSV.js.map +0 -1
- package/dist/chunk-MDDI5GLL.js +0 -2
- package/dist/chunk-MDDI5GLL.js.map +0 -1
- package/dist/chunk-NIGMIGF6.js +0 -2
- package/dist/chunk-NIGMIGF6.js.map +0 -1
- package/dist/chunk-NVTGX5FY.js.map +0 -1
- package/dist/chunk-OA7477F5.js +0 -2
- package/dist/chunk-OA7477F5.js.map +0 -1
- package/dist/chunk-QP3VWGCS.js +0 -2
- package/dist/chunk-QP3VWGCS.js.map +0 -1
- package/dist/chunk-SGFXAOTZ.js +0 -2
- package/dist/chunk-SGFXAOTZ.js.map +0 -1
- package/dist/chunk-STPJXT2A.js +0 -2
- package/dist/chunk-STPJXT2A.js.map +0 -1
- package/dist/chunk-V2L3UV7M.js +0 -2
- package/dist/chunk-V2L3UV7M.js.map +0 -1
- /package/dist/{chunk-RJO534HJ.js.map → chunk-3ALAJXRV.js.map} +0 -0
- /package/dist/{chunk-FXESMDKI.js.map → chunk-3TZG2IN7.js.map} +0 -0
- /package/dist/{chunk-5KPB3KN7.js.map → chunk-46FT5RHQ.js.map} +0 -0
- /package/dist/{chunk-4ZNCIMTR.js.map → chunk-4STFNBEP.js.map} +0 -0
- /package/dist/{chunk-XRFBLWLZ.js.map → chunk-5FYGD7NK.js.map} +0 -0
- /package/dist/{chunk-S6CCPQSN.js.map → chunk-5JLTIH7G.js.map} +0 -0
- /package/dist/{chunk-LE4O6V7D.js.map → chunk-65HLULDL.js.map} +0 -0
- /package/dist/{chunk-KJZLQ77E.js.map → chunk-A3K4Q2U6.js.map} +0 -0
- /package/dist/{chunk-3N4O7TE2.js.map → chunk-BAWJZ6MA.js.map} +0 -0
- /package/dist/{chunk-X5GMCAS7.js.map → chunk-BEWGN2JK.js.map} +0 -0
- /package/dist/{chunk-FFT7BPGS.js.map → chunk-CULOWG5X.js.map} +0 -0
- /package/dist/{chunk-LZGN6WCB.js.map → chunk-DRGQQXWZ.js.map} +0 -0
- /package/dist/{chunk-TYCDD66L.js.map → chunk-FKLQBAJ5.js.map} +0 -0
- /package/dist/{chunk-SLD6QFPG.js.map → chunk-GBZXVNGQ.js.map} +0 -0
- /package/dist/{chunk-VFZXJTBY.js.map → chunk-HAV7FPRM.js.map} +0 -0
- /package/dist/{chunk-NMHISCDF.js.map → chunk-IOZFJ65G.js.map} +0 -0
- /package/dist/{chunk-W3JY7GB5.js.map → chunk-KCXAXVC5.js.map} +0 -0
- /package/dist/{chunk-S7INFMJB.js.map → chunk-KY2JSZI3.js.map} +0 -0
- /package/dist/{chunk-EDP4HELT.js.map → chunk-LJUHIEEZ.js.map} +0 -0
- /package/dist/{chunk-GMQ4GITD.js.map → chunk-MNSIBSAM.js.map} +0 -0
- /package/dist/{chunk-K5P2NRJ3.js.map → chunk-O37C4LZF.js.map} +0 -0
- /package/dist/{chunk-7Q3N2EY2.js.map → chunk-OUI554QS.js.map} +0 -0
- /package/dist/{chunk-T2URGIP3.js.map → chunk-QJ5MCAIN.js.map} +0 -0
- /package/dist/{chunk-W2SYJLOE.js.map → chunk-QYWA5XM4.js.map} +0 -0
- /package/dist/{chunk-5RM36L5X.js.map → chunk-RTKKWC4M.js.map} +0 -0
- /package/dist/{chunk-FMDAJQPU.js.map → chunk-RVIGZOGF.js.map} +0 -0
- /package/dist/{chunk-26JXMVXY.js.map → chunk-S2FD3J22.js.map} +0 -0
- /package/dist/{chunk-WKHYYISW.js.map → chunk-UTWP5CJZ.js.map} +0 -0
- /package/dist/{chunk-A5BCZOOQ.js.map → chunk-XGVSEXYA.js.map} +0 -0
- /package/dist/{chunk-2VW77NBC.js.map → chunk-XRI6PRXK.js.map} +0 -0
- /package/dist/{chunk-N4232FEQ.js.map → chunk-ZP2BE7U6.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../types.gen-
|
|
2
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-
|
|
1
|
+
import '../../types.gen-D2nbxMA0.js';
|
|
2
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-BGV7PQbp.js';
|
|
3
3
|
import './TerminationBack.js';
|
|
4
4
|
import './TerminationSubmit.js';
|
|
5
5
|
import '../types.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../mutations-
|
|
8
|
-
import '../../remoteFlows-
|
|
7
|
+
import '../../mutations-CPqUOEmz.js';
|
|
8
|
+
import '../../remoteFlows-CLgJcdkS.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'yup';
|
|
11
11
|
import '../../types-Zg1n_9wh.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../types.gen-
|
|
2
|
+
import '../../types.gen-D2nbxMA0.js';
|
|
3
3
|
import '../useStepState.js';
|
|
4
|
-
export { f as STEPS, S as StepTerminationKeys, i as buildInitialValues, g as calculateMinTerminationDate, h as calculateProposedTerminationDateStatement } from '../../types-
|
|
4
|
+
export { f as STEPS, S as StepTerminationKeys, i as buildInitialValues, g as calculateMinTerminationDate, h as calculateProposedTerminationDateStatement } from '../../types-BGV7PQbp.js';
|
|
5
5
|
import 'react-hook-form';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../mutations-
|
|
8
|
-
import '../../remoteFlows-
|
|
7
|
+
import '../../mutations-CPqUOEmz.js';
|
|
8
|
+
import '../../remoteFlows-CLgJcdkS.js';
|
|
9
9
|
import 'yup';
|
|
10
10
|
import '../../types-Zg1n_9wh.js';
|
|
11
11
|
import '@remoteoss/json-schema-form-old';
|
package/dist/flows/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { J as JSFFieldset } from '../remoteFlows-
|
|
1
|
+
import { J as JSFFieldset } from '../remoteFlows-CLgJcdkS.js';
|
|
2
2
|
import { modify } from '@remoteoss/json-schema-form-old';
|
|
3
3
|
import { ModifyConfig, FormResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'yup';
|
|
6
|
-
import '../types.gen-
|
|
6
|
+
import '../types.gen-D2nbxMA0.js';
|
|
7
7
|
import '../types-Zg1n_9wh.js';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
|
package/dist/index.d.ts
CHANGED
|
@@ -16,23 +16,23 @@ export { useContractAmendment } from './flows/ContractAmendment/hooks.js';
|
|
|
16
16
|
export { TerminationFlow } from './flows/Termination/TerminationFlow.js';
|
|
17
17
|
export { TerminationReasonsDetailContent } from './flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js';
|
|
18
18
|
export { TerminationDialogInfoContent } from './flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js';
|
|
19
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-
|
|
19
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-BGV7PQbp.js';
|
|
20
20
|
export { PaidTimeOffProps } from './flows/Termination/components/PaidTimeOff/PaidTimeOff.js';
|
|
21
21
|
export { AcknowledgeInformationFeesProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js';
|
|
22
22
|
export { AcknowledgeInformationProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js';
|
|
23
23
|
export { OnboardingFlow } from './flows/Onboarding/OnboardingFlow.js';
|
|
24
24
|
export { OnboardingInviteProps } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
25
|
-
export { B as BasicInformationFormPayload, c as BenefitsFormPayload, C as ContractDetailsFormPayload, e as CreditRiskState, d as CreditRiskStatus, E as Employment, f as OnboardingRenderProps, a as SelectCountryFormPayload, b as SelectCountrySuccess } from './types-
|
|
25
|
+
export { B as BasicInformationFormPayload, c as BenefitsFormPayload, C as ContractDetailsFormPayload, e as CreditRiskState, d as CreditRiskStatus, E as Employment, f as OnboardingRenderProps, a as SelectCountryFormPayload, b as SelectCountrySuccess } from './types-B_ZvICFS.js';
|
|
26
26
|
export { ContractorOnboardingFlow } from './flows/ContractorOnboarding/ContractorOnboarding.js';
|
|
27
|
-
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, C as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, a as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-
|
|
28
|
-
export {
|
|
27
|
+
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, C as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, a as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-epJRqrJU.js';
|
|
28
|
+
export { u as useEmploymentQuery, e as useMagicLink, c as usePaidTimeoffBreakdownQuery, d as useTimeOffLeavePoliciesSummaryQuery, b as useTimeOffQuery } from './types-Ckh2r3F3.js';
|
|
29
29
|
export { t as transformYupErrorsIntoObject } from './utils-CjDMg_Yr.js';
|
|
30
30
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
31
31
|
import { PropsWithChildren } from 'react';
|
|
32
|
-
import { R as RemoteFlowsSDKProps } from './remoteFlows-
|
|
33
|
-
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, d as CountryComponentProps, e as DatePickerComponentProps, D as DrawerComponentProps, b as FieldComponentProps, F as FieldSetToggleComponentProps, c as FileComponentProps, M as Meta, S as StatementComponentProps, T as TextFieldComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-
|
|
34
|
-
export { s as Company, C as ContractAmendmentAutomatableResponse, p as CostCalculatorEmployment,
|
|
35
|
-
export { F as FieldError, N as NormalizedFieldError } from './mutations-
|
|
32
|
+
import { R as RemoteFlowsSDKProps } from './remoteFlows-CLgJcdkS.js';
|
|
33
|
+
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, d as CountryComponentProps, e as DatePickerComponentProps, D as DrawerComponentProps, b as FieldComponentProps, F as FieldSetToggleComponentProps, c as FileComponentProps, M as Meta, S as StatementComponentProps, T as TextFieldComponentProps, W as WorkScheduleComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-CLgJcdkS.js';
|
|
34
|
+
export { s as Company, C as ContractAmendmentAutomatableResponse, p as CostCalculatorEmployment, d as CostCalculatorEstimateResponse, W as Currency, r as EmploymentCreationResponse, v as EmploymentResponse, O as OffboardingResponse, S as SuccessResponse } from './types.gen-D2nbxMA0.js';
|
|
35
|
+
export { F as FieldError, N as NormalizedFieldError } from './mutations-CPqUOEmz.js';
|
|
36
36
|
import 'yup';
|
|
37
37
|
import './types-Zg1n_9wh.js';
|
|
38
38
|
import 'react-hook-form';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-FZ7FWFJX.js";import{a as
|
|
1
|
+
import"./chunk-FZ7FWFJX.js";import{a as Y}from"./chunk-C74N2AWG.js";import{a as X}from"./chunk-4GDEWYZC.js";import{a as H}from"./chunk-OUI554QS.js";import"./chunk-LQBVRVXH.js";import"./chunk-O37C4LZF.js";import"./chunk-NS4FRCEH.js";import"./chunk-IWA5B4U6.js";import"./chunk-AT7VHJMW.js";import"./chunk-BHYFPY64.js";import"./chunk-EHAZWZ3O.js";import"./chunk-XRI6PRXK.js";import"./chunk-I4XJ764Y.js";import"./chunk-2TILNBMK.js";import"./chunk-XOA7GG4P.js";import"./chunk-XFD3ULUF.js";import"./chunk-ZXGAFQXW.js";import"./chunk-LMYJ6V44.js";import"./chunk-RR55GUDT.js";import"./chunk-NX7MM6XR.js";import"./chunk-VDRNNOVA.js";import"./chunk-QUQLW5YW.js";import"./chunk-DFJNVGK4.js";import"./chunk-SGE4DLC3.js";import"./chunk-3TZG2IN7.js";import"./chunk-GBZXVNGQ.js";import"./chunk-CULOWG5X.js";import"./chunk-M2TLNSTK.js";import"./chunk-46FT5RHQ.js";import"./chunk-MNSIBSAM.js";import"./chunk-MRYRNB7Y.js";import"./chunk-DKFUZO5P.js";import"./chunk-GULCZWSK.js";import{a as Z}from"./chunk-BEWGN2JK.js";import"./chunk-T6HCUFYI.js";import"./chunk-3ALAJXRV.js";import"./chunk-5JLTIH7G.js";import"./chunk-IOZFJ65G.js";import"./chunk-Y5P5IJRN.js";import"./chunk-6SRDRMBU.js";import"./chunk-EDVJBPCB.js";import"./chunk-Z7WBY27D.js";import"./chunk-KCXAXVC5.js";import"./chunk-65HLULDL.js";import"./chunk-PGWKJ6FK.js";import"./chunk-XGVSEXYA.js";import"./chunk-VAIBLWOY.js";import"./chunk-FKLQBAJ5.js";import{a as $}from"./chunk-UTWP5CJZ.js";import"./chunk-7RREQLI5.js";import"./chunk-ERRQIROU.js";import"./chunk-S2FD3J22.js";import"./chunk-LJUHIEEZ.js";import"./chunk-QJ5MCAIN.js";import"./chunk-A3K4Q2U6.js";import"./chunk-HAV7FPRM.js";import"./chunk-4STFNBEP.js";import"./chunk-6P4DTWYK.js";import"./chunk-TOA3JILU.js";import"./chunk-DRGQQXWZ.js";import"./chunk-ZOTFS35J.js";import"./chunk-OAPK6TR7.js";import"./chunk-AP56UUME.js";import"./chunk-R2MHAPWD.js";import"./chunk-3UDG4IJO.js";import"./chunk-FGBEOUQK.js";import{a as D}from"./chunk-RNM46ZUE.js";import{a as I}from"./chunk-FZDQ7EEI.js";import"./chunk-EC7QVRRX.js";import{a as S}from"./chunk-RTKKWC4M.js";import{a as A}from"./chunk-TVJYCR33.js";import{a as O}from"./chunk-SIYKTLFS.js";import"./chunk-A7ZJQCNU.js";import{a as _}from"./chunk-5FYGD7NK.js";import"./chunk-KSHK3ZPX.js";import{b as P,d as B}from"./chunk-QYWA5XM4.js";import"./chunk-RVIGZOGF.js";import"./chunk-E25DZ75Z.js";import"./chunk-VFRHMNLJ.js";import"./chunk-23OYALRY.js";import"./chunk-WVJDCDGZ.js";import"./chunk-H6YNMT4M.js";import{d as F,e as R}from"./chunk-XQL5I2GC.js";import"./chunk-HN5HLFTB.js";import"./chunk-BVDT43OO.js";import"./chunk-MXLQEDRJ.js";import"./chunk-Z5WMKCRJ.js";import{a as q}from"./chunk-KY2JSZI3.js";import{a as V}from"./chunk-BAWJZ6MA.js";import"./chunk-ZP2BE7U6.js";import{a as j}from"./chunk-Y2NSR2N6.js";import{a as K}from"./chunk-CDCKGIF5.js";import{a as M,b as W,c as L,d as U,e as Q}from"./chunk-JA7UP6GN.js";import"./chunk-ZPN5N6BA.js";import"./chunk-LNV36S6D.js";import"./chunk-5S66VYFD.js";import{a as E,b as z}from"./chunk-E5PHO3SS.js";import"./chunk-KGKDSOER.js";import"./chunk-2YTBWEC7.js";import{a as v,b as u}from"./chunk-NFUP6BFU.js";import"./chunk-ZIN2OWTH.js";import"./chunk-UOOUV52J.js";import"./chunk-72OH7PSF.js";import"./chunk-PJBAQZ6G.js";import"./chunk-F3KEIVSE.js";import"./chunk-6GTRAHWJ.js";import{a as h,c as m}from"./chunk-KQPDXXG3.js";import"./chunk-LJGCFFAT.js";import{a as N}from"./chunk-FUMA5UUB.js";import"./chunk-66N57DKF.js";import{b as C}from"./chunk-2SO4LW7V.js";import"./chunk-PMTKQME6.js";import"./chunk-TVZAFTPT.js";import{c as T,d as w}from"./chunk-L3Z2G32A.js";import{a as t}from"./chunk-P37U34EQ.js";import{QueryClient as dr,QueryClientProvider as pr}from"@tanstack/react-query";import{useMemo as gr}from"react";function l(r){let a=document.documentElement;Object.keys(r).forEach(e=>{let n=r[e];n&&a.style.setProperty(e,n)})}t(l,"setCssProperties");function G(r){let a={};return Object.keys(r).forEach(e=>{a[`--${e}`]=r[e]}),a}t(G,"mapThemeColors");function J(r){return{"--spacing":r}}t(J,"mapThemeSpacing");function rr(r){return{"--radius":r}}t(rr,"mapThemeBorderRadius");function ar(r){return{"--fontSizeBase":r.fontSizeBase}}t(ar,"mapThemeFont");function f(r){r?.colors&&l(G(r.colors)),r?.spacing&&l(J(r.spacing)),r?.borderRadius&&l(rr(r.borderRadius)),r?.font&&l(ar(r.font))}t(f,"applyTheme");import{createContext as tr,useEffect as er,useMemo as or}from"react";import{jsx as nr}from"react/jsx-runtime";var ir=tr({theme:{}});function b(r){er(()=>{r.theme&&Object.keys(r.theme).length>0&&f(r.theme)},[r.theme]);let a=or(()=>({theme:r.theme}),[r.theme]);return nr(ir.Provider,{value:a,children:r.children})}t(b,"ThemeProvider");var x={local:"http://localhost:4000/api/eor",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};var g="1.2.2";function sr(r){try{return new URL(r),!0}catch{return!1}}t(sr,"isValidUrl");function y(r,a){let e={current:null},n=a?.environment?x[a?.environment]:"https://gateway.remote.com",c=u.getConfig();a?.environment&&a?.environment!=="production"&&w(g);let s=!!a?.proxy&&sr(a.proxy.url);return a?.proxy&&!s&&console.error("Invalid proxy URL provided. Using default base URL."),v({...c,headers:{...c.headers,...s?a?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":g},baseUrl:s?a.proxy?.url:n,auth:t(async()=>{function p(o){return!o||Date.now()+6e4>o}if(t(p,"hasTokenExpired"),!e.current||p(e.current.expiresAt))try{let o=await r();e.current={accessToken:o.accessToken,expiresAt:Date.now()+o.expiresIn*1e3}}catch(o){console.error("Failed to fetch auth token:",o);return}return e.current?.accessToken},"auth")})}t(y,"createClient");import{Component as cr}from"react";import{jsx as k}from"react/jsx-runtime";var lr=t(()=>k("div",{style:{padding:"20px",border:"1px solid #dc2626",borderRadius:"4px",backgroundColor:"#fef2f2",color:"#991b1b"},children:"Something went wrong in RemoteFlows. Please refresh the page."}),"FallbackErrorBoundary"),d=class extends cr{static{t(this,"RemoteFlowsErrorBoundary")}constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,e){if(console.error("[RemoteFlows] Error caught:",a,e),this.props.errorBoundary?.useParentErrorBoundary)throw a}render(){return this.state.hasError&&this.state.error?this.props.errorBoundary?.fallback?typeof this.props.errorBoundary?.fallback=="function"?this.props.errorBoundary?.fallback(this.state.error):this.props.errorBoundary?.fallback:k(lr,{}):this.props.children}};import{jsx as i}from"react/jsx-runtime";var vr=new dr;function ur({children:r,client:a}){return i(m.Provider,{value:{client:a},children:r})}t(ur,"RemoteFlowContextWrapper");function hr({children:r,components:a}){return i(h.Provider,{value:a?{components:a}:{components:{}},children:r})}t(hr,"FormFieldsProvider");function mr({auth:r,children:a,components:e,theme:n,proxy:c,environment:s,errorBoundary:p={useParentErrorBoundary:!0}}){let o=gr(()=>y(r,{environment:s,proxy:c}),[r,s,c]);return i(d,{errorBoundary:p,children:i(pr,{client:vr,children:i(hr,{components:e,children:i(ur,{client:o,children:i(b,{theme:n,children:a})})})})})}t(mr,"RemoteFlows");export{N as ContractAmendmentConfirmationForm,q as ContractAmendmentFlow,V as ContractAmendmentForm,j as ContractAmendmentSubmit,$ as ContractorOnboardingFlow,_ as CostCalculatorFlow,S as CostCalculatorForm,A as CostCalculatorResetButton,O as CostCalculatorSubmitButton,D as EstimationResults,Z as OnboardingFlow,mr as RemoteFlows,I as SummaryResults,Y as TerminationDialogInfoContent,H as TerminationFlow,X as TerminationReasonsDetailContent,z as ZendeskTriggerButton,P as buildCostCalculatorEstimationPayload,C as convertFromCents,T as transformYupErrorsIntoObject,K as useContractAmendment,B as useCostCalculator,R as useCostCalculatorEstimationCsv,F as useCostCalculatorEstimationPdf,M as useEmploymentQuery,Q as useMagicLink,L as usePaidTimeoffBreakdownQuery,U as useTimeOffLeavePoliciesSummaryQuery,W as useTimeOffQuery,E as zendeskArticles};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/lib/version.ts","../src/auth/createClient.ts","../src/components/error-handling/RemoteFlowsErrorBoundary.tsx"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React, { useMemo } from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { createClient } from '@/src/auth/createClient';\nimport { Client } from '@/src/client/client';\nimport { RemoteFlowsErrorBoundary } from '@/src/components/error-handling/RemoteFlowsErrorBoundary';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n children: React.ReactNode;\n client: Client;\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n client,\n}: RemoteFlowContextWrapperProps) {\n return (\n <RemoteFlowContext.Provider value={{ client }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n errorBoundary = { useParentErrorBoundary: true },\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n const client = useMemo(\n () => createClient(auth, { environment, proxy }),\n [auth, environment, proxy],\n );\n return (\n <RemoteFlowsErrorBoundary errorBoundary={errorBoundary}>\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper client={client}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n </RemoteFlowsErrorBoundary>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","/**\n * SDK version constant\n * Retrieved from package.json at build time\n * Falls back to 'unknown' if VERSION env var is not set\n */\nexport const npmPackageVersion = process.env.VERSION || 'unknown';\n","import { createClient as createHeyApiClient } from '@/src/client/client';\nimport { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport { RemoteFlowsSDKProps } from '@/src/types/remoteFlows';\nimport { debug } from '@/src/lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function createClient(\n auth: () => Promise<AuthResponse>,\n options?: Options,\n) {\n const sessionRef = {\n current: null as { accessToken: string; expiresAt: number } | null,\n };\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return createHeyApiClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n\n if (\n !sessionRef.current ||\n hasTokenExpired(sessionRef.current.expiresAt)\n ) {\n try {\n const data = await auth();\n sessionRef.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n } catch (error) {\n console.error('Failed to fetch auth token:', error);\n return undefined;\n }\n }\n return sessionRef.current?.accessToken;\n },\n });\n}\n","import { Component, ErrorInfo, ReactNode } from 'react';\n\ntype ErrorBoundaryState = {\n hasError: boolean;\n error: Error | null;\n};\n\ninterface RemoteFlowsErrorBoundaryProps {\n children: ReactNode;\n /**\n * Error boundary configuration.\n */\n errorBoundary?: {\n /**\n * If true, re-throws errors to parent error boundary.\n * If false, shows fallback UI to prevent crashes.\n * @default false\n */\n useParentErrorBoundary?: boolean;\n /**\n * Custom fallback UI to show when an error occurs.\n * fallback only works when rethrow is false.\n * If not provided, shows default error message.\n */\n fallback?: ReactNode | ((error: Error) => ReactNode);\n };\n}\n\nexport const FallbackErrorBoundary = () => {\n return (\n <div\n style={{\n padding: '20px',\n border: '1px solid #dc2626',\n borderRadius: '4px',\n backgroundColor: '#fef2f2',\n color: '#991b1b',\n }}\n >\n Something went wrong in RemoteFlows. Please refresh the page.\n </div>\n );\n};\n\nexport class RemoteFlowsErrorBoundary extends Component<\n RemoteFlowsErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: RemoteFlowsErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('[RemoteFlows] Error caught:', error, errorInfo);\n\n if (this.props.errorBoundary?.useParentErrorBoundary) {\n throw error;\n }\n }\n\n render(): ReactNode {\n if (this.state.hasError && this.state.error) {\n // If custom fallback provided, use it\n if (this.props.errorBoundary?.fallback) {\n return typeof this.props.errorBoundary?.fallback === 'function'\n ? this.props.errorBoundary?.fallback(this.state.error)\n : this.props.errorBoundary?.fallback;\n }\n\n // Default fallback\n return <FallbackErrorBoundary />;\n }\n\n return this.props.children;\n }\n}\n"],"mappings":"y/GAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBAEjD,OAAgB,WAAAC,MAAe,QCQ/B,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,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ACA,SAAAR,EACA,WAAAK,EACA,MAAAI,EACA,MAAAC,EACA,YAAAC,EACA,cAAAC,EAAgB,CAAE,uBAAwB,EAAK,CACjD,EAA2C,CACzC,IAAMX,EAASY,EACb,IAAMC,EAAaN,EAAM,CAAE,YAAAG,EAAa,MAAAD,CAAM,CAAC,EAC/C,CAACF,EAAMG,EAAaD,CAAK,CAC3B,EACA,OACEd,EAACmB,EAAA,CAAyB,cAAeH,EACvC,SAAAhB,EAACoB,EAAA,CAAoB,OAAQnB,EAC3B,SAAAD,EAACQ,GAAA,CAAmB,WAAYC,EAC9B,SAAAT,EAACG,EAAA,CAAyB,OAAQE,EAChC,SAAAL,EAACqB,EAAA,CAAc,MAAOR,EAAQ,SAAAT,EAAS,EACzC,EACF,EACF,EACF,CAEJ,CAxBgBG,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","useMemo","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","npmPackageVersion","isValidUrl","url","__name","createClient","auth","options","sessionRef","baseUrl","ENVIRONMENTS","clientConfig","client","debug","npmPackageVersion","isValidProxy","hasTokenExpired","expiresAt","data","error","Component","jsx","FallbackErrorBoundary","__name","RemoteFlowsErrorBoundary","Component","props","error","errorInfo","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","client","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","auth","theme","proxy","environment","errorBoundary","useMemo","createClient","RemoteFlowsErrorBoundary","QueryClientProvider","ThemeProvider"]}
|
|
1
|
+
{"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/lib/version.ts","../src/auth/createClient.ts","../src/components/error-handling/RemoteFlowsErrorBoundary.tsx"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React, { useMemo } from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { createClient } from '@/src/auth/createClient';\nimport { Client } from '@/src/client/client';\nimport { RemoteFlowsErrorBoundary } from '@/src/components/error-handling/RemoteFlowsErrorBoundary';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n children: React.ReactNode;\n client: Client;\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n client,\n}: RemoteFlowContextWrapperProps) {\n return (\n <RemoteFlowContext.Provider value={{ client }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n errorBoundary = { useParentErrorBoundary: true },\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n const client = useMemo(\n () => createClient(auth, { environment, proxy }),\n [auth, environment, proxy],\n );\n return (\n <RemoteFlowsErrorBoundary errorBoundary={errorBoundary}>\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper client={client}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n </RemoteFlowsErrorBoundary>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","/**\n * SDK version constant\n * Retrieved from package.json at build time\n * Falls back to 'unknown' if VERSION env var is not set\n */\nexport const npmPackageVersion = process.env.VERSION || 'unknown';\n","import { createClient as createHeyApiClient } from '@/src/client/client';\nimport { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport { RemoteFlowsSDKProps } from '@/src/types/remoteFlows';\nimport { debug } from '@/src/lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function createClient(\n auth: () => Promise<AuthResponse>,\n options?: Options,\n) {\n const sessionRef = {\n current: null as { accessToken: string; expiresAt: number } | null,\n };\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return createHeyApiClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n\n if (\n !sessionRef.current ||\n hasTokenExpired(sessionRef.current.expiresAt)\n ) {\n try {\n const data = await auth();\n sessionRef.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n } catch (error) {\n console.error('Failed to fetch auth token:', error);\n return undefined;\n }\n }\n return sessionRef.current?.accessToken;\n },\n });\n}\n","import { Component, ErrorInfo, ReactNode } from 'react';\n\ntype ErrorBoundaryState = {\n hasError: boolean;\n error: Error | null;\n};\n\ninterface RemoteFlowsErrorBoundaryProps {\n children: ReactNode;\n /**\n * Error boundary configuration.\n */\n errorBoundary?: {\n /**\n * If true, re-throws errors to parent error boundary.\n * If false, shows fallback UI to prevent crashes.\n * @default false\n */\n useParentErrorBoundary?: boolean;\n /**\n * Custom fallback UI to show when an error occurs.\n * fallback only works when rethrow is false.\n * If not provided, shows default error message.\n */\n fallback?: ReactNode | ((error: Error) => ReactNode);\n };\n}\n\nexport const FallbackErrorBoundary = () => {\n return (\n <div\n style={{\n padding: '20px',\n border: '1px solid #dc2626',\n borderRadius: '4px',\n backgroundColor: '#fef2f2',\n color: '#991b1b',\n }}\n >\n Something went wrong in RemoteFlows. Please refresh the page.\n </div>\n );\n};\n\nexport class RemoteFlowsErrorBoundary extends Component<\n RemoteFlowsErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: RemoteFlowsErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('[RemoteFlows] Error caught:', error, errorInfo);\n\n if (this.props.errorBoundary?.useParentErrorBoundary) {\n throw error;\n }\n }\n\n render(): ReactNode {\n if (this.state.hasError && this.state.error) {\n // If custom fallback provided, use it\n if (this.props.errorBoundary?.fallback) {\n return typeof this.props.errorBoundary?.fallback === 'function'\n ? this.props.errorBoundary?.fallback(this.state.error)\n : this.props.errorBoundary?.fallback;\n }\n\n // Default fallback\n return <FallbackErrorBoundary />;\n }\n\n return this.props.children;\n }\n}\n"],"mappings":"sgHAAA,OAAS,eAAAA,GAAa,uBAAAC,OAA2B,wBAEjD,OAAgB,WAAAC,OAAe,QCQ/B,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAA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B,CACC,MAAOD,EAAa,CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAL,EACH,CAEJ,CAbgBG,EAAAC,GAAA,sBAeT,SAASG,GAAY,CAC1B,KAAAC,EACA,SAAAR,EACA,WAAAK,EACA,MAAAI,EACA,MAAAC,EACA,YAAAC,EACA,cAAAC,EAAgB,CAAE,uBAAwB,EAAK,CACjD,EAA2C,CACzC,IAAMX,EAASY,GACb,IAAMC,EAAaN,EAAM,CAAE,YAAAG,EAAa,MAAAD,CAAM,CAAC,EAC/C,CAACF,EAAMG,EAAaD,CAAK,CAC3B,EACA,OACEd,EAACmB,EAAA,CAAyB,cAAeH,EACvC,SAAAhB,EAACoB,GAAA,CAAoB,OAAQnB,GAC3B,SAAAD,EAACQ,GAAA,CAAmB,WAAYC,EAC9B,SAAAT,EAACG,GAAA,CAAyB,OAAQE,EAChC,SAAAL,EAACqB,EAAA,CAAc,MAAOR,EAAQ,SAAAT,EAAS,EACzC,EACF,EACF,EACF,CAEJ,CAxBgBG,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","useMemo","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","npmPackageVersion","isValidUrl","url","__name","createClient","auth","options","sessionRef","baseUrl","ENVIRONMENTS","clientConfig","client","debug","npmPackageVersion","isValidProxy","hasTokenExpired","expiresAt","data","error","Component","jsx","FallbackErrorBoundary","__name","RemoteFlowsErrorBoundary","Component","props","error","errorInfo","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","client","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","auth","theme","proxy","environment","errorBoundary","useMemo","createClient","RemoteFlowsErrorBoundary","QueryClientProvider","ThemeProvider"]}
|
package/dist/internals.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as L,b as M,c as N,d as O,e as P,f as Q,g as R,h as S}from"./chunk-BVDT43OO.js";import{a as F,b as G,c as H,d as I,e as J,f as K}from"./chunk-MXLQEDRJ.js";import{a as
|
|
1
|
+
import{a as L,b as M,c as N,d as O,e as P,f as Q,g as R,h as S}from"./chunk-BVDT43OO.js";import{a as F,b as G,c as H,d as I,e as J,f as K}from"./chunk-MXLQEDRJ.js";import{a as k,b as l,c as m,d as n,e as o,g as p,h as q,i as r,j as s,k as t,l as u,m as v,n as w,o as x,p as y,q as z,r as A,s as B,t as C,u as D,v as E}from"./chunk-ZIN2OWTH.js";import{a as f,b as g,c as h,d as i,e as j}from"./chunk-UOOUV52J.js";import{a as c}from"./chunk-72OH7PSF.js";import{a as d,b as e}from"./chunk-LJGCFFAT.js";import{a as b}from"./chunk-PMTKQME6.js";import{a}from"./chunk-L3Z2G32A.js";import"./chunk-P37U34EQ.js";export{C as Alert,E as AlertDescription,D as AlertTitle,u as Badge,e as Button,F as Card,J as CardContent,I as CardDescription,K as CardFooter,G as CardHeader,H as CardTitle,k as Checkbox,L as Collapsible,N as CollapsibleContent,M as CollapsibleTrigger,v as Dialog,x as DialogContent,B as DialogDescription,z as DialogFooter,y as DialogHeader,A as DialogTitle,w as DialogTrigger,f as Drawer,h as DrawerContent,i as DrawerHeader,j as DrawerTitle,g as DrawerTrigger,l as FileUploader,c as Input,b as Label,m as RadioGroup,n as RadioGroupItem,S as ScrollArea,o as Select,r as SelectContent,s as SelectItem,q as SelectTrigger,p as SelectValue,O as Tabs,R as TabsContent,P as TabsList,Q as TabsTrigger,t as badgeVariants,d as buttonVariants,a as cn};
|
|
2
2
|
//# sourceMappingURL=internals.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { AnySchema } from 'yup';
|
|
3
|
-
import {
|
|
3
|
+
import { Y as HelpCenterArticle } from './types.gen-D2nbxMA0.js';
|
|
4
4
|
import { S as SupportedTypes } from './types-Zg1n_9wh.js';
|
|
5
5
|
import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
|
|
6
6
|
|
|
@@ -48,6 +48,15 @@ type FieldFileDataProps = FieldDataProps & {
|
|
|
48
48
|
maxFileSize?: number;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
type DailySchedule = {
|
|
52
|
+
day: string;
|
|
53
|
+
start_time: string;
|
|
54
|
+
end_time: string;
|
|
55
|
+
hours: number;
|
|
56
|
+
break_duration_minutes: string;
|
|
57
|
+
checked: boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
51
60
|
/**
|
|
52
61
|
* Props for custom field components.
|
|
53
62
|
* All custom field components receive these three props from React Hook Form's Controller.
|
|
@@ -78,6 +87,12 @@ type FieldComponentProps = {
|
|
|
78
87
|
*/
|
|
79
88
|
type FieldDataProps = Partial<JSFField> & {
|
|
80
89
|
metadata?: Record<string, unknown>;
|
|
90
|
+
meta?: {
|
|
91
|
+
helpCenter?: {
|
|
92
|
+
callToAction: string;
|
|
93
|
+
id: number;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
81
96
|
};
|
|
82
97
|
type FileComponentProps = FieldComponentProps & {
|
|
83
98
|
fieldData: FieldFileDataProps;
|
|
@@ -87,23 +102,11 @@ type FieldCountryDataProps = Omit<FieldDataProps, 'meta'> & {
|
|
|
87
102
|
regions: Record<string, string[]>;
|
|
88
103
|
subregions: Record<string, string[]>;
|
|
89
104
|
};
|
|
90
|
-
meta?: {
|
|
91
|
-
helpCenter?: {
|
|
92
|
-
callToAction: string;
|
|
93
|
-
id: number;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
105
|
};
|
|
97
106
|
type CountryComponentProps = FieldComponentProps & {
|
|
98
107
|
fieldData: FieldCountryDataProps;
|
|
99
108
|
};
|
|
100
109
|
type DatePickerDataProps = Omit<FieldDataProps, 'meta'> & {
|
|
101
|
-
meta?: {
|
|
102
|
-
helpCenter?: {
|
|
103
|
-
callToAction: string;
|
|
104
|
-
id: number;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
110
|
minDate?: string;
|
|
108
111
|
maxDate?: string;
|
|
109
112
|
};
|
|
@@ -116,6 +119,18 @@ type TextFieldDataProps = FieldDataProps & {
|
|
|
116
119
|
type TextFieldComponentProps = FieldComponentProps & {
|
|
117
120
|
fieldData: TextFieldDataProps;
|
|
118
121
|
};
|
|
122
|
+
type WorkScheduleDataProps = FieldDataProps & {
|
|
123
|
+
onSubmit: (data: DailySchedule[]) => void;
|
|
124
|
+
currentSchedule: DailySchedule[];
|
|
125
|
+
defaultFormattedValue: {
|
|
126
|
+
workHoursSummary: string[];
|
|
127
|
+
breakSummary: string[];
|
|
128
|
+
totalWorkHours: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
type WorkScheduleComponentProps = FieldComponentProps & {
|
|
132
|
+
fieldData: WorkScheduleDataProps;
|
|
133
|
+
};
|
|
119
134
|
/**
|
|
120
135
|
* Props for custom statement components.
|
|
121
136
|
*/
|
|
@@ -211,7 +226,7 @@ type FieldSetToggleComponentProps = {
|
|
|
211
226
|
className?: string;
|
|
212
227
|
children?: React.ReactNode;
|
|
213
228
|
};
|
|
214
|
-
type TypesWithoutFile = Exclude<SupportedTypes, 'file' | 'countries' | 'text'>;
|
|
229
|
+
type TypesWithoutFile = Exclude<SupportedTypes, 'file' | 'countries' | 'text' | 'work-schedule'>;
|
|
215
230
|
type Components = {
|
|
216
231
|
[K in TypesWithoutFile]?: React.ComponentType<FieldComponentProps>;
|
|
217
232
|
} & {
|
|
@@ -224,6 +239,7 @@ type Components = {
|
|
|
224
239
|
zendeskDrawer?: React.ComponentType<ZendeskDrawerComponentProps>;
|
|
225
240
|
drawer?: React.ComponentType<DrawerComponentProps>;
|
|
226
241
|
table?: React.ComponentType<TableComponentProps>;
|
|
242
|
+
'work-schedule'?: React.ComponentType<WorkScheduleComponentProps>;
|
|
227
243
|
};
|
|
228
244
|
type RemoteFlowsSDKProps = Omit<ThemeProviderProps, 'children'> & {
|
|
229
245
|
/**
|
|
@@ -286,4 +302,4 @@ type MetaValues = {
|
|
|
286
302
|
};
|
|
287
303
|
type Meta = Record<string, MetaValues>;
|
|
288
304
|
|
|
289
|
-
export type { $TSFixMe as $, ButtonComponentProps as B, Components as C, DrawerComponentProps as D, FieldSetToggleComponentProps as F, JSFFieldset as J, Meta as M, RemoteFlowsSDKProps as R, StatementComponentProps as S, TextFieldComponentProps as T, ZendeskDrawerComponentProps as Z, JSFField as a, FieldComponentProps as b, FileComponentProps as c, CountryComponentProps as d, DatePickerComponentProps as e };
|
|
305
|
+
export type { $TSFixMe as $, ButtonComponentProps as B, Components as C, DrawerComponentProps as D, FieldSetToggleComponentProps as F, JSFFieldset as J, Meta as M, RemoteFlowsSDKProps as R, StatementComponentProps as S, TextFieldComponentProps as T, WorkScheduleComponentProps as W, ZendeskDrawerComponentProps as Z, JSFField as a, FieldComponentProps as b, FileComponentProps as c, CountryComponentProps as d, DatePickerComponentProps as e };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OffboardingResponse,
|
|
1
|
+
import { O as OffboardingResponse, X as PayrollCalendarEor, E as Employment, D as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-D2nbxMA0.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { E as ErrorResponse, S as SuccessResponse } from './mutations-
|
|
3
|
+
import { E as ErrorResponse, S as SuccessResponse } from './mutations-CPqUOEmz.js';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import * as _remoteoss_json_schema_form_old from '@remoteoss/json-schema-form-old';
|
|
6
6
|
import { $TSFixMe } from '@remoteoss/json-schema-form-old';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as EmploymentCreationResponse, v as EmploymentResponse, S as SuccessResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, t as ConflictResponse, F as ForbiddenResponse, E as Employment$1, u as EmploymentCreateParams } from './types.gen-
|
|
1
|
+
import { r as EmploymentCreationResponse, v as EmploymentResponse, S as SuccessResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, t as ConflictResponse, F as ForbiddenResponse, E as Employment$1, u as EmploymentCreateParams } from './types.gen-D2nbxMA0.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
|
|
4
4
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
5
|
-
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-CPqUOEmz.js';
|
|
6
6
|
import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
|
|
7
|
-
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-
|
|
7
|
+
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-CLgJcdkS.js';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as React$1 from 'react';
|
|
10
10
|
import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Employment, L as ListTimeoffResponse, G as TimeoffStatus, H as TimeoffType, I as ListLeavePoliciesSummaryResponse, J as MagicLinkResponse, U as UnprocessableEntityResponse, K as MagicLinkParams } from './types.gen-
|
|
1
|
+
import { E as Employment, L as ListTimeoffResponse, G as TimeoffStatus, H as TimeoffType, I as ListLeavePoliciesSummaryResponse, J as MagicLinkResponse, U as UnprocessableEntityResponse, K as MagicLinkParams } from './types.gen-D2nbxMA0.js';
|
|
2
2
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
@@ -140,4 +140,4 @@ type PaidTimeOffContainerProps = {
|
|
|
140
140
|
render: (props: PaidTimeOffRenderProps) => React.ReactNode;
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
export { type PaidTimeOffRenderProps as P, type PaidTimeOffContainerProps as a, useTimeOffQuery as b,
|
|
143
|
+
export { type PaidTimeOffRenderProps as P, type PaidTimeOffContainerProps as a, useTimeOffQuery as b, usePaidTimeoffBreakdownQuery as c, useTimeOffLeavePoliciesSummaryQuery as d, useMagicLink as e, useEmploymentQuery as u };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { E as Employment,
|
|
1
|
+
import { E as Employment, i as File, l as CreateContractDocumentResponse, h as SignContractDocument, S as SuccessResponse } from './types.gen-D2nbxMA0.js';
|
|
2
2
|
import { OnboardingBack } from './flows/ContractorOnboarding/components/OnboardingBack.js';
|
|
3
3
|
import { OnboardingSubmit } from './flows/ContractorOnboarding/components/OnboardingSubmit.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { N as NormalizedFieldError } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError } from './mutations-CPqUOEmz.js';
|
|
6
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
8
|
import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
9
9
|
import { STEPS } from './flows/ContractorOnboarding/utils.js';
|
|
10
10
|
import { Step } from './flows/useStepState.js';
|
|
11
|
-
import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-
|
|
11
|
+
import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-CLgJcdkS.js';
|
|
12
12
|
import { Fields } from '@remoteoss/json-schema-form-old';
|
|
13
13
|
import { FieldValues } from 'react-hook-form';
|
|
14
14
|
import { BasicInformationStep } from './flows/ContractorOnboarding/components/BasicInformationStep.js';
|
|
15
|
-
import { g as SelectCountryStep } from './types-
|
|
15
|
+
import { g as SelectCountryStep } from './types-B_ZvICFS.js';
|
|
16
16
|
import { FlowOptions, JSFModifyNext } from './flows/types.js';
|
|
17
17
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
18
18
|
|
|
@@ -1688,4 +1688,4 @@ type PostAutomatableContractAmendmentErrors = {
|
|
|
1688
1688
|
};
|
|
1689
1689
|
type PostAutomatableContractAmendmentError = PostAutomatableContractAmendmentErrors[keyof PostAutomatableContractAmendmentErrors];
|
|
1690
1690
|
|
|
1691
|
-
export type { CreateContractEligibilityParams as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, TerminationDetailsParams as D, Employment as E, ForbiddenResponse as F, TimeoffStatus as G, TimeoffType as H, ListLeavePoliciesSummaryResponse as I, MagicLinkResponse as J, MagicLinkParams as K, ListTimeoffResponse as L,
|
|
1691
|
+
export type { CreateContractEligibilityParams as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, TerminationDetailsParams as D, Employment as E, ForbiddenResponse as F, TimeoffStatus as G, TimeoffType as H, ListLeavePoliciesSummaryResponse as I, MagicLinkResponse as J, MagicLinkParams as K, ListTimeoffResponse as L, MinimalRegion as M, NotFoundResponse as N, OffboardingResponse as O, PostCreateContractAmendmentError as P, CreateOffboardingParams as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, Currency as W, PayrollCalendarEor as X, HelpCenterArticle as Y, UnauthorizedResponse as a, ContractAmendmentResponse as b, PostAutomatableContractAmendmentError as c, CostCalculatorEstimateResponse as d, CostCalculatorEstimatePdfResponse as e, CostCalculatorEstimateParams as f, CostCalculatorEstimateCsvResponse as g, SignContractDocument as h, File as i, ContractorSubscriptionsSummary as j, ManageContractorPlusSubscriptionOperationsParams as k, CreateContractDocumentResponse as l, CreateContractDocument as m, MinimalCountry as n, EmploymentTermType as o, CostCalculatorEmployment as p, PostCreateEstimationError as q, EmploymentCreationResponse as r, Company as s, ConflictResponse as t, EmploymentCreateParams as u, EmploymentResponse as v, EmploymentFullParams as w, UnifiedEmploymentUpsertBenefitOffersRequest as x, ConvertCurrencyResponse as y, ConvertCurrencyParams as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remoteoss/remote-flows",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/remoteoss/remote-flows.git"
|
|
7
|
+
},
|
|
4
8
|
"scripts": {
|
|
5
9
|
"build": "NODE_ENV=production tsup",
|
|
6
10
|
"ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run type-check && npm run test",
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
"type-check": "tsc --noEmit"
|
|
22
26
|
},
|
|
23
27
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
28
|
+
"node": ">=24"
|
|
25
29
|
},
|
|
26
30
|
"type": "module",
|
|
27
31
|
"main": "dist/index.js",
|
package/dist/chunk-6YXSWOKH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as m}from"./chunk-KSHK3ZPX.js";import{b as s}from"./chunk-KQPDXXG3.js";import{b as i}from"./chunk-LJGCFFAT.js";import{a as e}from"./chunk-L3Z2G32A.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as l}from"react/jsx-runtime";function b({children:o,...t}){let{formId:n}=m(),{components:C}=s(),r=C?.button;return r?l(r,{...t,form:n,children:o}):l(i,{...t,type:"submit",className:e("RemoteFlows__CostCalculatorForm__SubmitButton",t.className),form:n,children:o})}u(b,"CostCalculatorSubmitButton");export{b as a};
|
|
2
|
-
//# sourceMappingURL=chunk-6YXSWOKH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/CostCalculator/CostCalculatorSubmitButton.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useCostCalculatorContext } from './context';\nimport { cn } from '@/src/lib/utils';\nimport { useFormFields } from '@/src/context';\n\nexport function CostCalculatorSubmitButton({\n children,\n ...props\n}: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> &\n Record<string, unknown>) {\n const { formId } = useCostCalculatorContext();\n const { components } = useFormFields();\n\n const CustomButton = components?.button;\n if (CustomButton) {\n return (\n <CustomButton {...props} form={formId}>\n {children}\n </CustomButton>\n );\n }\n\n return (\n <Button\n {...props}\n type='submit'\n className={cn(\n 'RemoteFlows__CostCalculatorForm__SubmitButton',\n props.className,\n )}\n form={formId}\n >\n {children}\n </Button>\n );\n}\n"],"mappings":"wMAiBM,cAAAA,MAAA,oBAXC,SAASC,EAA2B,CACzC,SAAAC,EACA,GAAGC,CACL,EAC2B,CACzB,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAyB,EACtC,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAE/BC,EAAeF,GAAY,OACjC,OAAIE,EAEAR,EAACQ,EAAA,CAAc,GAAGL,EAAO,KAAMC,EAC5B,SAAAF,EACH,EAKFF,EAACS,EAAA,CACE,GAAGN,EACJ,KAAK,SACL,UAAWO,EACT,gDACAP,EAAM,SACR,EACA,KAAMC,EAEL,SAAAF,EACH,CAEJ,CA9BgBS,EAAAV,EAAA","names":["jsx","CostCalculatorSubmitButton","children","props","formId","useCostCalculatorContext","components","useFormFields","CustomButton","Button","cn","__name"]}
|
package/dist/chunk-7WVNWNM2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-TOA3JILU.js";import{d as u}from"./chunk-23OYALRY.js";import{a as l}from"./chunk-2YTBWEC7.js";import{b as d}from"./chunk-KQPDXXG3.js";import{b as c}from"./chunk-LJGCFFAT.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function k({onSubmit:f,onSuccess:E,onError:i,render:s,...o}){let{components:v}=d(),{contractorOnboardingBag:r}=p(),n=u(),{mutateAsync:b}=l(n),m=e(async()=>{try{if(await f?.(),r.employmentId){let t=await b({employment_id:r.employmentId});if(t.data){await E?.({data:t.data,employmentStatus:"invited"}),r.refetchEmployment();return}t.error&&i?.({error:t.error,rawError:t.rawError,fieldErrors:[]})}}catch(t){i?.({error:t,rawError:t,fieldErrors:[]})}},"handleSubmit"),a=v?.button;return a?y(a,{...o,disabled:n.isPending||o.disabled,onClick:t=>{m(),o.onClick?.(t)},children:s({employmentStatus:"invited"})}):y(c,{...o,disabled:n.isPending||o.disabled,onClick:()=>{m()},children:s({employmentStatus:"invited"})})}e(k,"OnboardingInvite");export{k as a};
|
|
2
|
-
//# sourceMappingURL=chunk-7WVNWNM2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/ContractorOnboarding/components/OnboardingInvite.tsx"],"sourcesContent":["import { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { useEmploymentInvite } from '@/src/flows/Onboarding/api';\nimport { Button } from '@/src/components/ui/button';\nimport { FieldError, mutationToPromise } from '@/src/lib/mutations';\nimport { SuccessResponse } from '@/src/client';\nimport { useFormFields } from '@/src/context';\nimport { useContractorOnboardingContext } from '@/src/flows/ContractorOnboarding/context';\n\nexport type OnboardingInviteProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onError'\n> & {\n onSuccess?: ({\n data,\n employmentStatus,\n }: {\n data: SuccessResponse;\n employmentStatus: 'invited';\n }) => void | Promise<void>;\n onError?: ({\n error,\n rawError,\n fieldErrors,\n }: {\n error: Error;\n rawError: Record<string, unknown>;\n fieldErrors: FieldError[];\n }) => void;\n onSubmit?: () => void | Promise<void>;\n render: (props: { employmentStatus: 'invited' }) => ReactNode;\n} & Record<string, unknown>;\n\nexport function OnboardingInvite({\n onSubmit,\n onSuccess,\n onError,\n render,\n ...props\n}: OnboardingInviteProps) {\n const { components } = useFormFields();\n const { contractorOnboardingBag } = useContractorOnboardingContext();\n const employmentInviteMutation = useEmploymentInvite();\n\n const { mutateAsync: employmentInviteMutationAsync } = mutationToPromise(\n employmentInviteMutation,\n );\n\n const handleSubmit = async () => {\n try {\n await onSubmit?.();\n if (contractorOnboardingBag.employmentId) {\n const response = await employmentInviteMutationAsync({\n employment_id: contractorOnboardingBag.employmentId,\n });\n if (response.data) {\n await onSuccess?.({\n data: response.data as SuccessResponse,\n employmentStatus: 'invited',\n });\n contractorOnboardingBag.refetchEmployment();\n return;\n }\n if (response.error) {\n onError?.({\n error: response.error,\n rawError: response.rawError,\n fieldErrors: [],\n });\n }\n }\n } catch (error: unknown) {\n onError?.({\n error: error as Error,\n rawError: error as Record<string, unknown>,\n fieldErrors: [],\n });\n }\n };\n\n const CustomButton = components?.button;\n if (CustomButton) {\n return (\n <CustomButton\n {...props}\n disabled={employmentInviteMutation.isPending || props.disabled}\n onClick={(evt) => {\n handleSubmit();\n props.onClick?.(evt);\n }}\n >\n {render({\n employmentStatus: 'invited',\n })}\n </CustomButton>\n );\n }\n\n return (\n <Button\n {...props}\n disabled={employmentInviteMutation.isPending || props.disabled}\n onClick={() => {\n handleSubmit();\n }}\n >\n {render({\n employmentStatus: 'invited',\n })}\n </Button>\n );\n}\n"],"mappings":"gPAkFM,cAAAA,MAAA,oBAlDC,SAASC,EAAiB,CAC/B,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/B,CAAE,wBAAAC,CAAwB,EAAIC,EAA+B,EAC7DC,EAA2BC,EAAoB,EAE/C,CAAE,YAAaC,CAA8B,EAAIC,EACrDH,CACF,EAEMI,EAAeC,EAAA,SAAY,CAC/B,GAAI,CAEF,GADA,MAAMd,IAAW,EACbO,EAAwB,aAAc,CACxC,IAAMQ,EAAW,MAAMJ,EAA8B,CACnD,cAAeJ,EAAwB,YACzC,CAAC,EACD,GAAIQ,EAAS,KAAM,CACjB,MAAMd,IAAY,CAChB,KAAMc,EAAS,KACf,iBAAkB,SACpB,CAAC,EACDR,EAAwB,kBAAkB,EAC1C,MACF,CACIQ,EAAS,OACXb,IAAU,CACR,MAAOa,EAAS,MAChB,SAAUA,EAAS,SACnB,YAAa,CAAC,CAChB,CAAC,CAEL,CACF,OAASC,EAAgB,CACvBd,IAAU,CACR,MAAOc,EACP,SAAUA,EACV,YAAa,CAAC,CAChB,CAAC,CACH,CACF,EA9BqB,gBAgCfC,EAAeZ,GAAY,OACjC,OAAIY,EAEAnB,EAACmB,EAAA,CACE,GAAGb,EACJ,SAAUK,EAAyB,WAAaL,EAAM,SACtD,QAAUc,GAAQ,CAChBL,EAAa,EACbT,EAAM,UAAUc,CAAG,CACrB,EAEC,SAAAf,EAAO,CACN,iBAAkB,SACpB,CAAC,EACH,EAKFL,EAACqB,EAAA,CACE,GAAGf,EACJ,SAAUK,EAAyB,WAAaL,EAAM,SACtD,QAAS,IAAM,CACbS,EAAa,CACf,EAEC,SAAAV,EAAO,CACN,iBAAkB,SACpB,CAAC,EACH,CAEJ,CA9EgBW,EAAAf,EAAA","names":["jsx","OnboardingInvite","onSubmit","onSuccess","onError","render","props","components","useFormFields","contractorOnboardingBag","useContractorOnboardingContext","employmentInviteMutation","useEmploymentInvite","employmentInviteMutationAsync","mutationToPromise","handleSubmit","__name","response","error","CustomButton","evt","Button"]}
|
package/dist/chunk-BIQPVUM2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l as V}from"./chunk-23OYALRY.js";import{a as F}from"./chunk-KGKDSOER.js";import{b as K}from"./chunk-KQPDXXG3.js";import{c as J,l as U}from"./chunk-66N57DKF.js";import{a as t,b as d,c as _e}from"./chunk-P37U34EQ.js";var L=d((qt,X)=>{"use strict";function ke(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}t(ke,"isObject");X.exports=ke});var Q=d(($t,z)=>{"use strict";var we=typeof global=="object"&&global&&global.Object===Object&&global;z.exports=we});var D=d((Mt,Y)=>{"use strict";var Fe=Q(),Le=typeof self=="object"&&self&&self.Object===Object&&self,De=Fe||Le||Function("return this")();Y.exports=De});var ee=d((Pt,Z)=>{"use strict";var Ae=D(),Ne=t(function(){return Ae.Date.now()},"now");Z.exports=Ne});var ne=d((kt,te)=>{"use strict";var We=/\s/;function Be(e){for(var n=e.length;n--&&We.test(e.charAt(n)););return n}t(Be,"trimmedEndIndex");te.exports=Be});var oe=d((Ft,re)=>{"use strict";var He=ne(),Ge=/^\s+/;function Je(e){return e&&e.slice(0,He(e)+1).replace(Ge,"")}t(Je,"baseTrim");re.exports=Je});var A=d((Dt,ie)=>{"use strict";var Ke=D(),Ue=Ke.Symbol;ie.exports=Ue});var ue=d((At,ce)=>{"use strict";var se=A(),ae=Object.prototype,Ve=ae.hasOwnProperty,Xe=ae.toString,O=se?se.toStringTag:void 0;function ze(e){var n=Ve.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var a=Xe.call(e);return i&&(n?e[O]=r:delete e[O]),a}t(ze,"getRawTag");ce.exports=ze});var de=d((Wt,fe)=>{"use strict";var Qe=Object.prototype,Ye=Qe.toString;function Ze(e){return Ye.call(e)}t(Ze,"objectToString");fe.exports=Ze});var pe=d((Ht,ge)=>{"use strict";var le=A(),et=ue(),tt=de(),nt="[object Null]",rt="[object Undefined]",me=le?le.toStringTag:void 0;function ot(e){return e==null?e===void 0?rt:nt:me&&me in Object(e)?et(e):tt(e)}t(ot,"baseGetTag");ge.exports=ot});var ve=d((Jt,be)=>{"use strict";function it(e){return e!=null&&typeof e=="object"}t(it,"isObjectLike");be.exports=it});var he=d((Ut,ye)=>{"use strict";var st=pe(),at=ve(),ct="[object Symbol]";function ut(e){return typeof e=="symbol"||at(e)&&st(e)==ct}t(ut,"isSymbol");ye.exports=ut});var Se=d((Xt,Ce)=>{"use strict";var ft=oe(),xe=L(),dt=he(),Te=NaN,lt=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,gt=/^0o[0-7]+$/i,pt=parseInt;function bt(e){if(typeof e=="number")return e;if(dt(e))return Te;if(xe(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=xe(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ft(e);var r=mt.test(e);return r||gt.test(e)?pt(e.slice(2),r?2:8):lt.test(e)?Te:+e}t(bt,"toNumber");Ce.exports=bt});var Ee=d((Qt,Oe)=>{"use strict";var vt=L(),N=ee(),je=Se(),yt="Expected a function",ht=Math.max,xt=Math.min;function Tt(e,n,r){var i,a,p,l,c,s,m=0,E=!1,u=!1,h=!0;if(typeof e!="function")throw new TypeError(yt);n=je(n)||0,vt(r)&&(E=!!r.leading,u="maxWait"in r,p=u?ht(je(r.maxWait)||0,n):p,h="trailing"in r?!!r.trailing:h);function x(o){var g=i,y=a;return i=a=void 0,m=o,l=e.apply(y,g),l}t(x,"invokeFunc");function R(o){return m=o,c=setTimeout(v,n),E?x(o):l}t(R,"leadingEdge");function C(o){var g=o-s,y=o-m,M=n-g;return u?xt(M,p-y):M}t(C,"remainingWait");function q(o){var g=o-s,y=o-m;return s===void 0||g>=n||g<0||u&&y>=p}t(q,"shouldInvoke");function v(){var o=N();if(q(o))return b(o);c=setTimeout(v,C(o))}t(v,"timerExpired");function b(o){return c=void 0,h&&i?x(o):(i=a=void 0,l)}t(b,"trailingEdge");function I(){c!==void 0&&clearTimeout(c),m=0,i=s=a=c=void 0}t(I,"cancel");function $(){return c===void 0?l:b(N())}t($,"flush");function S(){var o=N(),g=q(o);if(i=arguments,a=this,s=o,g){if(c===void 0)return R(s);if(u)return clearTimeout(c),c=setTimeout(v,n),x(s)}return c===void 0&&(c=setTimeout(v,n)),l}return t(S,"debounced"),S.cancel=I,S.flush=$,S}t(Tt,"debounce");Oe.exports=Tt});import{useState as jt,useCallback as Ot,useEffect as Ie,useRef as $e}from"react";var qe=_e(Ee(),1);import{useCallback as Ct,useEffect as St,useRef as Re}from"react";function W(e,n){let r=Re(e);St(()=>{r.current=e},[e]);let i=Re((0,qe.default)(a=>{r.current(a)},n)).current;return Ct(a=>{i(a)},[i])}t(W,"useDebounce");import{Fragment as Rt,jsx as T,jsxs as Me}from"react/jsx-runtime";var Et=t(({description:e,showConversion:n,targetCurrency:r,className:i,onClick:a})=>{let{components:p}=K(),l=n?`Hide ${r} conversion`:`Show ${r} conversion`,c=p?.button||"button";return Me("span",{className:i,children:[T(U,{as:"span",children:e})," ",T(c,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:a,children:l})]})},"DescriptionWithConversion"),dn=t(({sourceCurrency:e,targetCurrency:n,mainFieldName:r,conversionFieldName:i,conversionProperties:a,classNamePrefix:p,description:l,conversionType:c="spread",...s})=>{let[m,E]=jt(!1),{setValue:u,watch:h}=J(),x=h(r||s.name),R=$e(!0),C=$e(new Map),q=e&&n&&e!==n,{mutateAsync:v}=V({type:c}),b=`${s.name}_converted`;Ie(()=>{u(b,r||s.name)},[u,r,s.name,b]),Ie(()=>{if(R.current){R.current=!1;return}u(i,"")},[e,i,u]);let I=Ot(async(f,j,k,B)=>{let w=Number(f);if(!f||isNaN(w)||w<=0)return;let H=`${j}_${k}_${f}`,G=C.current.get(H);if(G){u(B,G.targetAmount);return}try{let P=await v({source_currency:j,target_currency:k,amount:w});if(P.data?.data?.conversion_data?.target_amount){let _=P.data.data.conversion_data.target_amount;if(_){u(B,_?.toString()),C.current.set(H,{targetAmount:_.toString()});let Pe=`${k}_${j}_${_}`;C.current.set(Pe,{targetAmount:f.toString()})}}}catch(P){console.error("Error converting currency:",P)}},[v,u]),$=W(f=>I(f,e,n,i),500),S=W(f=>I(f,n,e,r||s.name),500),o=t(f=>{u(b,r||s.name),m&&$(f.target.value)},"handleMainFieldChange"),g=t(f=>{u(b,i),S(f.target.value)},"handleConversionFieldChange"),y=t(f=>{f.preventDefault(),E(j=>!j),!m&&x&&$(x)},"toggleConversion"),M=q?T(Et,{targetCurrency:n,description:l,showConversion:m,className:`${p}-description`,onClick:y}):l;return Me(Rt,{children:[T(F,{...s,name:r||s.name,additionalProps:{currency:e},description:M,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),m&&T(F,{additionalProps:{currency:n},name:i,label:a?.label||"Conversion",description:a?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:g}),T("input",{type:"hidden",name:b,value:h(b)||r||s.name})]})},"CurrencyConversionField");export{dn as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BIQPVUM2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\nimport { FormDescription } from '@/src/components/ui/form';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst DescriptionWithConversion = ({\n description,\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: DescriptionWithConversionProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button || 'button';\n return (\n <span className={className}>\n <FormDescription as='span'>{description}</FormDescription>{' '}\n <CustomButton\n className={`${className.replace('-description', '-button')}`}\n data-type='inline'\n onClick={onClick}\n >\n {label}\n </CustomButton>\n </span>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n mainFieldName?: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: ReactNode;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n conversionType?: 'spread' | 'no_spread';\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n mainFieldName,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n conversionType = 'spread',\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(mainFieldName || props.name);\n const isFirstRender = useRef(true);\n\n const conversionCache = useRef<Map<string, { targetAmount: string }>>(\n new Map(),\n );\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency({\n type: conversionType,\n });\n\n // we keep track of the last input the user used, so we can make sure\n // we keep consistent currency rates\n const lastInputFieldName = `${props.name}_converted`;\n useEffect(() => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n }, [setValue, mainFieldName, props.name, lastInputFieldName]);\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (\n value: string,\n fromCurrency: string,\n toCurrency: string,\n targetField: string,\n ) => {\n const amount = Number(value);\n\n if (!value || isNaN(amount) || amount <= 0) return;\n\n const cacheKey = `${fromCurrency}_${toCurrency}_${value}`;\n const cached = conversionCache.current.get(cacheKey);\n\n if (cached) {\n setValue(targetField, cached.targetAmount);\n return;\n }\n\n try {\n const response = await convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount,\n });\n if (response.data?.data?.conversion_data?.target_amount) {\n const amount = response.data.data.conversion_data.target_amount;\n if (amount) {\n setValue(targetField, amount?.toString());\n // Cache both directions\n conversionCache.current.set(cacheKey, {\n targetAmount: amount.toString(),\n });\n const reverseKey = `${toCurrency}_${fromCurrency}_${amount}`;\n conversionCache.current.set(reverseKey, {\n targetAmount: value.toString(),\n });\n }\n }\n } catch (error) {\n console.error('Error converting currency:', error);\n }\n },\n [convertCurrency, setValue],\n );\n\n const debouncedConvertCurrency = useDebounce(\n (value: string) =>\n convertCurrencyCallback(\n value,\n sourceCurrency,\n targetCurrency,\n conversionFieldName,\n ),\n 500,\n );\n const debouncedConvertCurrencyReverse = useDebounce(\n (value: string) =>\n convertCurrencyCallback(\n value,\n targetCurrency,\n sourceCurrency,\n mainFieldName || props.name,\n ),\n 500,\n );\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n setValue(lastInputFieldName, conversionFieldName);\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const extraDescription = canShowConversion ? (\n <DescriptionWithConversion\n targetCurrency={targetCurrency}\n description={description}\n showConversion={showConversion}\n className={`${classNamePrefix}-description`}\n onClick={toggleConversion}\n />\n ) : (\n description\n );\n\n return (\n <>\n <TextField\n {...props}\n name={mainFieldName || props.name}\n additionalProps={{ currency: sourceCurrency }}\n description={extraDescription}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n <input\n type='hidden'\n name={lastInputFieldName}\n value={watch(lastInputFieldName) || mainFieldName || props.name}\n />\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"8NAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,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9B,EAAmBiC,GAAS,CAACA,CAAI,EAE7B,CAAClD,GAAkBsB,GACrBqB,EAAyBrB,CAAU,CAEvC,EAPyB,oBASnB6B,EAAmBzB,EACvB/B,EAACE,GAAA,CACC,eAAgBI,EAChB,YAAaF,EACb,eAAgBC,EAChB,UAAW,GAAGc,CAAe,eAC7B,QAASmC,EACX,EAEAlD,EAGF,OACEH,GAAAF,GAAA,CACE,UAAAC,EAACyD,EAAA,CACE,GAAGpC,EACJ,KAAML,GAAiBK,EAAM,KAC7B,gBAAiB,CAAE,SAAUN,CAAe,EAC5C,YAAayC,EACb,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUL,EACZ,EACC9C,GACCL,EAACyD,EAAA,CACC,gBAAiB,CAAE,SAAUnD,CAAe,EAC5C,KAAMW,EACN,MAAOC,GAAsB,OAAS,aACtC,YAAaA,GAAsB,YACnC,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUmC,EACZ,EAEFrD,EAAC,SACC,KAAK,SACL,KAAMkC,EACN,MAAOT,EAAMS,CAAkB,GAAKlB,GAAiBK,EAAM,KAC7D,GACF,CAEJ,EAnLuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","showConversion","targetCurrency","className","onClick","components","useFormFields","label","CustomButton","FormDescription","CurrencyConversionField","sourceCurrency","mainFieldName","conversionFieldName","conversionProperties","classNamePrefix","conversionType","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","conversionCache","canShowConversion","convertCurrency","useConvertCurrency","lastInputFieldName","useEffect","convertCurrencyCallback","useCallback","value","fromCurrency","toCurrency","targetField","amount","cacheKey","cached","response","reverseKey","error","debouncedConvertCurrency","useDebounce","debouncedConvertCurrencyReverse","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","extraDescription","TextField"]}
|
package/dist/chunk-BZUYUGQF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as n}from"./chunk-KQPDXXG3.js";import{b as r}from"./chunk-LJGCFFAT.js";import{b as e}from"./chunk-TVZAFTPT.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as C}from"react/jsx-runtime";function p({children:m,...t}){let{contractAmendment:{back:u}}=e(),{components:i}=n(),c=i?.button||r;return C(c,{...t,onClick:s=>{u(),t.onClick?.(s)},children:m})}o(p,"ContractAmendmentBack");export{p as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BZUYUGQF.js.map
|