@gravity-ui/page-constructor 4.44.0 → 4.46.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/README.md +1 -1
- package/build/cjs/blocks/Form/Form.js +1 -1
- package/build/cjs/{blocks/Form → components}/InnerForm/InnerForm.d.ts +1 -1
- package/build/cjs/{blocks/Form → components}/InnerForm/InnerForm.js +4 -4
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/schema/validators/components.d.ts +1 -0
- package/build/cjs/schema/validators/components.js +1 -0
- package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
- package/build/cjs/schema/validators/sub-blocks.js +1 -0
- package/build/esm/blocks/Form/Form.js +1 -1
- package/build/esm/{blocks/Form → components}/InnerForm/InnerForm.d.ts +1 -1
- package/build/esm/{blocks/Form → components}/InnerForm/InnerForm.js +3 -3
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/schema/validators/components.d.ts +1 -0
- package/build/esm/schema/validators/components.js +1 -0
- package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
- package/build/esm/schema/validators/sub-blocks.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,7 +151,7 @@ The page constructor uses the `bootstrap` grid and its implementation based on R
|
|
|
151
151
|
Usage example:
|
|
152
152
|
|
|
153
153
|
```jsx
|
|
154
|
-
import {Grid, Row, Col} from '@gravity-ui/page-constructor
|
|
154
|
+
import {Grid, Row, Col} from '@gravity-ui/page-constructor';
|
|
155
155
|
|
|
156
156
|
const Page: React.FC<PageProps> = ({children}) => (
|
|
157
157
|
<Grid>
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const components_1 = require("../../components");
|
|
6
|
+
const InnerForm_1 = tslib_1.__importDefault(require("../../components/InnerForm/InnerForm"));
|
|
6
7
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
7
8
|
const grid_1 = require("../../grid");
|
|
8
9
|
const models_1 = require("../../models");
|
|
9
10
|
const sub_blocks_1 = require("../../sub-blocks");
|
|
10
11
|
const utils_1 = require("../../utils");
|
|
11
|
-
const InnerForm_1 = tslib_1.__importDefault(require("./InnerForm/InnerForm"));
|
|
12
12
|
const b = (0, utils_1.block)('form-block');
|
|
13
13
|
const colSizes = { [grid_1.GridColumnSize.Lg]: 6, [grid_1.GridColumnSize.All]: 12 };
|
|
14
14
|
const FormBlock = (props) => {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
const
|
|
6
|
-
const models_1 = require("
|
|
7
|
-
const sub_blocks_1 = require("
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const sub_blocks_1 = require("../../sub-blocks");
|
|
8
8
|
const InnerForm = (props) => {
|
|
9
9
|
const { formData, onContentLoad, className } = props;
|
|
10
10
|
(0, react_1.useEffect)(() => {
|
|
@@ -15,7 +15,7 @@ const InnerForm = (props) => {
|
|
|
15
15
|
if ((0, models_1.isYandexDataForm)(formData)) {
|
|
16
16
|
const _a = formData.yandex, { onLoad } = _a, rest = tslib_1.__rest(_a, ["onLoad"]);
|
|
17
17
|
return (react_1.default.createElement("div", { className: className },
|
|
18
|
-
react_1.default.createElement(
|
|
18
|
+
react_1.default.createElement(__1.YandexForm, Object.assign({}, rest, { onLoad: () => {
|
|
19
19
|
onContentLoad();
|
|
20
20
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
21
21
|
} }))));
|
|
@@ -35,5 +35,6 @@ export { default as HTML } from './HTML/HTML';
|
|
|
35
35
|
export { default as MetaInfo } from './MetaInfo/MetaInfo';
|
|
36
36
|
export { default as FullscreenMedia } from './FullscreenMedia/FullscreenMedia';
|
|
37
37
|
export { default as ContentList } from './ContentList/ContentList';
|
|
38
|
+
export { default as InnerForm } from './InnerForm/InnerForm';
|
|
38
39
|
export type { RouterLinkProps } from './RouterLink/RouterLink';
|
|
39
40
|
export type { ImageBaseProps } from './ImageBase/ImageBase';
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ContentList = exports.FullscreenMedia = exports.MetaInfo = exports.HTML = exports.RouterLink = exports.Author = exports.OverflowScroller = exports.Control = exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.Table = exports.ReactPlayer = exports.OutsideClick = exports.Media = exports.Links = exports.Link = exports.ImageBase = exports.Image = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.CardBase = exports.Button = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.AnimateBlock = exports.Anchor = void 0;
|
|
6
|
+
exports.InnerForm = exports.ContentList = exports.FullscreenMedia = exports.MetaInfo = exports.HTML = exports.RouterLink = exports.Author = exports.OverflowScroller = exports.Control = exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.Table = exports.ReactPlayer = exports.OutsideClick = exports.Media = exports.Links = exports.Link = exports.ImageBase = exports.Image = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.CardBase = exports.Button = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.AnimateBlock = exports.Anchor = void 0;
|
|
7
7
|
var Anchor_1 = require("./Anchor/Anchor");
|
|
8
8
|
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return __importDefault(Anchor_1).default; } });
|
|
9
9
|
var AnimateBlock_1 = require("./AnimateBlock/AnimateBlock");
|
|
@@ -78,3 +78,5 @@ var FullscreenMedia_1 = require("./FullscreenMedia/FullscreenMedia");
|
|
|
78
78
|
Object.defineProperty(exports, "FullscreenMedia", { enumerable: true, get: function () { return __importDefault(FullscreenMedia_1).default; } });
|
|
79
79
|
var ContentList_1 = require("./ContentList/ContentList");
|
|
80
80
|
Object.defineProperty(exports, "ContentList", { enumerable: true, get: function () { return __importDefault(ContentList_1).default; } });
|
|
81
|
+
var InnerForm_1 = require("./InnerForm/InnerForm");
|
|
82
|
+
Object.defineProperty(exports, "InnerForm", { enumerable: true, get: function () { return __importDefault(InnerForm_1).default; } });
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("../../components/Author/schema"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("../../components/Image/schema"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("../../components/YandexForm/schema"), exports);
|
|
@@ -10,3 +10,4 @@ tslib_1.__exportStar(require("../../sub-blocks/Quote/schema"), exports);
|
|
|
10
10
|
tslib_1.__exportStar(require("../../sub-blocks/Divider/schema"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("../../sub-blocks/BasicCard/schema"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("../../sub-blocks/PriceCard/schema"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("../../sub-blocks/HubspotForm/schema"), exports);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useContext, useState } from 'react';
|
|
2
2
|
import { BackgroundImage, Title } from '../../components';
|
|
3
|
+
import InnerForm from '../../components/InnerForm/InnerForm';
|
|
3
4
|
import { MobileContext } from '../../context/mobileContext';
|
|
4
5
|
import { Col, Grid, GridAlignItems, GridColumnSize, Row } from '../../grid';
|
|
5
6
|
import { FormBlockDataTypes, FormBlockDirection, isHubspotDataForm, isYandexDataForm, } from '../../models';
|
|
6
7
|
import { Content } from '../../sub-blocks';
|
|
7
8
|
import { block } from '../../utils';
|
|
8
|
-
import InnerForm from './InnerForm/InnerForm';
|
|
9
9
|
import './Form.css';
|
|
10
10
|
const b = block('form-block');
|
|
11
11
|
const colSizes = { [GridColumnSize.Lg]: 6, [GridColumnSize.All]: 12 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { YandexForm } from '
|
|
4
|
-
import { isHubspotDataForm, isYandexDataForm } from '
|
|
5
|
-
import { HubspotForm } from '
|
|
3
|
+
import { YandexForm } from '..';
|
|
4
|
+
import { isHubspotDataForm, isYandexDataForm } from '../../models';
|
|
5
|
+
import { HubspotForm } from '../../sub-blocks';
|
|
6
6
|
const InnerForm = (props) => {
|
|
7
7
|
const { formData, onContentLoad, className } = props;
|
|
8
8
|
useEffect(() => {
|
|
@@ -35,5 +35,6 @@ export { default as HTML } from './HTML/HTML';
|
|
|
35
35
|
export { default as MetaInfo } from './MetaInfo/MetaInfo';
|
|
36
36
|
export { default as FullscreenMedia } from './FullscreenMedia/FullscreenMedia';
|
|
37
37
|
export { default as ContentList } from './ContentList/ContentList';
|
|
38
|
+
export { default as InnerForm } from './InnerForm/InnerForm';
|
|
38
39
|
export type { RouterLinkProps } from './RouterLink/RouterLink';
|
|
39
40
|
export type { ImageBaseProps } from './ImageBase/ImageBase';
|
|
@@ -35,3 +35,4 @@ export { default as HTML } from './HTML/HTML';
|
|
|
35
35
|
export { default as MetaInfo } from './MetaInfo/MetaInfo';
|
|
36
36
|
export { default as FullscreenMedia } from './FullscreenMedia/FullscreenMedia';
|
|
37
37
|
export { default as ContentList } from './ContentList/ContentList';
|
|
38
|
+
export { default as InnerForm } from './InnerForm/InnerForm';
|