@gravity-ui/page-constructor 2.17.0 → 3.0.0-alpha.0

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.
Files changed (198) hide show
  1. package/CHANGELOG.md +0 -7
  2. package/build/cjs/blocks/index.d.ts +0 -4
  3. package/build/cjs/blocks/index.js +1 -9
  4. package/build/cjs/blocks/validators.d.ts +0 -4
  5. package/build/cjs/blocks/validators.js +0 -4
  6. package/build/cjs/components/index.d.ts +0 -1
  7. package/build/cjs/components/index.js +1 -3
  8. package/build/cjs/constructor-items.d.ts +0 -16
  9. package/build/cjs/constructor-items.js +0 -16
  10. package/build/cjs/hooks/index.d.ts +1 -1
  11. package/build/cjs/hooks/index.js +3 -3
  12. package/build/cjs/models/constructor-items/blocks.d.ts +2 -50
  13. package/build/cjs/models/constructor-items/blocks.js +0 -4
  14. package/build/cjs/models/constructor-items/common.d.ts +0 -14
  15. package/build/cjs/models/constructor-items/common.js +1 -6
  16. package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -46
  17. package/build/cjs/models/constructor-items/sub-blocks.js +2 -11
  18. package/build/cjs/schema/index.js +2 -8
  19. package/build/cjs/schema/validators/blocks.d.ts +0 -4
  20. package/build/cjs/schema/validators/blocks.js +0 -4
  21. package/build/cjs/schema/validators/sub-blocks.d.ts +0 -3
  22. package/build/cjs/schema/validators/sub-blocks.js +0 -3
  23. package/build/cjs/sub-blocks/index.d.ts +0 -3
  24. package/build/cjs/sub-blocks/index.js +1 -7
  25. package/build/cjs/text-transform/{blocks.d.ts → common.d.ts} +1 -4
  26. package/build/cjs/text-transform/common.js +31 -0
  27. package/build/cjs/text-transform/config.d.ts +28 -0
  28. package/build/cjs/text-transform/config.js +291 -0
  29. package/build/cjs/text-transform/index.d.ts +3 -1
  30. package/build/cjs/text-transform/index.js +3 -1
  31. package/build/cjs/text-transform/transformers.d.ts +16 -0
  32. package/build/cjs/text-transform/transformers.js +61 -0
  33. package/build/cjs/utils/index.d.ts +0 -1
  34. package/build/cjs/utils/index.js +0 -1
  35. package/build/esm/blocks/index.d.ts +0 -4
  36. package/build/esm/blocks/index.js +0 -4
  37. package/build/esm/blocks/validators.d.ts +0 -4
  38. package/build/esm/blocks/validators.js +0 -4
  39. package/build/esm/components/index.d.ts +0 -1
  40. package/build/esm/components/index.js +0 -1
  41. package/build/esm/constructor-items.d.ts +0 -16
  42. package/build/esm/constructor-items.js +2 -18
  43. package/build/esm/hooks/index.d.ts +1 -1
  44. package/build/esm/hooks/index.js +1 -1
  45. package/build/esm/models/constructor-items/blocks.d.ts +2 -50
  46. package/build/esm/models/constructor-items/blocks.js +0 -4
  47. package/build/esm/models/constructor-items/common.d.ts +0 -14
  48. package/build/esm/models/constructor-items/common.js +0 -5
  49. package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -46
  50. package/build/esm/models/constructor-items/sub-blocks.js +2 -11
  51. package/build/esm/schema/index.js +4 -10
  52. package/build/esm/schema/validators/blocks.d.ts +0 -4
  53. package/build/esm/schema/validators/blocks.js +0 -4
  54. package/build/esm/schema/validators/sub-blocks.d.ts +0 -3
  55. package/build/esm/schema/validators/sub-blocks.js +0 -3
  56. package/build/esm/sub-blocks/index.d.ts +0 -3
  57. package/build/esm/sub-blocks/index.js +0 -3
  58. package/build/esm/text-transform/{blocks.d.ts → common.d.ts} +1 -4
  59. package/build/esm/text-transform/common.js +25 -0
  60. package/build/esm/text-transform/config.d.ts +28 -0
  61. package/build/esm/text-transform/{blocks.js → config.js} +15 -123
  62. package/build/esm/text-transform/index.d.ts +3 -1
  63. package/build/esm/text-transform/index.js +3 -1
  64. package/build/esm/text-transform/transformers.d.ts +16 -0
  65. package/build/esm/text-transform/transformers.js +56 -0
  66. package/build/esm/utils/index.d.ts +0 -1
  67. package/build/esm/utils/index.js +0 -1
  68. package/package.json +4 -1
  69. package/server/models/constructor-items/blocks.d.ts +2 -50
  70. package/server/models/constructor-items/blocks.js +0 -4
  71. package/server/models/constructor-items/common.d.ts +0 -14
  72. package/server/models/constructor-items/common.js +1 -6
  73. package/server/models/constructor-items/sub-blocks.d.ts +5 -46
  74. package/server/models/constructor-items/sub-blocks.js +2 -11
  75. package/server/text-transform/{blocks.d.ts → common.d.ts} +1 -4
  76. package/server/text-transform/common.js +31 -0
  77. package/server/text-transform/config.d.ts +28 -0
  78. package/server/text-transform/config.js +301 -0
  79. package/server/text-transform/index.d.ts +3 -1
  80. package/server/text-transform/index.js +3 -1
  81. package/server/text-transform/transformers.d.ts +16 -0
  82. package/server/text-transform/transformers.js +63 -0
  83. package/server/utils/index.d.ts +0 -1
  84. package/server/utils/index.js +0 -1
  85. package/build/cjs/blocks/LinkTable/LinkTable.css +0 -3
  86. package/build/cjs/blocks/LinkTable/LinkTable.d.ts +0 -3
  87. package/build/cjs/blocks/LinkTable/LinkTable.js +0 -22
  88. package/build/cjs/blocks/LinkTable/schema.d.ts +0 -77
  89. package/build/cjs/blocks/LinkTable/schema.js +0 -15
  90. package/build/cjs/blocks/Preview/MediaContent/MediaContent.css +0 -50
  91. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +0 -13
  92. package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +0 -49
  93. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.css +0 -106
  94. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -11
  95. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +0 -17
  96. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
  97. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -9
  98. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +0 -13
  99. package/build/cjs/blocks/Preview/Preview.css +0 -50
  100. package/build/cjs/blocks/Preview/Preview.d.ts +0 -3
  101. package/build/cjs/blocks/Preview/Preview.js +0 -130
  102. package/build/cjs/blocks/Preview/schema.d.ts +0 -40
  103. package/build/cjs/blocks/Preview/schema.js +0 -53
  104. package/build/cjs/blocks/Security/Security.css +0 -142
  105. package/build/cjs/blocks/Security/Security.d.ts +0 -3
  106. package/build/cjs/blocks/Security/Security.js +0 -29
  107. package/build/cjs/blocks/Security/schema.d.ts +0 -170
  108. package/build/cjs/blocks/Security/schema.js +0 -32
  109. package/build/cjs/blocks/Simple/Simple.css +0 -22
  110. package/build/cjs/blocks/Simple/Simple.d.ts +0 -3
  111. package/build/cjs/blocks/Simple/Simple.js +0 -22
  112. package/build/cjs/blocks/Simple/schema.d.ts +0 -68
  113. package/build/cjs/blocks/Simple/schema.js +0 -14
  114. package/build/cjs/components/HeightCalculator/HeightCalculator.css +0 -9
  115. package/build/cjs/components/HeightCalculator/HeightCalculator.d.ts +0 -10
  116. package/build/cjs/components/HeightCalculator/HeightCalculator.js +0 -44
  117. package/build/cjs/context/breakpointContext/breakpointContext.d.ts +0 -2
  118. package/build/cjs/context/breakpointContext/breakpointContext.js +0 -7
  119. package/build/cjs/context/breakpointContext/index.d.ts +0 -1
  120. package/build/cjs/context/breakpointContext/index.js +0 -4
  121. package/build/cjs/hooks/useIntersection.d.ts +0 -1
  122. package/build/cjs/hooks/useIntersection.js +0 -21
  123. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.css +0 -19
  124. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -3
  125. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +0 -16
  126. package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +0 -154
  127. package/build/cjs/sub-blocks/CardWithImage/schema.js +0 -46
  128. package/build/cjs/sub-blocks/Partner/Partner.css +0 -8
  129. package/build/cjs/sub-blocks/Partner/Partner.d.ts +0 -3
  130. package/build/cjs/sub-blocks/Partner/Partner.js +0 -15
  131. package/build/cjs/sub-blocks/Partner/schema.d.ts +0 -30
  132. package/build/cjs/sub-blocks/Partner/schema.js +0 -17
  133. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.css +0 -20
  134. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -3
  135. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +0 -23
  136. package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +0 -34
  137. package/build/cjs/sub-blocks/TutorialCard/schema.js +0 -20
  138. package/build/cjs/text-transform/blocks.js +0 -404
  139. package/build/cjs/utils/scroll.d.ts +0 -15
  140. package/build/cjs/utils/scroll.js +0 -35
  141. package/build/esm/blocks/LinkTable/LinkTable.css +0 -3
  142. package/build/esm/blocks/LinkTable/LinkTable.d.ts +0 -4
  143. package/build/esm/blocks/LinkTable/LinkTable.js +0 -21
  144. package/build/esm/blocks/LinkTable/schema.d.ts +0 -77
  145. package/build/esm/blocks/LinkTable/schema.js +0 -12
  146. package/build/esm/blocks/Preview/MediaContent/MediaContent.css +0 -50
  147. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +0 -14
  148. package/build/esm/blocks/Preview/MediaContent/MediaContent.js +0 -47
  149. package/build/esm/blocks/Preview/MediaContent/PreviewContent.css +0 -106
  150. package/build/esm/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -12
  151. package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +0 -15
  152. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
  153. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -10
  154. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +0 -11
  155. package/build/esm/blocks/Preview/Preview.css +0 -50
  156. package/build/esm/blocks/Preview/Preview.d.ts +0 -4
  157. package/build/esm/blocks/Preview/Preview.js +0 -126
  158. package/build/esm/blocks/Preview/schema.d.ts +0 -40
  159. package/build/esm/blocks/Preview/schema.js +0 -50
  160. package/build/esm/blocks/Security/Security.css +0 -142
  161. package/build/esm/blocks/Security/Security.d.ts +0 -4
  162. package/build/esm/blocks/Security/Security.js +0 -25
  163. package/build/esm/blocks/Security/schema.d.ts +0 -170
  164. package/build/esm/blocks/Security/schema.js +0 -28
  165. package/build/esm/blocks/Simple/Simple.css +0 -22
  166. package/build/esm/blocks/Simple/Simple.d.ts +0 -4
  167. package/build/esm/blocks/Simple/Simple.js +0 -18
  168. package/build/esm/blocks/Simple/schema.d.ts +0 -68
  169. package/build/esm/blocks/Simple/schema.js +0 -11
  170. package/build/esm/components/HeightCalculator/HeightCalculator.css +0 -9
  171. package/build/esm/components/HeightCalculator/HeightCalculator.d.ts +0 -11
  172. package/build/esm/components/HeightCalculator/HeightCalculator.js +0 -42
  173. package/build/esm/context/breakpointContext/breakpointContext.d.ts +0 -2
  174. package/build/esm/context/breakpointContext/breakpointContext.js +0 -3
  175. package/build/esm/context/breakpointContext/index.d.ts +0 -1
  176. package/build/esm/context/breakpointContext/index.js +0 -1
  177. package/build/esm/hooks/useIntersection.d.ts +0 -1
  178. package/build/esm/hooks/useIntersection.js +0 -17
  179. package/build/esm/sub-blocks/CardWithImage/CardWithImage.css +0 -19
  180. package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -4
  181. package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +0 -14
  182. package/build/esm/sub-blocks/CardWithImage/schema.d.ts +0 -154
  183. package/build/esm/sub-blocks/CardWithImage/schema.js +0 -43
  184. package/build/esm/sub-blocks/Partner/Partner.css +0 -8
  185. package/build/esm/sub-blocks/Partner/Partner.d.ts +0 -4
  186. package/build/esm/sub-blocks/Partner/Partner.js +0 -13
  187. package/build/esm/sub-blocks/Partner/schema.d.ts +0 -30
  188. package/build/esm/sub-blocks/Partner/schema.js +0 -14
  189. package/build/esm/sub-blocks/TutorialCard/TutorialCard.css +0 -20
  190. package/build/esm/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -4
  191. package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +0 -21
  192. package/build/esm/sub-blocks/TutorialCard/schema.d.ts +0 -34
  193. package/build/esm/sub-blocks/TutorialCard/schema.js +0 -17
  194. package/build/esm/utils/scroll.d.ts +0 -15
  195. package/build/esm/utils/scroll.js +0 -31
  196. package/server/text-transform/blocks.js +0 -417
  197. package/server/utils/scroll.d.ts +0 -15
  198. package/server/utils/scroll.js +0 -35
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useIntersection = void 0;
4
- const react_1 = require("react");
5
- const useIntersection = (element, startMargin = '0px', threshold = 0.2) => {
6
- const [isVisible, setState] = (0, react_1.useState)(false);
7
- (0, react_1.useEffect)(() => {
8
- const observer = new IntersectionObserver(([entry]) => {
9
- setState(entry.isIntersecting);
10
- }, {
11
- rootMargin: startMargin,
12
- threshold,
13
- });
14
- if (element) {
15
- observer.observe(element);
16
- }
17
- return () => element && observer.unobserve(element);
18
- }, [element, startMargin, threshold]);
19
- return isVisible;
20
- };
21
- exports.useIntersection = useIntersection;
@@ -1,19 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-card-with-image__content {
4
- padding-right: 16px;
5
- }
6
- .pc-card-with-image__image {
7
- width: 100%;
8
- display: block;
9
- margin-bottom: 16px;
10
- border-radius: var(--pc-border-radius);
11
- }
12
- .pc-card-with-image__image_border {
13
- border: 1px solid var(--yc-color-line-generic);
14
- }
15
- .pc-card-with-image__image-item {
16
- width: 100%;
17
- display: block;
18
- border-radius: var(--pc-border-radius);
19
- }
@@ -1,3 +0,0 @@
1
- import { CardWithImageProps } from '../../models';
2
- declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }: CardWithImageProps) => JSX.Element;
3
- export default CardWithImage;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importDefault(require("react"));
5
- const __1 = require("../");
6
- const components_1 = require("../../components");
7
- const utils_1 = require("../../utils");
8
- const b = (0, utils_1.block)('card-with-image');
9
- const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }) => {
10
- const unifiedLinks = links === null || links === void 0 ? void 0 : links.map((link) => (Object.assign(Object.assign({ theme: 'normal' }, link), { text: link.title, url: link.link })));
11
- return (react_1.default.createElement("div", { className: b(null, className) },
12
- react_1.default.createElement("div", { className: b('image', { border }) }, fullScreen ? (react_1.default.createElement(components_1.FullscreenImage, { src: image, imageClassName: b('image-item'), disableCompress: disableCompress })) : (react_1.default.createElement(components_1.Image, { className: b('image-item'), src: image, alt: 'card-image', disableCompress: disableCompress }))),
13
- react_1.default.createElement("div", { className: b('content') },
14
- react_1.default.createElement(__1.Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } }))));
15
- };
16
- exports.default = CardWithImage;
@@ -1,154 +0,0 @@
1
- export declare const CardWithImageItem: {
2
- additionalProperties: boolean;
3
- required: string[];
4
- properties: {
5
- image: {
6
- type: string;
7
- };
8
- description: {
9
- type: string;
10
- contentType: string;
11
- };
12
- disableCompress: {
13
- type: string;
14
- };
15
- border: {
16
- type: string;
17
- };
18
- fullScreen: {
19
- type: string;
20
- };
21
- links: {
22
- type: string;
23
- items: {
24
- type: string;
25
- properties: {
26
- when: {
27
- type: string;
28
- };
29
- };
30
- };
31
- };
32
- title: {
33
- oneOf: ({
34
- type: string;
35
- additionalProperties: boolean;
36
- required: string[];
37
- properties: {
38
- text: {
39
- type: string;
40
- contentType: string;
41
- };
42
- textSize: {
43
- type: string;
44
- enum: string[];
45
- };
46
- url: {
47
- type: string;
48
- };
49
- resetMargin: {
50
- type: string;
51
- };
52
- };
53
- } | {
54
- type: string;
55
- contentType: string;
56
- })[];
57
- };
58
- additionalInfo: {
59
- type: string;
60
- contentType: string;
61
- };
62
- buttons: {
63
- type: string;
64
- items: {
65
- type: string;
66
- properties: {
67
- when: {
68
- type: string;
69
- };
70
- };
71
- };
72
- };
73
- type: {};
74
- when: {};
75
- };
76
- };
77
- export declare const CardWithImage: {
78
- 'card-with-image': {
79
- additionalProperties: boolean;
80
- required: string[];
81
- properties: {
82
- image: {
83
- type: string;
84
- };
85
- description: {
86
- type: string;
87
- contentType: string;
88
- };
89
- disableCompress: {
90
- type: string;
91
- };
92
- border: {
93
- type: string;
94
- };
95
- fullScreen: {
96
- type: string;
97
- };
98
- links: {
99
- type: string;
100
- items: {
101
- type: string;
102
- properties: {
103
- when: {
104
- type: string;
105
- };
106
- };
107
- };
108
- };
109
- title: {
110
- oneOf: ({
111
- type: string;
112
- additionalProperties: boolean;
113
- required: string[];
114
- properties: {
115
- text: {
116
- type: string;
117
- contentType: string;
118
- };
119
- textSize: {
120
- type: string;
121
- enum: string[];
122
- };
123
- url: {
124
- type: string;
125
- };
126
- resetMargin: {
127
- type: string;
128
- };
129
- };
130
- } | {
131
- type: string;
132
- contentType: string;
133
- })[];
134
- };
135
- additionalInfo: {
136
- type: string;
137
- contentType: string;
138
- };
139
- buttons: {
140
- type: string;
141
- items: {
142
- type: string;
143
- properties: {
144
- when: {
145
- type: string;
146
- };
147
- };
148
- };
149
- };
150
- type: {};
151
- when: {};
152
- };
153
- };
154
- };
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CardWithImage = exports.CardWithImageItem = void 0;
4
- const lodash_1 = require("lodash");
5
- const common_1 = require("../../schema/validators/common");
6
- const utils_1 = require("../../schema/validators/utils");
7
- const schema_1 = require("../../sub-blocks/Content/schema");
8
- const CardWithImageContentProps = (0, lodash_1.omit)(schema_1.ContentBase, ['links', 'size', 'text', 'theme']);
9
- const CardWithImageLinks = {
10
- type: 'object',
11
- additionalProperties: false,
12
- required: ['title', 'link'],
13
- properties: Object.assign(Object.assign({}, common_1.BaseProps), { title: {
14
- type: 'string',
15
- contentType: 'text',
16
- }, link: {
17
- type: 'string',
18
- }, arrow: {
19
- type: 'boolean',
20
- }, theme: {
21
- type: 'string',
22
- enum: ['back', 'file-link', 'normal'],
23
- }, textSize: {
24
- type: 'string',
25
- enum: common_1.textSize,
26
- } }),
27
- };
28
- exports.CardWithImageItem = {
29
- additionalProperties: false,
30
- required: ['image'],
31
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), CardWithImageContentProps), { image: {
32
- type: 'string',
33
- }, description: {
34
- type: 'string',
35
- contentType: 'yfm',
36
- }, disableCompress: {
37
- type: 'boolean',
38
- }, border: {
39
- type: 'boolean',
40
- }, fullScreen: {
41
- type: 'boolean',
42
- }, links: (0, utils_1.filteredArray)(CardWithImageLinks) }),
43
- };
44
- exports.CardWithImage = {
45
- 'card-with-image': exports.CardWithImageItem,
46
- };
@@ -1,8 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .pc-partner-block__logo {
4
- margin-bottom: 12px;
5
- height: 32px;
6
- object-fit: contain;
7
- display: block;
8
- }
@@ -1,3 +0,0 @@
1
- import { PartnerProps } from '../../models';
2
- declare const Partner: ({ text, logo, url, border }: PartnerProps) => JSX.Element;
3
- export default Partner;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importDefault(require("react"));
5
- const components_1 = require("../../components");
6
- const utils_1 = require("../../utils");
7
- const b = (0, utils_1.block)('partner-block');
8
- const Partner = ({ text, logo, url, border }) => {
9
- const logoData = typeof logo === 'string' ? { src: logo } : logo;
10
- return (react_1.default.createElement(components_1.CardBase, { url: url, target: "_blank", className: b(), border: border },
11
- react_1.default.createElement(components_1.CardBase.Content, null,
12
- react_1.default.createElement(components_1.Image, Object.assign({ className: b('logo') }, logoData)),
13
- react_1.default.createElement(components_1.HTML, null, text))));
14
- };
15
- exports.default = Partner;
@@ -1,30 +0,0 @@
1
- export declare const PartnerBlock: {
2
- partner: {
3
- additionalProperties: boolean;
4
- required: string[];
5
- properties: {
6
- text: {
7
- type: string;
8
- contentType: string;
9
- };
10
- logo: {
11
- oneOf: ({
12
- type: string;
13
- properties: {
14
- when: {
15
- type: string;
16
- };
17
- };
18
- } | {
19
- type: string;
20
- pattern: string;
21
- })[];
22
- };
23
- url: {
24
- type: string;
25
- };
26
- type: {};
27
- when: {};
28
- };
29
- };
30
- };
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PartnerBlock = void 0;
4
- const schema_1 = require("../../components/Image/schema");
5
- const common_1 = require("../../schema/validators/common");
6
- exports.PartnerBlock = {
7
- partner: {
8
- additionalProperties: false,
9
- required: ['text', 'logo', 'url'],
10
- properties: Object.assign(Object.assign({}, common_1.BaseProps), { text: {
11
- type: 'string',
12
- contentType: 'text',
13
- }, logo: schema_1.ImageProps, url: {
14
- type: 'string',
15
- } }),
16
- },
17
- };
@@ -1,20 +0,0 @@
1
- .pc-tutorial-card__title {
2
- margin: 0;
3
- }
4
-
5
- /* use this for style redefinitions to awoid problems with
6
- unpredictable css rules order in build */
7
- .pc-tutorial-card__title {
8
- font-size: var(--yc-text-header-1-font-size);
9
- line-height: var(--yc-text-header-1-line-height);
10
- color: var(--pc-text-header-color);
11
- font-weight: var(--yc-text-accent-font-weight);
12
- margin-bottom: 12px;
13
- }
14
- .pc-tutorial-card__icon {
15
- width: 32px;
16
- height: 32px;
17
- background-size: cover;
18
- display: block;
19
- margin-bottom: 12px;
20
- }
@@ -1,3 +0,0 @@
1
- import { TutorialCardProps } from '../../models';
2
- declare const TutorialCard: (props: TutorialCardProps) => JSX.Element;
3
- export default TutorialCard;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importDefault(require("react"));
5
- const components_1 = require("../../components/");
6
- const CardBase_1 = tslib_1.__importDefault(require("../../components/CardBase/CardBase"));
7
- const utils_1 = require("../../components/Media/Image/utils");
8
- const utils_2 = require("../../utils");
9
- const b = (0, utils_2.block)('tutorial-card');
10
- function iconElement(icon, title) {
11
- const image = (0, utils_1.getMediaImage)(icon !== null && icon !== void 0 ? icon : {});
12
- return react_1.default.createElement(components_1.Image, Object.assign({}, image, { alt: image.alt || title, className: b('icon') }));
13
- }
14
- const TutorialCard = (props) => {
15
- const { url, title, text, border, icon } = props;
16
- return (react_1.default.createElement(CardBase_1.default, { className: b(), url: url, border: border },
17
- react_1.default.createElement(CardBase_1.default.Content, null,
18
- icon && iconElement(icon, title),
19
- react_1.default.createElement("h6", { className: b('title') },
20
- react_1.default.createElement(components_1.HTML, null, title)),
21
- react_1.default.createElement(components_1.HTML, null, text))));
22
- };
23
- exports.default = TutorialCard;
@@ -1,34 +0,0 @@
1
- export declare const TutorialCard: {
2
- 'tutorial-card': {
3
- additionalProperties: boolean;
4
- required: string[];
5
- properties: {
6
- url: {
7
- type: string;
8
- };
9
- title: {
10
- type: string;
11
- contentType: string;
12
- };
13
- text: {
14
- type: string;
15
- contentType: string;
16
- };
17
- icon: {
18
- oneOf: ({
19
- type: string;
20
- properties: {
21
- when: {
22
- type: string;
23
- };
24
- };
25
- } | {
26
- type: string;
27
- pattern: string;
28
- })[];
29
- };
30
- type: {};
31
- when: {};
32
- };
33
- };
34
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TutorialCard = void 0;
4
- const schema_1 = require("../../components/Image/schema");
5
- const common_1 = require("../../schema/validators/common");
6
- exports.TutorialCard = {
7
- 'tutorial-card': {
8
- additionalProperties: false,
9
- required: ['url', 'title', 'text'],
10
- properties: Object.assign(Object.assign({}, common_1.BaseProps), { url: {
11
- type: 'string',
12
- }, title: {
13
- type: 'string',
14
- contentType: 'text',
15
- }, text: {
16
- type: 'string',
17
- contentType: 'text',
18
- }, icon: schema_1.ImageProps }),
19
- },
20
- };