Skip to content

Commit a9117e7

Browse files
authored
Merge pull request #175 from pegasystems/bugfix/autosave
misc enhancements
2 parents 6aabf97 + 3a741d5 commit a9117e7

File tree

8 files changed

+20766
-14834
lines changed

8 files changed

+20766
-14834
lines changed

package-lock.json

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

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,26 @@
5858
"validateAll": "custom-dx-components buildAllComponents"
5959
},
6060
"dependencies": {
61-
"@arcgis/core": "^4.32.10",
62-
"@dagrejs/dagre": "^1.1.4",
61+
"@arcgis/core": "^4.33.2",
62+
"@dagrejs/dagre": "^1.1.5",
6363
"@fullcalendar/core": "^6.1.17",
6464
"@fullcalendar/daygrid": "^6.1.17",
6565
"@fullcalendar/react": "^6.1.17",
6666
"@fullcalendar/timegrid": "^6.1.17",
6767
"@hello-pangea/dnd": "^16.6.0",
68-
"@pega/cosmos-react-core": "^7.8.0",
69-
"@pega/cosmos-react-rte": "^7.8.0",
70-
"@pega/cosmos-react-social": "^7.8.0",
71-
"@pega/cosmos-react-work": "^7.8.0",
68+
"@pega/cosmos-react-core": "^7.10.0",
69+
"@pega/cosmos-react-rte": "^7.10.0",
70+
"@pega/cosmos-react-social": "^7.10.0",
71+
"@pega/cosmos-react-work": "^7.10.0",
7272
"gantt-task-react": "^0.3.9",
7373
"imask": "^7.6.1",
74-
"jsbarcode": "^3.11.6",
74+
"jsbarcode": "^3.12.1",
7575
"polished": "^4.3.1",
7676
"react": "^17.0.2",
7777
"react-dom": "^17.0.2",
7878
"react-image-magnifiers": "^1.4.0",
7979
"reactflow": "^11.11.4",
80-
"signature_pad": "^5.0.9",
80+
"signature_pad": "^5.0.10",
8181
"styled-components": "^5.3.11"
8282
},
8383
"devDependencies": {
@@ -104,24 +104,24 @@
104104
"@types/react-image-magnifiers": "^1.3.5",
105105
"@types/styled-components": "^5.1.34",
106106
"axe-playwright": "^2.1.0",
107-
"cspell": "^9.0.2",
107+
"cspell": "^9.1.2",
108108
"eslint": "^8.57.0",
109-
"eslint-plugin-import": "^2.31.0",
110-
"eslint-plugin-jest": "^28.13.0",
109+
"eslint-plugin-import": "^2.32.0",
110+
"eslint-plugin-jest": "^29.0.1",
111111
"eslint-plugin-jsx-a11y": "^6.10.2",
112-
"eslint-plugin-mdx": "^3.4.2",
113-
"eslint-plugin-prettier": "^5.4.1",
112+
"eslint-plugin-mdx": "^3.5.0",
113+
"eslint-plugin-prettier": "^5.5.1",
114114
"eslint-plugin-react": "^7.37.5",
115115
"eslint-plugin-react-hooks": "^5.2.0",
116-
"jest": "^29.7.0",
116+
"jest": "^30.0.3",
117117
"jest-canvas-mock": "^2.5.2",
118-
"jest-environment-jsdom": "^30.0.0",
118+
"jest-environment-jsdom": "^30.0.2",
119119
"npm-run-all": "^4.1.5",
120-
"prettier": "^3.5.3",
121-
"sort-package-json": "^3.2.1",
120+
"prettier": "^3.6.1",
121+
"sort-package-json": "^3.3.1",
122122
"storybook": "^7.6.19",
123-
"stylelint": "16.20.0",
124-
"ts-jest": "^29.3.4",
123+
"stylelint": "16.21.0",
124+
"ts-jest": "^29.4.0",
125125
"typescript": "^5.8.3"
126126
},
127127
"organization": "Pega"

src/components/Pega_Extensions_ActionableButton/demo.stories.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ const setPCore = () => {
2020
getLazyComponent: (f: string) => f
2121
};
2222
},
23+
getConstants: () => {
24+
return {
25+
CASE_INFO: {
26+
AVAILABLEACTIONS: ''
27+
}
28+
};
29+
},
2330
getEnvironmentInfo: () => {
2431
return {
2532
getTimeZone: () => 'local'
@@ -42,12 +49,15 @@ export const Default: Story = {
4249
value: 'C-123'
4350
};
4451
},
52+
getValue: () => [{ ID: 'pyEditDetails', name: 'Edit Details' }],
4553
getActionsApi: () => {
4654
return {
4755
openLocalAction: {
4856
bind: () => {
4957
return (name: string, options: any) => {
50-
alert(`Launch local action ${name} for ${options.caseID}`);
58+
alert(
59+
`Launch local action ID '${name}' with title '${options.name}' for ${options.caseID}`
60+
);
5161
};
5262
}
5363
}

src/components/Pega_Extensions_ActionableButton/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@ type ActionableButtonProps = {
1111
export const PegaExtensionsActionableButton = (props: ActionableButtonProps) => {
1212
const { getPConnect, label, value, localAction } = props;
1313
if (value && localAction) {
14+
const availableActions =
15+
getPConnect().getValue((window as any).PCore.getConstants().CASE_INFO.AVAILABLEACTIONS) || [];
16+
const targetAction = availableActions.find(
17+
(action: { ID: string }) => action.ID === localAction
18+
);
19+
const actionName = targetAction?.name || label;
1420
const LaunchLocalAction = () => {
1521
const actionsAPI = getPConnect().getActionsApi();
1622
const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
1723
openLocalAction(localAction, {
1824
caseID: value,
1925
containerName: 'modal',
20-
type: 'express'
26+
type: 'express',
27+
name: actionName
2128
});
2229
};
2330
return (

src/components/Pega_Extensions_AutoSave/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ export const PegaExtensionsAutoSave = (props: AutoSaveProps) => {
3232
actionID
3333
},
3434
body: {
35-
content: {
36-
/* Property or field name */
37-
pyDescription: pConn.getValue(propertyName)
38-
}
35+
content: {} as Record<string, any>
3936
},
4037
headers: {
4138
/* etag as part of header */
4239
'if-match': etag
4340
}
4441
};
42+
const lastSeparator = propertyName.lastIndexOf('.');
43+
payload.body.content[propertyName.substring(lastSeparator + 1)] =
44+
pConn.getValue(propertyName);
4545

4646
/* Triggers save dx api */
4747
(window as any).PCore.getRestClient()

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/config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@
116116
"name": "A",
117117
"label": "Region A",
118118
"format": "CONTENTPICKER",
119-
"addTypeList": [
120-
"Fields"
121-
]
119+
"addTypeList": ["Fields"]
122120
}
123121
],
124122
"defaultConfig": {

src/components/Pega_Extensions_Map/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
} from './utils';
2626
import '../create-nonce';
2727

28-
const ARCGIS_VERSION = '4.32';
28+
const ARCGIS_VERSION = '4.33';
2929
type MapProps = {
3030
getPConnect?: any;
3131
heading?: string;

0 commit comments

Comments
 (0)