@gravity-ui/page-constructor 4.51.1 → 4.51.2-alpha.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 +5 -3
- package/build/cjs/blocks/Banner/schema.d.ts +0 -264
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
- package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/FilterBlock/i18n/index.js +4 -3
- package/build/cjs/blocks/Map/schema.d.ts +0 -88
- package/build/cjs/blocks/Media/schema.d.ts +0 -176
- package/build/cjs/blocks/Security/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Security/i18n/index.js +4 -3
- package/build/cjs/blocks/Share/Share.js +4 -4
- package/build/cjs/blocks/Share/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Share/i18n/index.js +4 -3
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
- package/build/cjs/blocks/Slider/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Slider/i18n/index.js +4 -3
- package/build/cjs/components/Button/Button.js +4 -7
- package/build/cjs/components/Button/i18n/index.d.ts +1 -2
- package/build/cjs/components/Button/i18n/index.js +4 -3
- package/build/cjs/components/CardBase/CardBase.d.ts +1 -3
- package/build/cjs/components/CardBase/CardBase.js +1 -4
- package/build/cjs/components/Control/Control.js +2 -2
- package/build/cjs/components/Control/i18n/index.d.ts +1 -2
- package/build/cjs/components/Control/i18n/index.js +4 -3
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -3
- package/build/cjs/components/FullscreenImage/i18n/index.d.ts +1 -2
- package/build/cjs/components/FullscreenImage/i18n/index.js +4 -3
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
- package/build/cjs/components/Link/Link.js +1 -4
- package/build/cjs/components/Map/GoogleMap.js +2 -2
- package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
- package/build/cjs/components/Map/YMap/i18n/index.d.ts +1 -2
- package/build/cjs/components/Map/YMap/i18n/index.js +4 -3
- package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
- package/build/cjs/components/Media/DataLens/i18n/index.d.ts +1 -2
- package/build/cjs/components/Media/DataLens/i18n/index.js +4 -3
- package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
- package/build/cjs/components/Media/Iframe/i18n/index.d.ts +1 -2
- package/build/cjs/components/Media/Iframe/i18n/index.js +4 -3
- package/build/cjs/components/Media/Media.js +1 -3
- package/build/cjs/components/Media/Video/Video.js +2 -3
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
- package/build/cjs/components/OverflowScroller/i18n/index.d.ts +1 -2
- package/build/cjs/components/OverflowScroller/i18n/index.js +4 -3
- package/build/cjs/components/ReactPlayer/CustomBarControls.js +3 -3
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +5 -29
- package/build/cjs/components/ReactPlayer/i18n/index.d.ts +1 -2
- package/build/cjs/components/ReactPlayer/i18n/index.js +4 -3
- package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
- package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +1 -2
- package/build/cjs/components/UnpublishedLabel/i18n/index.js +4 -3
- package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
- package/build/cjs/components/VideoBlock/i18n/index.d.ts +1 -2
- package/build/cjs/components/VideoBlock/i18n/index.js +4 -3
- package/build/cjs/components/YandexForm/YandexForm.js +2 -13
- package/build/cjs/containers/Loadable/Loadable.js +2 -2
- package/build/cjs/containers/Loadable/i18n/index.d.ts +1 -2
- package/build/cjs/containers/Loadable/i18n/index.js +4 -3
- package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/cjs/containers/PageConstructor/Provider.js +1 -3
- package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
- package/build/cjs/context/localeContext/localeContext.js +2 -2
- package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
- package/build/cjs/editor/components/ControlPanel/i18n/en.json +2 -1
- package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/ControlPanel/i18n/index.js +4 -3
- package/build/cjs/editor/components/ControlPanel/i18n/ru.json +2 -1
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +4 -3
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +4 -3
- package/build/cjs/hooks/useAnalytics.d.ts +2 -2
- package/build/cjs/hooks/useMetrika.d.ts +1 -13
- package/build/cjs/hooks/useMetrika.js +0 -41
- package/build/cjs/models/common.d.ts +2 -53
- package/build/cjs/models/common.js +1 -25
- package/build/cjs/models/constructor-items/common.d.ts +2 -28
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -3
- package/build/cjs/models/guards.d.ts +0 -2
- package/build/cjs/models/guards.js +1 -5
- package/build/cjs/schema/constants.d.ts +0 -176
- package/build/cjs/schema/validators/common.d.ts +0 -188
- package/build/cjs/schema/validators/common.js +0 -31
- package/build/cjs/schema/validators/index.d.ts +0 -2
- package/build/cjs/schema/validators/index.js +0 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/cjs/sub-blocks/PriceCard/schema.d.ts +0 -88
- package/build/cjs/text-transform/common.d.ts +4 -4
- package/build/cjs/text-transform/transformers.d.ts +2 -2
- package/build/cjs/text-transform/utils.d.ts +6 -6
- package/build/cjs/text-transform/utils.js +5 -5
- package/build/cjs/utils/index.d.ts +0 -1
- package/build/cjs/utils/index.js +1 -4
- package/build/esm/blocks/Banner/schema.d.ts +0 -264
- package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
- package/build/esm/blocks/FilterBlock/i18n/index.d.ts +1 -2
- package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
- package/build/esm/blocks/Map/schema.d.ts +0 -88
- package/build/esm/blocks/Media/schema.d.ts +0 -176
- package/build/esm/blocks/Security/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Security/i18n/index.js +3 -3
- package/build/esm/blocks/Share/Share.js +1 -1
- package/build/esm/blocks/Share/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Share/i18n/index.js +3 -3
- package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/esm/blocks/Slider/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Slider/i18n/index.js +3 -3
- package/build/esm/components/Button/Button.js +3 -6
- package/build/esm/components/Button/i18n/index.d.ts +1 -2
- package/build/esm/components/Button/i18n/index.js +3 -3
- package/build/esm/components/CardBase/CardBase.d.ts +1 -3
- package/build/esm/components/CardBase/CardBase.js +1 -4
- package/build/esm/components/Control/Control.js +1 -1
- package/build/esm/components/Control/i18n/index.d.ts +1 -2
- package/build/esm/components/Control/i18n/index.js +3 -3
- package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
- package/build/esm/components/FullscreenImage/i18n/index.d.ts +1 -2
- package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
- package/build/esm/components/Link/Link.js +1 -4
- package/build/esm/components/Map/GoogleMap.js +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js +1 -1
- package/build/esm/components/Map/YMap/i18n/index.d.ts +1 -2
- package/build/esm/components/Map/YMap/i18n/index.js +3 -3
- package/build/esm/components/Media/DataLens/DataLens.js +1 -1
- package/build/esm/components/Media/DataLens/i18n/index.d.ts +1 -2
- package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
- package/build/esm/components/Media/Iframe/Iframe.js +1 -1
- package/build/esm/components/Media/Iframe/i18n/index.d.ts +1 -2
- package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
- package/build/esm/components/Media/Media.js +1 -3
- package/build/esm/components/Media/Video/Video.js +2 -3
- package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
- package/build/esm/components/OverflowScroller/i18n/index.d.ts +1 -2
- package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
- package/build/esm/components/ReactPlayer/CustomBarControls.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -28
- package/build/esm/components/ReactPlayer/i18n/index.d.ts +1 -2
- package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
- package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
- package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +1 -2
- package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
- package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
- package/build/esm/components/VideoBlock/i18n/index.d.ts +1 -2
- package/build/esm/components/VideoBlock/i18n/index.js +3 -3
- package/build/esm/components/YandexForm/YandexForm.js +2 -13
- package/build/esm/containers/Loadable/Loadable.js +1 -1
- package/build/esm/containers/Loadable/i18n/index.d.ts +1 -2
- package/build/esm/containers/Loadable/i18n/index.js +3 -3
- package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/esm/containers/PageConstructor/Provider.js +1 -3
- package/build/esm/context/localeContext/localeContext.d.ts +2 -2
- package/build/esm/context/localeContext/localeContext.js +1 -1
- package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
- package/build/esm/editor/components/ControlPanel/i18n/en.json +2 -1
- package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
- package/build/esm/editor/components/ControlPanel/i18n/ru.json +2 -1
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
- package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
- package/build/esm/hooks/useAnalytics.d.ts +2 -2
- package/build/esm/hooks/useMetrika.d.ts +1 -13
- package/build/esm/hooks/useMetrika.js +1 -38
- package/build/esm/models/common.d.ts +2 -53
- package/build/esm/models/common.js +0 -24
- package/build/esm/models/constructor-items/common.d.ts +2 -28
- package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -3
- package/build/esm/models/guards.d.ts +0 -2
- package/build/esm/models/guards.js +0 -3
- package/build/esm/schema/constants.d.ts +0 -176
- package/build/esm/schema/validators/common.d.ts +0 -188
- package/build/esm/schema/validators/common.js +0 -31
- package/build/esm/schema/validators/index.d.ts +0 -2
- package/build/esm/schema/validators/index.js +0 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/esm/sub-blocks/PriceCard/schema.d.ts +0 -88
- package/build/esm/text-transform/common.d.ts +4 -4
- package/build/esm/text-transform/transformers.d.ts +2 -2
- package/build/esm/text-transform/utils.d.ts +6 -6
- package/build/esm/text-transform/utils.js +1 -1
- package/build/esm/utils/index.d.ts +0 -1
- package/build/esm/utils/index.js +0 -1
- package/package.json +1 -1
- package/server/models/common.d.ts +2 -53
- package/server/models/common.js +1 -25
- package/server/models/constructor-items/common.d.ts +2 -28
- package/server/models/constructor-items/sub-blocks.d.ts +2 -3
- package/server/models/guards.d.ts +0 -2
- package/server/models/guards.js +1 -5
- package/server/text-transform/common.d.ts +4 -4
- package/server/text-transform/transformers.d.ts +2 -2
- package/server/text-transform/utils.d.ts +6 -6
- package/server/text-transform/utils.js +5 -5
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +1 -4
- package/widget/index.js +1 -1
- package/build/cjs/context/metrikaContext/index.d.ts +0 -1
- package/build/cjs/context/metrikaContext/index.js +0 -4
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -13
- package/build/cjs/context/metrikaContext/metrikaContext.js +0 -6
- package/build/cjs/i18n.d.ts +0 -2
- package/build/cjs/i18n.js +0 -12
- package/build/cjs/schema/validators/pixel.d.ts +0 -57
- package/build/cjs/schema/validators/pixel.js +0 -63
- package/build/cjs/utils/configure.d.ts +0 -12
- package/build/cjs/utils/configure.js +0 -26
- package/build/cjs/utils/registerKeyset.d.ts +0 -5
- package/build/cjs/utils/registerKeyset.js +0 -9
- package/build/esm/context/metrikaContext/index.d.ts +0 -1
- package/build/esm/context/metrikaContext/index.js +0 -1
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -13
- package/build/esm/context/metrikaContext/metrikaContext.js +0 -2
- package/build/esm/i18n.d.ts +0 -2
- package/build/esm/i18n.js +0 -9
- package/build/esm/schema/validators/pixel.d.ts +0 -57
- package/build/esm/schema/validators/pixel.js +0 -60
- package/build/esm/utils/configure.d.ts +0 -12
- package/build/esm/utils/configure.js +0 -20
- package/build/esm/utils/registerKeyset.d.ts +0 -5
- package/build/esm/utils/registerKeyset.js +0 -5
- package/server/utils/configure.d.ts +0 -12
- package/server/utils/configure.js +0 -26
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './metrikaContext';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Metrika, Pixel } from '../../models';
|
|
3
|
-
export interface MetrikaContextProps {
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Metrika will be deleted
|
|
6
|
-
*/
|
|
7
|
-
metrika?: Metrika;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Metrika will be deleted
|
|
10
|
-
*/
|
|
11
|
-
pixel?: Pixel;
|
|
12
|
-
}
|
|
13
|
-
export declare const MetrikaContext: React.Context<MetrikaContextProps>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MetrikaContext = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
exports.MetrikaContext = react_1.default.createContext({});
|
package/build/cjs/i18n.d.ts
DELETED
package/build/cjs/i18n.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.i18n = void 0;
|
|
4
|
-
const i18n_1 = require("@gravity-ui/i18n");
|
|
5
|
-
const configure_1 = require("./utils/configure");
|
|
6
|
-
exports.i18n = new i18n_1.I18N();
|
|
7
|
-
exports.i18n.setLang((0, configure_1.getConfig)().lang || configure_1.Lang.En);
|
|
8
|
-
(0, configure_1.subscribeConfigure)((config) => {
|
|
9
|
-
if (config.lang) {
|
|
10
|
-
exports.i18n.setLang(config.lang);
|
|
11
|
-
}
|
|
12
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { PixelEventType } from '../../models';
|
|
2
|
-
export declare const pixelEvents: {
|
|
3
|
-
type: string;
|
|
4
|
-
items: {
|
|
5
|
-
type: string;
|
|
6
|
-
required: string[];
|
|
7
|
-
additionalProperties: boolean;
|
|
8
|
-
properties: {
|
|
9
|
-
name: {
|
|
10
|
-
type: string;
|
|
11
|
-
enum: PixelEventType[];
|
|
12
|
-
};
|
|
13
|
-
data: {};
|
|
14
|
-
};
|
|
15
|
-
select: {
|
|
16
|
-
$data: string;
|
|
17
|
-
};
|
|
18
|
-
selectCases: {
|
|
19
|
-
SubmitApplication: {
|
|
20
|
-
additionalProperties: boolean;
|
|
21
|
-
properties: {
|
|
22
|
-
name: {};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
Contact: {
|
|
26
|
-
additionalProperties: boolean;
|
|
27
|
-
properties: {
|
|
28
|
-
name: {};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
Lead: {
|
|
32
|
-
additionalProperties: boolean;
|
|
33
|
-
properties: {
|
|
34
|
-
name: {};
|
|
35
|
-
data: {
|
|
36
|
-
type: string;
|
|
37
|
-
additionalProperties: boolean;
|
|
38
|
-
properties: {
|
|
39
|
-
content_category: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
content_name: {
|
|
43
|
-
type: string;
|
|
44
|
-
};
|
|
45
|
-
currency: {
|
|
46
|
-
type: string;
|
|
47
|
-
};
|
|
48
|
-
value: {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pixelEvents = void 0;
|
|
4
|
-
const models_1 = require("../../models");
|
|
5
|
-
const LeadData = {
|
|
6
|
-
Lead: {
|
|
7
|
-
additionalProperties: false,
|
|
8
|
-
properties: {
|
|
9
|
-
name: {},
|
|
10
|
-
data: {
|
|
11
|
-
type: 'object',
|
|
12
|
-
additionalProperties: false,
|
|
13
|
-
properties: {
|
|
14
|
-
content_category: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
},
|
|
17
|
-
content_name: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
},
|
|
20
|
-
currency: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
},
|
|
23
|
-
value: {
|
|
24
|
-
type: 'number',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
const ContactData = {
|
|
32
|
-
Contact: {
|
|
33
|
-
additionalProperties: false,
|
|
34
|
-
properties: {
|
|
35
|
-
name: {},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
const SubmitApplicationData = {
|
|
40
|
-
SubmitApplication: {
|
|
41
|
-
additionalProperties: false,
|
|
42
|
-
properties: {
|
|
43
|
-
name: {},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
exports.pixelEvents = {
|
|
48
|
-
type: 'array',
|
|
49
|
-
items: {
|
|
50
|
-
type: 'object',
|
|
51
|
-
required: ['name'],
|
|
52
|
-
additionalProperties: false,
|
|
53
|
-
properties: {
|
|
54
|
-
name: {
|
|
55
|
-
type: 'string',
|
|
56
|
-
enum: Object.values(models_1.PixelEventType),
|
|
57
|
-
},
|
|
58
|
-
data: {},
|
|
59
|
-
},
|
|
60
|
-
select: { $data: '0/name' },
|
|
61
|
-
selectCases: Object.assign(Object.assign(Object.assign({}, LeadData), ContactData), SubmitApplicationData),
|
|
62
|
-
},
|
|
63
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum Lang {
|
|
2
|
-
Ru = "ru",
|
|
3
|
-
En = "en"
|
|
4
|
-
}
|
|
5
|
-
interface Config {
|
|
6
|
-
lang?: Lang;
|
|
7
|
-
}
|
|
8
|
-
type Subscriber = (config: Config) => void;
|
|
9
|
-
export declare const configure: (newConfig: Config) => void;
|
|
10
|
-
export declare const subscribeConfigure: (sub: Subscriber) => () => void;
|
|
11
|
-
export declare const getConfig: () => Config;
|
|
12
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConfig = exports.subscribeConfigure = exports.configure = exports.Lang = void 0;
|
|
4
|
-
var Lang;
|
|
5
|
-
(function (Lang) {
|
|
6
|
-
Lang["Ru"] = "ru";
|
|
7
|
-
Lang["En"] = "en";
|
|
8
|
-
})(Lang = exports.Lang || (exports.Lang = {}));
|
|
9
|
-
let subs = [];
|
|
10
|
-
const config = {};
|
|
11
|
-
const configure = (newConfig) => {
|
|
12
|
-
Object.assign(config, newConfig);
|
|
13
|
-
subs.forEach((sub) => {
|
|
14
|
-
sub(config);
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
exports.configure = configure;
|
|
18
|
-
const subscribeConfigure = (sub) => {
|
|
19
|
-
subs.push(sub);
|
|
20
|
-
return () => {
|
|
21
|
-
subs = subs.filter((item) => item !== sub);
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
exports.subscribeConfigure = subscribeConfigure;
|
|
25
|
-
const getConfig = () => config;
|
|
26
|
-
exports.getConfig = getConfig;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { i18n } from '../i18n';
|
|
2
|
-
import { Lang } from './configure';
|
|
3
|
-
type KeysData = Parameters<typeof i18n.registerKeyset>[2];
|
|
4
|
-
export declare function registerKeyset<T extends KeysData>(data: Record<Lang, T>, keysetName: string): (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
5
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerKeyset = void 0;
|
|
4
|
-
const i18n_1 = require("../i18n");
|
|
5
|
-
function registerKeyset(data, keysetName) {
|
|
6
|
-
Object.entries(data).forEach(([lang, keys]) => i18n_1.i18n.registerKeyset(lang, keysetName, keys));
|
|
7
|
-
return i18n_1.i18n.keyset(keysetName);
|
|
8
|
-
}
|
|
9
|
-
exports.registerKeyset = registerKeyset;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './metrikaContext';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './metrikaContext';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Metrika, Pixel } from '../../models';
|
|
3
|
-
export interface MetrikaContextProps {
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Metrika will be deleted
|
|
6
|
-
*/
|
|
7
|
-
metrika?: Metrika;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Metrika will be deleted
|
|
10
|
-
*/
|
|
11
|
-
pixel?: Pixel;
|
|
12
|
-
}
|
|
13
|
-
export declare const MetrikaContext: React.Context<MetrikaContextProps>;
|
package/build/esm/i18n.d.ts
DELETED
package/build/esm/i18n.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { I18N } from '@gravity-ui/i18n';
|
|
2
|
-
import { Lang, getConfig, subscribeConfigure } from './utils/configure';
|
|
3
|
-
export const i18n = new I18N();
|
|
4
|
-
i18n.setLang(getConfig().lang || Lang.En);
|
|
5
|
-
subscribeConfigure((config) => {
|
|
6
|
-
if (config.lang) {
|
|
7
|
-
i18n.setLang(config.lang);
|
|
8
|
-
}
|
|
9
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { PixelEventType } from '../../models';
|
|
2
|
-
export declare const pixelEvents: {
|
|
3
|
-
type: string;
|
|
4
|
-
items: {
|
|
5
|
-
type: string;
|
|
6
|
-
required: string[];
|
|
7
|
-
additionalProperties: boolean;
|
|
8
|
-
properties: {
|
|
9
|
-
name: {
|
|
10
|
-
type: string;
|
|
11
|
-
enum: PixelEventType[];
|
|
12
|
-
};
|
|
13
|
-
data: {};
|
|
14
|
-
};
|
|
15
|
-
select: {
|
|
16
|
-
$data: string;
|
|
17
|
-
};
|
|
18
|
-
selectCases: {
|
|
19
|
-
SubmitApplication: {
|
|
20
|
-
additionalProperties: boolean;
|
|
21
|
-
properties: {
|
|
22
|
-
name: {};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
Contact: {
|
|
26
|
-
additionalProperties: boolean;
|
|
27
|
-
properties: {
|
|
28
|
-
name: {};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
Lead: {
|
|
32
|
-
additionalProperties: boolean;
|
|
33
|
-
properties: {
|
|
34
|
-
name: {};
|
|
35
|
-
data: {
|
|
36
|
-
type: string;
|
|
37
|
-
additionalProperties: boolean;
|
|
38
|
-
properties: {
|
|
39
|
-
content_category: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
content_name: {
|
|
43
|
-
type: string;
|
|
44
|
-
};
|
|
45
|
-
currency: {
|
|
46
|
-
type: string;
|
|
47
|
-
};
|
|
48
|
-
value: {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { PixelEventType } from '../../models';
|
|
2
|
-
const LeadData = {
|
|
3
|
-
Lead: {
|
|
4
|
-
additionalProperties: false,
|
|
5
|
-
properties: {
|
|
6
|
-
name: {},
|
|
7
|
-
data: {
|
|
8
|
-
type: 'object',
|
|
9
|
-
additionalProperties: false,
|
|
10
|
-
properties: {
|
|
11
|
-
content_category: {
|
|
12
|
-
type: 'string',
|
|
13
|
-
},
|
|
14
|
-
content_name: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
},
|
|
17
|
-
currency: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
},
|
|
20
|
-
value: {
|
|
21
|
-
type: 'number',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
const ContactData = {
|
|
29
|
-
Contact: {
|
|
30
|
-
additionalProperties: false,
|
|
31
|
-
properties: {
|
|
32
|
-
name: {},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
const SubmitApplicationData = {
|
|
37
|
-
SubmitApplication: {
|
|
38
|
-
additionalProperties: false,
|
|
39
|
-
properties: {
|
|
40
|
-
name: {},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
export const pixelEvents = {
|
|
45
|
-
type: 'array',
|
|
46
|
-
items: {
|
|
47
|
-
type: 'object',
|
|
48
|
-
required: ['name'],
|
|
49
|
-
additionalProperties: false,
|
|
50
|
-
properties: {
|
|
51
|
-
name: {
|
|
52
|
-
type: 'string',
|
|
53
|
-
enum: Object.values(PixelEventType),
|
|
54
|
-
},
|
|
55
|
-
data: {},
|
|
56
|
-
},
|
|
57
|
-
select: { $data: '0/name' },
|
|
58
|
-
selectCases: Object.assign(Object.assign(Object.assign({}, LeadData), ContactData), SubmitApplicationData),
|
|
59
|
-
},
|
|
60
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum Lang {
|
|
2
|
-
Ru = "ru",
|
|
3
|
-
En = "en"
|
|
4
|
-
}
|
|
5
|
-
interface Config {
|
|
6
|
-
lang?: Lang;
|
|
7
|
-
}
|
|
8
|
-
type Subscriber = (config: Config) => void;
|
|
9
|
-
export declare const configure: (newConfig: Config) => void;
|
|
10
|
-
export declare const subscribeConfigure: (sub: Subscriber) => () => void;
|
|
11
|
-
export declare const getConfig: () => Config;
|
|
12
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export var Lang;
|
|
2
|
-
(function (Lang) {
|
|
3
|
-
Lang["Ru"] = "ru";
|
|
4
|
-
Lang["En"] = "en";
|
|
5
|
-
})(Lang || (Lang = {}));
|
|
6
|
-
let subs = [];
|
|
7
|
-
const config = {};
|
|
8
|
-
export const configure = (newConfig) => {
|
|
9
|
-
Object.assign(config, newConfig);
|
|
10
|
-
subs.forEach((sub) => {
|
|
11
|
-
sub(config);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
export const subscribeConfigure = (sub) => {
|
|
15
|
-
subs.push(sub);
|
|
16
|
-
return () => {
|
|
17
|
-
subs = subs.filter((item) => item !== sub);
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export const getConfig = () => config;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { i18n } from '../i18n';
|
|
2
|
-
import { Lang } from './configure';
|
|
3
|
-
type KeysData = Parameters<typeof i18n.registerKeyset>[2];
|
|
4
|
-
export declare function registerKeyset<T extends KeysData>(data: Record<Lang, T>, keysetName: string): (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
5
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum Lang {
|
|
2
|
-
Ru = "ru",
|
|
3
|
-
En = "en"
|
|
4
|
-
}
|
|
5
|
-
interface Config {
|
|
6
|
-
lang?: Lang;
|
|
7
|
-
}
|
|
8
|
-
type Subscriber = (config: Config) => void;
|
|
9
|
-
export declare const configure: (newConfig: Config) => void;
|
|
10
|
-
export declare const subscribeConfigure: (sub: Subscriber) => () => void;
|
|
11
|
-
export declare const getConfig: () => Config;
|
|
12
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConfig = exports.subscribeConfigure = exports.configure = exports.Lang = void 0;
|
|
4
|
-
var Lang;
|
|
5
|
-
(function (Lang) {
|
|
6
|
-
Lang["Ru"] = "ru";
|
|
7
|
-
Lang["En"] = "en";
|
|
8
|
-
})(Lang = exports.Lang || (exports.Lang = {}));
|
|
9
|
-
let subs = [];
|
|
10
|
-
const config = {};
|
|
11
|
-
const configure = (newConfig) => {
|
|
12
|
-
Object.assign(config, newConfig);
|
|
13
|
-
subs.forEach((sub) => {
|
|
14
|
-
sub(config);
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
exports.configure = configure;
|
|
18
|
-
const subscribeConfigure = (sub) => {
|
|
19
|
-
subs.push(sub);
|
|
20
|
-
return () => {
|
|
21
|
-
subs = subs.filter((item) => item !== sub);
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
exports.subscribeConfigure = subscribeConfigure;
|
|
25
|
-
const getConfig = () => config;
|
|
26
|
-
exports.getConfig = getConfig;
|