@gravity-ui/page-constructor 3.8.3 → 3.9.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 (82) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/cjs/blocks/Banner/schema.d.ts +9 -3
  3. package/build/cjs/blocks/CardLayout/schema.d.ts +6 -2
  4. package/build/cjs/blocks/Companies/schema.d.ts +3 -1
  5. package/build/cjs/blocks/ContentLayout/schema.d.ts +3 -1
  6. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +6 -2
  7. package/build/cjs/blocks/FilterBlock/schema.d.ts +6 -2
  8. package/build/cjs/blocks/Header/schema.d.ts +3 -1
  9. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -1
  10. package/build/cjs/blocks/Icons/schema.d.ts +6 -2
  11. package/build/cjs/blocks/Info/schema.d.ts +3 -1
  12. package/build/cjs/blocks/Map/schema.d.ts +3 -1
  13. package/build/cjs/blocks/Media/schema.d.ts +6 -2
  14. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -1
  15. package/build/cjs/blocks/Questions/schema.d.ts +3 -1
  16. package/build/cjs/blocks/Share/schema.d.ts +3 -1
  17. package/build/cjs/blocks/Slider/schema.d.ts +3 -1
  18. package/build/cjs/blocks/Table/schema.d.ts +6 -2
  19. package/build/cjs/blocks/Tabs/schema.d.ts +6 -2
  20. package/build/cjs/components/Author/schema.d.ts +3 -1
  21. package/build/cjs/editor/containers/Editor/Editor.js +5 -5
  22. package/build/cjs/editor/types/index.d.ts +4 -1
  23. package/build/cjs/schema/constants.d.ts +18 -6
  24. package/build/cjs/schema/validators/common.d.ts +9 -3
  25. package/build/cjs/schema/validators/common.js +3 -1
  26. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -1
  27. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +3 -1
  28. package/build/cjs/sub-blocks/Divider/schema.d.ts +3 -1
  29. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -1
  30. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +3 -1
  31. package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +3 -1
  32. package/build/cjs/sub-blocks/Quote/schema.d.ts +3 -1
  33. package/build/cjs/text-transform/filter.d.ts +20 -0
  34. package/build/cjs/text-transform/filter.js +61 -0
  35. package/build/cjs/text-transform/index.d.ts +1 -0
  36. package/build/cjs/text-transform/index.js +1 -0
  37. package/build/cjs/text-transform/transformers.d.ts +2 -0
  38. package/build/cjs/text-transform/transformers.js +3 -2
  39. package/build/esm/blocks/Banner/schema.d.ts +9 -3
  40. package/build/esm/blocks/CardLayout/schema.d.ts +6 -2
  41. package/build/esm/blocks/Companies/schema.d.ts +3 -1
  42. package/build/esm/blocks/ContentLayout/schema.d.ts +3 -1
  43. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +6 -2
  44. package/build/esm/blocks/FilterBlock/schema.d.ts +6 -2
  45. package/build/esm/blocks/Header/schema.d.ts +3 -1
  46. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -1
  47. package/build/esm/blocks/Icons/schema.d.ts +6 -2
  48. package/build/esm/blocks/Info/schema.d.ts +3 -1
  49. package/build/esm/blocks/Map/schema.d.ts +3 -1
  50. package/build/esm/blocks/Media/schema.d.ts +6 -2
  51. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -1
  52. package/build/esm/blocks/Questions/schema.d.ts +3 -1
  53. package/build/esm/blocks/Share/schema.d.ts +3 -1
  54. package/build/esm/blocks/Slider/schema.d.ts +3 -1
  55. package/build/esm/blocks/Table/schema.d.ts +6 -2
  56. package/build/esm/blocks/Tabs/schema.d.ts +6 -2
  57. package/build/esm/components/Author/schema.d.ts +3 -1
  58. package/build/esm/editor/containers/Editor/Editor.js +5 -5
  59. package/build/esm/editor/types/index.d.ts +4 -1
  60. package/build/esm/schema/constants.d.ts +18 -6
  61. package/build/esm/schema/validators/common.d.ts +9 -3
  62. package/build/esm/schema/validators/common.js +3 -1
  63. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -1
  64. package/build/esm/sub-blocks/BasicCard/schema.d.ts +3 -1
  65. package/build/esm/sub-blocks/Divider/schema.d.ts +3 -1
  66. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -1
  67. package/build/esm/sub-blocks/MediaCard/schema.d.ts +3 -1
  68. package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +3 -1
  69. package/build/esm/sub-blocks/Quote/schema.d.ts +3 -1
  70. package/build/esm/text-transform/filter.d.ts +20 -0
  71. package/build/esm/text-transform/filter.js +56 -0
  72. package/build/esm/text-transform/index.d.ts +1 -0
  73. package/build/esm/text-transform/index.js +1 -0
  74. package/build/esm/text-transform/transformers.d.ts +2 -0
  75. package/build/esm/text-transform/transformers.js +3 -2
  76. package/package.json +1 -1
  77. package/server/text-transform/filter.d.ts +20 -0
  78. package/server/text-transform/filter.js +63 -0
  79. package/server/text-transform/index.d.ts +1 -0
  80. package/server/text-transform/index.js +1 -0
  81. package/server/text-transform/transformers.d.ts +2 -0
  82. package/server/text-transform/transformers.js +3 -2
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./utils"), exports);
5
5
  tslib_1.__exportStar(require("./config"), exports);
6
6
  tslib_1.__exportStar(require("./common"), exports);
7
7
  tslib_1.__exportStar(require("./transformers"), exports);
8
+ tslib_1.__exportStar(require("./filter"), exports);
@@ -1,5 +1,6 @@
1
1
  import { ConstructorBlock } from '../models/constructor';
2
2
  import { Lang } from '../utils/configure';
3
+ export type ContentVariables = Record<string, string>;
3
4
  export type ContentTransformerProps = {
4
5
  content: {
5
6
  blocks?: ConstructorBlock[];
@@ -7,6 +8,7 @@ export type ContentTransformerProps = {
7
8
  options: {
8
9
  lang: Lang;
9
10
  customConfig?: {};
11
+ vars?: ContentVariables;
10
12
  };
11
13
  };
12
14
  export declare const contentTransformer: ({ content, options }: ContentTransformerProps) => {
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
6
6
  /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
7
7
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
8
8
  const config_1 = require("./config");
9
+ const filter_1 = require("./filter");
9
10
  function transformBlocks(blocks, lang, customConfig = {}) {
10
11
  const fullConfig = Object.assign(Object.assign({}, config_1.config), customConfig);
11
12
  const clonedBlocks = lodash_1.default.cloneDeep(blocks);
@@ -46,8 +47,8 @@ function transformBlock(lang, blocksConfig, block) {
46
47
  return block;
47
48
  }
48
49
  const contentTransformer = ({ content, options }) => {
49
- const { lang, customConfig = {} } = options;
50
- const { blocks = [] } = content;
50
+ const { lang, customConfig = {}, vars } = options;
51
+ const { blocks = [] } = (vars ? (0, filter_1.filterContent)(content, vars) : content);
51
52
  const transformedBlocks = transformBlocks(blocks, lang, customConfig);
52
53
  return {
53
54
  blocks: transformedBlocks,
@@ -288,7 +288,9 @@ export declare const BannerCardProps: {
288
288
  type: string;
289
289
  };
290
290
  type: {};
291
- when: {};
291
+ when: {
292
+ type: string;
293
+ };
292
294
  };
293
295
  };
294
296
  export declare const BannerBlock: {
@@ -582,7 +584,9 @@ export declare const BannerBlock: {
582
584
  type: string;
583
585
  };
584
586
  type: {};
585
- when: {};
587
+ when: {
588
+ type: string;
589
+ };
586
590
  };
587
591
  };
588
592
  };
@@ -877,7 +881,9 @@ export declare const BannerCard: {
877
881
  type: string;
878
882
  };
879
883
  type: {};
880
- when: {};
884
+ when: {
885
+ type: string;
886
+ };
881
887
  };
882
888
  };
883
889
  };
@@ -73,7 +73,9 @@ export declare const CardLayoutProps: {
73
73
  type: string;
74
74
  };
75
75
  type: {};
76
- when: {};
76
+ when: {
77
+ type: string;
78
+ };
77
79
  };
78
80
  };
79
81
  export declare const CardLayoutBlock: {
@@ -152,7 +154,9 @@ export declare const CardLayoutBlock: {
152
154
  type: string;
153
155
  };
154
156
  type: {};
155
- when: {};
157
+ when: {
158
+ type: string;
159
+ };
156
160
  };
157
161
  };
158
162
  };
@@ -40,7 +40,9 @@ export declare const CompaniesBlock: {
40
40
  type: string;
41
41
  };
42
42
  type: {};
43
- when: {};
43
+ when: {
44
+ type: string;
45
+ };
44
46
  };
45
47
  };
46
48
  };
@@ -190,7 +190,9 @@ export declare const ContentLayoutBlock: {
190
190
  type: string;
191
191
  };
192
192
  type: {};
193
- when: {};
193
+ when: {
194
+ type: string;
195
+ };
194
196
  };
195
197
  };
196
198
  };
@@ -123,7 +123,9 @@ export declare const ExtendedFeaturesItem: {
123
123
  })[];
124
124
  };
125
125
  type: {};
126
- when: {};
126
+ when: {
127
+ type: string;
128
+ };
127
129
  };
128
130
  };
129
131
  icon: {
@@ -233,7 +235,9 @@ export declare const ExtendedFeaturesBlock: {
233
235
  type: string;
234
236
  };
235
237
  type: {};
236
- when: {};
238
+ when: {
239
+ type: string;
240
+ };
237
241
  };
238
242
  };
239
243
  };
@@ -126,7 +126,9 @@ export declare const FilterProps: {
126
126
  type: string;
127
127
  };
128
128
  type: {};
129
- when: {};
129
+ when: {
130
+ type: string;
131
+ };
130
132
  };
131
133
  };
132
134
  export declare const FilterBlock: {
@@ -231,7 +233,9 @@ export declare const FilterBlock: {
231
233
  type: string;
232
234
  };
233
235
  type: {};
234
- when: {};
236
+ when: {
237
+ type: string;
238
+ };
235
239
  };
236
240
  };
237
241
  };
@@ -1124,7 +1124,9 @@ export declare const HeaderBlock: {
1124
1124
  type: string;
1125
1125
  };
1126
1126
  type: {};
1127
- when: {};
1127
+ when: {
1128
+ type: string;
1129
+ };
1128
1130
  };
1129
1131
  };
1130
1132
  };
@@ -513,7 +513,9 @@ export declare const HeaderSliderBlock: {
513
513
  type: string;
514
514
  };
515
515
  type: {};
516
- when: {};
516
+ when: {
517
+ type: string;
518
+ };
517
519
  };
518
520
  };
519
521
  };
@@ -59,7 +59,9 @@ export declare const IconsProps: {
59
59
  type: string;
60
60
  };
61
61
  type: {};
62
- when: {};
62
+ when: {
63
+ type: string;
64
+ };
63
65
  };
64
66
  };
65
67
  export declare const IconsBlock: {
@@ -124,7 +126,9 @@ export declare const IconsBlock: {
124
126
  type: string;
125
127
  };
126
128
  type: {};
127
- when: {};
129
+ when: {
130
+ type: string;
131
+ };
128
132
  };
129
133
  };
130
134
  };
@@ -197,7 +197,9 @@ export declare const InfoBlock: {
197
197
  }>;
198
198
  };
199
199
  type: {};
200
- when: {};
200
+ when: {
201
+ type: string;
202
+ };
201
203
  };
202
204
  };
203
205
  };
@@ -454,7 +454,9 @@ export declare const MapBlock: {
454
454
  type: string;
455
455
  };
456
456
  type: {};
457
- when: {};
457
+ when: {
458
+ type: string;
459
+ };
458
460
  };
459
461
  };
460
462
  };
@@ -570,7 +570,9 @@ export declare const MediaBlockBaseProps: {
570
570
  type: string;
571
571
  };
572
572
  type: {};
573
- when: {};
573
+ when: {
574
+ type: string;
575
+ };
574
576
  };
575
577
  export declare const MediaBlock: {
576
578
  'media-block': {
@@ -1158,7 +1160,9 @@ export declare const MediaBlock: {
1158
1160
  type: string;
1159
1161
  };
1160
1162
  type: {};
1161
- when: {};
1163
+ when: {
1164
+ type: string;
1165
+ };
1162
1166
  };
1163
1167
  };
1164
1168
  };
@@ -321,7 +321,9 @@ export declare const PromoFeaturesBlock: {
321
321
  type: string;
322
322
  };
323
323
  type: {};
324
- when: {};
324
+ when: {
325
+ type: string;
326
+ };
325
327
  };
326
328
  };
327
329
  };
@@ -99,7 +99,9 @@ export declare const QuestionsBlock: {
99
99
  type: string;
100
100
  };
101
101
  type: {};
102
- when: {};
102
+ when: {
103
+ type: string;
104
+ };
103
105
  };
104
106
  };
105
107
  };
@@ -14,7 +14,9 @@ export declare const ShareBlock: {
14
14
  };
15
15
  };
16
16
  type: {};
17
- when: {};
17
+ when: {
18
+ type: string;
19
+ };
18
20
  };
19
21
  };
20
22
  };
@@ -210,7 +210,9 @@ export declare const SliderBlock: {
210
210
  type: string;
211
211
  };
212
212
  type: {};
213
- when: {};
213
+ when: {
214
+ type: string;
215
+ };
214
216
  };
215
217
  };
216
218
  };
@@ -43,7 +43,9 @@ export declare const TableBlock: {
43
43
  enum: string[];
44
44
  };
45
45
  type: {};
46
- when: {};
46
+ when: {
47
+ type: string;
48
+ };
47
49
  };
48
50
  };
49
51
  anchor: {
@@ -71,7 +73,9 @@ export declare const TableBlock: {
71
73
  type: string;
72
74
  };
73
75
  type: {};
74
- when: {};
76
+ when: {
77
+ type: string;
78
+ };
75
79
  };
76
80
  };
77
81
  };
@@ -353,7 +353,9 @@ export declare const tabsItem: {
353
353
  })[];
354
354
  };
355
355
  type: {};
356
- when: {};
356
+ when: {
357
+ type: string;
358
+ };
357
359
  };
358
360
  };
359
361
  image: {
@@ -535,7 +537,9 @@ export declare const TabsBlock: {
535
537
  type: string;
536
538
  };
537
539
  type: {};
538
- when: {};
540
+ when: {
541
+ type: string;
542
+ };
539
543
  };
540
544
  };
541
545
  };
@@ -27,7 +27,9 @@ export declare const author: {
27
27
  };
28
28
  };
29
29
  type: {};
30
- when: {};
30
+ when: {
31
+ type: string;
32
+ };
31
33
  };
32
34
  };
33
35
  };
@@ -12,8 +12,9 @@ import { Form } from '../Form/Form';
12
12
  export const Editor = (_a) => {
13
13
  var { children, customSchema, onChange } = _a, rest = __rest(_a, ["children", "customSchema", "onChange"]);
14
14
  const { content, activeBlockIndex, errorBoundaryState, viewMode, onContentUpdate, onViewModeUpdate, onAdd, onSelect, injectEditBlockProps, } = useEditorState(rest);
15
+ const formSpecs = useFormSpec(customSchema);
15
16
  const isEditingMode = viewMode === ViewModeItem.Edititng;
16
- const constructorProps = useMemo(() => {
17
+ const outgoingProps = useMemo(() => {
17
18
  const custom = isEditingMode
18
19
  ? addCustomDecorator([
19
20
  (props) => (React.createElement(EditBlock, Object.assign({}, injectEditBlockProps(props)))),
@@ -21,16 +22,15 @@ export const Editor = (_a) => {
21
22
  (props) => (React.createElement(ErrorBoundary, Object.assign({}, props, { key: `${getBlockId(props)}-${errorBoundaryState}` }))),
22
23
  ], rest.custom)
23
24
  : rest.custom;
24
- return { content, custom };
25
- }, [injectEditBlockProps, content, errorBoundaryState, isEditingMode, rest.custom]);
25
+ return { content, custom, viewMode };
26
+ }, [injectEditBlockProps, content, errorBoundaryState, isEditingMode, viewMode, rest.custom]);
26
27
  useEffect(() => {
27
28
  onChange === null || onChange === void 0 ? void 0 : onChange(content);
28
29
  }, [content, onChange]);
29
- const formSpecs = useFormSpec(customSchema);
30
30
  return (React.createElement(Layout, { mode: viewMode, onModeChange: onViewModeUpdate },
31
31
  isEditingMode && (React.createElement(Layout.Left, null,
32
32
  React.createElement(Form, { content: content, onChange: onContentUpdate, activeBlockIndex: activeBlockIndex, onSelect: onSelect, spec: formSpecs }))),
33
33
  React.createElement(Layout.Right, null,
34
- React.createElement(ErrorBoundary, { key: errorBoundaryState }, children(constructorProps)),
34
+ React.createElement(ErrorBoundary, { key: errorBoundaryState }, children(outgoingProps)),
35
35
  isEditingMode && React.createElement(AddBlock, { onAdd: onAdd }))));
36
36
  };
@@ -4,8 +4,11 @@ import { BlockDecorationProps, PageContent } from '../../models';
4
4
  import { SchemaCustomConfig } from '../../schema';
5
5
  import { EditBlockActions } from '../components/EditBlock/EditBlock';
6
6
  export type EditorBlockId = number | string;
7
+ export interface EditorOutgoingProps extends Partial<PageConstructorProps> {
8
+ viewMode: ViewModeItem;
9
+ }
7
10
  export interface EditorProps extends Required<Pick<PageConstructorProps, 'content'>>, Partial<Omit<PageConstructorProps, 'content'>> {
8
- children: (props: Partial<PageConstructorProps>) => React.ReactNode;
11
+ children: (props: EditorOutgoingProps) => React.ReactNode;
9
12
  onChange?: (data: PageContent) => void;
10
13
  customSchema?: SchemaCustomConfig;
11
14
  }
@@ -91,7 +91,9 @@ export declare const cardSchemas: {
91
91
  enum: string[];
92
92
  };
93
93
  type: {};
94
- when: {};
94
+ when: {
95
+ type: string;
96
+ };
95
97
  };
96
98
  };
97
99
  quote: {
@@ -166,7 +168,9 @@ export declare const cardSchemas: {
166
168
  };
167
169
  };
168
170
  type: {};
169
- when: {};
171
+ when: {
172
+ type: string;
173
+ };
170
174
  };
171
175
  };
172
176
  'background-card': {
@@ -280,7 +284,9 @@ export declare const cardSchemas: {
280
284
  enum: string[];
281
285
  };
282
286
  type: {};
283
- when: {};
287
+ when: {
288
+ type: string;
289
+ };
284
290
  };
285
291
  };
286
292
  'price-detailed': {
@@ -372,7 +378,9 @@ export declare const cardSchemas: {
372
378
  type: string;
373
379
  };
374
380
  type: {};
375
- when: {};
381
+ when: {
382
+ type: string;
383
+ };
376
384
  };
377
385
  };
378
386
  'banner-card': {
@@ -665,7 +673,9 @@ export declare const cardSchemas: {
665
673
  type: string;
666
674
  };
667
675
  type: {};
668
- when: {};
676
+ when: {
677
+ type: string;
678
+ };
669
679
  };
670
680
  };
671
681
  'media-card': {
@@ -899,7 +909,9 @@ export declare const cardSchemas: {
899
909
  enum: string[];
900
910
  };
901
911
  type: {};
902
- when: {};
912
+ when: {
913
+ type: string;
914
+ };
903
915
  };
904
916
  };
905
917
  };
@@ -21,7 +21,9 @@ export declare const sizeNumber: {
21
21
  export declare const contentThemes: string[];
22
22
  export declare const BaseProps: {
23
23
  type: {};
24
- when: {};
24
+ when: {
25
+ type: string;
26
+ };
25
27
  };
26
28
  export declare const containerSizesObject: {
27
29
  type: string;
@@ -412,7 +414,9 @@ export declare const LinkProps: {
412
414
  })[];
413
415
  };
414
416
  type: {};
415
- when: {};
417
+ when: {
418
+ type: string;
419
+ };
416
420
  };
417
421
  };
418
422
  export declare const FileLinkProps: {
@@ -750,7 +754,9 @@ export declare const BlockBaseProps: {
750
754
  type: string;
751
755
  };
752
756
  type: {};
753
- when: {};
757
+ when: {
758
+ type: string;
759
+ };
754
760
  };
755
761
  export declare const TitleProps: {
756
762
  type: string;
@@ -18,7 +18,9 @@ export const sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
18
18
  export const contentThemes = ['default', 'dark', 'light'];
19
19
  export const BaseProps = {
20
20
  type: {},
21
- when: {},
21
+ when: {
22
+ type: 'string',
23
+ },
22
24
  };
23
25
  export const containerSizesObject = {
24
26
  type: 'object',
@@ -110,7 +110,9 @@ export declare const BackgroundCard: {
110
110
  enum: string[];
111
111
  };
112
112
  type: {};
113
- when: {};
113
+ when: {
114
+ type: string;
115
+ };
114
116
  };
115
117
  };
116
118
  };
@@ -89,7 +89,9 @@ export declare const BasicCard: {
89
89
  enum: string[];
90
90
  };
91
91
  type: {};
92
- when: {};
92
+ when: {
93
+ type: string;
94
+ };
93
95
  };
94
96
  };
95
97
  };
@@ -9,7 +9,9 @@ export declare const Divider: {
9
9
  enum: (string | number)[];
10
10
  };
11
11
  type: {};
12
- when: {};
12
+ when: {
13
+ type: string;
14
+ };
13
15
  };
14
16
  };
15
17
  };
@@ -308,6 +308,8 @@ export declare const LayoutItem: {
308
308
  type: string;
309
309
  };
310
310
  type: {};
311
- when: {};
311
+ when: {
312
+ type: string;
313
+ };
312
314
  };
313
315
  };
@@ -230,7 +230,9 @@ export declare const MediaCardBlock: {
230
230
  enum: string[];
231
231
  };
232
232
  type: {};
233
- when: {};
233
+ when: {
234
+ type: string;
235
+ };
234
236
  };
235
237
  };
236
238
  };
@@ -88,7 +88,9 @@ export declare const PriceDetailedBlock: {
88
88
  type: string;
89
89
  };
90
90
  type: {};
91
- when: {};
91
+ when: {
92
+ type: string;
93
+ };
92
94
  };
93
95
  };
94
96
  };
@@ -71,7 +71,9 @@ export declare const Quote: {
71
71
  };
72
72
  };
73
73
  type: {};
74
- when: {};
74
+ when: {
75
+ type: string;
76
+ };
75
77
  };
76
78
  };
77
79
  };
@@ -0,0 +1,20 @@
1
+ import { ContentVariables } from './transformers';
2
+ type WhenValue = string | boolean | undefined;
3
+ type OrArray<T> = T | T[];
4
+ type OrArrayRecord<T> = Record<string, OrArray<T>>;
5
+ interface FilteredContentItem extends OrArrayRecord<FilteredContentItem> {
6
+ }
7
+ type FilteredContent = OrArray<FilteredContentItem>;
8
+ type FilterableContentItem = FilteredContentItem & {
9
+ when: WhenValue;
10
+ };
11
+ export type FilterableContent = OrArray<FilterableContentItem>;
12
+ /**
13
+ * Filters content recoursively by result of it's 'when' property evaluation applied to vars argument.
14
+ * e.g. property {..., when: 'someVar == "someValue"' } will be included in result only if vars.someVar === 'someValue'
15
+ * @param {FilterableContent} content
16
+ * @param {ContentVariables} vars
17
+ * @return {FilteredContent}
18
+ */
19
+ export declare function filterContent(content: FilterableContent | FilteredContent, vars: ContentVariables): FilteredContent;
20
+ export {};