@redneckz/wildless-cms-uni-blocks 0.14.901 → 0.14.903
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 +14 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/validator/validators.d.ts +1 -0
- package/bundle/ui-kit/DialogManager/Dialog.d.ts +3 -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/dist/ui-kit/DialogManager/Dialog.d.ts +3 -1
- package/dist/ui-kit/DialogManager/Dialog.js +3 -2
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/retail/components/DraftDialog/utils.d.ts +3 -3
- 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/lib/ui-kit/DialogManager/Dialog.d.ts +3 -1
- package/lib/ui-kit/DialogManager/Dialog.js +3 -2
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.fixture.d.ts +5 -0
- package/lib/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +13 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/validator/validators.d.ts +1 -0
- package/mobile/bundle/ui-kit/DialogManager/Dialog.d.ts +3 -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/dist/ui-kit/DialogManager/Dialog.d.ts +3 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +3 -2
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/lib/common.css +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/lib/ui-kit/DialogManager/Dialog.d.ts +3 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +3 -2
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/src/retail/components/Fields/EmailField.tsx +22 -8
- package/mobile/src/retail/validator/validators.ts +1 -0
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +6 -3
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +1 -0
- package/package.json +1 -1
- package/src/retail/components/Fields/EmailField.tsx +22 -8
- package/src/retail/validator/validators.ts +1 -0
- package/src/ui-kit/DialogManager/Dialog.tsx +6 -3
- package/src/ui-kit/SearchDialog/SearchDialog.fixture.tsx +7 -0
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -1481,12 +1481,13 @@
|
|
|
1481
1481
|
|
|
1482
1482
|
const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", type: "button", children: jsx(Icon, { name: "CloseIcon", width: "20", height: "20", iconVersion: "gray" }) })));
|
|
1483
1483
|
|
|
1484
|
-
const
|
|
1484
|
+
const DIALOG_STYLE = {
|
|
1485
1485
|
sm: 'max-w-sm top-1/3',
|
|
1486
1486
|
lg: 'max-w-lg',
|
|
1487
1487
|
'4xl': 'max-w-4xl',
|
|
1488
|
+
none: 'mt-0',
|
|
1488
1489
|
};
|
|
1489
|
-
const Dialog = JSX(({ head, maxWidth = '4xl', children, onClose, onClick }) => (jsxs("div", { className: style('relative bg-white p-lg pb-6xl my-6xl mx-auto rounded-lg w-full',
|
|
1490
|
+
const Dialog = JSX(({ head, maxWidth = '4xl', children, onClose, onClick }) => (jsxs("div", { className: style('relative bg-white p-lg pb-6xl my-6xl mx-auto rounded-lg w-full', DIALOG_STYLE[maxWidth]), role: "dialog", title: "\u0414\u0438\u0430\u043B\u043E\u0433", onClick: onClick, children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0 z-10", onClose: onClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container", children: children })] })));
|
|
1490
1491
|
|
|
1491
1492
|
function useDialog(Dialog, initialProps = {}) {
|
|
1492
1493
|
const { open, close, ...rest } = useDialogManager();
|
|
@@ -3221,6 +3222,7 @@
|
|
|
3221
3222
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
3222
3223
|
const ADDRESS_ERROR_MESSAGE = 'Укажите регион, город/населенный пункт, улицу, дом';
|
|
3223
3224
|
const retailCyrillicPattern = /^[\u0400-\u04FF-\s]+$/u;
|
|
3225
|
+
const retailNotCyrillicPattern = /^(?!\s*$)[^\p{Script=Cyrillic}]+$/u;
|
|
3224
3226
|
const addressDaDataValidate = (address) => Boolean(address.region && (address.city || address.locality) && address.house);
|
|
3225
3227
|
const addressDaDataValidator = () => validator(addressDaDataValidate)(ADDRESS_ERROR_MESSAGE);
|
|
3226
3228
|
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && (address.city || address.locality) && address.house))(ADDRESS_ERROR_MESSAGE);
|
|
@@ -5142,7 +5144,14 @@
|
|
|
5142
5144
|
return (jsx(SelectField, { field: field, source: education, label: "\u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435", fieldName: "education", input: input }));
|
|
5143
5145
|
});
|
|
5144
5146
|
|
|
5145
|
-
const EmailField = JSX(({ field, input }) =>
|
|
5147
|
+
const EmailField = JSX(({ field, input }) => {
|
|
5148
|
+
const onChange = useCallback((value) => {
|
|
5149
|
+
if (retailNotCyrillicPattern.test(value) || value.length === 0) {
|
|
5150
|
+
field('email')?.onChange?.(value);
|
|
5151
|
+
}
|
|
5152
|
+
}, [field]);
|
|
5153
|
+
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 }));
|
|
5154
|
+
});
|
|
5146
5155
|
|
|
5147
5156
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
5148
5157
|
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
@@ -10589,7 +10598,7 @@
|
|
|
10589
10598
|
initialQuery,
|
|
10590
10599
|
});
|
|
10591
10600
|
const searchItems = useMemo(() => combineTopItemsAndSearchResult(navigationItems)(searchResult), [navigationItems, searchResult]);
|
|
10592
|
-
return (jsx(Dialog, { head: jsx(SearchInput, { className: "mt-s", autoFocus: true, ...searchInputProps }), onClose: onClose, children: jsx(Sitemap, { navigationItems: searchItems }) }));
|
|
10601
|
+
return (jsx(Dialog, { maxWidth: "none", head: jsx(SearchInput, { className: "mt-s", autoFocus: true, ...searchInputProps }), onClose: onClose, children: jsx(Sitemap, { navigationItems: searchItems }) }));
|
|
10593
10602
|
});
|
|
10594
10603
|
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
10595
10604
|
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
@@ -11954,7 +11963,7 @@
|
|
|
11954
11963
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11955
11964
|
});
|
|
11956
11965
|
|
|
11957
|
-
const packageVersion = "0.14.
|
|
11966
|
+
const packageVersion = "0.14.902";
|
|
11958
11967
|
|
|
11959
11968
|
exports.Blocks = Blocks;
|
|
11960
11969
|
exports.ContentPage = ContentPage;
|