@gravity-ui/blog-constructor 11.0.1 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/build/cjs/blocks/Author/schema.d.ts +14 -3
  2. package/build/cjs/blocks/Author/schema.js +1 -1
  3. package/build/cjs/blocks/Author/schema.js.map +1 -1
  4. package/build/cjs/blocks/Banner/Banner.js +5 -2
  5. package/build/cjs/blocks/Banner/Banner.js.map +1 -1
  6. package/build/cjs/blocks/Banner/schema.d.ts +89 -13
  7. package/build/cjs/blocks/CTA/schema.d.ts +89 -13
  8. package/build/cjs/blocks/CTA/schema.js +1 -1
  9. package/build/cjs/blocks/CTA/schema.js.map +1 -1
  10. package/build/cjs/blocks/ColoredText/ColoredText.js +4 -1
  11. package/build/cjs/blocks/ColoredText/ColoredText.js.map +1 -1
  12. package/build/cjs/blocks/ColoredText/schema.d.ts +124 -29
  13. package/build/cjs/blocks/ColoredText/schema.js +4 -4
  14. package/build/cjs/blocks/ColoredText/schema.js.map +1 -1
  15. package/build/cjs/blocks/CompactMedia/schema.d.ts +13 -6
  16. package/build/cjs/blocks/Feed/schema.d.ts +11 -2
  17. package/build/cjs/blocks/Form/schema.d.ts +69 -38
  18. package/build/cjs/blocks/Form/schema.js +5 -22
  19. package/build/cjs/blocks/Form/schema.js.map +1 -1
  20. package/build/cjs/blocks/Header/schema.d.ts +164 -73
  21. package/build/cjs/blocks/Header/schema.js +3 -1
  22. package/build/cjs/blocks/Header/schema.js.map +1 -1
  23. package/build/cjs/blocks/Layout/schema.d.ts +11 -2
  24. package/build/cjs/blocks/Media/schema.d.ts +13 -6
  25. package/build/cjs/blocks/Meta/schema.d.ts +11 -2
  26. package/build/cjs/blocks/SideCardList/schema.d.ts +69 -6
  27. package/build/cjs/blocks/SideCardList/schema.js +16 -19
  28. package/build/cjs/blocks/SideCardList/schema.js.map +1 -1
  29. package/build/cjs/blocks/Suggest/schema.d.ts +11 -2
  30. package/build/cjs/blocks/Take/schema.d.ts +25 -2
  31. package/build/cjs/blocks/Take/schema.js +2 -2
  32. package/build/cjs/blocks/Take/schema.js.map +1 -1
  33. package/build/cjs/blocks/YFM/schema.d.ts +11 -2
  34. package/build/cjs/constructor/blocksMap.d.ts +9 -9
  35. package/build/cjs/constructor/blocksMap.js +9 -9
  36. package/build/cjs/constructor/blocksMap.js.map +1 -1
  37. package/build/cjs/containers/BlogPostPage/BlogPostPage.css +9 -1
  38. package/build/cjs/hooks/useExtendedComponentMap.d.ts +9 -9
  39. package/build/cjs/models/blocks.d.ts +3 -3
  40. package/build/cjs/models/blocks.js.map +1 -1
  41. package/build/cjs/schema/blocks.d.ts +4 -2
  42. package/build/cjs/schema/blocks.js +4 -2
  43. package/build/cjs/schema/blocks.js.map +1 -1
  44. package/build/cjs/schema/common.d.ts +4 -0
  45. package/build/cjs/schema/common.js +8 -10
  46. package/build/cjs/schema/common.js.map +1 -1
  47. package/build/cjs/schema/index.d.ts +1044 -299
  48. package/build/cjs/schema/index.js +5 -3
  49. package/build/cjs/schema/index.js.map +1 -1
  50. package/build/cjs/utils/common.d.ts +1 -2
  51. package/build/esm/blocks/Author/schema.d.ts +14 -3
  52. package/build/esm/blocks/Author/schema.js +1 -1
  53. package/build/esm/blocks/Author/schema.js.map +1 -1
  54. package/build/esm/blocks/Banner/Banner.js +5 -2
  55. package/build/esm/blocks/Banner/Banner.js.map +1 -1
  56. package/build/esm/blocks/Banner/schema.d.ts +89 -13
  57. package/build/esm/blocks/CTA/schema.d.ts +89 -13
  58. package/build/esm/blocks/CTA/schema.js +1 -1
  59. package/build/esm/blocks/CTA/schema.js.map +1 -1
  60. package/build/esm/blocks/ColoredText/ColoredText.js +5 -2
  61. package/build/esm/blocks/ColoredText/ColoredText.js.map +1 -1
  62. package/build/esm/blocks/ColoredText/schema.d.ts +124 -29
  63. package/build/esm/blocks/ColoredText/schema.js +4 -4
  64. package/build/esm/blocks/ColoredText/schema.js.map +1 -1
  65. package/build/esm/blocks/CompactMedia/schema.d.ts +13 -6
  66. package/build/esm/blocks/Feed/schema.d.ts +11 -2
  67. package/build/esm/blocks/Form/schema.d.ts +69 -38
  68. package/build/esm/blocks/Form/schema.js +4 -21
  69. package/build/esm/blocks/Form/schema.js.map +1 -1
  70. package/build/esm/blocks/Header/schema.d.ts +164 -73
  71. package/build/esm/blocks/Header/schema.js +3 -1
  72. package/build/esm/blocks/Header/schema.js.map +1 -1
  73. package/build/esm/blocks/Layout/schema.d.ts +11 -2
  74. package/build/esm/blocks/Media/schema.d.ts +13 -6
  75. package/build/esm/blocks/Meta/schema.d.ts +11 -2
  76. package/build/esm/blocks/SideCardList/schema.d.ts +69 -6
  77. package/build/esm/blocks/SideCardList/schema.js +16 -19
  78. package/build/esm/blocks/SideCardList/schema.js.map +1 -1
  79. package/build/esm/blocks/Suggest/schema.d.ts +11 -2
  80. package/build/esm/blocks/Take/schema.d.ts +25 -2
  81. package/build/esm/blocks/Take/schema.js +3 -3
  82. package/build/esm/blocks/Take/schema.js.map +1 -1
  83. package/build/esm/blocks/YFM/schema.d.ts +11 -2
  84. package/build/esm/constructor/blocksMap.d.ts +9 -9
  85. package/build/esm/constructor/blocksMap.js +9 -9
  86. package/build/esm/constructor/blocksMap.js.map +1 -1
  87. package/build/esm/containers/BlogPostPage/BlogPostPage.css +9 -1
  88. package/build/esm/hooks/useExtendedComponentMap.d.ts +9 -9
  89. package/build/esm/models/blocks.d.ts +3 -3
  90. package/build/esm/models/blocks.js.map +1 -1
  91. package/build/esm/schema/blocks.d.ts +4 -2
  92. package/build/esm/schema/blocks.js +4 -2
  93. package/build/esm/schema/blocks.js.map +1 -1
  94. package/build/esm/schema/common.d.ts +4 -0
  95. package/build/esm/schema/common.js +7 -9
  96. package/build/esm/schema/common.js.map +1 -1
  97. package/build/esm/schema/index.d.ts +1044 -299
  98. package/build/esm/schema/index.js +5 -3
  99. package/build/esm/schema/index.js.map +1 -1
  100. package/build/esm/utils/common.d.ts +1 -2
  101. package/package.json +3 -3
  102. package/server/models/blocks.d.ts +3 -3
  103. package/styles/storybook/common.scss +6 -0
  104. package/styles/styles.css +9 -1
  105. package/styles/yfm.css +9 -1
@@ -11,32 +11,51 @@ export declare const ColoredText: {
11
11
  image: {
12
12
  oneOf: ({
13
13
  type: string;
14
- properties: {
15
- when: {
16
- type: string;
17
- };
18
- };
19
- } | {
20
- type: string;
21
- pattern: string;
14
+ additionalProperties: boolean;
15
+ required: import("@gravity-ui/page-constructor").Theme[];
16
+ properties: {};
22
17
  optionName: string;
23
- items?: undefined;
24
- } | {
25
- type: string;
26
- items: {
18
+ } | ({
19
+ oneOf: ({
27
20
  type: string;
28
21
  properties: {
29
22
  when: {
30
23
  type: string;
31
24
  };
32
25
  };
33
- };
26
+ } | {
27
+ optionName: string;
28
+ type: string;
29
+ pattern: string;
30
+ items?: undefined;
31
+ } | {
32
+ type: string;
33
+ items: {
34
+ type: string;
35
+ properties: {
36
+ when: {
37
+ type: string;
38
+ };
39
+ };
40
+ };
41
+ optionName: string;
42
+ })[];
43
+ } & {
34
44
  optionName: string;
35
- pattern?: undefined;
36
- })[];
45
+ }))[];
37
46
  };
38
47
  color: {
39
- type: string;
48
+ oneOf: ({
49
+ type: string;
50
+ additionalProperties: boolean;
51
+ required: import("@gravity-ui/page-constructor").Theme[];
52
+ properties: {};
53
+ optionName: string;
54
+ } | ({
55
+ type: string;
56
+ } & {
57
+ optionName: string;
58
+ }))[];
40
59
  };
41
60
  altText: {
42
61
  type: string;
@@ -72,6 +91,84 @@ export declare const ColoredText: {
72
91
  resetMargin: {
73
92
  type: string;
74
93
  };
94
+ analyticsEvents: {
95
+ anyOf: ({
96
+ type: string;
97
+ additionalProperties: {
98
+ type: string;
99
+ };
100
+ required: string[];
101
+ properties: {
102
+ name: {
103
+ type: string;
104
+ };
105
+ type: {
106
+ type: string;
107
+ };
108
+ counters: {
109
+ type: string;
110
+ additionalProperties: boolean;
111
+ required: never[];
112
+ properties: {
113
+ include: {
114
+ type: string;
115
+ items: {
116
+ type: string;
117
+ };
118
+ };
119
+ exclude: {
120
+ type: string;
121
+ items: {
122
+ type: string;
123
+ };
124
+ };
125
+ };
126
+ };
127
+ context: {
128
+ type: string;
129
+ };
130
+ };
131
+ } | {
132
+ type: string;
133
+ items: {
134
+ type: string;
135
+ additionalProperties: {
136
+ type: string;
137
+ };
138
+ required: string[];
139
+ properties: {
140
+ name: {
141
+ type: string;
142
+ };
143
+ type: {
144
+ type: string;
145
+ };
146
+ counters: {
147
+ type: string;
148
+ additionalProperties: boolean;
149
+ required: never[];
150
+ properties: {
151
+ include: {
152
+ type: string;
153
+ items: {
154
+ type: string;
155
+ };
156
+ };
157
+ exclude: {
158
+ type: string;
159
+ items: {
160
+ type: string;
161
+ };
162
+ };
163
+ };
164
+ };
165
+ context: {
166
+ type: string;
167
+ };
168
+ };
169
+ };
170
+ })[];
171
+ };
75
172
  };
76
173
  contentType?: undefined;
77
174
  })[];
@@ -126,17 +223,6 @@ export declare const ColoredText: {
126
223
  };
127
224
  };
128
225
  };
129
- labels: {
130
- type: string;
131
- items: {
132
- type: string;
133
- properties: {
134
- when: {
135
- type: string;
136
- };
137
- };
138
- };
139
- };
140
226
  controlPosition: {
141
227
  type: string;
142
228
  enum: string[];
@@ -177,8 +263,17 @@ export declare const ColoredText: {
177
263
  };
178
264
  };
179
265
  visible: {
180
- type: string;
181
- enum: string[];
266
+ oneOf: ({
267
+ type: string;
268
+ enum: string[];
269
+ additionalProperties?: undefined;
270
+ properties?: undefined;
271
+ } | {
272
+ type: string;
273
+ additionalProperties: boolean;
274
+ properties: {};
275
+ enum?: undefined;
276
+ })[];
182
277
  };
183
278
  resetPaddings: {
184
279
  type: string;
@@ -1,15 +1,15 @@
1
1
  import { validators } from '@gravity-ui/page-constructor';
2
2
  import { BlockType } from "../../models/common.js";
3
3
  import { BlogBlockBase } from "../../schema/common.js";
4
- const { subBlocks: { ContentBase }, components: { ImageProps }, common: { BlockBaseProps }, } = validators;
4
+ const { subBlocks: { ContentBase }, components: { ImageProps }, common: { BlockBaseProps, withTheme }, } = validators;
5
5
  const BackgroundProps = {
6
6
  type: 'object',
7
7
  additionalProperties: false,
8
8
  properties: {
9
- image: ImageProps,
10
- color: {
9
+ image: withTheme(ImageProps),
10
+ color: withTheme({
11
11
  type: 'string',
12
- },
12
+ }),
13
13
  altText: {
14
14
  type: 'string',
15
15
  contentType: 'text',
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/ColoredText/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,SAAS,EAAE,EAAC,WAAW,EAAC,EACxB,UAAU,EAAE,EAAC,UAAU,EAAC,EACxB,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,MAAM,eAAe,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;QACrB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,UAAU,8DACH,cAAc,GACd,aAAa,GACb,WAAW,KACd,UAAU,EAAE,eAAe,GAC9B;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n subBlocks: {ContentBase},\n components: {ImageProps},\n common: {BlockBaseProps},\n} = validators;\n\nconst BackgroundProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n image: ImageProps,\n color: {\n type: 'string',\n },\n altText: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const ColoredText = {\n [BlockType.ColoredText]: {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n ...ContentBase,\n background: BackgroundProps,\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/ColoredText/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,SAAS,EAAE,EAAC,WAAW,EAAC,EACxB,UAAU,EAAE,EAAC,UAAU,EAAC,EACxB,MAAM,EAAE,EAAC,cAAc,EAAE,SAAS,EAAC,GACtC,GAAG,UAAU,CAAC;AAEf,MAAM,eAAe,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACR,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC;QAC5B,KAAK,EAAE,SAAS,CAAC;YACb,IAAI,EAAE,QAAQ;SACjB,CAAC;QACF,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;QACrB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,UAAU,8DACH,cAAc,GACd,aAAa,GACb,WAAW,KACd,UAAU,EAAE,eAAe,GAC9B;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n subBlocks: {ContentBase},\n components: {ImageProps},\n common: {BlockBaseProps, withTheme},\n} = validators;\n\nconst BackgroundProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n image: withTheme(ImageProps),\n color: withTheme({\n type: 'string',\n }),\n altText: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const ColoredText = {\n [BlockType.ColoredText]: {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n ...ContentBase,\n background: BackgroundProps,\n },\n },\n};\n"]}
@@ -14,9 +14,9 @@ export declare const CompactMedia: {
14
14
  };
15
15
  };
16
16
  } | {
17
+ optionName: string;
17
18
  type: string;
18
19
  pattern: string;
19
- optionName: string;
20
20
  items?: undefined;
21
21
  } | {
22
22
  type: string;
@@ -29,7 +29,6 @@ export declare const CompactMedia: {
29
29
  };
30
30
  };
31
31
  optionName: string;
32
- pattern?: undefined;
33
32
  })[];
34
33
  type?: undefined;
35
34
  items?: undefined;
@@ -44,9 +43,9 @@ export declare const CompactMedia: {
44
43
  };
45
44
  };
46
45
  } | {
46
+ optionName: string;
47
47
  type: string;
48
48
  pattern: string;
49
- optionName: string;
50
49
  items?: undefined;
51
50
  } | {
52
51
  type: string;
@@ -59,7 +58,6 @@ export declare const CompactMedia: {
59
58
  };
60
59
  };
61
60
  optionName: string;
62
- pattern?: undefined;
63
61
  })[];
64
62
  };
65
63
  optionName: string;
@@ -105,8 +103,17 @@ export declare const CompactMedia: {
105
103
  };
106
104
  };
107
105
  visible: {
108
- type: string;
109
- enum: string[];
106
+ oneOf: ({
107
+ type: string;
108
+ enum: string[];
109
+ additionalProperties?: undefined;
110
+ properties?: undefined;
111
+ } | {
112
+ type: string;
113
+ additionalProperties: boolean;
114
+ properties: {};
115
+ enum?: undefined;
116
+ })[];
110
117
  };
111
118
  resetPaddings: {
112
119
  type: string;
@@ -27,8 +27,17 @@ export declare const Feed: {
27
27
  };
28
28
  };
29
29
  visible: {
30
- type: string;
31
- enum: string[];
30
+ oneOf: ({
31
+ type: string;
32
+ enum: string[];
33
+ additionalProperties?: undefined;
34
+ properties?: undefined;
35
+ } | {
36
+ type: string;
37
+ additionalProperties: boolean;
38
+ properties: {};
39
+ enum?: undefined;
40
+ })[];
32
41
  };
33
42
  resetPaddings: {
34
43
  type: string;
@@ -1,59 +1,81 @@
1
- export declare const Media: {
2
- "blog-media-block": {
1
+ export declare const Form: {
2
+ "blog-form-block": {
3
3
  type: string;
4
4
  additionalProperties: boolean;
5
5
  properties: {
6
6
  formData: {
7
7
  oneOf: ({
8
8
  type: string;
9
- optionName: string;
9
+ additionalProperties: boolean;
10
10
  properties: {
11
11
  yandex: {
12
- type: string;
13
- required: string[];
14
- properties: {
15
- id: {
16
- type: string;
17
- };
18
- containerId: {
19
- type: string;
20
- };
21
- type: {};
22
- when: {
23
- type: string;
12
+ oneOf: (({
13
+ type: string;
14
+ required: string[];
15
+ properties: {
16
+ id: {
17
+ type: string;
18
+ };
19
+ containerId: {
20
+ type: string;
21
+ };
22
+ type: {};
23
+ when: {
24
+ type: string;
25
+ };
24
26
  };
25
- };
27
+ } & {
28
+ optionName: string;
29
+ }) | {
30
+ type: string;
31
+ additionalProperties: boolean;
32
+ required: import("@gravity-ui/page-constructor").Theme[];
33
+ properties: {};
34
+ optionName: string;
35
+ })[];
26
36
  };
27
37
  hubspot?: undefined;
28
38
  };
39
+ optionName: string;
29
40
  } | {
30
41
  type: string;
31
- optionName: string;
42
+ additionalProperties: boolean;
32
43
  properties: {
33
44
  hubspot: {
34
- type: string;
35
- required: string[];
36
- properties: {
37
- region: {
38
- type: string;
39
- };
40
- portalId: {
41
- type: string;
42
- };
43
- formId: {
44
- type: string;
45
- };
46
- formInstanceId: {
47
- type: string;
48
- };
49
- type: {};
50
- when: {
51
- type: string;
45
+ oneOf: (({
46
+ type: string;
47
+ required: string[];
48
+ properties: {
49
+ region: {
50
+ type: string;
51
+ };
52
+ portalId: {
53
+ type: string;
54
+ };
55
+ formId: {
56
+ type: string;
57
+ };
58
+ formInstanceId: {
59
+ type: string;
60
+ };
61
+ type: {};
62
+ when: {
63
+ type: string;
64
+ };
52
65
  };
53
- };
66
+ } & {
67
+ optionName: string;
68
+ }) | {
69
+ type: string;
70
+ additionalProperties: boolean;
71
+ required: import("@gravity-ui/page-constructor").Theme[];
72
+ properties: {};
73
+ optionName: string;
74
+ })[];
54
75
  };
55
76
  yandex?: undefined;
56
77
  };
78
+ optionName: string;
57
79
  })[];
58
80
  };
59
81
  border: {
@@ -96,8 +118,17 @@ export declare const Media: {
96
118
  };
97
119
  };
98
120
  visible: {
99
- type: string;
100
- enum: string[];
121
+ oneOf: ({
122
+ type: string;
123
+ enum: string[];
124
+ additionalProperties?: undefined;
125
+ properties?: undefined;
126
+ } | {
127
+ type: string;
128
+ additionalProperties: boolean;
129
+ properties: {};
130
+ enum?: undefined;
131
+ })[];
101
132
  };
102
133
  resetPaddings: {
103
134
  type: string;
@@ -1,29 +1,12 @@
1
1
  import { validators } from '@gravity-ui/page-constructor';
2
2
  import { BlockType } from "../../models/common.js";
3
3
  import { BlogBlockBase } from "../../schema/common.js";
4
- const { common: { BlockBaseProps }, components: { YandexFormProps }, subBlocks: { HubspotFormProps }, } = validators;
5
- export const Media = {
6
- [BlockType.Media]: {
4
+ const { common: { BlockBaseProps }, blocks: { FormBlock }, } = validators;
5
+ export const Form = {
6
+ [BlockType.Form]: {
7
7
  type: 'object',
8
8
  additionalProperties: false,
9
- properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { formData: {
10
- oneOf: [
11
- {
12
- type: 'object',
13
- optionName: 'yandex',
14
- properties: {
15
- yandex: YandexFormProps,
16
- },
17
- },
18
- {
19
- type: 'object',
20
- optionName: 'hubspot',
21
- properties: {
22
- hubspot: HubspotFormProps,
23
- },
24
- },
25
- ],
26
- }, border: {
9
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { formData: FormBlock['form-block'].properties.formData, border: {
27
10
  type: 'string',
28
11
  enum: ['shadow', 'line', 'none'],
29
12
  } }),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Form/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,EACxB,UAAU,EAAE,EAAC,eAAe,EAAC,EAC7B,SAAS,EAAE,EAAC,gBAAgB,EAAC,GAChC,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACf,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,QAAQ,EAAE;gBACN,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,QAAQ;wBACpB,UAAU,EAAE;4BACR,MAAM,EAAE,eAAe;yBAC1B;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,SAAS;wBACrB,UAAU,EAAE;4BACR,OAAO,EAAE,gBAAgB;yBAC5B;qBACJ;iBACJ;aACJ,EACD,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;aACnC,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n components: {YandexFormProps},\n subBlocks: {HubspotFormProps},\n} = validators;\n\nexport const Media = {\n [BlockType.Media]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n formData: {\n oneOf: [\n {\n type: 'object',\n optionName: 'yandex',\n properties: {\n yandex: YandexFormProps,\n },\n },\n {\n type: 'object',\n optionName: 'hubspot',\n properties: {\n hubspot: HubspotFormProps,\n },\n },\n ],\n },\n border: {\n type: 'string',\n enum: ['shadow', 'line', 'none'],\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Form/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,EACxB,MAAM,EAAE,EAAC,SAAS,EAAC,GACtB,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,QAAQ,EACrD,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;aACnC,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n blocks: {FormBlock},\n} = validators;\n\nexport const Form = {\n [BlockType.Form]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n formData: FormBlock['form-block'].properties.formData,\n border: {\n type: 'string',\n enum: ['shadow', 'line', 'none'],\n },\n },\n },\n};\n"]}