@topconsultnpm/sdkui-react-beta 6.10.73 → 6.10.74
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.
|
@@ -16,5 +16,5 @@ interface ITMResultDialogProps {
|
|
|
16
16
|
declare const TMResultDialog: React.FC<ITMResultDialogProps>;
|
|
17
17
|
export default TMResultDialog;
|
|
18
18
|
export declare class TMResultManager {
|
|
19
|
-
static show(result: ResultInfo[], title: string, id1Caption: string | undefined, id2Caption: string | undefined): void;
|
|
19
|
+
static show(result: ResultInfo[], title: string, id1Caption: string | undefined, id2Caption: string | undefined, customMsg?: string, customDuration?: number): void;
|
|
20
20
|
}
|
|
@@ -23,11 +23,11 @@ const TMResultDialog = ({ title, result, id1Caption, id2Caption }) => {
|
|
|
23
23
|
};
|
|
24
24
|
export default TMResultDialog;
|
|
25
25
|
export class TMResultManager {
|
|
26
|
-
static show(result, title, id1Caption, id2Caption) {
|
|
26
|
+
static show(result, title, id1Caption, id2Caption, customMsg, customDuration) {
|
|
27
27
|
const warningsCount = result.filter(o => o.resultType == ResultTypes.WARNING).length;
|
|
28
28
|
const errorsCount = result.filter(o => o.resultType == ResultTypes.ERROR).length;
|
|
29
29
|
if (warningsCount <= 0 && errorsCount <= 0) {
|
|
30
|
-
ShowAlert({ message: SDKUI_Localizator.OperationSuccess, mode: 'success', duration: 3000, title: title });
|
|
30
|
+
ShowAlert({ message: customMsg && customMsg.length > 0 ? customMsg : SDKUI_Localizator.OperationSuccess, mode: 'success', duration: customDuration && customDuration > 0 ? customDuration : 3000, title: title });
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
let container = document.createElement('div');
|