@gravity-ui/page-constructor 4.58.1 → 4.60.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/build/cjs/components/YandexForm/YandexForm.js +5 -2
- package/build/cjs/text-transform/config.js +10 -0
- package/build/esm/components/YandexForm/YandexForm.js +5 -2
- package/build/esm/text-transform/config.js +10 -0
- package/package.json +1 -1
- package/server/text-transform/config.js +10 -0
- package/widget/index.js +1 -1
|
@@ -83,7 +83,7 @@ const YandexForm = (props) => {
|
|
|
83
83
|
try {
|
|
84
84
|
const parsed = JSON.parse(data);
|
|
85
85
|
const height = parsed['iframe-height'];
|
|
86
|
-
const { message, name } = parsed;
|
|
86
|
+
const { message, name, redirectUrl } = parsed;
|
|
87
87
|
if (name !== `form${id}`) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
@@ -91,7 +91,10 @@ const YandexForm = (props) => {
|
|
|
91
91
|
iframeRef.current.height = `${height}px`;
|
|
92
92
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
93
93
|
}
|
|
94
|
-
if (message === 'sent') {
|
|
94
|
+
if (message === 'sent' || redirectUrl) {
|
|
95
|
+
// event with redirectUrl is comming when form with redirect is used
|
|
96
|
+
// otherwise, message: 'sent' is not comming on such sort of forms
|
|
97
|
+
// to catch this event and handle analytics redirectUrl is added to condition
|
|
95
98
|
handleSubmit();
|
|
96
99
|
}
|
|
97
100
|
}
|
|
@@ -113,6 +113,16 @@ exports.config = {
|
|
|
113
113
|
transformer: common_1.typografTransformer,
|
|
114
114
|
},
|
|
115
115
|
],
|
|
116
|
+
[models_1.SubBlockType.ImageCard]: [
|
|
117
|
+
{
|
|
118
|
+
fields: ['text', 'additionalInfo'],
|
|
119
|
+
transformer: common_1.yfmTransformer,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
fields: ['title'],
|
|
123
|
+
transformer: common_1.typografTransformer,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
116
126
|
[models_1.SubBlockType.LayoutItem]: [
|
|
117
127
|
{
|
|
118
128
|
fields: ['content'],
|
|
@@ -79,7 +79,7 @@ const YandexForm = (props) => {
|
|
|
79
79
|
try {
|
|
80
80
|
const parsed = JSON.parse(data);
|
|
81
81
|
const height = parsed['iframe-height'];
|
|
82
|
-
const { message, name } = parsed;
|
|
82
|
+
const { message, name, redirectUrl } = parsed;
|
|
83
83
|
if (name !== `form${id}`) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
@@ -87,7 +87,10 @@ const YandexForm = (props) => {
|
|
|
87
87
|
iframeRef.current.height = `${height}px`;
|
|
88
88
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
89
89
|
}
|
|
90
|
-
if (message === 'sent') {
|
|
90
|
+
if (message === 'sent' || redirectUrl) {
|
|
91
|
+
// event with redirectUrl is comming when form with redirect is used
|
|
92
|
+
// otherwise, message: 'sent' is not comming on such sort of forms
|
|
93
|
+
// to catch this event and handle analytics redirectUrl is added to condition
|
|
91
94
|
handleSubmit();
|
|
92
95
|
}
|
|
93
96
|
}
|
|
@@ -110,6 +110,16 @@ export const config = {
|
|
|
110
110
|
transformer: typografTransformer,
|
|
111
111
|
},
|
|
112
112
|
],
|
|
113
|
+
[SubBlockType.ImageCard]: [
|
|
114
|
+
{
|
|
115
|
+
fields: ['text', 'additionalInfo'],
|
|
116
|
+
transformer: yfmTransformer,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
fields: ['title'],
|
|
120
|
+
transformer: typografTransformer,
|
|
121
|
+
},
|
|
122
|
+
],
|
|
113
123
|
[SubBlockType.LayoutItem]: [
|
|
114
124
|
{
|
|
115
125
|
fields: ['content'],
|
package/package.json
CHANGED
|
@@ -123,6 +123,16 @@ exports.config = {
|
|
|
123
123
|
transformer: common_1.typografTransformer,
|
|
124
124
|
},
|
|
125
125
|
],
|
|
126
|
+
[models_1.SubBlockType.ImageCard]: [
|
|
127
|
+
{
|
|
128
|
+
fields: ['text', 'additionalInfo'],
|
|
129
|
+
transformer: common_1.yfmTransformer,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
fields: ['title'],
|
|
133
|
+
transformer: common_1.typografTransformer,
|
|
134
|
+
},
|
|
135
|
+
],
|
|
126
136
|
[models_1.SubBlockType.LayoutItem]: [
|
|
127
137
|
{
|
|
128
138
|
fields: ['content'],
|