@redneckz/wildless-cms-uni-blocks 0.14.844 → 0.14.846
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/bundle/retail/validator/validators.d.ts +1 -0
- package/bundle/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/dist/retail/components/Fields/BeginDateField.js +1 -1
- package/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/dist/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/dist/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/dist/retail/validator/validatorObj.js +2 -2
- package/dist/retail/validator/validatorObj.js.map +1 -1
- package/dist/retail/validator/validators.d.ts +1 -0
- package/dist/retail/validator/validators.js +3 -1
- package/dist/retail/validator/validators.js.map +1 -1
- package/dist/services/search/useSearch.js +8 -5
- package/dist/services/search/useSearch.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/dist/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/lib/retail/components/Fields/BeginDateField.js +1 -1
- package/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/lib/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/lib/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/lib/retail/validator/validatorObj.js +3 -3
- package/lib/retail/validator/validatorObj.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/lib/services/search/useSearch.js +8 -5
- package/lib/services/search/useSearch.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/lib/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/validator/validators.d.ts +1 -0
- package/mobile/bundle/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/mobile/dist/retail/components/Fields/BeginDateField.js +1 -1
- package/mobile/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/mobile/dist/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/mobile/dist/retail/validator/validatorObj.js +2 -2
- package/mobile/dist/retail/validator/validatorObj.js.map +1 -1
- package/mobile/dist/retail/validator/validators.d.ts +1 -0
- package/mobile/dist/retail/validator/validators.js +3 -1
- package/mobile/dist/retail/validator/validators.js.map +1 -1
- package/mobile/dist/services/search/useSearch.js +8 -5
- package/mobile/dist/services/search/useSearch.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/mobile/dist/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/mobile/lib/retail/components/Fields/BeginDateField.js +1 -1
- package/mobile/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/mobile/lib/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/mobile/lib/retail/validator/validatorObj.js +3 -3
- package/mobile/lib/retail/validator/validatorObj.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/lib/services/search/useSearch.js +8 -5
- package/mobile/lib/services/search/useSearch.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/mobile/lib/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/mobile/src/retail/components/Fields/BeginDateField.tsx +1 -0
- package/mobile/src/retail/components/Fields/ParticipantDateRegistrationField.tsx +5 -1
- package/mobile/src/retail/validator/validatorObj.ts +3 -2
- package/mobile/src/retail/validator/validators.ts +3 -0
- package/mobile/src/services/search/useSearch.ts +33 -22
- package/mobile/src/ui-kit/DatePicker/DatePickerControl.tsx +1 -0
- package/package.json +1 -1
- package/src/retail/components/Fields/BeginDateField.tsx +1 -0
- package/src/retail/components/Fields/ParticipantDateRegistrationField.tsx +5 -1
- package/src/retail/validator/validatorObj.ts +3 -2
- package/src/retail/validator/validators.ts +3 -0
- package/src/services/search/useSearch.ts +33 -22
- package/src/ui-kit/DatePicker/DatePickerControl.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -2463,6 +2463,7 @@
|
|
|
2463
2463
|
return false;
|
|
2464
2464
|
})('Укажите дату выдачи паспорта');
|
|
2465
2465
|
const deliveryDateValidator = (errorMsg) => validator((_) => _?.getTime() >= new Date().getTime())(errorMsg);
|
|
2466
|
+
const notLaterDateValidator = (errorMsg) => validator((_) => _?.getTime() <= new Date().getTime())(errorMsg);
|
|
2466
2467
|
const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
2467
2468
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
2468
2469
|
const snilsValidate = (snils) => {
|
|
@@ -2529,7 +2530,7 @@
|
|
|
2529
2530
|
lastJobExperience: jobNumberValidator('Укажите стаж на последнем месте работы'),
|
|
2530
2531
|
experience5Years: jobNumberValidator('Укажите общий стаж за последние 5 лет'),
|
|
2531
2532
|
jobsNumber: jobNumberValidator('Укажите количество мест работы за последние 5 лет'),
|
|
2532
|
-
beginDate:
|
|
2533
|
+
beginDate: notLaterDateValidator('Укажите дату заключения трудового договора'),
|
|
2533
2534
|
addressFact: addressDaDataValidator(),
|
|
2534
2535
|
addressRegistration: addressDaDataValidator(),
|
|
2535
2536
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
@@ -2556,7 +2557,7 @@
|
|
|
2556
2557
|
dulNumber: numberValidator('Укажите номер паспорта'),
|
|
2557
2558
|
dulSubdivisionCode: numberValidator('Укажите код подразделения'),
|
|
2558
2559
|
dulIssuedBy: defaultValidator('Укажите организацию, выдавшую паспорт'),
|
|
2559
|
-
participantDateRegistration:
|
|
2560
|
+
participantDateRegistration: notLaterDateValidator('Укажите дату регистрации'),
|
|
2560
2561
|
retirementIncome: defaultValidator(),
|
|
2561
2562
|
otherIncome: defaultValidator(),
|
|
2562
2563
|
wages: defaultValidator(),
|
|
@@ -3852,7 +3853,7 @@
|
|
|
3852
3853
|
|
|
3853
3854
|
const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
|
|
3854
3855
|
|
|
3855
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
|
|
3856
|
+
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input), maxDate: new Date() })));
|
|
3856
3857
|
|
|
3857
3858
|
const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
|
|
3858
3859
|
|
|
@@ -4746,7 +4747,7 @@
|
|
|
4746
4747
|
|
|
4747
4748
|
const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4748
4749
|
|
|
4749
|
-
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...field(input?.name ?? '') })));
|
|
4750
|
+
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...field(input?.name ?? ''), maxDate: new Date() })));
|
|
4750
4751
|
|
|
4751
4752
|
const MAX_PART = 100;
|
|
4752
4753
|
const MIN_PART = 0;
|
|
@@ -9577,12 +9578,13 @@
|
|
|
9577
9578
|
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
9578
9579
|
const useSearch = ({ basePathList, initialQuery = '', }) => {
|
|
9579
9580
|
const [query, setQuery] = useState(initialQuery || '');
|
|
9581
|
+
const router = useRouter();
|
|
9580
9582
|
useEffect(() => {
|
|
9581
9583
|
if (initialQuery !== undefined && initialQuery !== null) {
|
|
9582
9584
|
setQuery(initialQuery);
|
|
9583
9585
|
}
|
|
9584
9586
|
}, [initialQuery]);
|
|
9585
|
-
const { data } = useAsyncData(basePathList?.length ? basePathList : null, fetchSearchIndex);
|
|
9587
|
+
const { data } = useAsyncData(basePathList?.length ? basePathList : null, fetchSearchIndex(router));
|
|
9586
9588
|
const [result, setResult] = useState(null);
|
|
9587
9589
|
useDebouncedEffect(() => {
|
|
9588
9590
|
if (data) {
|
|
@@ -9591,13 +9593,13 @@
|
|
|
9591
9593
|
}, [data, query]);
|
|
9592
9594
|
return [result, { value: query, onChange: setQuery }];
|
|
9593
9595
|
};
|
|
9594
|
-
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map(async (basePath) => [
|
|
9596
|
+
const fetchSearchIndex = (router) => async (...basePathList) => (await Promise.allSettled(basePathList.map(async (basePath) => [
|
|
9595
9597
|
basePath,
|
|
9596
9598
|
await fetchJSON(joinPath(basePath, SEARCH_INDEX_FILENAME)),
|
|
9597
9599
|
])))
|
|
9598
9600
|
.map((_) => (_.status === 'fulfilled' ? _.value : []))
|
|
9599
|
-
.map(getSearchIndex);
|
|
9600
|
-
const getSearchIndex = ([basePath, result]) => {
|
|
9601
|
+
.map(getSearchIndex(router));
|
|
9602
|
+
const getSearchIndex = (router) => ([basePath, result]) => {
|
|
9601
9603
|
if (!result) {
|
|
9602
9604
|
return {};
|
|
9603
9605
|
}
|
|
@@ -9605,7 +9607,7 @@
|
|
|
9605
9607
|
...result,
|
|
9606
9608
|
corpus: result.corpus?.map((_) => ({
|
|
9607
9609
|
..._,
|
|
9608
|
-
uri: _.uri === 'index' ? basePath :
|
|
9610
|
+
uri: _.uri === 'index' ? basePath : adjustHref(router)(_.uri, basePath),
|
|
9609
9611
|
})),
|
|
9610
9612
|
};
|
|
9611
9613
|
};
|
|
@@ -11035,7 +11037,7 @@
|
|
|
11035
11037
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11036
11038
|
});
|
|
11037
11039
|
|
|
11038
|
-
const packageVersion = "0.14.
|
|
11040
|
+
const packageVersion = "0.14.845";
|
|
11039
11041
|
|
|
11040
11042
|
exports.Blocks = Blocks;
|
|
11041
11043
|
exports.ContentPage = ContentPage;
|