@redneckz/wildless-cms-uni-blocks 0.14.648 → 0.14.650
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +34 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/bundle/components/CreditForm/formStateMap.d.ts +1 -0
- package/bundle/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.js +4 -0
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/formStateMap.d.ts +1 -0
- package/dist/components/CreditForm/formStateMap.js +1 -0
- package/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/dist/components/CreditForm/getThirdStepData.js +2 -1
- package/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js +12 -1
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js +11 -0
- package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +3 -2
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/SnilsField.js +4 -1
- package/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.js +2 -0
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.js +4 -0
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/formStateMap.d.ts +1 -0
- package/lib/components/CreditForm/formStateMap.js +1 -0
- package/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/lib/components/CreditForm/getThirdStepData.js +2 -1
- package/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js +12 -1
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js +9 -0
- package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +3 -2
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/SnilsField.js +4 -1
- package/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.js +2 -0
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +34 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/mobile/bundle/components/CreditForm/formStateMap.d.ts +1 -0
- package/mobile/bundle/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +4 -0
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/formStateMap.d.ts +1 -0
- package/mobile/dist/components/CreditForm/formStateMap.js +1 -0
- package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.js +2 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +12 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js +11 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +3 -2
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js +4 -1
- package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +2 -0
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +4 -0
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/formStateMap.d.ts +1 -0
- package/mobile/lib/components/CreditForm/formStateMap.js +1 -0
- package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.js +2 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +12 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js +9 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +3 -2
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js +4 -1
- package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +2 -0
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -0
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +4 -0
- package/mobile/src/components/CreditForm/formStateMap.tsx +3 -0
- package/mobile/src/components/CreditForm/getThirdStepData.ts +2 -0
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +15 -2
- package/mobile/src/ui-kit/FormField/Fields/ConfirmationIncomeField.tsx +18 -0
- package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +5 -1
- package/mobile/src/ui-kit/FormField/Fields/SnilsField.tsx +11 -7
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +2 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +2 -0
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -0
- package/src/components/CreditForm/creditFormStepsData.tsx +4 -0
- package/src/components/CreditForm/formStateMap.tsx +3 -0
- package/src/components/CreditForm/getThirdStepData.ts +2 -0
- package/src/components/CreditForm/useCreditFormAPI.tsx +15 -2
- package/src/ui-kit/FormField/Fields/ConfirmationIncomeField.tsx +18 -0
- package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +5 -1
- package/src/ui-kit/FormField/Fields/SnilsField.tsx +11 -7
- package/src/ui-kit/FormField/NameFieldDef.ts +2 -1
- package/src/ui-kit/FormField/getField.tsx +2 -0
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -1540,6 +1540,7 @@
|
|
|
1540
1540
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
1541
1541
|
addressMatch: defaultValidator(),
|
|
1542
1542
|
codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
|
|
1543
|
+
confirmationIncome: defaultValidator(),
|
|
1543
1544
|
};
|
|
1544
1545
|
const getObjectValidator = (inputs) => {
|
|
1545
1546
|
const requiredInputs = getNamesFromInput(inputs.filter((_) => Boolean(_?.required)));
|
|
@@ -2202,6 +2203,11 @@
|
|
|
2202
2203
|
|
|
2203
2204
|
const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), validatorObj.comment, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })));
|
|
2204
2205
|
|
|
2206
|
+
const ConfirmationIncomeField = JSX(({ field, input }) => {
|
|
2207
|
+
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
2208
|
+
return (jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input }));
|
|
2209
|
+
});
|
|
2210
|
+
|
|
2205
2211
|
const ConscriptionField = JSX(({ field, input }) => {
|
|
2206
2212
|
const { data: conscription } = useLeadFormData('MILITARY_STATUS');
|
|
2207
2213
|
return (jsx(SelectField, { field: field, source: conscription, label: "\u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u043E\u0435\u043D\u043D\u043E\u043E\u0431\u044F\u0437\u0430\u043D\u043D\u043E\u0433\u043E", fieldName: "conscription", input: input }));
|
|
@@ -2477,12 +2483,13 @@
|
|
|
2477
2483
|
|
|
2478
2484
|
const MAX_PART = 100;
|
|
2479
2485
|
const PartInBusinessField = JSX(({ field, input }) => {
|
|
2486
|
+
const isBusinessOwner = field('positionOrganization')?.value?.key === 'BUSINESS_OWNER';
|
|
2480
2487
|
const partInBusinessField = {
|
|
2481
|
-
...getValidation(field('partInBusiness'), validatorObj.partInBusiness, calculateIsRequired(field, input?.required)),
|
|
2488
|
+
...getValidation(field('partInBusiness'), validatorObj.partInBusiness, calculateIsRequired(field, isBusinessOwner && input?.required)),
|
|
2482
2489
|
};
|
|
2483
2490
|
const handleChange = (value) => partInBusinessField?.onChange &&
|
|
2484
2491
|
partInBusinessField?.onChange(String(Number(value) > MAX_PART ? MAX_PART : Number(value) || ''));
|
|
2485
|
-
return (jsx(InputControl, { label: "\u0414\u043E\u043B\u044F \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0432 \u0431\u0438\u0437\u043D\u0435\u0441\u0435", placeholder: "\u0432 %", type: "number", inputLength: 3, ...partInBusinessField, ...input, onChange: handleChange }));
|
|
2492
|
+
return (jsx(InputControl, { label: "\u0414\u043E\u043B\u044F \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0432 \u0431\u0438\u0437\u043D\u0435\u0441\u0435", placeholder: "\u0432 %", type: "number", inputLength: 3, ...partInBusinessField, ...input, onChange: handleChange, value: isBusinessOwner ? partInBusinessField?.value : '', disabled: !isBusinessOwner }));
|
|
2486
2493
|
});
|
|
2487
2494
|
|
|
2488
2495
|
const PartnerCommentsField = JSX(({ field, input }) => {
|
|
@@ -3256,7 +3263,10 @@
|
|
|
3256
3263
|
|
|
3257
3264
|
const InputSnilsControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(SnilsInput, { "aria-label": label, label: getRequiredLabel({ label, errors: rest?.errors }), valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "___-___-___ __" }), renderErrorText(error)] })));
|
|
3258
3265
|
|
|
3259
|
-
const SnilsField = JSX(({ field, input }) =>
|
|
3266
|
+
const SnilsField = JSX(({ field, input }) => {
|
|
3267
|
+
const isPfrFlg = field('consentPfrFlg')?.value;
|
|
3268
|
+
return (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", ...getValidation(field('snils'), validatorObj.snils, isPfrFlg ? input?.required : false), ...input }));
|
|
3269
|
+
});
|
|
3260
3270
|
|
|
3261
3271
|
const SurnameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", inputLength: 60, disabled: isEsiaAuthorize() && input?.filledByEsia, ...getValidation(field('surname'), validatorObj.surname, input?.required), ...input })));
|
|
3262
3272
|
|
|
@@ -3388,6 +3398,7 @@
|
|
|
3388
3398
|
currency: jsx(CurrencyField, { field: field, input: input }),
|
|
3389
3399
|
cardCategory: jsx(CardCategoryField, { field: field, input: input }),
|
|
3390
3400
|
codeWord: jsx(CodeWordField, { field: field, input: input }),
|
|
3401
|
+
confirmationIncome: jsx(ConfirmationIncomeField, { field: field, input: input }),
|
|
3391
3402
|
};
|
|
3392
3403
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name || ''] }, String(i))) : null;
|
|
3393
3404
|
};
|
|
@@ -6133,6 +6144,7 @@
|
|
|
6133
6144
|
familyStatus: { key: '', text: '' },
|
|
6134
6145
|
dependents: undefined,
|
|
6135
6146
|
familyMembers: undefined,
|
|
6147
|
+
confirmationIncome: { key: '', text: '' },
|
|
6136
6148
|
mandatoryIncome: undefined,
|
|
6137
6149
|
otherPayments: undefined,
|
|
6138
6150
|
snils: '',
|
|
@@ -6254,10 +6266,11 @@
|
|
|
6254
6266
|
};
|
|
6255
6267
|
|
|
6256
6268
|
const getThirdStepData = (formData) => {
|
|
6257
|
-
const { familyStatus, dependents, familyMembers, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
|
|
6269
|
+
const { familyStatus, dependents, familyMembers, confirmationIncome, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
|
|
6258
6270
|
return {
|
|
6259
6271
|
maritalStatusCd: familyStatus,
|
|
6260
6272
|
totalDependents: familyMembers,
|
|
6273
|
+
incomeCertificateCd: confirmationIncome,
|
|
6261
6274
|
otherDependents: dependents,
|
|
6262
6275
|
participantIncomes: getParticipantIncomes({
|
|
6263
6276
|
mandatoryIncome,
|
|
@@ -6342,7 +6355,18 @@
|
|
|
6342
6355
|
handleSubmit,
|
|
6343
6356
|
};
|
|
6344
6357
|
};
|
|
6345
|
-
const calculateInputs = (formData, inputs, step) =>
|
|
6358
|
+
const calculateInputs = (formData, inputs, step) => {
|
|
6359
|
+
if (formData['positionOrganization']?.key !== 'BUSINESS_OWNER') {
|
|
6360
|
+
return inputs.map((_) => (_?.name === 'partInBusiness' ? { ..._, required: false } : _));
|
|
6361
|
+
}
|
|
6362
|
+
if (!formData['consentPfrFlg']) {
|
|
6363
|
+
return inputs.map((_) => (_?.name === 'snils' ? { ..._, required: false } : _));
|
|
6364
|
+
}
|
|
6365
|
+
if (step === 2 && formData['employment']?.key === 'RETIREE') {
|
|
6366
|
+
return [];
|
|
6367
|
+
}
|
|
6368
|
+
return inputs;
|
|
6369
|
+
};
|
|
6346
6370
|
|
|
6347
6371
|
const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, renderStep = renderStep$1, isFormFinished, finishForm, }) => {
|
|
6348
6372
|
const [localStorageData, saveStep] = useLocalStorage('leadForm');
|
|
@@ -6557,6 +6581,10 @@
|
|
|
6557
6581
|
},
|
|
6558
6582
|
],
|
|
6559
6583
|
},
|
|
6584
|
+
{
|
|
6585
|
+
columns: 1,
|
|
6586
|
+
inputs: [{ fieldType: 'common', name: 'confirmationIncome', required: true }],
|
|
6587
|
+
},
|
|
6560
6588
|
{
|
|
6561
6589
|
columns: 1,
|
|
6562
6590
|
inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
|
|
@@ -8923,7 +8951,7 @@
|
|
|
8923
8951
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
8924
8952
|
});
|
|
8925
8953
|
|
|
8926
|
-
const packageVersion = "0.14.
|
|
8954
|
+
const packageVersion = "0.14.649";
|
|
8927
8955
|
|
|
8928
8956
|
exports.Blocks = Blocks;
|
|
8929
8957
|
exports.ContentPage = ContentPage;
|