@pega/react-sdk-overrides 0.25.4 → 0.25.6

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 (39) hide show
  1. package/lib/designSystemExtension/Banner/Banner.tsx +5 -2
  2. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +1 -1
  3. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +5 -2
  4. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +6 -13
  5. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +12 -1
  6. package/lib/field/Group/Group.tsx +3 -1
  7. package/lib/field/Location/Location.css +4 -0
  8. package/lib/field/Location/Location.tsx +2 -0
  9. package/lib/field/RadioButtons/RadioButtons.tsx +1 -1
  10. package/lib/field/RichText/RichText.css +79 -0
  11. package/lib/field/RichText/RichText.tsx +2 -0
  12. package/lib/field/SelectableCard/SelectableCard.tsx +3 -3
  13. package/lib/field/SelectableCard/utils.tsx +0 -4
  14. package/lib/field/SemanticLink/SemanticLink.tsx +1 -1
  15. package/lib/field/UserReference/UserReference.tsx +1 -1
  16. package/lib/helpers/attachmentShared.ts +6 -0
  17. package/lib/helpers/formatters/Currency.ts +9 -4
  18. package/lib/helpers/object-utils.ts +10 -0
  19. package/lib/infra/Assignment/Assignment.tsx +31 -24
  20. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +2 -1
  21. package/lib/infra/MultiStep/MultiStep.css +44 -66
  22. package/lib/infra/MultiStep/MultiStep.tsx +25 -51
  23. package/lib/infra/View/View.tsx +2 -1
  24. package/lib/template/AppShell/AppShell.tsx +10 -7
  25. package/lib/template/CaseSummary/CaseSummary.tsx +26 -38
  26. package/lib/template/CaseView/CaseView.tsx +20 -15
  27. package/lib/template/DefaultPage/DefaultPage.tsx +21 -1
  28. package/lib/template/ListView/ListView.tsx +152 -157
  29. package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +143 -1
  30. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +9 -1
  31. package/lib/template/WssNavBar/WssNavBar.tsx +3 -3
  32. package/lib/template/utils.tsx +58 -0
  33. package/lib/widget/Attachment/Attachment.tsx +284 -210
  34. package/lib/widget/Attachment/Attachment.types.ts +96 -0
  35. package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
  36. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +25 -16
  37. package/lib/widget/ToDo/ToDo.tsx +2 -6
  38. package/package.json +1 -1
  39. package/lib/helpers/attachmentHelpers.ts +0 -97
@@ -27,51 +27,27 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
27
27
  currentStep = arNavigationSteps[lastActiveStepIndex >= 0 ? lastActiveStepIndex : 0];
28
28
  }
29
29
 
30
- // const svgCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
31
- // const svgNotCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
32
-
33
- function _getVIconClass(status): string {
34
- if (status === 'current') {
35
- return 'psdk-vertical-step-icon-selected';
36
- }
37
-
38
- return 'psdk-vertical-step-icon';
39
- }
40
-
41
- function _getVLabelClass(status): string {
42
- if (status === 'current') {
43
- return 'psdk-vertical-step-label-selected';
44
- }
45
-
46
- return 'psdk-vertical-step-label';
47
- }
48
-
49
30
  function _getVBodyClass(index: number): string {
50
- if (index < arNavigationSteps.length - 1) {
51
- return 'psdk-vertical-step-body psdk-vertical-step-line';
52
- }
31
+ const baseClass = 'psdk-vertical-step-body';
32
+ const isNotLastStep = index < arNavigationSteps.length - 1;
53
33
 
54
- return 'psdk-vertical-step-body';
34
+ return isNotLastStep ? `${baseClass} psdk-vertical-step-line` : baseClass;
55
35
  }
56
36
 
57
- function _getHIconClass(step): string {
58
- if (step.ID === currentStep?.ID) {
59
- return 'psdk-horizontal-step-icon-selected';
60
- }
61
-
62
- return 'psdk-horizontal-step-icon';
63
- }
37
+ function _getAutoFlexClass(currentStep): string {
38
+ const currentStepIndex = arNavigationSteps.findIndex(step => step.ID === currentStep?.ID);
39
+ const totalSteps = arNavigationSteps.length;
40
+ const lastStep = arNavigationSteps[totalSteps - 1];
64
41
 
65
- function _getHLabelClass(step): string {
66
- if (step.ID === currentStep?.ID) {
67
- return 'psdk-horizontal-step-label-selected';
68
- }
42
+ // Apply flex-auto class if current step is active OR if current step is second-to-last and the last step is active
43
+ const isCurrentStepActive = currentStep.visited_status === 'current';
44
+ const isSecondToLastWithActiveLastStep = currentStepIndex === totalSteps - 2 && lastStep?.visited_status === 'current';
69
45
 
70
- return 'psdk-horizontal-step-label';
46
+ return isCurrentStepActive || isSecondToLastWithActiveLastStep ? 'flex-auto' : '';
71
47
  }
72
48
 
73
- function _showHLine(index: number): boolean {
74
- return index < arNavigationSteps.length - 1;
49
+ function isLastStep(index: number): boolean {
50
+ return index === arNavigationSteps.length - 1;
75
51
  }
76
52
 
77
53
  function buttonPress(sAction: string, sButtonType: string) {
@@ -86,13 +62,13 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
86
62
  return (
87
63
  <React.Fragment key={mainStep.actionID}>
88
64
  <div className='psdk-vertical-step'>
89
- <div className='psdk-vertical-step-header'>
90
- <div className={_getVIconClass(mainStep.visited_status)}>
65
+ <div className={`psdk-vertical-step-header ${mainStep.visited_status}`}>
66
+ <div className={`psdk-vertical-step-icon`}>
91
67
  <div className='psdk-vertical-step-icon-content'>
92
68
  <span>{index + 1}</span>
93
69
  </div>
94
70
  </div>
95
- <div className={_getVLabelClass(mainStep.visited_status)}>{mainStep.name}</div>
71
+ <div className='psdk-vertical-step-label'>{mainStep.visited_status === 'current' && mainStep.name}</div>
96
72
  </div>
97
73
  <div className={_getVBodyClass(index)}>
98
74
  {mainStep?.steps && (
@@ -122,9 +98,11 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
122
98
  </ul>
123
99
  )}
124
100
  {!mainStep?.steps && mainStep.visited_status === 'current' && (
125
- <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
126
- {children}
127
- </AssignmentCard>
101
+ <div style={{ paddingLeft: 20 }}>
102
+ <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
103
+ {children}
104
+ </AssignmentCard>
105
+ </div>
128
106
  )}
129
107
  </div>
130
108
  </div>
@@ -138,19 +116,15 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
138
116
  {arNavigationSteps.map((mainStep, index) => {
139
117
  return (
140
118
  <React.Fragment key={mainStep.actionID}>
141
- <div className='psdk-horizontal-step-header'>
142
- <div className={_getHIconClass(mainStep)}>
119
+ <div className={`psdk-horizontal-step-header ${mainStep.visited_status}`}>
120
+ <div className='psdk-horizontal-step-icon'>
143
121
  <div className='psdk-horizontal-step-icon-content'>
144
122
  <span>{index + 1}</span>
145
123
  </div>
146
124
  </div>
147
- <div className={_getHLabelClass(mainStep)}>
148
- <div className='psdk-horizontal-step-text-label' id='selected-label'>
149
- {mainStep.name}
150
- </div>
151
- </div>
125
+ <div className='psdk-horizontal-step-label'>{mainStep.visited_status === 'current' && mainStep.name}</div>
152
126
  </div>
153
- {_showHLine(index) && <div className='psdk-horizontal-step-line' />}
127
+ {!isLastStep(index) && <div className={`psdk-horizontal-step-line ${_getAutoFlexClass(mainStep)}`} />}
154
128
  </React.Fragment>
155
129
  );
156
130
  })}
@@ -38,7 +38,8 @@ const NO_HEADER_TEMPLATES = [
38
38
  'WideNarrowDetails',
39
39
  'Confirmation',
40
40
  'DynamicTabs',
41
- 'DetailsSubTabs'
41
+ 'DetailsSubTabs',
42
+ 'ListView'
42
43
  ];
43
44
 
44
45
  export default function View(props: PropsWithChildren<ViewProps>) {
@@ -81,7 +81,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
81
81
  const classes = useStyles();
82
82
  const actionsAPI = pConn.getActionsApi();
83
83
  const localeReference = pConn.getValue('.pyLocaleReference', ''); // 2nd arg empty string until typedef marked correctly
84
- const [imageBlobUrl, setImageBlobUrl] = useState<string | null>(null);
84
+ const [imageBlobUrl, setImageBlobUrl] = useState<string | Blob | null>(null);
85
85
  // useState for appName and mapChildren - note these are ONLY updated once (on component mount!)
86
86
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
87
87
  const [appName, setAppName] = useState('');
@@ -112,6 +112,11 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
112
112
  });
113
113
 
114
114
  setMapChildren(tempMap);
115
+
116
+ /* TODO: We're setting the `pyPortalTemplate` for now, this would be handled by the CoreJS in the future releases */
117
+ if (portalTemplate === 'wss') {
118
+ PCore.getEnvironmentInfo().setEnvironmentInfo({ ...PCore.getEnvironmentInfo().environmentInfoObject, pyPortalTemplate: 'wss' } as any);
119
+ }
115
120
  }, []);
116
121
 
117
122
  useEffect(() => {
@@ -133,8 +138,8 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
133
138
  }
134
139
  }, []);
135
140
 
136
- const [iconURL, setIconURL] = useState('');
137
- const [fullIconURL, setFullIconURL] = useState('');
141
+ const [iconURL, setIconURL] = useState<string | Blob>('');
142
+ const [fullIconURL, setFullIconURL] = useState<string | Blob>('');
138
143
  useEffect(() => {
139
144
  // using the default icon then fetch it from the static folder (not auth involved)
140
145
  if (
@@ -150,8 +155,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
150
155
  // not using default icon to fetch it using the way which uses authentication
151
156
  else {
152
157
  PCore.getAssetLoader()
153
- .getSvcImage(portalLogo)
154
- .then(blob => window.URL.createObjectURL(blob))
158
+ .getSvcImageUrl(portalLogo)
155
159
  .then(data => {
156
160
  setIconURL(data);
157
161
  setFullIconURL(data);
@@ -165,8 +169,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
165
169
  useEffect(() => {
166
170
  if (imageKey && portalTemplate === 'wss') {
167
171
  PCore.getAssetLoader()
168
- .getSvcImage(imageKey)
169
- .then(blob => window.URL.createObjectURL(blob))
172
+ .getSvcImageUrl(imageKey)
170
173
  .then(imagePath => setImageBlobUrl(imagePath));
171
174
  }
172
175
  }, []);
@@ -3,6 +3,8 @@ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpe
3
3
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
4
4
 
5
5
  interface CaseSummaryProps extends PConnProps {
6
+ arPrimaryFields: any[];
7
+ arSecondaryFields: any[];
6
8
  // If any, enter additional props that only exist on this component
7
9
  }
8
10
 
@@ -11,24 +13,15 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
11
13
  const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');
12
14
 
13
15
  const { getPConnect, children } = props;
16
+ let { arPrimaryFields = [], arSecondaryFields = [] } = props;
14
17
 
15
- const thePConn = getPConnect();
16
- const theConfigProps: any = thePConn.getConfigProps();
17
- // const { status, showStatus } = theConfigProps;
18
- const status = theConfigProps.status;
19
- const showStatus = theConfigProps.showStatus;
18
+ const thePConn = getPConnect && getPConnect();
19
+ const theConfigProps: any = thePConn?.getConfigProps();
20
+
21
+ const status = theConfigProps?.status;
22
+ const showStatus = theConfigProps?.showStatus;
20
23
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
21
24
  const localeCategory = 'ModalContainer';
22
- // from Constellation DX Components
23
- // get the primary and secondary fields with the raw data (which has the non-resolved property values)
24
- // const regionsRaw = getPConnect().getRawMetadata().children;
25
- // const primaryFieldsRaw = regionsRaw[0].children;
26
- // const secondaryFieldsRaw = regionsRaw[1].children;
27
-
28
- // From other SDKs
29
- // may want to move these into useEffect/useState combo
30
- let arPrimaryFields: any[] = [];
31
- let arSecondaryFields: any[] = [];
32
25
 
33
26
  function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
34
27
  const { config, children } = pConnectMeta;
@@ -61,32 +54,27 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
61
54
  return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;
62
55
  }
63
56
 
64
- for (const child of children as ReactElement[]) {
65
- const childPConn = (child as ReactElement).props.getPConnect();
66
- const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());
67
- if (childPConnData.name.toLowerCase() === 'primary fields') {
68
- arPrimaryFields = childPConnData.children;
69
- arPrimaryFields.forEach(field => {
70
- if (field.config?.value && typeof field.config?.value === 'string') {
71
- field.config.value = localizedVal(field.config.value, localeCategory);
72
- }
73
- });
74
- } else if (childPConnData.name.toLowerCase() === 'secondary fields') {
75
- const secondarySummaryFields = prepareCaseSummaryData(childPConn);
76
- arSecondaryFields = childPConnData.children;
77
- arSecondaryFields.forEach((field, index) => {
78
- field.config.displayLabel = secondarySummaryFields[index]?.value?.props?.label;
79
- });
57
+ if (arPrimaryFields.length === 0 && arSecondaryFields.length === 0) {
58
+ for (const child of children as ReactElement[]) {
59
+ const childPConn = (child as ReactElement).props.getPConnect();
60
+ const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());
61
+ if (childPConnData.name.toLowerCase() === 'primary fields') {
62
+ arPrimaryFields = childPConnData.children;
63
+ arPrimaryFields.forEach(field => {
64
+ if (field.config?.value && typeof field.config?.value === 'string') {
65
+ field.config.value = localizedVal(field.config.value, localeCategory);
66
+ }
67
+ });
68
+ } else if (childPConnData.name.toLowerCase() === 'secondary fields') {
69
+ const secondarySummaryFields = prepareCaseSummaryData(childPConn);
70
+ arSecondaryFields = childPConnData.children;
71
+ arSecondaryFields.forEach((field, index) => {
72
+ field.config.displayLabel = secondarySummaryFields[index]?.value?.props?.label;
73
+ });
74
+ }
80
75
  }
81
76
  }
82
77
 
83
- // At this point, should hand off to another component for layout and rendering
84
- // of primary and secondary fields in the Case Summary
85
-
86
- // debugging/investigation help
87
- // console.log(`CaseSummary: arPrimaryFields: ${JSON.stringify(arPrimaryFields)}`);
88
- // console.log(`CaseSummary: arSecondaryFields: ${JSON.stringify(arSecondaryFields)}`);
89
-
90
78
  return (
91
79
  <div id='CaseSummary'>
92
80
  <CaseSummaryFields status={status} showStatus={showStatus} theFields={arPrimaryFields} />
@@ -9,6 +9,7 @@ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
9
9
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
10
10
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
11
11
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
12
+ import { prepareCaseSummaryData } from '@pega/react-sdk-components/lib/components/template/utils';
12
13
 
13
14
  interface CaseViewProps extends PConnProps {
14
15
  // If any, enter additional props that only exist on this component
@@ -41,9 +42,6 @@ const useStyles = makeStyles(theme => ({
41
42
  width: theme.spacing(8),
42
43
  height: theme.spacing(8),
43
44
  padding: theme.spacing(1)
44
- },
45
- caseViewIconImage: {
46
- filter: 'var(--svg-color)'
47
45
  }
48
46
  }));
49
47
 
@@ -52,6 +50,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
52
50
  const CaseViewActionsMenu = getComponentFromMap('CaseViewActionsMenu');
53
51
  const VerticalTabs = getComponentFromMap('VerticalTabs');
54
52
  const DeferLoad = getComponentFromMap('DeferLoad');
53
+ const CaseSummary = getComponentFromMap('CaseSummary');
55
54
 
56
55
  const {
57
56
  getPConnect,
@@ -59,12 +58,9 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
59
58
  header,
60
59
  subheader,
61
60
  children = [],
62
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
63
- showIconInHeader = true,
64
- caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '' }
61
+ caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '', caseTypeIcon }
65
62
  } = props;
66
63
  const { lastUpdateCaseTime = getPConnect().getValue('caseInfo.lastUpdateTime') } = props;
67
-
68
64
  const currentCaseID = props.caseInfo.ID;
69
65
  let isComponentMounted = true;
70
66
  const { displayOnlyFA } = useContext<any>(StoreContext);
@@ -84,9 +80,8 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
84
80
  */
85
81
  function getChildRegionByName(inName: string): any {
86
82
  for (const child of children as ReactElement[]) {
87
- const theMetadataType: string = (child as ReactElement).props.getPConnect().getRawMetadata().type.toLowerCase();
88
- const theMetadataName: string = (child as ReactElement).props.getPConnect().getRawMetadata().name.toLowerCase();
89
-
83
+ const theMetadataType: string = (child as ReactElement).props.getPConnect().getRawMetadata().type?.toLowerCase();
84
+ const theMetadataName: string = (child as ReactElement).props.getPConnect().getRawMetadata().name?.toLowerCase();
90
85
  if (theMetadataType === 'region' && theMetadataName === inName) {
91
86
  return child;
92
87
  }
@@ -95,13 +90,23 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
95
90
  return null;
96
91
  }
97
92
 
98
- const theSummaryRegion = getChildRegionByName('summary');
93
+ const theSummaryRegion = children && children[0];
94
+
95
+ const data = prepareCaseSummaryData(theSummaryRegion);
96
+ const primarySummaryFields = data.primarySummaryFields;
97
+ const secondarySummaryFields = data.secondarySummaryFields;
98
+
99
99
  const theStagesRegion = getChildRegionByName('stages');
100
100
  const theTodoRegion = getChildRegionByName('todo');
101
101
  const theUtilitiesRegion = getChildRegionByName('utilities');
102
102
  const theTabsRegion = getChildRegionByName('tabs');
103
103
 
104
- const svgCase = Utils.getImageSrc(icon, Utils.getSDKStaticConentUrl());
104
+ let iconForCaseType = caseTypeIcon ? caseTypeIcon.replace('pi pi-', '') : icon;
105
+
106
+ if (!iconForCaseType || iconForCaseType.includes('.')) {
107
+ iconForCaseType = 'polaris-solid';
108
+ }
109
+ const caseSvgIconUrl = Utils.getImageSrc(iconForCaseType, Utils.getSDKStaticConentUrl());
105
110
 
106
111
  const [activeVertTab, setActiveVertTab] = useState(0);
107
112
 
@@ -109,7 +114,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
109
114
  // const tmpLoadData2 = { config: { label: "Case History", name: "CaseHistory" }, type: "DeferLoad" };
110
115
 
111
116
  // Extract the tabs we need to display from theTabsRegion (one tab per entry in theTabsRegionChildren)
112
- const theTabsRegionChildren = theTabsRegion.props.getPConnect().getChildren();
117
+ const theTabsRegionChildren = theTabsRegion?.props.getPConnect().getChildren();
113
118
 
114
119
  // vertTabInfo is sent to VerticalTabs component
115
120
  const vertTabInfo: object[] = [];
@@ -226,13 +231,13 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
226
231
  }
227
232
  avatar={
228
233
  <Avatar className={classes.caseViewIconBox} variant='square'>
229
- <img src={svgCase} className={classes.caseViewIconImage} />
234
+ <img src={caseSvgIconUrl} />
230
235
  </Avatar>
231
236
  }
232
237
  />
233
238
  {getActionButtonsHtml()}
234
239
  <Divider />
235
- {theSummaryRegion}
240
+ <CaseSummary arPrimaryFields={primarySummaryFields} arSecondaryFields={secondarySummaryFields}></CaseSummary>
236
241
  <Divider />
237
242
  {vertTabInfo.length > 1 && <VerticalTabs tabconfig={vertTabInfo} />}
238
243
  </Card>
@@ -1,6 +1,7 @@
1
1
  import { useMemo, Children } from 'react';
2
2
  import type { ReactNode } from 'react';
3
- import Banner from '@pega/react-sdk-components/lib/components/designSystemExtension/Banner';
3
+ import { Grid2 } from '@mui/material';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
5
 
5
6
  export interface CommonPageProps {
6
7
  /** Page title */
@@ -53,6 +54,13 @@ interface DefaultPageProps extends CommonPageProps {
53
54
  // layoutModel?: GridLayoutModel | undefined;
54
55
  }
55
56
 
57
+ const COLUMNS_WIDTHS = {
58
+ 'one-column': [12],
59
+ 'two-column': [6, 6],
60
+ 'narrow-wide': [4, 8],
61
+ 'wide-narrow': [8, 4]
62
+ };
63
+
56
64
  export default function DefaultPage({
57
65
  layout = 'one-column',
58
66
  children,
@@ -64,6 +72,8 @@ export default function DefaultPage({
64
72
  backgroundColor = '',
65
73
  tintImage
66
74
  }: DefaultPageProps) {
75
+ const Banner = getComponentFromMap('Banner');
76
+
67
77
  const childArray = useMemo(() => {
68
78
  return Children.toArray(children);
69
79
  }, [children]);
@@ -85,4 +95,14 @@ export default function DefaultPage({
85
95
  />
86
96
  );
87
97
  }
98
+
99
+ return (
100
+ <Grid2 container spacing={1}>
101
+ {childArray.map((child, index) => (
102
+ <Grid2 key={index} size={COLUMNS_WIDTHS[layout][index]}>
103
+ {child}
104
+ </Grid2>
105
+ ))}
106
+ </Grid2>
107
+ );
88
108
  }