@redneckz/wildless-cms-uni-blocks 0.3.48 → 0.3.49
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 +5 -3
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/GracePeriod/GracePeriod.js +5 -3
- package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriodContent.d.ts +14 -3
- package/lib/components/GracePeriod/GracePeriod.js +5 -3
- package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriodContent.d.ts +14 -3
- package/mobile/dist/components/GracePeriod/GracePeriod.js +5 -3
- package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +14 -3
- package/mobile/lib/components/GracePeriod/GracePeriod.js +5 -3
- package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +14 -3
- package/mobile/src/components/GracePeriod/GracePeriod.example.json +10 -5
- package/mobile/src/components/GracePeriod/GracePeriod.tsx +12 -6
- package/mobile/src/components/GracePeriod/GracePeriodContent.ts +14 -3
- package/package.json +1 -1
- package/src/components/GracePeriod/GracePeriod.example.json +10 -5
- package/src/components/GracePeriod/GracePeriod.tsx +12 -6
- package/src/components/GracePeriod/GracePeriodContent.ts +14 -3
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
interface Month {
|
|
4
3
|
/** @title Название месяца */
|
|
5
4
|
name?: string;
|
|
6
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @title Изображение календарного месяца
|
|
7
|
+
* @default
|
|
8
|
+
* {
|
|
9
|
+
* format: "webp",
|
|
10
|
+
* size: {
|
|
11
|
+
* width: 210,
|
|
12
|
+
* height: 190
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
7
16
|
image?: Picture;
|
|
8
17
|
}
|
|
9
18
|
interface CalendarItem {
|
|
@@ -17,7 +26,9 @@ interface CalendarItem {
|
|
|
17
26
|
/**
|
|
18
27
|
* @title Льготный период
|
|
19
28
|
*/
|
|
20
|
-
export interface GracePeriodContent
|
|
29
|
+
export interface GracePeriodContent {
|
|
30
|
+
/** @title Заголовок */
|
|
31
|
+
title?: string;
|
|
21
32
|
/** @title Описание */
|
|
22
33
|
description?: string;
|
|
23
34
|
/** @title Календарь */
|
|
@@ -8,13 +8,15 @@ exports.GracePeriod = (0, uni_jsx_1.JSX)(({ className = '', title, description,
|
|
|
8
8
|
return ((0, jsx_runtime_1.jsxs)("section", { className: `bg-white p-16 pt-12 ${className}`, id: anchor, children: [(0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h2", className: "text-center", title: title }), (0, jsx_runtime_1.jsx)("div", { className: "font-light text-base-md text-center mt-3", children: description }), calendar ? renderCalendar(calendar) : null] }));
|
|
9
9
|
});
|
|
10
10
|
const renderCalendar = (calendar) => {
|
|
11
|
-
const colCount = calendar.reduce((accumulator, currentValue) => accumulator + currentValue.month.length, 0) || 1;
|
|
11
|
+
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
12
12
|
const colSize = 100 / colCount;
|
|
13
|
-
const mappedCalendar = calendar
|
|
13
|
+
const mappedCalendar = calendar
|
|
14
|
+
.filter((_) => _?.month?.length)
|
|
15
|
+
.map((_) => ({
|
|
14
16
|
..._,
|
|
15
17
|
flexBasis: `${_.month.length * colSize}%`,
|
|
16
18
|
}));
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "w-full flex flex-col justify-center mt-14", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex w-full mb-3 font-light text-m-title-md
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "w-full flex flex-col justify-center mt-14", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex w-full mb-3 font-light text-m-title-md text-center", children: mappedCalendar.map((_) => renderMonthNames(_, colSize)) }), (0, jsx_runtime_1.jsx)("div", { className: "flex w-full", children: mappedCalendar.map((_, ind) => ((0, jsx_runtime_1.jsxs)("div", { className: "pr-3 mr-3 border-r border-r-gray/100 last:border-r-0 last:pr-0 last:mr-0", style: { flexBasis: _.flexBasis }, children: [(0, jsx_runtime_1.jsx)("div", { className: "flex", children: renderMonthImages(_) }), (0, jsx_runtime_1.jsxs)("div", { className: "font-light text-sm text-primary-text mt-3", children: [(0, jsx_runtime_1.jsx)("span", { children: _.blackText }), "\u2009", (0, jsx_runtime_1.jsx)("span", { className: "text-primary-main", children: _.greenText })] })] }, `monthItem-${ind}`))) })] }));
|
|
18
20
|
};
|
|
19
21
|
const renderMonthNames = (item, colSize) => item.month.map((_) => ((0, jsx_runtime_1.jsx)("div", { style: { flexBasis: `${colSize}%` }, children: _.name }, `monthName-${_.name}`)));
|
|
20
22
|
const renderMonthImages = (item) => item.month.map((_) => _.image?.src ? ((0, jsx_runtime_1.jsx)("div", { className: "max-h-[207px] border-r-[1px] pr-3 mr-3 border-r-gray/100 last:border-r-0 last:pr-0 last:mr-0", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GracePeriod.js","sourceRoot":"","sources":["../../../src/components/GracePeriod/GracePeriod.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,0DAAuD;AACvD,8CAA2C;AAI9B,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE;I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CACzC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,gCAAiC,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,OAAO,GAAG,EAAE,YACjE,CAAC,CAAC,IAAI,IADC,aAAa,CAAC,CAAC,IAAI,EAAE,CAEzB,CACP,CAAC,CAAC;AACL,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,EAAE,CACjC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACnB,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CACb,gCAEE,SAAS,EAAC,8FAA8F,YAExG,uBAAC,SAAG,IAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,IAHnC,cAAc,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAI5B,CACP,CAAC,CAAC,CAAC,IAAI,CACT,CAAC"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
interface Month {
|
|
4
3
|
/** @title Название месяца */
|
|
5
4
|
name?: string;
|
|
6
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @title Изображение календарного месяца
|
|
7
|
+
* @default
|
|
8
|
+
* {
|
|
9
|
+
* format: "webp",
|
|
10
|
+
* size: {
|
|
11
|
+
* width: 210,
|
|
12
|
+
* height: 190
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
7
16
|
image?: Picture;
|
|
8
17
|
}
|
|
9
18
|
interface CalendarItem {
|
|
@@ -17,7 +26,9 @@ interface CalendarItem {
|
|
|
17
26
|
/**
|
|
18
27
|
* @title Льготный период
|
|
19
28
|
*/
|
|
20
|
-
export interface GracePeriodContent
|
|
29
|
+
export interface GracePeriodContent {
|
|
30
|
+
/** @title Заголовок */
|
|
31
|
+
title?: string;
|
|
21
32
|
/** @title Описание */
|
|
22
33
|
description?: string;
|
|
23
34
|
/** @title Календарь */
|
|
@@ -6,13 +6,15 @@ export const GracePeriod = JSX(({ className = '', title, description, calendar,
|
|
|
6
6
|
return (_jsxs("section", { className: `bg-white p-16 pt-12 ${className}`, id: anchor, children: [_jsx(Heading, { headingType: "h2", className: "text-center", title: title }), _jsx("div", { className: "font-light text-base-md text-center mt-3", children: description }), calendar ? renderCalendar(calendar) : null] }));
|
|
7
7
|
});
|
|
8
8
|
const renderCalendar = (calendar) => {
|
|
9
|
-
const colCount = calendar.reduce((accumulator, currentValue) => accumulator + currentValue.month.length, 0) || 1;
|
|
9
|
+
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
10
10
|
const colSize = 100 / colCount;
|
|
11
|
-
const mappedCalendar = calendar
|
|
11
|
+
const mappedCalendar = calendar
|
|
12
|
+
.filter((_) => _?.month?.length)
|
|
13
|
+
.map((_) => ({
|
|
12
14
|
..._,
|
|
13
15
|
flexBasis: `${_.month.length * colSize}%`,
|
|
14
16
|
}));
|
|
15
|
-
return (_jsxs("div", { className: "w-full flex flex-col justify-center mt-14", children: [_jsx("div", { className: "flex w-full mb-3 font-light text-m-title-md
|
|
17
|
+
return (_jsxs("div", { className: "w-full flex flex-col justify-center mt-14", children: [_jsx("div", { className: "flex w-full mb-3 font-light text-m-title-md text-center", children: mappedCalendar.map((_) => renderMonthNames(_, colSize)) }), _jsx("div", { className: "flex w-full", children: mappedCalendar.map((_, ind) => (_jsxs("div", { className: "pr-3 mr-3 border-r border-r-gray/100 last:border-r-0 last:pr-0 last:mr-0", style: { flexBasis: _.flexBasis }, children: [_jsx("div", { className: "flex", children: renderMonthImages(_) }), _jsxs("div", { className: "font-light text-sm text-primary-text mt-3", children: [_jsx("span", { children: _.blackText }), "\u2009", _jsx("span", { className: "text-primary-main", children: _.greenText })] })] }, `monthItem-${ind}`))) })] }));
|
|
16
18
|
};
|
|
17
19
|
const renderMonthNames = (item, colSize) => item.month.map((_) => (_jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.name }, `monthName-${_.name}`)));
|
|
18
20
|
const renderMonthImages = (item) => item.month.map((_) => _.image?.src ? (_jsx("div", { className: "max-h-[207px] border-r-[1px] pr-3 mr-3 border-r-gray/100 last:border-r-0 last:pr-0 last:mr-0", children: _jsx(Img, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GracePeriod.js","sourceRoot":"","sources":["../../../src/components/GracePeriod/GracePeriod.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAI3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE;IAClE,OAAO,CACL,mBAAS,SAAS,EAAE,uBAAuB,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,aAChE,KAAC,OAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,GAAI,EAClE,cAAK,SAAS,EAAC,0CAA0C,YAAE,WAAW,GAAO,EAC5E,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,IACnC,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,EAAE;IAClC,MAAM,QAAQ,GACZ,QAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"GracePeriod.js","sourceR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CAAC,CACb,cAEE,SAAS,EAAC,8FAA8F,YAExG,KAAC,GAAG,IAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,IAHnC,cAAc,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAI5B,CACP,CAAC,CAAC,CAAC,IAAI,CACT,CAAC"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
interface Month {
|
|
4
3
|
/** @title Название месяца */
|
|
5
4
|
name?: string;
|
|
6
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @title Изображение календарного месяца
|
|
7
|
+
* @default
|
|
8
|
+
* {
|
|
9
|
+
* format: "webp",
|
|
10
|
+
* size: {
|
|
11
|
+
* width: 210,
|
|
12
|
+
* height: 190
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
7
16
|
image?: Picture;
|
|
8
17
|
}
|
|
9
18
|
interface CalendarItem {
|
|
@@ -17,7 +26,9 @@ interface CalendarItem {
|
|
|
17
26
|
/**
|
|
18
27
|
* @title Льготный период
|
|
19
28
|
*/
|
|
20
|
-
export interface GracePeriodContent
|
|
29
|
+
export interface GracePeriodContent {
|
|
30
|
+
/** @title Заголовок */
|
|
31
|
+
title?: string;
|
|
21
32
|
/** @title Описание */
|
|
22
33
|
description?: string;
|
|
23
34
|
/** @title Календарь */
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"src": "calendar/august.png",
|
|
13
13
|
"format": "webp",
|
|
14
14
|
"size": {
|
|
15
|
-
"width": 210
|
|
15
|
+
"width": 210,
|
|
16
|
+
"height": 190
|
|
16
17
|
},
|
|
17
18
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
18
19
|
}
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
"src": "calendar/september.png",
|
|
30
31
|
"format": "webp",
|
|
31
32
|
"size": {
|
|
32
|
-
"width": 210
|
|
33
|
+
"width": 210,
|
|
34
|
+
"height": 190
|
|
33
35
|
},
|
|
34
36
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
35
37
|
}
|
|
@@ -40,7 +42,8 @@
|
|
|
40
42
|
"src": "calendar/october.png",
|
|
41
43
|
"format": "webp",
|
|
42
44
|
"size": {
|
|
43
|
-
"width": 210
|
|
45
|
+
"width": 210,
|
|
46
|
+
"height": 190
|
|
44
47
|
},
|
|
45
48
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
46
49
|
}
|
|
@@ -57,7 +60,8 @@
|
|
|
57
60
|
"src": "calendar/november.png",
|
|
58
61
|
"format": "webp",
|
|
59
62
|
"size": {
|
|
60
|
-
"width": 210
|
|
63
|
+
"width": 210,
|
|
64
|
+
"height": 190
|
|
61
65
|
},
|
|
62
66
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
63
67
|
}
|
|
@@ -74,7 +78,8 @@
|
|
|
74
78
|
"src": "calendar/december.png",
|
|
75
79
|
"format": "webp",
|
|
76
80
|
"size": {
|
|
77
|
-
"width": 210
|
|
81
|
+
"width": 210,
|
|
82
|
+
"height": 190
|
|
78
83
|
},
|
|
79
84
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
80
85
|
}
|
|
@@ -21,17 +21,23 @@ export const GracePeriod = JSX<GracePeriodProps>(
|
|
|
21
21
|
|
|
22
22
|
const renderCalendar = (calendar) => {
|
|
23
23
|
const colCount =
|
|
24
|
-
calendar.reduce(
|
|
24
|
+
calendar.reduce(
|
|
25
|
+
(accumulator, currentValue) =>
|
|
26
|
+
currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator,
|
|
27
|
+
0,
|
|
28
|
+
) || 1;
|
|
25
29
|
const colSize = 100 / colCount;
|
|
26
30
|
|
|
27
|
-
const mappedCalendar = calendar
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
const mappedCalendar = calendar
|
|
32
|
+
.filter((_) => _?.month?.length)
|
|
33
|
+
.map((_) => ({
|
|
34
|
+
..._,
|
|
35
|
+
flexBasis: `${_.month.length * colSize}%`,
|
|
36
|
+
}));
|
|
31
37
|
|
|
32
38
|
return (
|
|
33
39
|
<div className="w-full flex flex-col justify-center mt-14">
|
|
34
|
-
<div className="flex w-full mb-3 font-light text-m-title-md
|
|
40
|
+
<div className="flex w-full mb-3 font-light text-m-title-md text-center">
|
|
35
41
|
{mappedCalendar.map((_) => renderMonthNames(_, colSize))}
|
|
36
42
|
</div>
|
|
37
43
|
<div className="flex w-full">
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
|
|
4
3
|
interface Month {
|
|
5
4
|
/** @title Название месяца */
|
|
6
5
|
name?: string;
|
|
7
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title Изображение календарного месяца
|
|
8
|
+
* @default
|
|
9
|
+
* {
|
|
10
|
+
* format: "webp",
|
|
11
|
+
* size: {
|
|
12
|
+
* width: 210,
|
|
13
|
+
* height: 190
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
8
17
|
image?: Picture;
|
|
9
18
|
}
|
|
10
19
|
|
|
@@ -20,7 +29,9 @@ interface CalendarItem {
|
|
|
20
29
|
/**
|
|
21
30
|
* @title Льготный период
|
|
22
31
|
*/
|
|
23
|
-
export interface GracePeriodContent
|
|
32
|
+
export interface GracePeriodContent {
|
|
33
|
+
/** @title Заголовок */
|
|
34
|
+
title?: string;
|
|
24
35
|
/** @title Описание */
|
|
25
36
|
description?: string;
|
|
26
37
|
/** @title Календарь */
|
package/package.json
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"src": "calendar/august.png",
|
|
13
13
|
"format": "webp",
|
|
14
14
|
"size": {
|
|
15
|
-
"width": 210
|
|
15
|
+
"width": 210,
|
|
16
|
+
"height": 190
|
|
16
17
|
},
|
|
17
18
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
18
19
|
}
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
"src": "calendar/september.png",
|
|
30
31
|
"format": "webp",
|
|
31
32
|
"size": {
|
|
32
|
-
"width": 210
|
|
33
|
+
"width": 210,
|
|
34
|
+
"height": 190
|
|
33
35
|
},
|
|
34
36
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
35
37
|
}
|
|
@@ -40,7 +42,8 @@
|
|
|
40
42
|
"src": "calendar/october.png",
|
|
41
43
|
"format": "webp",
|
|
42
44
|
"size": {
|
|
43
|
-
"width": 210
|
|
45
|
+
"width": 210,
|
|
46
|
+
"height": 190
|
|
44
47
|
},
|
|
45
48
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
46
49
|
}
|
|
@@ -57,7 +60,8 @@
|
|
|
57
60
|
"src": "calendar/november.png",
|
|
58
61
|
"format": "webp",
|
|
59
62
|
"size": {
|
|
60
|
-
"width": 210
|
|
63
|
+
"width": 210,
|
|
64
|
+
"height": 190
|
|
61
65
|
},
|
|
62
66
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
63
67
|
}
|
|
@@ -74,7 +78,8 @@
|
|
|
74
78
|
"src": "calendar/december.png",
|
|
75
79
|
"format": "webp",
|
|
76
80
|
"size": {
|
|
77
|
-
"width": 210
|
|
81
|
+
"width": 210,
|
|
82
|
+
"height": 190
|
|
78
83
|
},
|
|
79
84
|
"alt": "Пример использования «Карты для покупок в рассрочку»"
|
|
80
85
|
}
|
|
@@ -21,17 +21,23 @@ export const GracePeriod = JSX<GracePeriodProps>(
|
|
|
21
21
|
|
|
22
22
|
const renderCalendar = (calendar) => {
|
|
23
23
|
const colCount =
|
|
24
|
-
calendar.reduce(
|
|
24
|
+
calendar.reduce(
|
|
25
|
+
(accumulator, currentValue) =>
|
|
26
|
+
currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator,
|
|
27
|
+
0,
|
|
28
|
+
) || 1;
|
|
25
29
|
const colSize = 100 / colCount;
|
|
26
30
|
|
|
27
|
-
const mappedCalendar = calendar
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
const mappedCalendar = calendar
|
|
32
|
+
.filter((_) => _?.month?.length)
|
|
33
|
+
.map((_) => ({
|
|
34
|
+
..._,
|
|
35
|
+
flexBasis: `${_.month.length * colSize}%`,
|
|
36
|
+
}));
|
|
31
37
|
|
|
32
38
|
return (
|
|
33
39
|
<div className="w-full flex flex-col justify-center mt-14">
|
|
34
|
-
<div className="flex w-full mb-3 font-light text-m-title-md
|
|
40
|
+
<div className="flex w-full mb-3 font-light text-m-title-md text-center">
|
|
35
41
|
{mappedCalendar.map((_) => renderMonthNames(_, colSize))}
|
|
36
42
|
</div>
|
|
37
43
|
<div className="flex w-full">
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
|
|
4
3
|
interface Month {
|
|
5
4
|
/** @title Название месяца */
|
|
6
5
|
name?: string;
|
|
7
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title Изображение календарного месяца
|
|
8
|
+
* @default
|
|
9
|
+
* {
|
|
10
|
+
* format: "webp",
|
|
11
|
+
* size: {
|
|
12
|
+
* width: 210,
|
|
13
|
+
* height: 190
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
8
17
|
image?: Picture;
|
|
9
18
|
}
|
|
10
19
|
|
|
@@ -20,7 +29,9 @@ interface CalendarItem {
|
|
|
20
29
|
/**
|
|
21
30
|
* @title Льготный период
|
|
22
31
|
*/
|
|
23
|
-
export interface GracePeriodContent
|
|
32
|
+
export interface GracePeriodContent {
|
|
33
|
+
/** @title Заголовок */
|
|
34
|
+
title?: string;
|
|
24
35
|
/** @title Описание */
|
|
25
36
|
description?: string;
|
|
26
37
|
/** @title Календарь */
|