@redneckz/wildless-cms-uni-blocks 0.14.739 → 0.14.740
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/bundle/bundle.umd.js +35 -38
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +0 -1
- package/bundle/components/CreditForm/CreditFormStep.d.ts +0 -1
- package/dist/components/CreditCardForm/CreditCardForm.js +2 -1
- package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +0 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js +2 -3
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -4
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.js +2 -1
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +0 -1
- package/dist/components/CreditForm/CreditFormStep.js +2 -3
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardForm.js +2 -1
- package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +0 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +2 -3
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -4
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.js +2 -1
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +0 -1
- package/lib/components/CreditForm/CreditFormStep.js +2 -3
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +35 -38
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +0 -1
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +0 -1
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js +2 -1
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +0 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +2 -3
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -4
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.js +2 -1
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +0 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js +2 -3
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js +2 -1
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +0 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +2 -3
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -4
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.js +2 -1
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +0 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js +2 -3
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +13 -9
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +2 -6
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +1 -4
- package/mobile/src/components/CreditForm/CreditForm.tsx +14 -10
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +2 -6
- package/package.json +1 -1
- package/src/components/CreditCardForm/CreditCardForm.tsx +13 -9
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +2 -6
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +1 -4
- package/src/components/CreditForm/CreditForm.tsx +14 -10
- package/src/components/CreditForm/CreditFormStep.tsx +2 -6
package/bundle/bundle.umd.js
CHANGED
|
@@ -6808,33 +6808,6 @@
|
|
|
6808
6808
|
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold mr-s", children: ["\u0428\u0430\u0433 ", step + 1, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
|
|
6809
6809
|
});
|
|
6810
6810
|
|
|
6811
|
-
const calculateInputs = (getValue) => (inputs, step) => inputs
|
|
6812
|
-
.filter((_) => _)
|
|
6813
|
-
.map((_) => {
|
|
6814
|
-
if ([
|
|
6815
|
-
checkIsRetiree(step, getValue),
|
|
6816
|
-
checkBusinessOwner(_, getValue),
|
|
6817
|
-
checkConsentPfrFlg(_, getValue),
|
|
6818
|
-
checkAddressFillFromESIA(_, getValue),
|
|
6819
|
-
checkAddressFact(_, getValue),
|
|
6820
|
-
checkCondition(_, getValue),
|
|
6821
|
-
].some(Boolean)) {
|
|
6822
|
-
return { ..._, required: false };
|
|
6823
|
-
}
|
|
6824
|
-
return _;
|
|
6825
|
-
});
|
|
6826
|
-
const checkIsRetiree = (step, getValue) => step === 2 && getValue('employment')?.key === 'RETIREE';
|
|
6827
|
-
const checkBusinessOwner = ({ name }, getValue) => name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
|
|
6828
|
-
const checkAddressFillFromESIA = ({ name, filledByEsia }, getValue) => name?.startsWith('address') && getValue('esiaAccountTypeCd')?.key && filledByEsia;
|
|
6829
|
-
const checkAddressFact = ({ name }, getValue) => name === 'addressFact' && getValue('addressMatch');
|
|
6830
|
-
const checkCondition = ({ condition }, getValue) => condition?.name &&
|
|
6831
|
-
condition?.values?.some((_) => {
|
|
6832
|
-
const dataValue = getValue(condition?.name);
|
|
6833
|
-
return _ !== (dataValue?.key ?? dataValue);
|
|
6834
|
-
});
|
|
6835
|
-
const checkConsentPfrFlg = ({ name }, getValue) => name === 'snils' && isSnilsRequired(getValue);
|
|
6836
|
-
const isSnilsRequired = (getValue) => getValue('confirmationIncome')?.key !== 'PFR_CERTIFICATE';
|
|
6837
|
-
|
|
6838
6811
|
var STATUS_TYPE;
|
|
6839
6812
|
(function (STATUS_TYPE) {
|
|
6840
6813
|
STATUS_TYPE["process"] = "IN_PROCESS";
|
|
@@ -6992,6 +6965,33 @@
|
|
|
6992
6965
|
return statusesMap[status] || jsx(ReworkStatusContent$1, {});
|
|
6993
6966
|
};
|
|
6994
6967
|
|
|
6968
|
+
const calculateInputs = (getValue) => (inputs, step) => inputs
|
|
6969
|
+
.filter((_) => _)
|
|
6970
|
+
.map((_) => {
|
|
6971
|
+
if ([
|
|
6972
|
+
checkIsRetiree(step, getValue),
|
|
6973
|
+
checkBusinessOwner(_, getValue),
|
|
6974
|
+
checkConsentPfrFlg(_, getValue),
|
|
6975
|
+
checkAddressFillFromESIA(_, getValue),
|
|
6976
|
+
checkAddressFact(_, getValue),
|
|
6977
|
+
checkCondition(_, getValue),
|
|
6978
|
+
].some(Boolean)) {
|
|
6979
|
+
return { ..._, required: false };
|
|
6980
|
+
}
|
|
6981
|
+
return _;
|
|
6982
|
+
});
|
|
6983
|
+
const checkIsRetiree = (step, getValue) => step === 2 && getValue('employment')?.key === 'RETIREE';
|
|
6984
|
+
const checkBusinessOwner = ({ name }, getValue) => name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
|
|
6985
|
+
const checkAddressFillFromESIA = ({ name, filledByEsia }, getValue) => name?.startsWith('address') && getValue('esiaAccountTypeCd')?.key && filledByEsia;
|
|
6986
|
+
const checkAddressFact = ({ name }, getValue) => name === 'addressFact' && getValue('addressMatch');
|
|
6987
|
+
const checkCondition = ({ condition }, getValue) => condition?.name &&
|
|
6988
|
+
condition?.values?.some((_) => {
|
|
6989
|
+
const dataValue = getValue(condition?.name);
|
|
6990
|
+
return _ !== (dataValue?.key ?? dataValue);
|
|
6991
|
+
});
|
|
6992
|
+
const checkConsentPfrFlg = ({ name }, getValue) => name === 'snils' && isSnilsRequired(getValue);
|
|
6993
|
+
const isSnilsRequired = (getValue) => getValue('confirmationIncome')?.key !== 'PFR_CERTIFICATE';
|
|
6994
|
+
|
|
6995
6995
|
const InputsMap = { ...InputsRetailMap, ...InputRetailCardMap };
|
|
6996
6996
|
const renderInputs$1 = ({ field, inputs, params }) => inputs.map(getField(field, params, InputsMap));
|
|
6997
6997
|
|
|
@@ -7298,10 +7298,7 @@
|
|
|
7298
7298
|
}));
|
|
7299
7299
|
resetForm(response);
|
|
7300
7300
|
}
|
|
7301
|
-
onNextStep();
|
|
7302
|
-
if (isFinalStep) {
|
|
7303
|
-
onFinish?.();
|
|
7304
|
-
}
|
|
7301
|
+
isFinalStep ? onFinish?.() : onNextStep();
|
|
7305
7302
|
}
|
|
7306
7303
|
catch (ex) {
|
|
7307
7304
|
// Do nothing
|
|
@@ -7313,7 +7310,7 @@
|
|
|
7313
7310
|
return [initialState, handleSubmit, isSending];
|
|
7314
7311
|
};
|
|
7315
7312
|
|
|
7316
|
-
const CreditCardFormStep = JSX(({ step, sections,
|
|
7313
|
+
const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
|
|
7317
7314
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs || []), [sections]);
|
|
7318
7315
|
const formValidator = useCallback((formState) =>
|
|
7319
7316
|
// TODO Слишком сложно
|
|
@@ -7327,7 +7324,7 @@
|
|
|
7327
7324
|
formValidator,
|
|
7328
7325
|
onSubmit,
|
|
7329
7326
|
});
|
|
7330
|
-
return
|
|
7327
|
+
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$2({ sections, field, step }), jsx(StepsNavigationButtons$1, { isSending: isSending, step: step, onPrevStep: onPrevStep })] }));
|
|
7331
7328
|
});
|
|
7332
7329
|
|
|
7333
7330
|
const PERSONAL_INFO_CONTENT = [
|
|
@@ -7731,7 +7728,7 @@
|
|
|
7731
7728
|
}, []);
|
|
7732
7729
|
const sections = stepsSectionsMap$1[step];
|
|
7733
7730
|
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
7734
|
-
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isFormFinished ? null : (jsx(CreditCardFormProgress, { stepsTitles: TITLES, step: step, totalSteps: STEPS$1 })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditCardFormStep, { step: step, sections: sections,
|
|
7731
|
+
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isFormFinished ? null : (jsx(CreditCardFormProgress, { stepsTitles: TITLES, step: step, totalSteps: STEPS$1 })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsx(CreditCardFormStep, { step: step, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep, onFinish: handleFinish }, String(step))) })] }) }));
|
|
7735
7732
|
});
|
|
7736
7733
|
|
|
7737
7734
|
const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
|
|
@@ -8105,7 +8102,7 @@
|
|
|
8105
8102
|
return [initialState, handleSubmit, isSending];
|
|
8106
8103
|
};
|
|
8107
8104
|
|
|
8108
|
-
const CreditFormStep = JSX(({ step, sections,
|
|
8105
|
+
const CreditFormStep = JSX(({ step, sections, programsSource, onPrevStep, onNextStep, onFinish }) => {
|
|
8109
8106
|
const { programId } = useRetailFormStore();
|
|
8110
8107
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
8111
8108
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
|
|
@@ -8121,7 +8118,7 @@
|
|
|
8121
8118
|
formValidator,
|
|
8122
8119
|
onSubmit,
|
|
8123
8120
|
});
|
|
8124
|
-
return
|
|
8121
|
+
return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step, params: { calcData } }), jsx(StepsNavigationButtons, { step: step, isSending: isSending, onPrevStep: onPrevStep })] }));
|
|
8125
8122
|
});
|
|
8126
8123
|
|
|
8127
8124
|
const stepsSectionsMap = [
|
|
@@ -8156,7 +8153,7 @@
|
|
|
8156
8153
|
const sections = stepsSectionsMap[step];
|
|
8157
8154
|
const isStartStep = step === 0;
|
|
8158
8155
|
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
8159
|
-
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isStartStep || isFormFinished ? null : (jsx(CreditFormProgress, { stepsTitles: STEP_TITLES, step: step, totalSteps: STEPS })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { step: step, sections: sections,
|
|
8156
|
+
return (jsx(BlockWrapper, { className: className, ...rest, children: jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isStartStep || isFormFinished ? null : (jsx(CreditFormProgress, { stepsTitles: STEP_TITLES, step: step, totalSteps: STEPS })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsx(CreditFormStep, { step: step, sections: sections, programsSource: programsSource, onNextStep: handleNextStep, onPrevStep: handlePrevStep, onFinish: handleFinish }, String(step))) })] }) }));
|
|
8160
8157
|
});
|
|
8161
8158
|
|
|
8162
8159
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
@@ -10433,7 +10430,7 @@
|
|
|
10433
10430
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10434
10431
|
});
|
|
10435
10432
|
|
|
10436
|
-
const packageVersion = "0.14.
|
|
10433
|
+
const packageVersion = "0.14.739";
|
|
10437
10434
|
|
|
10438
10435
|
exports.Blocks = Blocks;
|
|
10439
10436
|
exports.ContentPage = ContentPage;
|