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