@gravity-ui/page-constructor 1.7.0 → 1.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.1](https://github.com/gravity-ui/page-constructor/compare/v1.7.0...v1.7.1) (2022-11-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ExtendedFeatures:** add props ([6254d62](https://github.com/gravity-ui/page-constructor/commit/6254d62b9ceded154d0fdcded9a554fd33772d13))
9
+ * storybook content ([b98eccc](https://github.com/gravity-ui/page-constructor/commit/b98ecccc96cfba2376552e4c9314a559913455d9))
10
+
3
11
  ## [1.7.0](https://github.com/gravity-ui/page-constructor/compare/v1.6.1...v1.7.0) (2022-11-10)
4
12
 
5
13
 
@@ -21,7 +21,7 @@ const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DEFAULT_S
21
21
  return (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
22
22
  react_1.default.createElement(components_1.BlockHeader, { title: title, description: description, className: b('header') }),
23
23
  react_1.default.createElement("div", { className: b('items') },
24
- react_1.default.createElement(grid_1.Row, null, items.map(({ title: itemTitle, text, link, links, label, icon }) => {
24
+ react_1.default.createElement(grid_1.Row, null, items.map(({ title: itemTitle, text, link, links, label, icon, buttons, additionalInfo, }) => {
25
25
  const itemLinks = links || [];
26
26
  const iconThemed = icon && (0, utils_1.getThemedValue)(icon, theme);
27
27
  const iconData = iconThemed && (0, utils_2.getMediaImage)(iconThemed);
@@ -34,7 +34,7 @@ const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DEFAULT_S
34
34
  itemTitle && (react_1.default.createElement("h5", { className: b('item-title') },
35
35
  react_1.default.createElement(components_1.HTML, null, itemTitle),
36
36
  label && (react_1.default.createElement("div", { className: b('item-label') }, label)))),
37
- react_1.default.createElement(sub_blocks_1.Content, { text: text, links: itemLinks, size: "s", colSizes: { all: 12, md: 12 } }))));
37
+ react_1.default.createElement(sub_blocks_1.Content, { text: text, links: itemLinks, size: "s", colSizes: { all: 12, md: 12 }, buttons: buttons, additionalInfo: additionalInfo }))));
38
38
  })))));
39
39
  };
40
40
  exports.ExtendedFeaturesBlock = ExtendedFeaturesBlock;
@@ -114,14 +114,12 @@ export interface SimpleBlockProps extends Animatable, Childable {
114
114
  title: TitleBaseProps;
115
115
  description: string;
116
116
  }
117
- export interface ExtendedFeaturesItem {
118
- title?: string;
119
- text?: string;
117
+ export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
118
+ title: string;
120
119
  label?: string;
121
120
  icon?: ThemedImage;
122
121
  /** @deprecated **/
123
122
  link?: LinkProps;
124
- links?: LinkProps[];
125
123
  }
126
124
  export interface ExtendedFeaturesProps extends Animatable {
127
125
  items: ExtendedFeaturesItem[];
@@ -26,7 +26,7 @@ exports.DEFAULT_ALLOWED_TAGS = [
26
26
  ];
27
27
  exports.typografConfig = {
28
28
  enabled: ['common/nbsp/afterNumber', 'common/nbsp/afterParagraphMark'],
29
- disabled: ['common/symbols/cf'],
29
+ disabled: ['common/symbols/cf', 'ru/other/phone-number'],
30
30
  };
31
31
  exports.sanitizeStripOptions = {
32
32
  allowedTags: [],
@@ -18,7 +18,7 @@ export const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DE
18
18
  return (React.createElement(AnimateBlock, { className: b(), animate: animated },
19
19
  React.createElement(BlockHeader, { title: title, description: description, className: b('header') }),
20
20
  React.createElement("div", { className: b('items') },
21
- React.createElement(Row, null, items.map(({ title: itemTitle, text, link, links, label, icon }) => {
21
+ React.createElement(Row, null, items.map(({ title: itemTitle, text, link, links, label, icon, buttons, additionalInfo, }) => {
22
22
  const itemLinks = links || [];
23
23
  const iconThemed = icon && getThemedValue(icon, theme);
24
24
  const iconData = iconThemed && getMediaImage(iconThemed);
@@ -31,7 +31,7 @@ export const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DE
31
31
  itemTitle && (React.createElement("h5", { className: b('item-title') },
32
32
  React.createElement(HTML, null, itemTitle),
33
33
  label && (React.createElement("div", { className: b('item-label') }, label)))),
34
- React.createElement(Content, { text: text, links: itemLinks, size: "s", colSizes: { all: 12, md: 12 } }))));
34
+ React.createElement(Content, { text: text, links: itemLinks, size: "s", colSizes: { all: 12, md: 12 }, buttons: buttons, additionalInfo: additionalInfo }))));
35
35
  })))));
36
36
  };
37
37
  export default ExtendedFeaturesBlock;
@@ -114,14 +114,12 @@ export interface SimpleBlockProps extends Animatable, Childable {
114
114
  title: TitleBaseProps;
115
115
  description: string;
116
116
  }
117
- export interface ExtendedFeaturesItem {
118
- title?: string;
119
- text?: string;
117
+ export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
118
+ title: string;
120
119
  label?: string;
121
120
  icon?: ThemedImage;
122
121
  /** @deprecated **/
123
122
  link?: LinkProps;
124
- links?: LinkProps[];
125
123
  }
126
124
  export interface ExtendedFeaturesProps extends Animatable {
127
125
  items: ExtendedFeaturesItem[];
@@ -23,7 +23,7 @@ export const DEFAULT_ALLOWED_TAGS = [
23
23
  ];
24
24
  export const typografConfig = {
25
25
  enabled: ['common/nbsp/afterNumber', 'common/nbsp/afterParagraphMark'],
26
- disabled: ['common/symbols/cf'],
26
+ disabled: ['common/symbols/cf', 'ru/other/phone-number'],
27
27
  };
28
28
  export const sanitizeStripOptions = {
29
29
  allowedTags: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -57,7 +57,7 @@
57
57
  "typograf": "^6.14.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "react": "^16.0.0",
60
+ "react": "^16.0.0 || ^17.0.0",
61
61
  "@gravity-ui/uikit": "^3.0.1",
62
62
  "@doc-tools/transform": "^2.6.1"
63
63
  },
@@ -114,14 +114,12 @@ export interface SimpleBlockProps extends Animatable, Childable {
114
114
  title: TitleBaseProps;
115
115
  description: string;
116
116
  }
117
- export interface ExtendedFeaturesItem {
118
- title?: string;
119
- text?: string;
117
+ export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
118
+ title: string;
120
119
  label?: string;
121
120
  icon?: ThemedImage;
122
121
  /** @deprecated **/
123
122
  link?: LinkProps;
124
- links?: LinkProps[];
125
123
  }
126
124
  export interface ExtendedFeaturesProps extends Animatable {
127
125
  items: ExtendedFeaturesItem[];
@@ -39,7 +39,7 @@ exports.DEFAULT_ALLOWED_TAGS = [
39
39
  ];
40
40
  exports.typografConfig = {
41
41
  enabled: ['common/nbsp/afterNumber', 'common/nbsp/afterParagraphMark'],
42
- disabled: ['common/symbols/cf'],
42
+ disabled: ['common/symbols/cf', 'ru/other/phone-number'],
43
43
  };
44
44
  exports.sanitizeStripOptions = {
45
45
  allowedTags: [],