@gravity-ui/page-constructor 8.1.2-alpha.1 → 8.2.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 (120) hide show
  1. package/build/cjs/blocks/CardLayout/schema.d.ts +156 -0
  2. package/build/cjs/blocks/ContentLayout/schema.d.ts +78 -0
  3. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +78 -0
  4. package/build/cjs/blocks/FilterBlock/schema.d.ts +156 -0
  5. package/build/cjs/blocks/FoldableList/schema.d.ts +78 -0
  6. package/build/cjs/blocks/Form/schema.d.ts +78 -0
  7. package/build/cjs/blocks/Info/schema.d.ts +156 -0
  8. package/build/cjs/blocks/Map/schema.d.ts +78 -0
  9. package/build/cjs/blocks/Media/schema.d.ts +156 -0
  10. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +78 -0
  11. package/build/cjs/blocks/Questions/schema.d.ts +78 -0
  12. package/build/cjs/blocks/Slider/Slider.d.ts +1 -1
  13. package/build/cjs/blocks/Slider/Slider.js +2 -2
  14. package/build/cjs/blocks/Slider/Slider.js.map +1 -1
  15. package/build/cjs/blocks/Slider/schema.d.ts +78 -0
  16. package/build/cjs/blocks/SliderOld/schema.d.ts +78 -0
  17. package/build/cjs/blocks/Tabs/schema.d.ts +156 -0
  18. package/build/cjs/components/Title/TitleItem.d.ts +2 -2
  19. package/build/cjs/components/Title/TitleItem.js +13 -3
  20. package/build/cjs/components/Title/TitleItem.js.map +1 -1
  21. package/build/cjs/constructor-items.d.ts +1 -1
  22. package/build/cjs/demo/ComponentsControls.stories.d.ts +4 -0
  23. package/build/cjs/demo/ComponentsControls.stories.js +34 -0
  24. package/build/cjs/demo/ComponentsControls.stories.js.map +1 -0
  25. package/build/cjs/demo/ComponentsLayout.stories.css +13 -0
  26. package/build/cjs/demo/ComponentsLayout.stories.d.ts +4 -0
  27. package/build/cjs/demo/ComponentsLayout.stories.js +28 -0
  28. package/build/cjs/demo/ComponentsLayout.stories.js.map +1 -0
  29. package/build/cjs/demo/ComponentsText.stories.d.ts +4 -0
  30. package/build/cjs/demo/ComponentsText.stories.js +26 -0
  31. package/build/cjs/demo/ComponentsText.stories.js.map +1 -0
  32. package/build/cjs/demo/ContentAndData.stories.d.ts +8 -0
  33. package/build/cjs/demo/ContentAndData.stories.js +73 -0
  34. package/build/cjs/demo/ContentAndData.stories.js.map +1 -0
  35. package/build/cjs/demo/FeaturesAndCards.stories.d.ts +8 -0
  36. package/build/cjs/demo/FeaturesAndCards.stories.js +112 -0
  37. package/build/cjs/demo/FeaturesAndCards.stories.js.map +1 -0
  38. package/build/cjs/demo/HeroAndMedia.stories.d.ts +8 -0
  39. package/build/cjs/demo/HeroAndMedia.stories.js +58 -0
  40. package/build/cjs/demo/HeroAndMedia.stories.js.map +1 -0
  41. package/build/cjs/demo/InteractiveAndForms.stories.d.ts +8 -0
  42. package/build/cjs/demo/InteractiveAndForms.stories.js +83 -0
  43. package/build/cjs/demo/InteractiveAndForms.stories.js.map +1 -0
  44. package/build/cjs/models/constructor-items/blocks.d.ts +0 -1
  45. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  46. package/build/cjs/models/constructor-items/common.d.ts +1 -1
  47. package/build/cjs/models/constructor-items/common.js.map +1 -1
  48. package/build/cjs/schema/constants.d.ts +234 -0
  49. package/build/cjs/schema/validators/common.d.ts +156 -0
  50. package/build/cjs/schema/validators/common.js +3 -0
  51. package/build/cjs/schema/validators/common.js.map +1 -1
  52. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +78 -0
  53. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +78 -0
  54. package/build/cjs/sub-blocks/Content/schema.d.ts +156 -0
  55. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +78 -0
  56. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +78 -0
  57. package/build/cjs/text-transform/config.d.ts +1 -0
  58. package/build/esm/blocks/CardLayout/schema.d.ts +156 -0
  59. package/build/esm/blocks/ContentLayout/schema.d.ts +78 -0
  60. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +78 -0
  61. package/build/esm/blocks/FilterBlock/schema.d.ts +156 -0
  62. package/build/esm/blocks/FoldableList/schema.d.ts +78 -0
  63. package/build/esm/blocks/Form/schema.d.ts +78 -0
  64. package/build/esm/blocks/Info/schema.d.ts +156 -0
  65. package/build/esm/blocks/Map/schema.d.ts +78 -0
  66. package/build/esm/blocks/Media/schema.d.ts +156 -0
  67. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +78 -0
  68. package/build/esm/blocks/Questions/schema.d.ts +78 -0
  69. package/build/esm/blocks/Slider/Slider.d.ts +1 -1
  70. package/build/esm/blocks/Slider/Slider.js +2 -2
  71. package/build/esm/blocks/Slider/Slider.js.map +1 -1
  72. package/build/esm/blocks/Slider/schema.d.ts +78 -0
  73. package/build/esm/blocks/SliderOld/schema.d.ts +78 -0
  74. package/build/esm/blocks/Tabs/schema.d.ts +156 -0
  75. package/build/esm/components/Title/TitleItem.d.ts +2 -2
  76. package/build/esm/components/Title/TitleItem.js +13 -3
  77. package/build/esm/components/Title/TitleItem.js.map +1 -1
  78. package/build/esm/constructor-items.d.ts +1 -1
  79. package/build/esm/demo/ComponentsControls.stories.d.ts +4 -0
  80. package/build/esm/demo/ComponentsControls.stories.js +29 -0
  81. package/build/esm/demo/ComponentsControls.stories.js.map +1 -0
  82. package/build/esm/demo/ComponentsLayout.stories.css +13 -0
  83. package/build/esm/demo/ComponentsLayout.stories.d.ts +5 -0
  84. package/build/esm/demo/ComponentsLayout.stories.js +24 -0
  85. package/build/esm/demo/ComponentsLayout.stories.js.map +1 -0
  86. package/build/esm/demo/ComponentsText.stories.d.ts +4 -0
  87. package/build/esm/demo/ComponentsText.stories.js +21 -0
  88. package/build/esm/demo/ComponentsText.stories.js.map +1 -0
  89. package/build/esm/demo/ContentAndData.stories.d.ts +8 -0
  90. package/build/esm/demo/ContentAndData.stories.js +69 -0
  91. package/build/esm/demo/ContentAndData.stories.js.map +1 -0
  92. package/build/esm/demo/FeaturesAndCards.stories.d.ts +8 -0
  93. package/build/esm/demo/FeaturesAndCards.stories.js +108 -0
  94. package/build/esm/demo/FeaturesAndCards.stories.js.map +1 -0
  95. package/build/esm/demo/HeroAndMedia.stories.d.ts +8 -0
  96. package/build/esm/demo/HeroAndMedia.stories.js +54 -0
  97. package/build/esm/demo/HeroAndMedia.stories.js.map +1 -0
  98. package/build/esm/demo/InteractiveAndForms.stories.d.ts +8 -0
  99. package/build/esm/demo/InteractiveAndForms.stories.js +79 -0
  100. package/build/esm/demo/InteractiveAndForms.stories.js.map +1 -0
  101. package/build/esm/models/constructor-items/blocks.d.ts +0 -1
  102. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  103. package/build/esm/models/constructor-items/common.d.ts +1 -1
  104. package/build/esm/models/constructor-items/common.js.map +1 -1
  105. package/build/esm/schema/constants.d.ts +234 -0
  106. package/build/esm/schema/validators/common.d.ts +156 -0
  107. package/build/esm/schema/validators/common.js +3 -0
  108. package/build/esm/schema/validators/common.js.map +1 -1
  109. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +78 -0
  110. package/build/esm/sub-blocks/BasicCard/schema.d.ts +78 -0
  111. package/build/esm/sub-blocks/Content/schema.d.ts +156 -0
  112. package/build/esm/sub-blocks/ImageCard/schema.d.ts +78 -0
  113. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +78 -0
  114. package/build/esm/text-transform/config.d.ts +1 -0
  115. package/package.json +1 -1
  116. package/schema/index.js +1 -1
  117. package/server/models/constructor-items/blocks.d.ts +0 -1
  118. package/server/models/constructor-items/common.d.ts +1 -1
  119. package/server/text-transform/config.d.ts +1 -0
  120. package/widget/index.js +1 -1
@@ -375,6 +375,84 @@ export declare const PromoFeaturesBlock: {
375
375
  resetMargin: {
376
376
  type: string;
377
377
  };
378
+ analyticsEvents: {
379
+ anyOf: ({
380
+ type: string;
381
+ additionalProperties: {
382
+ type: string;
383
+ };
384
+ required: string[];
385
+ properties: {
386
+ name: {
387
+ type: string;
388
+ };
389
+ type: {
390
+ type: string;
391
+ };
392
+ counters: {
393
+ type: string;
394
+ additionalProperties: boolean;
395
+ required: never[];
396
+ properties: {
397
+ include: {
398
+ type: string;
399
+ items: {
400
+ type: string;
401
+ };
402
+ };
403
+ exclude: {
404
+ type: string;
405
+ items: {
406
+ type: string;
407
+ };
408
+ };
409
+ };
410
+ };
411
+ context: {
412
+ type: string;
413
+ };
414
+ };
415
+ } | {
416
+ type: string;
417
+ items: {
418
+ type: string;
419
+ additionalProperties: {
420
+ type: string;
421
+ };
422
+ required: string[];
423
+ properties: {
424
+ name: {
425
+ type: string;
426
+ };
427
+ type: {
428
+ type: string;
429
+ };
430
+ counters: {
431
+ type: string;
432
+ additionalProperties: boolean;
433
+ required: never[];
434
+ properties: {
435
+ include: {
436
+ type: string;
437
+ items: {
438
+ type: string;
439
+ };
440
+ };
441
+ exclude: {
442
+ type: string;
443
+ items: {
444
+ type: string;
445
+ };
446
+ };
447
+ };
448
+ };
449
+ context: {
450
+ type: string;
451
+ };
452
+ };
453
+ };
454
+ })[];
455
+ };
378
456
  };
379
457
  })[];
380
458
  };
@@ -42,6 +42,84 @@ export declare const QuestionsBlock: {
42
42
  resetMargin: {
43
43
  type: string;
44
44
  };
45
+ analyticsEvents: {
46
+ anyOf: ({
47
+ type: string;
48
+ additionalProperties: {
49
+ type: string;
50
+ };
51
+ required: string[];
52
+ properties: {
53
+ name: {
54
+ type: string;
55
+ };
56
+ type: {
57
+ type: string;
58
+ };
59
+ counters: {
60
+ type: string;
61
+ additionalProperties: boolean;
62
+ required: never[];
63
+ properties: {
64
+ include: {
65
+ type: string;
66
+ items: {
67
+ type: string;
68
+ };
69
+ };
70
+ exclude: {
71
+ type: string;
72
+ items: {
73
+ type: string;
74
+ };
75
+ };
76
+ };
77
+ };
78
+ context: {
79
+ type: string;
80
+ };
81
+ };
82
+ } | {
83
+ type: string;
84
+ items: {
85
+ type: string;
86
+ additionalProperties: {
87
+ type: string;
88
+ };
89
+ required: string[];
90
+ properties: {
91
+ name: {
92
+ type: string;
93
+ };
94
+ type: {
95
+ type: string;
96
+ };
97
+ counters: {
98
+ type: string;
99
+ additionalProperties: boolean;
100
+ required: never[];
101
+ properties: {
102
+ include: {
103
+ type: string;
104
+ items: {
105
+ type: string;
106
+ };
107
+ };
108
+ exclude: {
109
+ type: string;
110
+ items: {
111
+ type: string;
112
+ };
113
+ };
114
+ };
115
+ };
116
+ context: {
117
+ type: string;
118
+ };
119
+ };
120
+ };
121
+ })[];
122
+ };
45
123
  };
46
124
  contentType?: undefined;
47
125
  })[];
@@ -14,5 +14,5 @@ export interface SliderProps extends Omit<SliderParams, 'children'>, Partial<Pic
14
14
  arrowSize?: number;
15
15
  initialSlide?: number;
16
16
  }
17
- export declare const SliderBlock: ({ animated, title, description, type, anchorId, arrows, adaptive, autoplay: autoplayMs, dots, initialSlide, className, dotsClassName, disclaimer, children, blockClassName, arrowSize, slidesToShow, centeredSlides, onSlideChange, onSlideChangeTransitionStart, onSlideChangeTransitionEnd, onActiveIndexChange, onBreakpoint, }: React.PropsWithChildren<SliderProps>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const SliderBlock: ({ animated, title, description, type, anchorId, arrows, adaptive, autoplay: autoplayMs, dots, initialSlide, className, dotsClassName, disclaimer, children, blockClassName, arrowSize, slidesToShow, onSlideChange, onSlideChangeTransitionStart, onSlideChangeTransitionEnd, onActiveIndexChange, onBreakpoint, }: React.PropsWithChildren<SliderProps>) => import("react/jsx-runtime").JSX.Element;
18
18
  export default SliderBlock;
@@ -16,7 +16,7 @@ import { useSlider } from "./useSlider.js";
16
16
  import { useSliderPagination } from "./useSliderPagination.js";
17
17
  import './Slider.css';
18
18
  const b = block('SliderBlock');
19
- export const SliderBlock = ({ animated, title, description, type, anchorId, arrows = true, adaptive, autoplay: autoplayMs, dots = true, initialSlide = 0, className, dotsClassName, disclaimer, children, blockClassName, arrowSize, slidesToShow, centeredSlides, onSlideChange, onSlideChangeTransitionStart, onSlideChangeTransitionEnd, onActiveIndexChange, onBreakpoint, }) => {
19
+ export const SliderBlock = ({ animated, title, description, type, anchorId, arrows = true, adaptive, autoplay: autoplayMs, dots = true, initialSlide = 0, className, dotsClassName, disclaimer, children, blockClassName, arrowSize, slidesToShow, onSlideChange, onSlideChangeTransitionStart, onSlideChangeTransitionEnd, onActiveIndexChange, onBreakpoint, }) => {
20
20
  const { autoplay, isLocked, childrenCount, breakpoints, onSwiper, onPrev, onNext, setIsLocked } = useSlider({
21
21
  slidesToShow,
22
22
  children,
@@ -41,7 +41,7 @@ export const SliderBlock = ({ animated, title, description, type, anchorId, arro
41
41
  arrows,
42
42
  'without-dots': !dots || isLocked,
43
43
  type,
44
- }, blockClassName), children: [anchorId && _jsx(Anchor, { id: anchorId }), _jsx(Title, { title: title, subtitle: description, className: b('header', { 'no-description': !description }) }), _jsxs(AnimateBlock, { className: b('animate-slides'), animate: animated, children: [_jsx(SwiperReact, { modules: [Autoplay, A11y, Pagination], className: b('slider', className), onSwiper: onSwiper, speed: 1000, autoplay: autoplay, autoHeight: adaptive, initialSlide: initialSlide, noSwiping: false, centeredSlides: centeredSlides, breakpoints: breakpoints, onSlideChange: onSlideChange, onSlideChangeTransitionStart: onSlideChangeTransitionStart, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onActiveIndexChange: onActiveIndexChange, onBreakpoint: onBreakpoint, onLock: () => setIsLocked(true), onUnlock: () => setIsLocked(false), watchOverflow: true, watchSlidesProgress: true, touchStartPreventDefault: false, touchAngle: 45, threshold: 10, longSwipes: true, longSwipesRatio: 0.5, resistance: true, resistanceRatio: 0.5, a11y: {
44
+ }, blockClassName), children: [anchorId && _jsx(Anchor, { id: anchorId }), _jsx(Title, { title: title, subtitle: description, className: b('header', { 'no-description': !description }) }), _jsxs(AnimateBlock, { className: b('animate-slides'), animate: animated, children: [_jsx(SwiperReact, { modules: [Autoplay, A11y, Pagination], className: b('slider', className), onSwiper: onSwiper, speed: 1000, autoplay: autoplay, autoHeight: adaptive, initialSlide: initialSlide, noSwiping: false, breakpoints: breakpoints, onSlideChange: onSlideChange, onSlideChangeTransitionStart: onSlideChangeTransitionStart, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onActiveIndexChange: onActiveIndexChange, onBreakpoint: onBreakpoint, onLock: () => setIsLocked(true), onUnlock: () => setIsLocked(false), watchOverflow: true, watchSlidesProgress: true, touchStartPreventDefault: false, touchAngle: 45, threshold: 10, longSwipes: true, longSwipesRatio: 0.5, resistance: true, resistanceRatio: 0.5, a11y: {
45
45
  slideLabelMessage: '',
46
46
  paginationBulletMessage: i18n('dot-label', { index: '{{index}}' }),
47
47
  }, ...paginationProps, children: React.Children.map(children, (elem, index) => (_jsx(SwiperSlide, { className: b('slide'), children: ({ isVisible }) => (_jsx("div", { className: b('slide-item'), "aria-hidden": !isA11yControlHidden && !isVisible, children: elem })) }, index))) }), arrows && !isLocked && (_jsx(React.Fragment, { children: _jsxs("div", { "aria-hidden": isA11yControlHidden, children: [_jsx(Arrow, { className: b('arrow', { prev: true }), type: "left", transparent: type === SliderType.HeaderCard, onClick: onPrev, size: arrowSize, extraProps: { tabIndex: controlTabIndex } }), _jsx(Arrow, { className: b('arrow', { next: true }), type: "right", transparent: type === SliderType.HeaderCard, onClick: onNext, size: arrowSize, extraProps: { tabIndex: controlTabIndex } })] }) })), _jsx("div", { className: b('footer'), children: disclaimer ? (_jsx("div", { className: b('disclaimer', { size: disclaimer?.size || 'm' }), children: disclaimer?.text })) : null })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sourceRoot":"../../../../src","sources":["blocks/Slider/Slider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,YAAY,CAAC;AACpB,OAAO,iBAAiB,CAAC;AACzB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAC,MAAM,gBAAgB,C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f,UAAU,EAAE,EAAC,QAAQ,EAAE,eAAe,EAAC,GACzC,EACF,KAAC,KAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,EACnC,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,IAAI,KAAK,UAAU,CAAC,UAAU,EAC3C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,EAAC,QAAQ,EAAE,eAAe,EAAC,GACzC,IACA,GACO,CACpB,EACD,cAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,YACtB,UAAU,CAAC,CAAC,CAAC,CACV,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,IAAI,GAAG,EAAC,CAAC,YAC3D,UAAU,EAAE,IAAI,GACf,CACT,CAAC,CAAC,CAAC,IAAI,GACN,IACK,IACb,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import * as React from 'react';\n\nimport 'swiper/css';\nimport 'swiper/css/a11y';\nimport 'swiper/css/pagination';\nimport {A11y, Autoplay, Pagination} from 'swiper/modules';\nimport {Swiper as SwiperReact, SwiperSlide} from 'swiper/react';\n\nimport Anchor from '../../components/Anchor/Anchor';\nimport AnimateBlock from '../../components/AnimateBlock/AnimateBlock';\nimport Title from '../../components/Title/Title';\nimport {ClassNameProps, Refable, SliderProps as SliderParams, SliderType} from '../../models';\nimport {block} from '../../utils';\n\nimport Arrow from './Arrow/Arrow';\nimport {i18n} from './i18n';\nimport {useSlider} from './useSlider';\nimport {useSliderPagination} from './useSliderPagination';\n\nimport './Slider.scss';\n\nexport type {Swiper, SwiperOptions} from 'swiper/types';\n\nconst b = block('SliderBlock');\n\nexport interface SliderProps\n extends Omit<SliderParams, 'children'>,\n Partial<\n Pick<\n React.ComponentProps<typeof SwiperReact>,\n | 'onSlideChange'\n | 'onSlideChangeTransitionStart'\n | 'onSlideChangeTransitionEnd'\n | 'onActiveIndexChange'\n | 'onBreakpoint'\n >\n >,\n Refable<HTMLDivElement>,\n ClassNameProps {\n type?: string;\n anchorId?: string;\n dotsClassName?: string;\n blockClassName?: string;\n arrowSize?: number;\n initialSlide?: number;\n}\n\nexport const SliderBlock = ({\n animated,\n title,\n description,\n type,\n anchorId,\n arrows = true,\n adaptive,\n autoplay: autoplayMs,\n dots = true,\n initialSlide = 0,\n className,\n dotsClassName,\n disclaimer,\n children,\n blockClassName,\n arrowSize,\n slidesToShow,\n centeredSlides,\n onSlideChange,\n onSlideChangeTransitionStart,\n onSlideChangeTransitionEnd,\n onActiveIndexChange,\n onBreakpoint,\n}: React.PropsWithChildren<SliderProps>) => {\n const {autoplay, isLocked, childrenCount, breakpoints, onSwiper, onPrev, onNext, setIsLocked} =\n useSlider({\n slidesToShow,\n children,\n type,\n autoplayMs,\n });\n\n const isA11yControlHidden = Boolean(autoplay);\n const controlTabIndex = isA11yControlHidden ? -1 : 0;\n\n const paginationProps = useSliderPagination({\n enabled: dots,\n isA11yControlHidden,\n controlTabIndex,\n horizontalClass: b('dots'),\n bulletClass: b('dot', dotsClassName),\n bulletActiveClass: b('dot_active'),\n paginationLabel: i18n('pagination-label'),\n });\n\n return (\n <div\n className={b(\n {\n 'one-slide': childrenCount === 1,\n 'only-arrows':\n (!title || (typeof title !== 'string' && !title?.text)) &&\n !description &&\n arrows,\n 'without-dots': !dots || isLocked,\n type,\n },\n blockClassName,\n )}\n >\n {anchorId && <Anchor id={anchorId} />}\n <Title\n title={title}\n subtitle={description}\n className={b('header', {'no-description': !description})}\n />\n <AnimateBlock className={b('animate-slides')} animate={animated}>\n <SwiperReact\n modules={[Autoplay, A11y, Pagination]}\n className={b('slider', className)}\n onSwiper={onSwiper}\n speed={1000}\n autoplay={autoplay}\n autoHeight={adaptive}\n initialSlide={initialSlide}\n noSwiping={false}\n centeredSlides={centeredSlides}\n breakpoints={breakpoints}\n onSlideChange={onSlideChange}\n onSlideChangeTransitionStart={onSlideChangeTransitionStart}\n onSlideChangeTransitionEnd={onSlideChangeTransitionEnd}\n onActiveIndexChange={onActiveIndexChange}\n onBreakpoint={onBreakpoint}\n onLock={() => setIsLocked(true)}\n onUnlock={() => setIsLocked(false)}\n watchOverflow\n watchSlidesProgress\n touchStartPreventDefault={false}\n touchAngle={45}\n threshold={10}\n longSwipes={true}\n longSwipesRatio={0.5}\n resistance={true}\n resistanceRatio={0.5}\n a11y={{\n slideLabelMessage: '',\n paginationBulletMessage: i18n('dot-label', {index: '{{index}}'}),\n }}\n {...paginationProps}\n >\n {React.Children.map(children, (elem, index) => (\n <SwiperSlide className={b('slide')} key={index}>\n {({isVisible}) => (\n <div\n className={b('slide-item')}\n aria-hidden={!isA11yControlHidden && !isVisible}\n >\n {elem}\n </div>\n )}\n </SwiperSlide>\n ))}\n </SwiperReact>\n {arrows && !isLocked && (\n <React.Fragment>\n <div aria-hidden={isA11yControlHidden}>\n <Arrow\n className={b('arrow', {prev: true})}\n type=\"left\"\n transparent={type === SliderType.HeaderCard}\n onClick={onPrev}\n size={arrowSize}\n extraProps={{tabIndex: controlTabIndex}}\n />\n <Arrow\n className={b('arrow', {next: true})}\n type=\"right\"\n transparent={type === SliderType.HeaderCard}\n onClick={onNext}\n size={arrowSize}\n extraProps={{tabIndex: controlTabIndex}}\n />\n </div>\n </React.Fragment>\n )}\n <div className={b('footer')}>\n {disclaimer ? (\n <div className={b('disclaimer', {size: disclaimer?.size || 'm'})}>\n {disclaimer?.text}\n </div>\n ) : null}\n </div>\n </AnimateBlock>\n </div>\n );\n};\n\nexport default SliderBlock;\n"]}
1
+ {"version":3,"file":"Slider.js","sourceRoot":"../../../../src","sources":["blocks/Slider/Slider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,YAAY,CAAC;AACpB,OAAO,iBAAiB,CAAC;AACzB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,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f,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,EAAC,QAAQ,EAAE,eAAe,EAAC,GACzC,EACF,KAAC,KAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,EACnC,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,IAAI,KAAK,UAAU,CAAC,UAAU,EAC3C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,EAAC,QAAQ,EAAE,eAAe,EAAC,GACzC,IACA,GACO,CACpB,EACD,cAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,YACtB,UAAU,CAAC,CAAC,CAAC,CACV,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,IAAI,GAAG,EAAC,CAAC,YAC3D,UAAU,EAAE,IAAI,GACf,CACT,CAAC,CAAC,CAAC,IAAI,GACN,IACK,IACb,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import * as React from 'react';\n\nimport 'swiper/css';\nimport 'swiper/css/a11y';\nimport 'swiper/css/pagination';\nimport {A11y, Autoplay, Pagination} from 'swiper/modules';\nimport {Swiper as SwiperReact, SwiperSlide} from 'swiper/react';\n\nimport Anchor from '../../components/Anchor/Anchor';\nimport AnimateBlock from '../../components/AnimateBlock/AnimateBlock';\nimport Title from '../../components/Title/Title';\nimport {ClassNameProps, Refable, SliderProps as SliderParams, SliderType} from '../../models';\nimport {block} from '../../utils';\n\nimport Arrow from './Arrow/Arrow';\nimport {i18n} from './i18n';\nimport {useSlider} from './useSlider';\nimport {useSliderPagination} from './useSliderPagination';\n\nimport './Slider.scss';\n\nexport type {Swiper, SwiperOptions} from 'swiper/types';\n\nconst b = block('SliderBlock');\n\nexport interface SliderProps\n extends Omit<SliderParams, 'children'>,\n Partial<\n Pick<\n React.ComponentProps<typeof SwiperReact>,\n | 'onSlideChange'\n | 'onSlideChangeTransitionStart'\n | 'onSlideChangeTransitionEnd'\n | 'onActiveIndexChange'\n | 'onBreakpoint'\n >\n >,\n Refable<HTMLDivElement>,\n ClassNameProps {\n type?: string;\n anchorId?: string;\n dotsClassName?: string;\n blockClassName?: string;\n arrowSize?: number;\n initialSlide?: number;\n}\n\nexport const SliderBlock = ({\n animated,\n title,\n description,\n type,\n anchorId,\n arrows = true,\n adaptive,\n autoplay: autoplayMs,\n dots = true,\n initialSlide = 0,\n className,\n dotsClassName,\n disclaimer,\n children,\n blockClassName,\n arrowSize,\n slidesToShow,\n onSlideChange,\n onSlideChangeTransitionStart,\n onSlideChangeTransitionEnd,\n onActiveIndexChange,\n onBreakpoint,\n}: React.PropsWithChildren<SliderProps>) => {\n const {autoplay, isLocked, childrenCount, breakpoints, onSwiper, onPrev, onNext, setIsLocked} =\n useSlider({\n slidesToShow,\n children,\n type,\n autoplayMs,\n });\n\n const isA11yControlHidden = Boolean(autoplay);\n const controlTabIndex = isA11yControlHidden ? -1 : 0;\n\n const paginationProps = useSliderPagination({\n enabled: dots,\n isA11yControlHidden,\n controlTabIndex,\n horizontalClass: b('dots'),\n bulletClass: b('dot', dotsClassName),\n bulletActiveClass: b('dot_active'),\n paginationLabel: i18n('pagination-label'),\n });\n\n return (\n <div\n className={b(\n {\n 'one-slide': childrenCount === 1,\n 'only-arrows':\n (!title || (typeof title !== 'string' && !title?.text)) &&\n !description &&\n arrows,\n 'without-dots': !dots || isLocked,\n type,\n },\n blockClassName,\n )}\n >\n {anchorId && <Anchor id={anchorId} />}\n <Title\n title={title}\n subtitle={description}\n className={b('header', {'no-description': !description})}\n />\n <AnimateBlock className={b('animate-slides')} animate={animated}>\n <SwiperReact\n modules={[Autoplay, A11y, Pagination]}\n className={b('slider', className)}\n onSwiper={onSwiper}\n speed={1000}\n autoplay={autoplay}\n autoHeight={adaptive}\n initialSlide={initialSlide}\n noSwiping={false}\n breakpoints={breakpoints}\n onSlideChange={onSlideChange}\n onSlideChangeTransitionStart={onSlideChangeTransitionStart}\n onSlideChangeTransitionEnd={onSlideChangeTransitionEnd}\n onActiveIndexChange={onActiveIndexChange}\n onBreakpoint={onBreakpoint}\n onLock={() => setIsLocked(true)}\n onUnlock={() => setIsLocked(false)}\n watchOverflow\n watchSlidesProgress\n touchStartPreventDefault={false}\n touchAngle={45}\n threshold={10}\n longSwipes={true}\n longSwipesRatio={0.5}\n resistance={true}\n resistanceRatio={0.5}\n a11y={{\n slideLabelMessage: '',\n paginationBulletMessage: i18n('dot-label', {index: '{{index}}'}),\n }}\n {...paginationProps}\n >\n {React.Children.map(children, (elem, index) => (\n <SwiperSlide className={b('slide')} key={index}>\n {({isVisible}) => (\n <div\n className={b('slide-item')}\n aria-hidden={!isA11yControlHidden && !isVisible}\n >\n {elem}\n </div>\n )}\n </SwiperSlide>\n ))}\n </SwiperReact>\n {arrows && !isLocked && (\n <React.Fragment>\n <div aria-hidden={isA11yControlHidden}>\n <Arrow\n className={b('arrow', {prev: true})}\n type=\"left\"\n transparent={type === SliderType.HeaderCard}\n onClick={onPrev}\n size={arrowSize}\n extraProps={{tabIndex: controlTabIndex}}\n />\n <Arrow\n className={b('arrow', {next: true})}\n type=\"right\"\n transparent={type === SliderType.HeaderCard}\n onClick={onNext}\n size={arrowSize}\n extraProps={{tabIndex: controlTabIndex}}\n />\n </div>\n </React.Fragment>\n )}\n <div className={b('footer')}>\n {disclaimer ? (\n <div className={b('disclaimer', {size: disclaimer?.size || 'm'})}>\n {disclaimer?.text}\n </div>\n ) : null}\n </div>\n </AnimateBlock>\n </div>\n );\n};\n\nexport default SliderBlock;\n"]}
@@ -124,6 +124,84 @@ export declare const SliderBlock: {
124
124
  resetMargin: {
125
125
  type: string;
126
126
  };
127
+ analyticsEvents: {
128
+ anyOf: ({
129
+ type: string;
130
+ additionalProperties: {
131
+ type: string;
132
+ };
133
+ required: string[];
134
+ properties: {
135
+ name: {
136
+ type: string;
137
+ };
138
+ type: {
139
+ type: string;
140
+ };
141
+ counters: {
142
+ type: string;
143
+ additionalProperties: boolean;
144
+ required: never[];
145
+ properties: {
146
+ include: {
147
+ type: string;
148
+ items: {
149
+ type: string;
150
+ };
151
+ };
152
+ exclude: {
153
+ type: string;
154
+ items: {
155
+ type: string;
156
+ };
157
+ };
158
+ };
159
+ };
160
+ context: {
161
+ type: string;
162
+ };
163
+ };
164
+ } | {
165
+ type: string;
166
+ items: {
167
+ type: string;
168
+ additionalProperties: {
169
+ type: string;
170
+ };
171
+ required: string[];
172
+ properties: {
173
+ name: {
174
+ type: string;
175
+ };
176
+ type: {
177
+ type: string;
178
+ };
179
+ counters: {
180
+ type: string;
181
+ additionalProperties: boolean;
182
+ required: never[];
183
+ properties: {
184
+ include: {
185
+ type: string;
186
+ items: {
187
+ type: string;
188
+ };
189
+ };
190
+ exclude: {
191
+ type: string;
192
+ items: {
193
+ type: string;
194
+ };
195
+ };
196
+ };
197
+ };
198
+ context: {
199
+ type: string;
200
+ };
201
+ };
202
+ };
203
+ })[];
204
+ };
127
205
  };
128
206
  })[];
129
207
  };
@@ -116,6 +116,84 @@ export declare const SliderOldBlock: {
116
116
  resetMargin: {
117
117
  type: string;
118
118
  };
119
+ analyticsEvents: {
120
+ anyOf: ({
121
+ type: string;
122
+ additionalProperties: {
123
+ type: string;
124
+ };
125
+ required: string[];
126
+ properties: {
127
+ name: {
128
+ type: string;
129
+ };
130
+ type: {
131
+ type: string;
132
+ };
133
+ counters: {
134
+ type: string;
135
+ additionalProperties: boolean;
136
+ required: never[];
137
+ properties: {
138
+ include: {
139
+ type: string;
140
+ items: {
141
+ type: string;
142
+ };
143
+ };
144
+ exclude: {
145
+ type: string;
146
+ items: {
147
+ type: string;
148
+ };
149
+ };
150
+ };
151
+ };
152
+ context: {
153
+ type: string;
154
+ };
155
+ };
156
+ } | {
157
+ type: string;
158
+ items: {
159
+ type: string;
160
+ additionalProperties: {
161
+ type: string;
162
+ };
163
+ required: string[];
164
+ properties: {
165
+ name: {
166
+ type: string;
167
+ };
168
+ type: {
169
+ type: string;
170
+ };
171
+ counters: {
172
+ type: string;
173
+ additionalProperties: boolean;
174
+ required: never[];
175
+ properties: {
176
+ include: {
177
+ type: string;
178
+ items: {
179
+ type: string;
180
+ };
181
+ };
182
+ exclude: {
183
+ type: string;
184
+ items: {
185
+ type: string;
186
+ };
187
+ };
188
+ };
189
+ };
190
+ context: {
191
+ type: string;
192
+ };
193
+ };
194
+ };
195
+ })[];
196
+ };
119
197
  };
120
198
  })[];
121
199
  };
@@ -517,6 +517,84 @@ export declare const tabsItem: {
517
517
  resetMargin: {
518
518
  type: string;
519
519
  };
520
+ analyticsEvents: {
521
+ anyOf: ({
522
+ type: string;
523
+ additionalProperties: {
524
+ type: string;
525
+ };
526
+ required: string[];
527
+ properties: {
528
+ name: {
529
+ type: string;
530
+ };
531
+ type: {
532
+ type: string;
533
+ };
534
+ counters: {
535
+ type: string;
536
+ additionalProperties: boolean;
537
+ required: never[];
538
+ properties: {
539
+ include: {
540
+ type: string;
541
+ items: {
542
+ type: string;
543
+ };
544
+ };
545
+ exclude: {
546
+ type: string;
547
+ items: {
548
+ type: string;
549
+ };
550
+ };
551
+ };
552
+ };
553
+ context: {
554
+ type: string;
555
+ };
556
+ };
557
+ } | {
558
+ type: string;
559
+ items: {
560
+ type: string;
561
+ additionalProperties: {
562
+ type: string;
563
+ };
564
+ required: string[];
565
+ properties: {
566
+ name: {
567
+ type: string;
568
+ };
569
+ type: {
570
+ type: string;
571
+ };
572
+ counters: {
573
+ type: string;
574
+ additionalProperties: boolean;
575
+ required: never[];
576
+ properties: {
577
+ include: {
578
+ type: string;
579
+ items: {
580
+ type: string;
581
+ };
582
+ };
583
+ exclude: {
584
+ type: string;
585
+ items: {
586
+ type: string;
587
+ };
588
+ };
589
+ };
590
+ };
591
+ context: {
592
+ type: string;
593
+ };
594
+ };
595
+ };
596
+ })[];
597
+ };
520
598
  };
521
599
  contentType?: undefined;
522
600
  })[];
@@ -643,6 +721,84 @@ export declare const TabsBlock: {
643
721
  resetMargin: {
644
722
  type: string;
645
723
  };
724
+ analyticsEvents: {
725
+ anyOf: ({
726
+ type: string;
727
+ additionalProperties: {
728
+ type: string;
729
+ };
730
+ required: string[];
731
+ properties: {
732
+ name: {
733
+ type: string;
734
+ };
735
+ type: {
736
+ type: string;
737
+ };
738
+ counters: {
739
+ type: string;
740
+ additionalProperties: boolean;
741
+ required: never[];
742
+ properties: {
743
+ include: {
744
+ type: string;
745
+ items: {
746
+ type: string;
747
+ };
748
+ };
749
+ exclude: {
750
+ type: string;
751
+ items: {
752
+ type: string;
753
+ };
754
+ };
755
+ };
756
+ };
757
+ context: {
758
+ type: string;
759
+ };
760
+ };
761
+ } | {
762
+ type: string;
763
+ items: {
764
+ type: string;
765
+ additionalProperties: {
766
+ type: string;
767
+ };
768
+ required: string[];
769
+ properties: {
770
+ name: {
771
+ type: string;
772
+ };
773
+ type: {
774
+ type: string;
775
+ };
776
+ counters: {
777
+ type: string;
778
+ additionalProperties: boolean;
779
+ required: never[];
780
+ properties: {
781
+ include: {
782
+ type: string;
783
+ items: {
784
+ type: string;
785
+ };
786
+ };
787
+ exclude: {
788
+ type: string;
789
+ items: {
790
+ type: string;
791
+ };
792
+ };
793
+ };
794
+ };
795
+ context: {
796
+ type: string;
797
+ };
798
+ };
799
+ };
800
+ })[];
801
+ };
646
802
  };
647
803
  })[];
648
804
  };
@@ -1,7 +1,7 @@
1
- import { QAProps, TextSize, TitleItemProps } from "../../models/index.js";
1
+ import { AnalyticsEventsBase, QAProps, TextSize, TitleItemProps } from "../../models/index.js";
2
2
  import './TitleItem.css';
3
3
  export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24 | 13 | 22 | 26 | 38;
4
- export interface TitleItemFullProps extends TitleItemProps, QAProps {
4
+ export interface TitleItemFullProps extends TitleItemProps, QAProps, AnalyticsEventsBase {
5
5
  className?: string;
6
6
  onClick?: () => void;
7
7
  resetMargin?: boolean;
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { ToggleArrow, YFMWrapper } from "../index.js";
4
4
  import { LocationContext } from "../../context/locationContext/index.js";
5
5
  import { MobileContext } from "../../context/mobileContext/index.js";
6
+ import { useAnalytics } from "../../hooks/index.js";
6
7
  import { block, getHeaderTag, getLinkProps } from "../../utils/index.js";
7
8
  import Anchor from "../Anchor/Anchor.js";
8
9
  import './TitleItem.css';
@@ -24,21 +25,30 @@ export function getArrowSize(size, isMobile) {
24
25
  }
25
26
  const TitleItem = (props) => {
26
27
  const isMobile = React.useContext(MobileContext);
27
- const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, urlTitle, } = props;
28
+ const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, urlTitle, analyticsEvents, } = props;
29
+ const handleAnalytics = useAnalytics();
28
30
  const { hostname } = React.useContext(LocationContext);
29
31
  const textMarkup = (_jsxs(React.Fragment, { children: [_jsx(YFMWrapper, { className: b('text'), contentClassName: b('text'), content: text, modifiers: {
30
32
  constructor: true,
31
33
  } }), custom && (_jsxs(React.Fragment, { children: ["\u00A0", _jsx("span", { className: b('custom'), children: custom })] }))] }));
32
34
  let content;
33
35
  const insideClickableContent = (_jsxs("span", { className: b('wrapper'), children: [textMarkup, "\u00A0", _jsx(ToggleArrow, { className: b('arrow', { size: textSize }), size: getArrowSize(textSize, isMobile), type: 'horizontal', iconType: "navigation", open: false })] }));
36
+ const handleClick = React.useCallback(() => {
37
+ if (analyticsEvents) {
38
+ handleAnalytics(analyticsEvents);
39
+ }
40
+ if (onClick) {
41
+ onClick();
42
+ }
43
+ }, [analyticsEvents, handleAnalytics, onClick]);
34
44
  if (!url && !onClick) {
35
45
  content = textMarkup;
36
46
  }
37
47
  else if (url) {
38
- content = (_jsx("a", { className: b('link'), href: url, ...getLinkProps(url, hostname), onClick: onClick, title: urlTitle, children: insideClickableContent }));
48
+ content = (_jsx("a", { className: b('link'), href: url, ...getLinkProps(url, hostname), onClick: handleClick, title: urlTitle, children: insideClickableContent }));
39
49
  }
40
50
  else if (onClick) {
41
- content = (_jsx("button", { className: b('link'), onClick: onClick, title: urlTitle, children: insideClickableContent }));
51
+ content = (_jsx("button", { className: b('link'), onClick: handleClick, title: urlTitle, children: insideClickableContent }));
42
52
  }
43
53
  return (_jsxs(React.Fragment, { children: [anchor && _jsx(Anchor, { id: anchor, className: b('anchor') }), React.createElement(getHeaderTag(textSize), {
44
54
  className: b({ size: textSize, justify, 'reset-margin': resetMargin }, className),