Skip to content

Commit 1aef77f

Browse files
committed
add support for gridTemplateColumns to FormFullWidth component
1 parent e924da5 commit 1aef77f

File tree

10 files changed

+4255
-3385
lines changed

10 files changed

+4255
-3385
lines changed

package-lock.json

Lines changed: 4219 additions & 3359 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
"dependencies": {
4141
"@arcgis/core": "^4.32.9",
4242
"@dagrejs/dagre": "^1.1.4",
43-
"@fullcalendar/core": "^6.1.15",
44-
"@fullcalendar/daygrid": "^6.1.15",
45-
"@fullcalendar/react": "^6.1.15",
46-
"@fullcalendar/timegrid": "^6.1.15",
43+
"@fullcalendar/core": "^6.1.20",
44+
"@fullcalendar/daygrid": "^6.1.20",
45+
"@fullcalendar/react": "^6.1.20",
46+
"@fullcalendar/timegrid": "^6.1.20",
4747
"@hello-pangea/dnd": "^16.6.0",
48-
"@pega/cosmos-react-core": "^6.0.10",
49-
"@pega/cosmos-react-rte": "^6.0.10",
50-
"@pega/cosmos-react-social": "^6.0.10",
51-
"@pega/cosmos-react-work": "^6.0.10",
48+
"@pega/cosmos-react-core": "^6.0.20",
49+
"@pega/cosmos-react-rte": "^6.0.20",
50+
"@pega/cosmos-react-social": "^6.0.20",
51+
"@pega/cosmos-react-work": "^6.0.20",
5252
"gantt-task-react": "^0.3.9",
5353
"imask": "^7.6.1",
5454
"jsbarcode": "^3.11.6",
@@ -61,9 +61,9 @@
6161
"styled-components": "5.3.6"
6262
},
6363
"devDependencies": {
64-
"@babel/preset-env": "^7.26.9",
65-
"@babel/preset-react": "^7.26.3",
66-
"@babel/preset-typescript": "^7.27.0",
64+
"@babel/preset-env": "^7.29.0",
65+
"@babel/preset-react": "^7.28.5",
66+
"@babel/preset-typescript": "^7.28.5",
6767
"@pega/configs": "^0.16.3",
6868
"@pega/custom-dx-components": "~24.1",
6969
"@pega/eslint-config": "^0.16.3",

src/components/Pega_Extensions_DisplayAttachments/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const downloadFile = (
7777
let arrayBuf: Uint8Array | BlobPart;
7878
if (isContentBinary(content.headers)) arrayBuf = content.data;
7979
else arrayBuf = base64ToArrayBuffer(content.data);
80-
const blob = new Blob([arrayBuf], { type: attachment.mimeType });
80+
const blob = new Blob([arrayBuf as BlobPart], { type: attachment.mimeType });
8181
const fileURL = URL.createObjectURL(blob);
8282
if (setImages) {
8383
const name = attachment.extension
@@ -141,7 +141,7 @@ export const addAttachment = (props: AddAttachmentProps) => {
141141

142142
const kind = getKindFromMimeType(attachment.mimeType ?? '');
143143
const visual = <FileVisual type={kind} />;
144-
const bCanUseLightBox = useLightBox && kind === 'image';
144+
const bCanUseLightBox = useLightBox && canPreviewFile(kind);
145145
listOfAttachments.push({
146146
id: attachment.ID,
147147
visual,

src/components/Pega_Extensions_FormFullWidth/Docs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import * as DemoStories from './demo.stories';
77

88
This component allows to insert subviews in a 1 to 3 column layout and will utilize the full width of the assignment.
99

10+
gridTemplateColumns can be set to override the default grid-template-columns CSS attribute on the layout - For example to do a 66%, 33% 2 column, you can enter "2fr 1fr"
11+
1012
<Primary />
1113

1214
## Props

src/components/Pega_Extensions_FormFullWidth/config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
}
3737
]
3838
},
39+
{
40+
"name": "gridTemplateColumns",
41+
"label": "gridTemplateColumns",
42+
"format": "TEXT"
43+
},
3944
{
4045
"name": "A",
4146
"label": "Region A",

src/components/Pega_Extensions_FormFullWidth/demo.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ const regionChildrenResolved = [
9494
];
9595

9696
const createComponent = (config: any) => {
97-
// eslint-disable-next-line default-case
9897
switch (config.config.value) {
9998
case '@P .pySLADeadline':
10099
return renderField(regionChildrenResolved[0]);
@@ -142,6 +141,7 @@ export const Default: Story = {
142141
},
143142
args: {
144143
heading: 'Heading',
145-
NumCols: '1'
144+
NumCols: '1',
145+
gridTemplateColumns: ''
146146
}
147147
};

src/components/Pega_Extensions_FormFullWidth/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ import '../create-nonce';
44
type FormFullWidthProps = {
55
heading: string;
66
NumCols: string;
7+
gridTemplateColumns?: string;
78
children: any;
89
};
910

1011
export const PegaExtensionsFormFullWidth = (props: FormFullWidthProps) => {
1112
const { heading, NumCols, children } = props;
13+
let { gridTemplateColumns } = props;
1214

1315
const nCols = parseInt(NumCols, 10);
14-
16+
if (!gridTemplateColumns) {
17+
gridTemplateColumns = `repeat(${nCols}, minmax(0, 1fr))`;
18+
}
1519
return (
1620
<FieldGroup name={heading}>
1721
<Grid
1822
container={{
19-
cols: `repeat(${nCols}, minmax(0, 1fr))`,
23+
cols: gridTemplateColumns,
2024
gap: 2
2125
}}
2226
>

src/components/Pega_Extensions_GanttChart/Docs.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ The component support the following features:
1919
- Click on any item to see a DetailsCard view. This view can be configured via a combination of props `detailsDataPage` and `detailsViewName`.
2020
- Ability to edit an item from timeline, just click the item and open the details card popup. It has a Edit button in header (pencil icon).
2121
- Double click on any item enables the drag mode editing. Items can be dragged with multiple drag behaviors, each for distinct purpose
22-
2322
- Drag complete item. This changes the Start and End date for the items without changing the relative duration. All three types of items implements this behavior
2423
- Two Drag handles are available on item edges, each for modifying the Start or End date respectively. This changes the duration of the task. Only Tasks has this behavior. Project and Milestones doesn't support this.
2524
- An arrow like handle appears on the item to drag and update the completion progress of the item. Only Task item type supports this.

src/components/Pega_Extensions_Map/styles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4844,8 +4844,8 @@ export const StyledPegaExtensionsMap = styled.div(({ height }: { height: string
48444844
}
48454845
48464846
.esri-building-disciplines-tree-node__collapse-toggle:not(
4847-
.esri-building-disciplines-tree-node__collapse-toggle--collapsed
4848-
) {
4847+
.esri-building-disciplines-tree-node__collapse-toggle--collapsed
4848+
) {
48494849
transform: rotate(90deg);
48504850
}
48514851
@@ -7845,8 +7845,8 @@ export const StyledPegaExtensionsMap = styled.div(({ height }: { height: string
78457845
}
78467846
78477847
.esri-elevation-profile-legend-item__label:not(
7848-
.esri-elevation-profile-legend-item__label--disabled
7849-
) {
7848+
.esri-elevation-profile-legend-item__label--disabled
7849+
) {
78507850
cursor: pointer;
78517851
}
78527852

tasks.config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"components-directory-path": "src/components",
33
"server-config": {
4-
"rulesetName": "",
5-
"rulesetVersion": "",
4+
"rulesetName": "ConstellationUIGallery",
5+
"rulesetVersion": "01-01-01",
66
"sourceOfComponents": "Server",
77
"devBuild": false,
88
"serverType": "infinity",
@@ -28,12 +28,12 @@
2828
"questions_askedOnce": "server,authService"
2929
},
3030
"component": {
31-
"library": "Extensions",
31+
"library": "ConstellationUIGallery",
3232
"type": "",
3333
"version": "1.0.0",
3434
"subtype": "",
3535
"description": "",
3636
"icon": ""
3737
},
3838
"usePromotedWebPack": false
39-
}
39+
}

0 commit comments

Comments
 (0)