@gravity-ui/page-constructor 2.16.0 → 2.18.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 (73) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/build/cjs/blocks/Slider/Slider.css +88 -0
  3. package/build/cjs/blocks/Slider/Slider.js +0 -2
  4. package/build/cjs/components/Anchor/Anchor.d.ts +2 -2
  5. package/build/cjs/components/Anchor/Anchor.js +1 -1
  6. package/build/cjs/components/Map/YMap/YandexMap.js +1 -1
  7. package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
  8. package/build/cjs/components/VideoBlock/VideoBlock.js +1 -1
  9. package/build/cjs/components/YFMWrapper/YFMWrapper.js +1 -1
  10. package/build/cjs/containers/Loadable/Loadable.js +1 -1
  11. package/build/cjs/grid/Col/Col.d.ts +1 -1
  12. package/build/cjs/internal-typings/global.d.ts +18 -16
  13. package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +2 -1
  14. package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +5 -2
  15. package/build/cjs/sub-blocks/HubspotForm/index.d.ts +1 -1
  16. package/build/cjs/sub-blocks/HubspotForm/index.js +6 -5
  17. package/build/cjs/text-transform/blocks.js +2 -8
  18. package/build/cjs/text-transform/utils.d.ts +1 -1
  19. package/build/cjs/text-transform/utils.js +2 -2
  20. package/build/cjs/utils/scroll.js +1 -1
  21. package/build/esm/blocks/Slider/Slider.css +88 -0
  22. package/build/esm/blocks/Slider/Slider.d.ts +0 -1
  23. package/build/esm/blocks/Slider/Slider.js +0 -3
  24. package/build/esm/components/Anchor/Anchor.d.ts +2 -2
  25. package/build/esm/components/Anchor/Anchor.js +1 -1
  26. package/build/esm/components/Map/YMap/YandexMap.js +1 -1
  27. package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
  28. package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
  29. package/build/esm/components/YFMWrapper/YFMWrapper.js +1 -1
  30. package/build/esm/containers/Loadable/Loadable.js +1 -1
  31. package/build/esm/grid/Col/Col.d.ts +1 -1
  32. package/build/esm/internal-typings/global.d.ts +18 -16
  33. package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +2 -1
  34. package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +6 -3
  35. package/build/esm/sub-blocks/HubspotForm/index.d.ts +1 -1
  36. package/build/esm/sub-blocks/HubspotForm/index.js +7 -6
  37. package/build/esm/text-transform/blocks.js +2 -8
  38. package/build/esm/text-transform/utils.d.ts +1 -1
  39. package/build/esm/text-transform/utils.js +2 -2
  40. package/build/esm/utils/scroll.js +1 -1
  41. package/package.json +1 -1
  42. package/server/text-transform/blocks.js +2 -8
  43. package/server/text-transform/utils.d.ts +1 -1
  44. package/server/text-transform/utils.js +2 -2
  45. package/server/utils/scroll.js +1 -1
  46. package/build/cjs/components/Anchor/__tests__/Anchor.test.d.ts +0 -1
  47. package/build/cjs/components/Anchor/__tests__/Anchor.test.js +0 -21
  48. package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +0 -1
  49. package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.js +0 -36
  50. package/build/cjs/components/Author/__tests__/Author.test.d.ts +0 -1
  51. package/build/cjs/components/Author/__tests__/Author.test.js +0 -49
  52. package/build/cjs/components/BackLink/__tests__/BackLink.test.d.ts +0 -1
  53. package/build/cjs/components/BackLink/__tests__/BackLink.test.js +0 -63
  54. package/build/cjs/components/BlockBase/__tests__/BlockBase.test.d.ts +0 -1
  55. package/build/cjs/components/BlockBase/__tests__/BlockBase.test.js +0 -44
  56. package/build/cjs/components/Button/__tests__/Button.test.d.ts +0 -1
  57. package/build/cjs/components/Button/__tests__/Button.test.js +0 -91
  58. package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +0 -1
  59. package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.js +0 -58
  60. package/build/esm/components/Anchor/__tests__/Anchor.test.d.ts +0 -1
  61. package/build/esm/components/Anchor/__tests__/Anchor.test.js +0 -18
  62. package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +0 -1
  63. package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.js +0 -33
  64. package/build/esm/components/Author/__tests__/Author.test.d.ts +0 -1
  65. package/build/esm/components/Author/__tests__/Author.test.js +0 -46
  66. package/build/esm/components/BackLink/__tests__/BackLink.test.d.ts +0 -1
  67. package/build/esm/components/BackLink/__tests__/BackLink.test.js +0 -60
  68. package/build/esm/components/BlockBase/__tests__/BlockBase.test.d.ts +0 -1
  69. package/build/esm/components/BlockBase/__tests__/BlockBase.test.js +0 -41
  70. package/build/esm/components/Button/__tests__/Button.test.d.ts +0 -1
  71. package/build/esm/components/Button/__tests__/Button.test.js +0 -88
  72. package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +0 -1
  73. package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.js +0 -55
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.18.0](https://github.com/gravity-ui/page-constructor/compare/v2.18.0...v2.18.0) (2023-05-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * **HubspotForm:** add ref forwarding for HS form ([#332](https://github.com/gravity-ui/page-constructor/issues/332)) ([37b75d3](https://github.com/gravity-ui/page-constructor/commit/37b75d31c09e8dc061d718828bcccc72b037e106))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * config gulpfile for tests ([a5cb59d](https://github.com/gravity-ui/page-constructor/commit/a5cb59d0bc1e3a8c09babed0c5ace9a2253416c3))
14
+
15
+ ## [2.17.0](https://github.com/gravity-ui/page-constructor/compare/v2.16.0...v2.17.0) (2023-05-12)
16
+
17
+
18
+ ### Features
19
+
20
+ * drop rules overriding ([#303](https://github.com/gravity-ui/page-constructor/issues/303)) ([0c13398](https://github.com/gravity-ui/page-constructor/commit/0c1339885ce3b930ab9428b585aa6dd020b0d298))
21
+
3
22
  ## [2.16.0](https://github.com/gravity-ui/page-constructor/compare/v2.15.0...v2.16.0) (2023-05-11)
4
23
 
5
24
 
@@ -1,5 +1,93 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
+ .pc-slick-origin.slick-slider {
4
+ position: relative;
5
+ display: block;
6
+ box-sizing: border-box;
7
+ -webkit-touch-callout: none;
8
+ user-select: none;
9
+ touch-action: pan-y;
10
+ -webkit-tap-highlight-color: transparent;
11
+ }
12
+ .pc-slick-origin.slick-slider .slick-track,
13
+ .pc-slick-origin.slick-slider .slick-list {
14
+ transform: translate3d(0, 0, 0);
15
+ }
16
+ .pc-slick-origin .slick-list {
17
+ position: relative;
18
+ overflow: hidden;
19
+ display: block;
20
+ margin: 0;
21
+ padding: 0;
22
+ }
23
+ .pc-slick-origin .slick-list:focus {
24
+ outline: none;
25
+ }
26
+ .pc-slick-origin .slick-list.dragging {
27
+ cursor: hand;
28
+ }
29
+ .pc-slick-origin .slick-track {
30
+ position: relative;
31
+ left: 0;
32
+ top: 0;
33
+ display: block;
34
+ margin-left: auto;
35
+ margin-right: auto;
36
+ }
37
+ .pc-slick-origin .slick-track::before, .pc-slick-origin .slick-track::after {
38
+ content: "";
39
+ display: table;
40
+ }
41
+ .pc-slick-origin .slick-track:after {
42
+ clear: both;
43
+ }
44
+ .slick-loading .pc-slick-origin .slick-track {
45
+ visibility: hidden;
46
+ }
47
+ .pc-slick-origin .slick-slide {
48
+ float: left;
49
+ height: 100%;
50
+ min-height: 1px;
51
+ display: none;
52
+ }
53
+ [dir=rtl] .pc-slick-origin .slick-slide {
54
+ float: right;
55
+ }
56
+ .pc-slick-origin .slick-slide img {
57
+ display: block;
58
+ }
59
+ .pc-slick-origin .slick-slide.slick-loading img {
60
+ display: none;
61
+ }
62
+ .pc-slick-origin .slick-slide.dragging img {
63
+ pointer-events: none;
64
+ }
65
+ .slick-initialized .pc-slick-origin .slick-slide {
66
+ display: block;
67
+ }
68
+ .slick-loading .pc-slick-origin .slick-slide {
69
+ visibility: hidden;
70
+ }
71
+ .slick-vertical .pc-slick-origin .slick-slide {
72
+ display: block;
73
+ height: auto;
74
+ border: 1px solid transparent;
75
+ }
76
+ .pc-slick-origin.slick-initialized .slick-slide {
77
+ display: block;
78
+ }
79
+ .pc-slick-origin.slick-loading .slick-slide {
80
+ visibility: hidden;
81
+ }
82
+ .pc-slick-origin.slick-vertical .slick-slide {
83
+ display: block;
84
+ height: auto;
85
+ border: 1px solid transparent;
86
+ }
87
+ .pc-slick-origin .slick-arrow.slick-hidden {
88
+ display: none;
89
+ }
90
+
3
91
  .pc-SliderBlock .slick-list {
4
92
  padding: 24px 0 20px;
5
93
  margin: 0 -8px;
@@ -18,8 +18,6 @@ const models_1 = require("../../models");
18
18
  const utils_1 = require("../../utils");
19
19
  const Arrow_1 = tslib_1.__importDefault(require("./Arrow/Arrow"));
20
20
  const utils_2 = require("./utils");
21
- // Cause Slider.css should override slick.css
22
- // eslint-disable-next-line import/order
23
21
  const b = (0, utils_1.block)('SliderBlock');
24
22
  const slick = (0, utils_1.block)('slick-origin');
25
23
  const DOT_WIDTH = 8;
@@ -2,7 +2,7 @@ import { ClassNameProps } from '../../models';
2
2
  export declare const qaIdByDefault = "qa-anchor";
3
3
  export interface AnchorProps extends ClassNameProps {
4
4
  id: string;
5
- dataQa?: string;
5
+ qa?: string;
6
6
  }
7
- declare const Anchor: ({ id, className, dataQa }: AnchorProps) => JSX.Element;
7
+ declare const Anchor: ({ id, className, qa }: AnchorProps) => JSX.Element;
8
8
  export default Anchor;
@@ -7,5 +7,5 @@ const react_1 = tslib_1.__importDefault(require("react"));
7
7
  const utils_1 = require("../../utils");
8
8
  const b = (0, utils_1.block)('Anchor');
9
9
  exports.qaIdByDefault = 'qa-anchor';
10
- const Anchor = ({ id, className, dataQa }) => (react_1.default.createElement("div", { id: id, className: b(null, className), "data-qa": dataQa || exports.qaIdByDefault }));
10
+ const Anchor = ({ id, className, qa }) => (react_1.default.createElement("div", { id: id, className: b(null, className), "data-qa": qa || exports.qaIdByDefault }));
11
11
  exports.default = Anchor;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
5
  const uikit_1 = require("@gravity-ui/uikit");
6
+ const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
7
  const localeContext_1 = require("../../../context/localeContext/localeContext");
8
8
  const mapsContext_1 = require("../../../context/mapsContext/mapsContext");
9
9
  const mobileContext_1 = require("../../../context/mobileContext");
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReactPlayerBlock = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
+ const uikit_1 = require("@gravity-ui/uikit");
6
7
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
8
  const react_player_1 = tslib_1.__importDefault(require("react-player"));
8
- const uikit_1 = require("@gravity-ui/uikit");
9
9
  const metrikaContext_1 = require("../../context/metrikaContext");
10
10
  const mobileContext_1 = require("../../context/mobileContext");
11
11
  const videoContext_1 = require("../../context/videoContext");
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getHeight = exports.AUTOPLAY_ATTRIBUTES = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
+ const uikit_1 = require("@gravity-ui/uikit");
6
7
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
8
  const uuid_1 = require("uuid");
8
- const uikit_1 = require("@gravity-ui/uikit");
9
9
  const icons_1 = require("../../icons");
10
10
  const utils_1 = require("../../utils");
11
11
  const Image_1 = tslib_1.__importDefault(require("../Image/Image"));
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importDefault(require("react"));
5
4
  /* we won't use 'pc' class prefix here to let you opportunity to define yfm styles
6
5
  in your project via global 'yfm' class */
6
+ const react_1 = tslib_1.__importDefault(require("react"));
7
7
  const bem_cn_lite_1 = tslib_1.__importDefault(require("bem-cn-lite"));
8
8
  const snakecase_keys_1 = tslib_1.__importDefault(require("snakecase-keys"));
9
9
  const components_1 = require("../../components");
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
- const bem_cn_lite_1 = tslib_1.__importDefault(require("bem-cn-lite"));
6
5
  const uikit_1 = require("@gravity-ui/uikit");
6
+ const bem_cn_lite_1 = tslib_1.__importDefault(require("bem-cn-lite"));
7
7
  const ErrorWrapper_1 = tslib_1.__importDefault(require("../../components/ErrorWrapper/ErrorWrapper"));
8
8
  const i18n_1 = tslib_1.__importDefault(require("./i18n"));
9
9
  const b = (0, bem_cn_lite_1.default)('loadable-block');
@@ -7,4 +7,4 @@ export interface GridColumnProps extends GridColumnClassParams, Refable<HTMLDivE
7
7
  dataQa?: string;
8
8
  children?: React.ReactNode;
9
9
  }
10
- export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "dataQa" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent"> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent" | "dataQa"> & React.RefAttributes<HTMLDivElement>>;
@@ -10,22 +10,17 @@ declare module '*.svg' {
10
10
  export default path;
11
11
  }
12
12
 
13
- interface CreateFormProps {
14
- portalId: string;
15
- formId: string;
16
- region?: string;
17
- target?: string;
18
- cssClass?: string;
19
- formInstanceId?: string;
20
- }
13
+ declare module '*.md';
21
14
 
22
- interface Window {
23
- hbspt?: {
24
- forms: {
25
- create: (args: CreateFormProps) => unknown;
26
- };
27
- };
28
- ymaps: Ymaps;
15
+ declare namespace Hbspt {
16
+ interface CreateFormProps {
17
+ portalId: string;
18
+ formId: string;
19
+ region?: string;
20
+ target?: string;
21
+ cssClass?: string;
22
+ formInstanceId?: string;
23
+ }
29
24
  }
30
25
 
31
26
  declare namespace Ymaps {
@@ -63,4 +58,11 @@ declare namespace Ymaps {
63
58
  }
64
59
  }
65
60
 
66
- declare module '*.md';
61
+ interface Window {
62
+ hbspt?: {
63
+ forms: {
64
+ create: (args: Hbspt.CreateFormProps) => unknown;
65
+ };
66
+ };
67
+ ymaps: Ymaps;
68
+ }
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  import { HubspotFormProps } from '../../models';
2
3
  type HubspotFormContainerPropsKeys = 'className' | 'formId' | 'formInstanceId' | 'portalId' | 'region' | 'formClassName' | 'createDOMElement';
3
4
  type HubspotFormContainerProps = Pick<HubspotFormProps, HubspotFormContainerPropsKeys>;
4
- declare const HubspotFormContainer: (props: HubspotFormContainerProps) => JSX.Element;
5
+ declare const HubspotFormContainer: React.ForwardRefExoticComponent<HubspotFormContainerProps & React.RefAttributes<HTMLDivElement>>;
5
6
  export default HubspotFormContainer;
@@ -4,10 +4,12 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const hooks_1 = require("../../hooks");
6
6
  const loadHubspotScript_1 = tslib_1.__importDefault(require("./loadHubspotScript"));
7
- const HubspotFormContainer = (props) => {
7
+ const HubspotFormContainer = (0, react_1.forwardRef)((props, ref) => {
8
8
  const { className, formId, formInstanceId, portalId, region, formClassName, createDOMElement, } = props;
9
9
  const containerRef = (0, react_1.useRef)(null);
10
10
  const hsContainerRef = (0, react_1.useRef)();
11
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12
+ (0, react_1.useImperativeHandle)(ref, () => containerRef.current);
11
13
  const containerId = formInstanceId
12
14
  ? `hubspot-form-${formId}-${formInstanceId}`
13
15
  : `hubspot-form-${formId}`;
@@ -45,5 +47,6 @@ const HubspotFormContainer = (props) => {
45
47
  };
46
48
  });
47
49
  return react_1.default.createElement("div", { className: className, id: containerId, ref: containerRef });
48
- };
50
+ });
51
+ HubspotFormContainer.displayName = 'HubspotFormContainer';
49
52
  exports.default = HubspotFormContainer;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { HubspotFormProps } from '../../models';
3
- declare const HubspotForm: React.FunctionComponent<HubspotFormProps>;
3
+ declare const HubspotForm: React.ForwardRefExoticComponent<HubspotFormProps & React.RefAttributes<HTMLDivElement>>;
4
4
  export default HubspotForm;
@@ -10,7 +10,7 @@ const models_1 = require("../../models");
10
10
  const utils_1 = require("../../utils");
11
11
  const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
12
12
  const b = (0, utils_1.block)('hubspot-form');
13
- const HubspotForm = (props) => {
13
+ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
14
14
  const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
15
15
  // hubspotEvents, // TODO: decide how to handle them
16
16
  analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
@@ -25,10 +25,10 @@ const HubspotForm = (props) => {
25
25
  onBeforeSubmit,
26
26
  onLoad,
27
27
  onSubmitError,
28
- onSubmit: (e) => {
28
+ onSubmit: (event) => {
29
29
  handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
30
30
  handleAnalytics(analyticsEvents);
31
- onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
31
+ onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
32
32
  },
33
33
  }), [
34
34
  onBeforeLoad,
@@ -42,6 +42,7 @@ const HubspotForm = (props) => {
42
42
  onSubmitError,
43
43
  ]);
44
44
  (0, hooks_1.useHandleHubspotEvents)(handlers, formId);
45
- return (react_1.default.createElement(HubspotFormContainer_1.default, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
46
- };
45
+ return (react_1.default.createElement(HubspotFormContainer_1.default, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region, ref: ref }));
46
+ });
47
+ HubspotForm.displayName = 'HubspotForm';
47
48
  exports.default = HubspotForm;
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformFootnotes = exports.transformBlocks = exports.typografTransformer = exports.yfmTransformer = exports.createItemsParser = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ /* eslint-disable no-param-reassign */
6
+ /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
5
7
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
8
  const models_1 = require("../models");
7
9
  const utils_1 = require("./utils");
@@ -47,7 +49,6 @@ const parseItemsTitle = (transformer, items) => items.map((_a) => {
47
49
  });
48
50
  function parsePriceDetailedBlock(transformer, block) {
49
51
  const { priceType } = block;
50
- /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
51
52
  block.items = block.items.map((item) => {
52
53
  const { description, items: details = [] } = item;
53
54
  if (priceType === 'marked-list') {
@@ -65,27 +66,23 @@ function parsePriceDetailedBlock(transformer, block) {
65
66
  item.description = transformer(description);
66
67
  return item;
67
68
  });
68
- /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
69
69
  return block;
70
70
  }
71
71
  const parseContentLayout = (transformer, content) => {
72
72
  if (content) {
73
73
  const { text, additionalInfo } = content;
74
- /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
75
74
  if (text) {
76
75
  content.text = transformer(text);
77
76
  }
78
77
  if (additionalInfo) {
79
78
  content.additionalInfo = transformer(additionalInfo);
80
79
  }
81
- /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
82
80
  }
83
81
  return content;
84
82
  };
85
83
  function parseContentLayoutTitle(transformer, content) {
86
84
  if (content === null || content === void 0 ? void 0 : content.title) {
87
85
  const { title } = content;
88
- // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
89
86
  content.title = title && parseTitle(transformer, title);
90
87
  }
91
88
  return content;
@@ -361,7 +358,6 @@ const config = {
361
358
  function addRandomOrder(block) {
362
359
  if (block) {
363
360
  if ('randomOrder' in block && block.randomOrder && 'children' in block && block.children) {
364
- // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
365
361
  block.children = lodash_1.default.shuffle(block.children);
366
362
  }
367
363
  }
@@ -376,7 +372,6 @@ function transformBlock(lang, blocksConfig, block) {
376
372
  const transformer = transformerRaw.bind(null, lang);
377
373
  if (fields) {
378
374
  fields.forEach((field) => {
379
- /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
380
375
  if (block[field]) {
381
376
  if (parser) {
382
377
  block[field] = parser(transformer, block[field]);
@@ -385,7 +380,6 @@ function transformBlock(lang, blocksConfig, block) {
385
380
  block[field] = transformer(block[field]);
386
381
  }
387
382
  }
388
- /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
389
383
  });
390
384
  }
391
385
  else if (parser) {
@@ -1,5 +1,5 @@
1
- import sanitize from 'sanitize-html';
2
1
  import { Options, Output } from '@doc-tools/transform';
2
+ import sanitize from 'sanitize-html';
3
3
  import { Lang } from '../utils/configure';
4
4
  export declare enum TransformType {
5
5
  Text = "text",
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  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;
4
4
  const tslib_1 = require("tslib");
5
+ const transform_1 = tslib_1.__importDefault(require("@doc-tools/transform"));
5
6
  const sanitize_html_1 = tslib_1.__importDefault(require("sanitize-html"));
6
7
  const typograf_1 = tslib_1.__importDefault(require("typograf"));
7
- const transform_1 = tslib_1.__importDefault(require("@doc-tools/transform"));
8
8
  const configure_1 = require("../utils/configure");
9
9
  var TransformType;
10
10
  (function (TransformType) {
@@ -107,7 +107,7 @@ function typografEntity({ entity, fields, lang = configure_1.Lang.Ru, transformT
107
107
  const transformer = transformTypeMap[transformType];
108
108
  fields.forEach((fieldName) => {
109
109
  if (entity[fieldName]) {
110
- // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
110
+ // eslint-disable-next-line no-param-reassign, no-not-accumulator-reassign/no-not-accumulator-reassign
111
111
  entity[fieldName] = transformer(entity[fieldName], lang);
112
112
  }
113
113
  });
@@ -22,7 +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
+ // eslint-disable-next-line no-param-reassign, no-not-accumulator-reassign/no-not-accumulator-reassign
26
26
  element[direction] = isReverse
27
27
  ? startPosition - scrollPosition
28
28
  : startPosition + scrollPosition;
@@ -1,5 +1,93 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
+ .pc-slick-origin.slick-slider {
4
+ position: relative;
5
+ display: block;
6
+ box-sizing: border-box;
7
+ -webkit-touch-callout: none;
8
+ user-select: none;
9
+ touch-action: pan-y;
10
+ -webkit-tap-highlight-color: transparent;
11
+ }
12
+ .pc-slick-origin.slick-slider .slick-track,
13
+ .pc-slick-origin.slick-slider .slick-list {
14
+ transform: translate3d(0, 0, 0);
15
+ }
16
+ .pc-slick-origin .slick-list {
17
+ position: relative;
18
+ overflow: hidden;
19
+ display: block;
20
+ margin: 0;
21
+ padding: 0;
22
+ }
23
+ .pc-slick-origin .slick-list:focus {
24
+ outline: none;
25
+ }
26
+ .pc-slick-origin .slick-list.dragging {
27
+ cursor: hand;
28
+ }
29
+ .pc-slick-origin .slick-track {
30
+ position: relative;
31
+ left: 0;
32
+ top: 0;
33
+ display: block;
34
+ margin-left: auto;
35
+ margin-right: auto;
36
+ }
37
+ .pc-slick-origin .slick-track::before, .pc-slick-origin .slick-track::after {
38
+ content: "";
39
+ display: table;
40
+ }
41
+ .pc-slick-origin .slick-track:after {
42
+ clear: both;
43
+ }
44
+ .slick-loading .pc-slick-origin .slick-track {
45
+ visibility: hidden;
46
+ }
47
+ .pc-slick-origin .slick-slide {
48
+ float: left;
49
+ height: 100%;
50
+ min-height: 1px;
51
+ display: none;
52
+ }
53
+ [dir=rtl] .pc-slick-origin .slick-slide {
54
+ float: right;
55
+ }
56
+ .pc-slick-origin .slick-slide img {
57
+ display: block;
58
+ }
59
+ .pc-slick-origin .slick-slide.slick-loading img {
60
+ display: none;
61
+ }
62
+ .pc-slick-origin .slick-slide.dragging img {
63
+ pointer-events: none;
64
+ }
65
+ .slick-initialized .pc-slick-origin .slick-slide {
66
+ display: block;
67
+ }
68
+ .slick-loading .pc-slick-origin .slick-slide {
69
+ visibility: hidden;
70
+ }
71
+ .slick-vertical .pc-slick-origin .slick-slide {
72
+ display: block;
73
+ height: auto;
74
+ border: 1px solid transparent;
75
+ }
76
+ .pc-slick-origin.slick-initialized .slick-slide {
77
+ display: block;
78
+ }
79
+ .pc-slick-origin.slick-loading .slick-slide {
80
+ visibility: hidden;
81
+ }
82
+ .pc-slick-origin.slick-vertical .slick-slide {
83
+ display: block;
84
+ height: auto;
85
+ border: 1px solid transparent;
86
+ }
87
+ .pc-slick-origin .slick-arrow.slick-hidden {
88
+ display: none;
89
+ }
90
+
3
91
  .pc-SliderBlock .slick-list {
4
92
  padding: 24px 0 20px;
5
93
  margin: 0 -8px;
@@ -1,6 +1,5 @@
1
1
  import { Settings } from 'react-slick';
2
2
  import { ClassNameProps, Refable, SliderProps as SliderParams, WithChildren } from '../../models';
3
- import './slick.css';
4
3
  import './Slider.css';
5
4
  export interface SliderProps extends Omit<SliderParams, 'children'>, Refable<HTMLDivElement>, ClassNameProps, Pick<Settings, 'lazyLoad'> {
6
5
  type?: string;
@@ -14,9 +14,6 @@ import { SliderType, } from '../../models';
14
14
  import { block } from '../../utils';
15
15
  import Arrow from './Arrow/Arrow';
16
16
  import { getSliderResponsiveParams, getSlidesCountByBreakpoint, getSlidesToShowCount, getSlidesToShowWithDefaults, } from './utils';
17
- import './slick.css';
18
- // Cause Slider.css should override slick.css
19
- // eslint-disable-next-line import/order
20
17
  import './Slider.css';
21
18
  const b = block('SliderBlock');
22
19
  const slick = block('slick-origin');
@@ -3,7 +3,7 @@ import './Anchor.css';
3
3
  export declare const qaIdByDefault = "qa-anchor";
4
4
  export interface AnchorProps extends ClassNameProps {
5
5
  id: string;
6
- dataQa?: string;
6
+ qa?: string;
7
7
  }
8
- declare const Anchor: ({ id, className, dataQa }: AnchorProps) => JSX.Element;
8
+ declare const Anchor: ({ id, className, qa }: AnchorProps) => JSX.Element;
9
9
  export default Anchor;
@@ -4,5 +4,5 @@ import { block } from '../../utils';
4
4
  import './Anchor.css';
5
5
  const b = block('Anchor');
6
6
  export const qaIdByDefault = 'qa-anchor';
7
- const Anchor = ({ id, className, dataQa }) => (React.createElement("div", { id: id, className: b(null, className), "data-qa": dataQa || qaIdByDefault }));
7
+ const Anchor = ({ id, className, qa }) => (React.createElement("div", { id: id, className: b(null, className), "data-qa": qa || qaIdByDefault }));
8
8
  export default Anchor;
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
2
- import _ from 'lodash';
3
2
  import { Spin } from '@gravity-ui/uikit';
3
+ import _ from 'lodash';
4
4
  import { LocaleContext } from '../../../context/localeContext/localeContext';
5
5
  import { MapsContext } from '../../../context/mapsContext/mapsContext';
6
6
  import { MobileContext } from '../../../context/mobileContext';
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
2
+ import { Icon } from '@gravity-ui/uikit';
2
3
  import _ from 'lodash';
3
4
  import ReactPlayer from 'react-player';
4
- import { Icon } from '@gravity-ui/uikit';
5
5
  import { MetrikaContext } from '../../context/metrikaContext';
6
6
  import { MobileContext } from '../../context/mobileContext';
7
7
  import { VideoContext } from '../../context/videoContext';
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { Icon } from '@gravity-ui/uikit';
2
3
  import _ from 'lodash';
3
4
  import { v4 as uuidv4 } from 'uuid';
4
- import { Icon } from '@gravity-ui/uikit';
5
5
  import { PlayVideo } from '../../icons';
6
6
  import { block, getPageSearchParams } from '../../utils';
7
7
  import Image from '../Image/Image';
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  /* we won't use 'pc' class prefix here to let you opportunity to define yfm styles
3
2
  in your project via global 'yfm' class */
3
+ import React from 'react';
4
4
  import block from 'bem-cn-lite';
5
5
  import toSnakeCase from 'snakecase-keys';
6
6
  import { HTML } from '../../components';
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useEffect, useState } from 'react';
2
- import blockCn from 'bem-cn-lite';
3
2
  import { Spin } from '@gravity-ui/uikit';
3
+ import blockCn from 'bem-cn-lite';
4
4
  import ErrorWrapper from '../../components/ErrorWrapper/ErrorWrapper';
5
5
  import i18n from './i18n';
6
6
  import './Loadable.css';
@@ -7,4 +7,4 @@ export interface GridColumnProps extends GridColumnClassParams, Refable<HTMLDivE
7
7
  dataQa?: string;
8
8
  children?: React.ReactNode;
9
9
  }
10
- export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "dataQa" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent"> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent" | "dataQa"> & React.RefAttributes<HTMLDivElement>>;