@gravity-ui/blog-constructor 3.4.0 → 3.4.1

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.4.1](https://github.com/gravity-ui/blog-constructor/compare/v3.4.0...v3.4.1) (2023-05-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * return js, jsx files to gulpfile.js ([#58](https://github.com/gravity-ui/blog-constructor/issues/58)) ([d5e4c42](https://github.com/gravity-ui/blog-constructor/commit/d5e4c428e8eae56fd7ab381c2969c04955adc45b))
9
+
3
10
  ## [3.4.0](https://github.com/gravity-ui/blog-constructor/compare/v3.3.0...v3.4.0) (2023-05-24)
4
11
 
5
12
 
@@ -0,0 +1,62 @@
1
+ export function initCounters(configs: any): void;
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;
20
+ declare function hit(...args: any[]): void;
21
+ declare function params(...args: any[]): void;
22
+ declare function reachGoal(counterName: any, ...args: any[]): void;
23
+ declare function reachGoals(goals: any, counterName?: string): void;
24
+ /**
25
+ * @deprecated Metrika will be deleted after launch of analyticsEvents
26
+ */
27
+ declare const Goal: {
28
+ SUPPORT_OPEN_FORM: string;
29
+ SUPPORT_STEP_1_SUBMIT: string;
30
+ SUPPORT_STEP_2_SUBMIT: string;
31
+ SUPPORT_STEP_3_SUBMIT: string;
32
+ SUPPORT_THANKYOU_SUBMIT: string;
33
+ MP_OPEN_FORM: string;
34
+ EDIT_ON_GITHUB: string;
35
+ MAIN_GO_TO_VAR: string;
36
+ MAIN_GO_TO_ISV: string;
37
+ MAIN_ALL_PARTNERS: string;
38
+ FIND_GO_TO_VAR: string;
39
+ ISV_GO_TO_MP: string;
40
+ FOOTER_SUBSCRIBE: string;
41
+ FOOTER_MNG_SUBSCRIPTIONS: string;
42
+ MOBILE_STORE_IOS: string;
43
+ MOBILE_STORE_ANDROID: string;
44
+ REGION_POPUP_SHOW: string;
45
+ REGION_POPUP_YES: string;
46
+ REGION_POPUP_NO: string;
47
+ REGION_POPUP_CLOSE: string;
48
+ SCALE_REGISTRATION: string;
49
+ DLGOTOPRODUCT_MPSITE: string;
50
+ MPK8S_CLCK: string;
51
+ 'SITE_CALCULATOR_SHARE-RESULT_CLICK': string;
52
+ };
53
+ declare function getServicePrefix(id: any): "CMPT" | "IAM" | "VPC" | "STRG" | "SK" | "CH" | "MONGO" | "POSTGR" | "MR" | "MMSQL" | "MK" | "TRSL" | "INSTGR" | "LB" | "MQ" | "DL" | "MNTRG" | "DP" | "KMS" | "YDB" | "INTRCNCT" | undefined;
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;
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initCounters = void 0;
4
+ /**
5
+ * @deprecated Metrika will be deleted after launch of analyticsEvents
6
+ */
7
+ const Goal = {
8
+ SUPPORT_OPEN_FORM: 'SUPPORTOPENFORM',
9
+ SUPPORT_STEP_1_SUBMIT: 'SUPPORTSTEP1SUBMIT',
10
+ SUPPORT_STEP_2_SUBMIT: 'SUPPORTSTEP2SUBMIT',
11
+ SUPPORT_STEP_3_SUBMIT: 'SUPPORTSTEP3SUBMIT',
12
+ SUPPORT_THANKYOU_SUBMIT: 'SUPPORTTHANKYOUSUBMIT',
13
+ MP_OPEN_FORM: 'MPOPENFORM',
14
+ EDIT_ON_GITHUB: 'EDITONGITHUB',
15
+ MAIN_GO_TO_VAR: 'MAINGOTOVAR',
16
+ MAIN_GO_TO_ISV: 'MAINGOTOISV',
17
+ MAIN_ALL_PARTNERS: 'MAINALLPARTNERS',
18
+ FIND_GO_TO_VAR: 'FINDGOTOVAR',
19
+ ISV_GO_TO_MP: 'ISVGOTOMP',
20
+ FOOTER_SUBSCRIBE: 'FOOTERSUBSCRIBE',
21
+ FOOTER_MNG_SUBSCRIPTIONS: 'FOOTERMNGSUBSCRIPTIONS',
22
+ MOBILE_STORE_IOS: '154_Mobile_App_Store_Badge',
23
+ MOBILE_STORE_ANDROID: '155_Mobile_Google_Play_Badge',
24
+ REGION_POPUP_SHOW: 'REGIONPOPUP',
25
+ REGION_POPUP_YES: 'REGIONPOPUPYES',
26
+ REGION_POPUP_NO: 'REGIONPOPUPNO',
27
+ REGION_POPUP_CLOSE: 'REGIONPOPUPCLOSE',
28
+ SCALE_REGISTRATION: 'Scale_registration',
29
+ DLGOTOPRODUCT_MPSITE: 'DLGOTOPRODUCT_MPSITE',
30
+ MPK8S_CLCK: 'MPK8S_CLCK',
31
+ 'SITE_CALCULATOR_SHARE-RESULT_CLICK': 'SITE_CALCULATOR_SHARE-RESULT_CLICK',
32
+ };
33
+ const HIT_COUNTERS = ['main', 'cross-site', 'scale'];
34
+ const counterIds = {};
35
+ function getCounter(name) {
36
+ const counterId = counterIds[name];
37
+ return window['yaCounter' + counterId];
38
+ }
39
+ function initCounters(configs) {
40
+ configs.forEach((config) => {
41
+ counterIds[config.name] = config.id;
42
+ });
43
+ }
44
+ exports.initCounters = initCounters;
45
+ function hit(...args) {
46
+ HIT_COUNTERS.forEach((counterName) => {
47
+ const counter = getCounter(counterName);
48
+ if (!counter) {
49
+ return;
50
+ }
51
+ counter.hit(...args);
52
+ });
53
+ }
54
+ function params(...args) {
55
+ const counter = getCounter('main');
56
+ if (!counter) {
57
+ return;
58
+ }
59
+ counter.params(...args);
60
+ }
61
+ function reachGoal(counterName, ...args) {
62
+ const counter = getCounter(counterName);
63
+ if (!counter) {
64
+ return;
65
+ }
66
+ counter.reachGoal(...args);
67
+ }
68
+ function reachGoals(goals, counterName = 'main') {
69
+ if (!goals) {
70
+ return;
71
+ }
72
+ const goalsArray = Array.isArray(goals) ? goals : [goals];
73
+ goalsArray.forEach((goal) => {
74
+ if (typeof goal === 'object') {
75
+ reachGoal(counterName, goal.name, goal.params);
76
+ }
77
+ else {
78
+ reachGoal(counterName, goal);
79
+ }
80
+ });
81
+ }
82
+ // eslint-disable-next-line complexity
83
+ function getServicePrefix(id) {
84
+ switch (id) {
85
+ case 'compute':
86
+ return 'CMPT';
87
+ case 'iam':
88
+ return 'IAM';
89
+ case 'vpc':
90
+ return 'VPC';
91
+ case 'storage':
92
+ return 'STRG';
93
+ case 'speechkit':
94
+ return 'SK';
95
+ case 'managed-clickhouse':
96
+ return 'CH';
97
+ case 'managed-mongodb':
98
+ return 'MONGO';
99
+ case 'managed-postgresql':
100
+ return 'POSTGR';
101
+ case 'managed-redis':
102
+ return 'MR';
103
+ case 'managed-mysql':
104
+ return 'MMSQL';
105
+ case 'managed-kubernetes':
106
+ return 'MK';
107
+ case 'translate':
108
+ return 'TRSL';
109
+ case 'instance-groups':
110
+ return 'INSTGR';
111
+ case 'load-balancer':
112
+ return 'LB';
113
+ case 'message-queue':
114
+ return 'MQ';
115
+ case 'datalens':
116
+ return 'DL';
117
+ case 'monitoring':
118
+ return 'MNTRG';
119
+ case 'data-proc':
120
+ return 'DP';
121
+ case 'kms':
122
+ return 'KMS';
123
+ case 'ydb':
124
+ return 'YDB';
125
+ case 'interconnect':
126
+ return 'INTRCNCT';
127
+ }
128
+ return undefined;
129
+ }
130
+ function getMarketPlacePrefix(id) {
131
+ return `product_${id}_`;
132
+ }
133
+ function goalGoToConsole(prefix) {
134
+ return prefix && `${prefix}GOTOCONSOLE`;
135
+ }
136
+ function goalGoToForm(prefix) {
137
+ return prefix && `${prefix}GOTOFORM`;
138
+ }
139
+ function goalGoToDocs(prefix) {
140
+ return prefix && `${prefix}GOTODOCS`;
141
+ }
142
+ function goalFormSubmit(prefix) {
143
+ return prefix && `${prefix}FORMSUBMIT`;
144
+ }
145
+ function goalEventFormSubmit(id) {
146
+ return `event${id || 's'}_form_submit`;
147
+ }
148
+ function goalEventVideoAction(id, action) {
149
+ return `event${id}_video_${action}`;
150
+ }
151
+ function goalCaseFormSubmit(id) {
152
+ return `case${id ? `_${id}` : 's'}_form_submit`;
153
+ }
154
+ function goalSwitchLang(place) {
155
+ return `SWITCH_LANG_${place}`;
156
+ }
157
+ exports.default = {
158
+ hit,
159
+ params,
160
+ reachGoal,
161
+ reachGoals,
162
+ Goal,
163
+ getServicePrefix,
164
+ getMarketPlacePrefix,
165
+ goalGoToConsole,
166
+ goalGoToForm,
167
+ goalGoToDocs,
168
+ goalFormSubmit,
169
+ goalEventFormSubmit,
170
+ goalEventVideoAction,
171
+ goalCaseFormSubmit,
172
+ goalSwitchLang,
173
+ };
@@ -0,0 +1,62 @@
1
+ export function initCounters(configs: any): void;
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;
20
+ declare function hit(...args: any[]): void;
21
+ declare function params(...args: any[]): void;
22
+ declare function reachGoal(counterName: any, ...args: any[]): void;
23
+ declare function reachGoals(goals: any, counterName?: string): void;
24
+ /**
25
+ * @deprecated Metrika will be deleted after launch of analyticsEvents
26
+ */
27
+ declare const Goal: {
28
+ SUPPORT_OPEN_FORM: string;
29
+ SUPPORT_STEP_1_SUBMIT: string;
30
+ SUPPORT_STEP_2_SUBMIT: string;
31
+ SUPPORT_STEP_3_SUBMIT: string;
32
+ SUPPORT_THANKYOU_SUBMIT: string;
33
+ MP_OPEN_FORM: string;
34
+ EDIT_ON_GITHUB: string;
35
+ MAIN_GO_TO_VAR: string;
36
+ MAIN_GO_TO_ISV: string;
37
+ MAIN_ALL_PARTNERS: string;
38
+ FIND_GO_TO_VAR: string;
39
+ ISV_GO_TO_MP: string;
40
+ FOOTER_SUBSCRIBE: string;
41
+ FOOTER_MNG_SUBSCRIPTIONS: string;
42
+ MOBILE_STORE_IOS: string;
43
+ MOBILE_STORE_ANDROID: string;
44
+ REGION_POPUP_SHOW: string;
45
+ REGION_POPUP_YES: string;
46
+ REGION_POPUP_NO: string;
47
+ REGION_POPUP_CLOSE: string;
48
+ SCALE_REGISTRATION: string;
49
+ DLGOTOPRODUCT_MPSITE: string;
50
+ MPK8S_CLCK: string;
51
+ 'SITE_CALCULATOR_SHARE-RESULT_CLICK': string;
52
+ };
53
+ declare function getServicePrefix(id: any): "CMPT" | "IAM" | "VPC" | "STRG" | "SK" | "CH" | "MONGO" | "POSTGR" | "MR" | "MMSQL" | "MK" | "TRSL" | "INSTGR" | "LB" | "MQ" | "DL" | "MNTRG" | "DP" | "KMS" | "YDB" | "INTRCNCT" | undefined;
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;
@@ -0,0 +1,169 @@
1
+ /**
2
+ * @deprecated Metrika will be deleted after launch of analyticsEvents
3
+ */
4
+ const Goal = {
5
+ SUPPORT_OPEN_FORM: 'SUPPORTOPENFORM',
6
+ SUPPORT_STEP_1_SUBMIT: 'SUPPORTSTEP1SUBMIT',
7
+ SUPPORT_STEP_2_SUBMIT: 'SUPPORTSTEP2SUBMIT',
8
+ SUPPORT_STEP_3_SUBMIT: 'SUPPORTSTEP3SUBMIT',
9
+ SUPPORT_THANKYOU_SUBMIT: 'SUPPORTTHANKYOUSUBMIT',
10
+ MP_OPEN_FORM: 'MPOPENFORM',
11
+ EDIT_ON_GITHUB: 'EDITONGITHUB',
12
+ MAIN_GO_TO_VAR: 'MAINGOTOVAR',
13
+ MAIN_GO_TO_ISV: 'MAINGOTOISV',
14
+ MAIN_ALL_PARTNERS: 'MAINALLPARTNERS',
15
+ FIND_GO_TO_VAR: 'FINDGOTOVAR',
16
+ ISV_GO_TO_MP: 'ISVGOTOMP',
17
+ FOOTER_SUBSCRIBE: 'FOOTERSUBSCRIBE',
18
+ FOOTER_MNG_SUBSCRIPTIONS: 'FOOTERMNGSUBSCRIPTIONS',
19
+ MOBILE_STORE_IOS: '154_Mobile_App_Store_Badge',
20
+ MOBILE_STORE_ANDROID: '155_Mobile_Google_Play_Badge',
21
+ REGION_POPUP_SHOW: 'REGIONPOPUP',
22
+ REGION_POPUP_YES: 'REGIONPOPUPYES',
23
+ REGION_POPUP_NO: 'REGIONPOPUPNO',
24
+ REGION_POPUP_CLOSE: 'REGIONPOPUPCLOSE',
25
+ SCALE_REGISTRATION: 'Scale_registration',
26
+ DLGOTOPRODUCT_MPSITE: 'DLGOTOPRODUCT_MPSITE',
27
+ MPK8S_CLCK: 'MPK8S_CLCK',
28
+ 'SITE_CALCULATOR_SHARE-RESULT_CLICK': 'SITE_CALCULATOR_SHARE-RESULT_CLICK',
29
+ };
30
+ const HIT_COUNTERS = ['main', 'cross-site', 'scale'];
31
+ const counterIds = {};
32
+ function getCounter(name) {
33
+ const counterId = counterIds[name];
34
+ return window['yaCounter' + counterId];
35
+ }
36
+ export function initCounters(configs) {
37
+ configs.forEach((config) => {
38
+ counterIds[config.name] = config.id;
39
+ });
40
+ }
41
+ function hit(...args) {
42
+ HIT_COUNTERS.forEach((counterName) => {
43
+ const counter = getCounter(counterName);
44
+ if (!counter) {
45
+ return;
46
+ }
47
+ counter.hit(...args);
48
+ });
49
+ }
50
+ function params(...args) {
51
+ const counter = getCounter('main');
52
+ if (!counter) {
53
+ return;
54
+ }
55
+ counter.params(...args);
56
+ }
57
+ function reachGoal(counterName, ...args) {
58
+ const counter = getCounter(counterName);
59
+ if (!counter) {
60
+ return;
61
+ }
62
+ counter.reachGoal(...args);
63
+ }
64
+ function reachGoals(goals, counterName = 'main') {
65
+ if (!goals) {
66
+ return;
67
+ }
68
+ const goalsArray = Array.isArray(goals) ? goals : [goals];
69
+ goalsArray.forEach((goal) => {
70
+ if (typeof goal === 'object') {
71
+ reachGoal(counterName, goal.name, goal.params);
72
+ }
73
+ else {
74
+ reachGoal(counterName, goal);
75
+ }
76
+ });
77
+ }
78
+ // eslint-disable-next-line complexity
79
+ function getServicePrefix(id) {
80
+ switch (id) {
81
+ case 'compute':
82
+ return 'CMPT';
83
+ case 'iam':
84
+ return 'IAM';
85
+ case 'vpc':
86
+ return 'VPC';
87
+ case 'storage':
88
+ return 'STRG';
89
+ case 'speechkit':
90
+ return 'SK';
91
+ case 'managed-clickhouse':
92
+ return 'CH';
93
+ case 'managed-mongodb':
94
+ return 'MONGO';
95
+ case 'managed-postgresql':
96
+ return 'POSTGR';
97
+ case 'managed-redis':
98
+ return 'MR';
99
+ case 'managed-mysql':
100
+ return 'MMSQL';
101
+ case 'managed-kubernetes':
102
+ return 'MK';
103
+ case 'translate':
104
+ return 'TRSL';
105
+ case 'instance-groups':
106
+ return 'INSTGR';
107
+ case 'load-balancer':
108
+ return 'LB';
109
+ case 'message-queue':
110
+ return 'MQ';
111
+ case 'datalens':
112
+ return 'DL';
113
+ case 'monitoring':
114
+ return 'MNTRG';
115
+ case 'data-proc':
116
+ return 'DP';
117
+ case 'kms':
118
+ return 'KMS';
119
+ case 'ydb':
120
+ return 'YDB';
121
+ case 'interconnect':
122
+ return 'INTRCNCT';
123
+ }
124
+ return undefined;
125
+ }
126
+ function getMarketPlacePrefix(id) {
127
+ return `product_${id}_`;
128
+ }
129
+ function goalGoToConsole(prefix) {
130
+ return prefix && `${prefix}GOTOCONSOLE`;
131
+ }
132
+ function goalGoToForm(prefix) {
133
+ return prefix && `${prefix}GOTOFORM`;
134
+ }
135
+ function goalGoToDocs(prefix) {
136
+ return prefix && `${prefix}GOTODOCS`;
137
+ }
138
+ function goalFormSubmit(prefix) {
139
+ return prefix && `${prefix}FORMSUBMIT`;
140
+ }
141
+ function goalEventFormSubmit(id) {
142
+ return `event${id || 's'}_form_submit`;
143
+ }
144
+ function goalEventVideoAction(id, action) {
145
+ return `event${id}_video_${action}`;
146
+ }
147
+ function goalCaseFormSubmit(id) {
148
+ return `case${id ? `_${id}` : 's'}_form_submit`;
149
+ }
150
+ function goalSwitchLang(place) {
151
+ return `SWITCH_LANG_${place}`;
152
+ }
153
+ export default {
154
+ hit,
155
+ params,
156
+ reachGoal,
157
+ reachGoals,
158
+ Goal,
159
+ getServicePrefix,
160
+ getMarketPlacePrefix,
161
+ goalGoToConsole,
162
+ goalGoToForm,
163
+ goalGoToDocs,
164
+ goalFormSubmit,
165
+ goalEventFormSubmit,
166
+ goalEventVideoAction,
167
+ goalCaseFormSubmit,
168
+ goalSwitchLang,
169
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {