@pega/sdk 0.0.13 → 0.0.15
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/README.md +46 -6
- package/dist/index.js +50 -24
- package/package.json +42 -3
- package/templates/angular-sdk-reference/extra-webpack.config.cjs +23 -0
- package/templates/angular-sdk-reference/index.html +12 -0
- package/templates/angular-sdk-reference/src/app/pconnect-renderer.component.ts +153 -0
- package/templates/angular-sdk-reference/src/components/component-map.ts +90 -0
- package/templates/angular-sdk-reference/src/components/fields/auto-complete/auto-complete.component.ts +304 -0
- package/templates/angular-sdk-reference/src/components/fields/checkbox/checkbox.component.ts +89 -0
- package/templates/angular-sdk-reference/src/components/fields/currency/currency.component.ts +112 -0
- package/templates/angular-sdk-reference/src/components/fields/date-input/date-input.component.ts +101 -0
- package/templates/angular-sdk-reference/src/components/fields/dropdown/dropdown.component.ts +118 -0
- package/templates/angular-sdk-reference/src/components/fields/email/email.component.ts +104 -0
- package/templates/angular-sdk-reference/src/components/fields/integer/integer.component.ts +106 -0
- package/templates/angular-sdk-reference/src/components/fields/phone/phone.component.ts +104 -0
- package/templates/angular-sdk-reference/src/components/fields/radio-buttons/radio-buttons.component.ts +113 -0
- package/templates/angular-sdk-reference/src/components/fields/text-area/text-area.component.ts +111 -0
- package/templates/angular-sdk-reference/src/components/fields/text-input/text-input.component.ts +110 -0
- package/templates/angular-sdk-reference/src/components/fields/url-input/url-input.component.ts +113 -0
- package/templates/angular-sdk-reference/src/components/helpers/sdk-helpers.ts +93 -0
- package/templates/angular-sdk-reference/src/components/infra/assignment/assignment.component.ts +206 -0
- package/templates/angular-sdk-reference/src/components/infra/case-summary/case-summary.component.ts +75 -0
- package/templates/angular-sdk-reference/src/components/infra/case-view/case-view.component.ts +126 -0
- package/templates/angular-sdk-reference/src/components/infra/flow-container/flow-container.component.ts +411 -0
- package/templates/angular-sdk-reference/src/components/infra/reference/reference.component.ts +158 -0
- package/templates/angular-sdk-reference/src/components/infra/region/region.component.ts +39 -0
- package/templates/angular-sdk-reference/src/components/infra/root-container/root-container.component.ts +199 -0
- package/templates/angular-sdk-reference/src/components/infra/stages/stages.component.ts +89 -0
- package/templates/angular-sdk-reference/src/components/infra/view/view.component.ts +144 -0
- package/templates/angular-sdk-reference/src/components/infra/view-container/view-container.component.ts +191 -0
- package/templates/angular-sdk-reference/src/components/templates/default-form/default-form.component.ts +105 -0
- package/templates/angular-sdk-reference/src/components/templates/narrow-wide/narrow-wide.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/one-column/one-column.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/two-column/two-column.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/wide-narrow/wide-narrow.component.ts +37 -0
- package/templates/angular-sdk-reference/tsconfig.app.json +13 -0
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +75 -34
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +74 -38
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +33 -1
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +57 -22
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +25 -10
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +40 -19
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +62 -1
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +26 -4
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +84 -33
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +46 -26
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +28 -15
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-infra-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/identify-components.md +2 -0
- package/templates/react-sdk-reference/.ai-common/prompts/replace-design-system.md +44 -17
- package/templates/react-sdk-reference/.ai-common/skills/connect-pega-server.md +14 -1
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AssignmentHeader.md +79 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Toast.md +96 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +56 -35
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +29 -3
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +97 -37
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +91 -60
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +88 -30
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +133 -101
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedData.md +385 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedDataMulti.md +506 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +549 -86
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +181 -83
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +13 -1
- package/templates/react-sdk-reference/.ai-common/skills/portal-flow/run-and-verify-portal.md +290 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +13 -1
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +125 -153
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +90 -81
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +13 -1
- package/templates/react-sdk-reference/assets/icons/trash.svg +3 -0
- package/templates/react-sdk-reference/index.html +0 -1
- package/templates/react-sdk-reference/package.json +2 -2
- package/templates/react-sdk-reference/package.minimal.json +2 -2
- package/templates/react-sdk-reference/sdk-config.json +3 -3
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +1 -1
- package/templates/react-sdk-reference/src/MashupApp.tsx +33 -78
- package/templates/react-sdk-reference/src/PortalApp.tsx +23 -100
- package/templates/react-sdk-reference/src/components/component-map.ts +15 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/AssignmentHeader.tsx +15 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +1 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +1 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +16 -4
- package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/ModalDialog.tsx +26 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/Toast.tsx +35 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +362 -24
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +3 -1
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +6 -3
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +4 -3
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +2 -0
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/EmbeddedDataMulti.tsx +121 -0
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +40 -20
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +554 -49
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +111 -20
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +4 -3
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +1 -1
- package/templates/react-sdk-reference/src/components/helpers/field-utils.ts +44 -0
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +19 -7
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/DataViewActionButtons.tsx +97 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +53 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +3 -1
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +4 -4
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +7 -3
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +173 -99
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +63 -56
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +1 -1
- package/templates/react-sdk-reference/vite.config.ts +26 -4
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +0 -47
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +0 -50
- package/templates/react-sdk-reference/.ai-common/instructions/infra-component.md +0 -76
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +0 -43
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +0 -45
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +0 -311
- package/templates/react-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
|
@@ -2,9 +2,13 @@ import { Utils } from '../../helpers/utils';
|
|
|
2
2
|
|
|
3
3
|
export const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
4
4
|
|
|
5
|
-
const getLeafNameFromPropertyName = (property) => property?.substr(property.lastIndexOf('.'));
|
|
5
|
+
const getLeafNameFromPropertyName = (property: string) => property?.substr(property.lastIndexOf('.') + 1);
|
|
6
6
|
|
|
7
|
-
const isSelfReferencedProperty = (param, referenceProp) =>
|
|
7
|
+
const isSelfReferencedProperty = (param: string, referenceProp: string) => {
|
|
8
|
+
const propName = getPropertyValue(param);
|
|
9
|
+
const propNameAfterDot = propName.substring(propName.indexOf('.') + 1);
|
|
10
|
+
return referenceProp?.includes(propNameAfterDot);
|
|
11
|
+
};
|
|
8
12
|
|
|
9
13
|
export const AT_FILTEREDLIST = '@FILTERED_LIST';
|
|
10
14
|
export const AT_PROPERTY = '@P';
|
|
@@ -17,13 +21,13 @@ export const PAGELIST = '!PL!';
|
|
|
17
21
|
export const PERIOD = '.';
|
|
18
22
|
const AT = '@';
|
|
19
23
|
|
|
20
|
-
export function updatePageListPropertyValue(value) {
|
|
24
|
+
export function updatePageListPropertyValue(value: string) {
|
|
21
25
|
value =
|
|
22
26
|
value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);
|
|
23
27
|
return value;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
|
-
export function getPropertyValue(value) {
|
|
30
|
+
export function getPropertyValue(value: string) {
|
|
27
31
|
if (value.startsWith(AT)) {
|
|
28
32
|
value = value.substring(value.indexOf(' ') + 1);
|
|
29
33
|
if (value.startsWith(PERIOD)) value = value.substring(1);
|
|
@@ -34,25 +38,38 @@ export function getPropertyValue(value) {
|
|
|
34
38
|
return value;
|
|
35
39
|
}
|
|
36
40
|
|
|
37
|
-
const
|
|
41
|
+
const getReferenceProp = (config: any) => {
|
|
42
|
+
if (config.mode === SELECTION_MODE.MULTI) {
|
|
43
|
+
return config?.pagelistValue?.substring(4) ?? '';
|
|
44
|
+
}
|
|
45
|
+
const property = config.value;
|
|
46
|
+
const arr = property?.split('.') ?? [];
|
|
47
|
+
if (arr.length > 1) {
|
|
48
|
+
arr.pop();
|
|
49
|
+
return arr.slice(1).join('.');
|
|
50
|
+
}
|
|
51
|
+
return '';
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const getCompositeKeys = (c11nEnv: any, property: string) => {
|
|
38
55
|
const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};
|
|
39
|
-
return Object.values(parameters).reduce((compositeKeys:
|
|
40
|
-
if (isSelfReferencedProperty(
|
|
56
|
+
return Object.values(parameters).reduce((compositeKeys: string[], param: any) => {
|
|
57
|
+
if (isSelfReferencedProperty(param, property)) {
|
|
41
58
|
let propName = getPropertyValue(param);
|
|
42
|
-
propName = propName.substring(propName.indexOf('.'));
|
|
59
|
+
propName = propName.substring(propName.indexOf('.') + 1);
|
|
43
60
|
compositeKeys.push(propName);
|
|
44
61
|
}
|
|
45
62
|
return compositeKeys;
|
|
46
63
|
}, []);
|
|
47
64
|
};
|
|
48
65
|
|
|
49
|
-
export const generateColumns = (config, pConn, referenceType) => {
|
|
66
|
+
export const generateColumns = (config: any, pConn: any, referenceType: string) => {
|
|
50
67
|
const displayField = getLeafNameFromPropertyName(config.displayField);
|
|
51
|
-
const referenceProp = config
|
|
52
|
-
const compositeKeys
|
|
53
|
-
let value = getLeafNameFromPropertyName(config.value);
|
|
68
|
+
const referenceProp = getReferenceProp(config);
|
|
69
|
+
const compositeKeys = getCompositeKeys(pConn, referenceProp);
|
|
70
|
+
let value = getLeafNameFromPropertyName(config.mode === SELECTION_MODE.MULTI ? config.selectionKey : config.value);
|
|
54
71
|
|
|
55
|
-
const columns: any = [];
|
|
72
|
+
const columns: any[] = [];
|
|
56
73
|
if (displayField) {
|
|
57
74
|
columns.push({
|
|
58
75
|
value: displayField,
|
|
@@ -62,6 +79,9 @@ export const generateColumns = (config, pConn, referenceType) => {
|
|
|
62
79
|
});
|
|
63
80
|
}
|
|
64
81
|
if (value && compositeKeys.indexOf(value) !== -1) {
|
|
82
|
+
if (!config.value) {
|
|
83
|
+
config.value = `@P .${referenceProp}.${value}`;
|
|
84
|
+
}
|
|
65
85
|
columns.push({
|
|
66
86
|
value,
|
|
67
87
|
setProperty: 'Associated property',
|
|
@@ -69,7 +89,7 @@ export const generateColumns = (config, pConn, referenceType) => {
|
|
|
69
89
|
});
|
|
70
90
|
} else {
|
|
71
91
|
const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;
|
|
72
|
-
config.value = `@P .${referenceProp}
|
|
92
|
+
config.value = `@P .${referenceProp}.${actualValue}`;
|
|
73
93
|
value = actualValue;
|
|
74
94
|
columns.push({
|
|
75
95
|
value: actualValue,
|
|
@@ -80,9 +100,9 @@ export const generateColumns = (config, pConn, referenceType) => {
|
|
|
80
100
|
|
|
81
101
|
config.datasource = {
|
|
82
102
|
fields: {
|
|
83
|
-
key: getLeafNameFromPropertyName(config.value)
|
|
84
|
-
text: getLeafNameFromPropertyName(config.displayField)
|
|
85
|
-
value: getLeafNameFromPropertyName(config.value)
|
|
103
|
+
key: `.${getLeafNameFromPropertyName(config.value)}`,
|
|
104
|
+
text: `.${getLeafNameFromPropertyName(config.displayField)}`,
|
|
105
|
+
value: `.${getLeafNameFromPropertyName(config.value)}`,
|
|
86
106
|
},
|
|
87
107
|
};
|
|
88
108
|
|
|
@@ -96,17 +116,88 @@ export const generateColumns = (config, pConn, referenceType) => {
|
|
|
96
116
|
}
|
|
97
117
|
|
|
98
118
|
compositeKeys.forEach((key) => {
|
|
119
|
+
const descriptorsFieldName = `.${key}`;
|
|
99
120
|
if (value !== key)
|
|
100
121
|
columns.push({
|
|
101
|
-
value:
|
|
122
|
+
value: descriptorsFieldName,
|
|
102
123
|
display: 'false',
|
|
103
124
|
secondary: 'true',
|
|
104
125
|
useForSearch: false,
|
|
105
|
-
setProperty: `.${referenceProp}
|
|
126
|
+
setProperty: `.${referenceProp}.${key}`,
|
|
106
127
|
});
|
|
107
128
|
});
|
|
108
129
|
|
|
109
130
|
config.columns = columns;
|
|
110
131
|
};
|
|
111
132
|
|
|
112
|
-
export const
|
|
133
|
+
export const addCompositeKeysToConfig = (config: any, pConn: any) => {
|
|
134
|
+
const referenceProp = getReferenceProp(config);
|
|
135
|
+
const fieldMetadata = pConn.getFieldMetadata(referenceProp) || {};
|
|
136
|
+
const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
|
|
137
|
+
const compositeKeys: string[] = [];
|
|
138
|
+
Object.values(fieldParameters).forEach((param: any) => {
|
|
139
|
+
if (isSelfReferencedProperty(param, referenceProp)) {
|
|
140
|
+
compositeKeys.push(param);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
config.compositeKeys = compositeKeys;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const getDataRelationshipContextFromKey = (key: string) => {
|
|
147
|
+
const firstIndexOfDot = key.indexOf('.');
|
|
148
|
+
if (firstIndexOfDot > -1) {
|
|
149
|
+
const lastIndexOfDot = key.lastIndexOf('.');
|
|
150
|
+
if (lastIndexOfDot > firstIndexOfDot) {
|
|
151
|
+
return key.substring(firstIndexOfDot + 1, lastIndexOfDot);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return '';
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export const createNewRecord = ({
|
|
158
|
+
referenceType,
|
|
159
|
+
disableStartingFieldsForReference,
|
|
160
|
+
pConn,
|
|
161
|
+
contextClass,
|
|
162
|
+
startingFields,
|
|
163
|
+
getPConnect,
|
|
164
|
+
}: {
|
|
165
|
+
referenceType: string;
|
|
166
|
+
disableStartingFieldsForReference: boolean;
|
|
167
|
+
pConn: any;
|
|
168
|
+
contextClass: string;
|
|
169
|
+
startingFields: Record<string, any>;
|
|
170
|
+
getPConnect: any;
|
|
171
|
+
}) => {
|
|
172
|
+
if (referenceType === 'Case') {
|
|
173
|
+
if (!disableStartingFieldsForReference) {
|
|
174
|
+
startingFields[
|
|
175
|
+
(PCore as any).getNameSpaceUtils?.()?.getDefaultQualifiedName('pyAddCaseContextPage') ?? 'pyAddCaseContextPage'
|
|
176
|
+
] = {
|
|
177
|
+
pyID: pConn.getCaseInfo().getKey()?.split(' ')?.pop(),
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
return pConn.getActionsApi().createWork(contextClass, {
|
|
181
|
+
openCaseViewAfterCreate: false,
|
|
182
|
+
startingFields,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
if (referenceType === 'Data') {
|
|
186
|
+
return getPConnect().getActionsApi().showDataObjectCreateView(contextClass);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export const getAdditionalInfo = (pConn: any, propertyName: string) => {
|
|
191
|
+
const parentFieldMetadata = pConn.getFieldMetadata(getDataRelationshipContextFromKey(propertyName));
|
|
192
|
+
return parentFieldMetadata?.additionalInformation
|
|
193
|
+
? {
|
|
194
|
+
content: parentFieldMetadata.additionalInformation,
|
|
195
|
+
}
|
|
196
|
+
: undefined;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export const camelCase = (str: string) => {
|
|
200
|
+
return str
|
|
201
|
+
.replace(/[-_\s]+(.)?/g, (_, char) => (char ? char.toUpperCase() : ''))
|
|
202
|
+
.replace(/^[A-Z]/, (char) => char.toLowerCase());
|
|
203
|
+
};
|
|
@@ -11,6 +11,7 @@ import { format } from '../../helpers/formatters';
|
|
|
11
11
|
as per the locale.
|
|
12
12
|
*/
|
|
13
13
|
interface PercentageProps extends PConnFieldProps {
|
|
14
|
+
variant?: string;
|
|
14
15
|
// If any, enter additional props that only exist on Percentage here
|
|
15
16
|
currencyISOCode?: string;
|
|
16
17
|
showGroupSeparators?: string;
|
|
@@ -42,7 +43,7 @@ export default function Percentage(props: PercentageProps) {
|
|
|
42
43
|
decimalPrecision,
|
|
43
44
|
} = props;
|
|
44
45
|
|
|
45
|
-
const [values, setValues] = useState(value
|
|
46
|
+
const [values, setValues] = useState(value?.toString() ?? '');
|
|
46
47
|
|
|
47
48
|
const pConn = getPConnect();
|
|
48
49
|
const actions = pConn.getActionsApi();
|
|
@@ -53,7 +54,7 @@ export default function Percentage(props: PercentageProps) {
|
|
|
53
54
|
const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
|
|
54
55
|
|
|
55
56
|
useEffect(() => {
|
|
56
|
-
setValues(value
|
|
57
|
+
setValues(value?.toString() ?? '');
|
|
57
58
|
}, [value]);
|
|
58
59
|
|
|
59
60
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
@@ -63,7 +64,7 @@ export default function Percentage(props: PercentageProps) {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
66
|
-
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
|
|
67
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant={props.variant} />;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -6,6 +6,7 @@ import type { PConnFieldProps } from '@pega/sdk-react';
|
|
|
6
6
|
import handleEvent from '../../helpers/event-utils';
|
|
7
7
|
|
|
8
8
|
interface PhoneProps extends PConnFieldProps {
|
|
9
|
+
variant?: string;
|
|
9
10
|
// If any, enter additional props that only exist on Phone here
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -46,7 +47,7 @@ export default function Phone(props: PhoneProps) {
|
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
49
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
50
|
+
return <FieldValueList name={hideLabel ? '' : label} value={value} variant={props.variant} />;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx
CHANGED
|
@@ -180,7 +180,8 @@ export default function SelectableCard(props) {
|
|
|
180
180
|
}}
|
|
181
181
|
>
|
|
182
182
|
{field.name && <div>{field.name}</div>}
|
|
183
|
-
|
|
183
|
+
{/* sdk-react's component creator doesn't spread config props onto the element */}
|
|
184
|
+
<div>{field?.value?.props.getPConnect?.().getConfigProps().value}</div>
|
|
184
185
|
</div>
|
|
185
186
|
))}
|
|
186
187
|
</div>
|
|
@@ -6,6 +6,7 @@ import { getComponentFromRegistry } from '@pega/sdk-react';
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/sdk-react';
|
|
7
7
|
|
|
8
8
|
interface TextAreaProps extends PConnFieldProps {
|
|
9
|
+
variant?: string;
|
|
9
10
|
// If any, enter additional props that only exist on TextArea here
|
|
10
11
|
fieldMetadata?: any;
|
|
11
12
|
}
|
|
@@ -45,7 +46,7 @@ export default function TextArea(props: TextAreaProps) {
|
|
|
45
46
|
}, [value]);
|
|
46
47
|
|
|
47
48
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
48
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
49
|
+
return <FieldValueList name={hideLabel ? '' : label} value={value} variant={props.variant} />;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -6,6 +6,7 @@ import { getComponentFromRegistry } from '@pega/sdk-react';
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/sdk-react';
|
|
7
7
|
|
|
8
8
|
interface TextInputProps extends PConnFieldProps {
|
|
9
|
+
variant?: string;
|
|
9
10
|
// If any, enter additional props that only exist on TextInput here
|
|
10
11
|
fieldMetadata?: any;
|
|
11
12
|
}
|
|
@@ -48,7 +49,7 @@ export default function TextInput(props: TextInputProps) {
|
|
|
48
49
|
}, [value]);
|
|
49
50
|
|
|
50
51
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
51
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
52
|
+
return <FieldValueList name={hideLabel ? '' : label} value={value} variant={props.variant} />;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -7,6 +7,7 @@ import { getComponentFromRegistry } from '@pega/sdk-react';
|
|
|
7
7
|
import type { PConnFieldProps } from '@pega/sdk-react';
|
|
8
8
|
|
|
9
9
|
interface TimeProps extends PConnFieldProps {
|
|
10
|
+
variant?: string;
|
|
10
11
|
// If any, enter additional props that only exist on Time here
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -34,7 +35,7 @@ export default function Time(props: TimeProps) {
|
|
|
34
35
|
const actions = pConn.getActionsApi();
|
|
35
36
|
const propName = (pConn.getStateProps() as any).value;
|
|
36
37
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
37
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
38
|
+
return <FieldValueList name={hideLabel ? '' : label} value={value} variant={props.variant} />;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -6,6 +6,7 @@ import { getComponentFromRegistry } from '@pega/sdk-react';
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/sdk-react';
|
|
7
7
|
|
|
8
8
|
interface URLComponentProps extends PConnFieldProps {
|
|
9
|
+
variant?: string;
|
|
9
10
|
// If any, enter additional props that only exist on URLComponent here
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -45,7 +46,7 @@ export default function URLComponent(props: URLComponentProps) {
|
|
|
45
46
|
}, [value]);
|
|
46
47
|
|
|
47
48
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
48
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
49
|
+
return <FieldValueList name={hideLabel ? '' : label} value={value} variant={props.variant} />;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -97,7 +97,7 @@ const UserReference = (props: UserReferenceProps) => {
|
|
|
97
97
|
let userReferenceComponent: any = null;
|
|
98
98
|
|
|
99
99
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
100
|
-
return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} />;
|
|
100
|
+
return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} variant={props.variant} />;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import type { SxProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export type Status = 'error' | 'warning' | 'pending' | 'success' | undefined;
|
|
5
|
+
|
|
6
|
+
export interface FormStatusProps {
|
|
7
|
+
showFieldMessage?: boolean;
|
|
8
|
+
messageVisibility?: boolean;
|
|
9
|
+
validatemessage?: string;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const useStatus = ({
|
|
14
|
+
showFieldMessage,
|
|
15
|
+
messageVisibility,
|
|
16
|
+
validatemessage,
|
|
17
|
+
readOnly,
|
|
18
|
+
}: FormStatusProps = {}): Status => {
|
|
19
|
+
const [status, setStatus] = useState<Status>();
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (validatemessage) {
|
|
23
|
+
setStatus('error');
|
|
24
|
+
} else if (showFieldMessage && messageVisibility && !readOnly) {
|
|
25
|
+
setStatus('warning');
|
|
26
|
+
} else {
|
|
27
|
+
setStatus(undefined);
|
|
28
|
+
}
|
|
29
|
+
}, [validatemessage, messageVisibility, readOnly, showFieldMessage]);
|
|
30
|
+
|
|
31
|
+
return status;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const WARNING_FIELD_SX: SxProps = {
|
|
35
|
+
'& .MuiFormHelperText-root': {
|
|
36
|
+
color: 'error.main',
|
|
37
|
+
marginLeft: '0px',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Field warnings render as red helper text on TextField-based inputs
|
|
42
|
+
export const getFieldSx = (status: Status): SxProps | undefined => {
|
|
43
|
+
return status === 'warning' ? WARNING_FIELD_SX : undefined;
|
|
44
|
+
};
|
|
@@ -116,9 +116,12 @@ const SUPPORTED_FIELD_TYPES = [
|
|
|
116
116
|
export const getConfigFields = (rawFields, contextClass, primaryFieldsViewIndex) => {
|
|
117
117
|
let primaryFields: any = [];
|
|
118
118
|
let configFields: any = [];
|
|
119
|
+
const safeRawFields = rawFields || [];
|
|
119
120
|
|
|
120
121
|
if (primaryFieldsViewIndex > -1) {
|
|
121
|
-
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
const qualifiedName = PCore.getNameSpaceUtils?.()?.getDefaultQualifiedName(PRIMARY_FIELDS);
|
|
124
|
+
let primaryFieldVMD: any = PCore.getMetadataUtils().resolveView(qualifiedName);
|
|
122
125
|
if (Array.isArray(primaryFieldVMD)) {
|
|
123
126
|
primaryFieldVMD = primaryFieldVMD.find((primaryFieldView) => primaryFieldView.classID === contextClass);
|
|
124
127
|
primaryFields = primaryFieldVMD?.children?.[0]?.children || [];
|
|
@@ -132,9 +135,9 @@ export const getConfigFields = (rawFields, contextClass, primaryFieldsViewIndex)
|
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
configFields = [
|
|
135
|
-
...
|
|
138
|
+
...safeRawFields.slice(0, primaryFieldsViewIndex),
|
|
136
139
|
...primaryFields,
|
|
137
|
-
...
|
|
140
|
+
...safeRawFields.slice(primaryFieldsViewIndex + 1),
|
|
138
141
|
];
|
|
139
142
|
// filter duplicate fields after combining raw fields and primary fields
|
|
140
143
|
return configFields.filter(
|
|
@@ -215,9 +218,11 @@ export function getFieldLabel(fieldConfig) {
|
|
|
215
218
|
export const updateFieldLabels = (fields, configFields, primaryFieldsViewIndex, pConnect, options) => {
|
|
216
219
|
const labelsOfFields: any = [];
|
|
217
220
|
const { columnsRawConfig = [] } = options;
|
|
221
|
+
// @ts-ignore
|
|
222
|
+
const qualifiedPrimaryFields = PCore.getNameSpaceUtils?.()?.getDefaultQualifiedName(PRIMARY_FIELDS);
|
|
218
223
|
fields.forEach((field, idx) => {
|
|
219
224
|
const rawColumnConfig = columnsRawConfig[idx]?.config;
|
|
220
|
-
if (field.config.value === PRIMARY_FIELDS) {
|
|
225
|
+
if (field.config.value === PRIMARY_FIELDS || field.config.value === qualifiedPrimaryFields) {
|
|
221
226
|
labelsOfFields.push('');
|
|
222
227
|
} else if (isFLProperty(rawColumnConfig?.label ?? rawColumnConfig?.caption)) {
|
|
223
228
|
labelsOfFields.push(getFieldLabel(rawColumnConfig) || field.config.label || field.config.caption);
|
|
@@ -234,7 +239,7 @@ export const updateFieldLabels = (fields, configFields, primaryFieldsViewIndex,
|
|
|
234
239
|
let label = configFields[i].config?.label;
|
|
235
240
|
if (isFLProperty(label)) {
|
|
236
241
|
label = getFieldLabel(configFields[i].config);
|
|
237
|
-
} else if (label
|
|
242
|
+
} else if (label?.startsWith('@')) {
|
|
238
243
|
label = label.substring(3);
|
|
239
244
|
}
|
|
240
245
|
if (pConnect) {
|
|
@@ -259,12 +264,19 @@ export const buildFieldsForTable = (configFields, pConnect, showDeleteButton, op
|
|
|
259
264
|
});
|
|
260
265
|
|
|
261
266
|
const fieldDefs = configFields.map((field, index) => {
|
|
267
|
+
let name = field.config.value;
|
|
268
|
+
if (name.startsWith('@')) {
|
|
269
|
+
name = name.substring(name.indexOf(' ') + 1);
|
|
270
|
+
}
|
|
271
|
+
if (name.startsWith('.')) {
|
|
272
|
+
name = name.substring(1);
|
|
273
|
+
}
|
|
262
274
|
return {
|
|
263
275
|
type: 'text',
|
|
264
276
|
label: fieldsLabels[index],
|
|
265
277
|
fillAvailableSpace: !!field.config.fillAvailableSpace,
|
|
266
278
|
id: `${index}`,
|
|
267
|
-
name
|
|
279
|
+
name,
|
|
268
280
|
cellRenderer: TABLE_CELL,
|
|
269
281
|
sort: false,
|
|
270
282
|
noContextMenu: true,
|
|
@@ -273,7 +285,7 @@ export const buildFieldsForTable = (configFields, pConnect, showDeleteButton, op
|
|
|
273
285
|
...field,
|
|
274
286
|
},
|
|
275
287
|
// BUG-615253: Workaround for autosize in table with lazy loading components
|
|
276
|
-
width: getFieldWidth(field,
|
|
288
|
+
width: getFieldWidth(field, fieldsLabels[index]),
|
|
277
289
|
};
|
|
278
290
|
});
|
|
279
291
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
|
+
import Divider from '@mui/material/Divider';
|
|
4
|
+
import type { PConnProps } from '@pega/sdk-react';
|
|
5
|
+
|
|
6
|
+
function getActionLabel(action: unknown, constants: { RESOURCE_STATUS: { UPDATE?: unknown } }) {
|
|
7
|
+
return action === constants.RESOURCE_STATUS.UPDATE ? 'Update' : 'Submit';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface DataViewActionButtonsProps extends PConnProps {
|
|
11
|
+
context: string;
|
|
12
|
+
classId: string;
|
|
13
|
+
dataObjectAction: string;
|
|
14
|
+
dataRecordKeys: string;
|
|
15
|
+
actionID: string;
|
|
16
|
+
closeActionsDialog: () => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function DataViewActionButtons(props: DataViewActionButtonsProps) {
|
|
20
|
+
const { getPConnect, context, classId, dataObjectAction, dataRecordKeys, actionID } = props;
|
|
21
|
+
|
|
22
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
23
|
+
const localeCategory = 'Data Object';
|
|
24
|
+
const actionsAPI = getPConnect().getActionsApi();
|
|
25
|
+
const constants = PCore.getConstants();
|
|
26
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
27
|
+
|
|
28
|
+
const resourceStatus = constants.RESOURCE_STATUS[dataObjectAction];
|
|
29
|
+
const actionName = localizedVal(getActionLabel(resourceStatus, constants), localeCategory);
|
|
30
|
+
|
|
31
|
+
function handleCancel() {
|
|
32
|
+
actionsAPI.cancelDataObject(context);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function handleSubmitAction() {
|
|
36
|
+
setIsLoading(true);
|
|
37
|
+
if (resourceStatus === constants.RESOURCE_STATUS.CREATE) {
|
|
38
|
+
actionsAPI
|
|
39
|
+
.createDataObject(context)
|
|
40
|
+
.then((data) => {
|
|
41
|
+
PCore.getPubSubUtils().publish(constants.PUB_SUB_EVENTS.DATA_EVENTS.DATA_OBJECT_CREATED, {
|
|
42
|
+
classId,
|
|
43
|
+
data,
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.catch(() => {
|
|
47
|
+
// Error messages are handled by the infrastructure via httpMessages/pageMessages
|
|
48
|
+
})
|
|
49
|
+
.finally(() => {
|
|
50
|
+
setIsLoading(false);
|
|
51
|
+
});
|
|
52
|
+
} else if (resourceStatus === constants.RESOURCE_STATUS.UPDATE) {
|
|
53
|
+
actionsAPI
|
|
54
|
+
.updateDataObject(context, JSON.parse(dataRecordKeys))
|
|
55
|
+
.then(() => {
|
|
56
|
+
PCore.getPubSubUtils().publish(constants.PUB_SUB_EVENTS.DATA_EVENTS.DATA_OBJECT_UPDATED, {
|
|
57
|
+
classId,
|
|
58
|
+
});
|
|
59
|
+
})
|
|
60
|
+
.catch(() => {
|
|
61
|
+
// Error messages are handled by the infrastructure via httpMessages/pageMessages
|
|
62
|
+
})
|
|
63
|
+
.finally(() => {
|
|
64
|
+
setIsLoading(false);
|
|
65
|
+
});
|
|
66
|
+
} else if (resourceStatus === constants.RESOURCE_STATUS.OPEN_FLOW_ACTION) {
|
|
67
|
+
actionsAPI
|
|
68
|
+
.submitDataObjectAction(context, JSON.parse(dataRecordKeys), actionID)
|
|
69
|
+
.then(() => {
|
|
70
|
+
PCore.getPubSubUtils().publish(constants.PUB_SUB_EVENTS.DATA_EVENTS.DATA_OBJECT_UPDATED, {
|
|
71
|
+
classId,
|
|
72
|
+
actionID,
|
|
73
|
+
});
|
|
74
|
+
})
|
|
75
|
+
.catch(() => {
|
|
76
|
+
// Error messages are handled by the infrastructure via httpMessages/pageMessages
|
|
77
|
+
})
|
|
78
|
+
.finally(() => {
|
|
79
|
+
setIsLoading(false);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div style={{ padding: '8px 24px 20px 24px' }}>
|
|
86
|
+
<Divider sx={{ my: '10px' }} />
|
|
87
|
+
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
88
|
+
<Button color="secondary" variant="contained" disabled={isLoading} onClick={handleCancel}>
|
|
89
|
+
{localizedVal('Cancel', localeCategory)}
|
|
90
|
+
</Button>
|
|
91
|
+
<Button color="primary" variant="contained" disabled={isLoading} onClick={handleSubmitAction}>
|
|
92
|
+
{actionName}
|
|
93
|
+
</Button>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DataViewActionButtons';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
|
+
import type { PConnProps } from '@pega/sdk-react';
|
|
4
|
+
|
|
5
|
+
interface ListViewActionButtonsProps extends PConnProps {
|
|
6
|
+
context: string;
|
|
7
|
+
closeActionsDialog: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function ListViewActionButtons(props: ListViewActionButtonsProps) {
|
|
11
|
+
const { getPConnect, context, closeActionsDialog } = props;
|
|
12
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
13
|
+
const localeCategory = 'Data Object';
|
|
14
|
+
const [isDisabled, setIsDisabled] = useState(false);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div style={{ display: 'flex', margin: '8px' }}>
|
|
18
|
+
<Button
|
|
19
|
+
sx={{ width: '50%', m: '4px' }}
|
|
20
|
+
variant="contained"
|
|
21
|
+
color="secondary"
|
|
22
|
+
onClick={() => {
|
|
23
|
+
getPConnect().getActionsApi().cancelDataObject(context);
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
{localizedVal('Cancel', localeCategory)}
|
|
27
|
+
</Button>
|
|
28
|
+
<Button
|
|
29
|
+
sx={{ width: '50%', m: '4px' }}
|
|
30
|
+
variant="contained"
|
|
31
|
+
color="primary"
|
|
32
|
+
disabled={isDisabled}
|
|
33
|
+
onClick={() => {
|
|
34
|
+
setIsDisabled(true);
|
|
35
|
+
getPConnect()
|
|
36
|
+
.getActionsApi()
|
|
37
|
+
.submitEmbeddedDataModal(context)
|
|
38
|
+
.then(() => {
|
|
39
|
+
closeActionsDialog();
|
|
40
|
+
})
|
|
41
|
+
.catch((err) => {
|
|
42
|
+
console.log(err);
|
|
43
|
+
})
|
|
44
|
+
.finally(() => {
|
|
45
|
+
setIsDisabled(false);
|
|
46
|
+
});
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
{localizedVal('Submit', localeCategory)}
|
|
50
|
+
</Button>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ListViewActionButtons';
|
|
@@ -206,7 +206,7 @@ export default function SearchGroups(props) {
|
|
|
206
206
|
);
|
|
207
207
|
|
|
208
208
|
const actionButtons = (
|
|
209
|
-
<Box display
|
|
209
|
+
<Box sx={{ display: 'flex', gap: 2 }}>
|
|
210
210
|
<Button variant="outlined" onClick={resetFilterData}>
|
|
211
211
|
{localizedVal('Reset', 'SimpleTable')}
|
|
212
212
|
</Button>
|
|
@@ -256,7 +256,7 @@ export default function SearchGroups(props) {
|
|
|
256
256
|
const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];
|
|
257
257
|
|
|
258
258
|
return (
|
|
259
|
-
<Box display
|
|
259
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
|
260
260
|
{childrenToRender.map((child, index) => (
|
|
261
261
|
<React.Fragment key={index}>{child}</React.Fragment>
|
|
262
262
|
))}
|
|
@@ -64,7 +64,9 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
64
64
|
const secondarySummaryFields = prepareCaseSummaryData(childPConn);
|
|
65
65
|
arSecondaryFields = childPConnData.children;
|
|
66
66
|
arSecondaryFields.forEach((field, index) => {
|
|
67
|
-
field.config.displayLabel = secondarySummaryFields[index]?.value?.props
|
|
67
|
+
field.config.displayLabel = secondarySummaryFields[index]?.value?.props
|
|
68
|
+
?.getPConnect?.()
|
|
69
|
+
.getConfigProps().label;
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
72
|
}
|