@gravity-ui/page-constructor 1.5.0-alpha.0 → 1.6.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.
- package/CHANGELOG.md +13 -1
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +1 -0
- package/build/cjs/components/Link/Link.js +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/cjs/schema/validators/common.d.ts +6 -0
- package/build/cjs/schema/validators/common.js +7 -1
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -4
- package/build/cjs/schema/validators/sub-blocks.js +0 -4
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +5 -6
- package/build/cjs/sub-blocks/BasicCard/schema.js +5 -6
- package/build/esm/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +1 -0
- package/build/esm/components/Link/Link.js +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/esm/schema/validators/common.d.ts +6 -0
- package/build/esm/schema/validators/common.js +6 -0
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -4
- package/build/esm/schema/validators/sub-blocks.js +0 -4
- package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -2
- package/build/esm/sub-blocks/BasicCard/schema.js +1 -2
- package/package.json +1 -4
- package/server/models/constructor-items/blocks.d.ts +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/cjs/components/CardBase/schema.d.ts +0 -6
- package/build/cjs/components/CardBase/schema.js +0 -9
- package/build/esm/components/CardBase/schema.d.ts +0 -6
- package/build/esm/components/CardBase/schema.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.0](https://github.com/gravity-ui/page-constructor/pulls?q=is%3Apr+is%3Aclosed) (2022-11-09)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* update storybook
|
|
8
|
+
|
|
3
9
|
## [1.5.0](https://github.com/gravity-ui/page-constructor/issues/44) (2022-11-03)
|
|
4
10
|
|
|
5
|
-
###
|
|
11
|
+
### Features
|
|
6
12
|
|
|
7
13
|
* remove card validator and types
|
|
8
14
|
|
|
15
|
+
## [1.4.2](https://github.com/gravity-ui/page-constructor/pull/46) (2022-11-07)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* change link text m arrow size
|
|
20
|
+
|
|
9
21
|
## [1.4.1](https://github.com/gravity-ui/page-constructor/pull/42) (2022-10-28)
|
|
10
22
|
|
|
11
23
|
### Bug Fixes
|
|
@@ -19,8 +19,8 @@ unpredictable css rules order in build */
|
|
|
19
19
|
line-height: var(--yc-text-body-2-line-height);
|
|
20
20
|
}
|
|
21
21
|
.pc-content-layout-block__files_size_l {
|
|
22
|
-
font-size: var(--yc-text-
|
|
23
|
-
line-height: var(--yc-text-
|
|
22
|
+
font-size: var(--yc-text-body-3-font-size);
|
|
23
|
+
line-height: var(--yc-text-body-3-line-height);
|
|
24
24
|
}
|
|
25
25
|
.pc-content-layout-block__files_centered {
|
|
26
26
|
margin-left: auto;
|
|
@@ -158,5 +158,8 @@ export declare type HubspotFormModel = {
|
|
|
158
158
|
export declare type BannerCardModel = {
|
|
159
159
|
type: SubBlockType.BannerCard;
|
|
160
160
|
} & BannerCardProps;
|
|
161
|
-
export declare type
|
|
161
|
+
export declare type BasicCardModel = {
|
|
162
|
+
type: SubBlockType.BasicCard;
|
|
163
|
+
} & BasicCardProps;
|
|
164
|
+
export declare type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PartnerModel | PriceDetailedModel | MediaCardModel | TutorialCardModel | CardWithImageModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel;
|
|
162
165
|
export declare type SubBlock = SubBlockModels;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayIconProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
3
|
+
exports.CardBase = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayIconProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
4
4
|
const pixel_1 = require("./pixel");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
@@ -431,3 +431,9 @@ exports.MediaProps = {
|
|
|
431
431
|
},
|
|
432
432
|
dataLens: exports.DataLensProps,
|
|
433
433
|
};
|
|
434
|
+
exports.CardBase = {
|
|
435
|
+
border: {
|
|
436
|
+
type: 'string',
|
|
437
|
+
enum: ['border', 'shadow', 'none'],
|
|
438
|
+
},
|
|
439
|
+
};
|
|
@@ -9,7 +9,3 @@ export * from '../../sub-blocks/CardWithImage/schema';
|
|
|
9
9
|
export * from '../../sub-blocks/Quote/schema';
|
|
10
10
|
export * from '../../sub-blocks/Divider/schema';
|
|
11
11
|
export * from '../../sub-blocks/BasicCard/schema';
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Will be removed
|
|
14
|
-
*/
|
|
15
|
-
export * from '../../components/CardBase/schema';
|
|
@@ -12,7 +12,3 @@ const tslib_1 = require("tslib");
|
|
|
12
12
|
(0, tslib_1.__exportStar)(require("../../sub-blocks/Quote/schema"), exports);
|
|
13
13
|
(0, tslib_1.__exportStar)(require("../../sub-blocks/Divider/schema"), exports);
|
|
14
14
|
(0, tslib_1.__exportStar)(require("../../sub-blocks/BasicCard/schema"), exports);
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Will be removed
|
|
17
|
-
*/
|
|
18
|
-
(0, tslib_1.__exportStar)(require("../../components/CardBase/schema"), exports);
|
|
@@ -3,18 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BackgroundCard = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("../../schema/validators/common");
|
|
6
|
-
const schema_1 = require("
|
|
7
|
-
const schema_2 = require("
|
|
8
|
-
const schema_3 = require("../../components/Image/schema");
|
|
6
|
+
const schema_1 = require("../Content/schema");
|
|
7
|
+
const schema_2 = require("../../components/Image/schema");
|
|
9
8
|
const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
|
|
10
|
-
const BackgroundCardContentProps = lodash_1.default.omit(
|
|
9
|
+
const BackgroundCardContentProps = lodash_1.default.omit(schema_1.ContentBase, ['size']);
|
|
11
10
|
exports.BackgroundCard = {
|
|
12
11
|
'background-card': {
|
|
13
12
|
additionalProperties: false,
|
|
14
13
|
required: ['title', 'text'],
|
|
15
|
-
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps),
|
|
14
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), BackgroundCardContentProps), { url: {
|
|
16
15
|
type: 'string',
|
|
17
|
-
}, background: (0, common_1.withTheme)(
|
|
16
|
+
}, background: (0, common_1.withTheme)(schema_2.ImageObjectProps), backgroundColor: {
|
|
18
17
|
type: 'string',
|
|
19
18
|
}, paddingBottom: {
|
|
20
19
|
type: 'string',
|
|
@@ -4,16 +4,15 @@ exports.BasicCard = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
|
|
6
6
|
const common_1 = require("../../schema/validators/common");
|
|
7
|
-
const schema_1 = require("
|
|
8
|
-
const schema_2 = require("
|
|
9
|
-
const
|
|
10
|
-
const BasicCardContentProps = lodash_1.default.omit(schema_2.ContentBase, ['size', 'theme']);
|
|
7
|
+
const schema_1 = require("../Content/schema");
|
|
8
|
+
const schema_2 = require("../../components/Image/schema");
|
|
9
|
+
const BasicCardContentProps = lodash_1.default.omit(schema_1.ContentBase, ['size', 'theme']);
|
|
11
10
|
exports.BasicCard = {
|
|
12
11
|
'basic-card': {
|
|
13
12
|
additionalProperties: false,
|
|
14
13
|
required: ['url'],
|
|
15
|
-
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps),
|
|
14
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), BasicCardContentProps), { url: {
|
|
16
15
|
type: 'string',
|
|
17
|
-
}, icon:
|
|
16
|
+
}, icon: schema_2.ImageProps }),
|
|
18
17
|
},
|
|
19
18
|
};
|
|
@@ -19,8 +19,8 @@ unpredictable css rules order in build */
|
|
|
19
19
|
line-height: var(--yc-text-body-2-line-height);
|
|
20
20
|
}
|
|
21
21
|
.pc-content-layout-block__files_size_l {
|
|
22
|
-
font-size: var(--yc-text-
|
|
23
|
-
line-height: var(--yc-text-
|
|
22
|
+
font-size: var(--yc-text-body-3-font-size);
|
|
23
|
+
line-height: var(--yc-text-body-3-line-height);
|
|
24
24
|
}
|
|
25
25
|
.pc-content-layout-block__files_centered {
|
|
26
26
|
margin-left: auto;
|
|
@@ -158,5 +158,8 @@ export declare type HubspotFormModel = {
|
|
|
158
158
|
export declare type BannerCardModel = {
|
|
159
159
|
type: SubBlockType.BannerCard;
|
|
160
160
|
} & BannerCardProps;
|
|
161
|
-
export declare type
|
|
161
|
+
export declare type BasicCardModel = {
|
|
162
|
+
type: SubBlockType.BasicCard;
|
|
163
|
+
} & BasicCardProps;
|
|
164
|
+
export declare type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PartnerModel | PriceDetailedModel | MediaCardModel | TutorialCardModel | CardWithImageModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel;
|
|
162
165
|
export declare type SubBlock = SubBlockModels;
|
|
@@ -9,7 +9,3 @@ export * from '../../sub-blocks/CardWithImage/schema';
|
|
|
9
9
|
export * from '../../sub-blocks/Quote/schema';
|
|
10
10
|
export * from '../../sub-blocks/Divider/schema';
|
|
11
11
|
export * from '../../sub-blocks/BasicCard/schema';
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Will be removed
|
|
14
|
-
*/
|
|
15
|
-
export * from '../../components/CardBase/schema';
|
|
@@ -9,7 +9,3 @@ export * from '../../sub-blocks/CardWithImage/schema';
|
|
|
9
9
|
export * from '../../sub-blocks/Quote/schema';
|
|
10
10
|
export * from '../../sub-blocks/Divider/schema';
|
|
11
11
|
export * from '../../sub-blocks/BasicCard/schema';
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Will be removed
|
|
14
|
-
*/
|
|
15
|
-
export * from '../../components/CardBase/schema';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseProps, withTheme } from '../../schema/validators/common';
|
|
2
|
-
import { CardBase } from '../../components/CardBase/schema';
|
|
1
|
+
import { BaseProps, CardBase, withTheme } from '../../schema/validators/common';
|
|
3
2
|
import { ContentBase } from '../Content/schema';
|
|
4
3
|
import { ImageObjectProps } from '../../components/Image/schema';
|
|
5
4
|
import _ from 'lodash';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import { BaseProps } from '../../schema/validators/common';
|
|
3
|
-
import { CardBase } from '../../components/CardBase/schema';
|
|
2
|
+
import { BaseProps, CardBase } from '../../schema/validators/common';
|
|
4
3
|
import { ContentBase } from '../Content/schema';
|
|
5
4
|
import { ImageProps } from '../../components/Image/schema';
|
|
6
5
|
const BasicCardContentProps = _.omit(ContentBase, ['size', 'theme']);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -121,8 +121,5 @@
|
|
|
121
121
|
"*.{json,yaml,yml,md}": [
|
|
122
122
|
"prettier --write"
|
|
123
123
|
]
|
|
124
|
-
},
|
|
125
|
-
"publishConfig": {
|
|
126
|
-
"tag": "alpha"
|
|
127
124
|
}
|
|
128
125
|
}
|
|
@@ -158,5 +158,8 @@ export declare type HubspotFormModel = {
|
|
|
158
158
|
export declare type BannerCardModel = {
|
|
159
159
|
type: SubBlockType.BannerCard;
|
|
160
160
|
} & BannerCardProps;
|
|
161
|
-
export declare type
|
|
161
|
+
export declare type BasicCardModel = {
|
|
162
|
+
type: SubBlockType.BasicCard;
|
|
163
|
+
} & BasicCardProps;
|
|
164
|
+
export declare type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PartnerModel | PriceDetailedModel | MediaCardModel | TutorialCardModel | CardWithImageModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel;
|
|
162
165
|
export declare type SubBlock = SubBlockModels;
|