@gravity-ui/page-constructor 2.3.2 → 2.5.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.
Files changed (345) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/cjs/blocks/Banner/Banner.js +1 -1
  3. package/build/cjs/blocks/CardLayout/CardLayout.js +2 -2
  4. package/build/cjs/blocks/Companies/Companies.js +2 -2
  5. package/build/cjs/blocks/ContentLayout/ContentLayout.js +3 -3
  6. package/build/cjs/blocks/ContentLayout/schema.js +5 -5
  7. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +7 -7
  8. package/build/cjs/blocks/FilterBlock/FilterBlock.js +4 -4
  9. package/build/cjs/blocks/Header/Header.js +13 -13
  10. package/build/cjs/blocks/Header/schema.js +1 -1
  11. package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +3 -3
  12. package/build/cjs/blocks/Icons/Icons.js +1 -1
  13. package/build/cjs/blocks/Info/Info.js +2 -2
  14. package/build/cjs/blocks/Info/schema.js +1 -1
  15. package/build/cjs/blocks/LinkTable/LinkTable.js +3 -3
  16. package/build/cjs/blocks/LinkTable/schema.js +1 -1
  17. package/build/cjs/blocks/Media/Media.js +1 -1
  18. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -1
  19. package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +3 -3
  20. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +1 -1
  21. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +1 -1
  22. package/build/cjs/blocks/Preview/Preview.js +4 -4
  23. package/build/cjs/blocks/Preview/schema.js +1 -1
  24. package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +6 -6
  25. package/build/cjs/blocks/Questions/Questions.js +2 -2
  26. package/build/cjs/blocks/Security/Security.js +1 -1
  27. package/build/cjs/blocks/Security/schema.js +1 -1
  28. package/build/cjs/blocks/Share/Share.js +5 -5
  29. package/build/cjs/blocks/Simple/Simple.js +1 -1
  30. package/build/cjs/blocks/Slider/Arrow/Arrow.js +1 -1
  31. package/build/cjs/blocks/Slider/Slider.d.ts +1 -1
  32. package/build/cjs/blocks/Slider/Slider.js +10 -10
  33. package/build/cjs/blocks/Slider/utils.js +1 -1
  34. package/build/cjs/blocks/Table/Table.js +2 -2
  35. package/build/cjs/blocks/Tabs/Tabs.js +9 -9
  36. package/build/cjs/blocks/Tabs/schema.js +3 -3
  37. package/build/cjs/components/Author/Author.js +1 -1
  38. package/build/cjs/components/BackLink/BackLink.js +1 -1
  39. package/build/cjs/components/BackLink/__tests__/BackLink.test.js +1 -1
  40. package/build/cjs/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
  41. package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +2 -2
  42. package/build/cjs/components/BalancedMasonry/BalancedMasonry.js +1 -1
  43. package/build/cjs/components/BlockBase/BlockBase.js +1 -1
  44. package/build/cjs/components/BlockHeader/BlockHeader.d.ts +1 -1
  45. package/build/cjs/components/BlockHeader/BlockHeader.js +2 -2
  46. package/build/cjs/components/Button/Button.js +4 -4
  47. package/build/cjs/components/Button/__tests__/Button.test.js +1 -1
  48. package/build/cjs/components/CardBase/CardBase.d.ts +1 -1
  49. package/build/cjs/components/CardBase/CardBase.js +3 -3
  50. package/build/cjs/components/FileLink/FileLink.js +1 -1
  51. package/build/cjs/components/Foldable/Foldable.js +1 -1
  52. package/build/cjs/components/FullWidthBackground/FullWidthBackground.d.ts +1 -1
  53. package/build/cjs/components/FullWidthBackground/FullWidthBackground.js +1 -1
  54. package/build/cjs/components/FullscreenImage/FullscreenImage.js +1 -1
  55. package/build/cjs/components/FullscreenMedia/FullScreenMedia.js +2 -2
  56. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +8 -4
  57. package/build/cjs/components/Image/Image.js +1 -1
  58. package/build/cjs/components/Link/Link.d.ts +1 -1
  59. package/build/cjs/components/Link/Link.js +6 -6
  60. package/build/cjs/components/Link/Links.d.ts +1 -1
  61. package/build/cjs/components/Map/GoogleMap.js +3 -3
  62. package/build/cjs/components/Map/Map.js +1 -1
  63. package/build/cjs/components/Map/YMap/YMap.d.ts +1 -1
  64. package/build/cjs/components/Map/YMap/YandexMap.js +4 -4
  65. package/build/cjs/components/Map/YMap/YandexMapApiLoader.js +1 -1
  66. package/build/cjs/components/Media/Image/Image.js +8 -8
  67. package/build/cjs/components/Media/Media.js +2 -2
  68. package/build/cjs/components/Media/Video/Video.js +4 -4
  69. package/build/cjs/components/MediaBase/MediaBase.js +2 -2
  70. package/build/cjs/components/MediaBase/MediaBaseContent.js +1 -1
  71. package/build/cjs/components/OverflowScroller/OverflowScroller.js +1 -1
  72. package/build/cjs/components/ReactPlayer/ReactPlayer.js +5 -5
  73. package/build/cjs/components/Table/Table.d.ts +1 -1
  74. package/build/cjs/components/Table/Table.js +1 -1
  75. package/build/cjs/components/Title/Title.d.ts +1 -1
  76. package/build/cjs/components/Title/Title.js +2 -2
  77. package/build/cjs/components/ToggleArrow/ToggleArrow.js +1 -1
  78. package/build/cjs/components/VideoBlock/VideoBlock.js +1 -1
  79. package/build/cjs/components/YFMWrapper/YFMWrapper.d.ts +1 -1
  80. package/build/cjs/components/YandexForm/YandexForm.js +4 -4
  81. package/build/cjs/constructor-items.js +1 -1
  82. package/build/cjs/containers/Loadable/Loadable.js +1 -1
  83. package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +1 -1
  84. package/build/cjs/containers/PageConstructor/PageConstructor.js +7 -7
  85. package/build/cjs/containers/PageConstructor/Provider.d.ts +3 -3
  86. package/build/cjs/containers/PageConstructor/Provider.js +5 -5
  87. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +4 -4
  88. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  89. package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.d.ts +1 -1
  90. package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +2 -2
  91. package/build/cjs/context/theme/ThemeProvider.js +1 -1
  92. package/build/cjs/grid/Col/Col.d.ts +2 -2
  93. package/build/cjs/grid/Row/Row.d.ts +1 -1
  94. package/build/cjs/grid/utils.d.ts +1 -1
  95. package/build/cjs/hooks/useAnalytics.js +2 -2
  96. package/build/cjs/hooks/useFocus.js +1 -1
  97. package/build/cjs/hooks/useWindowBreakpoint.js +1 -1
  98. package/build/cjs/models/common.d.ts +2 -1
  99. package/build/cjs/models/common.js +1 -0
  100. package/build/cjs/models/constructor-items/blocks.d.ts +2 -2
  101. package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -2
  102. package/build/cjs/models/constructor.d.ts +1 -1
  103. package/build/cjs/models/navigation.d.ts +1 -1
  104. package/build/cjs/navigation/components/Header/Header.js +5 -5
  105. package/build/cjs/navigation/components/Logo/Logo.js +6 -6
  106. package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.js +1 -1
  107. package/build/cjs/navigation/components/Navigation/Navigation.js +2 -2
  108. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +2 -2
  109. package/build/cjs/navigation/components/NavigationItem/components/ContentWrapper/ContentWrapper.js +1 -1
  110. package/build/cjs/navigation/components/NavigationItem/components/GithubButton/GithubButton.d.ts +1 -1
  111. package/build/cjs/navigation/components/NavigationItem/components/GithubButton/GithubButton.js +1 -1
  112. package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +1 -1
  113. package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.d.ts +1 -1
  114. package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.js +5 -5
  115. package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.d.ts +1 -1
  116. package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +7 -7
  117. package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
  118. package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +2 -2
  119. package/build/cjs/navigation/components/SocialIcon/SocialIcon.js +4 -4
  120. package/build/cjs/navigation/schema.js +2 -2
  121. package/build/cjs/schema/index.js +2 -2
  122. package/build/cjs/schema/validators/common.js +2 -2
  123. package/build/cjs/schema/validators/index.d.ts +2 -2
  124. package/build/cjs/schema/validators/index.js +2 -2
  125. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  126. package/build/cjs/sub-blocks/BackgroundCard/schema.js +5 -5
  127. package/build/cjs/sub-blocks/BannerCard/BannerCard.js +1 -1
  128. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +5 -5
  129. package/build/cjs/sub-blocks/BasicCard/schema.js +4 -4
  130. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +2 -2
  131. package/build/cjs/sub-blocks/Content/Content.d.ts +1 -1
  132. package/build/cjs/sub-blocks/Content/Content.js +1 -1
  133. package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +1 -1
  134. package/build/cjs/sub-blocks/HubspotForm/index.js +3 -3
  135. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +2 -2
  136. package/build/cjs/sub-blocks/LayoutItem/schema.js +3 -3
  137. package/build/cjs/sub-blocks/MediaCard/MediaCard.js +1 -1
  138. package/build/cjs/sub-blocks/NewsCard/NewsCard.js +1 -1
  139. package/build/cjs/sub-blocks/Partner/Partner.js +1 -1
  140. package/build/cjs/sub-blocks/Partner/schema.js +1 -1
  141. package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +3 -3
  142. package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +2 -2
  143. package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
  144. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/List.js +1 -1
  145. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.js +1 -1
  146. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.d.ts +1 -1
  147. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  148. package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +1 -1
  149. package/build/cjs/sub-blocks/Quote/Quote.js +6 -6
  150. package/build/cjs/sub-blocks/Quote/schema.js +1 -1
  151. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +5 -5
  152. package/build/cjs/sub-blocks/TutorialCard/schema.js +1 -1
  153. package/build/cjs/text-transform/blocks.d.ts +1 -1
  154. package/build/cjs/text-transform/blocks.js +8 -0
  155. package/build/cjs/text-transform/utils.js +2 -1
  156. package/build/cjs/utils/blocks.d.ts +1 -1
  157. package/build/cjs/utils/scroll.js +1 -0
  158. package/build/esm/blocks/Banner/Banner.js +1 -1
  159. package/build/esm/blocks/Banner/schema.js +1 -1
  160. package/build/esm/blocks/CardLayout/CardLayout.js +2 -2
  161. package/build/esm/blocks/CardLayout/schema.js +1 -1
  162. package/build/esm/blocks/Companies/Companies.js +2 -2
  163. package/build/esm/blocks/Companies/schema.js +1 -1
  164. package/build/esm/blocks/ContentLayout/ContentLayout.js +3 -3
  165. package/build/esm/blocks/ContentLayout/schema.js +3 -3
  166. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +4 -4
  167. package/build/esm/blocks/ExtendedFeatures/schema.js +1 -1
  168. package/build/esm/blocks/FilterBlock/FilterBlock.js +5 -5
  169. package/build/esm/blocks/Header/Header.js +7 -7
  170. package/build/esm/blocks/Header/schema.js +2 -2
  171. package/build/esm/blocks/HeaderSlider/HeaderSlider.js +3 -3
  172. package/build/esm/blocks/Icons/Icons.js +1 -1
  173. package/build/esm/blocks/Info/Info.js +2 -2
  174. package/build/esm/blocks/Info/schema.js +1 -1
  175. package/build/esm/blocks/LinkTable/LinkTable.js +3 -3
  176. package/build/esm/blocks/LinkTable/schema.js +1 -1
  177. package/build/esm/blocks/Media/Media.js +1 -1
  178. package/build/esm/blocks/Media/schema.js +1 -1
  179. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -1
  180. package/build/esm/blocks/Preview/MediaContent/MediaContent.js +4 -4
  181. package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +1 -1
  182. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +1 -1
  183. package/build/esm/blocks/Preview/Preview.js +4 -4
  184. package/build/esm/blocks/Preview/schema.js +1 -1
  185. package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +6 -6
  186. package/build/esm/blocks/Questions/Questions.js +3 -3
  187. package/build/esm/blocks/Questions/schema.js +1 -1
  188. package/build/esm/blocks/Security/Security.js +2 -2
  189. package/build/esm/blocks/Security/schema.js +1 -1
  190. package/build/esm/blocks/Share/Share.js +7 -7
  191. package/build/esm/blocks/Simple/Simple.js +1 -1
  192. package/build/esm/blocks/Simple/schema.js +1 -1
  193. package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
  194. package/build/esm/blocks/Slider/Slider.d.ts +2 -2
  195. package/build/esm/blocks/Slider/Slider.js +11 -11
  196. package/build/esm/blocks/Slider/schema.js +1 -1
  197. package/build/esm/blocks/Slider/utils.js +1 -1
  198. package/build/esm/blocks/Table/Table.js +2 -2
  199. package/build/esm/blocks/Table/schema.js +1 -1
  200. package/build/esm/blocks/Tabs/Tabs.js +5 -5
  201. package/build/esm/blocks/Tabs/schema.js +3 -3
  202. package/build/esm/components/Author/Author.js +1 -1
  203. package/build/esm/components/BackLink/BackLink.js +1 -1
  204. package/build/esm/components/BackLink/__tests__/BackLink.test.js +1 -1
  205. package/build/esm/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
  206. package/build/esm/components/BackgroundMedia/BackgroundMedia.js +2 -2
  207. package/build/esm/components/BalancedMasonry/BalancedMasonry.js +2 -2
  208. package/build/esm/components/BlockBase/BlockBase.js +1 -1
  209. package/build/esm/components/BlockHeader/BlockHeader.d.ts +1 -1
  210. package/build/esm/components/BlockHeader/BlockHeader.js +2 -2
  211. package/build/esm/components/Button/Button.js +5 -5
  212. package/build/esm/components/Button/__tests__/Button.test.js +1 -1
  213. package/build/esm/components/CardBase/CardBase.d.ts +1 -1
  214. package/build/esm/components/CardBase/CardBase.js +3 -3
  215. package/build/esm/components/FileLink/FileLink.js +1 -1
  216. package/build/esm/components/Foldable/Foldable.js +2 -2
  217. package/build/esm/components/FullWidthBackground/FullWidthBackground.d.ts +1 -1
  218. package/build/esm/components/FullWidthBackground/FullWidthBackground.js +1 -1
  219. package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
  220. package/build/esm/components/FullscreenMedia/FullScreenMedia.js +2 -2
  221. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +8 -4
  222. package/build/esm/components/HeightCalculator/HeightCalculator.js +1 -1
  223. package/build/esm/components/Image/Image.js +2 -2
  224. package/build/esm/components/Link/Link.d.ts +1 -1
  225. package/build/esm/components/Link/Link.js +6 -6
  226. package/build/esm/components/Link/Links.d.ts +1 -1
  227. package/build/esm/components/Map/GoogleMap.js +4 -4
  228. package/build/esm/components/Map/Map.js +2 -2
  229. package/build/esm/components/Map/YMap/YMap.d.ts +1 -1
  230. package/build/esm/components/Map/YMap/YandexMap.js +6 -6
  231. package/build/esm/components/Map/YMap/YandexMapApiLoader.js +1 -1
  232. package/build/esm/components/Media/Image/Image.js +4 -4
  233. package/build/esm/components/Media/Media.js +2 -2
  234. package/build/esm/components/Media/Video/Video.js +1 -1
  235. package/build/esm/components/MediaBase/MediaBase.js +2 -2
  236. package/build/esm/components/MediaBase/MediaBaseContent.js +1 -1
  237. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
  238. package/build/esm/components/ReactPlayer/ReactPlayer.js +5 -5
  239. package/build/esm/components/Table/Table.d.ts +1 -1
  240. package/build/esm/components/Table/Table.js +1 -1
  241. package/build/esm/components/Title/Title.d.ts +1 -1
  242. package/build/esm/components/Title/Title.js +3 -3
  243. package/build/esm/components/ToggleArrow/ToggleArrow.js +1 -1
  244. package/build/esm/components/VideoBlock/VideoBlock.js +2 -2
  245. package/build/esm/components/YFMWrapper/YFMWrapper.d.ts +1 -1
  246. package/build/esm/components/YandexForm/YandexForm.js +4 -4
  247. package/build/esm/constructor-items.js +2 -2
  248. package/build/esm/containers/Loadable/Loadable.js +2 -2
  249. package/build/esm/containers/PageConstructor/PageConstructor.d.ts +1 -1
  250. package/build/esm/containers/PageConstructor/PageConstructor.js +7 -7
  251. package/build/esm/containers/PageConstructor/Provider.d.ts +3 -3
  252. package/build/esm/containers/PageConstructor/Provider.js +5 -5
  253. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +4 -4
  254. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  255. package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.d.ts +1 -1
  256. package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +2 -2
  257. package/build/esm/context/mapsContext/mapsProvider.js +1 -1
  258. package/build/esm/context/theme/ThemeProvider.js +1 -1
  259. package/build/esm/grid/Col/Col.d.ts +2 -2
  260. package/build/esm/grid/Row/Row.d.ts +1 -1
  261. package/build/esm/grid/utils.d.ts +1 -1
  262. package/build/esm/grid/utils.js +1 -1
  263. package/build/esm/hooks/useAnalytics.js +2 -2
  264. package/build/esm/hooks/useFocus.js +1 -1
  265. package/build/esm/hooks/useHeightCalculator.js +1 -1
  266. package/build/esm/hooks/useIntersection.js +1 -1
  267. package/build/esm/hooks/useWindowBreakpoint.js +1 -1
  268. package/build/esm/i18n.js +1 -1
  269. package/build/esm/models/common.d.ts +2 -1
  270. package/build/esm/models/common.js +1 -0
  271. package/build/esm/models/constructor-items/blocks.d.ts +2 -2
  272. package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -2
  273. package/build/esm/models/constructor.d.ts +1 -1
  274. package/build/esm/models/navigation.d.ts +1 -1
  275. package/build/esm/navigation/components/Header/Header.js +5 -5
  276. package/build/esm/navigation/components/Logo/Logo.js +3 -3
  277. package/build/esm/navigation/components/MobileNavigation/MobileNavigation.js +2 -2
  278. package/build/esm/navigation/components/Navigation/Navigation.js +2 -2
  279. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +2 -2
  280. package/build/esm/navigation/components/NavigationItem/components/ContentWrapper/ContentWrapper.js +1 -1
  281. package/build/esm/navigation/components/NavigationItem/components/GithubButton/GithubButton.d.ts +1 -1
  282. package/build/esm/navigation/components/NavigationItem/components/GithubButton/GithubButton.js +2 -2
  283. package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +2 -2
  284. package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.d.ts +1 -1
  285. package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.js +2 -2
  286. package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.d.ts +1 -1
  287. package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +3 -3
  288. package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
  289. package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +2 -2
  290. package/build/esm/navigation/components/SocialIcon/SocialIcon.js +1 -1
  291. package/build/esm/navigation/schema.js +2 -2
  292. package/build/esm/schema/index.js +3 -3
  293. package/build/esm/schema/validators/common.js +2 -2
  294. package/build/esm/schema/validators/index.d.ts +2 -2
  295. package/build/esm/schema/validators/index.js +2 -2
  296. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  297. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -2
  298. package/build/esm/sub-blocks/BannerCard/BannerCard.js +2 -2
  299. package/build/esm/sub-blocks/BasicCard/BasicCard.js +2 -2
  300. package/build/esm/sub-blocks/BasicCard/schema.js +1 -1
  301. package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +2 -2
  302. package/build/esm/sub-blocks/Content/Content.d.ts +1 -1
  303. package/build/esm/sub-blocks/Content/Content.js +2 -2
  304. package/build/esm/sub-blocks/Content/schema.js +1 -1
  305. package/build/esm/sub-blocks/Divider/schema.js +1 -1
  306. package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +1 -1
  307. package/build/esm/sub-blocks/HubspotForm/index.js +3 -3
  308. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +2 -2
  309. package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
  310. package/build/esm/sub-blocks/MediaCard/MediaCard.js +1 -1
  311. package/build/esm/sub-blocks/MediaCard/schema.js +1 -1
  312. package/build/esm/sub-blocks/NewsCard/NewsCard.js +1 -1
  313. package/build/esm/sub-blocks/Partner/Partner.js +1 -1
  314. package/build/esm/sub-blocks/Partner/schema.js +1 -1
  315. package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +3 -3
  316. package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +2 -2
  317. package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
  318. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/List.js +1 -1
  319. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.js +1 -1
  320. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.d.ts +1 -1
  321. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  322. package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +1 -1
  323. package/build/esm/sub-blocks/PriceDetailed/schema.js +1 -1
  324. package/build/esm/sub-blocks/Quote/Quote.js +4 -4
  325. package/build/esm/sub-blocks/Quote/schema.js +1 -1
  326. package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +2 -2
  327. package/build/esm/sub-blocks/TutorialCard/schema.js +1 -1
  328. package/build/esm/text-transform/blocks.d.ts +1 -1
  329. package/build/esm/text-transform/blocks.js +8 -0
  330. package/build/esm/text-transform/utils.js +2 -1
  331. package/build/esm/utils/blocks.d.ts +1 -1
  332. package/build/esm/utils/scroll.js +1 -0
  333. package/build/esm/utils/url.js +1 -1
  334. package/package.json +4 -3
  335. package/server/models/common.d.ts +2 -1
  336. package/server/models/common.js +1 -0
  337. package/server/models/constructor-items/blocks.d.ts +2 -2
  338. package/server/models/constructor-items/sub-blocks.d.ts +2 -2
  339. package/server/models/constructor.d.ts +1 -1
  340. package/server/models/navigation.d.ts +1 -1
  341. package/server/text-transform/blocks.d.ts +1 -1
  342. package/server/text-transform/blocks.js +8 -0
  343. package/server/text-transform/utils.js +2 -1
  344. package/server/utils/blocks.d.ts +1 -1
  345. package/server/utils/scroll.js +1 -0
@@ -1,6 +1,6 @@
1
1
  import React, { Fragment } from 'react';
2
- import { block } from '../../../../utils';
3
2
  import { YFMWrapper } from '../../../../components';
3
+ import { block } from '../../../../utils';
4
4
  import './Settings.css';
5
5
  const b = block('settings-list');
6
6
  const Settings = (props) => {
@@ -1,4 +1,4 @@
1
- import { PriceDetailsType, TextSize, PriceDetailsProps, PriceFoldableDetailsProps } from '../../../models';
1
+ import { PriceDetailsProps, PriceDetailsType, PriceFoldableDetailsProps, TextSize } from '../../../models';
2
2
  import './PriceDetails.css';
3
3
  interface PriceDetailsExtendProps extends PriceDetailsProps {
4
4
  type: PriceDetailsType;
@@ -1,7 +1,7 @@
1
1
  import React, { Fragment, useCallback, useState } from 'react';
2
- import { block } from '../../../utils';
3
2
  import { Foldable, ToggleArrow } from '../../../components';
4
3
  import { PriceDetailsType, } from '../../../models';
4
+ import { block } from '../../../utils';
5
5
  import List from './Details/List';
6
6
  import Settings from './Details/Settings';
7
7
  import './PriceDetails.css';
@@ -1,6 +1,6 @@
1
1
  import React, { Fragment } from 'react';
2
- import { block } from '../../../utils';
3
2
  import { CardBase } from '../../../components';
3
+ import { block } from '../../../utils';
4
4
  import './SeparatePriceDetailed.css';
5
5
  const b = block('separate-price-detailed-block');
6
6
  const SeparatePriceDetailed = (props) => {
@@ -1,4 +1,4 @@
1
- import { BaseProps, AnimatableProps, textSize } from '../../schema/validators/common';
1
+ import { AnimatableProps, BaseProps, textSize } from '../../schema/validators/common';
2
2
  import { filteredArray } from '../../schema/validators/utils';
3
3
  const PriceDetailedDetailsType = ['marked-list', 'settings'];
4
4
  const PriceDetailedDescriptionColor = ['cornflower', 'black'];
@@ -1,11 +1,11 @@
1
1
  import React, { useCallback, useContext } from 'react';
2
2
  import { Button } from '@gravity-ui/uikit';
3
- import { block, getThemedValue } from '../../utils';
4
- import { AuthorType, DefaultEventNames } from '../../models';
5
- import { Author, Image, HTML } from '../../components';
6
- import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
3
+ import { Author, HTML, Image } from '../../components';
7
4
  import { getMediaImage } from '../../components/Media/Image/utils';
5
+ import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
8
6
  import { useAnalytics } from '../../hooks';
7
+ import { AuthorType, DefaultEventNames } from '../../models';
8
+ import { block, getThemedValue } from '../../utils';
9
9
  import './Quote.css';
10
10
  const b = block('quote');
11
11
  const Quote = (props) => {
@@ -1,5 +1,5 @@
1
- import { authorItem, BaseProps, ThemeProps, withTheme } from '../../schema/validators/common';
2
1
  import { ImageProps, urlPattern } from '../../components/Image/schema';
2
+ import { BaseProps, ThemeProps, authorItem, withTheme } from '../../schema/validators/common';
3
3
  export const Quote = {
4
4
  quote: {
5
5
  additionalProperties: false,
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { block } from '../../utils';
2
+ import { HTML, Image } from '../../components/';
3
3
  import CardBase from '../../components/CardBase/CardBase';
4
- import { Image, HTML } from '../../components/';
5
4
  import { getMediaImage } from '../../components/Media/Image/utils';
5
+ import { block } from '../../utils';
6
6
  import './TutorialCard.css';
7
7
  const b = block('tutorial-card');
8
8
  function iconElement(icon, title) {
@@ -1,5 +1,5 @@
1
- import { BaseProps } from '../../schema/validators/common';
2
1
  import { ImageProps } from '../../components/Image/schema';
2
+ import { BaseProps } from '../../schema/validators/common';
3
3
  export const TutorialCard = {
4
4
  'tutorial-card': {
5
5
  additionalProperties: false,
@@ -1,5 +1,5 @@
1
- import { Lang } from '../utils/configure';
2
1
  import { ConstructorBlock } from '../models/constructor';
2
+ import { Lang } from '../utils/configure';
3
3
  export type ComplexItem = {
4
4
  [key: string]: string;
5
5
  };
@@ -43,6 +43,7 @@ const parseItemsTitle = (transformer, items) => items.map((_a) => {
43
43
  });
44
44
  function parsePriceDetailedBlock(transformer, block) {
45
45
  const { priceType } = block;
46
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
46
47
  block.items = block.items.map((item) => {
47
48
  const { description, items: details = [] } = item;
48
49
  if (priceType === 'marked-list') {
@@ -60,23 +61,27 @@ function parsePriceDetailedBlock(transformer, block) {
60
61
  item.description = transformer(description);
61
62
  return item;
62
63
  });
64
+ /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
63
65
  return block;
64
66
  }
65
67
  const parseContentLayout = (transformer, content) => {
66
68
  if (content) {
67
69
  const { text, additionalInfo } = content;
70
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
68
71
  if (text) {
69
72
  content.text = transformer(text);
70
73
  }
71
74
  if (additionalInfo) {
72
75
  content.additionalInfo = transformer(additionalInfo);
73
76
  }
77
+ /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
74
78
  }
75
79
  return content;
76
80
  };
77
81
  function parseContentLayoutTitle(transformer, content) {
78
82
  if (content === null || content === void 0 ? void 0 : content.title) {
79
83
  const { title } = content;
84
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
80
85
  content.title = title && parseTitle(transformer, title);
81
86
  }
82
87
  return content;
@@ -350,6 +355,7 @@ const config = {
350
355
  function addRandomOrder(block) {
351
356
  if (block) {
352
357
  if ('randomOrder' in block && block.randomOrder && 'children' in block && block.children) {
358
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
353
359
  block.children = _.shuffle(block.children);
354
360
  }
355
361
  }
@@ -364,6 +370,7 @@ function transformBlock(lang, blocksConfig, block) {
364
370
  const transformer = transformerRaw.bind(null, lang);
365
371
  if (fields) {
366
372
  fields.forEach((field) => {
373
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
367
374
  if (block[field]) {
368
375
  if (parser) {
369
376
  block[field] = parser(transformer, block[field]);
@@ -372,6 +379,7 @@ function transformBlock(lang, blocksConfig, block) {
372
379
  block[field] = transformer(block[field]);
373
380
  }
374
381
  }
382
+ /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
375
383
  });
376
384
  }
377
385
  else if (parser) {
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
- import Typograf from 'typograf';
3
2
  import sanitize from 'sanitize-html';
3
+ import Typograf from 'typograf';
4
4
  import transformYFM from '@doc-tools/transform';
5
5
  import { Lang } from '../utils/configure';
6
6
  export var TransformType;
@@ -98,6 +98,7 @@ export function typografEntity({ entity, fields, lang = Lang.Ru, transformType =
98
98
  const transformer = transformTypeMap[transformType];
99
99
  fields.forEach((fieldName) => {
100
100
  if (entity[fieldName]) {
101
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
101
102
  entity[fieldName] = transformer(entity[fieldName], lang);
102
103
  }
103
104
  });
@@ -1,5 +1,5 @@
1
+ import { CustomConfig, PCShareSocialNetwork, TextSize } from '../models';
1
2
  import { ConstructorBlock } from '../models/constructor';
2
- import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
3
  export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
@@ -18,6 +18,7 @@ export function doSmoothScroll(element, startPosition, scrollOptions) {
18
18
  }
19
19
  function getChangeScrollFunction(direction, isReverse) {
20
20
  return (element, scrollPosition, startPosition) => {
21
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
21
22
  element[direction] = isReverse
22
23
  ? startPosition - scrollPosition
23
24
  : startPosition + scrollPosition;
@@ -1,4 +1,4 @@
1
- import { parse, format } from 'url';
1
+ import { format, parse } from 'url';
2
2
  const EXAMPLE_URL = 'https://example.org';
3
3
  export const EXTERNAL_LINK_PROPS = { target: '_blank', rel: 'noopener noreferrer' };
4
4
  export function getLinkProps(url, hostname, target) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "2.3.2",
3
+ "version": "2.5.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -69,7 +69,7 @@
69
69
  "@commitlint/cli": "^17.1.2",
70
70
  "@commitlint/config-conventional": "^17.1.0",
71
71
  "@doc-tools/transform": "2.12.0",
72
- "@gravity-ui/eslint-config": "^1.0.2",
72
+ "@gravity-ui/eslint-config": "^2.0.0",
73
73
  "@gravity-ui/prettier-config": "^1.0.1",
74
74
  "@gravity-ui/stylelint-config": "^1.0.0",
75
75
  "@gravity-ui/tsconfig": "^1.0.0",
@@ -92,8 +92,9 @@
92
92
  "@types/sanitize-html": "^2.6.0",
93
93
  "@types/uuid": "^9.0.0",
94
94
  "es5-ext": "0.10.53",
95
- "eslint": "^7.32.0",
95
+ "eslint": "^8.34.0",
96
96
  "eslint-plugin-local": "./eslint-plugin-local",
97
+ "eslint-plugin-no-not-accumulator-reassign": "^0.1.0",
97
98
  "eslint-plugin-testing-library": "^5.9.1",
98
99
  "gulp": "^4.0.2",
99
100
  "gulp-dart-sass": "^1.0.2",
@@ -78,7 +78,8 @@ export declare enum DefaultEventNames {
78
78
  YandexFormSubmit = "yandex-form-submit",
79
79
  HubspotFormSubmit = "hubspot-form-submit",
80
80
  QuoteButton = "quote-button-click",
81
- BackLink = "back-link-click"
81
+ BackLink = "back-link-click",
82
+ Breadcrumb = "breadcrumb-click"
82
83
  }
83
84
  export type AnalyticsCounters = {
84
85
  include?: string[];
@@ -47,4 +47,5 @@ var DefaultEventNames;
47
47
  DefaultEventNames["HubspotFormSubmit"] = "hubspot-form-submit";
48
48
  DefaultEventNames["QuoteButton"] = "quote-button-click";
49
49
  DefaultEventNames["BackLink"] = "back-link-click";
50
+ DefaultEventNames["Breadcrumb"] = "breadcrumb-click";
50
51
  })(DefaultEventNames = exports.DefaultEventNames || (exports.DefaultEventNames = {}));
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonSize } from '@gravity-ui/uikit';
3
- import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, MapProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps, ImageDeviceProps } from './common';
4
- import { ThemeSupporting } from '../../utils';
5
3
  import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
4
+ import { ThemeSupporting } from '../../utils';
5
+ import { AnchorProps, Animatable, BackgroundImageProps, BlockHeaderProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, LinkTheme, MapProps, MediaDirection, MediaProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleBaseProps, TitleProps } from './common';
6
6
  import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
7
7
  export declare enum BlockType {
8
8
  PromoFeaturesBlock = "promo-features-block",
@@ -1,9 +1,9 @@
1
1
  import { ClassNameProps } from '../../models';
2
2
  import { ThemeSupporting } from '../../utils';
3
3
  import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
4
- import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
5
- import { ContentBlockProps } from './blocks';
6
4
  import { AnalyticsEventsBase, PixelEvent } from '../common';
5
+ import { ContentBlockProps } from './blocks';
6
+ import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
7
7
  export declare enum SubBlockType {
8
8
  Divider = "divider",
9
9
  Quote = "quote",
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { Animatable, ThemedMediaProps, ConstructorItem, Block, WithChildren } from './';
2
+ import { Animatable, Block, ConstructorItem, ThemedMediaProps, WithChildren } from './';
3
3
  export interface PageData {
4
4
  content: PageContent;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { ThemeSupporting } from '../utils';
2
- import { ImageProps, ButtonProps } from './constructor-items';
2
+ import { ButtonProps, ImageProps } from './constructor-items';
3
3
  export declare enum NavigationItemType {
4
4
  Link = "link",
5
5
  Dropdown = "dropdown",
@@ -1,5 +1,5 @@
1
- import { Lang } from '../utils/configure';
2
1
  import { ConstructorBlock } from '../models/constructor';
2
+ import { Lang } from '../utils/configure';
3
3
  export type ComplexItem = {
4
4
  [key: string]: string;
5
5
  };
@@ -60,6 +60,7 @@ const parseItemsTitle = (transformer, items) => items.map((_a) => {
60
60
  });
61
61
  function parsePriceDetailedBlock(transformer, block) {
62
62
  const { priceType } = block;
63
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
63
64
  block.items = block.items.map((item) => {
64
65
  const { description, items: details = [] } = item;
65
66
  if (priceType === 'marked-list') {
@@ -77,23 +78,27 @@ function parsePriceDetailedBlock(transformer, block) {
77
78
  item.description = transformer(description);
78
79
  return item;
79
80
  });
81
+ /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
80
82
  return block;
81
83
  }
82
84
  const parseContentLayout = (transformer, content) => {
83
85
  if (content) {
84
86
  const { text, additionalInfo } = content;
87
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
85
88
  if (text) {
86
89
  content.text = transformer(text);
87
90
  }
88
91
  if (additionalInfo) {
89
92
  content.additionalInfo = transformer(additionalInfo);
90
93
  }
94
+ /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
91
95
  }
92
96
  return content;
93
97
  };
94
98
  function parseContentLayoutTitle(transformer, content) {
95
99
  if (content === null || content === void 0 ? void 0 : content.title) {
96
100
  const { title } = content;
101
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
97
102
  content.title = title && parseTitle(transformer, title);
98
103
  }
99
104
  return content;
@@ -369,6 +374,7 @@ const config = {
369
374
  function addRandomOrder(block) {
370
375
  if (block) {
371
376
  if ('randomOrder' in block && block.randomOrder && 'children' in block && block.children) {
377
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
372
378
  block.children = lodash_1.default.shuffle(block.children);
373
379
  }
374
380
  }
@@ -383,6 +389,7 @@ function transformBlock(lang, blocksConfig, block) {
383
389
  const transformer = transformerRaw.bind(null, lang);
384
390
  if (fields) {
385
391
  fields.forEach((field) => {
392
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
386
393
  if (block[field]) {
387
394
  if (parser) {
388
395
  block[field] = parser(transformer, block[field]);
@@ -391,6 +398,7 @@ function transformBlock(lang, blocksConfig, block) {
391
398
  block[field] = transformer(block[field]);
392
399
  }
393
400
  }
401
+ /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
394
402
  });
395
403
  }
396
404
  else if (parser) {
@@ -15,8 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.typografEntity = exports.fullTransform = exports.transformMarkdown = exports.typografToText = exports.typografToHTML = exports.sanitizeHtml = exports.typograf = exports.sanitizeStripOptions = exports.typografConfig = exports.DEFAULT_ALLOWED_TAGS = exports.TransformType = void 0;
18
- const typograf_1 = __importDefault(require("typograf"));
19
18
  const sanitize_html_1 = __importDefault(require("sanitize-html"));
19
+ const typograf_1 = __importDefault(require("typograf"));
20
20
  const transform_1 = __importDefault(require("@doc-tools/transform"));
21
21
  const configure_1 = require("../utils/configure");
22
22
  var TransformType;
@@ -120,6 +120,7 @@ function typografEntity({ entity, fields, lang = configure_1.Lang.Ru, transformT
120
120
  const transformer = transformTypeMap[transformType];
121
121
  fields.forEach((fieldName) => {
122
122
  if (entity[fieldName]) {
123
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
123
124
  entity[fieldName] = transformer(entity[fieldName], lang);
124
125
  }
125
126
  });
@@ -1,5 +1,5 @@
1
+ import { CustomConfig, PCShareSocialNetwork, TextSize } from '../models';
1
2
  import { ConstructorBlock } from '../models/constructor';
2
- import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
3
  export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
@@ -22,6 +22,7 @@ function doSmoothScroll(element, startPosition, scrollOptions) {
22
22
  exports.doSmoothScroll = doSmoothScroll;
23
23
  function getChangeScrollFunction(direction, isReverse) {
24
24
  return (element, scrollPosition, startPosition) => {
25
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
25
26
  element[direction] = isReverse
26
27
  ? startPosition - scrollPosition
27
28
  : startPosition + scrollPosition;