@vitrosoftware/common-ui-ts 1.1.127 → 1.1.128
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/css/std/controls/action-handler/action-result-list.css +15 -3
- package/css/std/controls/action-handler/img/warning.svg +10 -0
- package/css/std/controls/action-handler/result-dialog.css +15 -3
- package/dist/index.css +30 -6
- package/dist/index.js +103 -52
- package/dist/index.js.map +1 -1
- package/dist/src/controls/ActionHandler/ActionHandler.d.ts +3 -3
- package/dist/src/controls/ActionHandler/ActionHandlerConstants.d.ts +1 -0
- package/dist/src/controls/ActionHandler/ActionResultItem.d.ts +1 -0
- package/dist/src/controls/ActionHandler/ActionResultList.d.ts +1 -0
- package/dist/src/controls/ActionHandler/ResultDialog.d.ts +3 -1
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +2 -2
- package/src/controls/DxfViewer/js/dxf-viewer.js +14 -14
- package/src/controls/PdfViewer/js/pdf-viewer.js +1 -1
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.vitro-error-message,
|
|
44
|
-
.vitro-success-message
|
|
44
|
+
.vitro-success-message
|
|
45
|
+
.vitro-warning-message {
|
|
45
46
|
font-size: 12px;
|
|
46
47
|
line-height: 16px;
|
|
47
48
|
margin-top: 8px;
|
|
@@ -51,12 +52,18 @@
|
|
|
51
52
|
color: #D13438;
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
.vitro-warning-message {
|
|
56
|
+
color: #c78220;
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
.vitro-success-message {
|
|
55
61
|
color: #198754;
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
.vitro-image-success,
|
|
59
|
-
.vitro-image-error
|
|
65
|
+
.vitro-image-error
|
|
66
|
+
.vitro-image-warning {
|
|
60
67
|
margin-left: 4px;
|
|
61
68
|
flex-shrink: 0;
|
|
62
69
|
height: 24px;
|
|
@@ -74,6 +81,10 @@
|
|
|
74
81
|
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/error.svg');
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
.vitro-image-warning {
|
|
85
|
+
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/warning.svg');
|
|
86
|
+
}
|
|
87
|
+
|
|
77
88
|
.vitro-hidden {
|
|
78
89
|
max-height: 0;
|
|
79
90
|
transition: max-height 0.4s ease;
|
|
@@ -95,7 +106,8 @@
|
|
|
95
106
|
}
|
|
96
107
|
|
|
97
108
|
.vitro-error-message,
|
|
98
|
-
.vitro-success-message
|
|
109
|
+
.vitro-success-message,
|
|
110
|
+
.vitro-warning-message {
|
|
99
111
|
margin-top: 0;
|
|
100
112
|
}
|
|
101
113
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="check-one /Line/Black">
|
|
3
|
+
<path id="Vector" d="M12 22.0039C14.7614 22.0039 17.2614 20.8846 19.071 19.075C20.8807 17.2653 22 14.7653 22 12.0039C22 9.24251 20.8807 6.74251 19.071 4.93284C17.2614 3.1232 14.7614 2.00391 12 2.00391C9.2386 2.00391 6.7386 3.1232 4.92893 4.93284C3.11929 6.74251 2 9.24251 2 12.0039C2 14.7653 3.11929 17.2653 4.92893 19.075C6.7386 20.8846 9.2386 22.0039 12 22.0039Z" fill="#F3AD4A"/>
|
|
4
|
+
<g id="Vector_2">
|
|
5
|
+
<path d="M12 6V12Z" fill="white"/>
|
|
6
|
+
<path d="M12 6V12" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
</g>
|
|
8
|
+
<circle id="Ellipse 135" cx="12" cy="17" r="1" fill="white"/>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.vitro-result-dialog.vitro-success,
|
|
24
|
-
.vitro-result-dialog.vitro-error
|
|
24
|
+
.vitro-result-dialog.vitro-error,
|
|
25
|
+
.vitro-result-dialog.vitro-warning {
|
|
25
26
|
width: 467px;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.vitro-result-dialog.vitro-success .vitro-header,
|
|
29
|
-
.vitro-result-dialog.vitro-error .vitro-header
|
|
30
|
+
.vitro-result-dialog.vitro-error .vitro-header,
|
|
31
|
+
.vitro-result-dialog.vitro-warning .vitro-header {
|
|
30
32
|
padding: 12px 16px 12px 12px;
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -34,10 +36,19 @@
|
|
|
34
36
|
border-left: 4px solid #198754;
|
|
35
37
|
}
|
|
36
38
|
|
|
39
|
+
.vitro-result-dialog.vitro-warning {
|
|
40
|
+
border-left: 4px solid #f3ad4a;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
37
44
|
.vitro-result-dialog.vitro-success .vitro-image {
|
|
38
45
|
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/success.svg');
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
.vitro-result-dialog.vitro-warning .vitro-image {
|
|
49
|
+
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/warning.svg');
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
.vitro-result-dialog.vitro-error {
|
|
42
53
|
border-left: 4px solid #D13438;
|
|
43
54
|
}
|
|
@@ -137,7 +148,8 @@
|
|
|
137
148
|
}
|
|
138
149
|
|
|
139
150
|
.vitro-result-dialog.vitro-success .vitro-header,
|
|
140
|
-
.vitro-result-dialog.vitro-error .vitro-header
|
|
151
|
+
.vitro-result-dialog.vitro-error .vitro-header,
|
|
152
|
+
.vitro-result-dialog.vitro-warning .vitro-header {
|
|
141
153
|
padding: 8px 12px 8px 8px;
|
|
142
154
|
}
|
|
143
155
|
|
package/dist/index.css
CHANGED
|
@@ -1800,7 +1800,8 @@ html, body {
|
|
|
1800
1800
|
}
|
|
1801
1801
|
|
|
1802
1802
|
._action-result-list_vitro-error-message_12OqWLU,
|
|
1803
|
-
._action-result-list_vitro-success-message_1yRyyKc
|
|
1803
|
+
._action-result-list_vitro-success-message_1yRyyKc
|
|
1804
|
+
._action-result-list_vitro-warning-message_2UEX9Kp {
|
|
1804
1805
|
font-size: 12px;
|
|
1805
1806
|
line-height: 16px;
|
|
1806
1807
|
margin-top: 8px;
|
|
@@ -1810,12 +1811,18 @@ html, body {
|
|
|
1810
1811
|
color: #D13438;
|
|
1811
1812
|
}
|
|
1812
1813
|
|
|
1814
|
+
._action-result-list_vitro-warning-message_2UEX9Kp {
|
|
1815
|
+
color: #c78220;
|
|
1816
|
+
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1813
1819
|
._action-result-list_vitro-success-message_1yRyyKc {
|
|
1814
1820
|
color: #198754;
|
|
1815
1821
|
}
|
|
1816
1822
|
|
|
1817
1823
|
._action-result-list_vitro-image-success_2ovrZNi,
|
|
1818
|
-
._action-result-list_vitro-image-error_KGQj2dj
|
|
1824
|
+
._action-result-list_vitro-image-error_KGQj2dj
|
|
1825
|
+
._action-result-list_vitro-image-warning_3SKqDID {
|
|
1819
1826
|
margin-left: 4px;
|
|
1820
1827
|
flex-shrink: 0;
|
|
1821
1828
|
height: 24px;
|
|
@@ -1833,6 +1840,10 @@ html, body {
|
|
|
1833
1840
|
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/error.svg');
|
|
1834
1841
|
}
|
|
1835
1842
|
|
|
1843
|
+
._action-result-list_vitro-image-warning_3SKqDID {
|
|
1844
|
+
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/warning.svg');
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1836
1847
|
._action-result-list_vitro-hidden_1_bZmps {
|
|
1837
1848
|
max-height: 0;
|
|
1838
1849
|
transition: max-height 0.4s ease;
|
|
@@ -1854,7 +1865,8 @@ html, body {
|
|
|
1854
1865
|
}
|
|
1855
1866
|
|
|
1856
1867
|
._action-result-list_vitro-error-message_12OqWLU,
|
|
1857
|
-
._action-result-list_vitro-success-message_1yRyyKc
|
|
1868
|
+
._action-result-list_vitro-success-message_1yRyyKc,
|
|
1869
|
+
._action-result-list_vitro-warning-message_2UEX9Kp {
|
|
1858
1870
|
margin-top: 0;
|
|
1859
1871
|
}
|
|
1860
1872
|
|
|
@@ -1900,12 +1912,14 @@ html, body {
|
|
|
1900
1912
|
}
|
|
1901
1913
|
|
|
1902
1914
|
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-success_3UZikJl,
|
|
1903
|
-
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9
|
|
1915
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9,
|
|
1916
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-warning_1YXyHJC {
|
|
1904
1917
|
width: 467px;
|
|
1905
1918
|
}
|
|
1906
1919
|
|
|
1907
1920
|
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-success_3UZikJl ._result-dialog_vitro-header_2rBOm3x,
|
|
1908
|
-
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9 ._result-dialog_vitro-header_2rBOm3x
|
|
1921
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9 ._result-dialog_vitro-header_2rBOm3x,
|
|
1922
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-warning_1YXyHJC ._result-dialog_vitro-header_2rBOm3x {
|
|
1909
1923
|
padding: 12px 16px 12px 12px;
|
|
1910
1924
|
}
|
|
1911
1925
|
|
|
@@ -1913,10 +1927,19 @@ html, body {
|
|
|
1913
1927
|
border-left: 4px solid #198754;
|
|
1914
1928
|
}
|
|
1915
1929
|
|
|
1930
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-warning_1YXyHJC {
|
|
1931
|
+
border-left: 4px solid #f3ad4a;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
|
|
1916
1935
|
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-success_3UZikJl ._result-dialog_vitro-image_19CVcbX {
|
|
1917
1936
|
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/success.svg');
|
|
1918
1937
|
}
|
|
1919
1938
|
|
|
1939
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-warning_1YXyHJC ._result-dialog_vitro-image_19CVcbX {
|
|
1940
|
+
background-image: url('@vitrosoftware/common-ui-ts/css/std/controls/action-handler/img/warning.svg');
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1920
1943
|
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9 {
|
|
1921
1944
|
border-left: 4px solid #D13438;
|
|
1922
1945
|
}
|
|
@@ -2016,7 +2039,8 @@ html, body {
|
|
|
2016
2039
|
}
|
|
2017
2040
|
|
|
2018
2041
|
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-success_3UZikJl ._result-dialog_vitro-header_2rBOm3x,
|
|
2019
|
-
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9 ._result-dialog_vitro-header_2rBOm3x
|
|
2042
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-error_3-IKuM9 ._result-dialog_vitro-header_2rBOm3x,
|
|
2043
|
+
._result-dialog_vitro-result-dialog_kqxXHts._result-dialog_vitro-warning_1YXyHJC ._result-dialog_vitro-header_2rBOm3x {
|
|
2020
2044
|
padding: 8px 12px 8px 8px;
|
|
2021
2045
|
}
|
|
2022
2046
|
|
package/dist/index.js
CHANGED
|
@@ -130,6 +130,9 @@ var app$1 = {
|
|
|
130
130
|
error: {
|
|
131
131
|
title: "Не удалось выполнить действие “{{actionName}}” \nдля {{errorCount}} из {{count}} элементов"
|
|
132
132
|
},
|
|
133
|
+
warning: {
|
|
134
|
+
title: "Внимание"
|
|
135
|
+
},
|
|
133
136
|
action: {
|
|
134
137
|
saveReport: "Сохранить отчет"
|
|
135
138
|
}
|
|
@@ -60730,6 +60733,7 @@ var LOCALE$2;
|
|
|
60730
60733
|
LOCALE["RESULT_DIALOG_SUCCESS_TITLE"] = "app.common.actionHandler.resultDialog.success.title";
|
|
60731
60734
|
LOCALE["RESULT_DIALOG_SUCCESS_MESSAGE"] = "app.common.actionHandler.resultDialog.success.message";
|
|
60732
60735
|
LOCALE["RESULT_DIALOG_ERROR_TITLE"] = "app.common.actionHandler.resultDialog.error.title";
|
|
60736
|
+
LOCALE["RESULT_DIALOG_WARNING_TITLE"] = "app.common.actionHandler.resultDialog.warning.title";
|
|
60733
60737
|
LOCALE["RESULT_DIALOG_ACTION_SAVE_REPORT"] = "app.common.actionHandler.resultDialog.action.saveReport";
|
|
60734
60738
|
})(LOCALE$2 || (LOCALE$2 = {}));
|
|
60735
60739
|
|
|
@@ -60764,7 +60768,7 @@ var ConfirmDialog = function ConfirmDialog(props) {
|
|
|
60764
60768
|
});
|
|
60765
60769
|
};
|
|
60766
60770
|
|
|
60767
|
-
var styles$k = {"vitro-action-result-list":"_action-result-list_vitro-action-result-list_fJtJWdL","vitro-scrollbar":"_action-result-list_vitro-scrollbar_1mcualw","vitro-result-item":"_action-result-list_vitro-result-item_2AUSpie","vitro-image-container":"_action-result-list_vitro-image-container_ModalRS","vitro-flex-column":"_action-result-list_vitro-flex-column_3z0h2Y_","vitro-name":"_action-result-list_vitro-name_10TEfnU","vitro-error-message":"_action-result-list_vitro-error-message_12OqWLU","vitro-success-message":"_action-result-list_vitro-success-message_1yRyyKc","vitro-image-success":"_action-result-list_vitro-image-success_2ovrZNi","vitro-image-error":"_action-result-list_vitro-image-error_KGQj2dj","vitro-hidden":"_action-result-list_vitro-hidden_1_bZmps","vitro-visible":"_action-result-list_vitro-visible_2K_m-HH"};
|
|
60771
|
+
var styles$k = {"vitro-action-result-list":"_action-result-list_vitro-action-result-list_fJtJWdL","vitro-scrollbar":"_action-result-list_vitro-scrollbar_1mcualw","vitro-result-item":"_action-result-list_vitro-result-item_2AUSpie","vitro-image-container":"_action-result-list_vitro-image-container_ModalRS","vitro-flex-column":"_action-result-list_vitro-flex-column_3z0h2Y_","vitro-name":"_action-result-list_vitro-name_10TEfnU","vitro-error-message":"_action-result-list_vitro-error-message_12OqWLU","vitro-success-message":"_action-result-list_vitro-success-message_1yRyyKc","vitro-warning-message":"_action-result-list_vitro-warning-message_2UEX9Kp","vitro-image-success":"_action-result-list_vitro-image-success_2ovrZNi","vitro-image-error":"_action-result-list_vitro-image-error_KGQj2dj","vitro-image-warning":"_action-result-list_vitro-image-warning_3SKqDID","vitro-hidden":"_action-result-list_vitro-hidden_1_bZmps","vitro-visible":"_action-result-list_vitro-visible_2K_m-HH"};
|
|
60768
60772
|
|
|
60769
60773
|
var ActionResultItem = function ActionResultItem(props) {
|
|
60770
60774
|
return React__default.createElement("div", {
|
|
@@ -60780,9 +60784,9 @@ var ActionResultItem = function ActionResultItem(props) {
|
|
|
60780
60784
|
}, props.name), props.id && React__default.createElement("span", {
|
|
60781
60785
|
className: styles$k['vitro-name']
|
|
60782
60786
|
}, CTRL.PARENTHESIS_OPEN + props.id + CTRL.PARENTHESIS_CLOSE), React__default.createElement("span", {
|
|
60783
|
-
className: props.isSuccess ? styles$k['vitro-success-message'] : styles$k['vitro-error-message']
|
|
60787
|
+
className: props.isWarning ? styles$k['vitro-warning-message'] : props.isSuccess ? styles$k['vitro-success-message'] : styles$k['vitro-error-message']
|
|
60784
60788
|
}, props.message)), React__default.createElement("div", {
|
|
60785
|
-
className: props.isSuccess ? styles$k['vitro-image-success'] : styles$k['vitro-image-error']
|
|
60789
|
+
className: props.isWarning ? styles$k['vitro-image-warning'] : props.isSuccess ? styles$k['vitro-image-success'] : styles$k['vitro-image-error']
|
|
60786
60790
|
}));
|
|
60787
60791
|
};
|
|
60788
60792
|
|
|
@@ -60813,7 +60817,18 @@ var ActionResultList = function ActionResultList(props) {
|
|
|
60813
60817
|
id: result[0].id,
|
|
60814
60818
|
imageUrl: result[0].imageUrl,
|
|
60815
60819
|
message: result[1] ? result[1].message : CTRL.EMPTY,
|
|
60816
|
-
isSuccess: false
|
|
60820
|
+
isSuccess: false,
|
|
60821
|
+
isWarning: false
|
|
60822
|
+
});
|
|
60823
|
+
}), props.warningResult.map(function (result, index) {
|
|
60824
|
+
return React__default.createElement(ActionResultItem, {
|
|
60825
|
+
key: index,
|
|
60826
|
+
name: result[0].name,
|
|
60827
|
+
id: result[0].id,
|
|
60828
|
+
imageUrl: result[0].imageUrl,
|
|
60829
|
+
message: result[1] ? result[1].message : CTRL.EMPTY,
|
|
60830
|
+
isSuccess: true,
|
|
60831
|
+
isWarning: true
|
|
60817
60832
|
});
|
|
60818
60833
|
}), props.successResult.map(function (result, index) {
|
|
60819
60834
|
return React__default.createElement(ActionResultItem, {
|
|
@@ -60822,18 +60837,19 @@ var ActionResultList = function ActionResultList(props) {
|
|
|
60822
60837
|
id: result[0].id,
|
|
60823
60838
|
imageUrl: result[0].imageUrl,
|
|
60824
60839
|
message: localeService.create(LOCALE$2.RESULT_DIALOG_SUCCESS_MESSAGE),
|
|
60825
|
-
isSuccess: true
|
|
60840
|
+
isSuccess: true,
|
|
60841
|
+
isWarning: false
|
|
60826
60842
|
});
|
|
60827
60843
|
})));
|
|
60828
60844
|
};
|
|
60829
60845
|
|
|
60830
|
-
var styles$l = {"vitro-result-dialog":"_result-dialog_vitro-result-dialog_kqxXHts","vitro-progress":"_result-dialog_vitro-progress_3WaZ52V","vitro-success":"_result-dialog_vitro-success_3UZikJl","vitro-error":"_result-dialog_vitro-error_3-IKuM9","vitro-header":"_result-dialog_vitro-header_2rBOm3x","vitro-image":"_result-dialog_vitro-image_19CVcbX","vitro-flex":"_result-dialog_vitro-flex_1CUfSCh","vitro-result-text":"_result-dialog_vitro-result-text_3wNan1D","vitro-button-group":"_result-dialog_vitro-button-group_2cBzj9Q","vitro-progress-bar":"_result-dialog_vitro-progress-bar_2MazExd","vitro-button-close":"_result-dialog_vitro-button-close_AJxsgiW","vitro-save-report-button":"_result-dialog_vitro-save-report-button_28kdZ5l","vitro-save-report-image":"_result-dialog_vitro-save-report-image_2fnLBCP"};
|
|
60846
|
+
var styles$l = {"vitro-result-dialog":"_result-dialog_vitro-result-dialog_kqxXHts","vitro-progress":"_result-dialog_vitro-progress_3WaZ52V","vitro-success":"_result-dialog_vitro-success_3UZikJl","vitro-error":"_result-dialog_vitro-error_3-IKuM9","vitro-warning":"_result-dialog_vitro-warning_1YXyHJC","vitro-header":"_result-dialog_vitro-header_2rBOm3x","vitro-image":"_result-dialog_vitro-image_19CVcbX","vitro-flex":"_result-dialog_vitro-flex_1CUfSCh","vitro-result-text":"_result-dialog_vitro-result-text_3wNan1D","vitro-button-group":"_result-dialog_vitro-button-group_2cBzj9Q","vitro-progress-bar":"_result-dialog_vitro-progress-bar_2MazExd","vitro-button-close":"_result-dialog_vitro-button-close_AJxsgiW","vitro-save-report-button":"_result-dialog_vitro-save-report-button_28kdZ5l","vitro-save-report-image":"_result-dialog_vitro-save-report-image_2fnLBCP"};
|
|
60831
60847
|
|
|
60832
60848
|
var ResultDialog = function ResultDialog(props) {
|
|
60833
60849
|
var _useState = React.useState(styles$l['vitro-progress']),
|
|
60834
60850
|
state = _useState[0],
|
|
60835
60851
|
setState = _useState[1];
|
|
60836
|
-
var _useState2 = React.useState(!props.isSuccess),
|
|
60852
|
+
var _useState2 = React.useState(!props.isSuccess || props.isWarning),
|
|
60837
60853
|
showInfo = _useState2[0],
|
|
60838
60854
|
setShowInfo = _useState2[1];
|
|
60839
60855
|
var _useState3 = React.useState(CTRL.EMPTY),
|
|
@@ -60841,24 +60857,28 @@ var ResultDialog = function ResultDialog(props) {
|
|
|
60841
60857
|
setText = _useState3[1];
|
|
60842
60858
|
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
60843
60859
|
React.useEffect(function () {
|
|
60844
|
-
updateState(props.isProgress, props.isSuccess);
|
|
60845
|
-
updateText(props.isProgress, props.isSuccess);
|
|
60860
|
+
updateState(props.isProgress, props.isSuccess, props.isWarning);
|
|
60861
|
+
updateText(props.isProgress, props.isSuccess, props.isWarning);
|
|
60846
60862
|
if (!props.isProgress) {
|
|
60847
|
-
setShowInfo(!props.isSuccess);
|
|
60863
|
+
setShowInfo(!props.isSuccess || props.isWarning);
|
|
60848
60864
|
}
|
|
60849
|
-
}, [props.isProgress, props.isSuccess]);
|
|
60850
|
-
var updateState = function updateState(isProgress, isSuccess) {
|
|
60865
|
+
}, [props.isProgress, props.isSuccess, props.isWarning]);
|
|
60866
|
+
var updateState = function updateState(isProgress, isSuccess, isWarning) {
|
|
60851
60867
|
if (isProgress) {
|
|
60852
60868
|
setState(styles$l['vitro-progress']);
|
|
60853
60869
|
return;
|
|
60854
60870
|
}
|
|
60855
60871
|
if (isSuccess) {
|
|
60856
|
-
|
|
60872
|
+
if (isWarning) {
|
|
60873
|
+
setState(styles$l['vitro-warning']);
|
|
60874
|
+
} else {
|
|
60875
|
+
setState(styles$l['vitro-success']);
|
|
60876
|
+
}
|
|
60857
60877
|
} else {
|
|
60858
60878
|
setState(styles$l['vitro-error']);
|
|
60859
60879
|
}
|
|
60860
60880
|
};
|
|
60861
|
-
var updateText = function updateText(isProgress, isSuccess) {
|
|
60881
|
+
var updateText = function updateText(isProgress, isSuccess, isWarning) {
|
|
60862
60882
|
if (isProgress) {
|
|
60863
60883
|
setText(localeService.create(LOCALE$2.RESULT_DIALOG_PROGRESS_TITLE, {
|
|
60864
60884
|
actionName: props.actionName
|
|
@@ -60866,9 +60886,15 @@ var ResultDialog = function ResultDialog(props) {
|
|
|
60866
60886
|
return;
|
|
60867
60887
|
}
|
|
60868
60888
|
if (isSuccess) {
|
|
60869
|
-
|
|
60870
|
-
|
|
60871
|
-
|
|
60889
|
+
if (isWarning) {
|
|
60890
|
+
setText(localeService.create(LOCALE$2.RESULT_DIALOG_WARNING_TITLE, {
|
|
60891
|
+
actionName: props.actionName
|
|
60892
|
+
}));
|
|
60893
|
+
} else {
|
|
60894
|
+
setText(localeService.create(LOCALE$2.RESULT_DIALOG_SUCCESS_TITLE, {
|
|
60895
|
+
actionName: props.actionName
|
|
60896
|
+
}));
|
|
60897
|
+
}
|
|
60872
60898
|
} else {
|
|
60873
60899
|
setText(localeService.create(LOCALE$2.RESULT_DIALOG_ERROR_TITLE, {
|
|
60874
60900
|
actionName: props.actionName,
|
|
@@ -60889,7 +60915,7 @@ var ResultDialog = function ResultDialog(props) {
|
|
|
60889
60915
|
};
|
|
60890
60916
|
var onSaveReport = function onSaveReport() {
|
|
60891
60917
|
if (props.onSaveReport) {
|
|
60892
|
-
props.onSaveReport(props.successResult, props.failResult);
|
|
60918
|
+
props.onSaveReport(props.successResult, props.failResult, props.warningResult);
|
|
60893
60919
|
}
|
|
60894
60920
|
};
|
|
60895
60921
|
return React__default.createElement("div", {
|
|
@@ -60907,7 +60933,7 @@ var ResultDialog = function ResultDialog(props) {
|
|
|
60907
60933
|
className: styles$l['vitro-result-text']
|
|
60908
60934
|
}, text), React__default.createElement(ButtonGroup, {
|
|
60909
60935
|
className: styles$l['vitro-button-group']
|
|
60910
|
-
}, (props.isProgress || !props.isSuccess) && React__default.createElement(ExpandCollapseButton, {
|
|
60936
|
+
}, (props.isProgress || !props.isSuccess || props.isWarning) && React__default.createElement(ExpandCollapseButton, {
|
|
60911
60937
|
isExpanded: showInfo,
|
|
60912
60938
|
onClick: function onClick(isExpanded) {
|
|
60913
60939
|
return setShowInfo(isExpanded);
|
|
@@ -60932,6 +60958,7 @@ var ResultDialog = function ResultDialog(props) {
|
|
|
60932
60958
|
}))), React__default.createElement(ActionResultList, {
|
|
60933
60959
|
successResult: props.successResult,
|
|
60934
60960
|
failResult: props.failResult,
|
|
60961
|
+
warningResult: props.warningResult,
|
|
60935
60962
|
isVisible: showInfo
|
|
60936
60963
|
}));
|
|
60937
60964
|
};
|
|
@@ -60959,15 +60986,21 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60959
60986
|
var _useState3 = React.useState(true),
|
|
60960
60987
|
isSuccess = _useState3[0],
|
|
60961
60988
|
setIsSuccess = _useState3[1];
|
|
60962
|
-
var _useState4 = React.useState(
|
|
60963
|
-
|
|
60964
|
-
|
|
60989
|
+
var _useState4 = React.useState(false),
|
|
60990
|
+
isWarning = _useState4[0],
|
|
60991
|
+
setIsWarning = _useState4[1];
|
|
60965
60992
|
var _useState5 = React.useState([]),
|
|
60966
|
-
|
|
60967
|
-
|
|
60968
|
-
var _useState6 = React.useState(
|
|
60969
|
-
|
|
60970
|
-
|
|
60993
|
+
successResult = _useState5[0],
|
|
60994
|
+
setSuccessResult = _useState5[1];
|
|
60995
|
+
var _useState6 = React.useState([]),
|
|
60996
|
+
warningResult = _useState6[0],
|
|
60997
|
+
setWarningResult = _useState6[1];
|
|
60998
|
+
var _useState7 = React.useState([]),
|
|
60999
|
+
failResult = _useState7[0],
|
|
61000
|
+
setFailResult = _useState7[1];
|
|
61001
|
+
var _useState8 = React.useState(0),
|
|
61002
|
+
processedItemCount = _useState8[0],
|
|
61003
|
+
setProcessedItemCount = _useState8[1];
|
|
60971
61004
|
var cancellationToken = React.useMemo(function () {
|
|
60972
61005
|
return {
|
|
60973
61006
|
cancel: false
|
|
@@ -61000,7 +61033,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61000
61033
|
}
|
|
61001
61034
|
setCurrentAction(actionMap.before);
|
|
61002
61035
|
};
|
|
61003
|
-
var finish = function finish(success, error, successResult, failResult) {
|
|
61036
|
+
var finish = function finish(success, error, successResult, failResult, warningResult) {
|
|
61004
61037
|
if (failResult.length) {
|
|
61005
61038
|
if (props.processError) {
|
|
61006
61039
|
setIsShow(false);
|
|
@@ -61012,15 +61045,15 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61012
61045
|
setIsSuccess(success);
|
|
61013
61046
|
setCurrentAction(actionMap.after);
|
|
61014
61047
|
if (props.onAfterAction) {
|
|
61015
|
-
props.onAfterAction(error, successResult, failResult);
|
|
61048
|
+
props.onAfterAction(error, successResult, failResult, warningResult);
|
|
61016
61049
|
}
|
|
61017
61050
|
if (!props.isShowAfterAction && !failResult.length) {
|
|
61018
|
-
onClose(error, successResult, failResult);
|
|
61051
|
+
onClose(error, successResult, failResult, warningResult);
|
|
61019
61052
|
return;
|
|
61020
61053
|
}
|
|
61021
61054
|
if (props.isAutoClose && success) {
|
|
61022
61055
|
window.setTimeout(function () {
|
|
61023
|
-
onClose(error, successResult, failResult);
|
|
61056
|
+
onClose(error, successResult, failResult, warningResult);
|
|
61024
61057
|
}, props.durationMs || 5000);
|
|
61025
61058
|
}
|
|
61026
61059
|
};
|
|
@@ -61030,7 +61063,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61030
61063
|
var _temp = function () {
|
|
61031
61064
|
if (data.itemList) {
|
|
61032
61065
|
return Promise.resolve(process()).then(function (result) {
|
|
61033
|
-
finish(result.success, null, result.successResult, result.failResult);
|
|
61066
|
+
finish(result.success, null, result.successResult, result.failResult, result.warningResult);
|
|
61034
61067
|
});
|
|
61035
61068
|
}
|
|
61036
61069
|
}();
|
|
@@ -61055,11 +61088,13 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61055
61088
|
return {
|
|
61056
61089
|
success: success,
|
|
61057
61090
|
successResult: _successResult,
|
|
61058
|
-
failResult: _failResult
|
|
61091
|
+
failResult: _failResult,
|
|
61092
|
+
warningResult: _warningResult
|
|
61059
61093
|
};
|
|
61060
61094
|
};
|
|
61061
61095
|
var _interrupt = false;
|
|
61062
61096
|
var _successResult = [];
|
|
61097
|
+
var _warningResult = [];
|
|
61063
61098
|
var _failResult = [];
|
|
61064
61099
|
var success = true;
|
|
61065
61100
|
var _i = 0;
|
|
@@ -61084,13 +61119,19 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61084
61119
|
setSuccessResult(_successResult);
|
|
61085
61120
|
});
|
|
61086
61121
|
}, function (error) {
|
|
61087
|
-
|
|
61088
|
-
|
|
61089
|
-
|
|
61090
|
-
|
|
61091
|
-
|
|
61092
|
-
|
|
61093
|
-
|
|
61122
|
+
if (error.isWarning) {
|
|
61123
|
+
_warningResult.push([item, error]);
|
|
61124
|
+
setWarningResult(_warningResult);
|
|
61125
|
+
setIsWarning(true);
|
|
61126
|
+
} else {
|
|
61127
|
+
var err = onError(error);
|
|
61128
|
+
_failResult.push([item, err]);
|
|
61129
|
+
setFailResult(_failResult);
|
|
61130
|
+
success = false;
|
|
61131
|
+
setIsSuccess(false);
|
|
61132
|
+
if (err) {
|
|
61133
|
+
console.error(err);
|
|
61134
|
+
}
|
|
61094
61135
|
}
|
|
61095
61136
|
});
|
|
61096
61137
|
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
@@ -61106,10 +61147,12 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61106
61147
|
return {
|
|
61107
61148
|
success: success,
|
|
61108
61149
|
successResult: _successResult2,
|
|
61109
|
-
failResult: _failResult2
|
|
61150
|
+
failResult: _failResult2,
|
|
61151
|
+
warningResult: _warningResult2
|
|
61110
61152
|
};
|
|
61111
61153
|
};
|
|
61112
61154
|
var _successResult2 = [];
|
|
61155
|
+
var _warningResult2 = [];
|
|
61113
61156
|
var _failResult2 = [];
|
|
61114
61157
|
var success = true;
|
|
61115
61158
|
var _temp6 = _catch(function () {
|
|
@@ -61118,13 +61161,19 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61118
61161
|
setSuccessResult(_successResult2);
|
|
61119
61162
|
});
|
|
61120
61163
|
}, function (error) {
|
|
61121
|
-
|
|
61122
|
-
|
|
61123
|
-
|
|
61124
|
-
|
|
61125
|
-
|
|
61126
|
-
|
|
61127
|
-
|
|
61164
|
+
if (error.isWarning) {
|
|
61165
|
+
_warningResult2.push([{}, error]);
|
|
61166
|
+
setWarningResult(_warningResult2);
|
|
61167
|
+
setIsWarning(true);
|
|
61168
|
+
} else {
|
|
61169
|
+
var err = onError(error);
|
|
61170
|
+
_failResult2.push([{}, err]);
|
|
61171
|
+
setFailResult(_failResult2);
|
|
61172
|
+
success = false;
|
|
61173
|
+
setIsSuccess(false);
|
|
61174
|
+
if (err) {
|
|
61175
|
+
console.error(err);
|
|
61176
|
+
}
|
|
61128
61177
|
}
|
|
61129
61178
|
});
|
|
61130
61179
|
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
|
@@ -61141,15 +61190,15 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61141
61190
|
}
|
|
61142
61191
|
}
|
|
61143
61192
|
};
|
|
61144
|
-
var onClose = function onClose(error, successResult, failResult) {
|
|
61193
|
+
var onClose = function onClose(error, successResult, failResult, warningResult) {
|
|
61145
61194
|
if (props.onAfterActionClose) {
|
|
61146
|
-
props.onAfterActionClose(error || null, successResult || [], failResult || []);
|
|
61195
|
+
props.onAfterActionClose(error || null, successResult || [], failResult || [], warningResult || []);
|
|
61147
61196
|
}
|
|
61148
61197
|
setIsShow(false);
|
|
61149
61198
|
};
|
|
61150
61199
|
var onCancel = function onCancel() {
|
|
61151
61200
|
if (props.onAfterAction) {
|
|
61152
|
-
props.onAfterAction(new AbortExceptionImpl(), [], []);
|
|
61201
|
+
props.onAfterAction(new AbortExceptionImpl(), [], [], []);
|
|
61153
61202
|
}
|
|
61154
61203
|
cancellationToken.cancel = true;
|
|
61155
61204
|
onClose();
|
|
@@ -61180,9 +61229,11 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
61180
61229
|
itemList: data.itemList,
|
|
61181
61230
|
processedItemCount: processedItemCount,
|
|
61182
61231
|
isSuccess: isSuccess,
|
|
61232
|
+
isWarning: isWarning,
|
|
61183
61233
|
isProgress: currentAction === actionMap.progress,
|
|
61184
61234
|
successResult: successResult,
|
|
61185
61235
|
failResult: failResult,
|
|
61236
|
+
warningResult: warningResult,
|
|
61186
61237
|
onSaveReport: props.onSaveReport,
|
|
61187
61238
|
onClose: onClose,
|
|
61188
61239
|
onCancel: onCancel
|
|
@@ -62188,7 +62239,7 @@ var Viewer = function Viewer(props) {
|
|
|
62188
62239
|
};
|
|
62189
62240
|
|
|
62190
62241
|
var name = "@vitrosoftware/common-ui-ts";
|
|
62191
|
-
var version$1 = "1.1.
|
|
62242
|
+
var version$1 = "1.1.128";
|
|
62192
62243
|
var description = "vitro software common ui ts";
|
|
62193
62244
|
var author = "";
|
|
62194
62245
|
var license = "MIT";
|