@doyourjob/gravity-ui-page-constructor 5.31.52 → 5.31.54

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.
@@ -1,37 +1,22 @@
1
- .pc-highlight-table-block__title {
2
- margin: 0;
3
- }
4
-
5
1
  /* use this for style redefinitions to awoid problems with
6
2
  unpredictable css rules order in build */
7
- .pc-highlight-table-block__description {
8
- margin-bottom: 16px;
9
- }
10
- .pc-highlight-table-block__title {
11
- font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
12
- line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
13
- color: var(--pc-text-header-color);
14
- font-weight: var(--g-text-accent-font-weight);
15
- position: sticky;
16
- display: block;
17
- margin-bottom: 16px;
18
- }
19
- @media (max-width: 576px) {
20
- .pc-highlight-table-block__title {
21
- font-size: var(--g-text-display-1-font-size, var(--pc-text-display-1-font-size));
22
- line-height: var(--g-text-display-1-line-height, var(--pc-text-display-1-line-height));
23
- }
24
- }
25
3
  .pc-highlight-table-block__legend {
26
4
  display: flex;
27
5
  column-gap: 28px;
28
6
  align-items: center;
29
7
  justify-content: center;
8
+ margin-top: 16px;
30
9
  margin-bottom: 12px;
31
10
  }
32
11
  .pc-highlight-table-block__legend-item {
33
12
  display: flex;
34
13
  align-items: center;
14
+ font-size: 15px;
15
+ line-height: 20px;
16
+ }
17
+ .pc-highlight-table-block__legend-item img {
18
+ display: inline-block;
19
+ vertical-align: middle;
35
20
  }
36
21
  .pc-highlight-table-block__table {
37
22
  overflow: auto;
@@ -74,6 +59,10 @@ unpredictable css rules order in build */
74
59
  .pc-highlight-table-block__cell p {
75
60
  margin: 0;
76
61
  }
62
+ .pc-highlight-table-block__cell img {
63
+ display: inline-block;
64
+ vertical-align: middle;
65
+ }
77
66
  .pc-highlight-table-block__scrollbar {
78
67
  visibility: hidden;
79
68
  overflow: hidden;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HighlightTableBlock = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
- const uikit_1 = require("@gravity-ui/uikit");
7
6
  const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
8
7
  const components_1 = require("../../components");
9
8
  const utils_1 = require("../../utils");
@@ -70,10 +69,8 @@ const HighlightTableBlock = (props) => {
70
69
  })));
71
70
  }, [table.customColumnWidth, table.highlighter, table.justify]);
72
71
  return (react_1.default.createElement("div", { ref: blockRef, className: b() },
73
- react_1.default.createElement(uikit_1.Text, { className: b('title'), variant: "header-2" }, title),
74
- description && (react_1.default.createElement("div", { className: b('description') },
75
- react_1.default.createElement(components_1.YFMWrapper, { content: description, modifiers: { constructor: true } }))),
76
- (legend === null || legend === void 0 ? void 0 : legend.length) && (react_1.default.createElement("div", { className: b('legend') }, legend.map((item, index) => (react_1.default.createElement(components_1.HTML, { className: b('legend-item'), key: String(index) }, item))))),
72
+ (title || description) && react_1.default.createElement(components_1.Title, { title: title, subtitle: description }),
73
+ (legend === null || legend === void 0 ? void 0 : legend.length) && (react_1.default.createElement("div", { className: b('legend') }, legend.map((item, index) => (react_1.default.createElement(components_1.HTML, { className: b('legend-item'), block: true, key: String(index) }, item))))),
77
74
  react_1.default.createElement("div", { ref: tableRef, className: b('table') },
78
75
  react_1.default.createElement("div", { ref: tableContentRef, className: b('content') },
79
76
  react_1.default.createElement("div", { className: b('head') }, renderRow(firstRow, 0)),
@@ -20,6 +20,9 @@ function parseHighlightTableBlock(transformer, content) {
20
20
  const rows = (content === null || content === void 0 ? void 0 : content.content) || [];
21
21
  return Object.assign(Object.assign({}, (content || {})), { content: rows.map((row) => row.map((col) => transformer(col))) });
22
22
  }
23
+ function parseHighlightTableBlockLegend(transformer, legend) {
24
+ return legend.map((item) => transformer(item));
25
+ }
23
26
  function parseFeatures(transformer, items) {
24
27
  return items.map((_a) => {
25
28
  var { title, text } = _a, rest = tslib_1.__rest(_a, ["title", "text"]);
@@ -279,6 +282,11 @@ exports.config = {
279
282
  fields: ['description'],
280
283
  transformer: common_1.yfmTransformer,
281
284
  },
285
+ {
286
+ fields: ['legend'],
287
+ transformer: common_1.yfmTransformer,
288
+ parser: parseHighlightTableBlockLegend,
289
+ },
282
290
  {
283
291
  fields: ['table'],
284
292
  transformer: common_1.yfmTransformer,
@@ -1,37 +1,22 @@
1
- .pc-highlight-table-block__title {
2
- margin: 0;
3
- }
4
-
5
1
  /* use this for style redefinitions to awoid problems with
6
2
  unpredictable css rules order in build */
7
- .pc-highlight-table-block__description {
8
- margin-bottom: 16px;
9
- }
10
- .pc-highlight-table-block__title {
11
- font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
12
- line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
13
- color: var(--pc-text-header-color);
14
- font-weight: var(--g-text-accent-font-weight);
15
- position: sticky;
16
- display: block;
17
- margin-bottom: 16px;
18
- }
19
- @media (max-width: 576px) {
20
- .pc-highlight-table-block__title {
21
- font-size: var(--g-text-display-1-font-size, var(--pc-text-display-1-font-size));
22
- line-height: var(--g-text-display-1-line-height, var(--pc-text-display-1-line-height));
23
- }
24
- }
25
3
  .pc-highlight-table-block__legend {
26
4
  display: flex;
27
5
  column-gap: 28px;
28
6
  align-items: center;
29
7
  justify-content: center;
8
+ margin-top: 16px;
30
9
  margin-bottom: 12px;
31
10
  }
32
11
  .pc-highlight-table-block__legend-item {
33
12
  display: flex;
34
13
  align-items: center;
14
+ font-size: 15px;
15
+ line-height: 20px;
16
+ }
17
+ .pc-highlight-table-block__legend-item img {
18
+ display: inline-block;
19
+ vertical-align: middle;
35
20
  }
36
21
  .pc-highlight-table-block__table {
37
22
  overflow: auto;
@@ -74,6 +59,10 @@ unpredictable css rules order in build */
74
59
  .pc-highlight-table-block__cell p {
75
60
  margin: 0;
76
61
  }
62
+ .pc-highlight-table-block__cell img {
63
+ display: inline-block;
64
+ vertical-align: middle;
65
+ }
77
66
  .pc-highlight-table-block__scrollbar {
78
67
  visibility: hidden;
79
68
  overflow: hidden;
@@ -1,7 +1,6 @@
1
1
  import React, { useCallback, useEffect, useRef } from 'react';
2
- import { Text } from '@gravity-ui/uikit';
3
2
  import debounce from 'lodash/debounce';
4
- import { HTML, YFMWrapper } from '../../components';
3
+ import { HTML, Title } from '../../components';
5
4
  import { block } from '../../utils';
6
5
  import './HighlightTable.css';
7
6
  const b = block('highlight-table-block');
@@ -67,10 +66,8 @@ export const HighlightTableBlock = (props) => {
67
66
  })));
68
67
  }, [table.customColumnWidth, table.highlighter, table.justify]);
69
68
  return (React.createElement("div", { ref: blockRef, className: b() },
70
- React.createElement(Text, { className: b('title'), variant: "header-2" }, title),
71
- description && (React.createElement("div", { className: b('description') },
72
- React.createElement(YFMWrapper, { content: description, modifiers: { constructor: true } }))),
73
- (legend === null || legend === void 0 ? void 0 : legend.length) && (React.createElement("div", { className: b('legend') }, legend.map((item, index) => (React.createElement(HTML, { className: b('legend-item'), key: String(index) }, item))))),
69
+ (title || description) && React.createElement(Title, { title: title, subtitle: description }),
70
+ (legend === null || legend === void 0 ? void 0 : legend.length) && (React.createElement("div", { className: b('legend') }, legend.map((item, index) => (React.createElement(HTML, { className: b('legend-item'), block: true, key: String(index) }, item))))),
74
71
  React.createElement("div", { ref: tableRef, className: b('table') },
75
72
  React.createElement("div", { ref: tableContentRef, className: b('content') },
76
73
  React.createElement("div", { className: b('head') }, renderRow(firstRow, 0)),
@@ -17,6 +17,9 @@ function parseHighlightTableBlock(transformer, content) {
17
17
  const rows = (content === null || content === void 0 ? void 0 : content.content) || [];
18
18
  return Object.assign(Object.assign({}, (content || {})), { content: rows.map((row) => row.map((col) => transformer(col))) });
19
19
  }
20
+ function parseHighlightTableBlockLegend(transformer, legend) {
21
+ return legend.map((item) => transformer(item));
22
+ }
20
23
  function parseFeatures(transformer, items) {
21
24
  return items.map((_a) => {
22
25
  var { title, text } = _a, rest = __rest(_a, ["title", "text"]);
@@ -276,6 +279,11 @@ export const config = {
276
279
  fields: ['description'],
277
280
  transformer: yfmTransformer,
278
281
  },
282
+ {
283
+ fields: ['legend'],
284
+ transformer: yfmTransformer,
285
+ parser: parseHighlightTableBlockLegend,
286
+ },
279
287
  {
280
288
  fields: ['table'],
281
289
  transformer: yfmTransformer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doyourjob/gravity-ui-page-constructor",
3
- "version": "5.31.52",
3
+ "version": "5.31.54",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,6 +30,9 @@ function parseHighlightTableBlock(transformer, content) {
30
30
  const rows = (content === null || content === void 0 ? void 0 : content.content) || [];
31
31
  return Object.assign(Object.assign({}, (content || {})), { content: rows.map((row) => row.map((col) => transformer(col))) });
32
32
  }
33
+ function parseHighlightTableBlockLegend(transformer, legend) {
34
+ return legend.map((item) => transformer(item));
35
+ }
33
36
  function parseFeatures(transformer, items) {
34
37
  return items.map((_a) => {
35
38
  var { title, text } = _a, rest = __rest(_a, ["title", "text"]);
@@ -289,6 +292,11 @@ exports.config = {
289
292
  fields: ['description'],
290
293
  transformer: common_1.yfmTransformer,
291
294
  },
295
+ {
296
+ fields: ['legend'],
297
+ transformer: common_1.yfmTransformer,
298
+ parser: parseHighlightTableBlockLegend,
299
+ },
292
300
  {
293
301
  fields: ['table'],
294
302
  transformer: common_1.yfmTransformer,