@vitrosoftware/common-ui-ts 1.1.25 → 1.1.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/css/std/controls/action-handler/action-handler.css +4 -3
- package/css/std/controls/dialog/dialog-button-close.css +1 -0
- package/css/std/controls/dropdown-button/dropdown-button.css +12 -7
- package/css/std/controls/message-input/message-input.css +110 -0
- package/css/std/controls/table-view/treegrid.css +16 -4
- package/dist/controls/ActionHandler/ActionHandlerConstants.d.ts +4 -3
- package/dist/controls/CommandMenu/CommandMenuDropdownButton.d.ts +1 -0
- package/dist/controls/CommandMenu/CommandMenuSubItem.d.ts +1 -0
- package/dist/controls/MessageInput/MessageInput.d.ts +14 -0
- package/dist/controls/PdfViewer/PdfViewerContext.d.ts +0 -1
- package/dist/controls/TableView/TableViewConstants.d.ts +1 -0
- package/dist/controls/TelerikUploader/TelerikUploaderContextImpl.d.ts +1 -0
- package/dist/controls/TelerikUploader/TelerikUploaderSettings.d.ts +1 -0
- package/dist/controls/TreeView/TreeViewConstants.d.ts +2 -1
- package/dist/index.css +129 -10
- package/dist/index.d.ts +2 -0
- package/dist/index.js +187 -61
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +187 -62
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -68,38 +68,27 @@ var app$1 = {
|
|
|
68
68
|
action: {
|
|
69
69
|
conf: {
|
|
70
70
|
single: "Выполнить действие '{{actionCode}}'",
|
|
71
|
-
multi: "Выполнить действие '{{actionCode}}'"
|
|
71
|
+
multi: "Выполнить действие '{{actionCode}}'",
|
|
72
|
+
std: "Выполнить действие '{{actionCode}}'"
|
|
72
73
|
},
|
|
73
74
|
progress: {
|
|
74
75
|
single: "Выполняется действие '{{actionCode}}'",
|
|
75
|
-
multi: "Выполняется действие '{{actionCode}}'"
|
|
76
|
+
multi: "Выполняется действие '{{actionCode}}'",
|
|
77
|
+
std: "Выполняется действие '{{actionCode}}'"
|
|
76
78
|
},
|
|
77
79
|
success: {
|
|
78
80
|
single: "Действие '{{actionCode}}' выполнено успешно",
|
|
79
|
-
multi: "Действие '{{actionCode}}' выполнено
|
|
81
|
+
multi: "Действие '{{actionCode}}' выполнено успешно. Кол-во элементов: {{count}}",
|
|
82
|
+
std: "Действие '{{actionCode}}' выполнено успешно"
|
|
80
83
|
},
|
|
81
84
|
error: {
|
|
82
85
|
single: "Действие '{{actionCode}}' выполнено с ошибками",
|
|
83
|
-
multi: "Действие '{{actionCode}}' выполнено с ошибками"
|
|
84
|
-
|
|
85
|
-
warning: {
|
|
86
|
-
single: "Действие '{{actionCode}}' выполнено с замечаниями",
|
|
87
|
-
multi: "Действие '{{actionCode}}' выполнено с замечаниями"
|
|
86
|
+
multi: "Действие '{{actionCode}}' выполнено с ошибками",
|
|
87
|
+
std: "Действие '{{actionCode}}' выполнено с ошибками"
|
|
88
88
|
},
|
|
89
89
|
pending: "В ожидании",
|
|
90
90
|
processing: "Выполняется",
|
|
91
|
-
complete: "Завершено"
|
|
92
|
-
"delete": {
|
|
93
|
-
success_one: "Успешно удален {{count}} объект",
|
|
94
|
-
success_few: "Успешно удалено {{count}} объекта",
|
|
95
|
-
success_many: "Успешно удалено {{count}} объектов",
|
|
96
|
-
progress_one: "Остался {{count}} объект из {{itemCount}}",
|
|
97
|
-
progress_few: "Осталось {{count}} объекта из {{itemCount}}",
|
|
98
|
-
progress_many: "Осталось {{count}} объектов из {{itemCount}}",
|
|
99
|
-
error_one: "Удален {{count}} объект из {{itemCount}}",
|
|
100
|
-
error_few: "Удалено {{count}} объекта из {{itemCount}}",
|
|
101
|
-
error_many: "Удалено {{count}} объектов из {{itemCount}}"
|
|
102
|
-
}
|
|
91
|
+
complete: "Завершено"
|
|
103
92
|
}
|
|
104
93
|
},
|
|
105
94
|
uploader: {
|
|
@@ -128,8 +117,8 @@ var app$1 = {
|
|
|
128
117
|
}
|
|
129
118
|
},
|
|
130
119
|
actionHandler: {
|
|
131
|
-
itemCount: "Выбранных
|
|
132
|
-
itemName: "
|
|
120
|
+
itemCount: "Выбранных элементов: {{itemCount}}",
|
|
121
|
+
itemName: "Элемент: {{itemName}}"
|
|
133
122
|
},
|
|
134
123
|
login: {
|
|
135
124
|
title: "Вход",
|
|
@@ -20147,6 +20136,7 @@ var EVENT;
|
|
|
20147
20136
|
EVENT["SELECT_NODE"] = "select_node.jstree";
|
|
20148
20137
|
EVENT["LOADED"] = "loaded.jstree";
|
|
20149
20138
|
EVENT["MODEL"] = "model.jstree";
|
|
20139
|
+
EVENT["DBLCLICK"] = "dblclick.jstree";
|
|
20150
20140
|
})(EVENT || (EVENT = {}));
|
|
20151
20141
|
var NODE_TYPE;
|
|
20152
20142
|
(function (NODE_TYPE) {
|
|
@@ -20708,6 +20698,7 @@ var EVENT$1;
|
|
|
20708
20698
|
EVENT["ON_CUSTOM_END_EDIT"] = "OnCustomEndEdit";
|
|
20709
20699
|
EVENT["ON_CUSTOM_START_EDIT"] = "OnCustomStartEdit";
|
|
20710
20700
|
EVENT["ON_ENDED_DRAG"] = "OnEndedDrag";
|
|
20701
|
+
EVENT["ON_END_DRAG"] = "OnEndDrag";
|
|
20711
20702
|
EVENT["ON_FILTER_OPERATOR"] = "OnFilterOperator";
|
|
20712
20703
|
EVENT["ON_FILTER"] = "OnFilter";
|
|
20713
20704
|
EVENT["ON_GANTT_CHANGED"] = "OnGanttChanged";
|
|
@@ -21230,6 +21221,7 @@ var TelerikUploaderContextImpl = /*#__PURE__*/function () {
|
|
|
21230
21221
|
};
|
|
21231
21222
|
_proto.error = function error(e) {
|
|
21232
21223
|
this.errorCount += e.files.length;
|
|
21224
|
+
this.setErrorMessage(e.files[0], e.XMLHttpRequest.response);
|
|
21233
21225
|
};
|
|
21234
21226
|
_proto.progress = function progress(e) {
|
|
21235
21227
|
this.progressInfo.show();
|
|
@@ -21308,6 +21300,17 @@ var TelerikUploaderContextImpl = /*#__PURE__*/function () {
|
|
|
21308
21300
|
_proto.setAthorizationToken = function setAthorizationToken(token) {
|
|
21309
21301
|
this.token = token;
|
|
21310
21302
|
};
|
|
21303
|
+
_proto.setErrorMessage = function setErrorMessage(file, resp) {
|
|
21304
|
+
if (this.settings.handleError) {
|
|
21305
|
+
var response = JSON.parse(resp);
|
|
21306
|
+
var error = this.settings.handleError(response);
|
|
21307
|
+
var message = error.message;
|
|
21308
|
+
if (message) {
|
|
21309
|
+
$$1(this.container).find(".k-file[data-uid='" + file.uid + "'] .k-file-validation-message").text(message);
|
|
21310
|
+
}
|
|
21311
|
+
console.error(error);
|
|
21312
|
+
}
|
|
21313
|
+
};
|
|
21311
21314
|
_proto.setFileImage = function setFileImage(file) {
|
|
21312
21315
|
if (this.settings.getFileImage) {
|
|
21313
21316
|
var image = this.settings.getFileImage(file.name);
|
|
@@ -59586,18 +59589,19 @@ var LOCALE$1;
|
|
|
59586
59589
|
(function (LOCALE) {
|
|
59587
59590
|
LOCALE["CONF_SINGLE"] = "app.common.msg.action.conf.single";
|
|
59588
59591
|
LOCALE["CONF_MULTI"] = "app.common.msg.action.conf.multi";
|
|
59592
|
+
LOCALE["CONF_STD"] = "app.common.msg.action.conf.std";
|
|
59589
59593
|
LOCALE["ITEM_COUNT"] = "app.common.actionHandler.itemCount";
|
|
59590
59594
|
LOCALE["ITEM_NAME"] = "app.common.actionHandler.itemName";
|
|
59591
59595
|
LOCALE["SUCCESS_SINGLE"] = "app.common.msg.action.success.single";
|
|
59592
59596
|
LOCALE["SUCCESS_MULTI"] = "app.common.msg.action.success.multi";
|
|
59597
|
+
LOCALE["SUCCESS_STD"] = "app.common.msg.action.success.std";
|
|
59593
59598
|
LOCALE["ERROR_SINGLE"] = "app.common.msg.action.error.single";
|
|
59594
59599
|
LOCALE["ERROR_MULTI"] = "app.common.msg.action.error.multi";
|
|
59600
|
+
LOCALE["ERROR_STD"] = "app.common.msg.action.error.std";
|
|
59595
59601
|
LOCALE["PROGRESS_SINGLE"] = "app.common.msg.action.progress.single";
|
|
59596
59602
|
LOCALE["PROGRESS_MULTI"] = "app.common.msg.action.progress.multi";
|
|
59597
|
-
LOCALE["
|
|
59598
|
-
LOCALE["WARNING_MULTI"] = "app.common.msg.action.warning.multi";
|
|
59603
|
+
LOCALE["PROGRESS_STD"] = "app.common.msg.action.progress.std";
|
|
59599
59604
|
LOCALE["ACTION"] = "app.common.action";
|
|
59600
|
-
LOCALE["ACTION_MSG"] = "app.common.msg.action";
|
|
59601
59605
|
LOCALE["ERROR_MSG"] = "app.common.msg.error";
|
|
59602
59606
|
LOCALE["SUCCESS"] = "success";
|
|
59603
59607
|
LOCALE["PROGRESS"] = "progress";
|
|
@@ -59652,9 +59656,15 @@ var ActionInfo = function ActionInfo(props) {
|
|
|
59652
59656
|
if (props.failResult && props.failResult.flat().find(function (itm) {
|
|
59653
59657
|
return itm.id === item.id;
|
|
59654
59658
|
})) {
|
|
59659
|
+
var errorMessage = localeService.create(LOCALE$1.COMPLETE);
|
|
59660
|
+
props.failResult.forEach(function (result) {
|
|
59661
|
+
if (result[0].id === item.id && result[1].message) {
|
|
59662
|
+
errorMessage = result[1].message;
|
|
59663
|
+
}
|
|
59664
|
+
});
|
|
59655
59665
|
info = {
|
|
59656
59666
|
error: true,
|
|
59657
|
-
text:
|
|
59667
|
+
text: errorMessage
|
|
59658
59668
|
};
|
|
59659
59669
|
}
|
|
59660
59670
|
return info;
|
|
@@ -59664,28 +59674,25 @@ var ActionInfo = function ActionInfo(props) {
|
|
|
59664
59674
|
var successCount = props.successResult ? props.successResult.length : 0;
|
|
59665
59675
|
var failCount = props.failResult ? props.failResult.length : 0;
|
|
59666
59676
|
if (props.action === actionMap.progress) {
|
|
59667
|
-
|
|
59668
|
-
return localeService.create(key, {
|
|
59677
|
+
return localeService.create(LOCALE$1.PROGRESS_STD, {
|
|
59669
59678
|
count: count - successCount - failCount,
|
|
59670
59679
|
itemCount: count
|
|
59671
59680
|
});
|
|
59672
59681
|
}
|
|
59673
59682
|
if (props.action === actionMap.after) {
|
|
59674
59683
|
if (props.isSuccess) {
|
|
59675
|
-
|
|
59676
|
-
return localeService.create(_key, {
|
|
59684
|
+
return localeService.create(LOCALE$1.SUCCESS_STD, {
|
|
59677
59685
|
count: successCount,
|
|
59678
59686
|
itemCount: count
|
|
59679
59687
|
});
|
|
59680
59688
|
} else {
|
|
59681
59689
|
if (successCount) {
|
|
59682
|
-
|
|
59683
|
-
return localeService.create(_key2, {
|
|
59690
|
+
return localeService.create(LOCALE$1.ERROR_STD, {
|
|
59684
59691
|
count: successCount,
|
|
59685
59692
|
itemCount: count
|
|
59686
59693
|
});
|
|
59687
59694
|
} else {
|
|
59688
|
-
return localeService.create(LOCALE$1.
|
|
59695
|
+
return localeService.create(LOCALE$1.ERROR_STD, {
|
|
59689
59696
|
count: successCount,
|
|
59690
59697
|
itemCount: count
|
|
59691
59698
|
});
|
|
@@ -59764,9 +59771,10 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59764
59771
|
};
|
|
59765
59772
|
}, []);
|
|
59766
59773
|
var data = React.useMemo(function () {
|
|
59774
|
+
var itemList = props.itemList || props.item ? props.itemList || [props.item] : [];
|
|
59767
59775
|
return {
|
|
59768
|
-
itemList:
|
|
59769
|
-
itemCount:
|
|
59776
|
+
itemList: itemList,
|
|
59777
|
+
itemCount: itemList.length
|
|
59770
59778
|
};
|
|
59771
59779
|
}, []);
|
|
59772
59780
|
var progressBarRef = React.useRef(null);
|
|
@@ -59807,7 +59815,6 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59807
59815
|
window.removeEventListener(exports.EVENT.KEYDOWN, onEscClick, false);
|
|
59808
59816
|
};
|
|
59809
59817
|
}, []);
|
|
59810
|
-
if (!props.item && !props.itemList) return null;
|
|
59811
59818
|
var init = function init() {
|
|
59812
59819
|
if (props.onBeforeAction) {
|
|
59813
59820
|
props.onBeforeAction();
|
|
@@ -59817,7 +59824,11 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59817
59824
|
if (props.confirmText && props.confirmText()) {
|
|
59818
59825
|
confText = props.confirmText(data.itemCount);
|
|
59819
59826
|
} else {
|
|
59820
|
-
if (data.itemCount
|
|
59827
|
+
if (data.itemCount == 0) {
|
|
59828
|
+
confText = localeService.create(LOCALE$1.CONF_STD, {
|
|
59829
|
+
actionCode: action
|
|
59830
|
+
});
|
|
59831
|
+
} else if (data.itemCount === 1) {
|
|
59821
59832
|
confText = localeService.create(LOCALE$1.CONF_SINGLE, {
|
|
59822
59833
|
actionCode: action,
|
|
59823
59834
|
itemCount: data.itemCount
|
|
@@ -59834,6 +59845,9 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59834
59845
|
setCurrentAction(actionMap$1.before);
|
|
59835
59846
|
};
|
|
59836
59847
|
var finish = function finish(success, error, successResult, failResult) {
|
|
59848
|
+
if (failResult.length) {
|
|
59849
|
+
setShow(true);
|
|
59850
|
+
}
|
|
59837
59851
|
setSuccess(success);
|
|
59838
59852
|
setCurrentAction(actionMap$1.after);
|
|
59839
59853
|
if (props.onAfterAction) {
|
|
@@ -59842,7 +59856,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59842
59856
|
if (props.isBlockInterface) {
|
|
59843
59857
|
setBlockInterface(false);
|
|
59844
59858
|
}
|
|
59845
|
-
if (!props.isShowAfterAction) {
|
|
59859
|
+
if (!props.isShowAfterAction && !failResult.length) {
|
|
59846
59860
|
close(error, successResult, failResult);
|
|
59847
59861
|
return;
|
|
59848
59862
|
}
|
|
@@ -59868,29 +59882,45 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59868
59882
|
if (success) {
|
|
59869
59883
|
setIcon(styles$7['vitro-icon-success']);
|
|
59870
59884
|
setState(styles$7['vitro-success']);
|
|
59871
|
-
|
|
59872
|
-
setText(localeService.create(key, {
|
|
59873
|
-
actionCode: action,
|
|
59874
|
-
count: successResult.length
|
|
59875
|
-
}));
|
|
59885
|
+
setSuccessText(action, successResult);
|
|
59876
59886
|
} else if (successResult.length && failResult.length) {
|
|
59877
59887
|
setIcon(styles$7['vitro-icon-warning']);
|
|
59878
59888
|
setState(styles$7['vitro-warning']);
|
|
59879
|
-
|
|
59880
|
-
setText(localeService.create(_key, {
|
|
59881
|
-
actionCode: action,
|
|
59882
|
-
itemCount: data.itemCount
|
|
59883
|
-
}));
|
|
59889
|
+
setErrorText(action, failResult);
|
|
59884
59890
|
} else {
|
|
59885
59891
|
setIcon(styles$7['vitro-icon-error']);
|
|
59886
59892
|
setState(styles$7['vitro-error']);
|
|
59887
|
-
|
|
59888
|
-
setText(localeService.create(_key2, {
|
|
59889
|
-
actionCode: action,
|
|
59890
|
-
itemCount: data.itemCount
|
|
59891
|
-
}));
|
|
59893
|
+
setErrorText(action, failResult);
|
|
59892
59894
|
}
|
|
59893
59895
|
};
|
|
59896
|
+
var setSuccessText = function setSuccessText(action, result) {
|
|
59897
|
+
var key;
|
|
59898
|
+
if (data.itemCount == 0) {
|
|
59899
|
+
key = LOCALE$1.SUCCESS_STD;
|
|
59900
|
+
} else if (data.itemCount === 1) {
|
|
59901
|
+
key = LOCALE$1.SUCCESS_SINGLE;
|
|
59902
|
+
} else {
|
|
59903
|
+
key = LOCALE$1.SUCCESS_MULTI;
|
|
59904
|
+
}
|
|
59905
|
+
setText(localeService.create(key, {
|
|
59906
|
+
actionCode: action,
|
|
59907
|
+
count: result.length
|
|
59908
|
+
}));
|
|
59909
|
+
};
|
|
59910
|
+
var setErrorText = function setErrorText(action, result) {
|
|
59911
|
+
var key;
|
|
59912
|
+
if (data.itemCount == 0) {
|
|
59913
|
+
key = LOCALE$1.ERROR_STD;
|
|
59914
|
+
} else if (data.itemCount === 1) {
|
|
59915
|
+
key = LOCALE$1.ERROR_SINGLE;
|
|
59916
|
+
} else {
|
|
59917
|
+
key = LOCALE$1.ERROR_MULTI;
|
|
59918
|
+
}
|
|
59919
|
+
setText(localeService.create(key, {
|
|
59920
|
+
actionCode: action,
|
|
59921
|
+
itemCount: result.length
|
|
59922
|
+
}));
|
|
59923
|
+
};
|
|
59894
59924
|
var setProgress = function setProgress(index) {
|
|
59895
59925
|
var percent = index * 100 / data.itemCount;
|
|
59896
59926
|
if (progressBarRef.current) {
|
|
@@ -59922,7 +59952,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59922
59952
|
}
|
|
59923
59953
|
;
|
|
59924
59954
|
if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
|
|
59925
|
-
|
|
59955
|
+
hideDialog();
|
|
59926
59956
|
}
|
|
59927
59957
|
;
|
|
59928
59958
|
var _temp2 = function () {
|
|
@@ -59943,6 +59973,16 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59943
59973
|
}
|
|
59944
59974
|
};
|
|
59945
59975
|
var process = function process() {
|
|
59976
|
+
try {
|
|
59977
|
+
if (data.itemList.length) {
|
|
59978
|
+
return processItemList();
|
|
59979
|
+
}
|
|
59980
|
+
return processAction();
|
|
59981
|
+
} catch (e) {
|
|
59982
|
+
return Promise.reject(e);
|
|
59983
|
+
}
|
|
59984
|
+
};
|
|
59985
|
+
var processItemList = function processItemList() {
|
|
59946
59986
|
try {
|
|
59947
59987
|
var _temp5 = function _temp5() {
|
|
59948
59988
|
return {
|
|
@@ -59967,7 +60007,11 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59967
60007
|
_interrupt = true;
|
|
59968
60008
|
return;
|
|
59969
60009
|
}
|
|
59970
|
-
if (data.itemCount
|
|
60010
|
+
if (data.itemCount === 0) {
|
|
60011
|
+
setText(localeService.create(LOCALE$1.PROGRESS_STD, {
|
|
60012
|
+
actionCode: action
|
|
60013
|
+
}));
|
|
60014
|
+
} else if (data.itemCount > 1) {
|
|
59971
60015
|
setText(localeService.create(LOCALE$1.PROGRESS_MULTI, {
|
|
59972
60016
|
idx: _i + 1,
|
|
59973
60017
|
itemCount: data.itemCount,
|
|
@@ -59991,6 +60035,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59991
60035
|
setFailResult(_failResult);
|
|
59992
60036
|
_success = false;
|
|
59993
60037
|
setSuccess(false);
|
|
60038
|
+
console.error(error);
|
|
59994
60039
|
});
|
|
59995
60040
|
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
59996
60041
|
});
|
|
@@ -59999,6 +60044,35 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59999
60044
|
return Promise.reject(e);
|
|
60000
60045
|
}
|
|
60001
60046
|
};
|
|
60047
|
+
var processAction = function processAction() {
|
|
60048
|
+
try {
|
|
60049
|
+
var _temp7 = function _temp7() {
|
|
60050
|
+
return {
|
|
60051
|
+
success: _success2,
|
|
60052
|
+
successResult: _successResult2,
|
|
60053
|
+
failResult: _failResult2
|
|
60054
|
+
};
|
|
60055
|
+
};
|
|
60056
|
+
var _successResult2 = [];
|
|
60057
|
+
var _failResult2 = [];
|
|
60058
|
+
var _success2 = true;
|
|
60059
|
+
var _temp6 = _catch(function () {
|
|
60060
|
+
return Promise.resolve(props.processItem({})).then(function (result) {
|
|
60061
|
+
_successResult2.push([{}, result]);
|
|
60062
|
+
setSuccessResult(_successResult2);
|
|
60063
|
+
});
|
|
60064
|
+
}, function (error) {
|
|
60065
|
+
_failResult2.push([{}, error]);
|
|
60066
|
+
setFailResult(_failResult2);
|
|
60067
|
+
_success2 = false;
|
|
60068
|
+
setSuccess(false);
|
|
60069
|
+
console.error(error);
|
|
60070
|
+
});
|
|
60071
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
|
60072
|
+
} catch (e) {
|
|
60073
|
+
return Promise.reject(e);
|
|
60074
|
+
}
|
|
60075
|
+
};
|
|
60002
60076
|
var onEnter = function onEnter() {
|
|
60003
60077
|
if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
|
|
60004
60078
|
window.document.body.click();
|
|
@@ -60021,7 +60095,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60021
60095
|
};
|
|
60022
60096
|
var close = function close(error, successResult, failResult) {
|
|
60023
60097
|
if (isCloseEnabled) {
|
|
60024
|
-
if ( props.onAfterActionClose) {
|
|
60098
|
+
if (currentAction == actionMap$1.after && props.onAfterActionClose) {
|
|
60025
60099
|
props.onAfterActionClose(error, successResult, failResult);
|
|
60026
60100
|
}
|
|
60027
60101
|
hideDialog();
|
|
@@ -60175,6 +60249,9 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
60175
60249
|
var dropItemList = props.itemList.filter(function (x) {
|
|
60176
60250
|
return !x.isOverflow;
|
|
60177
60251
|
});
|
|
60252
|
+
var isShowImage = props.itemList.find(function (item) {
|
|
60253
|
+
return !!item.imageUrl;
|
|
60254
|
+
}) ? true : false;
|
|
60178
60255
|
return React__default.createElement("div", {
|
|
60179
60256
|
className: styles$b['vitro-dropdown-button'] + CTRL.SPACE + (props.className || CTRL.EMPTY)
|
|
60180
60257
|
}, overflowItemList.map(function (item) {
|
|
@@ -60217,11 +60294,12 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
60217
60294
|
onClick: function onClick(e) {
|
|
60218
60295
|
return x.onClick(x.value, e);
|
|
60219
60296
|
}
|
|
60297
|
+
}, isShowImage && React__default.createElement("div", {
|
|
60298
|
+
className: styles$b['vitro-icon']
|
|
60220
60299
|
}, x.imageUrl && React__default.createElement(Icon, {
|
|
60221
60300
|
defaultUrl: x.imageUrl,
|
|
60222
|
-
hoverUrl: x.imageHoverUrl
|
|
60223
|
-
|
|
60224
|
-
}), React__default.createElement("span", null, x.text));
|
|
60301
|
+
hoverUrl: x.imageHoverUrl
|
|
60302
|
+
})), React__default.createElement("span", null, x.text));
|
|
60225
60303
|
}))));
|
|
60226
60304
|
};
|
|
60227
60305
|
|
|
@@ -63295,7 +63373,7 @@ var CommandMenuSubItem = function CommandMenuSubItem(props) {
|
|
|
63295
63373
|
return React__default.createElement(DropdownItem$2, {
|
|
63296
63374
|
onClick: onClick,
|
|
63297
63375
|
toggle: props.toggle === false ? false : true
|
|
63298
|
-
}, React__default.createElement("div", {
|
|
63376
|
+
}, props.isShowImage && React__default.createElement("div", {
|
|
63299
63377
|
className: styles$u['vitro-icon']
|
|
63300
63378
|
}, props.imageUrl && React__default.createElement(Icon, {
|
|
63301
63379
|
defaultUrl: props.imageUrl,
|
|
@@ -63327,6 +63405,10 @@ var CommandMenuItemHeader = function CommandMenuItemHeader(props) {
|
|
|
63327
63405
|
};
|
|
63328
63406
|
|
|
63329
63407
|
var CommandMenuDropdownButton = function CommandMenuDropdownButton(props) {
|
|
63408
|
+
var _props$itemList;
|
|
63409
|
+
var isShowImage = (_props$itemList = props.itemList) !== null && _props$itemList !== void 0 && _props$itemList.find(function (item) {
|
|
63410
|
+
return item.imageUrl;
|
|
63411
|
+
}) ? true : false;
|
|
63330
63412
|
return React__default.createElement(UncontrolledDropdown, {
|
|
63331
63413
|
nav: true,
|
|
63332
63414
|
inNavbar: true,
|
|
@@ -63340,7 +63422,9 @@ var CommandMenuDropdownButton = function CommandMenuDropdownButton(props) {
|
|
|
63340
63422
|
return React__default.createElement(CommandMenuSubItem, Object.assign({
|
|
63341
63423
|
toggle: props.toggle,
|
|
63342
63424
|
key: i.text
|
|
63343
|
-
}, i
|
|
63425
|
+
}, i, {
|
|
63426
|
+
isShowImage: isShowImage
|
|
63427
|
+
}));
|
|
63344
63428
|
}), props.children));
|
|
63345
63429
|
};
|
|
63346
63430
|
|
|
@@ -63917,6 +64001,47 @@ var ActivityItem = function ActivityItem(props) {
|
|
|
63917
64001
|
})));
|
|
63918
64002
|
};
|
|
63919
64003
|
|
|
64004
|
+
var styles$G = {"vitro-message-input":"_message-input_vitro-message-input_3MkcjWD","vitro-control":"_message-input_vitro-control_1PUSjq9","vitro-button-send":"_message-input_vitro-button-send_1vktQrZ"};
|
|
64005
|
+
|
|
64006
|
+
var MessageInput = function MessageInput(props) {
|
|
64007
|
+
var inputRef = React.useRef(null);
|
|
64008
|
+
var onEnter = function onEnter() {
|
|
64009
|
+
if (inputRef.current) {
|
|
64010
|
+
props.onSubmit(inputRef.current.value);
|
|
64011
|
+
inputRef.current.value = CTRL.EMPTY;
|
|
64012
|
+
}
|
|
64013
|
+
};
|
|
64014
|
+
var onKeyDown = function onKeyDown(e) {
|
|
64015
|
+
if (e.keyCode === 13) {
|
|
64016
|
+
e.preventDefault();
|
|
64017
|
+
onEnter();
|
|
64018
|
+
}
|
|
64019
|
+
};
|
|
64020
|
+
var onChange = function onChange(e) {
|
|
64021
|
+
if (props.onChange) {
|
|
64022
|
+
props.onChange(e, inputRef.current.value);
|
|
64023
|
+
}
|
|
64024
|
+
};
|
|
64025
|
+
return React__default.createElement("div", {
|
|
64026
|
+
className: styles$G['vitro-message-input'],
|
|
64027
|
+
onDrop: props.onDrop
|
|
64028
|
+
}, React__default.createElement(Avatar, {
|
|
64029
|
+
userName: props.userName,
|
|
64030
|
+
image: props.userImageUrl
|
|
64031
|
+
}), React__default.createElement("div", {
|
|
64032
|
+
className: styles$G['vitro-control']
|
|
64033
|
+
}, React__default.createElement("textarea", {
|
|
64034
|
+
ref: inputRef,
|
|
64035
|
+
disabled: props.isDisabled,
|
|
64036
|
+
placeholder: props.placeholder,
|
|
64037
|
+
onChange: onChange,
|
|
64038
|
+
onKeyDown: onKeyDown
|
|
64039
|
+
}), props.children, React__default.createElement("button", {
|
|
64040
|
+
onClick: onEnter,
|
|
64041
|
+
className: styles$G['vitro-button-send']
|
|
64042
|
+
})));
|
|
64043
|
+
};
|
|
64044
|
+
|
|
63920
64045
|
exports.ACTION_HANDLER = ActionHandlerConstants;
|
|
63921
64046
|
exports.ALERT = AlertConstants;
|
|
63922
64047
|
exports.ActionHandler = ActionHandler;
|
|
@@ -63946,6 +64071,7 @@ exports.IssueTile = IssueTile;
|
|
|
63946
64071
|
exports.Label = Label;
|
|
63947
64072
|
exports.Login = Login;
|
|
63948
64073
|
exports.LookupPicker = LookupPicker;
|
|
64074
|
+
exports.MessageInput = MessageInput;
|
|
63949
64075
|
exports.MicroFrontend = MicroFrontend;
|
|
63950
64076
|
exports.PdfViewer = PdfViewer;
|
|
63951
64077
|
exports.ScrollBar = ScrollBar;
|