@gravity-ui/page-constructor 5.14.4-alpha.2 → 5.14.4-alpha.3

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 (126) hide show
  1. package/build/cjs/blocks/Banner/index.js +1 -0
  2. package/build/cjs/blocks/CardLayout/index.js +21 -3
  3. package/build/cjs/blocks/Companies/index.js +1 -0
  4. package/build/cjs/blocks/ContentLayout/index.d.ts +31 -1
  5. package/build/cjs/blocks/ContentLayout/index.js +64 -1
  6. package/build/cjs/blocks/ExtendedFeatures/index.d.ts +48 -2
  7. package/build/cjs/blocks/ExtendedFeatures/index.js +60 -2
  8. package/build/cjs/blocks/FilterBlock/index.d.ts +18 -0
  9. package/build/cjs/blocks/FilterBlock/index.js +81 -1
  10. package/build/cjs/blocks/Form/index.d.ts +1 -0
  11. package/build/cjs/blocks/Form/index.js +1 -0
  12. package/build/cjs/blocks/Header/index.d.ts +11 -0
  13. package/build/cjs/blocks/Header/index.js +18 -0
  14. package/build/cjs/blocks/HeaderSlider/index.d.ts +1 -0
  15. package/build/cjs/blocks/HeaderSlider/index.js +1 -0
  16. package/build/cjs/blocks/Icons/Icons.js +2 -2
  17. package/build/cjs/blocks/Icons/index.d.ts +7 -0
  18. package/build/cjs/blocks/Icons/index.js +44 -0
  19. package/build/cjs/blocks/Info/index.d.ts +1 -0
  20. package/build/cjs/blocks/Info/index.js +1 -0
  21. package/build/cjs/blocks/Map/index.d.ts +1 -0
  22. package/build/cjs/blocks/Map/index.js +1 -0
  23. package/build/cjs/blocks/Media/index.d.ts +26 -2
  24. package/build/cjs/blocks/Media/index.js +39 -4
  25. package/build/cjs/blocks/PromoFeaturesBlock/index.d.ts +11 -1
  26. package/build/cjs/blocks/PromoFeaturesBlock/index.js +31 -1
  27. package/build/cjs/blocks/Questions/index.d.ts +1 -0
  28. package/build/cjs/blocks/Questions/index.js +1 -0
  29. package/build/cjs/blocks/Share/index.d.ts +1 -0
  30. package/build/cjs/blocks/Share/index.js +1 -0
  31. package/build/cjs/blocks/Slider/index.d.ts +19 -0
  32. package/build/cjs/blocks/Slider/index.js +31 -0
  33. package/build/cjs/blocks/Table/index.d.ts +10 -0
  34. package/build/cjs/blocks/Table/index.js +17 -0
  35. package/build/cjs/blocks/Tabs/index.d.ts +1 -0
  36. package/build/cjs/blocks/Tabs/index.js +1 -0
  37. package/build/cjs/common/types/forms.d.ts +1 -0
  38. package/build/cjs/constructor-items.d.ts +2 -6
  39. package/build/cjs/constructor-items.js +2 -2
  40. package/build/cjs/editor-v2/components/BlocksList/BlocksList.css +27 -1
  41. package/build/cjs/editor-v2/components/BlocksList/BlocksList.js +34 -2
  42. package/build/cjs/editor-v2/components/Panels/Panels.css +36 -0
  43. package/build/cjs/editor-v2/components/Panels/Panels.d.ts +8 -0
  44. package/build/cjs/editor-v2/components/Panels/Panels.js +41 -0
  45. package/build/cjs/editor-v2/components/Tree/Tree.css +11 -0
  46. package/build/cjs/editor-v2/components/Tree/Tree.js +10 -2
  47. package/build/cjs/editor-v2/containers/Editor/Editor.css +0 -10
  48. package/build/cjs/editor-v2/containers/Editor/Editor.js +2 -13
  49. package/build/cjs/editor-v2/context/contentConfig/store.d.ts +1 -0
  50. package/build/cjs/editor-v2/context/contentConfig/store.js +3 -0
  51. package/build/cjs/sub-blocks/BackgroundCard/index.js +2 -0
  52. package/build/cjs/sub-blocks/BannerCard/index.js +1 -0
  53. package/build/cjs/sub-blocks/BasicCard/index.js +1 -0
  54. package/build/cjs/sub-blocks/Content/index.js +1 -0
  55. package/build/cjs/sub-blocks/ImageCard/index.js +1 -0
  56. package/build/cjs/sub-blocks/LayoutItem/index.js +7 -2
  57. package/build/cjs/sub-blocks/MediaCard/index.js +2 -0
  58. package/build/cjs/sub-blocks/PriceCard/index.js +1 -0
  59. package/build/cjs/sub-blocks/PriceDetailed/index.js +1 -0
  60. package/build/cjs/sub-blocks/Quote/index.js +1 -0
  61. package/build/esm/blocks/Banner/index.js +1 -0
  62. package/build/esm/blocks/CardLayout/index.js +21 -3
  63. package/build/esm/blocks/Companies/index.js +1 -0
  64. package/build/esm/blocks/ContentLayout/index.d.ts +31 -1
  65. package/build/esm/blocks/ContentLayout/index.js +64 -1
  66. package/build/esm/blocks/ExtendedFeatures/index.d.ts +48 -2
  67. package/build/esm/blocks/ExtendedFeatures/index.js +60 -2
  68. package/build/esm/blocks/FilterBlock/index.d.ts +18 -0
  69. package/build/esm/blocks/FilterBlock/index.js +81 -1
  70. package/build/esm/blocks/Form/index.d.ts +1 -0
  71. package/build/esm/blocks/Form/index.js +1 -0
  72. package/build/esm/blocks/Header/index.d.ts +11 -0
  73. package/build/esm/blocks/Header/index.js +18 -0
  74. package/build/esm/blocks/HeaderSlider/index.d.ts +1 -0
  75. package/build/esm/blocks/HeaderSlider/index.js +1 -0
  76. package/build/esm/blocks/Icons/Icons.js +2 -2
  77. package/build/esm/blocks/Icons/index.d.ts +7 -0
  78. package/build/esm/blocks/Icons/index.js +44 -0
  79. package/build/esm/blocks/Info/index.d.ts +1 -0
  80. package/build/esm/blocks/Info/index.js +1 -0
  81. package/build/esm/blocks/Map/index.d.ts +1 -0
  82. package/build/esm/blocks/Map/index.js +1 -0
  83. package/build/esm/blocks/Media/index.d.ts +26 -2
  84. package/build/esm/blocks/Media/index.js +39 -4
  85. package/build/esm/blocks/PromoFeaturesBlock/index.d.ts +11 -1
  86. package/build/esm/blocks/PromoFeaturesBlock/index.js +31 -1
  87. package/build/esm/blocks/Questions/index.d.ts +1 -0
  88. package/build/esm/blocks/Questions/index.js +1 -0
  89. package/build/esm/blocks/Share/index.d.ts +1 -0
  90. package/build/esm/blocks/Share/index.js +1 -0
  91. package/build/esm/blocks/Slider/index.d.ts +19 -0
  92. package/build/esm/blocks/Slider/index.js +31 -0
  93. package/build/esm/blocks/Table/index.d.ts +10 -0
  94. package/build/esm/blocks/Table/index.js +17 -0
  95. package/build/esm/blocks/Tabs/index.d.ts +1 -0
  96. package/build/esm/blocks/Tabs/index.js +1 -0
  97. package/build/esm/common/types/forms.d.ts +1 -0
  98. package/build/esm/constructor-items.d.ts +2 -6
  99. package/build/esm/constructor-items.js +1 -1
  100. package/build/esm/editor-v2/components/BlocksList/BlocksList.css +27 -1
  101. package/build/esm/editor-v2/components/BlocksList/BlocksList.js +35 -3
  102. package/build/esm/editor-v2/components/Panels/Panels.css +36 -0
  103. package/build/esm/editor-v2/components/Panels/Panels.d.ts +9 -0
  104. package/build/esm/editor-v2/components/Panels/Panels.js +37 -0
  105. package/build/esm/editor-v2/components/Tree/Tree.css +11 -0
  106. package/build/esm/editor-v2/components/Tree/Tree.js +11 -3
  107. package/build/esm/editor-v2/containers/Editor/Editor.css +0 -10
  108. package/build/esm/editor-v2/containers/Editor/Editor.js +2 -13
  109. package/build/esm/editor-v2/context/contentConfig/store.d.ts +1 -0
  110. package/build/esm/editor-v2/context/contentConfig/store.js +3 -0
  111. package/build/esm/sub-blocks/BackgroundCard/index.js +2 -0
  112. package/build/esm/sub-blocks/BannerCard/index.js +1 -0
  113. package/build/esm/sub-blocks/BasicCard/index.js +1 -0
  114. package/build/esm/sub-blocks/Content/index.js +1 -0
  115. package/build/esm/sub-blocks/ImageCard/index.js +1 -0
  116. package/build/esm/sub-blocks/LayoutItem/index.js +7 -2
  117. package/build/esm/sub-blocks/MediaCard/index.js +2 -0
  118. package/build/esm/sub-blocks/PriceCard/index.js +1 -0
  119. package/build/esm/sub-blocks/PriceDetailed/index.js +1 -0
  120. package/build/esm/sub-blocks/Quote/index.js +1 -0
  121. package/package.json +1 -1
  122. package/widget/index.js +1 -1
  123. package/build/cjs/sub-blocks/LayoutItem/form.d.ts +0 -8
  124. package/build/cjs/sub-blocks/LayoutItem/form.js +0 -14
  125. package/build/esm/sub-blocks/LayoutItem/form.d.ts +0 -8
  126. package/build/esm/sub-blocks/LayoutItem/form.js +0 -11
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Editor = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
- const icons_1 = require("@gravity-ui/icons");
7
- const react_resizable_panels_1 = require("react-resizable-panels");
8
6
  const types_1 = require("../../../common/types");
9
7
  const utils_1 = require("../../../utils");
10
8
  const BigOverlay_1 = tslib_1.__importDefault(require("../../components/BigOverlay/BigOverlay"));
11
9
  const MiddleScreen_1 = tslib_1.__importDefault(require("../../components/MiddleScreen/MiddleScreen"));
10
+ const Panels_1 = require("../../components/Panels/Panels");
12
11
  const Sidebar_1 = require("../../components/Sidebar/Sidebar");
13
12
  const contentConfig_1 = require("../../context/contentConfig");
14
13
  const editorContext_1 = require("../../context/editorContext");
@@ -43,17 +42,7 @@ const EditorView = (_props) => {
43
42
  }, [manipulateOverlayMode, sendMessage]);
44
43
  return (react_1.default.createElement("div", { className: b(), onMouseUp: onMouseUp, onMouseMove: onMouseMove },
45
44
  react_1.default.createElement("div", { className: b('body') },
46
- react_1.default.createElement(react_resizable_panels_1.PanelGroup, { className: b('panel'), autoSaveId: "page-constructor-editor", direction: "horizontal" },
47
- react_1.default.createElement(react_resizable_panels_1.Panel, { collapsible: true, defaultSize: 25, minSize: 15 },
48
- react_1.default.createElement(Sidebar_1.Sidebar, { position: 'left' })),
49
- react_1.default.createElement(react_resizable_panels_1.PanelResizeHandle, { className: b('draggable') },
50
- react_1.default.createElement(icons_1.Grip, { className: b('grip') })),
51
- react_1.default.createElement(react_resizable_panels_1.Panel, { minSize: 20 },
52
- react_1.default.createElement(MiddleScreen_1.default, null)),
53
- react_1.default.createElement(react_resizable_panels_1.PanelResizeHandle, { className: b('draggable') },
54
- react_1.default.createElement(icons_1.Grip, { className: b('grip') })),
55
- react_1.default.createElement(react_resizable_panels_1.Panel, { collapsible: true, minSize: 15, defaultSize: 25 },
56
- react_1.default.createElement(Sidebar_1.Sidebar, { position: 'right', startMenu: "block-config" })))),
45
+ react_1.default.createElement(Panels_1.Panels, { left: react_1.default.createElement(Sidebar_1.Sidebar, { position: 'left' }), right: react_1.default.createElement(Sidebar_1.Sidebar, { position: 'right', startMenu: "block-config" }), middle: react_1.default.createElement(MiddleScreen_1.default, null) })),
57
46
  react_1.default.createElement(BigOverlay_1.default, { className: b('overlay') })));
58
47
  };
59
48
  const Editor = (props) => {
@@ -18,6 +18,7 @@ export interface ContentConfigMethods extends WithStoreReducer {
18
18
  duplicateBlock: (path: number[]) => void;
19
19
  reorderBlock: (path: number[], destination: number[]) => void;
20
20
  updateField: (path: string, value: DynamicFormValue) => void;
21
+ resetBlocks: () => void;
21
22
  }
22
23
  export type ContentConfigStore = ContentConfigState & ContentConfigMethods;
23
24
  export declare const createContentConfigStore: (overrideInitialState?: Partial<ContentConfigState> | undefined) => import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<ContentConfigState & ContentConfigMethods>, "subscribe"> & {
@@ -61,6 +61,9 @@ exports.createContentConfigStore = (0, store_1.initializeStore)({
61
61
  }
62
62
  set((state) => (Object.assign(Object.assign({}, state), { config: Object.assign(Object.assign({}, state.config), { blocks: newBlocksConfig }) })));
63
63
  },
64
+ resetBlocks: () => {
65
+ set((state) => (Object.assign(Object.assign({}, state), { config: Object.assign(Object.assign({}, state.config), { blocks: [] }) })));
66
+ },
64
67
  reducer: function (action) {
65
68
  switch (action.type) {
66
69
  // Insert Actions
@@ -9,10 +9,12 @@ const BackgroundCardConfig = {
9
9
  schema: {
10
10
  name: 'Background Card',
11
11
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.BackgroundCard['background-card']),
12
+ group: 'cards',
12
13
  default: {
13
14
  title: 'Background Card',
14
15
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
15
16
  additionalInfo: 'Additional info',
17
+ backgroundColor: '#F0F0F0',
16
18
  },
17
19
  },
18
20
  };
@@ -8,6 +8,7 @@ const BannerCardConfig = {
8
8
  component: BannerCard_1.default,
9
9
  schema: {
10
10
  name: 'Banner Card',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.BannerCardProps),
12
13
  default: {
13
14
  color: 'rgba(54, 151, 241, 0.4)',
@@ -8,6 +8,7 @@ const BasicCardConfig = {
8
8
  component: BasicCard_1.default,
9
9
  schema: {
10
10
  name: 'Basic Card',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.BasicCard['basic-card']),
12
13
  default: {
13
14
  title: 'Basic Card',
@@ -8,6 +8,7 @@ const ContentConfig = {
8
8
  component: Content_1.default,
9
9
  schema: {
10
10
  name: 'Content',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.ContentBlock['content']),
12
13
  default: {
13
14
  title: 'Content',
@@ -8,6 +8,7 @@ const ImageCardConfig = {
8
8
  component: ImageCard_1.default,
9
9
  schema: {
10
10
  name: 'Image Card',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.ImageCard['image-card']),
12
13
  default: {
13
14
  title: 'Image Card',
@@ -8,11 +8,16 @@ const LayoutItemConfig = {
8
8
  component: LayoutItem_1.default,
9
9
  schema: {
10
10
  name: 'Layout Item',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.LayoutItem),
12
13
  default: {
14
+ type: 'layout-item',
13
15
  content: {
14
- title: 'Layout Item',
15
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
16
+ title: 'Lorem ipsum',
17
+ text: 'Dolor sit amet',
18
+ },
19
+ media: {
20
+ image: 'https://storage.yandexcloud.net/yc-www-community-images/event_ecaf1ef1-bc3a-40fa-adef-827b0959e6c3.jpg',
16
21
  },
17
22
  },
18
23
  },
@@ -8,12 +8,14 @@ const MediaCardConfig = {
8
8
  component: MediaCard_1.default,
9
9
  schema: {
10
10
  name: 'Media Card',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.MediaCardBlock['media-card']),
12
13
  default: {
13
14
  content: {
14
15
  title: 'Media Card',
15
16
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
16
17
  },
18
+ image: 'https://storage.yandexcloud.net/yc-www-community-images/event_ecaf1ef1-bc3a-40fa-adef-827b0959e6c3.jpg',
17
19
  },
18
20
  },
19
21
  };
@@ -8,6 +8,7 @@ const PriceCardConfig = {
8
8
  component: PriceCard_1.default,
9
9
  schema: {
10
10
  name: 'Price Card',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.PriceCardBlock['price-card']),
12
13
  default: {
13
14
  type: 'price-card',
@@ -9,6 +9,7 @@ const PriceDetailedConfig = {
9
9
  component: PriceDetailed_1.default,
10
10
  schema: {
11
11
  name: 'Price Detailed',
12
+ group: 'cards',
12
13
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.PriceDetailedBlock['price-detailed']),
13
14
  default: {
14
15
  priceType: 'marked-list',
@@ -8,6 +8,7 @@ const QuoteConfig = {
8
8
  component: Quote_1.default,
9
9
  schema: {
10
10
  name: 'Quote',
11
+ group: 'cards',
11
12
  inputs: (0, form_generator_1.generateFromAJV)(schema_1.Quote['quote']),
12
13
  default: {
13
14
  text: 'A good decision is based on knowledge and not on numbers.',
@@ -5,6 +5,7 @@ const BannerBlockConfig = {
5
5
  component: BannerBlock,
6
6
  schema: {
7
7
  name: 'Banner Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(BannerCardProps),
9
10
  default: {
10
11
  color: 'rgba(54, 151, 241, 0.4)',
@@ -1,5 +1,7 @@
1
1
  import { sliderSizesArray, textSize } from '../../schema/validators/common';
2
+ import { generateFromAJV } from '../../utils/form-generator';
2
3
  import CardLayout from './CardLayout';
4
+ import { CardLayoutProps } from './schema';
3
5
  const textSizeEnum = textSize.map((size) => ({ value: size, content: size }));
4
6
  export const blockConfig = [
5
7
  {
@@ -149,11 +151,27 @@ const CardLayoutBlockConfig = {
149
151
  component: CardLayout,
150
152
  schema: {
151
153
  name: 'Card Layout Block',
152
- inputs: blockConfig,
153
- // inputs: generateFromAJV(CardLayoutProps as unknown as JSONSchemaType<{}>),
154
+ group: 'card-containers',
155
+ inputs: generateFromAJV(CardLayoutProps),
154
156
  default: {
155
157
  type: 'card-layout-block',
156
- children: [],
158
+ children: [
159
+ {
160
+ type: 'background-card',
161
+ title: 'Tell a story and build a narrative',
162
+ text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',
163
+ },
164
+ {
165
+ type: 'background-card',
166
+ title: 'Tell a story and build a narrative',
167
+ text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',
168
+ },
169
+ {
170
+ type: 'background-card',
171
+ title: 'Tell a story and build a narrative',
172
+ text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',
173
+ },
174
+ ],
157
175
  title: 'Card Layout Block',
158
176
  description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
159
177
  },
@@ -5,6 +5,7 @@ const CompaniesBlockConfig = {
5
5
  component: CompaniesBlock,
6
6
  schema: {
7
7
  name: 'Companies Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(CompaniesBlockSchema['companies-block']),
9
10
  default: {
10
11
  title: 'Companies Block',
@@ -2,9 +2,39 @@ declare const ContentLayoutBlockConfig: {
2
2
  component: (props: import("../..").ContentLayoutBlockProps) => JSX.Element;
3
3
  schema: {
4
4
  name: string;
5
+ group: string;
5
6
  inputs: import("../../editor-v2").ConfigInput[];
6
7
  default: {
7
- title: string;
8
+ textContent: {
9
+ title: string;
10
+ text: string;
11
+ };
12
+ additionalInfo: string;
13
+ buttons: {
14
+ text: string;
15
+ theme: string;
16
+ url: string;
17
+ }[];
18
+ links: {
19
+ url: string;
20
+ text: string;
21
+ theme: string;
22
+ arrow: boolean;
23
+ }[];
24
+ fileContent: {
25
+ href: string;
26
+ text: string;
27
+ }[];
28
+ list: ({
29
+ title: string;
30
+ text: string;
31
+ } | {
32
+ text: string;
33
+ title?: undefined;
34
+ } | {
35
+ title: string;
36
+ text?: undefined;
37
+ })[];
8
38
  };
9
39
  };
10
40
  };
@@ -5,9 +5,72 @@ const ContentLayoutBlockConfig = {
5
5
  component: ContentLayoutBlock,
6
6
  schema: {
7
7
  name: 'Content Layout Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(ContentLayoutBlockSchema['content-layout-block']),
9
10
  default: {
10
- title: 'Content Layout Block',
11
+ textContent: {
12
+ title: 'Lorem ipsum dolor sit amet',
13
+ text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
14
+ },
15
+ additionalInfo: 'Duis aute irure dolor in reprehenderit n voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
16
+ buttons: [
17
+ {
18
+ text: 'Button',
19
+ theme: 'action',
20
+ url: 'https://example.com',
21
+ },
22
+ {
23
+ text: 'Button',
24
+ theme: 'outlined',
25
+ url: 'https://example.com',
26
+ },
27
+ ],
28
+ links: [
29
+ {
30
+ url: 'https://example.com',
31
+ text: 'Link',
32
+ theme: 'normal',
33
+ arrow: true,
34
+ },
35
+ ],
36
+ fileContent: [
37
+ {
38
+ href: 'https://example.xls',
39
+ text: 'File xls',
40
+ },
41
+ {
42
+ href: 'https://example.fig',
43
+ text: 'File PNG, JPG, and SVG format',
44
+ },
45
+ {
46
+ href: 'https://example.pdf',
47
+ text: 'Pdf file',
48
+ },
49
+ {
50
+ href: 'https://example.zip',
51
+ text: 'Archive file',
52
+ },
53
+ {
54
+ href: 'https://example.doc',
55
+ text: 'Microsoft Word document',
56
+ },
57
+ {
58
+ href: 'https://example.ppt',
59
+ text: 'PPT file',
60
+ },
61
+ ],
62
+ list: [
63
+ {
64
+ title: 'Lorem ipsum',
65
+ text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
66
+ },
67
+ {
68
+ text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
69
+ },
70
+ {
71
+ title: 'Lorem ipsum ipsum',
72
+ },
73
+ ],
11
74
  },
12
75
  },
13
76
  };
@@ -2,10 +2,56 @@ declare const ExtendedFeaturesBlockConfig: {
2
2
  component: ({ title, description, items, colSizes, animated, }: import("../..").ExtendedFeaturesProps) => JSX.Element;
3
3
  schema: {
4
4
  name: string;
5
+ group: string;
5
6
  inputs: import("../../editor-v2").ConfigInput[];
6
7
  default: {
7
- title: string;
8
- items: {}[];
8
+ type: string;
9
+ title: {
10
+ text: string;
11
+ textSize: string;
12
+ };
13
+ description: string;
14
+ items: ({
15
+ title: string;
16
+ text: string;
17
+ additionalInfo: string;
18
+ buttons?: undefined;
19
+ links?: undefined;
20
+ list?: undefined;
21
+ } | {
22
+ title: string;
23
+ text: string;
24
+ buttons: {
25
+ text: string;
26
+ theme: string;
27
+ url: string;
28
+ }[];
29
+ additionalInfo?: undefined;
30
+ links?: undefined;
31
+ list?: undefined;
32
+ } | {
33
+ title: string;
34
+ text: string;
35
+ links: {
36
+ text: string;
37
+ url: string;
38
+ arrow: boolean;
39
+ theme: string;
40
+ }[];
41
+ additionalInfo?: undefined;
42
+ buttons?: undefined;
43
+ list?: undefined;
44
+ } | {
45
+ title: string;
46
+ text: string;
47
+ list: {
48
+ title: string;
49
+ text: string;
50
+ }[];
51
+ additionalInfo?: undefined;
52
+ buttons?: undefined;
53
+ links?: undefined;
54
+ })[];
9
55
  };
10
56
  };
11
57
  };
@@ -5,10 +5,68 @@ const ExtendedFeaturesBlockConfig = {
5
5
  component: ExtendedFeaturesBlock,
6
6
  schema: {
7
7
  name: 'Extended Features Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(ExtendedFeaturesBlockSchema['extended-features-block']),
9
10
  default: {
10
- title: 'Extended Features Block',
11
- items: [{}],
11
+ type: 'extended-features-block',
12
+ title: {
13
+ text: 'Lorem ipsum dolor sit amet',
14
+ textSize: 'm',
15
+ },
16
+ description: 'Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone.',
17
+ items: [
18
+ {
19
+ title: 'Sed do eiusmod tempor incididunt',
20
+ text: 'Ut enim ad minim veniam quis nostrud ullamco laboris nisi ut aliquip ex ea commodo consequat.',
21
+ additionalInfo: 'Duis aute irure dolor in reprehenderit n voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
22
+ },
23
+ {
24
+ title: 'Sed do eiusmod tempor',
25
+ text: 'Ut enim ad minim veniam quis nostrud ullamco laboris nisi ut aliquip ex ea commodo consequat.',
26
+ buttons: [
27
+ {
28
+ text: 'Button',
29
+ theme: 'action',
30
+ url: 'https://example.com',
31
+ },
32
+ {
33
+ text: 'Button',
34
+ theme: 'outlined',
35
+ url: 'https://example.com',
36
+ },
37
+ ],
38
+ },
39
+ {
40
+ title: 'Sed do eiusmod tempor incididunt',
41
+ text: 'Ut enim ad minim veniam quis nostrud ullamco laboris nisi ut aliquip ex ea commodo consequat.',
42
+ links: [
43
+ {
44
+ text: 'Go',
45
+ url: '#',
46
+ arrow: true,
47
+ theme: 'normal',
48
+ },
49
+ ],
50
+ },
51
+ {
52
+ title: 'Sed do eiusmod tempor incididunt',
53
+ text: 'Ut enim ad minim veniam quis nostrud ullamco laboris nisi ut aliquip ex ea commodo consequat.',
54
+ list: [
55
+ {
56
+ title: 'Lorem ipsum',
57
+ text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
58
+ },
59
+ {
60
+ title: 'Lorem ipsum ipsum',
61
+ text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
62
+ },
63
+ {
64
+ title: 'Lorem ipsum',
65
+ text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
66
+ },
67
+ ],
68
+ },
69
+ ],
12
70
  },
13
71
  },
14
72
  };
@@ -2,9 +2,27 @@ declare const FilterBlockConfig: {
2
2
  component: import("react").FC<import("../..").FilterBlockProps>;
3
3
  schema: {
4
4
  name: string;
5
+ group: string;
5
6
  inputs: import("../../editor-v2").ConfigInput[];
6
7
  default: {
8
+ allTag: boolean;
9
+ description: string;
10
+ items: {
11
+ card: {
12
+ content: {
13
+ title: string;
14
+ text: string;
15
+ };
16
+ type: string;
17
+ };
18
+ tags: string[];
19
+ }[];
20
+ tags: {
21
+ id: string;
22
+ label: string;
23
+ }[];
7
24
  title: string;
25
+ type: string;
8
26
  };
9
27
  };
10
28
  };
@@ -5,9 +5,89 @@ const FilterBlockConfig = {
5
5
  component: FilterBlock,
6
6
  schema: {
7
7
  name: 'Filter Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(FilterProps),
9
10
  default: {
10
- title: 'Filter Block',
11
+ allTag: true,
12
+ description: 'Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone.',
13
+ items: [
14
+ {
15
+ card: {
16
+ content: {
17
+ title: 'Layout Item 1',
18
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
19
+ },
20
+ type: 'layout-item',
21
+ },
22
+ tags: ['one'],
23
+ },
24
+ {
25
+ card: {
26
+ content: {
27
+ title: 'Layout Item 2',
28
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
29
+ },
30
+ type: 'layout-item',
31
+ },
32
+ tags: ['two'],
33
+ },
34
+ {
35
+ card: {
36
+ content: {
37
+ title: 'Layout Item 3',
38
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
39
+ },
40
+ type: 'layout-item',
41
+ },
42
+ tags: ['three'],
43
+ },
44
+ {
45
+ card: {
46
+ content: {
47
+ title: 'Layout Item 4',
48
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
49
+ },
50
+ type: 'layout-item',
51
+ },
52
+ tags: ['one'],
53
+ },
54
+ {
55
+ card: {
56
+ content: {
57
+ title: 'Layout Item 5',
58
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
59
+ },
60
+ type: 'layout-item',
61
+ },
62
+ tags: ['two'],
63
+ },
64
+ {
65
+ card: {
66
+ content: {
67
+ title: 'Layout Item 6',
68
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
69
+ },
70
+ type: 'layout-item',
71
+ },
72
+ tags: ['three'],
73
+ },
74
+ ],
75
+ tags: [
76
+ {
77
+ id: 'one',
78
+ label: 'First very long label',
79
+ },
80
+ {
81
+ id: 'two',
82
+ label: 'Second very long label',
83
+ },
84
+ {
85
+ id: 'three',
86
+ label: 'Third very long label',
87
+ },
88
+ ],
89
+ title: 'Card Layout',
90
+ type: 'filter-block',
11
91
  },
12
92
  },
13
93
  };
@@ -2,6 +2,7 @@ declare const FormBlockConfig: {
2
2
  component: import("react").FC<import("../..").FormBlockProps>;
3
3
  schema: {
4
4
  name: string;
5
+ group: string;
5
6
  inputs: import("../../editor-v2").ConfigInput[];
6
7
  default: {
7
8
  title: string;
@@ -5,6 +5,7 @@ const FormBlockConfig = {
5
5
  component: FormBlock,
6
6
  schema: {
7
7
  name: 'Form Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(FormBlockSchema['form-block']),
9
10
  default: {
10
11
  title: 'Form Block',
@@ -2,7 +2,18 @@ declare const HeaderBlockConfig: {
2
2
  component: (props: import("../..").WithChildren<import("../..").HeaderBlockProps & import("../..").ClassNameProps>) => JSX.Element;
3
3
  schema: {
4
4
  name: string;
5
+ group: string;
5
6
  inputs: import("../../editor-v2").ConfigInput[];
7
+ default: {
8
+ type: string;
9
+ title: string;
10
+ description: string;
11
+ buttons: {
12
+ text: string;
13
+ theme: string;
14
+ url: string;
15
+ }[];
16
+ };
6
17
  };
7
18
  };
8
19
  export default HeaderBlockConfig;
@@ -5,7 +5,25 @@ const HeaderBlockConfig = {
5
5
  component: HeaderBlock,
6
6
  schema: {
7
7
  name: 'Header Block',
8
+ group: 'block',
8
9
  inputs: generateFromAJV(HeaderBlockSchema['header-block']),
10
+ default: {
11
+ type: 'header-block',
12
+ title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
13
+ description: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
14
+ buttons: [
15
+ {
16
+ text: 'Button\r',
17
+ theme: 'action',
18
+ url: 'https://example.com',
19
+ },
20
+ {
21
+ text: 'Button',
22
+ theme: 'outlined',
23
+ url: 'https://example.com',
24
+ },
25
+ ],
26
+ },
9
27
  },
10
28
  };
11
29
  export default HeaderBlockConfig;