@gravity-ui/page-constructor 1.15.0-alpha.21 → 1.15.0-alpha.22
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/build/cjs/blocks/Banner/schema.d.ts +0 -9
- package/build/cjs/blocks/Banner/schema.js +1 -3
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +78 -0
- package/build/cjs/blocks/Header/schema.d.ts +0 -156
- package/build/cjs/blocks/Header/schema.js +0 -4
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -78
- package/build/cjs/blocks/Info/schema.d.ts +0 -3
- package/build/cjs/blocks/Info/schema.js +0 -2
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/cjs/blocks/Preview/schema.d.ts +0 -3
- package/build/cjs/blocks/Preview/schema.js +1 -3
- package/build/cjs/blocks/Security/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/schema.js +1 -3
- package/build/cjs/blocks/Tabs/schema.d.ts +78 -0
- package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
- package/build/cjs/components/BackLink/BackLink.js +4 -2
- package/build/cjs/components/Button/Button.js +1 -4
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/cjs/components/CardBase/CardBase.d.ts +2 -4
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/cjs/components/Link/Link.js +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/cjs/components/YandexForm/YandexForm.js +2 -2
- package/build/cjs/models/common.d.ts +3 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +0 -10
- package/build/cjs/models/constructor-items/common.d.ts +5 -13
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/cjs/schema/validators/common.d.ts +78 -0
- package/build/cjs/schema/validators/common.js +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -1
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
- package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/Quote/schema.js +1 -3
- package/build/esm/blocks/Banner/schema.d.ts +0 -9
- package/build/esm/blocks/Banner/schema.js +1 -3
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +78 -0
- package/build/esm/blocks/Header/schema.d.ts +0 -156
- package/build/esm/blocks/Header/schema.js +0 -4
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -78
- package/build/esm/blocks/Info/schema.d.ts +0 -3
- package/build/esm/blocks/Info/schema.js +0 -2
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/esm/blocks/Preview/schema.d.ts +0 -3
- package/build/esm/blocks/Preview/schema.js +1 -3
- package/build/esm/blocks/Security/schema.d.ts +0 -3
- package/build/esm/blocks/Security/schema.js +1 -3
- package/build/esm/blocks/Tabs/schema.d.ts +78 -0
- package/build/esm/components/BackLink/BackLink.d.ts +0 -1
- package/build/esm/components/BackLink/BackLink.js +4 -2
- package/build/esm/components/Button/Button.js +1 -4
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/esm/components/CardBase/CardBase.d.ts +2 -4
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/esm/components/Link/Link.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/esm/components/YandexForm/YandexForm.js +2 -2
- package/build/esm/models/common.d.ts +3 -0
- package/build/esm/models/constructor-items/blocks.d.ts +0 -10
- package/build/esm/models/constructor-items/common.d.ts +5 -13
- package/build/esm/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/esm/schema/validators/common.d.ts +78 -0
- package/build/esm/schema/validators/common.js +2 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -1
- package/build/esm/sub-blocks/Quote/Quote.js +2 -2
- package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/esm/sub-blocks/Quote/schema.js +1 -3
- package/package.json +1 -1
- package/server/models/common.d.ts +3 -0
- package/server/models/constructor-items/blocks.d.ts +0 -10
- package/server/models/constructor-items/common.d.ts +5 -13
- package/server/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -12
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -28
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -13
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -25
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
const utils_1 = require("../../utils");
|
|
6
|
-
const models_1 = require("../../models");
|
|
7
|
-
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
8
|
-
const hooks_1 = require("../../hooks");
|
|
9
|
-
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
10
|
-
const b = (0, utils_1.block)('header-breadcrumbs-item');
|
|
11
|
-
function HeaderBreadcrumbsItem({ url, text, metrikaGoals, pixelEvents, analyticsEvents, }) {
|
|
12
|
-
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
13
|
-
const context = (0, react_1.useContext)(blockPositionContext_1.BlockPositionContext);
|
|
14
|
-
const defaultEvent = (0, react_1.useMemo)(() => ({
|
|
15
|
-
name: 'header-breadcrumbs-click',
|
|
16
|
-
type: models_1.PredefinedEventTypes.Default,
|
|
17
|
-
context: context,
|
|
18
|
-
target: url,
|
|
19
|
-
}), [context, url]);
|
|
20
|
-
const handleAnalytics = (0, hooks_1.useAnalytics)(defaultEvent);
|
|
21
|
-
const onClick = () => {
|
|
22
|
-
handleMetrika({ metrikaGoals, pixelEvents });
|
|
23
|
-
handleAnalytics(analyticsEvents);
|
|
24
|
-
};
|
|
25
|
-
return (react_1.default.createElement("div", { className: b('item'), key: url },
|
|
26
|
-
react_1.default.createElement("a", { href: url, className: b('text'), onClick: onClick }, text)));
|
|
27
|
-
}
|
|
28
|
-
exports.default = HeaderBreadcrumbsItem;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
/* use this for style redefinitions to awoid problems with
|
|
3
|
-
unpredictable css rules order in build */
|
|
4
|
-
.pc-header-breadcrumbs-item__item {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
}
|
|
7
|
-
.pc-header-breadcrumbs-item__text {
|
|
8
|
-
font-size: var(--yc-text-body-2-font-size);
|
|
9
|
-
line-height: var(--yc-text-body-2-line-height);
|
|
10
|
-
outline: none;
|
|
11
|
-
color: var(--yc-color-text-link);
|
|
12
|
-
text-decoration: none;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
color: var(--yc-color-text-secondary);
|
|
15
|
-
}
|
|
16
|
-
.utilityfocus .pc-header-breadcrumbs-item__text:focus {
|
|
17
|
-
outline: 2px solid #ffdb4d;
|
|
18
|
-
}
|
|
19
|
-
.pc-header-breadcrumbs-item__text:hover, .pc-header-breadcrumbs-item__text:active {
|
|
20
|
-
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
21
|
-
color: var(--yc-color-text-link-hover);
|
|
22
|
-
}
|
|
23
|
-
.pc-header-breadcrumbs-item__text:after {
|
|
24
|
-
content: " / ";
|
|
25
|
-
margin: 0 8px 0 6px;
|
|
26
|
-
color: var(--yc-color-text-secondary);
|
|
27
|
-
}
|
|
28
|
-
.pc-header-breadcrumbs-item__text:hover {
|
|
29
|
-
color: var(--yc-color-text-primary);
|
|
30
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AnalyticsEvent, ButtonPixel, MetrikaGoal } from '../../models';
|
|
3
|
-
import './HeaderBreadcrumbsItem.css';
|
|
4
|
-
type HeaderBreadcrumbsItemProps = {
|
|
5
|
-
url: string;
|
|
6
|
-
text: ReactNode;
|
|
7
|
-
metrikaGoals?: MetrikaGoal;
|
|
8
|
-
pixelEvents?: ButtonPixel;
|
|
9
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
10
|
-
context?: string;
|
|
11
|
-
};
|
|
12
|
-
export default function HeaderBreadcrumbsItem({ url, text, metrikaGoals, pixelEvents, analyticsEvents, }: HeaderBreadcrumbsItemProps): JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { useContext, useMemo } from 'react';
|
|
2
|
-
import { block } from '../../utils';
|
|
3
|
-
import { PredefinedEventTypes } from '../../models';
|
|
4
|
-
import { useMetrika } from '../../hooks/useMetrika';
|
|
5
|
-
import { useAnalytics } from '../../hooks';
|
|
6
|
-
import { BlockPositionContext } from '../../context/blockPositionContext';
|
|
7
|
-
import './HeaderBreadcrumbsItem.css';
|
|
8
|
-
const b = block('header-breadcrumbs-item');
|
|
9
|
-
export default function HeaderBreadcrumbsItem({ url, text, metrikaGoals, pixelEvents, analyticsEvents, }) {
|
|
10
|
-
const handleMetrika = useMetrika();
|
|
11
|
-
const context = useContext(BlockPositionContext);
|
|
12
|
-
const defaultEvent = useMemo(() => ({
|
|
13
|
-
name: 'header-breadcrumbs-click',
|
|
14
|
-
type: PredefinedEventTypes.Default,
|
|
15
|
-
context: context,
|
|
16
|
-
target: url,
|
|
17
|
-
}), [context, url]);
|
|
18
|
-
const handleAnalytics = useAnalytics(defaultEvent);
|
|
19
|
-
const onClick = () => {
|
|
20
|
-
handleMetrika({ metrikaGoals, pixelEvents });
|
|
21
|
-
handleAnalytics(analyticsEvents);
|
|
22
|
-
};
|
|
23
|
-
return (React.createElement("div", { className: b('item'), key: url },
|
|
24
|
-
React.createElement("a", { href: url, className: b('text'), onClick: onClick }, text)));
|
|
25
|
-
}
|