@kitconcept/volto-light-theme 8.0.0-alpha.2 → 8.0.0-alpha.21

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 (101) hide show
  1. package/.changelog.draft +3 -4
  2. package/CHANGELOG.md +232 -0
  3. package/locales/de/LC_MESSAGES/volto.po +30 -115
  4. package/locales/en/LC_MESSAGES/volto.po +30 -115
  5. package/locales/es/LC_MESSAGES/volto.po +31 -116
  6. package/locales/eu/LC_MESSAGES/volto.po +58 -124
  7. package/locales/pt_BR/LC_MESSAGES/volto.po +38 -123
  8. package/locales/volto.pot +31 -116
  9. package/package.json +7 -4
  10. package/src/__mocks__/semantic-ui-react.ts +31 -0
  11. package/src/components/Blocks/Block/Edit.jsx +14 -6
  12. package/src/components/Blocks/Block/EditBlockWrapper.jsx +9 -3
  13. package/src/components/Blocks/Block/ErrorBoundary.test.tsx +55 -0
  14. package/src/components/Blocks/Block/ErrorBoundary.tsx +92 -0
  15. package/src/components/Blocks/Block/ErrorBoundaryMessage.tsx +66 -0
  16. package/src/components/Blocks/EventCalendar/Search/components/EventTemplate.tsx +1 -1
  17. package/src/components/Blocks/Image/Edit.jsx +1 -0
  18. package/src/components/Blocks/Listing/DefaultTemplate.jsx +12 -6
  19. package/src/components/Blocks/Listing/GridTemplate.jsx +16 -7
  20. package/src/components/Blocks/Listing/ListingBody.jsx +4 -1
  21. package/src/components/Blocks/Listing/SummaryTemplate.jsx +16 -7
  22. package/src/components/Blocks/Teaser/DefaultBody.tsx +25 -5
  23. package/src/components/Blocks/schema.ts +69 -0
  24. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +128 -0
  25. package/src/components/Breadcrumbs/Breadcrumbs.tsx +117 -0
  26. package/src/components/Caption/Caption.test.tsx +31 -0
  27. package/src/components/Caption/{Caption.jsx → Caption.tsx} +14 -21
  28. package/src/components/Footer/ColumnLinks.tsx +2 -2
  29. package/src/components/Footer/slots/Colophon.tsx +13 -1
  30. package/src/components/Footer/slots/CoreFooter.tsx +4 -2
  31. package/src/components/Header/Header.tsx +3 -3
  32. package/src/components/LanguageSelector/LanguageSelector.tsx +91 -0
  33. package/src/components/MobileNavigation/MobileNavigation.jsx +11 -9
  34. package/src/components/Navigation/Navigation.test.tsx +176 -0
  35. package/src/components/Navigation/{Navigation.jsx → Navigation.tsx} +77 -37
  36. package/src/components/StickyMenu/MobileCarouselArrowButton.tsx +81 -0
  37. package/src/components/StickyMenu/MobileStickyMenu.tsx +76 -0
  38. package/src/components/Summary/DefaultSummary.tsx +10 -3
  39. package/src/components/Summary/EventSummary.tsx +10 -3
  40. package/src/components/Summary/FileSummary.tsx +10 -3
  41. package/src/components/Summary/NewsItemSummary.tsx +10 -3
  42. package/src/components/Summary/PersonSummary.tsx +10 -3
  43. package/src/components/Summary/Summary.stories.tsx +46 -30
  44. package/src/components/Tags/Tags.test.tsx +71 -0
  45. package/src/components/Tags/{Tags.jsx → Tags.tsx} +9 -25
  46. package/src/components/Theme/EventView.jsx +4 -4
  47. package/src/components/Theme/NewsItemView.jsx +4 -4
  48. package/src/components/Theme/RenderBlocks.jsx +45 -37
  49. package/src/components/Theme/RenderBlocksV2.jsx +51 -20
  50. package/src/components/Widgets/ColorSwatch.stories.tsx +197 -0
  51. package/src/components/Widgets/ColorSwatch.test.tsx +188 -0
  52. package/src/components/Widgets/ColorSwatch.tsx +77 -39
  53. package/src/components/Widgets/SoftTextWidget.tsx +129 -0
  54. package/src/components/Widgets/SoftTextareaWidget.tsx +118 -0
  55. package/src/components/Widgets/ThemeColorSwatch.tsx +5 -9
  56. package/src/config/blocks.tsx +21 -29
  57. package/src/config/slots.ts +7 -0
  58. package/src/config/widgets.ts +5 -9
  59. package/src/customizations/volto/components/manage/DragDropList/DragDropList.jsx +263 -0
  60. package/src/customizations/volto/components/theme/LanguageSelector/LanguageSelector.tsx +10 -0
  61. package/src/helpers/styleDefinitions.test.tsx +30 -0
  62. package/src/helpers/styleDefinitions.ts +49 -0
  63. package/src/internalChecks.test.ts +94 -0
  64. package/src/primitives/Card/Card.stories.tsx +4 -1
  65. package/src/primitives/Card/Card.test.tsx +11 -33
  66. package/src/primitives/Card/Card.tsx +33 -43
  67. package/src/primitives/IconLinkList.tsx +53 -52
  68. package/src/theme/_bgcolor-blocks-layout.scss +43 -45
  69. package/src/theme/_content.scss +12 -13
  70. package/src/theme/_export_import.scss +94 -0
  71. package/src/theme/_footer.scss +64 -19
  72. package/src/theme/_header.scss +21 -4
  73. package/src/theme/_insets.scss +1 -1
  74. package/src/theme/_layout.scss +34 -15
  75. package/src/theme/_mobile-sticky-menu.scss +92 -0
  76. package/src/theme/_search-page.scss +249 -0
  77. package/src/theme/_typo-custom.scss +16 -5
  78. package/src/theme/_variables.scss +19 -4
  79. package/src/theme/_widgets.scss +15 -27
  80. package/src/theme/blocks/_accordion.scss +11 -4
  81. package/src/theme/blocks/_grid.scss +9 -77
  82. package/src/theme/blocks/_listing.scss +60 -126
  83. package/src/theme/blocks/_search.scss +3 -4
  84. package/src/theme/blocks/_table.scss +1 -0
  85. package/src/theme/blocks/_teaser.scss +7 -117
  86. package/src/theme/blocks/error-boundary.scss +11 -0
  87. package/src/theme/card.scss +107 -70
  88. package/src/theme/main.scss +5 -0
  89. package/src/theme/notfound.scss +27 -0
  90. package/src/theme/person.scss +28 -12
  91. package/src/theme/sticky-menu.scss +7 -5
  92. package/src/types.d.ts +1 -0
  93. package/vitest.config.mjs +4 -0
  94. package/razzle.extend.js +0 -38
  95. package/src/components/Blocks/schema.js +0 -44
  96. package/src/components/Breadcrumbs/Breadcrumbs.jsx +0 -118
  97. package/src/components/Widgets/AlignWidget.tsx +0 -84
  98. package/src/components/Widgets/BlockAlignment.tsx +0 -88
  99. package/src/components/Widgets/BlockWidth.tsx +0 -101
  100. package/src/components/Widgets/Buttons.tsx +0 -144
  101. package/src/components/Widgets/Size.tsx +0 -78
@@ -22,15 +22,17 @@ type Story = StoryObj<typeof meta>;
22
22
 
23
23
  export const Summary: Story = {
24
24
  render: (args) => (
25
- <div style={{ width: '300px' }}>
26
- <Wrapper>
27
- <DefaultSummary {...args} />
28
- </Wrapper>
25
+ <div className="card" style={{ width: '300px' }}>
26
+ <div className="card-summary">
27
+ <Wrapper>
28
+ <DefaultSummary {...args} />
29
+ </Wrapper>
30
+ </div>
29
31
  </div>
30
32
  ),
31
33
  args: {
32
34
  item: {
33
- title: 'Simple Card with strings',
35
+ title: 'Summary',
34
36
  description:
35
37
  'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea.',
36
38
  head_title: 'Simple Card',
@@ -40,15 +42,17 @@ export const Summary: Story = {
40
42
 
41
43
  export const SummaryWithLink: Story = {
42
44
  render: (args) => (
43
- <div style={{ width: '300px' }}>
44
- <Wrapper>
45
- <DefaultSummary {...args} />
46
- </Wrapper>
45
+ <div className="card" style={{ width: '300px' }}>
46
+ <div className="card-summary">
47
+ <Wrapper>
48
+ <DefaultSummary {...args} />
49
+ </Wrapper>
50
+ </div>
47
51
  </div>
48
52
  ),
49
53
  args: {
50
54
  item: {
51
- title: 'Simple Card with strings',
55
+ title: 'Summary',
52
56
  description:
53
57
  '[Lorem ipsum](https://example.com) dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea.',
54
58
  head_title: 'Simple Card',
@@ -58,15 +62,17 @@ export const SummaryWithLink: Story = {
58
62
 
59
63
  export const SummaryHideDescription: Story = {
60
64
  render: (args) => (
61
- <div style={{ width: '300px' }}>
62
- <Wrapper>
63
- <DefaultSummary {...args} />
64
- </Wrapper>
65
+ <div className="card" style={{ width: '300px' }}>
66
+ <div className="card-summary">
67
+ <Wrapper>
68
+ <DefaultSummary {...args} />
69
+ </Wrapper>
70
+ </div>
65
71
  </div>
66
72
  ),
67
73
  args: {
68
74
  item: {
69
- title: 'Simple Card with strings',
75
+ title: 'Summary',
70
76
  description:
71
77
  'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea.',
72
78
  head_title: 'Simple Card',
@@ -77,15 +83,17 @@ export const SummaryHideDescription: Story = {
77
83
 
78
84
  export const NewsItemSummary: Story = {
79
85
  render: (args) => (
80
- <div style={{ width: '300px' }}>
81
- <Wrapper>
82
- <NewsItemSummaryComponent {...args} />
83
- </Wrapper>
86
+ <div className="card" style={{ width: '300px' }}>
87
+ <div className="card-summary">
88
+ <Wrapper>
89
+ <NewsItemSummaryComponent {...args} />
90
+ </Wrapper>
91
+ </div>
84
92
  </div>
85
93
  ),
86
94
  args: {
87
95
  item: {
88
- title: 'Simple Card with strings',
96
+ title: 'Summary',
89
97
  description:
90
98
  'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea.',
91
99
  head_title: 'Simple Card',
@@ -98,15 +106,17 @@ export const NewsItemSummary: Story = {
98
106
 
99
107
  export const EventSummary: Story = {
100
108
  render: (args) => (
101
- <div style={{ width: '300px' }}>
102
- <Wrapper>
103
- <EventSummaryComponent {...args} />
104
- </Wrapper>
109
+ <div className="card" style={{ width: '300px' }}>
110
+ <div className="card-summary">
111
+ <Wrapper>
112
+ <EventSummaryComponent {...args} />
113
+ </Wrapper>
114
+ </div>
105
115
  </div>
106
116
  ),
107
117
  args: {
108
118
  item: {
109
- title: 'Simple Card with strings',
119
+ title: 'Summary',
110
120
  description:
111
121
  'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea.',
112
122
  head_title: 'Simple Card',
@@ -119,17 +129,23 @@ export const EventSummary: Story = {
119
129
 
120
130
  export const FileSummary: Story = {
121
131
  render: (args) => (
122
- <div style={{ width: '300px' }}>
123
- <Wrapper>
124
- <FileSummaryComponent {...args} />
125
- </Wrapper>
132
+ <div className="card" style={{ width: '300px' }}>
133
+ <div className="card-summary">
134
+ <Wrapper>
135
+ <div className="file-teaser">
136
+ <FileSummaryComponent {...args} />
137
+ </div>
138
+ </Wrapper>
139
+ </div>
126
140
  </div>
127
141
  ),
128
142
  args: {
129
143
  item: {
130
- title: 'Simple Card with strings',
144
+ title: 'Summary',
131
145
  description:
132
146
  'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea.',
147
+ getObjSize: '72.7 KB',
148
+ mime_type: 'application/pdf',
133
149
  head_title: 'Simple Card',
134
150
  start: '2023-01-01T11:00:00+00:00',
135
151
  end: '2023-12-31T12:00:00+00:00',
@@ -0,0 +1,71 @@
1
+ import React from 'react';
2
+ import { describe, it, beforeEach, expect, vi } from 'vitest';
3
+ import { render, screen } from '@testing-library/react';
4
+ import { MemoryRouter } from 'react-router-dom';
5
+
6
+ import Tags from './Tags';
7
+ import type { Content } from '@plone/types';
8
+
9
+ const mockConfig = vi.hoisted(() => ({
10
+ getComponent: vi.fn(() => ({
11
+ component: ({ children }: { children: React.ReactNode }) => (
12
+ <div data-testid="container">{children}</div>
13
+ ),
14
+ })),
15
+ settings: {
16
+ showTags: true,
17
+ },
18
+ }));
19
+
20
+ vi.mock('@plone/registry', () => ({
21
+ __esModule: true,
22
+ default: mockConfig,
23
+ }));
24
+
25
+ const mockUseLiveData = vi.fn();
26
+
27
+ vi.mock('@kitconcept/volto-light-theme/helpers/useLiveData', () => ({
28
+ useLiveData: (content: unknown, behavior: unknown, field: string) =>
29
+ mockUseLiveData(content, behavior, field),
30
+ }));
31
+
32
+ describe('Tags', () => {
33
+ beforeEach(() => {
34
+ vi.clearAllMocks();
35
+ mockConfig.settings.showTags = true;
36
+ });
37
+
38
+ it('renders tag links when enabled', () => {
39
+ mockUseLiveData.mockReturnValue(['React', 'Volto']);
40
+ render(
41
+ <MemoryRouter>
42
+ <Tags content={{ subjects: ['React', 'Volto'] } as Content} />
43
+ </MemoryRouter>,
44
+ );
45
+
46
+ const links = screen.getAllByRole('link');
47
+ expect(links).toHaveLength(2);
48
+ expect(links[0]).toHaveAttribute('href', '/search?Subject=React');
49
+ expect(links[1]).toHaveTextContent('Volto');
50
+ });
51
+
52
+ it('returns null when tags are hidden or empty', () => {
53
+ mockConfig.settings.showTags = false;
54
+ mockUseLiveData.mockReturnValue(['React']);
55
+ const { container: hidden } = render(
56
+ <MemoryRouter>
57
+ <Tags />
58
+ </MemoryRouter>,
59
+ );
60
+ expect(hidden.firstChild).toBeNull();
61
+
62
+ mockConfig.settings.showTags = true;
63
+ mockUseLiveData.mockReturnValue([]);
64
+ const { container: empty } = render(
65
+ <MemoryRouter>
66
+ <Tags />
67
+ </MemoryRouter>,
68
+ );
69
+ expect(empty.firstChild).toBeNull();
70
+ });
71
+ });
@@ -1,11 +1,17 @@
1
+ import React from 'react';
1
2
  import { Link } from 'react-router-dom';
2
- import PropTypes from 'prop-types';
3
3
  import { Container as SemanticContainer } from 'semantic-ui-react';
4
4
  import config from '@plone/registry';
5
5
  import { useLiveData } from '@kitconcept/volto-light-theme/helpers/useLiveData';
6
+ import type { Content } from '@plone/types';
6
7
 
7
- const Tags = ({ content }) => {
8
- const tags = useLiveData(content, undefined, 'subjects') || [];
8
+ type TagsProps = {
9
+ content?: Content;
10
+ };
11
+
12
+ const Tags: React.FC<TagsProps> = ({ content }) => {
13
+ const safeContent = content ?? ({ subjects: [] } as Content);
14
+ const tags = useLiveData<string[]>(safeContent, undefined, 'subjects') || [];
9
15
  const Container =
10
16
  config.getComponent({ name: 'Container' }).component || SemanticContainer;
11
17
 
@@ -22,26 +28,4 @@ const Tags = ({ content }) => {
22
28
  );
23
29
  };
24
30
 
25
- /**
26
- * Property types.
27
- * @property {Object} propTypes Property types.
28
- * @static
29
- */
30
- Tags.propTypes = {
31
- content: PropTypes.shape({
32
- subjects: PropTypes.arrayOf(PropTypes.string),
33
- }),
34
- };
35
-
36
- /**
37
- * Default properties.
38
- * @property {Object} defaultProps Default properties.
39
- * @static
40
- */
41
- Tags.defaultProps = {
42
- content: {
43
- subjects: [],
44
- },
45
- };
46
-
47
31
  export default Tags;
@@ -73,14 +73,14 @@ const EventView = (props) => {
73
73
  return (
74
74
  <Container id="page-document" className="view-wrapper event-view">
75
75
  <div className="dates">
76
- {content?.head_title && (
77
- <span className="head-title"> {content?.head_title}</span>
78
- )}{' '}
79
76
  {formattedDate ? (
80
77
  <span className="day" suppressHydrationWarning>
81
78
  {formattedDate}
82
79
  </span>
83
- ) : null}
80
+ ) : null}{' '}
81
+ {content?.head_title && (
82
+ <span className="head-title"> {content?.head_title}</span>
83
+ )}
84
84
  </div>
85
85
  {hasBlocksData(content) ? (
86
86
  <>
@@ -21,9 +21,6 @@ const NewsItemView = ({ content }) => {
21
21
  return (
22
22
  <Container id="page-document" className="view-wrapper newsitem-view">
23
23
  <div className="dates">
24
- {content?.head_title && (
25
- <span className="head-title"> {content?.head_title}</span>
26
- )}{' '}
27
24
  {content.effective ? (
28
25
  <FormattedDate
29
26
  key="day"
@@ -35,7 +32,10 @@ const NewsItemView = ({ content }) => {
35
32
  }}
36
33
  className="day"
37
34
  />
38
- ) : null}
35
+ ) : null}{' '}
36
+ {content?.head_title && (
37
+ <span className="head-title"> {content?.head_title}</span>
38
+ )}
39
39
  </div>
40
40
  <RenderBlocks content={content} />
41
41
  </Container>
@@ -12,6 +12,7 @@ import config from '@plone/volto/registry';
12
12
  import ViewDefaultBlock from '@plone/volto/components/manage/Blocks/Block/DefaultView';
13
13
  import MaybeWrap from '@plone/volto/components/manage/MaybeWrap/MaybeWrap';
14
14
  import RenderEmptyBlock from '@plone/volto/components/theme/View/RenderEmptyBlock';
15
+ import ErrorBoundary from '../Blocks/Block/ErrorBoundary';
15
16
 
16
17
  import StyleWrapperV3 from './StyleWrapperV3';
17
18
  import RenderBlocksV2 from './RenderBlocksV2';
@@ -69,48 +70,55 @@ const RenderBlocks = (props) => {
69
70
 
70
71
  if (Block) {
71
72
  return (
72
- <MaybeWrap
73
- key={block}
74
- condition={blockWrapperTag}
75
- as={blockWrapperTag}
73
+ <ErrorBoundary
74
+ key={`error-boundary-block-${block}`}
75
+ name={`blockId-${block}-type-${content[blocksFieldname]?.[block]?.['@type']}`}
76
+ block={block}
77
+ type={content[blocksFieldname]?.[block]?.['@type']}
76
78
  >
77
- {currentBlockModel === 3 ? (
78
- <StyleWrapperV3
79
- block={block}
80
- content={content}
81
- data={blockData}
82
- blocksConfig={blocksConfig}
83
- isContainer={isContainer}
84
- >
85
- <Block
86
- id={block}
87
- metadata={metadata}
88
- properties={content}
79
+ <MaybeWrap
80
+ key={block}
81
+ condition={blockWrapperTag}
82
+ as={blockWrapperTag}
83
+ >
84
+ {currentBlockModel === 3 ? (
85
+ <StyleWrapperV3
86
+ block={block}
87
+ content={content}
89
88
  data={blockData}
90
- path={getBaseUrl(location?.pathname || '')}
91
89
  blocksConfig={blocksConfig}
92
- />
93
- </StyleWrapperV3>
94
- ) : (
95
- <StyleWrapper
96
- key={block}
97
- {...props}
98
- id={block}
99
- block={block}
100
- data={blockData}
101
- isContainer={isContainer}
102
- >
103
- <Block
90
+ isContainer={isContainer}
91
+ >
92
+ <Block
93
+ id={block}
94
+ metadata={metadata}
95
+ properties={content}
96
+ data={blockData}
97
+ path={getBaseUrl(location?.pathname || '')}
98
+ blocksConfig={blocksConfig}
99
+ />
100
+ </StyleWrapperV3>
101
+ ) : (
102
+ <StyleWrapper
103
+ key={block}
104
+ {...props}
104
105
  id={block}
105
- metadata={metadata}
106
- properties={content}
106
+ block={block}
107
107
  data={blockData}
108
- path={getBaseUrl(location?.pathname || '')}
109
- blocksConfig={blocksConfig}
110
- />
111
- </StyleWrapper>
112
- )}
113
- </MaybeWrap>
108
+ isContainer={isContainer}
109
+ >
110
+ <Block
111
+ id={block}
112
+ metadata={metadata}
113
+ properties={content}
114
+ data={blockData}
115
+ path={getBaseUrl(location?.pathname || '')}
116
+ blocksConfig={blocksConfig}
117
+ />
118
+ </StyleWrapper>
119
+ )}
120
+ </MaybeWrap>
121
+ </ErrorBoundary>
114
122
  );
115
123
  }
116
124
 
@@ -15,6 +15,8 @@ import MaybeWrap from '@plone/volto/components/manage/MaybeWrap/MaybeWrap';
15
15
  import RenderEmptyBlock from '@plone/volto/components/theme/View/RenderEmptyBlock';
16
16
  import cx from 'classnames';
17
17
  import { groupByBGColor } from '../../helpers/grouping';
18
+ import ErrorBoundary from '../Blocks/Block/ErrorBoundary';
19
+ import StyleWrapperV3 from './StyleWrapperV3';
18
20
 
19
21
  const messages = defineMessages({
20
22
  unknownBlock: {
@@ -67,6 +69,9 @@ const RenderBlocks = (props) => {
67
69
  }
68
70
  >
69
71
  {group.map((block) => {
72
+ const currentBlockModel =
73
+ blocksConfig[content[blocksFieldname]?.[block]?.['@type']]
74
+ ?.blockModel;
70
75
  const Block =
71
76
  blocksConfig[content[blocksFieldname]?.[block]?.['@type']]
72
77
  ?.view || ViewDefaultBlock;
@@ -92,29 +97,55 @@ const RenderBlocks = (props) => {
92
97
 
93
98
  if (Block) {
94
99
  return (
95
- <MaybeWrap
96
- key={block}
97
- condition={blockWrapperTag}
98
- as={blockWrapperTag}
100
+ <ErrorBoundary
101
+ key={`error-boundary-block-${block}`}
102
+ name={`blockId-${block}-type-${content[blocksFieldname]?.[block]?.['@type']}`}
103
+ block={block}
104
+ type={content[blocksFieldname]?.[block]?.['@type']}
99
105
  >
100
- <StyleWrapper
106
+ <MaybeWrap
101
107
  key={block}
102
- {...props}
103
- id={block}
104
- block={block}
105
- data={blockData}
106
- isContainer={isContainer}
108
+ condition={blockWrapperTag}
109
+ as={blockWrapperTag}
107
110
  >
108
- <Block
109
- id={block}
110
- metadata={metadata}
111
- properties={content}
112
- data={blockData}
113
- path={getBaseUrl(location?.pathname || '')}
114
- blocksConfig={blocksConfig}
115
- />
116
- </StyleWrapper>
117
- </MaybeWrap>
111
+ {currentBlockModel === 3 ? (
112
+ <StyleWrapperV3
113
+ block={block}
114
+ content={content}
115
+ data={blockData}
116
+ blocksConfig={blocksConfig}
117
+ isContainer={isContainer}
118
+ >
119
+ <Block
120
+ id={block}
121
+ metadata={metadata}
122
+ properties={content}
123
+ data={blockData}
124
+ path={getBaseUrl(location?.pathname || '')}
125
+ blocksConfig={blocksConfig}
126
+ />
127
+ </StyleWrapperV3>
128
+ ) : (
129
+ <StyleWrapper
130
+ key={block}
131
+ {...props}
132
+ id={block}
133
+ block={block}
134
+ data={blockData}
135
+ isContainer={isContainer}
136
+ >
137
+ <Block
138
+ id={block}
139
+ metadata={metadata}
140
+ properties={content}
141
+ data={blockData}
142
+ path={getBaseUrl(location?.pathname || '')}
143
+ blocksConfig={blocksConfig}
144
+ />
145
+ </StyleWrapper>
146
+ )}
147
+ </MaybeWrap>
148
+ </ErrorBoundary>
118
149
  );
119
150
  }
120
151