@redneckz/wildless-cms-uni-blocks 0.14.900 → 0.14.902
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 +19 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/validator/validators.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/consents.js +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/retail/components/Fields/EmailField.js +10 -1
- package/dist/retail/components/Fields/EmailField.js.map +1 -1
- package/dist/retail/validator/validators.d.ts +1 -0
- package/dist/retail/validator/validators.js +2 -1
- package/dist/retail/validator/validators.js.map +1 -1
- package/lib/components/ApplicationLeadForm/consents.js +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/retail/components/Fields/EmailField.js +10 -1
- package/lib/retail/components/Fields/EmailField.js.map +1 -1
- package/lib/retail/validator/validators.d.ts +1 -0
- package/lib/retail/validator/validators.js +1 -0
- package/lib/retail/validator/validators.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +19 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/validator/validators.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/consents.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/retail/components/Fields/EmailField.js +10 -1
- package/mobile/dist/retail/components/Fields/EmailField.js.map +1 -1
- package/mobile/dist/retail/validator/validators.d.ts +1 -0
- package/mobile/dist/retail/validator/validators.js +2 -1
- package/mobile/dist/retail/validator/validators.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/retail/components/Fields/EmailField.js +10 -1
- package/mobile/lib/retail/components/Fields/EmailField.js.map +1 -1
- package/mobile/lib/retail/validator/validators.d.ts +1 -0
- package/mobile/lib/retail/validator/validators.js +1 -0
- package/mobile/lib/retail/validator/validators.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/consents.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +10 -7
- package/mobile/src/retail/components/Fields/EmailField.tsx +22 -8
- package/mobile/src/retail/validator/validators.ts +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/consents.ts +1 -1
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +10 -7
- package/src/retail/components/Fields/EmailField.tsx +22 -8
- package/src/retail/validator/validators.ts +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -3221,6 +3221,7 @@
|
|
|
3221
3221
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
3222
3222
|
const ADDRESS_ERROR_MESSAGE = 'Укажите регион, город/населенный пункт, улицу, дом';
|
|
3223
3223
|
const retailCyrillicPattern = /^[\u0400-\u04FF-\s]+$/u;
|
|
3224
|
+
const retailNotCyrillicPattern = /^(?!\s*$)[^\p{Script=Cyrillic}]+$/u;
|
|
3224
3225
|
const addressDaDataValidate = (address) => Boolean(address.region && (address.city || address.locality) && address.house);
|
|
3225
3226
|
const addressDaDataValidator = () => validator(addressDaDataValidate)(ADDRESS_ERROR_MESSAGE);
|
|
3226
3227
|
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && (address.city || address.locality) && address.house))(ADDRESS_ERROR_MESSAGE);
|
|
@@ -3388,7 +3389,7 @@
|
|
|
3388
3389
|
docId: 1,
|
|
3389
3390
|
},
|
|
3390
3391
|
consentPfrFlg: {
|
|
3391
|
-
text: 'Согласие на запрос в
|
|
3392
|
+
text: 'Согласие на запрос в CФР',
|
|
3392
3393
|
docId: 3,
|
|
3393
3394
|
},
|
|
3394
3395
|
};
|
|
@@ -5142,7 +5143,14 @@
|
|
|
5142
5143
|
return (jsx(SelectField, { field: field, source: education, label: "\u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435", fieldName: "education", input: input }));
|
|
5143
5144
|
});
|
|
5144
5145
|
|
|
5145
|
-
const EmailField = JSX(({ field, input }) =>
|
|
5146
|
+
const EmailField = JSX(({ field, input }) => {
|
|
5147
|
+
const onChange = useCallback((value) => {
|
|
5148
|
+
if (retailNotCyrillicPattern.test(value) || value.length === 0) {
|
|
5149
|
+
field('email')?.onChange?.(value);
|
|
5150
|
+
}
|
|
5151
|
+
}, [field]);
|
|
5152
|
+
return (jsx(DaDataInputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", maxLength: 50, ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
5153
|
+
});
|
|
5146
5154
|
|
|
5147
5155
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
5148
5156
|
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
@@ -6631,7 +6639,7 @@
|
|
|
6631
6639
|
}, []);
|
|
6632
6640
|
useEffect(() => {
|
|
6633
6641
|
leadFormStore.productType = productType;
|
|
6634
|
-
const {
|
|
6642
|
+
const { referalCode, refererCode, productId, marketingInfo } = getLeadQueryParams(queryFromStorage, sessionStore);
|
|
6635
6643
|
if (referalCode) {
|
|
6636
6644
|
sessionStore.referalData = {
|
|
6637
6645
|
refererCode,
|
|
@@ -6640,6 +6648,11 @@
|
|
|
6640
6648
|
};
|
|
6641
6649
|
}
|
|
6642
6650
|
sessionStore.marketingInfo = marketingInfo;
|
|
6651
|
+
}, [queryFromStorage]);
|
|
6652
|
+
useEffect(() => {
|
|
6653
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6654
|
+
const code = params.get('code');
|
|
6655
|
+
const state = params.get('state');
|
|
6643
6656
|
if (code && state) {
|
|
6644
6657
|
requestEsiaProfile(code, state);
|
|
6645
6658
|
}
|
|
@@ -6647,16 +6660,14 @@
|
|
|
6647
6660
|
sessionStorage.removeItem('accessToken');
|
|
6648
6661
|
sessionStorage.removeItem('refreshToken');
|
|
6649
6662
|
}
|
|
6650
|
-
}, [
|
|
6663
|
+
}, []);
|
|
6651
6664
|
return initialFormState;
|
|
6652
6665
|
};
|
|
6653
6666
|
const getLeadQueryParams = (queryFromStorage, sessionStore) => {
|
|
6654
6667
|
const referalData = sessionStore.referalData;
|
|
6655
6668
|
const marketingInfoFromStorage = sessionStore.marketingInfo;
|
|
6656
6669
|
const queryStorage = new URLSearchParams(decodeURIComponent(queryFromStorage || ''));
|
|
6657
|
-
const
|
|
6658
|
-
const code = params.get('code');
|
|
6659
|
-
const state = params.get('state');
|
|
6670
|
+
const code = queryStorage.get('code');
|
|
6660
6671
|
const referalCode = code ? referalData?.referalCode : queryStorage.get('referalCode');
|
|
6661
6672
|
const refererCode = code ? referalData?.refererCode : queryStorage.get('refererCode');
|
|
6662
6673
|
const productId = code ? referalData?.productId : queryStorage.get('productId');
|
|
@@ -6672,8 +6683,6 @@
|
|
|
6672
6683
|
userId: queryStorage.get('userId'),
|
|
6673
6684
|
};
|
|
6674
6685
|
return {
|
|
6675
|
-
code,
|
|
6676
|
-
state,
|
|
6677
6686
|
referalCode,
|
|
6678
6687
|
refererCode,
|
|
6679
6688
|
productId,
|
|
@@ -11953,7 +11962,7 @@
|
|
|
11953
11962
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11954
11963
|
});
|
|
11955
11964
|
|
|
11956
|
-
const packageVersion = "0.14.
|
|
11965
|
+
const packageVersion = "0.14.901";
|
|
11957
11966
|
|
|
11958
11967
|
exports.Blocks = Blocks;
|
|
11959
11968
|
exports.ContentPage = ContentPage;
|