@redneckz/wildless-cms-uni-blocks 0.13.13 → 0.13.15
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 +17 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +18 -15
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
- package/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +1 -0
- package/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -3
- package/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +3 -2
- package/bundle/hooks/useSWRResource.d.ts +7 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +18 -15
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.js +2 -2
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/dist/components/Footer/Footer.js +4 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -3
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +1 -0
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js +2 -2
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +5 -3
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +17 -12
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -3
- package/dist/components/StickyBottomMenu/RenderItem.js +11 -7
- package/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/TopItemMobile.d.ts +3 -2
- package/dist/components/StickyBottomMenu/TopItemMobile.js +1 -6
- package/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/renderMenuItems.js +1 -1
- package/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -1
- package/dist/hooks/useSWRResource.d.ts +7 -1
- package/dist/hooks/useSWRResource.js +8 -2
- package/dist/hooks/useSWRResource.js.map +1 -1
- package/dist/services/sitemap/useSitemap.js +1 -1
- package/dist/services/sitemap/useSitemap.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +5 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +18 -15
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.js +2 -2
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/lib/components/Footer/Footer.js +4 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -3
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +1 -0
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js +2 -2
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +5 -3
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +17 -12
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -3
- package/lib/components/StickyBottomMenu/RenderItem.js +11 -7
- package/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/TopItemMobile.d.ts +3 -2
- package/lib/components/StickyBottomMenu/TopItemMobile.js +1 -6
- package/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/renderMenuItems.js +1 -1
- package/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -1
- package/lib/hooks/useSWRResource.d.ts +7 -1
- package/lib/hooks/useSWRResource.js +8 -2
- package/lib/hooks/useSWRResource.js.map +1 -1
- package/lib/services/sitemap/useSitemap.js +1 -1
- package/lib/services/sitemap/useSitemap.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +5 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +124 -111
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +18 -15
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
- package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +1 -0
- package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/mobile/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -3
- package/mobile/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +3 -2
- package/mobile/bundle/hooks/useSWRResource.d.ts +7 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +18 -15
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
- package/mobile/dist/components/ContentPage/normalizeBlock.js +2 -2
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -3
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +1 -0
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js +2 -2
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +5 -3
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +17 -12
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -3
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js +11 -7
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.d.ts +3 -2
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js +1 -6
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -1
- package/mobile/dist/hooks/useSWRResource.d.ts +7 -1
- package/mobile/dist/hooks/useSWRResource.js +8 -2
- package/mobile/dist/hooks/useSWRResource.js.map +1 -1
- package/mobile/dist/services/sitemap/useSitemap.js +1 -1
- package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +5 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +18 -15
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
- package/mobile/lib/components/ContentPage/normalizeBlock.js +2 -2
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -3
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +1 -0
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +5 -3
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +17 -12
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -3
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js +11 -7
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.d.ts +3 -2
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js +1 -6
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -1
- package/mobile/lib/hooks/useSWRResource.d.ts +7 -1
- package/mobile/lib/hooks/useSWRResource.js +8 -2
- package/mobile/lib/hooks/useSWRResource.js.map +1 -1
- package/mobile/lib/services/sitemap/useSitemap.js +1 -1
- package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +5 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +6 -3
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +40 -32
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +3 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +1 -1
- package/mobile/src/components/ContentPage/normalizeBlock.ts +7 -2
- package/mobile/src/components/Footer/Footer.tsx +3 -3
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenu.tsx +3 -2
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +8 -5
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +27 -15
- package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +14 -11
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +1 -2
- package/mobile/src/components/StickyBottomMenu/TopItemMobile.tsx +12 -24
- package/mobile/src/components/StickyBottomMenu/renderMenuItems.tsx +1 -1
- package/mobile/src/hooks/useSWRResource.ts +19 -6
- package/mobile/src/services/sitemap/useSitemap.ts +1 -1
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +6 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +6 -3
- package/src/components/ApplicationForm/ApplicationFormContent.ts +40 -32
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +3 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +1 -1
- package/src/components/ContentPage/normalizeBlock.mobile.ts +7 -2
- package/src/components/Footer/Footer.mobile.tsx +3 -3
- package/src/components/Footer/Footer.tsx +4 -5
- package/src/components/Header/Header.tsx +1 -2
- package/src/components/StickyBottomMenu/ActiveSubMenu.tsx +3 -2
- package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +8 -5
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +27 -15
- package/src/components/StickyBottomMenu/RenderItem.tsx +14 -11
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +1 -2
- package/src/components/StickyBottomMenu/TopItemMobile.tsx +12 -24
- package/src/components/StickyBottomMenu/renderMenuItems.tsx +1 -1
- package/src/hooks/useSWRResource.ts +19 -6
- package/src/icons/IconName.ts +2 -2
- package/src/services/sitemap/useSitemap.ts +1 -1
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSwipeListScroll.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/useSwipeListScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;A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L,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SACrC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAEhC,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,GAAW,EAAE,EAAE;QACd,IAAI,YAAY,EAAE,OAAO,EAAE;YACzB,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;gBACjD,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,QAAQ;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO;QACL,YAAY;QACZ;YACE,UAAU;YACV,WAAW;YACX,QAAQ;YACR,aAAa;YACb,cAAc;YACd,mBAAmB,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;YACzC,0BAA0B;SAC3B;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"content": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"formBlock": {
|
|
4
|
+
"button": {
|
|
5
|
+
"text": "Отправить заявку",
|
|
6
|
+
"version": "primary"
|
|
7
|
+
},
|
|
8
|
+
"formType": "ApplicationFormBusinessCard"
|
|
5
9
|
},
|
|
6
|
-
"typeForm": "credit",
|
|
7
10
|
"version": "primary"
|
|
8
11
|
}
|
|
9
12
|
}
|
|
@@ -2,12 +2,11 @@ import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
|
2
2
|
import type { TitleProps } from '../../model/HeadlineType';
|
|
3
3
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
4
4
|
import type { LinkProps } from '../../model/LinkProps';
|
|
5
|
-
import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* @title Кнопка
|
|
9
8
|
*/
|
|
10
|
-
export interface SubmitButtonProps
|
|
9
|
+
export interface SubmitButtonProps {
|
|
11
10
|
/** @title Текст */
|
|
12
11
|
text?: string;
|
|
13
12
|
version?: ButtonVersion;
|
|
@@ -19,64 +18,73 @@ export type CommonApplicationFormProps = TitleProps & {
|
|
|
19
18
|
link?: LinkProps;
|
|
20
19
|
};
|
|
21
20
|
|
|
22
|
-
export type ApplicationFormBlockDef =
|
|
23
|
-
| BusinessCardFormParamsDef
|
|
24
|
-
| WedFormParamsDef
|
|
25
|
-
| DepositFormParamsDef
|
|
26
|
-
| CreditFormParamsDef
|
|
27
|
-
| AcquiringFormParamsDef
|
|
28
|
-
| GrantSupportFormParamsDef;
|
|
29
|
-
|
|
30
21
|
/**
|
|
31
22
|
* @title Бизнес-карта
|
|
32
|
-
* @default {"formType": "ApplicationFormBusinessCard"}
|
|
33
23
|
*/
|
|
34
|
-
export type BusinessCardFormParamsDef =
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
export type BusinessCardFormParamsDef = TitleProps &
|
|
25
|
+
CommonApplicationFormProps & {
|
|
26
|
+
/** @default ApplicationFormBusinessCard */
|
|
27
|
+
formType: 'ApplicationFormBusinessCard';
|
|
28
|
+
};
|
|
37
29
|
|
|
38
30
|
/**
|
|
39
31
|
* @title ВЭД
|
|
40
|
-
* @default {"formType": "ApplicationFormWed"}
|
|
41
32
|
*/
|
|
42
|
-
export type WedFormParamsDef =
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
export type WedFormParamsDef = TitleProps &
|
|
34
|
+
CommonApplicationFormProps & {
|
|
35
|
+
/** @default ApplicationFormWed */
|
|
36
|
+
formType: 'ApplicationFormWed';
|
|
37
|
+
};
|
|
45
38
|
|
|
46
39
|
/**
|
|
47
40
|
* @title Депозит
|
|
48
|
-
* @default {"formType": "ApplicationFormDeposit"}
|
|
49
41
|
*/
|
|
50
|
-
export type DepositFormParamsDef =
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
export type DepositFormParamsDef = TitleProps &
|
|
43
|
+
CommonApplicationFormProps & {
|
|
44
|
+
/** @default ApplicationFormDeposit */
|
|
45
|
+
formType: 'ApplicationFormDeposit';
|
|
46
|
+
};
|
|
53
47
|
|
|
54
48
|
/**
|
|
55
49
|
* @title Кредит
|
|
56
|
-
* @default {"formType": "ApplicationFormCredit"}
|
|
57
50
|
*/
|
|
58
|
-
export type CreditFormParamsDef =
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
export type CreditFormParamsDef = TitleProps &
|
|
52
|
+
CommonApplicationFormProps & {
|
|
53
|
+
/** @default ApplicationFormCredit */
|
|
54
|
+
formType: 'ApplicationFormCredit';
|
|
55
|
+
};
|
|
61
56
|
|
|
62
57
|
/**
|
|
63
58
|
* @title Эквайринг
|
|
64
|
-
* @default {"formType": "ApplicationFormAcquiring"}
|
|
65
59
|
*/
|
|
66
|
-
export type AcquiringFormParamsDef =
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
export type AcquiringFormParamsDef = TitleProps &
|
|
61
|
+
CommonApplicationFormProps & {
|
|
62
|
+
/** @default ApplicationFormAcquiring */
|
|
63
|
+
formType: 'ApplicationFormAcquiring';
|
|
64
|
+
};
|
|
69
65
|
|
|
70
66
|
/**
|
|
71
67
|
* @title Грантовая поддержка
|
|
72
|
-
* @default {"formType": "ApplicationFormGrantSupport"}
|
|
73
68
|
*/
|
|
74
|
-
export type GrantSupportFormParamsDef =
|
|
69
|
+
export type GrantSupportFormParamsDef = TitleProps & {
|
|
70
|
+
/** @default ApplicationFormGrantSupport */
|
|
75
71
|
formType: 'ApplicationFormGrantSupport';
|
|
72
|
+
button?: SubmitButtonProps;
|
|
76
73
|
/** @title Адрес справочника */
|
|
77
74
|
sourceBookDir?: string;
|
|
78
75
|
};
|
|
79
76
|
|
|
77
|
+
/**
|
|
78
|
+
* @title Настройки формы
|
|
79
|
+
*/
|
|
80
|
+
export type ApplicationFormBlockDef =
|
|
81
|
+
| BusinessCardFormParamsDef
|
|
82
|
+
| WedFormParamsDef
|
|
83
|
+
| DepositFormParamsDef
|
|
84
|
+
| CreditFormParamsDef
|
|
85
|
+
| AcquiringFormParamsDef
|
|
86
|
+
| GrantSupportFormParamsDef;
|
|
87
|
+
|
|
80
88
|
/**
|
|
81
89
|
* @title Форма заявки
|
|
82
90
|
*/
|
package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { AlignProps, HeadlineCommonProps } from '../../model/HeadlineType';
|
|
|
2
2
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
3
|
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
4
|
import type { IconProps } from '../../model/Picture';
|
|
5
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
6
5
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
6
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
7
|
|
|
8
8
|
export type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonContent;
|
|
9
9
|
|
|
@@ -3,9 +3,14 @@ import type { BlockDef, Slot } from '../../model/ContentPageDef';
|
|
|
3
3
|
import { mapSlot } from './mapSlot';
|
|
4
4
|
|
|
5
5
|
export function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S {
|
|
6
|
-
const { mobile, ...
|
|
6
|
+
const { mobile, ...desktop } = (block || {}) as BlockDef;
|
|
7
7
|
const result = mobile
|
|
8
|
-
?
|
|
8
|
+
? Object.assign(
|
|
9
|
+
{},
|
|
10
|
+
desktop,
|
|
11
|
+
mobile.style ? { style: mobile.style } : {},
|
|
12
|
+
mobile.content ? { content: mobile.content } : {},
|
|
13
|
+
)
|
|
9
14
|
: block;
|
|
10
15
|
|
|
11
16
|
return mapSlot(filterBlocks(blocksRegistry))(result || {}) as S;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
2
3
|
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
3
4
|
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import { projectSettings } from '../../ProjectSettings';
|
|
5
5
|
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
6
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
7
|
import { Button } from '../../ui-kit/Button/Button';
|
|
@@ -9,12 +9,12 @@ import { LinkList } from '../../ui-kit/LinkList/LinkList';
|
|
|
9
9
|
import { Text } from '../../ui-kit/Text/Text';
|
|
10
10
|
import { RollupItem } from '../RollupItem/RollupItem';
|
|
11
11
|
import { Contacts } from './Contacts';
|
|
12
|
-
import { findIconByHref } from './findIconByHref';
|
|
13
12
|
import type { FooterDataProps } from './FooterDataProps';
|
|
14
13
|
import type { FooterProps } from './FooterProps';
|
|
15
14
|
import { HorizontalNavigation } from './HorizontalNavigation';
|
|
16
15
|
import { SocialMedia } from './SocialMedia';
|
|
17
16
|
import { TextInformation } from './TextInformation';
|
|
17
|
+
import { findIconByHref } from './findIconByHref';
|
|
18
18
|
|
|
19
19
|
export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
20
20
|
const fallback = rest.options?.page?.fallback;
|
|
@@ -26,7 +26,7 @@ export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
|
26
26
|
mobileApps,
|
|
27
27
|
horizontalNavigationTitle,
|
|
28
28
|
documents,
|
|
29
|
-
} = useSWRResource<FooterDataProps>(projectSettings.FOOTER || 'footer', fallback);
|
|
29
|
+
} = useSWRResource<FooterDataProps>(projectSettings.FOOTER || 'footer', { fallback });
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<BlockWrapper tag="footer" className={className} {...rest}>
|
|
@@ -4,12 +4,13 @@ import { ActiveSubMenuItem } from './ActiveSubMenuItem';
|
|
|
4
4
|
|
|
5
5
|
interface ActiveSubMenuProps {
|
|
6
6
|
activeMenuSubItems?: LinkProps[];
|
|
7
|
+
basePath?: string;
|
|
7
8
|
}
|
|
8
|
-
export const ActiveSubMenu = JSX<ActiveSubMenuProps>(({ activeMenuSubItems }) => {
|
|
9
|
+
export const ActiveSubMenu = JSX<ActiveSubMenuProps>(({ activeMenuSubItems, basePath }) => {
|
|
9
10
|
return activeMenuSubItems ? (
|
|
10
11
|
<div className="mb-5">
|
|
11
12
|
{activeMenuSubItems.map((_, i) => (
|
|
12
|
-
<ActiveSubMenuItem item={_}
|
|
13
|
+
<ActiveSubMenuItem item={_} key={String(i)} basePath={basePath} />
|
|
13
14
|
))}
|
|
14
15
|
</div>
|
|
15
16
|
) : null;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import
|
|
2
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
3
3
|
import { useLink } from '../../hooks/useLink';
|
|
4
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
4
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
5
6
|
|
|
6
7
|
interface ActiveSubMenuItemProps {
|
|
7
8
|
item: LinkProps;
|
|
8
|
-
|
|
9
|
+
basePath?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export const ActiveSubMenuItem = JSX<ActiveSubMenuItemProps>(({ item,
|
|
12
|
-
const
|
|
12
|
+
export const ActiveSubMenuItem = JSX<ActiveSubMenuItemProps>(({ item, basePath }) => {
|
|
13
|
+
const isAnotherPortal =
|
|
14
|
+
projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
15
|
+
|
|
16
|
+
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
13
17
|
const { href, target, onClick } = link(item);
|
|
14
18
|
|
|
15
19
|
return (
|
|
16
20
|
<a
|
|
17
|
-
key={`subItems-${String(i)}`}
|
|
18
21
|
className="py-3 text-h5 font-light flex justify-between cursor-pointer"
|
|
19
22
|
href={href}
|
|
20
23
|
target={target}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import type { RefObject } from 'react';
|
|
4
|
+
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
2
5
|
import { useLocation } from '../../hooks/useLocation';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
6
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
7
|
+
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
8
|
+
import { Dialog } from '../../ui-kit/DialogManager/Dialog';
|
|
7
9
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
10
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
8
11
|
import { useLocationDialog } from '../../ui-kit/LocationDialog/useLocationDialog';
|
|
12
|
+
import { SearchBar } from '../../ui-kit/SearchBar/SearchBar';
|
|
9
13
|
import { SwipeListContainer } from '../../ui-kit/SwipeListControl/SwipeListContainer';
|
|
10
14
|
import { useSwipeListScroll } from '../../ui-kit/SwipeListControl/useSwipeListScroll';
|
|
11
|
-
import {
|
|
12
|
-
import { TopItemMobile } from './TopItemMobile';
|
|
15
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
13
16
|
import { ActiveSubMenu } from './ActiveSubMenu';
|
|
14
|
-
import {
|
|
15
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
16
|
-
import type { RefObject } from 'react';
|
|
17
|
-
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
17
|
+
import { TopItemMobile } from './TopItemMobile';
|
|
18
18
|
|
|
19
19
|
interface BurgerMenuDialogProps extends UniBlockProps {
|
|
20
20
|
containerRef?: RefObject<HTMLDivElement>;
|
|
@@ -25,19 +25,26 @@ export const BurgerMenuDialog = JSX<BurgerMenuDialogProps>((props) => {
|
|
|
25
25
|
const [location] = useLocation(defaultLocation);
|
|
26
26
|
const locationDialog = useLocationDialog();
|
|
27
27
|
const openLocationDialog = useCallback(() => locationDialog.open(), []);
|
|
28
|
-
const itemCount = Array.isArray(topItems) ? topItems.length : 0;
|
|
29
28
|
const [containerRef, scroll] = useSwipeListScroll<HTMLDivElement>({
|
|
30
|
-
itemCount,
|
|
29
|
+
itemCount: topItems?.length ?? 0,
|
|
31
30
|
});
|
|
32
|
-
const [
|
|
31
|
+
const [activeIndex] = useActiveRoute(topItems);
|
|
32
|
+
const [activeTopItemIndex, setActiveTopItemIndex] = useState(activeIndex);
|
|
33
|
+
const activeRoute = useMemo(() => topItems?.[activeTopItemIndex], [topItems, activeTopItemIndex]);
|
|
33
34
|
const activeMenuSubItems = activeRoute?.items || [];
|
|
34
35
|
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
setActiveTopItemIndex(activeIndex);
|
|
38
|
+
}, [activeIndex]);
|
|
39
|
+
|
|
35
40
|
useEffect(() => {
|
|
36
41
|
if (activeTopItemIndex > 0) {
|
|
37
42
|
scroll.scrollTo(activeTopItemIndex);
|
|
38
43
|
}
|
|
39
44
|
}, [activeTopItemIndex, scroll]);
|
|
40
45
|
|
|
46
|
+
const handleTopItemClick = useCallback((idx: number) => setActiveTopItemIndex(idx), []);
|
|
47
|
+
|
|
41
48
|
return (
|
|
42
49
|
<Dialog
|
|
43
50
|
head={
|
|
@@ -55,12 +62,17 @@ export const BurgerMenuDialog = JSX<BurgerMenuDialogProps>((props) => {
|
|
|
55
62
|
className="pb-3"
|
|
56
63
|
>
|
|
57
64
|
{topItems?.map((item, i) => (
|
|
58
|
-
<TopItemMobile
|
|
65
|
+
<TopItemMobile
|
|
66
|
+
item={item}
|
|
67
|
+
key={String(i)}
|
|
68
|
+
isActive={activeTopItemIndex === i}
|
|
69
|
+
onClick={() => handleTopItemClick(i)}
|
|
70
|
+
/>
|
|
59
71
|
))}
|
|
60
72
|
</SwipeListContainer>
|
|
61
73
|
</div>
|
|
62
74
|
<div className="relative grow overflow-auto">
|
|
63
|
-
<ActiveSubMenu activeMenuSubItems={activeMenuSubItems} />
|
|
75
|
+
<ActiveSubMenu activeMenuSubItems={activeMenuSubItems} basePath={activeRoute?.href} />
|
|
64
76
|
<SearchBar className="grow mb-5" />
|
|
65
77
|
{renderOfficeLink(officesLink)}
|
|
66
78
|
<div className="flex items-center text-s cursor-pointer" onClick={openLocationDialog}>
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import
|
|
3
|
-
import { style } from '../../utils/style';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
2
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
5
3
|
import { useLink } from '../../hooks/useLink';
|
|
6
|
-
import
|
|
4
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
import type { MenuItemProps } from './StickyBottomMenuProps';
|
|
7
7
|
|
|
8
|
-
interface RenderItemProps
|
|
8
|
+
interface RenderItemProps {
|
|
9
9
|
item: MenuItemProps;
|
|
10
|
-
idx: number;
|
|
11
10
|
onClick?: () => void;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
|
|
13
|
+
export const RenderItem = JSX<RenderItemProps>(({ item, onClick }) => {
|
|
14
|
+
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
15
|
+
? !item.url?.startsWith(projectSettings?.BASE_PATH)
|
|
16
|
+
: true;
|
|
17
|
+
|
|
18
|
+
const link = useLink({ isRemote: isAnotherPortal });
|
|
15
19
|
const {
|
|
16
20
|
href,
|
|
17
21
|
target,
|
|
@@ -23,7 +27,6 @@ export const RenderItem = JSX<RenderItemProps>(({ item, idx, onClick }) => {
|
|
|
23
27
|
|
|
24
28
|
return (
|
|
25
29
|
<a
|
|
26
|
-
key={`menuItems-${String(idx)}`}
|
|
27
30
|
className={style(
|
|
28
31
|
item.isActive ? 'text-primary-main' : 'text-primary-text',
|
|
29
32
|
`w-10 m-4 flex justify-center items-center flex-col text-[10px] cursor-pointer`,
|
|
@@ -35,8 +38,8 @@ export const RenderItem = JSX<RenderItemProps>(({ item, idx, onClick }) => {
|
|
|
35
38
|
<Img
|
|
36
39
|
className="w-6 h-6"
|
|
37
40
|
image={{
|
|
38
|
-
icon: item
|
|
39
|
-
iconVersion: item
|
|
41
|
+
icon: item?.icon?.icon,
|
|
42
|
+
iconVersion: item?.icon?.iconVersion || 'black',
|
|
40
43
|
}}
|
|
41
44
|
/>
|
|
42
45
|
{item.title}
|
|
@@ -10,8 +10,7 @@ import { useBurgerMenuDialog } from './useBurgerMenuDialog';
|
|
|
10
10
|
export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
11
11
|
const { menuItems = [] } = useSWRResource<StickyBottomMenuProps>(
|
|
12
12
|
projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu',
|
|
13
|
-
rest.options?.page?.fallback,
|
|
14
|
-
'portal-resources',
|
|
13
|
+
{ fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true },
|
|
15
14
|
);
|
|
16
15
|
|
|
17
16
|
const [isBurgerMenuDialogOpen, { toggle }] = useBurgerMenuDialog();
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
import type { TopMenuItemProps } from '../../services/sitemap/SitemapData';
|
|
2
|
+
import { PreventableEvent } from '../../ui-kit/PreventableEvent';
|
|
2
3
|
import { style } from '../../utils/style';
|
|
3
|
-
import { useLink } from '../../hooks/useLink';
|
|
4
4
|
|
|
5
5
|
interface TopItemProps {
|
|
6
6
|
item: TopMenuItemProps;
|
|
7
|
-
i: number;
|
|
8
7
|
isActive: boolean;
|
|
8
|
+
onClick: (ev?: PreventableEvent) => void;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const TopItemMobile = ({ item,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className="relative"
|
|
22
|
-
aria-label={item.text}
|
|
23
|
-
>
|
|
24
|
-
<span className={style('whitespace-nowrap', isActive ? 'text-primary-main' : '')}>
|
|
25
|
-
{item.text}
|
|
26
|
-
</span>
|
|
27
|
-
{isActive ? (
|
|
28
|
-
<div className="absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" />
|
|
29
|
-
) : null}
|
|
30
|
-
</a>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
11
|
+
export const TopItemMobile = ({ item, isActive, onClick }: TopItemProps) => (
|
|
12
|
+
<button type="button" onClick={onClick}>
|
|
13
|
+
<span className={style('whitespace-nowrap', isActive ? 'text-primary-main' : '')}>
|
|
14
|
+
{item.text}
|
|
15
|
+
</span>
|
|
16
|
+
{isActive ? (
|
|
17
|
+
<div className="absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" />
|
|
18
|
+
) : null}
|
|
19
|
+
</button>
|
|
20
|
+
);
|
|
@@ -6,7 +6,7 @@ export const renderMenuItems = (menuItems: MenuItemProps[], onClick?: () => void
|
|
|
6
6
|
<BlockWrapper className="sticky bottom-0 left-0 right-0 bg-transparent z-[100]" padding="p-0">
|
|
7
7
|
<div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
|
|
8
8
|
{menuItems.map((_, i) => (
|
|
9
|
-
<RenderItem item={_}
|
|
9
|
+
<RenderItem item={_} key={String(i)} onClick={onClick} />
|
|
10
10
|
))}
|
|
11
11
|
</div>
|
|
12
12
|
</BlockWrapper>
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
|
+
import { projectSettings } from '../ProjectSettings';
|
|
2
3
|
import type { Fallback } from '../model/Fallback';
|
|
3
4
|
import { fetchJSONUnsafe } from '../utils/fetchJSON';
|
|
5
|
+
import { joinPath } from '../utils/url';
|
|
4
6
|
|
|
5
7
|
const EMPTY_VALUE = {};
|
|
6
8
|
const DEFAULT_FOLDER_NAME = 'wcms-resources';
|
|
7
9
|
|
|
10
|
+
interface SWRResourceOptions {
|
|
11
|
+
fallback?: Fallback;
|
|
12
|
+
folderName?: string;
|
|
13
|
+
setBasePath?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
export function useSWRResource<Data>(
|
|
9
17
|
filename: string | null | undefined,
|
|
10
|
-
|
|
11
|
-
folderName: string = DEFAULT_FOLDER_NAME,
|
|
18
|
+
options: SWRResourceOptions = {},
|
|
12
19
|
): Data {
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
const { fallback = EMPTY_VALUE, folderName = DEFAULT_FOLDER_NAME, setBasePath = false } = options;
|
|
21
|
+
|
|
22
|
+
const path = joinPath(
|
|
23
|
+
setBasePath ? projectSettings.BASE_PATH : '',
|
|
24
|
+
folderName,
|
|
25
|
+
`${filename}.json`,
|
|
17
26
|
);
|
|
18
27
|
|
|
28
|
+
const { data } = useAsyncData<Data, any, string | null>(filename ? path : null, fetchJSONUnsafe, {
|
|
29
|
+
fallback,
|
|
30
|
+
});
|
|
31
|
+
|
|
19
32
|
return data || (EMPTY_VALUE as Data);
|
|
20
33
|
}
|
|
@@ -4,4 +4,4 @@ import { projectSettings } from '../../ProjectSettings';
|
|
|
4
4
|
import type { SitemapData } from './SitemapData';
|
|
5
5
|
|
|
6
6
|
export const useSitemap = (fallback?: Fallback) =>
|
|
7
|
-
useSWRResource<SitemapData>(projectSettings.SITEMAP || 'sitemap', fallback);
|
|
7
|
+
useSWRResource<SitemapData>(projectSettings.SITEMAP || 'sitemap', { fallback });
|
|
@@ -70,9 +70,13 @@ export const useSwipeListScroll = <E extends HTMLElement>({
|
|
|
70
70
|
}, [itemCount, canScrollRight]);
|
|
71
71
|
|
|
72
72
|
const scrollTo = useCallback(
|
|
73
|
-
(idx) => {
|
|
73
|
+
(idx: number) => {
|
|
74
74
|
if (containerRef?.current) {
|
|
75
|
-
containerRef.current.children[idx]?.scrollIntoView(
|
|
75
|
+
containerRef.current.children[idx]?.scrollIntoView({
|
|
76
|
+
behavior: 'smooth',
|
|
77
|
+
block: 'nearest',
|
|
78
|
+
inline: 'center',
|
|
79
|
+
});
|
|
76
80
|
}
|
|
77
81
|
},
|
|
78
82
|
[containerRef],
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"content": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"formBlock": {
|
|
4
|
+
"button": {
|
|
5
|
+
"text": "Отправить заявку",
|
|
6
|
+
"version": "primary"
|
|
7
|
+
},
|
|
8
|
+
"formType": "ApplicationFormBusinessCard"
|
|
5
9
|
},
|
|
6
|
-
"typeForm": "credit",
|
|
7
10
|
"version": "primary"
|
|
8
11
|
}
|
|
9
12
|
}
|