@gravity-ui/page-constructor 8.19.0 → 8.20.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 (166) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +3 -0
  2. package/build/cjs/blocks/CardLayout/schema.d.ts +529 -195
  3. package/build/cjs/blocks/CardLayout/schema.js +12 -13
  4. package/build/cjs/blocks/CardLayout/schema.js.map +1 -1
  5. package/build/cjs/blocks/Companies/schema.d.ts +88 -3
  6. package/build/cjs/blocks/Companies/schema.js +5 -20
  7. package/build/cjs/blocks/Companies/schema.js.map +1 -1
  8. package/build/cjs/blocks/ContentLayout/schema.d.ts +258 -194
  9. package/build/cjs/blocks/ContentLayout/schema.js +1 -1
  10. package/build/cjs/blocks/ContentLayout/schema.js.map +1 -1
  11. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +311 -39
  12. package/build/cjs/blocks/ExtendedFeatures/schema.js +18 -19
  13. package/build/cjs/blocks/ExtendedFeatures/schema.js.map +1 -1
  14. package/build/cjs/blocks/Footer/schema.d.ts +3 -6
  15. package/build/cjs/blocks/Form/schema.d.ts +197 -15
  16. package/build/cjs/blocks/Form/schema.js +15 -3
  17. package/build/cjs/blocks/Form/schema.js.map +1 -1
  18. package/build/cjs/blocks/Header/schema.d.ts +461 -206
  19. package/build/cjs/blocks/Header/schema.js +18 -2
  20. package/build/cjs/blocks/Header/schema.js.map +1 -1
  21. package/build/cjs/blocks/HeaderSlider/schema.d.ts +150 -71
  22. package/build/cjs/blocks/Hero/schema.d.ts +19 -437
  23. package/build/cjs/blocks/Hero/schema.js +12 -3
  24. package/build/cjs/blocks/Hero/schema.js.map +1 -1
  25. package/build/cjs/blocks/Icons/Icons.js.map +1 -1
  26. package/build/cjs/blocks/Icons/schema.js +1 -1
  27. package/build/cjs/blocks/Icons/schema.js.map +1 -1
  28. package/build/cjs/blocks/Info/schema.d.ts +49 -1
  29. package/build/cjs/blocks/Info/schema.js +2 -2
  30. package/build/cjs/blocks/Info/schema.js.map +1 -1
  31. package/build/cjs/blocks/Map/schema.d.ts +7 -2
  32. package/build/cjs/blocks/Map/schema.js +1 -1
  33. package/build/cjs/blocks/Map/schema.js.map +1 -1
  34. package/build/cjs/blocks/Media/schema.d.ts +20 -9
  35. package/build/cjs/blocks/Media/schema.js +15 -2
  36. package/build/cjs/blocks/Media/schema.js.map +1 -1
  37. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +2 -4
  38. package/build/cjs/blocks/Table/schema.d.ts +1 -0
  39. package/build/cjs/blocks/Table/schema.js +1 -0
  40. package/build/cjs/blocks/Table/schema.js.map +1 -1
  41. package/build/cjs/blocks/Tabs/schema.d.ts +7 -6
  42. package/build/cjs/blocks/Tabs/schema.js +1 -1
  43. package/build/cjs/blocks/Tabs/schema.js.map +1 -1
  44. package/build/cjs/components/Author/schema.d.ts +1 -2
  45. package/build/cjs/components/Image/schema.d.ts +33 -8
  46. package/build/cjs/components/Image/schema.js +22 -22
  47. package/build/cjs/components/Image/schema.js.map +1 -1
  48. package/build/cjs/models/constructor-items/blocks.d.ts +6 -5
  49. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  50. package/build/cjs/models/constructor-items/common.d.ts +1 -1
  51. package/build/cjs/models/constructor-items/common.js.map +1 -1
  52. package/build/cjs/navigation/schema.d.ts +1 -2
  53. package/build/cjs/navigation/schema.js +1 -0
  54. package/build/cjs/navigation/schema.js.map +1 -1
  55. package/build/cjs/schema/constants.d.ts +940 -29
  56. package/build/cjs/schema/constants.js +36 -40
  57. package/build/cjs/schema/constants.js.map +1 -1
  58. package/build/cjs/schema/validators/common.d.ts +11 -8
  59. package/build/cjs/schema/validators/common.js +10 -6
  60. package/build/cjs/schema/validators/common.js.map +1 -1
  61. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +82 -2
  62. package/build/cjs/sub-blocks/BasicCard/schema.js +15 -1
  63. package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
  64. package/build/cjs/sub-blocks/Content/schema.d.ts +2 -5
  65. package/build/cjs/sub-blocks/Content/schema.js +1 -8
  66. package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
  67. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +33 -17
  68. package/build/cjs/sub-blocks/ImageCard/schema.js +8 -1
  69. package/build/cjs/sub-blocks/ImageCard/schema.js.map +1 -1
  70. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +1023 -312
  71. package/build/cjs/sub-blocks/LayoutItem/schema.js +40 -9
  72. package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
  73. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +2 -4
  74. package/build/cjs/sub-blocks/PriceCard/schema.d.ts +5 -0
  75. package/build/cjs/sub-blocks/PriceDetailed/schema.js +1 -0
  76. package/build/cjs/sub-blocks/PriceDetailed/schema.js.map +1 -1
  77. package/build/cjs/sub-blocks/Quote/schema.d.ts +164 -6
  78. package/build/cjs/sub-blocks/Quote/schema.js +2 -0
  79. package/build/cjs/sub-blocks/Quote/schema.js.map +1 -1
  80. package/build/docs/blocks/Hero.md +15 -15
  81. package/build/docs/blocks/Icons.md +2 -2
  82. package/build/docs/blocks/Media.md +1 -1
  83. package/build/esm/blocks/Banner/schema.d.ts +3 -0
  84. package/build/esm/blocks/CardLayout/schema.d.ts +529 -195
  85. package/build/esm/blocks/CardLayout/schema.js +14 -15
  86. package/build/esm/blocks/CardLayout/schema.js.map +1 -1
  87. package/build/esm/blocks/Companies/schema.d.ts +88 -3
  88. package/build/esm/blocks/Companies/schema.js +5 -21
  89. package/build/esm/blocks/Companies/schema.js.map +1 -1
  90. package/build/esm/blocks/ContentLayout/schema.d.ts +258 -194
  91. package/build/esm/blocks/ContentLayout/schema.js +2 -2
  92. package/build/esm/blocks/ContentLayout/schema.js.map +1 -1
  93. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +311 -39
  94. package/build/esm/blocks/ExtendedFeatures/schema.js +17 -18
  95. package/build/esm/blocks/ExtendedFeatures/schema.js.map +1 -1
  96. package/build/esm/blocks/Footer/schema.d.ts +3 -6
  97. package/build/esm/blocks/Form/schema.d.ts +197 -15
  98. package/build/esm/blocks/Form/schema.js +17 -5
  99. package/build/esm/blocks/Form/schema.js.map +1 -1
  100. package/build/esm/blocks/Header/schema.d.ts +446 -191
  101. package/build/esm/blocks/Header/schema.js +19 -3
  102. package/build/esm/blocks/Header/schema.js.map +1 -1
  103. package/build/esm/blocks/HeaderSlider/schema.d.ts +150 -71
  104. package/build/esm/blocks/Hero/schema.d.ts +19 -437
  105. package/build/esm/blocks/Hero/schema.js +12 -3
  106. package/build/esm/blocks/Hero/schema.js.map +1 -1
  107. package/build/esm/blocks/Icons/Icons.js.map +1 -1
  108. package/build/esm/blocks/Icons/schema.js +1 -1
  109. package/build/esm/blocks/Icons/schema.js.map +1 -1
  110. package/build/esm/blocks/Info/schema.d.ts +49 -1
  111. package/build/esm/blocks/Info/schema.js +3 -3
  112. package/build/esm/blocks/Info/schema.js.map +1 -1
  113. package/build/esm/blocks/Map/schema.d.ts +7 -2
  114. package/build/esm/blocks/Map/schema.js +1 -1
  115. package/build/esm/blocks/Map/schema.js.map +1 -1
  116. package/build/esm/blocks/Media/schema.d.ts +20 -9
  117. package/build/esm/blocks/Media/schema.js +16 -3
  118. package/build/esm/blocks/Media/schema.js.map +1 -1
  119. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +2 -4
  120. package/build/esm/blocks/Table/schema.d.ts +1 -0
  121. package/build/esm/blocks/Table/schema.js +1 -0
  122. package/build/esm/blocks/Table/schema.js.map +1 -1
  123. package/build/esm/blocks/Tabs/schema.d.ts +7 -6
  124. package/build/esm/blocks/Tabs/schema.js +2 -2
  125. package/build/esm/blocks/Tabs/schema.js.map +1 -1
  126. package/build/esm/components/Author/schema.d.ts +1 -2
  127. package/build/esm/components/Image/schema.d.ts +33 -8
  128. package/build/esm/components/Image/schema.js +22 -22
  129. package/build/esm/components/Image/schema.js.map +1 -1
  130. package/build/esm/models/constructor-items/blocks.d.ts +6 -5
  131. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  132. package/build/esm/models/constructor-items/common.d.ts +1 -1
  133. package/build/esm/models/constructor-items/common.js.map +1 -1
  134. package/build/esm/navigation/schema.d.ts +1 -2
  135. package/build/esm/navigation/schema.js +2 -1
  136. package/build/esm/navigation/schema.js.map +1 -1
  137. package/build/esm/schema/constants.d.ts +940 -29
  138. package/build/esm/schema/constants.js +37 -41
  139. package/build/esm/schema/constants.js.map +1 -1
  140. package/build/esm/schema/validators/common.d.ts +11 -8
  141. package/build/esm/schema/validators/common.js +8 -4
  142. package/build/esm/schema/validators/common.js.map +1 -1
  143. package/build/esm/sub-blocks/BasicCard/schema.d.ts +82 -2
  144. package/build/esm/sub-blocks/BasicCard/schema.js +16 -2
  145. package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
  146. package/build/esm/sub-blocks/Content/schema.d.ts +2 -5
  147. package/build/esm/sub-blocks/Content/schema.js +1 -8
  148. package/build/esm/sub-blocks/Content/schema.js.map +1 -1
  149. package/build/esm/sub-blocks/ImageCard/schema.d.ts +33 -17
  150. package/build/esm/sub-blocks/ImageCard/schema.js +9 -2
  151. package/build/esm/sub-blocks/ImageCard/schema.js.map +1 -1
  152. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +1023 -312
  153. package/build/esm/sub-blocks/LayoutItem/schema.js +37 -6
  154. package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
  155. package/build/esm/sub-blocks/MediaCard/schema.d.ts +2 -4
  156. package/build/esm/sub-blocks/PriceCard/schema.d.ts +5 -0
  157. package/build/esm/sub-blocks/PriceDetailed/schema.js +2 -1
  158. package/build/esm/sub-blocks/PriceDetailed/schema.js.map +1 -1
  159. package/build/esm/sub-blocks/Quote/schema.d.ts +164 -6
  160. package/build/esm/sub-blocks/Quote/schema.js +3 -1
  161. package/build/esm/sub-blocks/Quote/schema.js.map +1 -1
  162. package/package.json +1 -1
  163. package/schema/index.js +1 -1
  164. package/server/models/constructor-items/blocks.d.ts +6 -5
  165. package/server/models/constructor-items/common.d.ts +1 -1
  166. package/widget/index.js +1 -1
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BackgroundImageProps = exports.ImageProps = exports.ImageObjectProps = exports.ImageBaseObjectProps = exports.ImageDeviceProps = exports.imageUrlPattern = void 0;
4
+ const models_1 = require("../../models/index.js");
4
5
  const utils_1 = require("../../schema/validators/utils.js");
5
6
  exports.imageUrlPattern = '^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$';
7
+ const Url = {
8
+ type: 'string',
9
+ pattern: exports.imageUrlPattern,
10
+ };
6
11
  const ImageBase = {
7
12
  alt: {
8
13
  type: 'string',
@@ -27,15 +32,15 @@ const ImageBase = {
27
32
  {
28
33
  type: 'object',
29
34
  properties: {
30
- mobile: { type: 'boolean' },
31
- tablet: { type: 'boolean' },
32
- desktop: { type: 'boolean' },
35
+ [models_1.Device.Mobile]: { type: 'boolean' },
36
+ [models_1.Device.Tablet]: { type: 'boolean' },
37
+ [models_1.Device.Desktop]: { type: 'boolean' },
33
38
  },
34
39
  },
35
40
  ],
36
41
  },
37
42
  };
38
- const StyleBase = {
43
+ const Style = {
39
44
  type: 'object',
40
45
  additionalProperties: false,
41
46
  required: [],
@@ -49,18 +54,13 @@ const StyleBase = {
49
54
  exports.ImageDeviceProps = {
50
55
  type: 'object',
51
56
  additionalProperties: false,
52
- required: ['desktop', 'mobile'],
57
+ required: [models_1.Device.Desktop],
58
+ anyOf: [{ required: [models_1.Device.Tablet] }, { required: [models_1.Device.Mobile] }],
53
59
  properties: {
54
60
  ...ImageBase,
55
- desktop: { type: 'string', pattern: exports.imageUrlPattern },
56
- tablet: {
57
- type: 'string',
58
- pattern: exports.imageUrlPattern,
59
- },
60
- mobile: {
61
- type: 'string',
62
- pattern: exports.imageUrlPattern,
63
- },
61
+ [models_1.Device.Desktop]: Url,
62
+ [models_1.Device.Tablet]: Url,
63
+ [models_1.Device.Mobile]: Url,
64
64
  },
65
65
  };
66
66
  exports.ImageBaseObjectProps = {
@@ -68,11 +68,8 @@ exports.ImageBaseObjectProps = {
68
68
  additionalProperties: false,
69
69
  properties: {
70
70
  ...ImageBase,
71
- src: {
72
- type: 'string',
73
- pattern: exports.imageUrlPattern,
74
- },
75
- style: StyleBase,
71
+ src: Url,
72
+ style: Style,
76
73
  },
77
74
  };
78
75
  exports.ImageObjectProps = {
@@ -82,8 +79,7 @@ exports.ImageObjectProps = {
82
79
  exports.ImageProps = {
83
80
  oneOf: [
84
81
  {
85
- type: 'string',
86
- pattern: exports.imageUrlPattern,
82
+ ...Url,
87
83
  optionName: 'url',
88
84
  },
89
85
  (0, utils_1.filteredItem)({
@@ -111,13 +107,17 @@ exports.ImageProps = {
111
107
  ],
112
108
  };
113
109
  exports.BackgroundImageProps = {
114
- anyOf: [
110
+ oneOf: [
115
111
  {
116
112
  ...exports.ImageBaseObjectProps,
117
113
  optionName: 'options',
118
114
  },
119
115
  {
120
116
  ...exports.ImageDeviceProps,
117
+ properties: {
118
+ ...exports.ImageDeviceProps.properties,
119
+ style: Style,
120
+ },
121
121
  optionName: 'device options',
122
122
  },
123
123
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["components/Image/schema.ts"],"names":[],"mappings":";;;AAAA,4DAA2D;AAE9C,QAAA,eAAe,GACxB,kGAAkG,CAAC;AAEvG,MAAM,SAAS,GAAG;IACd,GAAG,EAAE;QACD,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,MAAM;KACtB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1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,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACR,GAAG,SAAS;QACZ,GAAG,EAAE;YACD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAe;SAC3B;QACD,KAAK,EAAE,SAAS;KACnB;CACJ,CAAC;AAEW,QAAA,gBAAgB,GAAG;IAC5B,GAAG,4BAAoB;IACvB,QAAQ,EAAE,CAAC,KAAK,CAAC;CACpB,CAAC;AAEW,QAAA,UAAU,GAAG;IACtB,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAe;YACxB,UAAU,EAAE,KAAK;SACpB;QACD,IAAA,oBAAY,EAAC;YACT,GAAG,wBAAgB;YACnB,UAAU,EAAE,SAAS;SACxB,CAAC;QACF,IAAA,oBAAY,EAAC;YACT,GAAG,wBAAgB;YACnB,UAAU,EAAE,gBAAgB;SAC/B,CAAC;QACF;YACI,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAA,oBAAY,EAAC;gBAChB,GAAG,wBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,cAAc;SAC7B;QACD;YACI,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAA,oBAAY,EAAC;gBAChB,GAAG,wBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,qBAAqB;SACpC;KACJ;CACJ,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAChC,KAAK,EAAE;QACH;YACI,GAAG,4BAAoB;YACvB,UAAU,EAAE,SAAS;SACxB;QACD;YACI,GAAG,wBAAgB;YACnB,UAAU,EAAE,gBAAgB;SAC/B;KACJ;CACJ,CAAC","sourcesContent":["import {filteredItem} from '../../schema/validators/utils';\n\nexport const imageUrlPattern =\n '^((http[s]?|ftp):\\\\/)?\\\\/?([^:\\\\/\\\\s]+)((\\\\/\\\\w+)*\\\\/)([\\\\w\\\\-\\\\.]+[^#?\\\\s]+)(.*)?(#[\\\\w\\\\-]+)?$';\n\nconst ImageBase = {\n alt: {\n type: 'string',\n contentType: 'text',\n },\n disableCompress: {\n type: 'boolean',\n },\n loading: {\n type: 'string',\n enum: ['eager', 'lazy'],\n },\n fetchPriority: {\n type: 'string',\n enum: ['high', 'low', 'auto'],\n },\n hide: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'object',\n properties: {\n mobile: {type: 'boolean'},\n tablet: {type: 'boolean'},\n desktop: {type: 'boolean'},\n },\n },\n ],\n },\n};\n\nconst StyleBase = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n backgroundColor: {type: 'string'},\n height: {type: ['string', 'number']},\n width: {type: ['string', 'number']},\n color: {type: 'string'},\n },\n};\n\nexport const ImageDeviceProps = {\n type: 'object',\n additionalProperties: false,\n required: ['desktop', 'mobile'],\n properties: {\n ...ImageBase,\n desktop: {type: 'string', pattern: imageUrlPattern},\n tablet: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n mobile: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n },\n};\n\nexport const ImageBaseObjectProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...ImageBase,\n src: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n style: StyleBase,\n },\n};\n\nexport const ImageObjectProps = {\n ...ImageBaseObjectProps,\n required: ['src'],\n};\n\nexport const ImageProps = {\n oneOf: [\n {\n type: 'string',\n pattern: imageUrlPattern,\n optionName: 'url',\n },\n filteredItem({\n ...ImageObjectProps,\n optionName: 'options',\n }),\n filteredItem({\n ...ImageDeviceProps,\n optionName: 'device options',\n }),\n {\n type: 'array',\n items: filteredItem({\n ...ImageObjectProps,\n }),\n optionName: 'options list',\n },\n {\n type: 'array',\n items: filteredItem({\n ...ImageDeviceProps,\n }),\n optionName: 'device options list',\n },\n ],\n};\n\nexport const BackgroundImageProps = {\n anyOf: [\n {\n ...ImageBaseObjectProps,\n optionName: 'options',\n },\n {\n ...ImageDeviceProps,\n optionName: 'device options',\n },\n ],\n};\n"]}
1
+ {"version":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EAAE,OAAO;YACb,KAAK,EAAE,IAAA,oBAAY,EAAC;gBAChB,GAAG,wBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,qBAAqB;SACpC;KACJ;CACJ,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAChC,KAAK,EAAE;QACH;YACI,GAAG,4BAAoB;YACvB,UAAU,EAAE,SAAS;SACxB;QACD;YACI,GAAG,wBAAgB;YACnB,UAAU,EAAE;gBACR,GAAG,wBAAgB,CAAC,UAAU;gBAC9B,KAAK,EAAE,KAAK;aACf;YACD,UAAU,EAAE,gBAAgB;SAC/B;KACJ;CACJ,CAAC","sourcesContent":["import {Device} from '../../models';\nimport {filteredItem} from '../../schema/validators/utils';\n\nexport const imageUrlPattern =\n '^((http[s]?|ftp):\\\\/)?\\\\/?([^:\\\\/\\\\s]+)((\\\\/\\\\w+)*\\\\/)([\\\\w\\\\-\\\\.]+[^#?\\\\s]+)(.*)?(#[\\\\w\\\\-]+)?$';\n\nconst Url = {\n type: 'string',\n pattern: imageUrlPattern,\n};\n\nconst ImageBase = {\n alt: {\n type: 'string',\n contentType: 'text',\n },\n disableCompress: {\n type: 'boolean',\n },\n loading: {\n type: 'string',\n enum: ['eager', 'lazy'],\n },\n fetchPriority: {\n type: 'string',\n enum: ['high', 'low', 'auto'],\n },\n hide: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'object',\n properties: {\n [Device.Mobile]: {type: 'boolean'},\n [Device.Tablet]: {type: 'boolean'},\n [Device.Desktop]: {type: 'boolean'},\n },\n },\n ],\n },\n};\n\nconst Style = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n backgroundColor: {type: 'string'},\n height: {type: ['string', 'number']},\n width: {type: ['string', 'number']},\n color: {type: 'string'},\n },\n};\n\nexport const ImageDeviceProps = {\n type: 'object',\n additionalProperties: false,\n required: [Device.Desktop],\n anyOf: [{required: [Device.Tablet]}, {required: [Device.Mobile]}],\n properties: {\n ...ImageBase,\n [Device.Desktop]: Url,\n [Device.Tablet]: Url,\n [Device.Mobile]: Url,\n },\n};\n\nexport const ImageBaseObjectProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...ImageBase,\n src: Url,\n style: Style,\n },\n};\n\nexport const ImageObjectProps = {\n ...ImageBaseObjectProps,\n required: ['src'],\n};\n\nexport const ImageProps = {\n oneOf: [\n {\n ...Url,\n optionName: 'url',\n },\n filteredItem({\n ...ImageObjectProps,\n optionName: 'options',\n }),\n filteredItem({\n ...ImageDeviceProps,\n optionName: 'device options',\n }),\n {\n type: 'array',\n items: filteredItem({\n ...ImageObjectProps,\n }),\n optionName: 'options list',\n },\n {\n type: 'array',\n items: filteredItem({\n ...ImageDeviceProps,\n }),\n optionName: 'device options list',\n },\n ],\n};\n\nexport const BackgroundImageProps = {\n oneOf: [\n {\n ...ImageBaseObjectProps,\n optionName: 'options',\n },\n {\n ...ImageDeviceProps,\n properties: {\n ...ImageDeviceProps.properties,\n style: Style,\n },\n optionName: 'device options',\n },\n ],\n};\n"]}
@@ -155,14 +155,15 @@ export interface HeroBlockMedia extends Partial<MediaProps> {
155
155
  export interface HeroBlockProps extends Pick<ContentBlockProps, 'title' | 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'> {
156
156
  breadcrumbs?: HeaderBreadCrumbsProps;
157
157
  overtitle?: string | JSX.Element;
158
- buttons?: ThemeSupporting<Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'extraProps'> | React.ReactNode>[];
158
+ /** Buttons are always rendered at size `xl` — a per-button `size` has no effect. */
159
+ buttons?: ThemeSupporting<Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'extraProps' | 'target' | 'analyticsEvents'> | React.ReactNode>[];
159
160
  media?: ThemeSupporting<HeroBlockMedia>;
160
161
  fullWidth?: boolean;
161
162
  verticalOffset?: 's' | 'm' | 'l' | 'xl';
162
163
  background?: ThemeSupporting<HeroBlockBackground>;
163
164
  }
164
- export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
165
- title: string;
165
+ export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'title' | 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
166
+ title?: string;
166
167
  label?: string;
167
168
  icon?: ThemedImage;
168
169
  /** @deprecated **/
@@ -316,8 +317,8 @@ export interface FilterBlockProps extends Animatable {
316
317
  centered?: boolean;
317
318
  }
318
319
  export interface IconsBlockItemProps extends AnalyticsEventsBase {
319
- url: string;
320
- text: string;
320
+ url?: string;
321
+ text?: string;
321
322
  src: ThemeSupporting<string>;
322
323
  }
323
324
  export interface IconsBlockProps {
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":";;;AA+CA,IAAY,SAyBX;AAzBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,yCAA4B,CAAA;AAChC,CAAC,EAzBW,SAAS,yBAAT,SAAS,QAyBpB;AAEY,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtC,QAAA,gBAAgB,GAAG;IAC5B,SAAS,CAAC,WAAW;IACrB,SAAS,CAAC,iBAAiB;IAC3B,SAAS,CAAC,SAAS;CACtB,CAAC;AAgCF,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAwWD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAOD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase, AnalyticsEventsProp} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaComponentImageProps,\n MediaComponentVideoProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n HeroBlock = 'hero-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n FooterBlock = 'footer-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [\n BlockType.HeaderBlock,\n BlockType.HeaderSliderBlock,\n BlockType.HeroBlock,\n];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize | Partial<Record<GridColumnSize, boolean>>;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface HeroBlockBackground\n extends Partial<MediaComponentImageProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n}\n\nexport interface HeroBlockMedia extends Partial<MediaProps> {\n roundCorners?: boolean;\n}\n\nexport interface HeroBlockProps\n extends Pick<\n ContentBlockProps,\n 'title' | 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'\n > {\n breadcrumbs?: HeaderBreadCrumbsProps;\n // TODO: add overtitle to ContentProps\n overtitle?: string | JSX.Element;\n buttons?: ThemeSupporting<\n Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'extraProps'> | React.ReactNode\n >[];\n media?: ThemeSupporting<HeroBlockMedia>;\n fullWidth?: boolean;\n verticalOffset?: 's' | 'm' | 'l' | 'xl';\n background?: ThemeSupporting<HeroBlockBackground>;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n onClick?: (index: number, newOpenState: boolean) => void;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n centered?: boolean;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n analyticsEvent?: AnalyticsEventsProp;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string | FilterTag;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: ContentBlockProps;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: (ButtonProps | React.ReactNode)[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n additionalContentNode?: React.ReactNode;\n}\n\nexport interface FooterLinkColumn {\n title: string;\n links: LinkProps[];\n}\n\nexport interface FooterLogoProps {\n image: ThemeSupporting<ImageProps>;\n url?: string;\n alt?: string;\n}\n\nexport interface FooterSection {\n columns: FooterLinkColumn[];\n}\n\nexport interface FooterContactItem {\n icon: ThemeSupporting<ImageProps>;\n url: string;\n urlTitle?: string;\n}\n\nexport interface FooterContacts {\n title?: string;\n iconsSize?: 'm' | 'l';\n links?: FooterContactItem[];\n linksPosition?: 'left' | 'center';\n titlePosition?: 'top' | 'near';\n}\n\nexport interface FooterDisclaimerFloor {\n text: string;\n align: 'left' | 'center';\n}\n\nexport interface FooterCopyright {\n links?: Required<Pick<LinkProps, 'text' | 'url'>>[];\n linksOverflowStrategy?: 'dropdown' | 'line-wrap';\n languageSwitcher?: {\n items: {\n text: string;\n href: string;\n }[];\n buttonText?: string;\n image?: ThemeSupporting<ImageProps>;\n };\n logo?: FooterLogoProps;\n copyrightText?: string;\n}\n\nexport interface FooterAttributionFloor {\n text: string;\n}\n\nexport interface FooterSecondFloor {\n copyright?: string;\n links?: LinkProps[];\n contacts?: FooterContactItem[];\n}\n\nexport interface FooterBlockProps {\n /** Floor 1: first row — logo (if present) + these columns */\n navigation?: {\n logo?: FooterLogoProps & {\n placement?: 'left' | 'top';\n };\n colSizes?: GridColumnSizesType;\n columnsPerRow?: number;\n columns: FooterLinkColumn[];\n };\n /** Floor 2: social row (title + social icons) */\n contacts?: FooterContacts;\n /** Floor 3: legal disclaimer (YFM) */\n disclaimer?: FooterDisclaimerFloor;\n /** Floor 4: privacy/terms links, language, copyright */\n copyright?: FooterCopyright;\n /** Floor 5: attribution (\"Created with ...\") */\n attribution?: boolean;\n backgroundColor?: ThemeSupporting<string>;\n indentTop?: IndentValue;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type HeroBlockModel = {\n type: BlockType.HeroBlock;\n} & HeroBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type FooterBlockModel = {\n type: BlockType.FooterBlock;\n} & FooterBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | HeroBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel\n | FooterBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":";;;AA+CA,IAAY,SAyBX;AAzBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,yCAA4B,CAAA;AAChC,CAAC,EAzBW,SAAS,yBAAT,SAAS,QAyBpB;AAEY,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtC,QAAA,gBAAgB,GAAG;IAC5B,SAAS,CAAC,WAAW;IACrB,SAAS,CAAC,iBAAiB;IAC3B,SAAS,CAAC,SAAS;CACtB,CAAC;AAgCF,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAgXD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAOD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase, AnalyticsEventsProp} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaComponentImageProps,\n MediaComponentVideoProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n HeroBlock = 'hero-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n FooterBlock = 'footer-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [\n BlockType.HeaderBlock,\n BlockType.HeaderSliderBlock,\n BlockType.HeroBlock,\n];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize | Partial<Record<GridColumnSize, boolean>>;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface HeroBlockBackground\n extends Partial<MediaComponentImageProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n}\n\nexport interface HeroBlockMedia extends Partial<MediaProps> {\n roundCorners?: boolean;\n}\n\nexport interface HeroBlockProps\n extends Pick<\n ContentBlockProps,\n 'title' | 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'\n > {\n breadcrumbs?: HeaderBreadCrumbsProps;\n // TODO: add overtitle to ContentProps\n overtitle?: string | JSX.Element;\n /** Buttons are always rendered at size `xl` — a per-button `size` has no effect. */\n buttons?: ThemeSupporting<\n | Pick<\n ButtonProps,\n 'url' | 'text' | 'theme' | 'primary' | 'extraProps' | 'target' | 'analyticsEvents'\n >\n | React.ReactNode\n >[];\n media?: ThemeSupporting<HeroBlockMedia>;\n fullWidth?: boolean;\n verticalOffset?: 's' | 'm' | 'l' | 'xl';\n background?: ThemeSupporting<HeroBlockBackground>;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'title' | 'theme' | 'centered' | 'colSizes' | 'size' | 'title'\n > {\n title?: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n onClick?: (index: number, newOpenState: boolean) => void;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n centered?: boolean;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n analyticsEvent?: AnalyticsEventsProp;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string | FilterTag;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url?: string;\n text?: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: ContentBlockProps;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: (ButtonProps | React.ReactNode)[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n additionalContentNode?: React.ReactNode;\n}\n\nexport interface FooterLinkColumn {\n title: string;\n links: LinkProps[];\n}\n\nexport interface FooterLogoProps {\n image: ThemeSupporting<ImageProps>;\n url?: string;\n alt?: string;\n}\n\nexport interface FooterSection {\n columns: FooterLinkColumn[];\n}\n\nexport interface FooterContactItem {\n icon: ThemeSupporting<ImageProps>;\n url: string;\n urlTitle?: string;\n}\n\nexport interface FooterContacts {\n title?: string;\n iconsSize?: 'm' | 'l';\n links?: FooterContactItem[];\n linksPosition?: 'left' | 'center';\n titlePosition?: 'top' | 'near';\n}\n\nexport interface FooterDisclaimerFloor {\n text: string;\n align: 'left' | 'center';\n}\n\nexport interface FooterCopyright {\n links?: Required<Pick<LinkProps, 'text' | 'url'>>[];\n linksOverflowStrategy?: 'dropdown' | 'line-wrap';\n languageSwitcher?: {\n items: {\n text: string;\n href: string;\n }[];\n buttonText?: string;\n image?: ThemeSupporting<ImageProps>;\n };\n logo?: FooterLogoProps;\n copyrightText?: string;\n}\n\nexport interface FooterAttributionFloor {\n text: string;\n}\n\nexport interface FooterSecondFloor {\n copyright?: string;\n links?: LinkProps[];\n contacts?: FooterContactItem[];\n}\n\nexport interface FooterBlockProps {\n /** Floor 1: first row — logo (if present) + these columns */\n navigation?: {\n logo?: FooterLogoProps & {\n placement?: 'left' | 'top';\n };\n colSizes?: GridColumnSizesType;\n columnsPerRow?: number;\n columns: FooterLinkColumn[];\n };\n /** Floor 2: social row (title + social icons) */\n contacts?: FooterContacts;\n /** Floor 3: legal disclaimer (YFM) */\n disclaimer?: FooterDisclaimerFloor;\n /** Floor 4: privacy/terms links, language, copyright */\n copyright?: FooterCopyright;\n /** Floor 5: attribution (\"Created with ...\") */\n attribution?: boolean;\n backgroundColor?: ThemeSupporting<string>;\n indentTop?: IndentValue;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type HeroBlockModel = {\n type: BlockType.HeroBlock;\n} & HeroBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type FooterBlockModel = {\n type: BlockType.FooterBlock;\n} & FooterBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | HeroBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel\n | FooterBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
@@ -121,7 +121,7 @@ export interface ImageObjectProps extends ImageInfoProps {
121
121
  }
122
122
  export interface ImageDeviceProps extends ImageInfoProps {
123
123
  [Device.Desktop]: string;
124
- [Device.Mobile]: string;
124
+ [Device.Mobile]?: string;
125
125
  [Device.Tablet]?: string;
126
126
  }
127
127
  export interface ImageDevicesVisibleProps {
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":";;;AAQA,QAAQ;AACR,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACjB,CAAC,EAHW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AAS,QAGpB;AAuED,SAAS;AAET,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;AACrB,CAAC,EAJW,MAAM,sBAAN,MAAM,QAIjB","sourcesContent":["import * as React from 'react';\n\nimport * as icons from '@gravity-ui/icons';\nimport {ButtonView, IconData, ButtonProps as UikitButtonProps} from '@gravity-ui/uikit';\n\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps} from '../common';\n\n// enums\nexport enum AuthorType {\n Column = 'column',\n Line = 'line',\n}\n\nexport enum PriceDetailsType {\n MARKED_LIST = 'marked-list',\n SETTINGS = 'settings',\n}\n\nexport enum PriceLabelColor {\n BLUE = 'blue',\n GREEN = 'green',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n RED = 'red',\n}\n\nexport enum PlayButtonType {\n Default = 'default',\n Text = 'text',\n}\n\nexport enum PlayButtonThemes {\n Blue = 'blue',\n Grey = 'grey',\n Custom = 'custom',\n}\n\nexport enum CustomControlsType {\n WithMuteButton = 'with-mute-button',\n WithPlayPauseButton = 'with-play-pause-button',\n}\n\nexport enum CustomControlsButtonPositioning {\n Left = 'left',\n Right = 'right',\n Center = 'center',\n}\n\nexport enum MediaVideoType {\n Default = 'default',\n Player = 'player',\n}\n\nexport enum MediaVideoControlsType {\n Default = 'default',\n Custom = 'custom',\n}\n\nexport enum QuoteType {\n Chevron = 'chevron', // « »\n EnglishDouble = 'english-double', // “ ”\n}\n\n// types\nexport type TextTheme = 'light' | 'dark';\nexport type TextSize = 'xs' | 's' | 'sm' | 'm' | 'l';\nexport type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\nexport type HeaderWidth = 's' | 'm' | 'l';\nexport type HeaderImageSize = 's' | 'm';\nexport type HeaderOffset = 'default' | 'large';\nexport type Justify = 'start' | 'center' | 'end';\nexport type ColumnsCount = 1 | 2 | 3 | 4;\nexport type LegendTableMarkerType = 'disk' | 'tick';\nexport type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';\nexport type MediaDirection = 'media-content' | 'content-media';\nexport type PriceDescriptionColor = 'cornflower' | 'black';\nexport type ContentSize = 's' | 'm' | 'l' | 'xl';\nexport type ContentTextSize = 's' | 'm' | 'l';\nexport type ContentTheme = 'default' | 'dark' | 'light';\nexport type FileLinkType = 'vertical' | 'horizontal';\nexport type ImageCardMargins = 's' | 'm';\nexport type LayoutItemContentMargin = 'm' | 'l';\nexport type GravityIconProps = string | {name: keyof typeof icons; color: 'brand' | 'text-color'};\n\n// modifiers\nexport interface Themable {\n theme?: TextTheme;\n}\n\nexport interface Justifyable {\n justify?: Justify;\n}\n\nexport interface Stylable {\n className?: string;\n}\n\nexport interface Animatable {\n animated?: boolean;\n}\n\nexport interface Tabbable {\n tabIndex?: number;\n}\n\nexport interface Roleable {\n role?: React.AriaRole;\n}\n\nexport interface AriaProps {\n ariaProps?: React.AriaAttributes;\n}\n\n//common props\nexport interface Background {\n image?: string;\n color?: string;\n}\n\nexport interface AnchorProps {\n text: string;\n url: string;\n}\n\n/**\n * @deprecated Component VideoBlock will be deleted, which uses this logic\n */\ninterface LoopProps {\n start: number;\n end?: number;\n}\n\n// images\n\nexport enum Device {\n Desktop = 'desktop',\n Mobile = 'mobile',\n Tablet = 'tablet',\n}\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n >,\n ImageDevicesVisibleProps {\n alt?: string;\n fetchPriority?: 'high' | 'low' | 'auto';\n disableCompress?: boolean;\n}\n\nexport interface ImageObjectProps extends ImageInfoProps {\n src: string;\n}\n\nexport interface ImageDeviceProps extends ImageInfoProps {\n [Device.Desktop]: string;\n [Device.Mobile]: string;\n [Device.Tablet]?: string;\n}\n\nexport interface ImageDevicesVisibleProps {\n hide?: boolean | Partial<Record<Device, boolean>>;\n}\n\nexport type ImageProps = string | ImageObjectProps | ImageDeviceProps;\nexport type ThemedImage = ThemeSupporting<ImageProps>;\n\nexport interface BackgroundImageProps\n extends React.HTMLProps<HTMLDivElement>,\n Partial<ImageDeviceProps>,\n Partial<ImageObjectProps>,\n QAProps,\n ImageDevicesVisibleProps {\n style?: React.CSSProperties;\n imageClassName?: string;\n}\n\n//components props\nexport interface MediaVideoProps extends AnalyticsEventsBase {\n src: string[];\n type?: MediaVideoType;\n loop?: LoopProps | boolean;\n muted?: boolean;\n autoplay?: boolean;\n elapsedTime?: number;\n playButton?: PlayButtonProps;\n controls?: MediaVideoControlsType;\n customControlsOptions?: CustomControlsOptions;\n ariaLabel?: string;\n contain?: boolean;\n onVideoEnd?: () => void;\n ref?: React.Ref<HTMLVideoElement | null>;\n}\n\n// links\nexport interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {\n url: string;\n urlTitle?: string;\n text?: string;\n textSize?: TextSize;\n theme?: LinkTheme;\n colorTheme?: TextTheme;\n arrow?: boolean;\n target?: string;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport interface FileLinkProps extends ClassNameProps, Tabbable {\n href: string;\n text: React.ReactNode;\n type?: FileLinkType;\n textSize?: TextSize;\n theme?: ContentTheme;\n urlTitle?: string;\n onClick?: () => void;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\n// buttons\nexport type ButtonTheme =\n | ButtonView\n | 'github'\n | 'app-store'\n | 'google-play'\n | 'scale'\n | 'monochrome';\n\nexport interface ButtonProps extends AnalyticsEventsBase {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n size?: UikitButtonProps['size'];\n width?: UikitButtonProps['width'];\n extraProps?: UikitButtonProps['extraProps'];\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url?: string;\n position?: ButtonImagePosition;\n alt?: string;\n iconData?: IconData;\n iconSize?: number;\n className?: string;\n}\n\nexport interface CustomControlsOptions {\n type?: CustomControlsType;\n muteButtonShown?: boolean;\n positioning?: CustomControlsButtonPositioning;\n}\n\nexport interface PlayButtonColors {\n circleColor?: string;\n circleHoverColor?: string;\n triangleColor?: string;\n triangleHoverColor?: string;\n}\n\nexport interface PlayButtonProps extends ClassNameProps {\n type?: PlayButtonType;\n theme?: PlayButtonThemes;\n text?: string;\n}\n\nexport type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;\n\nexport interface MediaComponentVideoProps extends AnalyticsEventsBase {\n video: MediaVideoProps;\n height?: number;\n ratio?: number | 'auto';\n previewImg?: string;\n}\n\nexport interface MediaComponentVideoIframeProps {\n videoIframe: string;\n}\n\nexport interface MediaComponentYoutubeProps {\n youtube: string;\n previewImg?: string;\n fullscreen?: boolean;\n}\n\nexport interface MediaComponentImageProps {\n image: ImageProps | ImageProps[] | ImageDeviceProps;\n video?: MediaVideoProps;\n parallax?: boolean;\n height?: number;\n disableImageSliderForArrayInput?: boolean;\n}\n\nexport interface MediaComponentDataLensProps {\n dataLens: DataLensProps;\n}\n\nexport interface MediaComponentIframeProps {\n iframe: IframeProps;\n margins?: boolean;\n}\n\nexport interface MediaProps\n extends Animatable,\n Partial<MediaComponentDataLensProps>,\n Partial<MediaComponentYoutubeProps>,\n Partial<MediaComponentVideoIframeProps>,\n Partial<MediaComponentImageProps>,\n Partial<MediaComponentIframeProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n videoMicrodata?: {\n name?: string;\n description?: string;\n duration?: string;\n uploadDate?: string;\n contentUrl?: string;\n thumbnailUrl?: string;\n };\n}\n\nexport interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {\n fullWidthMedia?: boolean;\n className?: string;\n mediaClassName?: string;\n}\n\nexport type Coordinate = [number, number];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n forceAspectRatio?: boolean;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport type YMapMargin =\n | number\n | [vertical: number, horizontal: number]\n | [top: number, right: number, bottom: number, left: number];\n\nexport interface YMapCopyrightPosition {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n disableControls?: boolean;\n disableBalloons?: boolean;\n areaMargin?: YMapMargin;\n copyrightPosition?: YMapCopyrightPosition;\n id: string;\n}\n\nexport interface YMapMarker {\n address?: string;\n coordinate?: Coordinate;\n label?: YMapMarkerLabel;\n}\n\nexport interface YMapMarkerLabel {\n iconCaption?: string;\n iconContent?: string;\n iconColor?: string;\n iconImageHref?: string;\n iconImageSize?: [number, number];\n iconImageOffset?: [number, number];\n iconImageClipRect?: [[number, number], [number, number]];\n iconLayout?: 'default#image';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n iconShape?: Record<string, any>;\n preset?: string;\n}\n\nexport interface YMapMarkerPrivate extends YMapMarker {\n label?: YMapMarkerLabelPrivate;\n}\n\nexport interface YMapMarkerLabelPrivate extends YMapMarkerLabel {\n cursor?: string;\n interactivityModel?: string;\n}\n\nexport type MapProps = GMapProps | YMapProps;\n\nexport type ThemedMediaProps = ThemeSupporting<MediaProps>;\n\nexport interface DataLensObjectProps {\n id: string;\n theme: 'dark' | 'light';\n}\n\nexport interface IframeProps {\n src: string;\n width?: number;\n height?: number;\n title?: string;\n name?: string;\n}\n\nexport type DataLensProps = string | DataLensObjectProps;\n\nexport interface AuthorItem {\n firstName: string;\n secondName: string;\n description?: string;\n avatar?: ThemeSupporting<ImageProps> | JSX.Element;\n}\n\nexport interface HeaderBreadCrumbsProps extends ClassNameProps, QAProps {\n items: {\n url: string;\n text: React.ReactNode;\n }[];\n theme?: TextTheme;\n analyticsEvents?: AnalyticsEventsProp;\n}\n\nexport interface TitleItemProps extends Justifyable, TitleItemBaseProps, AnalyticsEventsBase {\n navTitle?: string;\n anchor?: string;\n}\n\nexport interface TitleItemBaseProps {\n text: string;\n textSize?: TextSize;\n url?: string;\n urlTitle?: string;\n custom?: string | React.ReactNode;\n onClick?: () => void;\n}\n\nexport type MediaView = 'fit' | 'full';\n\n// card\nexport type MediaBorder = 'shadow' | 'line' | 'none';\nexport type CardBorder = MediaBorder;\nexport type ControlPosition = 'content' | 'footer';\n\nexport interface CardBaseProps {\n border?: CardBorder;\n}\n\nexport type CardLayoutProps = {\n controlPosition?: ControlPosition;\n};\n\n//price\nexport interface PriceDescriptionProps {\n title: string;\n detailedTitle?: string;\n description: string;\n label?: {\n color: PriceLabelColor;\n text?: string;\n size?: TextSize;\n };\n}\n\nexport interface PriceDetailsSettingsProps {\n title: string;\n description: string;\n}\n\nexport interface PriceDetailsListProps {\n text: string;\n}\n\nexport interface PriceDetailsProps {\n items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];\n}\n\nexport interface PriceItemProps\n extends PriceDetailsProps,\n PriceDescriptionProps,\n AnalyticsEventsBase {}\n\nexport interface PriceFoldableDetailsProps {\n title: string;\n size?: TextSize;\n titleColor?: PriceDescriptionColor;\n}\n\n/** @deprecated */\nexport interface PriceDetailedProps extends CardBaseProps {\n items: PriceItemProps[];\n description?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n titleColor?: PriceDescriptionColor;\n };\n details?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n };\n priceType?: PriceDetailsType;\n numberGroupItems?: 3 | 4 | 5;\n isCombined?: boolean;\n useMixedView?: boolean;\n foldable?: PriceFoldableDetailsProps;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n}\n\nexport interface AuthorProps extends QAProps {\n author: AuthorItem;\n className?: string;\n authorContainerClassName?: string;\n type?: AuthorType;\n theme?: ContentTheme;\n}\n\nexport interface TitleProps {\n title?: TitleItemProps | string;\n subtitle?: string;\n}\n\nexport interface YandexFormProps extends AnalyticsEventsBase {\n id: number | string;\n containerId?: string;\n theme?: string;\n className?: string;\n headerHeight?: number;\n customFormOrigin?: string;\n customFormSection?: string;\n params?: {[key: string]: string};\n\n onSubmit?: () => void;\n onLoad?: () => void;\n}\n\nexport interface WithBorder {\n border?: MediaBorder;\n /**\n * @deprecated use custom class for media-component\n */\n disableShadow?: boolean;\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":";;;AAQA,QAAQ;AACR,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;AACzB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;AACf,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACjB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,qCAAiB,CAAA;AACrB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,yDAAmC,CAAA;IACnC,oEAA8C,CAAA;AAClD,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACvC,gDAAa,CAAA;IACb,kDAAe,CAAA;IACf,oDAAiB,CAAA;AACrB,CAAC,EAJW,+BAA+B,+CAA/B,+BAA+B,QAI1C;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;AACrB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;AACpC,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAuED,SAAS;AAET,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;AACrB,CAAC,EAJW,MAAM,sBAAN,MAAM,QAIjB","sourcesContent":["import * as React from 'react';\n\nimport * as icons from '@gravity-ui/icons';\nimport {ButtonView, IconData, ButtonProps as UikitButtonProps} from '@gravity-ui/uikit';\n\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps} from '../common';\n\n// enums\nexport enum AuthorType {\n Column = 'column',\n Line = 'line',\n}\n\nexport enum PriceDetailsType {\n MARKED_LIST = 'marked-list',\n SETTINGS = 'settings',\n}\n\nexport enum PriceLabelColor {\n BLUE = 'blue',\n GREEN = 'green',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n RED = 'red',\n}\n\nexport enum PlayButtonType {\n Default = 'default',\n Text = 'text',\n}\n\nexport enum PlayButtonThemes {\n Blue = 'blue',\n Grey = 'grey',\n Custom = 'custom',\n}\n\nexport enum CustomControlsType {\n WithMuteButton = 'with-mute-button',\n WithPlayPauseButton = 'with-play-pause-button',\n}\n\nexport enum CustomControlsButtonPositioning {\n Left = 'left',\n Right = 'right',\n Center = 'center',\n}\n\nexport enum MediaVideoType {\n Default = 'default',\n Player = 'player',\n}\n\nexport enum MediaVideoControlsType {\n Default = 'default',\n Custom = 'custom',\n}\n\nexport enum QuoteType {\n Chevron = 'chevron', // « »\n EnglishDouble = 'english-double', // “ ”\n}\n\n// types\nexport type TextTheme = 'light' | 'dark';\nexport type TextSize = 'xs' | 's' | 'sm' | 'm' | 'l';\nexport type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\nexport type HeaderWidth = 's' | 'm' | 'l';\nexport type HeaderImageSize = 's' | 'm';\nexport type HeaderOffset = 'default' | 'large';\nexport type Justify = 'start' | 'center' | 'end';\nexport type ColumnsCount = 1 | 2 | 3 | 4;\nexport type LegendTableMarkerType = 'disk' | 'tick';\nexport type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';\nexport type MediaDirection = 'media-content' | 'content-media';\nexport type PriceDescriptionColor = 'cornflower' | 'black';\nexport type ContentSize = 's' | 'm' | 'l' | 'xl';\nexport type ContentTextSize = 's' | 'm' | 'l';\nexport type ContentTheme = 'default' | 'dark' | 'light';\nexport type FileLinkType = 'vertical' | 'horizontal';\nexport type ImageCardMargins = 's' | 'm';\nexport type LayoutItemContentMargin = 'm' | 'l';\nexport type GravityIconProps = string | {name: keyof typeof icons; color: 'brand' | 'text-color'};\n\n// modifiers\nexport interface Themable {\n theme?: TextTheme;\n}\n\nexport interface Justifyable {\n justify?: Justify;\n}\n\nexport interface Stylable {\n className?: string;\n}\n\nexport interface Animatable {\n animated?: boolean;\n}\n\nexport interface Tabbable {\n tabIndex?: number;\n}\n\nexport interface Roleable {\n role?: React.AriaRole;\n}\n\nexport interface AriaProps {\n ariaProps?: React.AriaAttributes;\n}\n\n//common props\nexport interface Background {\n image?: string;\n color?: string;\n}\n\nexport interface AnchorProps {\n text: string;\n url: string;\n}\n\n/**\n * @deprecated Component VideoBlock will be deleted, which uses this logic\n */\ninterface LoopProps {\n start: number;\n end?: number;\n}\n\n// images\n\nexport enum Device {\n Desktop = 'desktop',\n Mobile = 'mobile',\n Tablet = 'tablet',\n}\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n >,\n ImageDevicesVisibleProps {\n alt?: string;\n fetchPriority?: 'high' | 'low' | 'auto';\n disableCompress?: boolean;\n}\n\nexport interface ImageObjectProps extends ImageInfoProps {\n src: string;\n}\n\nexport interface ImageDeviceProps extends ImageInfoProps {\n [Device.Desktop]: string;\n [Device.Mobile]?: string;\n [Device.Tablet]?: string;\n}\n\nexport interface ImageDevicesVisibleProps {\n hide?: boolean | Partial<Record<Device, boolean>>;\n}\n\nexport type ImageProps = string | ImageObjectProps | ImageDeviceProps;\nexport type ThemedImage = ThemeSupporting<ImageProps>;\n\nexport interface BackgroundImageProps\n extends React.HTMLProps<HTMLDivElement>,\n Partial<ImageDeviceProps>,\n Partial<ImageObjectProps>,\n QAProps,\n ImageDevicesVisibleProps {\n style?: React.CSSProperties;\n imageClassName?: string;\n}\n\n//components props\nexport interface MediaVideoProps extends AnalyticsEventsBase {\n src: string[];\n type?: MediaVideoType;\n loop?: LoopProps | boolean;\n muted?: boolean;\n autoplay?: boolean;\n elapsedTime?: number;\n playButton?: PlayButtonProps;\n controls?: MediaVideoControlsType;\n customControlsOptions?: CustomControlsOptions;\n ariaLabel?: string;\n contain?: boolean;\n onVideoEnd?: () => void;\n ref?: React.Ref<HTMLVideoElement | null>;\n}\n\n// links\nexport interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {\n url: string;\n urlTitle?: string;\n text?: string;\n textSize?: TextSize;\n theme?: LinkTheme;\n colorTheme?: TextTheme;\n arrow?: boolean;\n target?: string;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport interface FileLinkProps extends ClassNameProps, Tabbable {\n href: string;\n text: React.ReactNode;\n type?: FileLinkType;\n textSize?: TextSize;\n theme?: ContentTheme;\n urlTitle?: string;\n onClick?: () => void;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\n// buttons\nexport type ButtonTheme =\n | ButtonView\n | 'github'\n | 'app-store'\n | 'google-play'\n | 'scale'\n | 'monochrome';\n\nexport interface ButtonProps extends AnalyticsEventsBase {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n size?: UikitButtonProps['size'];\n width?: UikitButtonProps['width'];\n extraProps?: UikitButtonProps['extraProps'];\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url?: string;\n position?: ButtonImagePosition;\n alt?: string;\n iconData?: IconData;\n iconSize?: number;\n className?: string;\n}\n\nexport interface CustomControlsOptions {\n type?: CustomControlsType;\n muteButtonShown?: boolean;\n positioning?: CustomControlsButtonPositioning;\n}\n\nexport interface PlayButtonColors {\n circleColor?: string;\n circleHoverColor?: string;\n triangleColor?: string;\n triangleHoverColor?: string;\n}\n\nexport interface PlayButtonProps extends ClassNameProps {\n type?: PlayButtonType;\n theme?: PlayButtonThemes;\n text?: string;\n}\n\nexport type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;\n\nexport interface MediaComponentVideoProps extends AnalyticsEventsBase {\n video: MediaVideoProps;\n height?: number;\n ratio?: number | 'auto';\n previewImg?: string;\n}\n\nexport interface MediaComponentVideoIframeProps {\n videoIframe: string;\n}\n\nexport interface MediaComponentYoutubeProps {\n youtube: string;\n previewImg?: string;\n fullscreen?: boolean;\n}\n\nexport interface MediaComponentImageProps {\n image: ImageProps | ImageProps[] | ImageDeviceProps;\n video?: MediaVideoProps;\n parallax?: boolean;\n height?: number;\n disableImageSliderForArrayInput?: boolean;\n}\n\nexport interface MediaComponentDataLensProps {\n dataLens: DataLensProps;\n}\n\nexport interface MediaComponentIframeProps {\n iframe: IframeProps;\n margins?: boolean;\n}\n\nexport interface MediaProps\n extends Animatable,\n Partial<MediaComponentDataLensProps>,\n Partial<MediaComponentYoutubeProps>,\n Partial<MediaComponentVideoIframeProps>,\n Partial<MediaComponentImageProps>,\n Partial<MediaComponentIframeProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n videoMicrodata?: {\n name?: string;\n description?: string;\n duration?: string;\n uploadDate?: string;\n contentUrl?: string;\n thumbnailUrl?: string;\n };\n}\n\nexport interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {\n fullWidthMedia?: boolean;\n className?: string;\n mediaClassName?: string;\n}\n\nexport type Coordinate = [number, number];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n forceAspectRatio?: boolean;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport type YMapMargin =\n | number\n | [vertical: number, horizontal: number]\n | [top: number, right: number, bottom: number, left: number];\n\nexport interface YMapCopyrightPosition {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n disableControls?: boolean;\n disableBalloons?: boolean;\n areaMargin?: YMapMargin;\n copyrightPosition?: YMapCopyrightPosition;\n id: string;\n}\n\nexport interface YMapMarker {\n address?: string;\n coordinate?: Coordinate;\n label?: YMapMarkerLabel;\n}\n\nexport interface YMapMarkerLabel {\n iconCaption?: string;\n iconContent?: string;\n iconColor?: string;\n iconImageHref?: string;\n iconImageSize?: [number, number];\n iconImageOffset?: [number, number];\n iconImageClipRect?: [[number, number], [number, number]];\n iconLayout?: 'default#image';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n iconShape?: Record<string, any>;\n preset?: string;\n}\n\nexport interface YMapMarkerPrivate extends YMapMarker {\n label?: YMapMarkerLabelPrivate;\n}\n\nexport interface YMapMarkerLabelPrivate extends YMapMarkerLabel {\n cursor?: string;\n interactivityModel?: string;\n}\n\nexport type MapProps = GMapProps | YMapProps;\n\nexport type ThemedMediaProps = ThemeSupporting<MediaProps>;\n\nexport interface DataLensObjectProps {\n id: string;\n theme: 'dark' | 'light';\n}\n\nexport interface IframeProps {\n src: string;\n width?: number;\n height?: number;\n title?: string;\n name?: string;\n}\n\nexport type DataLensProps = string | DataLensObjectProps;\n\nexport interface AuthorItem {\n firstName: string;\n secondName: string;\n description?: string;\n avatar?: ThemeSupporting<ImageProps> | JSX.Element;\n}\n\nexport interface HeaderBreadCrumbsProps extends ClassNameProps, QAProps {\n items: {\n url: string;\n text: React.ReactNode;\n }[];\n theme?: TextTheme;\n analyticsEvents?: AnalyticsEventsProp;\n}\n\nexport interface TitleItemProps extends Justifyable, TitleItemBaseProps, AnalyticsEventsBase {\n navTitle?: string;\n anchor?: string;\n}\n\nexport interface TitleItemBaseProps {\n text: string;\n textSize?: TextSize;\n url?: string;\n urlTitle?: string;\n custom?: string | React.ReactNode;\n onClick?: () => void;\n}\n\nexport type MediaView = 'fit' | 'full';\n\n// card\nexport type MediaBorder = 'shadow' | 'line' | 'none';\nexport type CardBorder = MediaBorder;\nexport type ControlPosition = 'content' | 'footer';\n\nexport interface CardBaseProps {\n border?: CardBorder;\n}\n\nexport type CardLayoutProps = {\n controlPosition?: ControlPosition;\n};\n\n//price\nexport interface PriceDescriptionProps {\n title: string;\n detailedTitle?: string;\n description: string;\n label?: {\n color: PriceLabelColor;\n text?: string;\n size?: TextSize;\n };\n}\n\nexport interface PriceDetailsSettingsProps {\n title: string;\n description: string;\n}\n\nexport interface PriceDetailsListProps {\n text: string;\n}\n\nexport interface PriceDetailsProps {\n items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];\n}\n\nexport interface PriceItemProps\n extends PriceDetailsProps,\n PriceDescriptionProps,\n AnalyticsEventsBase {}\n\nexport interface PriceFoldableDetailsProps {\n title: string;\n size?: TextSize;\n titleColor?: PriceDescriptionColor;\n}\n\n/** @deprecated */\nexport interface PriceDetailedProps extends CardBaseProps {\n items: PriceItemProps[];\n description?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n titleColor?: PriceDescriptionColor;\n };\n details?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n };\n priceType?: PriceDetailsType;\n numberGroupItems?: 3 | 4 | 5;\n isCombined?: boolean;\n useMixedView?: boolean;\n foldable?: PriceFoldableDetailsProps;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n}\n\nexport interface AuthorProps extends QAProps {\n author: AuthorItem;\n className?: string;\n authorContainerClassName?: string;\n type?: AuthorType;\n theme?: ContentTheme;\n}\n\nexport interface TitleProps {\n title?: TitleItemProps | string;\n subtitle?: string;\n}\n\nexport interface YandexFormProps extends AnalyticsEventsBase {\n id: number | string;\n containerId?: string;\n theme?: string;\n className?: string;\n headerHeight?: number;\n customFormOrigin?: string;\n customFormSection?: string;\n params?: {[key: string]: string};\n\n onSubmit?: () => void;\n onLoad?: () => void;\n}\n\nexport interface WithBorder {\n border?: MediaBorder;\n /**\n * @deprecated use custom class for media-component\n */\n disableShadow?: boolean;\n}\n"]}
@@ -12,9 +12,9 @@ export declare const LogoProps: {
12
12
  };
13
13
  };
14
14
  } | {
15
+ optionName: string;
15
16
  type: string;
16
17
  pattern: string;
17
- optionName: string;
18
18
  items?: undefined;
19
19
  } | {
20
20
  type: string;
@@ -27,7 +27,6 @@ export declare const LogoProps: {
27
27
  };
28
28
  };
29
29
  optionName: string;
30
- pattern?: undefined;
31
30
  })[];
32
31
  };
33
32
  text: {
@@ -54,6 +54,7 @@ const NavigationLinkItemProps = {
54
54
  },
55
55
  target: {
56
56
  type: 'string',
57
+ enum: common_1.linkTargets,
57
58
  },
58
59
  arrow: {
59
60
  type: 'boolean',
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../src","sources":["navigation/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,0DAAuE;AACvE,2DAAwD;AACxD,yDAAyD;AAEzD,MAAM,kBAAkB,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC;CACvC,CAAC;AAEW,QAAA,SAAS,GAAG;IACrB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,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AE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE;QACR,GAAG,uBAAuB;QAC1B,IAAI,EAAE,EAAC,GAAG,kBAAkB,EAAC;QAC7B,KAAK,EAAE,IAAA,qBAAa,EAAC,uBAAuB,CAAC;KAChD;CACJ,CAAC;AAEF,MAAM,mBAAmB,GAAG;IACxB,KAAK,EAAE;QACH,IAAA,qBAAa,EAAC,uBAAuB,CAAC;QACtC,IAAA,qBAAa,EAAC,yBAAyB,CAAC;QACxC,IAAA,qBAAa,EAAC,2BAA2B,CAAC;KAC7C;CACJ,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACjC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,WAAW,CAAC;IACvB,UAAU,EAAE;QACR,SAAS,EAAE,mBAAmB;QAC9B,UAAU,EAAE,mBAAmB;QAC/B,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps, imageUrlPattern} from '../components/Image/schema';\nimport {ButtonProps} from '../schema/validators/common';\nimport {filteredArray} from '../schema/validators/utils';\n\nconst NavigationItemType = {\n type: 'string',\n enum: ['link', 'button', 'dropdown'],\n};\n\nexport const LogoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['icon'],\n properties: {\n icon: ImageProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n },\n};\n\nconst NavigationItemBaseProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n icon: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n iconSize: {\n type: 'number',\n },\n};\n\nconst NavigationItemBaseLinkProps = omit(NavigationItemBaseProps, ['url']);\n\nconst NavigationLinkItemProps = {\n type: 'object',\n additionalProperties: false,\n required: ['type', 'text'],\n properties: {\n ...NavigationItemBaseLinkProps,\n type: {...NavigationItemType},\n url: {\n type: 'string',\n },\n target: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n },\n};\n\nconst NavigationButtonItemProps = {\n type: 'object',\n additionalProperties: false,\n required: ['type', 'text', 'url'],\n properties: {\n ...ButtonProps,\n type: {...NavigationItemType},\n },\n};\n\nconst NavigationDropdownItemProps = {\n type: 'object',\n additionalProperties: false,\n required: ['type', 'items'],\n properties: {\n ...NavigationItemBaseProps,\n type: {...NavigationItemType},\n items: filteredArray(NavigationLinkItemProps),\n },\n};\n\nconst NavigationItemProps = {\n oneOf: [\n filteredArray(NavigationLinkItemProps),\n filteredArray(NavigationButtonItemProps),\n filteredArray(NavigationDropdownItemProps),\n ],\n};\n\nexport const NavigationHeaderProps = {\n type: 'object',\n additionalProperties: false,\n required: ['leftItems'],\n properties: {\n leftItems: NavigationItemProps,\n rightItems: NavigationItemProps,\n iconSize: {\n type: 'number',\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../src","sources":["navigation/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,0DAAuE;AACvE,2DAAqE;AACrE,yDAAyD;AAEzD,MAAM,kBAAkB,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC;CACvC,CAAC;AAEW,QAAA,SAAS,GAAG;IACrB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,IAAI,EAAE,mBAAU;QAChB,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,GAAG,EAAE;YACD,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC;AAEF,MAAM,uBAAuB,GAAG;IAC5B,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,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,KAAK,EAAE;QACH,IAAA,qBAAa,EAAC,uBAAuB,CAAC;QACtC,IAAA,qBAAa,EAAC,yBAAyB,CAAC;QACxC,IAAA,qBAAa,EAAC,2BAA2B,CAAC;KAC7C;CACJ,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACjC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,WAAW,CAAC;IACvB,UAAU,EAAE;QACR,SAAS,EAAE,mBAAmB;QAC9B,UAAU,EAAE,mBAAmB;QAC/B,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps, imageUrlPattern} from '../components/Image/schema';\nimport {ButtonProps, linkTargets} from '../schema/validators/common';\nimport {filteredArray} from '../schema/validators/utils';\n\nconst NavigationItemType = {\n type: 'string',\n enum: ['link', 'button', 'dropdown'],\n};\n\nexport const LogoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['icon'],\n properties: {\n icon: ImageProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n },\n};\n\nconst NavigationItemBaseProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n icon: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n iconSize: {\n type: 'number',\n },\n};\n\nconst NavigationItemBaseLinkProps = omit(NavigationItemBaseProps, ['url']);\n\nconst NavigationLinkItemProps = {\n type: 'object',\n additionalProperties: false,\n required: ['type', 'text'],\n properties: {\n ...NavigationItemBaseLinkProps,\n type: {...NavigationItemType},\n url: {\n type: 'string',\n },\n target: {\n type: 'string',\n enum: linkTargets,\n },\n arrow: {\n type: 'boolean',\n },\n },\n};\n\nconst NavigationButtonItemProps = {\n type: 'object',\n additionalProperties: false,\n required: ['type', 'text', 'url'],\n properties: {\n ...ButtonProps,\n type: {...NavigationItemType},\n },\n};\n\nconst NavigationDropdownItemProps = {\n type: 'object',\n additionalProperties: false,\n required: ['type', 'items'],\n properties: {\n ...NavigationItemBaseProps,\n type: {...NavigationItemType},\n items: filteredArray(NavigationLinkItemProps),\n },\n};\n\nconst NavigationItemProps = {\n oneOf: [\n filteredArray(NavigationLinkItemProps),\n filteredArray(NavigationButtonItemProps),\n filteredArray(NavigationDropdownItemProps),\n ],\n};\n\nexport const NavigationHeaderProps = {\n type: 'object',\n additionalProperties: false,\n required: ['leftItems'],\n properties: {\n leftItems: NavigationItemProps,\n rightItems: NavigationItemProps,\n iconSize: {\n type: 'number',\n },\n },\n};\n"]}