@pega/react-sdk-overrides 0.25.4 → 0.25.5

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.
@@ -38,10 +38,13 @@ export default function Banner(props: BannerProps) {
38
38
  </div>
39
39
  </div>
40
40
  <Grid2 container size={12} className='banner-layout' spacing={1}>
41
- <Grid2 size={{ xs: variantMap[variant][0] }} style={{ padding: '1em' }}>
41
+ <Grid2
42
+ size={{ xs: variantMap[variant][0] }}
43
+ style={{ padding: '1rem', backgroundColor: 'var(--app-form-bg-color)', borderRadius: '16px', height: 'fit-content' }}
44
+ >
42
45
  {a}
43
46
  </Grid2>
44
- <Grid2 size={{ xs: variantMap[variant][1] }} style={{ padding: '1em' }}>
47
+ <Grid2 size={{ xs: variantMap[variant][1] }} style={{ padding: '0rem 1rem' }}>
45
48
  {b}
46
49
  </Grid2>
47
50
  </Grid2>
@@ -2,7 +2,6 @@ import React, { forwardRef } from 'react';
2
2
  import { Editor } from '@tinymce/tinymce-react';
3
3
  import { FormControl, FormHelperText, InputLabel, useTheme } from '@mui/material';
4
4
  import makeStyles from '@mui/styles/makeStyles';
5
-
6
5
  import { useAfterInitialEffect, useConsolidatedRef, useUID } from '@pega/react-sdk-components/lib/hooks';
7
6
 
8
7
  const useStyles = makeStyles(theme => ({
@@ -88,7 +87,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
88
87
  initialValue={defaultValue}
89
88
  disabled={disabled}
90
89
  init={{
91
- skin: 'oxide-dark', // or 'oxide' for light theme
90
+ skin: theme.palette.mode === 'dark' ? 'oxide-dark' : 'oxide',
92
91
  // ...other TinyMCE config...
93
92
  content_style: `
94
93
  body {
@@ -110,6 +109,10 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
110
109
  font-size: 1em;
111
110
  font-family: inherit;
112
111
  }
112
+ .mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
113
+ color: ${theme.palette.text.secondary};
114
+ opacity: 0.7;
115
+ }
113
116
  /* Add more styles as needed */
114
117
  `,
115
118
  placeholder,
@@ -1,36 +1,29 @@
1
1
  .quick-link-ul-list {
2
2
  list-style: none;
3
3
  padding: 0;
4
- grid-template-columns: repeat(auto-fill, minmax(min(40ch, 100%), 1fr));
4
+ grid-template-columns: repeat(auto-fit, minmax(min(20ch, 100%), 1fr));
5
5
  display: grid;
6
6
  gap: calc(1rem);
7
7
  }
8
8
 
9
- .quick-link-list {
10
- background-color: var(--link-button-color);
11
- color: var(--app-text-color);
12
- border-radius: 8px;
13
- }
14
-
15
9
  .quick-link-button {
16
10
  text-transform: capitalize !important;
17
11
  font-size: 16px !important;
18
12
  color: var(--app-text-color) !important;
19
- padding: calc(0.5rem * 2) !important;
20
- height: 6rem;
13
+ height: 10rem;
21
14
  width: 100%;
22
- justify-content: start !important;
23
15
  }
24
16
 
25
17
  .quick-link-icon {
26
- width: 1em;
27
- height: 1em;
28
18
  flex-shrink: 0;
29
- filter: var(--svg-color);
19
+ object-fit: contain;
20
+ width: 3rem;
21
+ height: 3rem;
30
22
  }
31
23
 
32
24
  .quick-link-button-span {
33
25
  display: flex;
26
+ flex-direction: column;
34
27
  align-items: center;
35
28
  gap: 0.5rem;
36
29
  }
@@ -1,4 +1,5 @@
1
1
  import { Button } from '@mui/material';
2
+ import { makeStyles } from '@mui/styles';
2
3
  import './WssQuickCreate.css';
3
4
 
4
5
  // WssQuickCreate is one of the few components that does NOT have getPConnect.
@@ -9,8 +10,18 @@ interface WssQuickCreateProps {
9
10
  actions?: any[];
10
11
  }
11
12
 
13
+ const useStyles = makeStyles(theme => ({
14
+ quickLinkList: {
15
+ backgroundColor: theme.palette.mode === 'dark' ? 'var(--app-background-color)' : 'var(--link-button-color)',
16
+ color: 'var(--app-text-color)',
17
+ borderRadius: '16px',
18
+ border: '1px solid var(--app-primary-color)'
19
+ }
20
+ }));
21
+
12
22
  export default function WssQuickCreate(props: WssQuickCreateProps) {
13
23
  const { heading, actions } = props;
24
+ const classes = useStyles();
14
25
 
15
26
  return (
16
27
  <div>
@@ -21,7 +32,7 @@ export default function WssQuickCreate(props: WssQuickCreateProps) {
21
32
  {actions &&
22
33
  actions.map(element => {
23
34
  return (
24
- <li className='quick-link-list' key={element.label}>
35
+ <li className={classes.quickLinkList} key={element.label}>
25
36
  <Button className='quick-link-button' onClick={element.onClick}>
26
37
  <span className='quick-link-button-span'>
27
38
  {element.icon && <img className='quick-link-icon' src={element.icon} />}
@@ -1,6 +1,6 @@
1
1
  import { type ReactElement, useMemo } from 'react';
2
2
  import Grid2 from '@mui/material/Grid2';
3
- import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  interface GroupProps extends PConnFieldProps {
@@ -13,6 +13,8 @@ interface GroupProps extends PConnFieldProps {
13
13
  }
14
14
 
15
15
  export default function Group(props: GroupProps) {
16
+ const FieldGroup = getComponentFromMap('FieldGroup');
17
+
16
18
  const { children, heading, showHeading, instructions, collapsible, displayMode, type } = props;
17
19
 
18
20
  const isReadOnly = displayMode === 'DISPLAY_ONLY';
@@ -0,0 +1,4 @@
1
+ /* Support for google map autocomplete */
2
+ .pac-container {
3
+ z-index: 2147483647;
4
+ }
@@ -8,6 +8,8 @@ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpe
8
8
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
9
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
10
10
 
11
+ import './Location.css';
12
+
11
13
  interface LocationProps extends PConnFieldProps {
12
14
  coordinates?: string;
13
15
  onlyCoordinates?: boolean;
@@ -108,7 +108,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
108
108
  return (
109
109
  <div>
110
110
  <h4 style={{ marginTop: 0, marginBottom: 0 }}>{label}</h4>
111
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 40ch), 1fr))', gridAutoRows: '1fr', gap: '0.5rem' }}>
111
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(200px, 100%), 1fr))', gap: '1rem' }}>
112
112
  <SelectableCard
113
113
  hideFieldLabels={hideFieldLabels}
114
114
  additionalProps={additionalProps}
@@ -0,0 +1,79 @@
1
+ .tox .tox-toolbar {
2
+ background-color: var(--app-background-color) !important;
3
+ }
4
+
5
+ .tox .tox-toolbar__primary {
6
+ background-color: var(--app-background-color) !important;
7
+ }
8
+
9
+ .tox .tox-toolbar__button {
10
+ color: var(--app-text-color) !important;
11
+ }
12
+
13
+ .tox .tox-toolbar__button--enabled {
14
+ background: var(--app-primary-color) !important;
15
+ color: #fff !important;
16
+ }
17
+
18
+ .tox .tox-dialog {
19
+ background-color: var(--modal-top-color) !important;
20
+ color: var(--app-text-color) !important;
21
+ border: 1px solid var(--modal-border-color) !important;
22
+ padding: 20px !important;
23
+ box-shadow: 0 0 10px 3px var(--modal-box-shadow-color) !important;
24
+ }
25
+
26
+ .tox .tox-dialog__header {
27
+ background-color: var(--modal-top-color) !important;
28
+ color: var(--app-text-color) !important;
29
+ font-weight: 500;
30
+ border-bottom: 1px solid var(--modal-border-color);
31
+ }
32
+
33
+ .tox .tox-dialog__footer {
34
+ background: transparent !important;
35
+ border-top: 1px solid var(--modal-border-color);
36
+ }
37
+
38
+ .tox .tox-dialog-wrap__backdrop {
39
+ background-color: var(--modal-background-color) !important;
40
+ }
41
+
42
+ .tox .tox-dialog__body input,
43
+ .tox .tox-dialog__body textarea,
44
+ .tox .tox-dialog__body select {
45
+ background: initial !important;
46
+ color: var(--app-text-color) !important;
47
+ border: 1px solid var(--app-neutral-color) !important;
48
+ border-radius: 4px !important;
49
+ padding: 6px 10px !important;
50
+ font-size: 1em !important;
51
+ font-family: inherit !important;
52
+ }
53
+
54
+ .tox .tox-dialog__body button {
55
+ background: transparent;
56
+ color: #fff !important;
57
+ border: none !important;
58
+ border-radius: 4px !important;
59
+ padding: 8px 16px !important;
60
+ font-size: 1em !important;
61
+ cursor: pointer !important;
62
+ }
63
+
64
+ .tox .tox-dialog__footer .tox-button {
65
+ background: var(--app-primary-color) !important;
66
+ color: #fff !important;
67
+ border: none !important;
68
+ border-radius: 4px !important;
69
+ padding: 8px 16px !important;
70
+ font-size: 1em !important;
71
+ cursor: pointer !important;
72
+ }
73
+
74
+ .tox .tox-dialog__footer .tox-button--secondary {
75
+ background: var(--app-secondary-color) !important;
76
+ color: var(--secondary-button-text-color) !important;
77
+ font-size: 0.875rem !important;
78
+ cursor: pointer !important;
79
+ }
@@ -4,6 +4,8 @@ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
 
7
+ import './RichText.css';
8
+
7
9
  interface RichTextProps extends PConnFieldProps {
8
10
  // If any, enter additional props that only exist on TextArea here
9
11
  additionalProps?: object;
@@ -74,7 +74,7 @@ export default function SelectableCard(props) {
74
74
  }
75
75
 
76
76
  const component = (
77
- <div style={{ paddingTop: '15px' }}>
77
+ <div key={item[recordKey]} style={{ paddingTop: '15px' }}>
78
78
  <Card className={className} style={{ display: 'flex', flexDirection: 'column', height: '100%' }} data-testid={testId}>
79
79
  <CardContent
80
80
  style={{
@@ -93,7 +93,7 @@ export default function SelectableCard(props) {
93
93
  alt={image.alt}
94
94
  style={{
95
95
  width: '100%',
96
- backgroundColor: 'rgb(233, 238, 243)',
96
+ backgroundColor: 'transparent',
97
97
  aspectRatio: '16 / 9',
98
98
  maxHeight: '100%',
99
99
  height: '100%',
@@ -152,7 +152,7 @@ export default function SelectableCard(props) {
152
152
  margin: '5px'
153
153
  }}
154
154
  >
155
- <div style={{ color: 'rgba(0, 0, 0, 0.6)' }}>{field.name}</div>
155
+ {field.name && <div>{field.name}</div>}
156
156
  <div>{field?.value?.props.value}</div>
157
157
  </div>
158
158
  ))}
@@ -4,7 +4,6 @@ import { Typography } from '@mui/material';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
 
7
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
8
7
  import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
9
8
 
10
9
  const DROPDOWN_LIST = 'Drop-down list';
@@ -34,6 +33,7 @@ const UserReference = (props: UserReferenceProps) => {
34
33
  // Get emitted components from map (so we can get any override that may exist)
35
34
  const AutoComplete = getComponentFromMap('AutoComplete');
36
35
  const Dropdown = getComponentFromMap('Dropdown');
36
+ const FieldValueList = getComponentFromMap('FieldValueList');
37
37
 
38
38
  const {
39
39
  label = '',
@@ -97,37 +97,44 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
97
97
  const oWorkItem = firstChild.props.getPConnect();
98
98
  const oWorkData = oWorkItem.getDataObject();
99
99
  const oData: any = thePConn.getDataObject(''); // 1st arg empty string until typedefs allow it to be optional
100
+ const caseInfo = oData?.caseInfo;
101
+ if (!oWorkData?.caseInfo || oWorkData.caseInfo.assignments === null || !caseInfo) {
102
+ return;
103
+ }
100
104
 
101
- if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {
102
- const oCaseInfo = oData?.caseInfo;
105
+ // Set action buttons
106
+ if (caseInfo.actionButtons) {
107
+ setActionButtons(caseInfo.actionButtons);
108
+ }
103
109
 
104
- if (oCaseInfo && oCaseInfo.actionButtons) {
105
- setActionButtons(oCaseInfo.actionButtons);
106
- }
110
+ // Handle navigation setup
111
+ const navigation = caseInfo.navigation;
112
+ if (!navigation) {
113
+ setHasNavigation(false);
114
+ return;
115
+ }
107
116
 
108
- if (oCaseInfo?.navigation /* was oCaseInfo.navigation != null */) {
109
- setHasNavigation(true);
117
+ const isStandardTemplate = navigation.template?.toLowerCase() === 'standard';
118
+ const hasSingleStep = navigation.steps?.length === 1;
119
+ const shouldHideNavigation = isStandardTemplate || hasSingleStep;
110
120
 
111
- if (
112
- (oCaseInfo.navigation.template && oCaseInfo.navigation.template.toLowerCase() === 'standard') ||
113
- oCaseInfo?.navigation?.steps?.length === 1
114
- ) {
115
- setHasNavigation(false);
116
- } else if (oCaseInfo.navigation.template && oCaseInfo.navigation.template.toLowerCase() === 'vertical') {
117
- setIsVertical(true);
118
- } else {
119
- setIsVertical(false);
120
- }
121
+ setHasNavigation(!shouldHideNavigation);
121
122
 
122
- if (oCaseInfo?.navigation?.steps) {
123
- const steps = JSON.parse(JSON.stringify(oCaseInfo?.navigation?.steps));
124
- const formedSteps = getStepsInfo(steps);
125
- setArNavigationSteps(formedSteps);
126
- }
123
+ if (shouldHideNavigation) {
124
+ return;
125
+ }
127
126
 
128
- setArCurrentStepIndicies(findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0));
129
- }
127
+ // set vertical navigation
128
+ const isVerticalTemplate = navigation.template?.toLowerCase() === 'vertical';
129
+ setIsVertical(isVerticalTemplate);
130
+
131
+ if (navigation.steps) {
132
+ const steps = JSON.parse(JSON.stringify(navigation.steps));
133
+ const formedSteps = getStepsInfo(steps);
134
+ setArNavigationSteps(formedSteps);
130
135
  }
136
+
137
+ setArCurrentStepIndicies(findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0));
131
138
  }
132
139
  }, [children]);
133
140
 
@@ -79,32 +79,33 @@ 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: var(--app-text-color);
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
 
91
- .psdk-vertical-step-icon-content {
92
- position: absolute;
93
- top: 50%;
94
- left: 50%;
95
- transform: translate(-50%, -50%);
88
+ .success .psdk-vertical-step-icon {
89
+ background-color: var(--stepper-completed-bg-color);
96
90
  color: var(--app-text-color);
97
91
  }
98
92
 
99
- .psdk-vertical-step-icon-selected {
100
- margin-right: 12px;
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 {
101
99
  background-color: var(--app-primary-color);
102
100
  color: var(--app-text-color);
103
- border-radius: 50%;
104
- height: 24px;
105
- width: 24px;
106
101
  flex-shrink: 0;
107
- position: relative;
102
+ }
103
+
104
+ .psdk-vertical-step-icon-content {
105
+ position: absolute;
106
+ top: 50%;
107
+ left: 50%;
108
+ transform: translate(-50%, -50%);
108
109
  }
109
110
 
110
111
  .psdk-vertical-step-label {
@@ -119,16 +120,8 @@ mat-horizontal-stepper {
119
120
  font-weight: 500;
120
121
  }
121
122
 
122
- .psdk-vertical-step-label-selected {
123
- color: rgba(0, 0, 0, 0.87);
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: rgba(0, 0, 0, 0.12);
146
+ border-left-color: var(--app-neutral-color);
154
147
  }
155
148
 
156
149
  .psdk-horizontal-stepper {
@@ -162,7 +155,6 @@ 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 {
@@ -175,20 +167,29 @@ mat-horizontal-stepper {
175
167
  height: 72px;
176
168
  overflow: hidden;
177
169
  align-items: center;
178
- padding: 0 24px;
179
170
  }
180
171
 
181
172
  .psdk-horizontal-step-icon {
182
- background-color: var(--app-neutral-color);
183
- color: var(--app-text-color);
173
+ color: white;
184
174
  border-radius: 50%;
185
175
  height: 24px;
186
176
  width: 24px;
187
- flex-shrink: 0;
188
177
  position: relative;
189
- display: block;
190
- margin-right: 8px;
191
- flex: none;
178
+ }
179
+
180
+ .future .psdk-horizontal-step-icon {
181
+ color: var(--app-neutral-color);
182
+ border: 1px solid var(--app-neutral-color);
183
+ }
184
+
185
+ .current .psdk-horizontal-step-icon {
186
+ color: var(--app-text-color);
187
+ background-color: var(--app-primary-color);
188
+ }
189
+
190
+ .success .psdk-horizontal-step-icon {
191
+ color: var(--app-text-color);
192
+ background-color: var(--stepper-completed-bg-color);
192
193
  }
193
194
 
194
195
  .psdk-horizontal-step-icon-content {
@@ -199,45 +200,24 @@ mat-horizontal-stepper {
199
200
  transform: translate(-50%, -50%);
200
201
  }
201
202
 
202
- .psdk-horizontal-step-icon-selected {
203
- background-color: var(--app-primary-color);
204
- color: var(--app-text-color);
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
203
  .psdk-horizontal-step-label {
216
- color: rgba(0, 0, 0, 0.54);
217
- display: inline-block;
218
- min-width: 50px;
219
- vertical-align: middle;
204
+ color: var(--text-secondary-color);
220
205
  font-size: 14px;
221
206
  font-weight: 500;
222
207
  white-space: initial;
223
208
  }
224
209
 
225
- .psdk-horizontal-step-label-selected {
226
- color: rgba(0, 0, 0, 0.87);
227
- display: inline-block;
228
- min-width: 50px;
229
- vertical-align: middle;
230
- font-size: 14px;
231
- font-weight: 500;
232
- white-space: initial;
210
+ .current .psdk-horizontal-step-label {
211
+ color: var(--text-primary-color);
212
+ margin-left: 8px;
233
213
  }
234
214
 
235
- .psdk-horizontal-step-line {
236
- border-top-color: rgba(0, 0, 0, 0.12);
237
- border-top-width: 1px;
238
- border-top-style: solid;
215
+ .flex-auto {
239
216
  flex: auto;
240
- height: 0;
241
- margin: 0 -16px;
217
+ }
218
+
219
+ .psdk-horizontal-step-line {
220
+ border-top: 1px solid var(--app-neutral-color);
242
221
  min-width: 32px;
222
+ margin: 0px 8px;
243
223
  }
@@ -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
  })}