@redneckz/wildless-cms-uni-blocks 0.14.703 → 0.14.705
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 +12 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/api/RetailAPI/sendCode.js +1 -1
- package/dist/api/RetailAPI/sendCode.js.map +1 -1
- package/dist/components/CreditCardForm/getFourthStepData.js +3 -2
- package/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/dist/components/CreditCardForm/getThirdStepData.js +0 -1
- package/dist/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/SnilsField.js +1 -1
- package/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/dist/ui-kit/Input/InputSnilsControl.js +1 -1
- package/dist/ui-kit/Input/InputSnilsControl.js.map +1 -1
- package/dist/ui-kit/SnilsInput/SnilsInput.js +4 -2
- package/dist/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/dist/utils/normalizeWithMask.js +1 -1
- package/dist/utils/normalizeWithMask.js.map +1 -1
- package/lib/api/RetailAPI/sendCode.js +1 -1
- package/lib/api/RetailAPI/sendCode.js.map +1 -1
- package/lib/components/CreditCardForm/getFourthStepData.js +3 -2
- package/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/lib/components/CreditCardForm/getThirdStepData.js +0 -1
- package/lib/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/SnilsField.js +1 -1
- package/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/lib/ui-kit/Input/InputSnilsControl.js +1 -1
- package/lib/ui-kit/Input/InputSnilsControl.js.map +1 -1
- package/lib/ui-kit/SnilsInput/SnilsInput.js +4 -2
- package/lib/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/lib/utils/normalizeWithMask.js +1 -1
- package/lib/utils/normalizeWithMask.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +12 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/api/RetailAPI/sendCode.js +1 -1
- package/mobile/dist/api/RetailAPI/sendCode.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getFourthStepData.js +3 -2
- package/mobile/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getThirdStepData.js +0 -1
- package/mobile/dist/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputSnilsControl.js +1 -1
- package/mobile/dist/ui-kit/Input/InputSnilsControl.js.map +1 -1
- package/mobile/dist/ui-kit/SnilsInput/SnilsInput.js +4 -2
- package/mobile/dist/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/mobile/dist/utils/normalizeWithMask.js +1 -1
- package/mobile/dist/utils/normalizeWithMask.js.map +1 -1
- package/mobile/lib/api/RetailAPI/sendCode.js +1 -1
- package/mobile/lib/api/RetailAPI/sendCode.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getFourthStepData.js +3 -2
- package/mobile/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getThirdStepData.js +0 -1
- package/mobile/lib/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputSnilsControl.js +1 -1
- package/mobile/lib/ui-kit/Input/InputSnilsControl.js.map +1 -1
- package/mobile/lib/ui-kit/SnilsInput/SnilsInput.js +4 -2
- package/mobile/lib/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/mobile/lib/utils/normalizeWithMask.js +1 -1
- package/mobile/lib/utils/normalizeWithMask.js.map +1 -1
- package/mobile/src/api/RetailAPI/sendCode.ts +1 -1
- package/mobile/src/components/CreditCardForm/getFourthStepData.ts +3 -1
- package/mobile/src/components/CreditCardForm/getThirdStepData.tsx +0 -1
- package/mobile/src/ui-kit/FormField/Fields/SnilsField.tsx +1 -0
- package/mobile/src/ui-kit/Input/InputSnilsControl.tsx +1 -0
- package/mobile/src/ui-kit/SnilsInput/SnilsInput.tsx +5 -2
- package/mobile/src/utils/normalizeWithMask.ts +1 -1
- package/package.json +1 -1
- package/src/api/RetailAPI/sendCode.ts +1 -1
- package/src/components/CreditCardForm/getFourthStepData.ts +3 -1
- package/src/components/CreditCardForm/getThirdStepData.tsx +0 -1
- package/src/ui-kit/FormField/Fields/SnilsField.tsx +1 -0
- package/src/ui-kit/Input/InputSnilsControl.tsx +1 -0
- package/src/ui-kit/SnilsInput/SnilsInput.tsx +5 -2
- package/src/utils/normalizeWithMask.ts +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -2930,7 +2930,7 @@
|
|
|
2930
2930
|
|
|
2931
2931
|
function normalizeWithMask(value, pattern) {
|
|
2932
2932
|
const valueNumbers = value.replace(/\D/g, '');
|
|
2933
|
-
if (valueNumbers === '' ||
|
|
2933
|
+
if (valueNumbers === '' || valueNumbers.length === pattern.length) {
|
|
2934
2934
|
return value;
|
|
2935
2935
|
}
|
|
2936
2936
|
const patternInArr = [...pattern];
|
|
@@ -4087,8 +4087,10 @@
|
|
|
4087
4087
|
|
|
4088
4088
|
const ShareholderFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u042F \u044F\u0432\u043B\u044F\u044E\u0441\u044C \u0430\u043A\u0446\u0438\u043E\u043D\u0435\u0440\u043E\u043C / \u0443\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u043E\u043C / \u0447\u043B\u0435\u043D\u043E\u043C / \u043F\u0430\u0439\u0449\u0438\u043A\u043E\u043C / \u0432\u043A\u043B\u0430\u0434\u0447\u0438\u043A\u043E\u043C \u0441 \u0434\u043E\u043B\u0435\u0439 \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0431\u043E\u043B\u0435\u0435 20% \u0443\u0441\u0442\u0430\u0432\u043D\u043E\u0433\u043E \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0430 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430", ...getValidation(field('shareholderFlg'), validatorObj.shareholderFlg, input?.required) })));
|
|
4089
4089
|
|
|
4090
|
-
const SnilsInput = JSX(({ children, onChange, ...inputProps }) => {
|
|
4091
|
-
const handleChange = useCallback((v) =>
|
|
4090
|
+
const SnilsInput = JSX(({ children, onChange, maxLength, ...inputProps }) => {
|
|
4091
|
+
const handleChange = useCallback((v) => maxLength
|
|
4092
|
+
? v.length <= maxLength && onChange?.(normalizeWithMask(v, '___-___-___ __'))
|
|
4093
|
+
: onChange?.(normalizeWithMask(v, '___-___-___ __')), [onChange]);
|
|
4092
4094
|
const handleBlur = useCallback((v) => {
|
|
4093
4095
|
if (v === '___-___-___ __') {
|
|
4094
4096
|
onChange && onChange('');
|
|
@@ -4097,9 +4099,9 @@
|
|
|
4097
4099
|
return (jsx(Input, { ...inputProps, onChange: handleChange, onFocus: (ev) => handleChange(ev?.target?.value || ''), onBlur: (ev) => handleBlur(ev?.target?.value || ''), children: children }));
|
|
4098
4100
|
});
|
|
4099
4101
|
|
|
4100
|
-
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)] })));
|
|
4102
|
+
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: "___-___-___ __", ...rest }), renderErrorText(error)] })));
|
|
4101
4103
|
|
|
4102
|
-
const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", ...getValidation(field('snils'), validatorObj.snils, input?.required), ...input })));
|
|
4104
|
+
const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", maxLength: 14, ...getValidation(field('snils'), validatorObj.snils, input?.required), ...input })));
|
|
4103
4105
|
|
|
4104
4106
|
const FIELD_NAME = 'surname';
|
|
4105
4107
|
const SurnameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME), ...getValidation(field('surname'), validatorObj.surname, input?.required), ...input })));
|
|
@@ -4500,7 +4502,7 @@
|
|
|
4500
4502
|
const sendCode = (body) => fetchRetailJSON('/sms/sendCode', 'POST', body).then((res) => !isErrorResult(res, body.phoneNumber));
|
|
4501
4503
|
const isErrorResult = (res, phoneNumber) => Boolean(res) &&
|
|
4502
4504
|
typeof res !== 'string' &&
|
|
4503
|
-
Boolean(res?.errorMessage
|
|
4505
|
+
Boolean(res?.errorMessage?.startsWith(`Too many request for phoneNumber [${phoneNumber}]`));
|
|
4504
4506
|
|
|
4505
4507
|
const checkCaptcha = (body) => doRequest('/sms/checkCaptcha', 'POST', body)
|
|
4506
4508
|
.then((res) => res.text())
|
|
@@ -7090,12 +7092,13 @@
|
|
|
7090
7092
|
};
|
|
7091
7093
|
|
|
7092
7094
|
const getFourthStepData$1 = (formData) => {
|
|
7093
|
-
const { familyStatus, dependents, familyMembers, children, wages, mandatoryPayments, incomeAverage, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
7095
|
+
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, incomeAverage, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
7094
7096
|
return {
|
|
7095
7097
|
maritalStatusCd: familyStatus,
|
|
7096
|
-
childrenDependents: children,
|
|
7097
7098
|
totalDependents: familyMembers,
|
|
7099
|
+
incomeCertificateCd: confirmationIncome,
|
|
7098
7100
|
otherDependents: dependents,
|
|
7101
|
+
childrenDependents: children,
|
|
7099
7102
|
militaryStatusCd: conscription,
|
|
7100
7103
|
participantIncomes: getParticipantIncomes({
|
|
7101
7104
|
wages,
|
|
@@ -7194,7 +7197,6 @@
|
|
|
7194
7197
|
generalSeniority: experience5Years,
|
|
7195
7198
|
jobsNumber,
|
|
7196
7199
|
lastWorkDuration: lastJobExperience,
|
|
7197
|
-
payrollCardRshbFlg: true,
|
|
7198
7200
|
positionCd: positionOrganization,
|
|
7199
7201
|
participantContacts: getParticipantContacts({
|
|
7200
7202
|
organizationPhone: organizationPhone && formatPhone(organizationPhone),
|
|
@@ -10776,7 +10778,7 @@
|
|
|
10776
10778
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10777
10779
|
});
|
|
10778
10780
|
|
|
10779
|
-
const packageVersion = "0.14.
|
|
10781
|
+
const packageVersion = "0.14.704";
|
|
10780
10782
|
|
|
10781
10783
|
exports.Blocks = Blocks;
|
|
10782
10784
|
exports.ContentPage = ContentPage;
|