@gravity-ui/blog-constructor 5.8.0 → 5.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/build/cjs/blocks/Feed/Feed.js +2 -2
- package/build/cjs/blocks/Suggest/Suggest.js +1 -1
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +3 -3
- package/build/cjs/components/Paginator/Paginator.js +4 -4
- package/build/cjs/components/PostInfo/components/Save.js +2 -2
- package/build/cjs/components/PostInfo/components/Sharing.js +2 -2
- package/build/cjs/counters/metrika.d.ts +56 -60
- package/build/cjs/counters/metrika.js +4 -0
- package/build/esm/blocks/Feed/Feed.js +1 -1
- package/build/esm/blocks/Suggest/Suggest.js +1 -1
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +1 -1
- package/build/esm/components/Paginator/Paginator.js +1 -1
- package/build/esm/components/PostInfo/components/Save.js +1 -1
- package/build/esm/components/PostInfo/components/Sharing.js +1 -1
- package/build/esm/counters/metrika.d.ts +56 -60
- package/build/esm/counters/metrika.js +4 -0
- package/package.json +4 -15
@@ -17,7 +17,7 @@ const RouterContext_1 = require("../../contexts/RouterContext");
|
|
17
17
|
/**
|
18
18
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
19
19
|
*/
|
20
|
-
const
|
20
|
+
const metrika_1 = tslib_1.__importDefault(require("../../counters/metrika"));
|
21
21
|
const utils_1 = require("../../counters/utils");
|
22
22
|
const common_1 = require("../../models/common");
|
23
23
|
const common_2 = require("../../utils/common");
|
@@ -108,7 +108,7 @@ const Feed = ({ image }) => {
|
|
108
108
|
/**
|
109
109
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
110
110
|
*/
|
111
|
-
|
111
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.showMore);
|
112
112
|
handleAnalytics();
|
113
113
|
const nextPage = currentPage + 1;
|
114
114
|
try {
|
@@ -37,6 +37,6 @@ const Suggest = ({ paddingTop = 'l', paddingBottom = 'l' }) => {
|
|
37
37
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
38
38
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
39
39
|
} },
|
40
|
-
react_1.default.createElement(page_constructor_1.SliderBlock, { slidesToShow: { xl: 3, lg: 2, sm: 1 }, title: { text: (0, i18n_1.i18)(i18n_1.Keyset.TitleSuggest) } }, suggestedPosts.map((post) => (react_1.default.createElement(PostCard_1.PostCard, { key: post.id, metrikaGoals: metrikaGoals, post: post }))))));
|
40
|
+
react_1.default.createElement(page_constructor_1.SliderBlock, { slidesToShow: { xl: 3, lg: 2, sm: 1 }, title: { text: (0, i18n_1.i18)(i18n_1.Keyset.TitleSuggest) }, lazyLoad: false }, suggestedPosts.map((post) => (react_1.default.createElement(PostCard_1.PostCard, { key: post.id, metrikaGoals: metrikaGoals, post: post }))))));
|
41
41
|
};
|
42
42
|
exports.Suggest = Suggest;
|
@@ -10,7 +10,7 @@ const uikit_1 = require("@gravity-ui/uikit");
|
|
10
10
|
*/
|
11
11
|
const constants_1 = require("../../../../constants");
|
12
12
|
const LikesContext_1 = require("../../../../contexts/LikesContext");
|
13
|
-
const
|
13
|
+
const metrika_1 = tslib_1.__importDefault(require("../../../../counters/metrika"));
|
14
14
|
const utils_1 = require("../../../../counters/utils");
|
15
15
|
const i18n_1 = require("../../../../i18n");
|
16
16
|
const Save_1 = require("../../../../icons/Save");
|
@@ -55,7 +55,7 @@ const Controls = ({ handleLoadData, tags = [], services = [], queryParams, }) =>
|
|
55
55
|
/**
|
56
56
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
57
57
|
*/
|
58
|
-
|
58
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.tag, {
|
59
59
|
theme: selectedTags[0],
|
60
60
|
});
|
61
61
|
handleAnalyticsTag(null, {
|
@@ -78,7 +78,7 @@ const Controls = ({ handleLoadData, tags = [], services = [], queryParams, }) =>
|
|
78
78
|
/**
|
79
79
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
80
80
|
*/
|
81
|
-
|
81
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.service, {
|
82
82
|
service: metrikaAsString,
|
83
83
|
});
|
84
84
|
handleAnalyticsService(null, {
|
@@ -8,7 +8,7 @@ const constants_1 = require("../../constants");
|
|
8
8
|
/**
|
9
9
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
10
10
|
*/
|
11
|
-
const
|
11
|
+
const metrika_1 = tslib_1.__importDefault(require("../../counters/metrika"));
|
12
12
|
const utils_1 = require("../../counters/utils");
|
13
13
|
const common_1 = require("../../models/common");
|
14
14
|
const cn_1 = require("../../utils/cn");
|
@@ -38,7 +38,7 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, onPage
|
|
38
38
|
/**
|
39
39
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
40
40
|
*/
|
41
|
-
|
41
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.home);
|
42
42
|
handleAnalyticsHome();
|
43
43
|
newPage = 1;
|
44
44
|
}
|
@@ -47,7 +47,7 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, onPage
|
|
47
47
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
48
48
|
*/
|
49
49
|
handleAnalyticsNext();
|
50
|
-
|
50
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.next);
|
51
51
|
newPage = page + 1;
|
52
52
|
}
|
53
53
|
if (newPage !== page) {
|
@@ -59,7 +59,7 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, onPage
|
|
59
59
|
/**
|
60
60
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
61
61
|
*/
|
62
|
-
|
62
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.page, { page: index });
|
63
63
|
handleAnalyticsPage(null, { page: String(index) });
|
64
64
|
handlePageChange(index);
|
65
65
|
}
|
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
7
|
const uikit_1 = require("@gravity-ui/uikit");
|
8
8
|
const LikesContext_1 = require("../../../contexts/LikesContext");
|
9
|
-
const
|
9
|
+
const metrika_1 = tslib_1.__importDefault(require("../../../counters/metrika"));
|
10
10
|
const utils_1 = require("../../../counters/utils");
|
11
11
|
const Save_1 = require("../../../icons/Save");
|
12
12
|
const SaveFilled_1 = require("../../../icons/SaveFilled");
|
@@ -46,7 +46,7 @@ const Save = ({ title, postId, hasUserLike, handleUserLike, metrikaGoal, size, t
|
|
46
46
|
}
|
47
47
|
(0, common_2.postLikeStatus)(postId, Boolean(hasUserLike));
|
48
48
|
handleUserLike();
|
49
|
-
|
49
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, metrikaGoal);
|
50
50
|
handleAnalytics();
|
51
51
|
}, "data-qa": `${qa ? qa + '-' : ''}save` },
|
52
52
|
react_1.default.createElement("div", { className: b('content', { cursor: isLikeable, theme }) },
|
@@ -8,7 +8,7 @@ const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
8
8
|
const MobileContext_1 = require("../../../contexts/MobileContext");
|
9
9
|
const PostPageContext_1 = require("../../../contexts/PostPageContext");
|
10
10
|
const RouterContext_1 = require("../../../contexts/RouterContext");
|
11
|
-
const
|
11
|
+
const metrika_1 = tslib_1.__importDefault(require("../../../counters/metrika"));
|
12
12
|
const utils_1 = require("../../../counters/utils");
|
13
13
|
const i18n_1 = require("../../../i18n");
|
14
14
|
const ShareArrowUp_1 = require("../../../icons/ShareArrowUp");
|
@@ -22,7 +22,7 @@ const Sharing = ({ theme, metrikaGoal }) => {
|
|
22
22
|
const { shareOptions } = (0, react_1.useContext)(PostPageContext_1.PostPageContext);
|
23
23
|
const handleAnalyticsGlobal = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.ShareButton);
|
24
24
|
const handleMetrika = (0, react_1.useCallback)(() => {
|
25
|
-
|
25
|
+
metrika_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, metrikaGoal);
|
26
26
|
}, [metrikaGoal]);
|
27
27
|
const handleAnalytics = (0, react_1.useCallback)(() => {
|
28
28
|
handleAnalyticsGlobal();
|
@@ -1,62 +1,58 @@
|
|
1
|
-
export function initCounters(configs:
|
2
|
-
declare namespace _default {
|
3
|
-
export { hit };
|
4
|
-
export { params };
|
5
|
-
export { reachGoal };
|
6
|
-
export { reachGoals };
|
7
|
-
export { Goal };
|
8
|
-
export { getServicePrefix };
|
9
|
-
export { getMarketPlacePrefix };
|
10
|
-
export { goalGoToConsole };
|
11
|
-
export { goalGoToForm };
|
12
|
-
export { goalGoToDocs };
|
13
|
-
export { goalFormSubmit };
|
14
|
-
export { goalEventFormSubmit };
|
15
|
-
export { goalEventVideoAction };
|
16
|
-
export { goalCaseFormSubmit };
|
17
|
-
export { goalSwitchLang };
|
18
|
-
}
|
19
|
-
export default _default;
|
1
|
+
export declare function initCounters(configs: Record<string, string>[]): void;
|
20
2
|
declare function hit(...args: any[]): void;
|
21
|
-
declare function params(...args: any[]): void;
|
22
|
-
declare function reachGoal(counterName:
|
23
|
-
declare function reachGoals(goals:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
declare
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
3
|
+
declare function params(...args: Record<string, any>[]): void;
|
4
|
+
declare function reachGoal(counterName: string, ...args: any[]): void;
|
5
|
+
declare function reachGoals(goals: string | object, counterName?: string): void;
|
6
|
+
declare function getServicePrefix(id: string): "CMPT" | "IAM" | "VPC" | "STRG" | "SK" | "CH" | "MONGO" | "POSTGR" | "MR" | "MMSQL" | "MK" | "TRSL" | "INSTGR" | "LB" | "MQ" | "DL" | "MNTRG" | "DP" | "KMS" | "YDB" | "INTRCNCT" | undefined;
|
7
|
+
declare function getMarketPlacePrefix(id: string): string;
|
8
|
+
declare function goalGoToConsole(prefix: string): string;
|
9
|
+
declare function goalGoToForm(prefix: string): string;
|
10
|
+
declare function goalGoToDocs(prefix: string): string;
|
11
|
+
declare function goalFormSubmit(prefix: string): string;
|
12
|
+
declare function goalEventFormSubmit(id: string): string;
|
13
|
+
declare function goalEventVideoAction(id: string, action: string): string;
|
14
|
+
declare function goalCaseFormSubmit(id: string): string;
|
15
|
+
declare function goalSwitchLang(place: string): string;
|
16
|
+
declare const _default: {
|
17
|
+
hit: typeof hit;
|
18
|
+
params: typeof params;
|
19
|
+
reachGoal: typeof reachGoal;
|
20
|
+
reachGoals: typeof reachGoals;
|
21
|
+
Goal: {
|
22
|
+
SUPPORT_OPEN_FORM: string;
|
23
|
+
SUPPORT_STEP_1_SUBMIT: string;
|
24
|
+
SUPPORT_STEP_2_SUBMIT: string;
|
25
|
+
SUPPORT_STEP_3_SUBMIT: string;
|
26
|
+
SUPPORT_THANKYOU_SUBMIT: string;
|
27
|
+
MP_OPEN_FORM: string;
|
28
|
+
EDIT_ON_GITHUB: string;
|
29
|
+
MAIN_GO_TO_VAR: string;
|
30
|
+
MAIN_GO_TO_ISV: string;
|
31
|
+
MAIN_ALL_PARTNERS: string;
|
32
|
+
FIND_GO_TO_VAR: string;
|
33
|
+
ISV_GO_TO_MP: string;
|
34
|
+
FOOTER_SUBSCRIBE: string;
|
35
|
+
FOOTER_MNG_SUBSCRIPTIONS: string;
|
36
|
+
MOBILE_STORE_IOS: string;
|
37
|
+
MOBILE_STORE_ANDROID: string;
|
38
|
+
REGION_POPUP_SHOW: string;
|
39
|
+
REGION_POPUP_YES: string;
|
40
|
+
REGION_POPUP_NO: string;
|
41
|
+
REGION_POPUP_CLOSE: string;
|
42
|
+
SCALE_REGISTRATION: string;
|
43
|
+
DLGOTOPRODUCT_MPSITE: string;
|
44
|
+
MPK8S_CLCK: string;
|
45
|
+
'SITE_CALCULATOR_SHARE-RESULT_CLICK': string;
|
46
|
+
};
|
47
|
+
getServicePrefix: typeof getServicePrefix;
|
48
|
+
getMarketPlacePrefix: typeof getMarketPlacePrefix;
|
49
|
+
goalGoToConsole: typeof goalGoToConsole;
|
50
|
+
goalGoToForm: typeof goalGoToForm;
|
51
|
+
goalGoToDocs: typeof goalGoToDocs;
|
52
|
+
goalFormSubmit: typeof goalFormSubmit;
|
53
|
+
goalEventFormSubmit: typeof goalEventFormSubmit;
|
54
|
+
goalEventVideoAction: typeof goalEventVideoAction;
|
55
|
+
goalCaseFormSubmit: typeof goalCaseFormSubmit;
|
56
|
+
goalSwitchLang: typeof goalSwitchLang;
|
52
57
|
};
|
53
|
-
|
54
|
-
declare function getMarketPlacePrefix(id: any): string;
|
55
|
-
declare function goalGoToConsole(prefix: any): any;
|
56
|
-
declare function goalGoToForm(prefix: any): any;
|
57
|
-
declare function goalGoToDocs(prefix: any): any;
|
58
|
-
declare function goalFormSubmit(prefix: any): any;
|
59
|
-
declare function goalEventFormSubmit(id: any): string;
|
60
|
-
declare function goalEventVideoAction(id: any, action: any): string;
|
61
|
-
declare function goalCaseFormSubmit(id: any): string;
|
62
|
-
declare function goalSwitchLang(place: any): string;
|
58
|
+
export default _default;
|
@@ -34,6 +34,7 @@ const HIT_COUNTERS = ['main', 'cross-site', 'scale'];
|
|
34
34
|
const counterIds = {};
|
35
35
|
function getCounter(name) {
|
36
36
|
const counterId = counterIds[name];
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
37
38
|
return window['yaCounter' + counterId];
|
38
39
|
}
|
39
40
|
function initCounters(configs) {
|
@@ -42,6 +43,7 @@ function initCounters(configs) {
|
|
42
43
|
});
|
43
44
|
}
|
44
45
|
exports.initCounters = initCounters;
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
45
47
|
function hit(...args) {
|
46
48
|
HIT_COUNTERS.forEach((counterName) => {
|
47
49
|
const counter = getCounter(counterName);
|
@@ -51,6 +53,7 @@ function hit(...args) {
|
|
51
53
|
counter.hit(...args);
|
52
54
|
});
|
53
55
|
}
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
54
57
|
function params(...args) {
|
55
58
|
const counter = getCounter('main');
|
56
59
|
if (!counter) {
|
@@ -58,6 +61,7 @@ function params(...args) {
|
|
58
61
|
}
|
59
62
|
counter.params(...args);
|
60
63
|
}
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
61
65
|
function reachGoal(counterName, ...args) {
|
62
66
|
const counter = getCounter(counterName);
|
63
67
|
if (!counter) {
|
@@ -13,7 +13,7 @@ import { RouterContext } from '../../contexts/RouterContext';
|
|
13
13
|
/**
|
14
14
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
15
15
|
*/
|
16
|
-
import metrika from '../../counters/metrika
|
16
|
+
import metrika from '../../counters/metrika';
|
17
17
|
import { MetrikaCounter } from '../../counters/utils';
|
18
18
|
import { DefaultEventNames } from '../../models/common';
|
19
19
|
import { getFeedQueryParams, scrollOnPageChange } from '../../utils/common';
|
@@ -33,5 +33,5 @@ export const Suggest = ({ paddingTop = 'l', paddingBottom = 'l' }) => {
|
|
33
33
|
[PaddingsDirections.top]: paddingTop,
|
34
34
|
[PaddingsDirections.bottom]: paddingBottom,
|
35
35
|
} },
|
36
|
-
React.createElement(SliderBlock, { slidesToShow: { xl: 3, lg: 2, sm: 1 }, title: { text: i18(Keyset.TitleSuggest) } }, suggestedPosts.map((post) => (React.createElement(PostCard, { key: post.id, metrikaGoals: metrikaGoals, post: post }))))));
|
36
|
+
React.createElement(SliderBlock, { slidesToShow: { xl: 3, lg: 2, sm: 1 }, title: { text: i18(Keyset.TitleSuggest) }, lazyLoad: false }, suggestedPosts.map((post) => (React.createElement(PostCard, { key: post.id, metrikaGoals: metrikaGoals, post: post }))))));
|
37
37
|
};
|
@@ -6,7 +6,7 @@ import { Button, Icon, Select } from '@gravity-ui/uikit';
|
|
6
6
|
*/
|
7
7
|
import { BlogMetrikaGoalIds } from '../../../../constants';
|
8
8
|
import { LikesContext } from '../../../../contexts/LikesContext';
|
9
|
-
import metrika from '../../../../counters/metrika
|
9
|
+
import metrika from '../../../../counters/metrika';
|
10
10
|
import { MetrikaCounter } from '../../../../counters/utils';
|
11
11
|
import { Keyset, i18 } from '../../../../i18n';
|
12
12
|
import { Save } from '../../../../icons/Save';
|
@@ -5,7 +5,7 @@ import { BlogMetrikaGoalIds } from '../../constants';
|
|
5
5
|
/**
|
6
6
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
7
7
|
*/
|
8
|
-
import metrika from '../../counters/metrika
|
8
|
+
import metrika from '../../counters/metrika';
|
9
9
|
import { MetrikaCounter } from '../../counters/utils';
|
10
10
|
import { DefaultEventNames } from '../../models/common';
|
11
11
|
import { block } from '../../utils/cn';
|
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
|
|
2
2
|
import { useAnalytics } from '@gravity-ui/page-constructor';
|
3
3
|
import { Icon } from '@gravity-ui/uikit';
|
4
4
|
import { LikesContext } from '../../../contexts/LikesContext';
|
5
|
-
import metrika from '../../../counters/metrika
|
5
|
+
import metrika from '../../../counters/metrika';
|
6
6
|
import { MetrikaCounter } from '../../../counters/utils';
|
7
7
|
import { Save as SaveIcon } from '../../../icons/Save';
|
8
8
|
import { SaveFilled } from '../../../icons/SaveFilled';
|
@@ -4,7 +4,7 @@ import { useAnalytics } from '@gravity-ui/page-constructor';
|
|
4
4
|
import { MobileContext } from '../../../contexts/MobileContext';
|
5
5
|
import { PostPageContext } from '../../../contexts/PostPageContext';
|
6
6
|
import { RouterContext } from '../../../contexts/RouterContext';
|
7
|
-
import metrika from '../../../counters/metrika
|
7
|
+
import metrika from '../../../counters/metrika';
|
8
8
|
import { MetrikaCounter } from '../../../counters/utils';
|
9
9
|
import { Keyset, i18 } from '../../../i18n';
|
10
10
|
import { ShareArrowUp } from '../../../icons/ShareArrowUp';
|
@@ -1,62 +1,58 @@
|
|
1
|
-
export function initCounters(configs:
|
2
|
-
declare namespace _default {
|
3
|
-
export { hit };
|
4
|
-
export { params };
|
5
|
-
export { reachGoal };
|
6
|
-
export { reachGoals };
|
7
|
-
export { Goal };
|
8
|
-
export { getServicePrefix };
|
9
|
-
export { getMarketPlacePrefix };
|
10
|
-
export { goalGoToConsole };
|
11
|
-
export { goalGoToForm };
|
12
|
-
export { goalGoToDocs };
|
13
|
-
export { goalFormSubmit };
|
14
|
-
export { goalEventFormSubmit };
|
15
|
-
export { goalEventVideoAction };
|
16
|
-
export { goalCaseFormSubmit };
|
17
|
-
export { goalSwitchLang };
|
18
|
-
}
|
19
|
-
export default _default;
|
1
|
+
export declare function initCounters(configs: Record<string, string>[]): void;
|
20
2
|
declare function hit(...args: any[]): void;
|
21
|
-
declare function params(...args: any[]): void;
|
22
|
-
declare function reachGoal(counterName:
|
23
|
-
declare function reachGoals(goals:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
declare
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
3
|
+
declare function params(...args: Record<string, any>[]): void;
|
4
|
+
declare function reachGoal(counterName: string, ...args: any[]): void;
|
5
|
+
declare function reachGoals(goals: string | object, counterName?: string): void;
|
6
|
+
declare function getServicePrefix(id: string): "CMPT" | "IAM" | "VPC" | "STRG" | "SK" | "CH" | "MONGO" | "POSTGR" | "MR" | "MMSQL" | "MK" | "TRSL" | "INSTGR" | "LB" | "MQ" | "DL" | "MNTRG" | "DP" | "KMS" | "YDB" | "INTRCNCT" | undefined;
|
7
|
+
declare function getMarketPlacePrefix(id: string): string;
|
8
|
+
declare function goalGoToConsole(prefix: string): string;
|
9
|
+
declare function goalGoToForm(prefix: string): string;
|
10
|
+
declare function goalGoToDocs(prefix: string): string;
|
11
|
+
declare function goalFormSubmit(prefix: string): string;
|
12
|
+
declare function goalEventFormSubmit(id: string): string;
|
13
|
+
declare function goalEventVideoAction(id: string, action: string): string;
|
14
|
+
declare function goalCaseFormSubmit(id: string): string;
|
15
|
+
declare function goalSwitchLang(place: string): string;
|
16
|
+
declare const _default: {
|
17
|
+
hit: typeof hit;
|
18
|
+
params: typeof params;
|
19
|
+
reachGoal: typeof reachGoal;
|
20
|
+
reachGoals: typeof reachGoals;
|
21
|
+
Goal: {
|
22
|
+
SUPPORT_OPEN_FORM: string;
|
23
|
+
SUPPORT_STEP_1_SUBMIT: string;
|
24
|
+
SUPPORT_STEP_2_SUBMIT: string;
|
25
|
+
SUPPORT_STEP_3_SUBMIT: string;
|
26
|
+
SUPPORT_THANKYOU_SUBMIT: string;
|
27
|
+
MP_OPEN_FORM: string;
|
28
|
+
EDIT_ON_GITHUB: string;
|
29
|
+
MAIN_GO_TO_VAR: string;
|
30
|
+
MAIN_GO_TO_ISV: string;
|
31
|
+
MAIN_ALL_PARTNERS: string;
|
32
|
+
FIND_GO_TO_VAR: string;
|
33
|
+
ISV_GO_TO_MP: string;
|
34
|
+
FOOTER_SUBSCRIBE: string;
|
35
|
+
FOOTER_MNG_SUBSCRIPTIONS: string;
|
36
|
+
MOBILE_STORE_IOS: string;
|
37
|
+
MOBILE_STORE_ANDROID: string;
|
38
|
+
REGION_POPUP_SHOW: string;
|
39
|
+
REGION_POPUP_YES: string;
|
40
|
+
REGION_POPUP_NO: string;
|
41
|
+
REGION_POPUP_CLOSE: string;
|
42
|
+
SCALE_REGISTRATION: string;
|
43
|
+
DLGOTOPRODUCT_MPSITE: string;
|
44
|
+
MPK8S_CLCK: string;
|
45
|
+
'SITE_CALCULATOR_SHARE-RESULT_CLICK': string;
|
46
|
+
};
|
47
|
+
getServicePrefix: typeof getServicePrefix;
|
48
|
+
getMarketPlacePrefix: typeof getMarketPlacePrefix;
|
49
|
+
goalGoToConsole: typeof goalGoToConsole;
|
50
|
+
goalGoToForm: typeof goalGoToForm;
|
51
|
+
goalGoToDocs: typeof goalGoToDocs;
|
52
|
+
goalFormSubmit: typeof goalFormSubmit;
|
53
|
+
goalEventFormSubmit: typeof goalEventFormSubmit;
|
54
|
+
goalEventVideoAction: typeof goalEventVideoAction;
|
55
|
+
goalCaseFormSubmit: typeof goalCaseFormSubmit;
|
56
|
+
goalSwitchLang: typeof goalSwitchLang;
|
52
57
|
};
|
53
|
-
|
54
|
-
declare function getMarketPlacePrefix(id: any): string;
|
55
|
-
declare function goalGoToConsole(prefix: any): any;
|
56
|
-
declare function goalGoToForm(prefix: any): any;
|
57
|
-
declare function goalGoToDocs(prefix: any): any;
|
58
|
-
declare function goalFormSubmit(prefix: any): any;
|
59
|
-
declare function goalEventFormSubmit(id: any): string;
|
60
|
-
declare function goalEventVideoAction(id: any, action: any): string;
|
61
|
-
declare function goalCaseFormSubmit(id: any): string;
|
62
|
-
declare function goalSwitchLang(place: any): string;
|
58
|
+
export default _default;
|
@@ -31,6 +31,7 @@ const HIT_COUNTERS = ['main', 'cross-site', 'scale'];
|
|
31
31
|
const counterIds = {};
|
32
32
|
function getCounter(name) {
|
33
33
|
const counterId = counterIds[name];
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
34
35
|
return window['yaCounter' + counterId];
|
35
36
|
}
|
36
37
|
export function initCounters(configs) {
|
@@ -38,6 +39,7 @@ export function initCounters(configs) {
|
|
38
39
|
counterIds[config.name] = config.id;
|
39
40
|
});
|
40
41
|
}
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
41
43
|
function hit(...args) {
|
42
44
|
HIT_COUNTERS.forEach((counterName) => {
|
43
45
|
const counter = getCounter(counterName);
|
@@ -47,6 +49,7 @@ function hit(...args) {
|
|
47
49
|
counter.hit(...args);
|
48
50
|
});
|
49
51
|
}
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
50
53
|
function params(...args) {
|
51
54
|
const counter = getCounter('main');
|
52
55
|
if (!counter) {
|
@@ -54,6 +57,7 @@ function params(...args) {
|
|
54
57
|
}
|
55
58
|
counter.params(...args);
|
56
59
|
}
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
57
61
|
function reachGoal(counterName, ...args) {
|
58
62
|
const counter = getCounter(counterName);
|
59
63
|
if (!counter) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gravity-ui/blog-constructor",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.10.0",
|
4
4
|
"description": "Gravity UI Blog Constructor",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -60,20 +60,12 @@
|
|
60
60
|
},
|
61
61
|
"dependencies": {
|
62
62
|
"@bem-react/classname": "^1.6.0",
|
63
|
-
"@gravity-ui/components": "^2.
|
63
|
+
"@gravity-ui/components": "^2.8.0",
|
64
64
|
"@gravity-ui/i18n": "^1.1.0",
|
65
65
|
"lodash": "^4.17.21",
|
66
66
|
"react-helmet": "^6.1.0",
|
67
|
-
"react-player": "^2.9.0",
|
68
|
-
"react-slick": "^0.29.0",
|
69
|
-
"react-transition-group": "^4.4.2",
|
70
|
-
"react-waypoint": "^10.1.0",
|
71
|
-
"sanitize-html": "^2.6.1",
|
72
|
-
"snakecase-keys": "^5.1.0",
|
73
|
-
"typograf": "^6.14.0",
|
74
67
|
"ua-parser-js": "^0.7.28",
|
75
68
|
"url": "^0.11.0",
|
76
|
-
"url-join": "^5.0.0",
|
77
69
|
"utility-types": "^3.10.0"
|
78
70
|
},
|
79
71
|
"peerDependencies": {
|
@@ -89,11 +81,11 @@
|
|
89
81
|
"@commitlint/config-conventional": "^17.4.3",
|
90
82
|
"@doc-tools/transform": "^3.11.0",
|
91
83
|
"@gravity-ui/eslint-config": "^3.1.1",
|
92
|
-
"@gravity-ui/page-constructor": "^4.31.
|
84
|
+
"@gravity-ui/page-constructor": "^4.31.1",
|
93
85
|
"@gravity-ui/prettier-config": "^1.1.0",
|
94
86
|
"@gravity-ui/stylelint-config": "^4.0.1",
|
95
87
|
"@gravity-ui/tsconfig": "^1.0.0",
|
96
|
-
"@gravity-ui/uikit": "^5.
|
88
|
+
"@gravity-ui/uikit": "^5.18.1",
|
97
89
|
"@jest/environment": "^29.7.0",
|
98
90
|
"@storybook/addon-essentials": "^7.0.27",
|
99
91
|
"@storybook/cli": "^7.0.27",
|
@@ -109,9 +101,6 @@
|
|
109
101
|
"@types/lodash": "^4.14.176",
|
110
102
|
"@types/react": "^18.0.26",
|
111
103
|
"@types/react-helmet": "^6.1.5",
|
112
|
-
"@types/react-slick": "^0.23.7",
|
113
|
-
"@types/react-transition-group": "^4.4.4",
|
114
|
-
"@types/sanitize-html": "^2.6.0",
|
115
104
|
"@types/ua-parser-js": "^0.7.36",
|
116
105
|
"eslint": "^8.34.0",
|
117
106
|
"eslint-plugin-no-not-accumulator-reassign": "^0.1.0",
|