@gravity-ui/page-constructor 5.10.0 → 5.11.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.
@@ -4,7 +4,8 @@
4
4
  align-items: baseline;
5
5
  }
6
6
  .pc-links__link {
7
- margin-top: 0px;
7
+ /* stylelint-disable-next-line declaration-no-important */
8
+ margin-top: 0px !important;
8
9
  }
9
10
  .pc-links_size_s {
10
11
  gap: 8px;
@@ -72,7 +72,7 @@ const YandexForm = (props) => {
72
72
  try {
73
73
  const parsed = JSON.parse(data);
74
74
  const height = parsed['iframe-height'];
75
- const { message, name } = parsed;
75
+ const { message, name, redirectUrl } = parsed;
76
76
  if (name !== `form${id}`) {
77
77
  return;
78
78
  }
@@ -80,7 +80,10 @@ const YandexForm = (props) => {
80
80
  iframeRef.current.height = `${height}px`;
81
81
  onLoad === null || onLoad === void 0 ? void 0 : onLoad();
82
82
  }
83
- if (message === 'sent') {
83
+ if (message === 'sent' || redirectUrl) {
84
+ // event with redirectUrl is comming when form with redirect is used
85
+ // otherwise, message: 'sent' is not comming on such sort of forms
86
+ // to catch this event and handle analytics redirectUrl is added to condition
84
87
  handleSubmit();
85
88
  }
86
89
  }
@@ -4,7 +4,8 @@
4
4
  align-items: baseline;
5
5
  }
6
6
  .pc-links__link {
7
- margin-top: 0px;
7
+ /* stylelint-disable-next-line declaration-no-important */
8
+ margin-top: 0px !important;
8
9
  }
9
10
  .pc-links_size_s {
10
11
  gap: 8px;
@@ -68,7 +68,7 @@ const YandexForm = (props) => {
68
68
  try {
69
69
  const parsed = JSON.parse(data);
70
70
  const height = parsed['iframe-height'];
71
- const { message, name } = parsed;
71
+ const { message, name, redirectUrl } = parsed;
72
72
  if (name !== `form${id}`) {
73
73
  return;
74
74
  }
@@ -76,7 +76,10 @@ const YandexForm = (props) => {
76
76
  iframeRef.current.height = `${height}px`;
77
77
  onLoad === null || onLoad === void 0 ? void 0 : onLoad();
78
78
  }
79
- if (message === 'sent') {
79
+ if (message === 'sent' || redirectUrl) {
80
+ // event with redirectUrl is comming when form with redirect is used
81
+ // otherwise, message: 'sent' is not comming on such sort of forms
82
+ // to catch this event and handle analytics redirectUrl is added to condition
80
83
  handleSubmit();
81
84
  }
82
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -65,8 +65,8 @@
65
65
  "lint": "run-p lint:js lint:styles lint:prettier typecheck",
66
66
  "typecheck": "tsc --noEmit",
67
67
  "dev": "npm run storybook:start",
68
- "storybook:start": "sb dev -p 7009",
69
- "storybook:build": "sb build -c .storybook -o storybook-static",
68
+ "storybook:start": "storybook dev -p 7009",
69
+ "storybook:build": "storybook build -c .storybook -o storybook-static",
70
70
  "start": "node dist",
71
71
  "clean": "gulp clean",
72
72
  "build:client": "gulp",
@@ -131,14 +131,15 @@
131
131
  "@gravity-ui/uikit": "^6.2.0",
132
132
  "@playwright/experimental-ct-react": "^1.38.1",
133
133
  "@playwright/test": "^1.38.1",
134
- "@storybook/addon-actions": "^7.6.17",
135
- "@storybook/addon-essentials": "^7.6.17",
134
+ "@storybook/addon-actions": "8.0.5",
135
+ "@storybook/addon-essentials": "8.0.5",
136
136
  "@storybook/addon-knobs": "^7.0.2",
137
- "@storybook/addon-mdx-gfm": "^7.6.17",
138
- "@storybook/addon-viewport": "^7.6.17",
137
+ "@storybook/addon-mdx-gfm": "8.0.5",
138
+ "@storybook/addon-viewport": "8.0.5",
139
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
139
140
  "@storybook/preset-scss": "^1.0.3",
140
- "@storybook/react": "^7.6.17",
141
- "@storybook/react-webpack5": "^7.6.17",
141
+ "@storybook/react": "8.0.5",
142
+ "@storybook/react-webpack5": "8.0.5",
142
143
  "@testing-library/jest-dom": "^5.16.5",
143
144
  "@testing-library/react": "^13.4.0",
144
145
  "@testing-library/user-event": "^14.4.3",
@@ -191,7 +192,7 @@
191
192
  "rimraf": "^3.0.2",
192
193
  "sass": "^1.63.6",
193
194
  "sass-loader": "^10.4.1",
194
- "storybook": "^7.6.17",
195
+ "storybook": "8.0.5",
195
196
  "string-replace-loader": "^3.1.0",
196
197
  "style-loader": "^2.0.0",
197
198
  "stylelint": "^14.11.0",