@pega/react-sdk-overrides 24.2.11 → 25.1.10
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.
- package/lib/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +10 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +7 -8
- package/lib/designSystemExtension/Operator/Operator.tsx +21 -19
- package/lib/designSystemExtension/Pulse/Pulse.tsx +1 -1
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
- package/lib/field/AutoComplete/AutoComplete.tsx +1 -1
- package/lib/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +6 -6
- package/lib/field/Checkbox/Checkbox.tsx +97 -4
- package/lib/field/Currency/Currency.tsx +3 -3
- package/lib/field/Currency/currency-utils.ts +1 -2
- package/lib/field/Date/Date.tsx +3 -7
- package/lib/field/DateTime/DateTime.tsx +3 -8
- package/lib/field/Decimal/Decimal.tsx +3 -5
- package/lib/field/Dropdown/Dropdown.tsx +5 -7
- package/lib/field/Email/Email.tsx +11 -13
- package/lib/field/Group/Group.tsx +10 -8
- package/lib/field/Integer/Integer.tsx +5 -7
- package/lib/field/Location/Location.css +4 -0
- package/lib/field/Location/Location.tsx +258 -0
- package/lib/field/Location/config-ext.json +8 -0
- package/lib/field/Location/index.tsx +1 -0
- package/lib/field/Multiselect/utils.ts +1 -1
- package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
- package/lib/field/ObjectReference/index.tsx +1 -0
- package/lib/field/ObjectReference/utils.ts +111 -0
- package/lib/field/Percentage/Percentage.tsx +3 -7
- package/lib/field/Phone/Phone.tsx +7 -5
- package/lib/field/RadioButtons/RadioButtons.tsx +47 -2
- package/lib/field/RichText/RichText.css +79 -0
- package/lib/field/RichText/RichText.tsx +3 -1
- package/lib/field/ScalarList/ScalarList.tsx +2 -3
- package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
- package/lib/field/SelectableCard/index.tsx +1 -0
- package/lib/field/SelectableCard/utils.tsx +223 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
- package/lib/field/SemanticLink/utils.ts +1 -1
- package/lib/field/TextArea/TextArea.tsx +5 -7
- package/lib/field/TextContent/TextContent.tsx +1 -2
- package/lib/field/TextInput/TextInput.tsx +5 -7
- package/lib/field/Time/Time.tsx +3 -7
- package/lib/field/URL/URL.tsx +5 -7
- package/lib/field/UserReference/UserReference.tsx +2 -3
- package/lib/helpers/attachmentShared.ts +6 -0
- package/lib/helpers/common-utils.ts +3 -4
- package/lib/helpers/data_page.ts +0 -1
- package/lib/helpers/field-group-utils.ts +1 -1
- package/lib/helpers/formatters/Currency.ts +9 -4
- package/lib/helpers/formatters/CurrencyMap.ts +0 -2
- package/lib/helpers/object-utils.ts +10 -0
- package/lib/helpers/simpleTableHelpers.ts +118 -6
- package/lib/helpers/utils.ts +8 -1
- package/lib/helpers/versionHelpers.ts +0 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
- package/lib/infra/Assignment/Assignment.tsx +37 -30
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +17 -96
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +1 -2
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +7 -6
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
- package/lib/infra/Containers/container-helpers.ts +47 -1
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +3 -6
- package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
- package/lib/infra/DeferLoad/DeferLoad.tsx +2 -4
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
- package/lib/infra/MultiStep/MultiStep.css +48 -70
- package/lib/infra/MultiStep/MultiStep.tsx +27 -53
- package/lib/infra/NavBar/NavBar.css +1 -1
- package/lib/infra/NavBar/NavBar.tsx +43 -32
- package/lib/infra/Reference/Reference.tsx +3 -4
- package/lib/infra/Region/Region.tsx +1 -1
- package/lib/infra/RootContainer/RootContainer.tsx +2 -3
- package/lib/infra/Stages/Stages.tsx +3 -4
- package/lib/infra/View/View.tsx +4 -3
- package/lib/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
- package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/lib/template/AdvancedSearch/config-ext.json +9 -0
- package/lib/template/AdvancedSearch/index.tsx +1 -0
- package/lib/template/AppShell/AppShell.css +1 -1
- package/lib/template/AppShell/AppShell.tsx +16 -17
- package/lib/template/BannerPage/BannerPage.tsx +2 -2
- package/lib/template/CaseSummary/CaseSummary.tsx +28 -41
- package/lib/template/CaseView/CaseView.tsx +28 -35
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/lib/template/Confirmation/Confirmation.tsx +2 -3
- package/lib/template/DataReference/DataReference.tsx +312 -106
- package/lib/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/lib/template/DataReference/SearchForm.tsx +149 -0
- package/lib/template/DataReference/utils.ts +90 -0
- package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
- package/lib/template/DefaultForm/utils/index.ts +1 -3
- package/lib/template/DefaultPage/DefaultPage.tsx +108 -0
- package/lib/template/DefaultPage/index.tsx +1 -0
- package/lib/template/Details/Details/Details.tsx +11 -11
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -1
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -3
- package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
- package/lib/template/ListPage/ListPage.tsx +1 -1
- package/lib/template/ListView/ListView.tsx +278 -198
- package/lib/template/ListView/hooks.ts +1 -5
- package/lib/template/ListView/utils.ts +38 -5
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -2
- package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +145 -0
- package/lib/template/SelfServiceCaseView/index.tsx +1 -0
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -3
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +36 -33
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +1 -1
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
- package/lib/template/SubTabs/SubTabs.tsx +2 -2
- package/lib/template/SubTabs/tabUtils.ts +118 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
- package/lib/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +6 -6
- package/lib/template/utils.tsx +58 -0
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
- package/lib/widget/Attachment/Attachment.css +6 -8
- package/lib/widget/Attachment/Attachment.tsx +303 -225
- package/lib/widget/Attachment/Attachment.types.ts +96 -0
- package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
- package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +29 -22
- package/lib/widget/Followers/Followers.tsx +2 -4
- package/lib/widget/QuickCreate/QuickCreate.tsx +1 -2
- package/lib/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/widget/SummaryItem/SummaryItem.tsx +2 -2
- package/lib/widget/SummaryList/SummaryList.tsx +1 -1
- package/lib/widget/ToDo/ToDo.css +1 -13
- package/lib/widget/ToDo/ToDo.tsx +37 -36
- package/package.json +1 -1
- package/lib/helpers/attachmentHelpers.ts +0 -76
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/* eslint-disable prefer-template */
|
|
2
1
|
/** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { Grid2, Link } from '@mui/material';
|
|
5
4
|
|
|
6
5
|
import DashboardFilter from './DashboardFilter';
|
|
7
6
|
|
|
@@ -77,7 +76,7 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
|
|
|
77
76
|
const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));
|
|
78
77
|
if (filterComponents && filterComponents.length > 0) {
|
|
79
78
|
filterComponents.push(
|
|
80
|
-
<
|
|
79
|
+
<Grid2 style={{ display: 'flex', alignItems: 'center' }}>
|
|
81
80
|
<Link
|
|
82
81
|
style={{ cursor: 'pointer' }}
|
|
83
82
|
onClick={() => {
|
|
@@ -87,7 +86,7 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
|
|
|
87
86
|
>
|
|
88
87
|
Clear All
|
|
89
88
|
</Link>
|
|
90
|
-
</
|
|
89
|
+
</Grid2>
|
|
91
90
|
);
|
|
92
91
|
}
|
|
93
92
|
return filterComponents;
|
|
@@ -4,7 +4,7 @@ import makeStyles from '@mui/styles/makeStyles';
|
|
|
4
4
|
|
|
5
5
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
6
6
|
|
|
7
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
8
|
|
|
9
9
|
interface DeferLoadProps extends PConnProps {
|
|
10
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -115,14 +115,13 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
115
115
|
.getActionsApi()
|
|
116
116
|
.showData(name, dataContext, dataContextParameters, {
|
|
117
117
|
skipSemanticUrl: true,
|
|
118
|
-
// @ts-
|
|
118
|
+
// @ts-expect-error
|
|
119
119
|
isDeferLoaded: true
|
|
120
120
|
})
|
|
121
121
|
.then(data => {
|
|
122
122
|
onResponse(data);
|
|
123
123
|
});
|
|
124
124
|
} else {
|
|
125
|
-
// eslint-disable-next-line no-console
|
|
126
125
|
console.error('Cannot load the defer loaded view without container information');
|
|
127
126
|
}
|
|
128
127
|
} else if (resourceType === PAGE) {
|
|
@@ -141,7 +140,6 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
141
140
|
onResponse(data.root);
|
|
142
141
|
})
|
|
143
142
|
.catch(error => {
|
|
144
|
-
// eslint-disable-next-line no-console
|
|
145
143
|
console.log(`deferload: ${error}`);
|
|
146
144
|
});
|
|
147
145
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
1
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
2
2
|
|
|
3
3
|
interface ErrorBoundaryProps extends PConnProps {
|
|
4
4
|
// If any, enter additional props that only exist on this component
|
|
@@ -23,7 +23,6 @@ export default function ErrorBoundary(props: ErrorBoundaryProps) {
|
|
|
23
23
|
const pConn = getPConnect();
|
|
24
24
|
|
|
25
25
|
if (!isInternalError) {
|
|
26
|
-
// eslint-disable-next-line no-console
|
|
27
26
|
console.error(`
|
|
28
27
|
${localizedVal('Unable to load the component', localeCategory)} ${pConn.getComponentName()}
|
|
29
28
|
${localizedVal('This might be due to the view metadata getting corrupted or the component file missing.', localeCategory)}
|
|
@@ -37,7 +36,6 @@ export default function ErrorBoundary(props: ErrorBoundaryProps) {
|
|
|
37
36
|
|
|
38
37
|
if (pConn.getContainerName() === WORK_AREA || pConn.isInsideList() === true || pConn.getContainerName() === 'modal') {
|
|
39
38
|
const { publish } = PCore.getPubSubUtils();
|
|
40
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
41
39
|
publish(ERROR_WHILE_RENDERING);
|
|
42
40
|
return null;
|
|
43
41
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.psdk-current-svg-icon {
|
|
19
19
|
width: 1rem;
|
|
20
|
-
filter: var(--
|
|
20
|
+
filter: var(--svg-color);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.psdk-not-current-svg-icon {
|
|
@@ -40,7 +40,7 @@ mat-horizontal-stepper {
|
|
|
40
40
|
|
|
41
41
|
.psdk-sub-step-not-current {
|
|
42
42
|
padding-left: 0.625rem;
|
|
43
|
-
color:
|
|
43
|
+
color: var(--step-label-color);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.psdk-flow-container-top {
|
|
@@ -79,36 +79,37 @@ mat-horizontal-stepper {
|
|
|
79
79
|
|
|
80
80
|
.psdk-vertical-step-icon {
|
|
81
81
|
margin-right: 12px;
|
|
82
|
-
background-color: var(--app-neutral-color);
|
|
83
|
-
color: #fff;
|
|
84
82
|
border-radius: 50%;
|
|
85
83
|
height: 24px;
|
|
86
84
|
width: 24px;
|
|
87
|
-
flex-shrink: 0;
|
|
88
85
|
position: relative;
|
|
89
86
|
}
|
|
90
87
|
|
|
88
|
+
.success .psdk-vertical-step-icon {
|
|
89
|
+
background-color: var(--stepper-completed-bg-color);
|
|
90
|
+
color: var(--app-text-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.future .psdk-vertical-step-icon {
|
|
94
|
+
color: var(--app-neutral-color);
|
|
95
|
+
border: 1px solid var(--app-neutral-color);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.current .psdk-vertical-step-icon {
|
|
99
|
+
background-color: var(--app-primary-color);
|
|
100
|
+
color: var(--app-text-color);
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
91
104
|
.psdk-vertical-step-icon-content {
|
|
92
105
|
position: absolute;
|
|
93
106
|
top: 50%;
|
|
94
107
|
left: 50%;
|
|
95
108
|
transform: translate(-50%, -50%);
|
|
96
|
-
color: #fff;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.psdk-vertical-step-icon-selected {
|
|
100
|
-
margin-right: 12px;
|
|
101
|
-
background-color: var(--app-primary-color);
|
|
102
|
-
color: #fff;
|
|
103
|
-
border-radius: 50%;
|
|
104
|
-
height: 24px;
|
|
105
|
-
width: 24px;
|
|
106
|
-
flex-shrink: 0;
|
|
107
|
-
position: relative;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
.psdk-vertical-step-label {
|
|
111
|
-
color:
|
|
112
|
+
color: var(--step-label-color);
|
|
112
113
|
display: inline-block;
|
|
113
114
|
white-space: nowrap;
|
|
114
115
|
overflow: hidden;
|
|
@@ -119,16 +120,8 @@ mat-horizontal-stepper {
|
|
|
119
120
|
font-weight: 500;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
.psdk-vertical-step-label
|
|
123
|
-
color:
|
|
124
|
-
display: inline-block;
|
|
125
|
-
white-space: nowrap;
|
|
126
|
-
overflow: hidden;
|
|
127
|
-
text-overflow: ellipsis;
|
|
128
|
-
min-width: 50px;
|
|
129
|
-
vertical-align: middle;
|
|
130
|
-
font-size: 14px;
|
|
131
|
-
font-weight: 500;
|
|
123
|
+
.current .psdk-vertical-step-label {
|
|
124
|
+
color: var(--text-primary-color);
|
|
132
125
|
}
|
|
133
126
|
|
|
134
127
|
.psdk-vertical-step-body {
|
|
@@ -150,7 +143,7 @@ mat-horizontal-stepper {
|
|
|
150
143
|
border-left-style: solid;
|
|
151
144
|
top: -16px;
|
|
152
145
|
bottom: -16px;
|
|
153
|
-
border-left-color:
|
|
146
|
+
border-left-color: var(--app-neutral-color);
|
|
154
147
|
}
|
|
155
148
|
|
|
156
149
|
.psdk-horizontal-stepper {
|
|
@@ -162,33 +155,39 @@ mat-horizontal-stepper {
|
|
|
162
155
|
white-space: nowrap;
|
|
163
156
|
display: flex;
|
|
164
157
|
align-items: center;
|
|
165
|
-
text-align: left;
|
|
166
158
|
}
|
|
167
159
|
|
|
168
160
|
.psdk-horizontal-step-header {
|
|
169
|
-
overflow: hidden;
|
|
170
161
|
outline: none;
|
|
171
162
|
cursor: pointer;
|
|
172
163
|
position: relative;
|
|
173
164
|
box-sizing: content-box;
|
|
174
165
|
display: flex;
|
|
175
166
|
height: 72px;
|
|
176
|
-
overflow: hidden;
|
|
177
167
|
align-items: center;
|
|
178
|
-
padding: 0 24px;
|
|
179
168
|
}
|
|
180
169
|
|
|
181
170
|
.psdk-horizontal-step-icon {
|
|
182
|
-
|
|
183
|
-
color: #fff;
|
|
171
|
+
color: white;
|
|
184
172
|
border-radius: 50%;
|
|
185
173
|
height: 24px;
|
|
186
174
|
width: 24px;
|
|
187
|
-
flex-shrink: 0;
|
|
188
175
|
position: relative;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.future .psdk-horizontal-step-icon {
|
|
179
|
+
color: var(--app-neutral-color);
|
|
180
|
+
border: 1px solid var(--app-neutral-color);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.current .psdk-horizontal-step-icon {
|
|
184
|
+
color: var(--app-text-color);
|
|
185
|
+
background-color: var(--app-primary-color);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.success .psdk-horizontal-step-icon {
|
|
189
|
+
color: var(--app-text-color);
|
|
190
|
+
background-color: var(--stepper-completed-bg-color);
|
|
192
191
|
}
|
|
193
192
|
|
|
194
193
|
.psdk-horizontal-step-icon-content {
|
|
@@ -199,45 +198,24 @@ mat-horizontal-stepper {
|
|
|
199
198
|
transform: translate(-50%, -50%);
|
|
200
199
|
}
|
|
201
200
|
|
|
202
|
-
.psdk-horizontal-step-icon-selected {
|
|
203
|
-
background-color: var(--app-primary-color);
|
|
204
|
-
color: #fff;
|
|
205
|
-
border-radius: 50%;
|
|
206
|
-
height: 24px;
|
|
207
|
-
width: 24px;
|
|
208
|
-
flex-shrink: 0;
|
|
209
|
-
position: relative;
|
|
210
|
-
display: block;
|
|
211
|
-
margin-right: 8px;
|
|
212
|
-
flex: none;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
201
|
.psdk-horizontal-step-label {
|
|
216
|
-
color:
|
|
217
|
-
display: inline-block;
|
|
218
|
-
min-width: 50px;
|
|
219
|
-
vertical-align: middle;
|
|
202
|
+
color: var(--text-secondary-color);
|
|
220
203
|
font-size: 14px;
|
|
221
204
|
font-weight: 500;
|
|
222
205
|
white-space: initial;
|
|
223
206
|
}
|
|
224
207
|
|
|
225
|
-
.psdk-horizontal-step-label
|
|
226
|
-
color:
|
|
227
|
-
|
|
228
|
-
min-width: 50px;
|
|
229
|
-
vertical-align: middle;
|
|
230
|
-
font-size: 14px;
|
|
231
|
-
font-weight: 500;
|
|
232
|
-
white-space: initial;
|
|
208
|
+
.current .psdk-horizontal-step-label {
|
|
209
|
+
color: var(--text-primary-color);
|
|
210
|
+
margin-left: 8px;
|
|
233
211
|
}
|
|
234
212
|
|
|
235
|
-
.
|
|
236
|
-
border-top-color: rgba(0, 0, 0, 0.12);
|
|
237
|
-
border-top-width: 1px;
|
|
238
|
-
border-top-style: solid;
|
|
213
|
+
.flex-auto {
|
|
239
214
|
flex: auto;
|
|
240
|
-
|
|
241
|
-
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.psdk-horizontal-step-line {
|
|
218
|
+
border-top: 1px solid var(--app-neutral-color);
|
|
242
219
|
min-width: 32px;
|
|
220
|
+
margin: 0px 8px;
|
|
243
221
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
import './MultiStep.css';
|
|
7
7
|
|
|
@@ -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
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
31
|
+
const baseClass = 'psdk-vertical-step-body';
|
|
32
|
+
const isNotLastStep = index < arNavigationSteps.length - 1;
|
|
53
33
|
|
|
54
|
-
return
|
|
34
|
+
return isNotLastStep ? `${baseClass} psdk-vertical-step-line` : baseClass;
|
|
55
35
|
}
|
|
56
36
|
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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 '
|
|
46
|
+
return isCurrentStepActive || isSecondToLastWithActiveLastStep ? 'flex-auto' : '';
|
|
71
47
|
}
|
|
72
48
|
|
|
73
|
-
function
|
|
74
|
-
return index
|
|
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=
|
|
90
|
-
<div className={
|
|
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={
|
|
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
|
-
<
|
|
126
|
-
{
|
|
127
|
-
|
|
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=
|
|
142
|
-
<div className=
|
|
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={
|
|
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
|
-
{
|
|
127
|
+
{!isLastStep(index) && <div className={`psdk-horizontal-step-line ${_getAutoFlexClass(mainStep)}`} />}
|
|
154
128
|
</React.Fragment>
|
|
155
129
|
);
|
|
156
130
|
})}
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
Drawer,
|
|
8
8
|
List,
|
|
9
9
|
ListItem,
|
|
10
|
+
ListItemButton,
|
|
10
11
|
ListItemIcon,
|
|
11
12
|
ListItemText,
|
|
12
|
-
ListItemSecondaryAction,
|
|
13
13
|
Collapse,
|
|
14
14
|
Divider,
|
|
15
15
|
IconButton,
|
|
@@ -36,13 +36,13 @@ import { logout } from '@pega/auth/lib/sdk-auth-manager';
|
|
|
36
36
|
|
|
37
37
|
import { useNavBar } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
|
|
38
38
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
39
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
39
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
40
40
|
|
|
41
41
|
import './NavBar.css';
|
|
42
42
|
|
|
43
43
|
interface NavBarProps extends PConnProps {
|
|
44
44
|
// If any, enter additional props that only exist on this component
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
appName?: string;
|
|
47
47
|
pages?: any[];
|
|
48
48
|
caseTypes: any[];
|
|
@@ -93,7 +93,8 @@ const useStyles = makeStyles(theme => ({
|
|
|
93
93
|
},
|
|
94
94
|
appListLogo: {
|
|
95
95
|
marginRight: theme.spacing(2),
|
|
96
|
-
width: '3.6rem'
|
|
96
|
+
width: '3.6rem',
|
|
97
|
+
filter: 'var(--svg-color)'
|
|
97
98
|
},
|
|
98
99
|
appListIcon: {
|
|
99
100
|
color: theme.palette.getContrastText(theme.palette.primary.light)
|
|
@@ -125,7 +126,6 @@ export default function NavBar(props: NavBarProps) {
|
|
|
125
126
|
const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);
|
|
126
127
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
127
128
|
const localeUtils = PCore.getLocaleUtils();
|
|
128
|
-
const localeReference = pConn.getValue('.pyLocaleReference');
|
|
129
129
|
|
|
130
130
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
131
131
|
const localeCategory = 'AppShell';
|
|
@@ -133,9 +133,19 @@ export default function NavBar(props: NavBarProps) {
|
|
|
133
133
|
const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat('pzpega-logo-mark.svg');
|
|
134
134
|
const portalOperator = PCore.getEnvironmentInfo().getOperatorName();
|
|
135
135
|
const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
136
|
-
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || pConn.getValue('.pyLocaleReference');
|
|
137
138
|
useEffect(() => {
|
|
138
|
-
|
|
139
|
+
const updatedPages = pages.map((page: any) => {
|
|
140
|
+
const destinationObject: any = {};
|
|
141
|
+
pConn.resolveConfigProps(
|
|
142
|
+
{ defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },
|
|
143
|
+
destinationObject
|
|
144
|
+
);
|
|
145
|
+
const name = localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
|
|
146
|
+
return { ...page, name };
|
|
147
|
+
});
|
|
148
|
+
setNavPages(updatedPages);
|
|
139
149
|
}, [pages]);
|
|
140
150
|
|
|
141
151
|
function navPanelButtonClick(oPageData: any) {
|
|
@@ -145,7 +155,6 @@ export default function NavBar(props: NavBarProps) {
|
|
|
145
155
|
.getActionsApi()
|
|
146
156
|
.showPage(pyRuleName, pyClassName)
|
|
147
157
|
.then(() => {
|
|
148
|
-
// eslint-disable-next-line no-console
|
|
149
158
|
console.log(`${localizedVal('showPage completed', localeCategory)}`);
|
|
150
159
|
});
|
|
151
160
|
}
|
|
@@ -161,7 +170,6 @@ export default function NavBar(props: NavBarProps) {
|
|
|
161
170
|
.getActionsApi()
|
|
162
171
|
.createWork(sCaseType, actionInfo)
|
|
163
172
|
.then(() => {
|
|
164
|
-
// eslint-disable-next-line no-console
|
|
165
173
|
console.log(`${localizedVal('createWork completed', localeCategory)}`);
|
|
166
174
|
});
|
|
167
175
|
}
|
|
@@ -199,7 +207,14 @@ export default function NavBar(props: NavBarProps) {
|
|
|
199
207
|
>
|
|
200
208
|
{open ? (
|
|
201
209
|
<List className={classes.appListItem}>
|
|
202
|
-
<ListItem
|
|
210
|
+
<ListItem
|
|
211
|
+
onClick={handleDrawerOpen}
|
|
212
|
+
secondaryAction={
|
|
213
|
+
<IconButton edge='end' onClick={handleDrawerOpen} size='large'>
|
|
214
|
+
<ChevronLeftIcon className={classes.appListIcon} />
|
|
215
|
+
</IconButton>
|
|
216
|
+
}
|
|
217
|
+
>
|
|
203
218
|
<ListItemIcon>
|
|
204
219
|
<img src={portalLogoImage} className={classes.appListLogo} />
|
|
205
220
|
</ListItemIcon>
|
|
@@ -210,11 +225,6 @@ export default function NavBar(props: NavBarProps) {
|
|
|
210
225
|
</Typography>
|
|
211
226
|
}
|
|
212
227
|
/>
|
|
213
|
-
<ListItemSecondaryAction>
|
|
214
|
-
<IconButton edge='end' onClick={handleDrawerOpen} size='large'>
|
|
215
|
-
<ChevronLeftIcon className={classes.appListIcon} />
|
|
216
|
-
</IconButton>
|
|
217
|
-
</ListItemSecondaryAction>
|
|
218
228
|
</ListItem>
|
|
219
229
|
</List>
|
|
220
230
|
) : (
|
|
@@ -223,17 +233,16 @@ export default function NavBar(props: NavBarProps) {
|
|
|
223
233
|
</div>
|
|
224
234
|
)}
|
|
225
235
|
<List>
|
|
226
|
-
<
|
|
236
|
+
<ListItemButton onClick={handleCaseItemClick}>
|
|
227
237
|
<ListItemIcon>{bShowCaseTypes && open ? <ClearOutlinedIcon fontSize='large' /> : <AddIcon fontSize='large' />}</ListItemIcon>
|
|
228
238
|
<ListItemText primary='Create' />
|
|
229
239
|
{bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}
|
|
230
|
-
</
|
|
240
|
+
</ListItemButton>
|
|
231
241
|
</List>
|
|
232
242
|
<Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>
|
|
233
243
|
<List component='div' disablePadding>
|
|
234
244
|
{caseTypes.map(caseType => (
|
|
235
|
-
<
|
|
236
|
-
button
|
|
245
|
+
<ListItemButton
|
|
237
246
|
className={classes.nested}
|
|
238
247
|
onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}
|
|
239
248
|
key={caseType.pyLabel}
|
|
@@ -241,34 +250,36 @@ export default function NavBar(props: NavBarProps) {
|
|
|
241
250
|
<ListItemIcon>
|
|
242
251
|
<WorkOutlineIcon fontSize='large' />
|
|
243
252
|
</ListItemIcon>
|
|
244
|
-
<ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '',
|
|
245
|
-
</
|
|
253
|
+
<ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '', localeUtils.getCaseLocaleReference(caseType.pyClassName))} />
|
|
254
|
+
</ListItemButton>
|
|
246
255
|
))}
|
|
247
256
|
</List>
|
|
248
257
|
</Collapse>
|
|
249
258
|
<List>
|
|
250
259
|
{navPages.map(page => (
|
|
251
|
-
<
|
|
260
|
+
<ListItemButton onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>
|
|
252
261
|
<ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>
|
|
253
|
-
<ListItemText primary={
|
|
254
|
-
</
|
|
262
|
+
<ListItemText primary={page.name} />
|
|
263
|
+
</ListItemButton>
|
|
255
264
|
))}
|
|
256
265
|
</List>
|
|
257
266
|
<Divider />
|
|
258
267
|
<List className='marginTopAuto'>
|
|
259
268
|
<>
|
|
260
|
-
<ListItem
|
|
269
|
+
<ListItem
|
|
270
|
+
onClick={navPanelOperatorButtonClick}
|
|
271
|
+
secondaryAction={
|
|
272
|
+
open ? (
|
|
273
|
+
<IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>
|
|
274
|
+
<ChevronRightIcon />
|
|
275
|
+
</IconButton>
|
|
276
|
+
) : null
|
|
277
|
+
}
|
|
278
|
+
>
|
|
261
279
|
<ListItemIcon id='person-icon'>
|
|
262
280
|
<PersonOutlineIcon fontSize='large' />
|
|
263
281
|
</ListItemIcon>
|
|
264
282
|
<ListItemText primary={portalOperator} />
|
|
265
|
-
{open && (
|
|
266
|
-
<ListItemSecondaryAction>
|
|
267
|
-
<IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>
|
|
268
|
-
<ChevronRightIcon />
|
|
269
|
-
</IconButton>
|
|
270
|
-
</ListItemSecondaryAction>
|
|
271
|
-
)}
|
|
272
283
|
</ListItem>
|
|
273
284
|
<Menu
|
|
274
285
|
anchorEl={anchorEl}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
1
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
2
2
|
|
|
3
3
|
interface ReferenceProps extends PConnProps {
|
|
4
4
|
// If any, enter additional props that only exist on this component
|
|
@@ -12,8 +12,7 @@ export default function Reference(props: ReferenceProps) {
|
|
|
12
12
|
const { visibility = true, context = '', getPConnect, readOnly = false, displayMode = '' } = props;
|
|
13
13
|
|
|
14
14
|
const pConnect = getPConnect();
|
|
15
|
-
|
|
16
|
-
const referenceConfig = { ...pConnect.getComponentConfig() } || {};
|
|
15
|
+
const referenceConfig = { ...pConnect.getComponentConfig() };
|
|
17
16
|
|
|
18
17
|
delete referenceConfig?.name;
|
|
19
18
|
delete referenceConfig?.type;
|
|
@@ -34,7 +33,7 @@ export default function Reference(props: ReferenceProps) {
|
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
// @ts-
|
|
36
|
+
// @ts-expect-error - Argument of type 'null' is not assignable to parameter of type 'string'.
|
|
38
37
|
const viewComponent: any = pConnect.createComponent(viewObject, null, null, {
|
|
39
38
|
pageReference: context && context.startsWith('@CLASS') ? '' : context
|
|
40
39
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Children, createElement, PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
1
|
+
import { Children, createElement, type PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { Box, CircularProgress } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
6
6
|
import { LazyMap as LazyComponentMap } from '@pega/react-sdk-components/lib/components_map';
|
|
7
7
|
import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
|
|
8
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
9
|
|
|
10
10
|
interface RootContainerProps extends PConnProps {
|
|
11
11
|
// If any, enter additional props that only exist on this component
|
|
@@ -196,7 +196,6 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
|
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
if (renderingMode === 'noPortal') {
|
|
199
|
-
// eslint-disable-next-line no-console
|
|
200
199
|
console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);
|
|
201
200
|
|
|
202
201
|
const theChildren = pConn.getChildren() as any[];
|