@pega/react-sdk-overrides 0.23.26 → 0.23.28
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/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +39 -0
- package/lib/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/lib/designSystemExtension/Banner/Banner.tsx +21 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +36 -26
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +21 -28
- package/lib/designSystemExtension/DetailsFields/index.tsx +1 -1
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +50 -18
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +13 -12
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +18 -27
- package/lib/designSystemExtension/Operator/Operator.tsx +106 -87
- package/lib/designSystemExtension/Pulse/Pulse.tsx +21 -19
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +122 -0
- package/lib/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +21 -12
- package/lib/field/AutoComplete/AutoComplete.tsx +33 -16
- package/lib/field/AutoComplete/config-ext.json +2 -3
- package/lib/field/CancelAlert/CancelAlert.tsx +21 -15
- package/lib/field/CancelAlert/index.tsx +1 -1
- package/lib/field/Checkbox/Checkbox.tsx +29 -19
- package/lib/field/Checkbox/config-ext.json +2 -3
- package/lib/field/Currency/Currency.tsx +27 -38
- package/lib/field/Currency/config-ext.json +2 -3
- package/lib/field/Currency/currency-utils.ts +10 -18
- package/lib/field/Date/Date.tsx +33 -15
- package/lib/field/Date/config-ext.json +2 -3
- package/lib/field/DateTime/DateTime.tsx +22 -11
- package/lib/field/DateTime/config-ext.json +1 -2
- package/lib/field/Decimal/Decimal.tsx +64 -17
- package/lib/field/Decimal/config-ext.json +1 -2
- package/lib/field/Decimal/index.tsx +1 -1
- package/lib/field/Dropdown/Dropdown.tsx +154 -18
- package/lib/field/Dropdown/config-ext.json +1 -2
- package/lib/field/Email/Email.tsx +16 -7
- package/lib/field/Email/config-ext.json +1 -2
- package/lib/field/Email/index.tsx +1 -1
- package/lib/field/Group/Group.tsx +37 -0
- package/lib/field/Group/config-ext.json +7 -0
- package/lib/field/Group/index.tsx +1 -0
- package/lib/field/Integer/Integer.tsx +15 -6
- package/lib/field/Integer/config-ext.json +1 -2
- package/lib/field/Percentage/Percentage.tsx +14 -6
- package/lib/field/Percentage/config-ext.json +1 -2
- package/lib/field/Phone/Phone.tsx +17 -7
- package/lib/field/Phone/index.tsx +1 -1
- package/lib/field/RadioButtons/RadioButtons.tsx +55 -24
- package/lib/field/RadioButtons/config-ext.json +1 -2
- package/lib/field/RichText/RichText.tsx +96 -0
- package/lib/field/RichText/index.tsx +1 -0
- package/lib/field/ScalarList/ScalarList.tsx +63 -0
- package/lib/field/ScalarList/config-ext.json +7 -0
- package/lib/field/ScalarList/index.tsx +1 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +26 -25
- package/lib/field/SemanticLink/config-ext.json +1 -2
- package/lib/field/SemanticLink/utils.ts +8 -10
- package/lib/field/TextArea/TextArea.tsx +15 -5
- package/lib/field/TextArea/config-ext.json +1 -2
- package/lib/field/TextContent/TextContent.tsx +9 -2
- package/lib/field/TextContent/config-ext.json +1 -2
- package/lib/field/TextInput/TextInput.tsx +41 -10
- package/lib/field/TextInput/config-ext.json +1 -2
- package/lib/field/TextInput/index.tsx +1 -1
- package/lib/field/Time/Time.tsx +21 -18
- package/lib/field/Time/config-ext.json +1 -2
- package/lib/field/URL/URL.tsx +23 -6
- package/lib/field/URL/config-ext.json +1 -2
- package/lib/field/URL/index.tsx +1 -1
- package/lib/field/UserReference/UserReference.tsx +52 -58
- package/lib/field/UserReference/UserReferenceUtils.ts +2 -2
- package/lib/field/UserReference/config-ext.json +1 -2
- package/lib/helpers/{attachmentHelpers.js → attachmentHelpers.ts} +16 -11
- package/lib/helpers/case-utils.tsx +99 -0
- package/lib/helpers/common-utils.ts +8 -0
- package/lib/helpers/data_page.ts +3 -6
- package/lib/helpers/date-format-utils.ts +29 -19
- package/lib/helpers/{event-utils.js → event-utils.ts} +4 -4
- package/lib/helpers/{field-group-utils.js → field-group-utils.ts} +9 -10
- package/lib/helpers/formatters/Boolean.ts +21 -0
- package/lib/helpers/formatters/{Currency.js → Currency.ts} +22 -27
- package/lib/helpers/formatters/CurrencyMap.ts +915 -0
- package/lib/helpers/formatters/{Date.js → Date.ts} +20 -26
- package/lib/helpers/formatters/{common.js → common.ts} +3 -4
- package/lib/helpers/formatters/{index.js → index.ts} +22 -22
- package/lib/helpers/{reactContextHelpers.js → reactContextHelpers.ts} +2 -2
- package/lib/helpers/simpleTableHelpers.ts +65 -85
- package/lib/helpers/state-utils.tsx +43 -0
- package/lib/helpers/template-utils.ts +4 -8
- package/lib/helpers/utils.ts +16 -8
- package/lib/helpers/versionHelpers.ts +1 -5
- package/lib/infra/ActionButtons/ActionButtons.tsx +46 -42
- package/lib/infra/ActionButtons/index.tsx +1 -1
- package/lib/infra/Assignment/Assignment.tsx +99 -84
- package/lib/infra/Assignment/index.tsx +1 -1
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +19 -26
- package/lib/infra/AssignmentCard/index.tsx +1 -1
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +98 -232
- package/lib/infra/Containers/FlowContainer/helpers.ts +138 -0
- package/lib/infra/Containers/FlowContainer/index.tsx +1 -1
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +66 -0
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +105 -70
- package/lib/infra/Containers/ModalViewContainer/index.tsx +1 -1
- package/lib/infra/Containers/SimpleView/SimpleView.tsx +48 -0
- package/lib/infra/Containers/SimpleView/helper.ts +125 -0
- package/lib/infra/Containers/SimpleView/index.tsx +1 -0
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +49 -64
- package/lib/infra/Containers/helpers.ts +6 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +26 -51
- package/lib/infra/DashboardFilter/filterUtils.tsx +12 -40
- package/lib/infra/DeferLoad/DeferLoad.tsx +22 -31
- package/lib/infra/DeferLoad/index.tsx +1 -1
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +25 -38
- package/lib/infra/MultiStep/MultiStep.css +11 -15
- package/lib/infra/MultiStep/MultiStep.tsx +180 -216
- package/lib/infra/MultiStep/index.tsx +1 -1
- package/lib/infra/NavBar/NavBar.css +103 -105
- package/lib/infra/NavBar/NavBar.tsx +28 -43
- package/lib/infra/Reference/Reference.tsx +16 -22
- package/lib/infra/Region/Region.tsx +9 -9
- package/lib/infra/RootContainer/RootContainer.tsx +82 -125
- package/lib/infra/RootContainer/index.tsx +1 -1
- package/lib/infra/Stages/Stages.tsx +38 -39
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +17 -10
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +29 -36
- package/lib/infra/View/View.tsx +32 -63
- package/lib/template/AppShell/AppShell.css +22 -23
- package/lib/template/AppShell/AppShell.tsx +51 -69
- package/lib/template/BannerPage/BannerPage.tsx +26 -33
- package/lib/template/CaseSummary/CaseSummary.tsx +23 -18
- package/lib/template/CaseSummary/config-ext.json +1 -2
- package/lib/template/CaseView/CaseView.tsx +122 -114
- package/lib/template/CaseView/config-ext.json +1 -2
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +46 -35
- package/lib/template/Confirmation/Confirmation.tsx +25 -53
- package/lib/template/Confirmation/config-ext.json +1 -2
- package/lib/template/DataReference/DataReference.tsx +112 -140
- package/lib/template/DataReference/config-ext.json +1 -2
- package/lib/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/template/DefaultForm/DefaultForm.tsx +26 -20
- package/lib/template/DefaultForm/config-ext.json +1 -2
- package/lib/template/DefaultForm/utils/index.ts +33 -0
- package/lib/template/Details/Details/Details.tsx +24 -28
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +15 -22
- package/lib/template/Details/DetailsSubTabs/config-ext.json +1 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +25 -29
- package/lib/template/Details/DetailsThreeColumn/config-ext.json +1 -2
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +25 -29
- package/lib/template/Details/DetailsTwoColumn/config-ext.json +1 -2
- package/lib/template/Details/DetailsTwoColumn/index.tsx +1 -1
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +79 -0
- package/lib/template/Details/DynamicTabs/config.json +36 -0
- package/lib/template/Details/DynamicTabs/index.tsx +1 -0
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +24 -34
- package/lib/template/InlineDashboard/InlineDashboard.tsx +16 -14
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +19 -21
- package/lib/template/ListPage/ListPage.tsx +12 -16
- package/lib/template/ListPage/config-ext.json +1 -2
- package/lib/template/ListView/{DefaultViewMeta.js → DefaultViewMeta.ts} +1 -3
- package/lib/template/ListView/ListView.tsx +245 -306
- package/lib/template/ListView/config-ext.json +1 -2
- package/lib/template/ListView/{hooks.js → hooks.ts} +24 -24
- package/lib/template/ListView/{utils.js → utils.ts} +202 -91
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +25 -30
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +31 -29
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +27 -31
- package/lib/template/NarrowWide/NarrowWideDetails/config-ext.json +1 -2
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +17 -19
- package/lib/template/NarrowWide/NarrowWideForm/config-ext.json +1 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +16 -26
- package/lib/template/NarrowWide/NarrowWidePage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +17 -17
- package/lib/template/OneColumn/OneColumn/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +9 -16
- package/lib/template/OneColumn/OneColumnPage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +8 -14
- package/lib/template/OneColumn/OneColumnTab/config-ext.json +1 -2
- package/lib/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/template/PromotedFilters/PromotedFilters.tsx +44 -34
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +115 -14
- package/lib/template/SimpleTable/SimpleTable/config-ext.json +1 -2
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +171 -100
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +34 -40
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +45 -48
- package/lib/template/SubTabs/SubTabs.tsx +26 -45
- package/lib/template/SubTabs/config-ext.json +1 -2
- package/lib/template/SubTabs/tabUtils.ts +2 -7
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +33 -36
- package/lib/template/TwoColumn/TwoColumn/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +9 -16
- package/lib/template/TwoColumn/TwoColumnPage/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +33 -33
- package/lib/template/TwoColumn/TwoColumnTab/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +29 -27
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +39 -33
- package/lib/template/WideNarrow/WideNarrowDetails/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +16 -18
- package/lib/template/WideNarrow/WideNarrowForm/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +15 -25
- package/lib/template/WideNarrow/WideNarrowPage/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowPage/index.tsx +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +20 -9
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +34 -41
- package/lib/widget/AppAnnouncement/config-ext.json +1 -2
- package/lib/widget/Attachment/Attachment.css +75 -4
- package/lib/widget/Attachment/Attachment.tsx +370 -388
- package/lib/widget/Attachment/index.tsx +1 -1
- package/lib/widget/CaseHistory/CaseHistory.tsx +67 -67
- package/lib/widget/CaseHistory/config-ext.json +1 -2
- package/lib/widget/CaseHistory/index.tsx +1 -1
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +19 -9
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +324 -246
- package/lib/widget/FileUtility/FileUtility/config-ext.json +1 -2
- package/lib/widget/Followers/Followers.tsx +27 -25
- package/lib/widget/Followers/config-ext.json +1 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +24 -16
- package/lib/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/widget/SummaryItem/SummaryItem.tsx +62 -54
- package/lib/widget/SummaryItem/index.tsx +1 -1
- package/lib/widget/SummaryList/SummaryList.tsx +15 -4
- package/lib/widget/ToDo/ToDo.css +4 -4
- package/lib/widget/ToDo/ToDo.tsx +80 -116
- package/lib/widget/ToDo/config-ext.json +1 -2
- package/package.json +5 -2
- package/lib/helpers/auth.js +0 -483
- package/lib/helpers/authManager.js +0 -631
- package/lib/helpers/config_access.js +0 -268
- package/lib/helpers/formatters/Boolean.js +0 -38
- package/lib/helpers/formatters/CurrencyMap.js +0 -908
- package/lib/infra/Containers/FlowContainer/helpers.js +0 -147
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.psdk-current-svg-icon {
|
|
19
|
-
width:
|
|
19
|
+
width: 1rem;
|
|
20
20
|
filter: var(--app-primary-color-filter);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.psdk-not-current-svg-icon {
|
|
24
|
-
width:
|
|
24
|
+
width: 1rem;
|
|
25
25
|
filter: var(--app-neutral-color-filter);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
mat-vertical-stepper {
|
|
30
29
|
background-color: transparent;
|
|
31
30
|
}
|
|
@@ -36,17 +35,16 @@ mat-horizontal-stepper {
|
|
|
36
35
|
.psdk-sub-step-current {
|
|
37
36
|
padding-left: 0.625rem;
|
|
38
37
|
font-weight: bold;
|
|
39
|
-
color: rgba(0,0,0
|
|
38
|
+
color: rgba(0, 0, 0, 0.87);
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
.psdk-sub-step-not-current {
|
|
43
42
|
padding-left: 0.625rem;
|
|
44
|
-
color: rgba(0,0,0
|
|
43
|
+
color: rgba(0, 0, 0, 0.54);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
.psdk-flow-container-top {
|
|
48
47
|
border-radius: 0.3125rem;
|
|
49
|
-
|
|
50
48
|
}
|
|
51
49
|
.psdk-flow-container {
|
|
52
50
|
padding-left: 2.1875rem;
|
|
@@ -57,8 +55,6 @@ mat-horizontal-stepper {
|
|
|
57
55
|
padding-bottom: 0.625rem;
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
58
|
.psdk-vertical-stepper {
|
|
63
59
|
background-color: transparent;
|
|
64
60
|
display: block;
|
|
@@ -112,7 +108,7 @@ mat-horizontal-stepper {
|
|
|
112
108
|
}
|
|
113
109
|
|
|
114
110
|
.psdk-vertical-step-label {
|
|
115
|
-
color: rgba(0,0,0
|
|
111
|
+
color: rgba(0, 0, 0, 0.54);
|
|
116
112
|
display: inline-block;
|
|
117
113
|
white-space: nowrap;
|
|
118
114
|
overflow: hidden;
|
|
@@ -124,7 +120,7 @@ mat-horizontal-stepper {
|
|
|
124
120
|
}
|
|
125
121
|
|
|
126
122
|
.psdk-vertical-step-label-selected {
|
|
127
|
-
color: rgba(0,0,0
|
|
123
|
+
color: rgba(0, 0, 0, 0.87);
|
|
128
124
|
display: inline-block;
|
|
129
125
|
white-space: nowrap;
|
|
130
126
|
overflow: hidden;
|
|
@@ -147,14 +143,14 @@ mat-horizontal-stepper {
|
|
|
147
143
|
}
|
|
148
144
|
|
|
149
145
|
.psdk-vertical-step-line::before {
|
|
150
|
-
content:
|
|
146
|
+
content: '';
|
|
151
147
|
position: absolute;
|
|
152
148
|
left: 0;
|
|
153
149
|
border-left-width: 1px;
|
|
154
150
|
border-left-style: solid;
|
|
155
151
|
top: -16px;
|
|
156
152
|
bottom: -16px;
|
|
157
|
-
border-left-color: rgba(0,0,0
|
|
153
|
+
border-left-color: rgba(0, 0, 0, 0.12);
|
|
158
154
|
}
|
|
159
155
|
|
|
160
156
|
.psdk-horizontal-stepper {
|
|
@@ -217,7 +213,7 @@ mat-horizontal-stepper {
|
|
|
217
213
|
}
|
|
218
214
|
|
|
219
215
|
.psdk-horizontal-step-label {
|
|
220
|
-
color: rgba(0,0,0
|
|
216
|
+
color: rgba(0, 0, 0, 0.54);
|
|
221
217
|
display: inline-block;
|
|
222
218
|
min-width: 50px;
|
|
223
219
|
vertical-align: middle;
|
|
@@ -227,7 +223,7 @@ mat-horizontal-stepper {
|
|
|
227
223
|
}
|
|
228
224
|
|
|
229
225
|
.psdk-horizontal-step-label-selected {
|
|
230
|
-
color: rgba(0,0,0
|
|
226
|
+
color: rgba(0, 0, 0, 0.87);
|
|
231
227
|
display: inline-block;
|
|
232
228
|
min-width: 50px;
|
|
233
229
|
vertical-align: middle;
|
|
@@ -237,7 +233,7 @@ mat-horizontal-stepper {
|
|
|
237
233
|
}
|
|
238
234
|
|
|
239
235
|
.psdk-horizontal-step-line {
|
|
240
|
-
border-top-color: rgba(0,0,0
|
|
236
|
+
border-top-color: rgba(0, 0, 0, 0.12);
|
|
241
237
|
border-top-width: 1px;
|
|
242
238
|
border-top-style: solid;
|
|
243
239
|
flex: auto;
|
|
@@ -1,225 +1,189 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
|
|
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';
|
|
3
5
|
|
|
4
6
|
import './MultiStep.css';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// const svgCurrent = Utils.getImageSrc("circle-solid", PCore.getAssetLoader().getStaticServerUrl());
|
|
15
|
-
// const svgNotCurrent = Utils.getImageSrc("circle-solid", PCore.getAssetLoader().getStaticServerUrl());
|
|
16
|
-
|
|
17
|
-
function _getVIconClass(status): string {
|
|
18
|
-
if (status === "current") {
|
|
19
|
-
return "psdk-vertical-step-icon-selected";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return "psdk-vertical-step-icon";
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function _getVLabelClass(status): string {
|
|
26
|
-
if (status === "current") {
|
|
27
|
-
return "psdk-vertical-step-label-selected";
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return "psdk-vertical-step-label";
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _getVBodyClass(index: number): string {
|
|
34
|
-
if (index < arNavigationSteps.length - 1) {
|
|
35
|
-
return "psdk-vertical-step-body psdk-vertical-step-line";
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return "psdk-vertical-step-body";
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function _getHIconClass(status): string {
|
|
42
|
-
if (status === "current") {
|
|
43
|
-
return "psdk-horizontal-step-icon-selected";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return "psdk-horizontal-step-icon";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function _getHLabelClass(status): string {
|
|
50
|
-
if (status === "current") {
|
|
51
|
-
return "psdk-horizontal-step-label-selected";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return "psdk-horizontal-step-label";
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function _showHLine(index: number): boolean {
|
|
58
|
-
// eslint-disable-next-line sonarjs/prefer-single-boolean-return
|
|
59
|
-
if (index < arNavigationSteps.length - 1) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function buttonPress(sAction: string, sButtonType: string) {
|
|
67
|
-
onButtonPress(sAction, sButtonType);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<React.Fragment>
|
|
72
|
-
<div>
|
|
73
|
-
{bIsVertical ?
|
|
74
|
-
<div className="psdk-vertical-stepper">
|
|
75
|
-
{arNavigationSteps.map((mainStep, index) => {
|
|
76
|
-
return (
|
|
77
|
-
<React.Fragment key={mainStep.actionID}>
|
|
78
|
-
<div className="psdk-vertical-step">
|
|
79
|
-
<div className="psdk-vertical-step-header">
|
|
80
|
-
<div className={ _getVIconClass(mainStep.visited_status)}>
|
|
81
|
-
<div className="psdk-vertical-step-icon-content">
|
|
82
|
-
<span>{index + 1}</span>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div className={ _getVLabelClass(mainStep.visited_status)}>
|
|
86
|
-
{mainStep.name}
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
<div className={ _getVBodyClass(index)}>
|
|
90
|
-
{mainStep?.steps &&
|
|
91
|
-
<React.Fragment>
|
|
92
|
-
<ul style={{paddingInlineStart: "0rem", marginLeft: "-7px"}}>
|
|
93
|
-
{mainStep.steps.forEach((subStep) => {
|
|
94
|
-
<li className="psdk-sub-step-list">
|
|
95
|
-
<div style={{display: "inline-flex"}}>
|
|
96
|
-
{subStep.visited_status === 'current' &&
|
|
97
|
-
<img className="psdk-current-svg-icon" src="{svgCurrent}" />
|
|
98
|
-
}
|
|
99
|
-
{subStep.visited_status !== 'current' &&
|
|
100
|
-
<img className="psdk-not-current-svg-icon" src="{svgNotCurrent}" />
|
|
101
|
-
}
|
|
102
|
-
{subStep.visited_status === 'current' &&
|
|
103
|
-
<label className="psdk-sub-step-current">{subStep.name}</label>
|
|
104
|
-
}
|
|
105
|
-
{subStep.visited_status !== 'current' &&
|
|
106
|
-
<label className="psdk-sub-step-not-current">{subStep.name}</label>
|
|
107
|
-
}
|
|
108
|
-
</div>
|
|
109
|
-
{subStep.visited_status === 'current' &&
|
|
110
|
-
<div>
|
|
111
|
-
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress} >
|
|
112
|
-
{children}
|
|
113
|
-
</AssignmentCard>
|
|
114
|
-
</div>
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
</li>
|
|
119
|
-
})}
|
|
120
|
-
|
|
121
|
-
</ul>
|
|
122
|
-
</React.Fragment>
|
|
123
|
-
}
|
|
124
|
-
{!mainStep?.steps && mainStep.visited_status === 'current' &&
|
|
125
|
-
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress} >
|
|
126
|
-
{children}
|
|
127
|
-
</AssignmentCard>
|
|
128
|
-
}
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</React.Fragment>
|
|
132
|
-
)})}
|
|
133
|
-
</div>
|
|
8
|
+
interface MultiStepProps extends PConnProps {
|
|
9
|
+
// If any, enter additional props that only exist on this component
|
|
10
|
+
itemKey: string;
|
|
11
|
+
actionButtons: any[];
|
|
12
|
+
onButtonPress: any;
|
|
13
|
+
bIsVertical: boolean;
|
|
14
|
+
arNavigationSteps: any[];
|
|
15
|
+
}
|
|
134
16
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
{arNavigationSteps.map((mainStep, index) => {
|
|
139
|
-
return (
|
|
140
|
-
<React.Fragment key={mainStep.actionID}>
|
|
141
|
-
<div className="psdk-horizontal-step-header">
|
|
142
|
-
<div className={ _getHIconClass(mainStep.visited_status)}>
|
|
143
|
-
<div className="psdk-horizontal-step-icon-content">
|
|
144
|
-
<span>{index + 1}</span>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
<div className={ _getHLabelClass(mainStep.visited_status)}>
|
|
148
|
-
<div className="psdk-horizontal-step-text-label">
|
|
149
|
-
{mainStep.name}
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
{ _showHLine(index) &&
|
|
154
|
-
<div className="psdk-horizontal-step-line"></div>
|
|
155
|
-
}
|
|
156
|
-
</React.Fragment>
|
|
157
|
-
)})}
|
|
158
|
-
</div>
|
|
159
|
-
{arNavigationSteps.map((mainStep) => {
|
|
160
|
-
return (
|
|
161
|
-
<React.Fragment key={mainStep.actionID}>
|
|
162
|
-
{mainStep.steps &&
|
|
163
|
-
<React.Fragment>
|
|
164
|
-
<ul style={{paddingInlineStart: "0rem", marginLeft: "35px"}}>
|
|
165
|
-
{mainStep.steps.map((subStep) => (
|
|
166
|
-
<React.Fragment>
|
|
167
|
-
<li className="psdk-sub-step-list">
|
|
168
|
-
<div style={{display: "inline-flex"}}>
|
|
169
|
-
{subStep.visited_status === 'current' &&
|
|
170
|
-
<img className="psdk-current-svg-icon" src="{svgCurrent}" />
|
|
171
|
-
}
|
|
172
|
-
{subStep.visited_status !== 'current' &&
|
|
173
|
-
<img className="psdk-not-current-svg-icon" src="{svgNotCurrent}" />
|
|
174
|
-
}
|
|
175
|
-
{subStep.visited_status === 'current' &&
|
|
176
|
-
<label className="psdk-sub-step-current">{subStep.name}</label>
|
|
177
|
-
}
|
|
178
|
-
{subStep.visited_status !== 'current' &&
|
|
179
|
-
<label className="psdk-sub-step-not-current">{subStep.name}</label>
|
|
180
|
-
}
|
|
181
|
-
</div>
|
|
182
|
-
{subStep.visited_status === 'current' &&
|
|
183
|
-
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress} >
|
|
184
|
-
{children}
|
|
185
|
-
</AssignmentCard>
|
|
186
|
-
}
|
|
187
|
-
</li>
|
|
188
|
-
</React.Fragment>
|
|
189
|
-
))}
|
|
190
|
-
|
|
191
|
-
</ul>
|
|
192
|
-
</React.Fragment>
|
|
193
|
-
}
|
|
194
|
-
{ !mainStep?.steps && mainStep.visited_status === 'current' &&
|
|
195
|
-
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress} >
|
|
196
|
-
{children}
|
|
197
|
-
</AssignmentCard>
|
|
198
|
-
}
|
|
199
|
-
</React.Fragment>
|
|
200
|
-
)})}
|
|
201
|
-
</div>
|
|
202
|
-
}
|
|
17
|
+
export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
18
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
19
|
+
const AssignmentCard = getComponentFromMap('AssignmentCard');
|
|
203
20
|
|
|
204
|
-
|
|
21
|
+
const { getPConnect, children, itemKey = '', actionButtons, onButtonPress } = props;
|
|
22
|
+
const { bIsVertical, arNavigationSteps } = props;
|
|
23
|
+
|
|
24
|
+
// const svgCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
|
|
25
|
+
// const svgNotCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
|
|
26
|
+
|
|
27
|
+
function _getVIconClass(status): string {
|
|
28
|
+
if (status === 'current') {
|
|
29
|
+
return 'psdk-vertical-step-icon-selected';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return 'psdk-vertical-step-icon';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function _getVLabelClass(status): string {
|
|
36
|
+
if (status === 'current') {
|
|
37
|
+
return 'psdk-vertical-step-label-selected';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return 'psdk-vertical-step-label';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function _getVBodyClass(index: number): string {
|
|
44
|
+
if (index < arNavigationSteps.length - 1) {
|
|
45
|
+
return 'psdk-vertical-step-body psdk-vertical-step-line';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return 'psdk-vertical-step-body';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function _getHIconClass(status): string {
|
|
52
|
+
if (status === 'current') {
|
|
53
|
+
return 'psdk-horizontal-step-icon-selected';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return 'psdk-horizontal-step-icon';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function _getHLabelClass(status): string {
|
|
60
|
+
if (status === 'current') {
|
|
61
|
+
return 'psdk-horizontal-step-label-selected';
|
|
62
|
+
}
|
|
205
63
|
|
|
206
|
-
|
|
64
|
+
return 'psdk-horizontal-step-label';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function _showHLine(index: number): boolean {
|
|
68
|
+
// eslint-disable-next-line sonarjs/prefer-single-boolean-return
|
|
69
|
+
if (index < arNavigationSteps.length - 1) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
207
75
|
|
|
208
|
-
|
|
76
|
+
function buttonPress(sAction: string, sButtonType: string) {
|
|
77
|
+
onButtonPress(sAction, sButtonType);
|
|
209
78
|
}
|
|
210
79
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
80
|
+
return (
|
|
81
|
+
<div>
|
|
82
|
+
{bIsVertical ? (
|
|
83
|
+
<div className='psdk-vertical-stepper'>
|
|
84
|
+
{arNavigationSteps.map((mainStep, index) => {
|
|
85
|
+
return (
|
|
86
|
+
<React.Fragment key={mainStep.actionID}>
|
|
87
|
+
<div className='psdk-vertical-step'>
|
|
88
|
+
<div className='psdk-vertical-step-header'>
|
|
89
|
+
<div className={_getVIconClass(mainStep.visited_status)}>
|
|
90
|
+
<div className='psdk-vertical-step-icon-content'>
|
|
91
|
+
<span>{index + 1}</span>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div className={_getVLabelClass(mainStep.visited_status)}>{mainStep.name}</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div className={_getVBodyClass(index)}>
|
|
97
|
+
{mainStep?.steps && (
|
|
98
|
+
<ul
|
|
99
|
+
style={{
|
|
100
|
+
paddingInlineStart: '0rem',
|
|
101
|
+
marginLeft: '-7px'
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
{mainStep.steps.forEach(subStep => {
|
|
105
|
+
<li className='psdk-sub-step-list'>
|
|
106
|
+
<div style={{ display: 'inline-flex' }}>
|
|
107
|
+
{subStep.visited_status === 'current' && <img className='psdk-current-svg-icon' src='{svgCurrent}' />}
|
|
108
|
+
{subStep.visited_status !== 'current' && <img className='psdk-not-current-svg-icon' src='{svgNotCurrent}' />}
|
|
109
|
+
{subStep.visited_status === 'current' && <label className='psdk-sub-step-current'>{subStep.name}</label>}
|
|
110
|
+
{subStep.visited_status !== 'current' && <label className='psdk-sub-step-not-current'>{subStep.name}</label>}
|
|
111
|
+
</div>
|
|
112
|
+
{subStep.visited_status === 'current' && (
|
|
113
|
+
<div>
|
|
114
|
+
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
|
|
115
|
+
{children}
|
|
116
|
+
</AssignmentCard>
|
|
117
|
+
</div>
|
|
118
|
+
)}
|
|
119
|
+
</li>;
|
|
120
|
+
})}
|
|
121
|
+
</ul>
|
|
122
|
+
)}
|
|
123
|
+
{!mainStep?.steps && mainStep.visited_status === 'current' && (
|
|
124
|
+
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
|
|
125
|
+
{children}
|
|
126
|
+
</AssignmentCard>
|
|
127
|
+
)}
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</React.Fragment>
|
|
131
|
+
);
|
|
132
|
+
})}
|
|
133
|
+
</div>
|
|
134
|
+
) : (
|
|
135
|
+
<div className='psdk-horizontal-stepper'>
|
|
136
|
+
<div className='psdk-horizontal-stepper-header-container'>
|
|
137
|
+
{arNavigationSteps.map((mainStep, index) => {
|
|
138
|
+
return (
|
|
139
|
+
<React.Fragment key={mainStep.actionID}>
|
|
140
|
+
<div className='psdk-horizontal-step-header'>
|
|
141
|
+
<div className={_getHIconClass(mainStep.visited_status)}>
|
|
142
|
+
<div className='psdk-horizontal-step-icon-content'>
|
|
143
|
+
<span>{index + 1}</span>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
<div className={_getHLabelClass(mainStep.visited_status)}>
|
|
147
|
+
<div className='psdk-horizontal-step-text-label'>{mainStep.name}</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
{_showHLine(index) && <div className='psdk-horizontal-step-line' />}
|
|
151
|
+
</React.Fragment>
|
|
152
|
+
);
|
|
153
|
+
})}
|
|
154
|
+
</div>
|
|
155
|
+
{arNavigationSteps.map(mainStep => {
|
|
156
|
+
return (
|
|
157
|
+
<React.Fragment key={mainStep.actionID}>
|
|
158
|
+
{mainStep.steps && (
|
|
159
|
+
<ul style={{ paddingInlineStart: '0rem', marginLeft: '35px' }}>
|
|
160
|
+
{mainStep.steps.map(subStep => (
|
|
161
|
+
<li className='psdk-sub-step-list'>
|
|
162
|
+
<div style={{ display: 'inline-flex' }}>
|
|
163
|
+
{subStep.visited_status === 'current' && <img className='psdk-current-svg-icon' src='{svgCurrent}' />}
|
|
164
|
+
{subStep.visited_status !== 'current' && <img className='psdk-not-current-svg-icon' src='{svgNotCurrent}' />}
|
|
165
|
+
{subStep.visited_status === 'current' && <label className='psdk-sub-step-current'>{subStep.name}</label>}
|
|
166
|
+
{subStep.visited_status !== 'current' && <label className='psdk-sub-step-not-current'>{subStep.name}</label>}
|
|
167
|
+
</div>
|
|
168
|
+
{subStep.visited_status === 'current' && (
|
|
169
|
+
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
|
|
170
|
+
{children}
|
|
171
|
+
</AssignmentCard>
|
|
172
|
+
)}
|
|
173
|
+
</li>
|
|
174
|
+
))}
|
|
175
|
+
</ul>
|
|
176
|
+
)}
|
|
177
|
+
{!mainStep?.steps && mainStep.visited_status === 'current' && (
|
|
178
|
+
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
|
|
179
|
+
{children}
|
|
180
|
+
</AssignmentCard>
|
|
181
|
+
)}
|
|
182
|
+
</React.Fragment>
|
|
183
|
+
);
|
|
184
|
+
})}
|
|
185
|
+
</div>
|
|
186
|
+
)}
|
|
187
|
+
</div>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './MultiStep';
|
|
1
|
+
export { default } from './MultiStep';
|