@vitrosoftware/common-ui-ts 1.1.24 → 1.1.27
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/common.css +1 -0
- package/css/std/controls/action-handler/action-handler.css +4 -3
- package/css/std/controls/alert/alert.css +15 -10
- package/css/std/controls/command-menu/command-menu-dropdown-button.css +7 -2
- package/css/std/controls/dialog/dialog-button-close.css +4 -5
- package/css/std/controls/dialog/dialog-button.css +4 -0
- package/css/std/controls/dialog/dialog-content.css +9 -21
- package/css/std/controls/dialog/dialog-footer.css +6 -5
- package/css/std/controls/dialog/dialog-header.css +27 -3
- package/css/std/controls/dialog/dialog.css +3 -8
- package/css/std/controls/dropdown-button/dropdown-button.css +12 -7
- package/css/std/controls/lookup-picker/lookup-picker.css +1 -0
- package/css/std/controls/message-input/message-input.css +110 -0
- package/css/std/controls/pdf-viewer/pdf-viewer.css +369 -139
- package/css/std/controls/tab-group/tab-group.css +4 -0
- package/css/std/controls/table-view/treegrid.css +5 -4
- package/css/std/controls/tree-view/tree-view.css +21 -3
- package/dist/constants/Event.d.ts +2 -1
- 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/Dialog/Dialog.d.ts +16 -6
- package/dist/controls/Dialog/DialogButton.d.ts +2 -3
- package/dist/controls/Dialog/DialogComponent.d.ts +0 -1
- package/dist/controls/Dialog/DialogContent.d.ts +1 -0
- package/dist/controls/Dialog/DialogFooter.d.ts +5 -5
- package/dist/controls/Dialog/DialogHeader.d.ts +2 -0
- package/dist/controls/MessageInput/MessageInput.d.ts +14 -0
- package/dist/controls/PdfViewer/PdfViewerContext.d.ts +0 -1
- package/dist/controls/TabGroup/TabGroup.d.ts +1 -0
- package/dist/controls/TabGroup/TabGroupComponent.d.ts +1 -0
- 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/JsTreeViewContextImpl.d.ts +7 -0
- package/dist/controls/TreeView/TreeView.d.ts +2 -0
- package/dist/controls/TreeView/TreeViewConfig.d.ts +12 -6
- package/dist/controls/TreeView/TreeViewConstants.d.ts +25 -2
- package/dist/controls/TreeView/TreeViewContext.d.ts +7 -0
- package/dist/index.css +259 -98
- package/dist/index.d.ts +4 -2
- package/dist/index.js +402 -154
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +402 -155
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -3
- package/src/controls/PdfViewer/js/pdf-viewer.js +213 -71
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: "Вход",
|
|
@@ -259,6 +248,7 @@ var EVENT;
|
|
|
259
248
|
EVENT["HISTORY_UPDATE"] = "vitro.history.update";
|
|
260
249
|
EVENT["HISTORY_CHANGED"] = "vitro.history.changed";
|
|
261
250
|
EVENT["DROP"] = "drop";
|
|
251
|
+
EVENT["CONTEXTMENU"] = "contextmenu";
|
|
262
252
|
})(EVENT || (EVENT = {}));
|
|
263
253
|
|
|
264
254
|
var styles$1 = {"vitro-breadcrumbs":"_breadcrumbs_vitro-breadcrumbs_3r4NcQY","vitro-breadcrumbs-list-wrap":"_breadcrumbs_vitro-breadcrumbs-list-wrap_1_JBrw0","vitro-breadcrumbs-list":"_breadcrumbs_vitro-breadcrumbs-list_1SNtgtJ","vitro-breadcrumbs-button":"_breadcrumbs_vitro-breadcrumbs-button_3fazq3c","vitro-root":"_breadcrumbs_vitro-root_1S5-6AY","vitro-drop-down-list":"_breadcrumbs_vitro-drop-down-list_2PhrR2a"};
|
|
@@ -20111,41 +20101,6 @@ var jstree = createCommonjsModule(function (module) {
|
|
|
20111
20101
|
}));
|
|
20112
20102
|
});
|
|
20113
20103
|
|
|
20114
|
-
var TreeViewConfig = /*#__PURE__*/function () {
|
|
20115
|
-
function TreeViewConfig() {}
|
|
20116
|
-
TreeViewConfig.getConfig = function getConfig() {
|
|
20117
|
-
return {
|
|
20118
|
-
core: {
|
|
20119
|
-
check_callback: true,
|
|
20120
|
-
themes: {
|
|
20121
|
-
dots: false
|
|
20122
|
-
},
|
|
20123
|
-
multiple: false,
|
|
20124
|
-
data: function data(obj, cb) {}
|
|
20125
|
-
},
|
|
20126
|
-
plugins: ["search", "unique", "types", "wholerow", "themes", "sort", "state"],
|
|
20127
|
-
types: {
|
|
20128
|
-
folder: {
|
|
20129
|
-
icon: "folder",
|
|
20130
|
-
new_node: "New Folder"
|
|
20131
|
-
},
|
|
20132
|
-
file: {
|
|
20133
|
-
icon: "file",
|
|
20134
|
-
valid_children: [""],
|
|
20135
|
-
new_node: "New File"
|
|
20136
|
-
}
|
|
20137
|
-
},
|
|
20138
|
-
checkbox: {
|
|
20139
|
-
three_state: false
|
|
20140
|
-
},
|
|
20141
|
-
contextmenu: function contextmenu() {
|
|
20142
|
-
return [];
|
|
20143
|
-
}
|
|
20144
|
-
};
|
|
20145
|
-
};
|
|
20146
|
-
return TreeViewConfig;
|
|
20147
|
-
}();
|
|
20148
|
-
|
|
20149
20104
|
var METHOD;
|
|
20150
20105
|
(function (METHOD) {
|
|
20151
20106
|
METHOD["GET_PATH"] = "get_path";
|
|
@@ -20165,6 +20120,13 @@ var METHOD;
|
|
|
20165
20120
|
METHOD["OPEN_NODE"] = "open_node";
|
|
20166
20121
|
METHOD["EDIT"] = "edit";
|
|
20167
20122
|
METHOD["GET_PARENT"] = "get_parent";
|
|
20123
|
+
METHOD["GET_CHECKED"] = "get_checked";
|
|
20124
|
+
METHOD["GET_UNDETERMINED"] = "get_undetermined";
|
|
20125
|
+
METHOD["GET_CHECKED_DESCENDANTS"] = "get_checked_descendants";
|
|
20126
|
+
METHOD["GET_TOP_CHECKED"] = "get_top_checked";
|
|
20127
|
+
METHOD["GET_BOTTOM_CHECKED"] = "get_bottom_checked";
|
|
20128
|
+
METHOD["IS_CHECKED"] = "is_checked";
|
|
20129
|
+
METHOD["IS_UNDETERMINED"] = "is_undetermined";
|
|
20168
20130
|
})(METHOD || (METHOD = {}));
|
|
20169
20131
|
var EVENT$1;
|
|
20170
20132
|
(function (EVENT) {
|
|
@@ -20172,20 +20134,91 @@ var EVENT$1;
|
|
|
20172
20134
|
EVENT["SELECT_NODE"] = "select_node.jstree";
|
|
20173
20135
|
EVENT["LOADED"] = "loaded.jstree";
|
|
20174
20136
|
EVENT["MODEL"] = "model.jstree";
|
|
20137
|
+
EVENT["DBLCLICK"] = "dblclick.jstree";
|
|
20175
20138
|
})(EVENT$1 || (EVENT$1 = {}));
|
|
20176
20139
|
var NODE_TYPE;
|
|
20177
20140
|
(function (NODE_TYPE) {
|
|
20178
20141
|
NODE_TYPE["FOLDER"] = "folder";
|
|
20179
20142
|
NODE_TYPE["FILE"] = "file";
|
|
20180
20143
|
})(NODE_TYPE || (NODE_TYPE = {}));
|
|
20144
|
+
var PLUGIN;
|
|
20145
|
+
(function (PLUGIN) {
|
|
20146
|
+
PLUGIN["STATE"] = "state";
|
|
20147
|
+
PLUGIN["CHECKBOX"] = "checkbox";
|
|
20148
|
+
PLUGIN["SEARCH"] = "search";
|
|
20149
|
+
PLUGIN["UNIQUE"] = "unique";
|
|
20150
|
+
PLUGIN["TYPES"] = "types";
|
|
20151
|
+
PLUGIN["WHOLEROW"] = "wholerow";
|
|
20152
|
+
PLUGIN["THEMES"] = "themes";
|
|
20153
|
+
PLUGIN["SORT"] = "sort";
|
|
20154
|
+
})(PLUGIN || (PLUGIN = {}));
|
|
20155
|
+
var CASCADE;
|
|
20156
|
+
(function (CASCADE) {
|
|
20157
|
+
CASCADE["UP"] = "up";
|
|
20158
|
+
CASCADE["DOWN"] = "down";
|
|
20159
|
+
CASCADE["UNDETERMINED"] = "undetermined";
|
|
20160
|
+
})(CASCADE || (CASCADE = {}));
|
|
20181
20161
|
|
|
20182
20162
|
var TreeViewConstants = {
|
|
20183
20163
|
__proto__: null,
|
|
20184
20164
|
get METHOD () { return METHOD; },
|
|
20185
20165
|
get EVENT () { return EVENT$1; },
|
|
20186
|
-
get NODE_TYPE () { return NODE_TYPE; }
|
|
20166
|
+
get NODE_TYPE () { return NODE_TYPE; },
|
|
20167
|
+
get PLUGIN () { return PLUGIN; },
|
|
20168
|
+
get CASCADE () { return CASCADE; }
|
|
20187
20169
|
};
|
|
20188
20170
|
|
|
20171
|
+
var TreeViewConfig = /*#__PURE__*/function () {
|
|
20172
|
+
function TreeViewConfig() {}
|
|
20173
|
+
TreeViewConfig.getConfig = function getConfig(id, checkboxSelect, saveChecked) {
|
|
20174
|
+
return {
|
|
20175
|
+
core: {
|
|
20176
|
+
check_callback: true,
|
|
20177
|
+
themes: {
|
|
20178
|
+
dots: false
|
|
20179
|
+
},
|
|
20180
|
+
multiple: false,
|
|
20181
|
+
data: function data(obj, cb) {}
|
|
20182
|
+
},
|
|
20183
|
+
plugins: function () {
|
|
20184
|
+
var pluginList = [PLUGIN.UNIQUE, PLUGIN.TYPES, PLUGIN.WHOLEROW, PLUGIN.THEMES, PLUGIN.SORT, PLUGIN.STATE];
|
|
20185
|
+
if (checkboxSelect) {
|
|
20186
|
+
pluginList.push(PLUGIN.CHECKBOX);
|
|
20187
|
+
}
|
|
20188
|
+
return pluginList;
|
|
20189
|
+
}(),
|
|
20190
|
+
types: {
|
|
20191
|
+
folder: {
|
|
20192
|
+
icon: NODE_TYPE.FOLDER
|
|
20193
|
+
},
|
|
20194
|
+
file: {
|
|
20195
|
+
icon: NODE_TYPE.FILE,
|
|
20196
|
+
valid_children: [CTRL.EMPTY]
|
|
20197
|
+
}
|
|
20198
|
+
},
|
|
20199
|
+
state: {
|
|
20200
|
+
key: id,
|
|
20201
|
+
filter: function filter(state) {
|
|
20202
|
+
if (!saveChecked) {
|
|
20203
|
+
delete state.checkbox;
|
|
20204
|
+
}
|
|
20205
|
+
return state;
|
|
20206
|
+
}
|
|
20207
|
+
},
|
|
20208
|
+
checkbox: {
|
|
20209
|
+
visible: true,
|
|
20210
|
+
three_state: false,
|
|
20211
|
+
tie_selection: false,
|
|
20212
|
+
cascade: CASCADE.DOWN
|
|
20213
|
+
},
|
|
20214
|
+
contextmenu: function contextmenu() {
|
|
20215
|
+
return [];
|
|
20216
|
+
}
|
|
20217
|
+
};
|
|
20218
|
+
};
|
|
20219
|
+
return TreeViewConfig;
|
|
20220
|
+
}();
|
|
20221
|
+
|
|
20189
20222
|
var JsTreeViewContextImpl = /*#__PURE__*/function () {
|
|
20190
20223
|
function JsTreeViewContextImpl(jsTree) {
|
|
20191
20224
|
this.jsTree = jsTree;
|
|
@@ -20271,20 +20304,47 @@ var JsTreeViewContextImpl = /*#__PURE__*/function () {
|
|
|
20271
20304
|
_proto.getParent = function getParent(node) {
|
|
20272
20305
|
return this.jsTree.jstree(METHOD.GET_PARENT, node);
|
|
20273
20306
|
};
|
|
20307
|
+
_proto.getChecked = function getChecked(full) {
|
|
20308
|
+
return this.jsTree.jstree(METHOD.GET_CHECKED, full);
|
|
20309
|
+
};
|
|
20310
|
+
_proto.getUndetermined = function getUndetermined(full) {
|
|
20311
|
+
return this.jsTree.jstree(METHOD.GET_UNDETERMINED, full);
|
|
20312
|
+
};
|
|
20313
|
+
_proto.getCheckedChildList = function getCheckedChildList(id) {
|
|
20314
|
+
return this.jsTree.jstree(METHOD.GET_CHECKED_DESCENDANTS, id);
|
|
20315
|
+
};
|
|
20316
|
+
_proto.getTopChecked = function getTopChecked(full) {
|
|
20317
|
+
return this.jsTree.jstree(METHOD.GET_TOP_CHECKED, full);
|
|
20318
|
+
};
|
|
20319
|
+
_proto.getBottomChecked = function getBottomChecked(full) {
|
|
20320
|
+
return this.jsTree.jstree(METHOD.GET_BOTTOM_CHECKED, full);
|
|
20321
|
+
};
|
|
20322
|
+
_proto.isChecked = function isChecked(node) {
|
|
20323
|
+
return this.jsTree.jstree(METHOD.IS_CHECKED, node);
|
|
20324
|
+
};
|
|
20325
|
+
_proto.isUndetermined = function isUndetermined(node) {
|
|
20326
|
+
return this.jsTree.jstree(METHOD.IS_UNDETERMINED, node);
|
|
20327
|
+
};
|
|
20274
20328
|
return JsTreeViewContextImpl;
|
|
20275
20329
|
}();
|
|
20276
20330
|
|
|
20277
20331
|
var styles$3 = {"vitro-tree-view":"_tree-view_vitro-tree-view_3oii-CW"};
|
|
20278
20332
|
|
|
20333
|
+
var CSS_CLASS_JSTREE_NODE = 'jstree-node';
|
|
20279
20334
|
var TreeView = function TreeView(props) {
|
|
20280
20335
|
var _useState = useState(null),
|
|
20281
20336
|
jsTreeTreeView = _useState[0],
|
|
20282
20337
|
setJsTreeTreeView = _useState[1];
|
|
20283
20338
|
var jsTreeRef = useRef(null);
|
|
20284
|
-
var config = TreeViewConfig.getConfig();
|
|
20339
|
+
var config = TreeViewConfig.getConfig(props.id, props.isCheckboxSelect, props.isSaveCheckboxState);
|
|
20285
20340
|
var jsTreeView;
|
|
20286
20341
|
useEffect(function () {
|
|
20287
20342
|
config.core.data = props.getData;
|
|
20343
|
+
if (props.isCheckboxSelect) {
|
|
20344
|
+
jquery(document).on(EVENT.CONTEXTMENU, CTRL.DOT + CSS_CLASS_JSTREE_NODE, function (e) {
|
|
20345
|
+
return checkNode(e, jsTreeView);
|
|
20346
|
+
});
|
|
20347
|
+
}
|
|
20288
20348
|
jquery(jsTreeRef.current).jstree(config);
|
|
20289
20349
|
var jsTree = jquery(jsTreeRef.current);
|
|
20290
20350
|
jsTreeView = new JsTreeViewContextImpl(jsTree);
|
|
@@ -20292,18 +20352,33 @@ var TreeView = function TreeView(props) {
|
|
|
20292
20352
|
if (props.onInit) {
|
|
20293
20353
|
props.onInit(jsTreeView);
|
|
20294
20354
|
}
|
|
20355
|
+
return function () {
|
|
20356
|
+
jquery(document).off(EVENT.CONTEXTMENU, CTRL.DOT + CSS_CLASS_JSTREE_NODE, function (e) {
|
|
20357
|
+
return checkNode(e, jsTreeView);
|
|
20358
|
+
});
|
|
20359
|
+
};
|
|
20295
20360
|
}, [jsTreeRef]);
|
|
20296
20361
|
useEffect(function () {
|
|
20297
20362
|
return function () {
|
|
20298
|
-
if (jsTreeRef.current) {
|
|
20363
|
+
if (jsTreeTreeView && jsTreeRef.current) {
|
|
20299
20364
|
jsTreeTreeView.dispose();
|
|
20300
20365
|
}
|
|
20301
20366
|
};
|
|
20302
20367
|
}, []);
|
|
20368
|
+
var checkNode = function checkNode(e, treeView) {
|
|
20369
|
+
e.preventDefault();
|
|
20370
|
+
e.stopPropagation();
|
|
20371
|
+
var nodeId = e.currentTarget.id;
|
|
20372
|
+
var node = treeView.getNode(nodeId);
|
|
20373
|
+
if (!node.state.checked) {
|
|
20374
|
+
node.state.checked = true;
|
|
20375
|
+
treeView.redrawNode(node, false);
|
|
20376
|
+
}
|
|
20377
|
+
};
|
|
20303
20378
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
20304
20379
|
ref: jsTreeRef,
|
|
20305
20380
|
id: props.id,
|
|
20306
|
-
className: styles$3[
|
|
20381
|
+
className: styles$3['vitro-tree-view']
|
|
20307
20382
|
}));
|
|
20308
20383
|
};
|
|
20309
20384
|
|
|
@@ -20621,6 +20696,7 @@ var EVENT$2;
|
|
|
20621
20696
|
EVENT["ON_CUSTOM_END_EDIT"] = "OnCustomEndEdit";
|
|
20622
20697
|
EVENT["ON_CUSTOM_START_EDIT"] = "OnCustomStartEdit";
|
|
20623
20698
|
EVENT["ON_ENDED_DRAG"] = "OnEndedDrag";
|
|
20699
|
+
EVENT["ON_END_DRAG"] = "OnEndDrag";
|
|
20624
20700
|
EVENT["ON_FILTER_OPERATOR"] = "OnFilterOperator";
|
|
20625
20701
|
EVENT["ON_FILTER"] = "OnFilter";
|
|
20626
20702
|
EVENT["ON_GANTT_CHANGED"] = "OnGanttChanged";
|
|
@@ -21143,6 +21219,7 @@ var TelerikUploaderContextImpl = /*#__PURE__*/function () {
|
|
|
21143
21219
|
};
|
|
21144
21220
|
_proto.error = function error(e) {
|
|
21145
21221
|
this.errorCount += e.files.length;
|
|
21222
|
+
this.setErrorMessage(e.files[0], e.XMLHttpRequest.response);
|
|
21146
21223
|
};
|
|
21147
21224
|
_proto.progress = function progress(e) {
|
|
21148
21225
|
this.progressInfo.show();
|
|
@@ -21221,6 +21298,17 @@ var TelerikUploaderContextImpl = /*#__PURE__*/function () {
|
|
|
21221
21298
|
_proto.setAthorizationToken = function setAthorizationToken(token) {
|
|
21222
21299
|
this.token = token;
|
|
21223
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
|
+
};
|
|
21224
21312
|
_proto.setFileImage = function setFileImage(file) {
|
|
21225
21313
|
if (this.settings.getFileImage) {
|
|
21226
21314
|
var image = this.settings.getFileImage(file.name);
|
|
@@ -59500,18 +59588,19 @@ var LOCALE$1;
|
|
|
59500
59588
|
(function (LOCALE) {
|
|
59501
59589
|
LOCALE["CONF_SINGLE"] = "app.common.msg.action.conf.single";
|
|
59502
59590
|
LOCALE["CONF_MULTI"] = "app.common.msg.action.conf.multi";
|
|
59591
|
+
LOCALE["CONF_STD"] = "app.common.msg.action.conf.std";
|
|
59503
59592
|
LOCALE["ITEM_COUNT"] = "app.common.actionHandler.itemCount";
|
|
59504
59593
|
LOCALE["ITEM_NAME"] = "app.common.actionHandler.itemName";
|
|
59505
59594
|
LOCALE["SUCCESS_SINGLE"] = "app.common.msg.action.success.single";
|
|
59506
59595
|
LOCALE["SUCCESS_MULTI"] = "app.common.msg.action.success.multi";
|
|
59596
|
+
LOCALE["SUCCESS_STD"] = "app.common.msg.action.success.std";
|
|
59507
59597
|
LOCALE["ERROR_SINGLE"] = "app.common.msg.action.error.single";
|
|
59508
59598
|
LOCALE["ERROR_MULTI"] = "app.common.msg.action.error.multi";
|
|
59599
|
+
LOCALE["ERROR_STD"] = "app.common.msg.action.error.std";
|
|
59509
59600
|
LOCALE["PROGRESS_SINGLE"] = "app.common.msg.action.progress.single";
|
|
59510
59601
|
LOCALE["PROGRESS_MULTI"] = "app.common.msg.action.progress.multi";
|
|
59511
|
-
LOCALE["
|
|
59512
|
-
LOCALE["WARNING_MULTI"] = "app.common.msg.action.warning.multi";
|
|
59602
|
+
LOCALE["PROGRESS_STD"] = "app.common.msg.action.progress.std";
|
|
59513
59603
|
LOCALE["ACTION"] = "app.common.action";
|
|
59514
|
-
LOCALE["ACTION_MSG"] = "app.common.msg.action";
|
|
59515
59604
|
LOCALE["ERROR_MSG"] = "app.common.msg.error";
|
|
59516
59605
|
LOCALE["SUCCESS"] = "success";
|
|
59517
59606
|
LOCALE["PROGRESS"] = "progress";
|
|
@@ -59566,9 +59655,15 @@ var ActionInfo = function ActionInfo(props) {
|
|
|
59566
59655
|
if (props.failResult && props.failResult.flat().find(function (itm) {
|
|
59567
59656
|
return itm.id === item.id;
|
|
59568
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
|
+
});
|
|
59569
59664
|
info = {
|
|
59570
59665
|
error: true,
|
|
59571
|
-
text:
|
|
59666
|
+
text: errorMessage
|
|
59572
59667
|
};
|
|
59573
59668
|
}
|
|
59574
59669
|
return info;
|
|
@@ -59578,28 +59673,25 @@ var ActionInfo = function ActionInfo(props) {
|
|
|
59578
59673
|
var successCount = props.successResult ? props.successResult.length : 0;
|
|
59579
59674
|
var failCount = props.failResult ? props.failResult.length : 0;
|
|
59580
59675
|
if (props.action === actionMap.progress) {
|
|
59581
|
-
|
|
59582
|
-
return localeService.create(key, {
|
|
59676
|
+
return localeService.create(LOCALE$1.PROGRESS_STD, {
|
|
59583
59677
|
count: count - successCount - failCount,
|
|
59584
59678
|
itemCount: count
|
|
59585
59679
|
});
|
|
59586
59680
|
}
|
|
59587
59681
|
if (props.action === actionMap.after) {
|
|
59588
59682
|
if (props.isSuccess) {
|
|
59589
|
-
|
|
59590
|
-
return localeService.create(_key, {
|
|
59683
|
+
return localeService.create(LOCALE$1.SUCCESS_STD, {
|
|
59591
59684
|
count: successCount,
|
|
59592
59685
|
itemCount: count
|
|
59593
59686
|
});
|
|
59594
59687
|
} else {
|
|
59595
59688
|
if (successCount) {
|
|
59596
|
-
|
|
59597
|
-
return localeService.create(_key2, {
|
|
59689
|
+
return localeService.create(LOCALE$1.ERROR_STD, {
|
|
59598
59690
|
count: successCount,
|
|
59599
59691
|
itemCount: count
|
|
59600
59692
|
});
|
|
59601
59693
|
} else {
|
|
59602
|
-
return localeService.create(LOCALE$1.
|
|
59694
|
+
return localeService.create(LOCALE$1.ERROR_STD, {
|
|
59603
59695
|
count: successCount,
|
|
59604
59696
|
itemCount: count
|
|
59605
59697
|
});
|
|
@@ -59678,9 +59770,10 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59678
59770
|
};
|
|
59679
59771
|
}, []);
|
|
59680
59772
|
var data = useMemo(function () {
|
|
59773
|
+
var itemList = props.itemList || props.item ? props.itemList || [props.item] : [];
|
|
59681
59774
|
return {
|
|
59682
|
-
itemList:
|
|
59683
|
-
itemCount:
|
|
59775
|
+
itemList: itemList,
|
|
59776
|
+
itemCount: itemList.length
|
|
59684
59777
|
};
|
|
59685
59778
|
}, []);
|
|
59686
59779
|
var progressBarRef = useRef(null);
|
|
@@ -59721,7 +59814,6 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59721
59814
|
window.removeEventListener(EVENT.KEYDOWN, onEscClick, false);
|
|
59722
59815
|
};
|
|
59723
59816
|
}, []);
|
|
59724
|
-
if (!props.item && !props.itemList) return null;
|
|
59725
59817
|
var init = function init() {
|
|
59726
59818
|
if (props.onBeforeAction) {
|
|
59727
59819
|
props.onBeforeAction();
|
|
@@ -59731,7 +59823,11 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59731
59823
|
if (props.confirmText && props.confirmText()) {
|
|
59732
59824
|
confText = props.confirmText(data.itemCount);
|
|
59733
59825
|
} else {
|
|
59734
|
-
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) {
|
|
59735
59831
|
confText = localeService.create(LOCALE$1.CONF_SINGLE, {
|
|
59736
59832
|
actionCode: action,
|
|
59737
59833
|
itemCount: data.itemCount
|
|
@@ -59748,6 +59844,9 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59748
59844
|
setCurrentAction(actionMap$1.before);
|
|
59749
59845
|
};
|
|
59750
59846
|
var finish = function finish(success, error, successResult, failResult) {
|
|
59847
|
+
if (failResult.length) {
|
|
59848
|
+
setShow(true);
|
|
59849
|
+
}
|
|
59751
59850
|
setSuccess(success);
|
|
59752
59851
|
setCurrentAction(actionMap$1.after);
|
|
59753
59852
|
if (props.onAfterAction) {
|
|
@@ -59756,7 +59855,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59756
59855
|
if (props.isBlockInterface) {
|
|
59757
59856
|
setBlockInterface(false);
|
|
59758
59857
|
}
|
|
59759
|
-
if (!props.isShowAfterAction) {
|
|
59858
|
+
if (!props.isShowAfterAction && !failResult.length) {
|
|
59760
59859
|
close(error, successResult, failResult);
|
|
59761
59860
|
return;
|
|
59762
59861
|
}
|
|
@@ -59782,28 +59881,44 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59782
59881
|
if (success) {
|
|
59783
59882
|
setIcon(styles$7['vitro-icon-success']);
|
|
59784
59883
|
setState(styles$7['vitro-success']);
|
|
59785
|
-
|
|
59786
|
-
setText(localeService.create(key, {
|
|
59787
|
-
actionCode: action,
|
|
59788
|
-
count: successResult.length
|
|
59789
|
-
}));
|
|
59884
|
+
setSuccessText(action, successResult);
|
|
59790
59885
|
} else if (successResult.length && failResult.length) {
|
|
59791
59886
|
setIcon(styles$7['vitro-icon-warning']);
|
|
59792
59887
|
setState(styles$7['vitro-warning']);
|
|
59793
|
-
|
|
59794
|
-
setText(localeService.create(_key, {
|
|
59795
|
-
actionCode: action,
|
|
59796
|
-
itemCount: data.itemCount
|
|
59797
|
-
}));
|
|
59888
|
+
setErrorText(action, failResult);
|
|
59798
59889
|
} else {
|
|
59799
59890
|
setIcon(styles$7['vitro-icon-error']);
|
|
59800
59891
|
setState(styles$7['vitro-error']);
|
|
59801
|
-
|
|
59802
|
-
|
|
59803
|
-
|
|
59804
|
-
|
|
59805
|
-
|
|
59892
|
+
setErrorText(action, failResult);
|
|
59893
|
+
}
|
|
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;
|
|
59806
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
|
+
}));
|
|
59807
59922
|
};
|
|
59808
59923
|
var setProgress = function setProgress(index) {
|
|
59809
59924
|
var percent = index * 100 / data.itemCount;
|
|
@@ -59836,7 +59951,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59836
59951
|
}
|
|
59837
59952
|
;
|
|
59838
59953
|
if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
|
|
59839
|
-
|
|
59954
|
+
hideDialog();
|
|
59840
59955
|
}
|
|
59841
59956
|
;
|
|
59842
59957
|
var _temp2 = function () {
|
|
@@ -59857,6 +59972,16 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59857
59972
|
}
|
|
59858
59973
|
};
|
|
59859
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() {
|
|
59860
59985
|
try {
|
|
59861
59986
|
var _temp5 = function _temp5() {
|
|
59862
59987
|
return {
|
|
@@ -59881,7 +60006,11 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59881
60006
|
_interrupt = true;
|
|
59882
60007
|
return;
|
|
59883
60008
|
}
|
|
59884
|
-
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) {
|
|
59885
60014
|
setText(localeService.create(LOCALE$1.PROGRESS_MULTI, {
|
|
59886
60015
|
idx: _i + 1,
|
|
59887
60016
|
itemCount: data.itemCount,
|
|
@@ -59905,6 +60034,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59905
60034
|
setFailResult(_failResult);
|
|
59906
60035
|
_success = false;
|
|
59907
60036
|
setSuccess(false);
|
|
60037
|
+
console.error(error);
|
|
59908
60038
|
});
|
|
59909
60039
|
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
59910
60040
|
});
|
|
@@ -59913,6 +60043,35 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59913
60043
|
return Promise.reject(e);
|
|
59914
60044
|
}
|
|
59915
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
|
+
};
|
|
59916
60075
|
var onEnter = function onEnter() {
|
|
59917
60076
|
if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
|
|
59918
60077
|
window.document.body.click();
|
|
@@ -59935,7 +60094,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59935
60094
|
};
|
|
59936
60095
|
var close = function close(error, successResult, failResult) {
|
|
59937
60096
|
if (isCloseEnabled) {
|
|
59938
|
-
if ( props.onAfterActionClose) {
|
|
60097
|
+
if (currentAction == actionMap$1.after && props.onAfterActionClose) {
|
|
59939
60098
|
props.onAfterActionClose(error, successResult, failResult);
|
|
59940
60099
|
}
|
|
59941
60100
|
hideDialog();
|
|
@@ -60089,6 +60248,9 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
60089
60248
|
var dropItemList = props.itemList.filter(function (x) {
|
|
60090
60249
|
return !x.isOverflow;
|
|
60091
60250
|
});
|
|
60251
|
+
var isShowImage = props.itemList.find(function (item) {
|
|
60252
|
+
return !!item.imageUrl;
|
|
60253
|
+
}) ? true : false;
|
|
60092
60254
|
return React__default.createElement("div", {
|
|
60093
60255
|
className: styles$b['vitro-dropdown-button'] + CTRL.SPACE + (props.className || CTRL.EMPTY)
|
|
60094
60256
|
}, overflowItemList.map(function (item) {
|
|
@@ -60131,11 +60293,12 @@ var DropdownButton = function DropdownButton(props) {
|
|
|
60131
60293
|
onClick: function onClick(e) {
|
|
60132
60294
|
return x.onClick(x.value, e);
|
|
60133
60295
|
}
|
|
60296
|
+
}, isShowImage && React__default.createElement("div", {
|
|
60297
|
+
className: styles$b['vitro-icon']
|
|
60134
60298
|
}, x.imageUrl && React__default.createElement(Icon, {
|
|
60135
60299
|
defaultUrl: x.imageUrl,
|
|
60136
|
-
hoverUrl: x.imageHoverUrl
|
|
60137
|
-
|
|
60138
|
-
}), React__default.createElement("span", null, x.text));
|
|
60300
|
+
hoverUrl: x.imageHoverUrl
|
|
60301
|
+
})), React__default.createElement("span", null, x.text));
|
|
60139
60302
|
}))));
|
|
60140
60303
|
};
|
|
60141
60304
|
|
|
@@ -60240,7 +60403,7 @@ var TabGroupComponent = function TabGroupComponent(props) {
|
|
|
60240
60403
|
}
|
|
60241
60404
|
}, [currentTab, props.itemList]);
|
|
60242
60405
|
return React__default.createElement("div", {
|
|
60243
|
-
className: styles$c['vitro-tab'],
|
|
60406
|
+
className: styles$c['vitro-tab'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY),
|
|
60244
60407
|
ref: ref
|
|
60245
60408
|
}, React__default.createElement(TabGroupHeader, {
|
|
60246
60409
|
itemList: props.itemList,
|
|
@@ -63209,11 +63372,12 @@ var CommandMenuSubItem = function CommandMenuSubItem(props) {
|
|
|
63209
63372
|
return React__default.createElement(DropdownItem$2, {
|
|
63210
63373
|
onClick: onClick,
|
|
63211
63374
|
toggle: props.toggle === false ? false : true
|
|
63375
|
+
}, props.isShowImage && React__default.createElement("div", {
|
|
63376
|
+
className: styles$u['vitro-icon']
|
|
63212
63377
|
}, props.imageUrl && React__default.createElement(Icon, {
|
|
63213
63378
|
defaultUrl: props.imageUrl,
|
|
63214
|
-
hoverUrl: props.imageHoverUrl
|
|
63215
|
-
|
|
63216
|
-
}), React__default.createElement("span", null, props.text));
|
|
63379
|
+
hoverUrl: props.imageHoverUrl
|
|
63380
|
+
})), React__default.createElement("span", null, props.text));
|
|
63217
63381
|
};
|
|
63218
63382
|
|
|
63219
63383
|
var CommandMenuItemHeader = function CommandMenuItemHeader(props) {
|
|
@@ -63240,6 +63404,10 @@ var CommandMenuItemHeader = function CommandMenuItemHeader(props) {
|
|
|
63240
63404
|
};
|
|
63241
63405
|
|
|
63242
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;
|
|
63243
63411
|
return React__default.createElement(UncontrolledDropdown, {
|
|
63244
63412
|
nav: true,
|
|
63245
63413
|
inNavbar: true,
|
|
@@ -63253,7 +63421,9 @@ var CommandMenuDropdownButton = function CommandMenuDropdownButton(props) {
|
|
|
63253
63421
|
return React__default.createElement(CommandMenuSubItem, Object.assign({
|
|
63254
63422
|
toggle: props.toggle,
|
|
63255
63423
|
key: i.text
|
|
63256
|
-
}, i
|
|
63424
|
+
}, i, {
|
|
63425
|
+
isShowImage: isShowImage
|
|
63426
|
+
}));
|
|
63257
63427
|
}), props.children));
|
|
63258
63428
|
};
|
|
63259
63429
|
|
|
@@ -63531,9 +63701,9 @@ var Alert$1 = function Alert(props) {
|
|
|
63531
63701
|
return React__default.createElement("div", {
|
|
63532
63702
|
tabIndex: 1,
|
|
63533
63703
|
onBlur: onFocusOut,
|
|
63534
|
-
ref: ref
|
|
63704
|
+
ref: ref,
|
|
63705
|
+
className: className
|
|
63535
63706
|
}, React__default.createElement(BootstrapAlert, {
|
|
63536
|
-
className: className,
|
|
63537
63707
|
variant: props.type,
|
|
63538
63708
|
onClose: props.onClose
|
|
63539
63709
|
}, React__default.createElement("div", {
|
|
@@ -63569,52 +63739,27 @@ var DialogComponent = function DialogComponent(props) {
|
|
|
63569
63739
|
}, props.children);
|
|
63570
63740
|
};
|
|
63571
63741
|
|
|
63572
|
-
var
|
|
63742
|
+
var styles$z = {"vitro-dialog-content":"_dialog-content_vitro-dialog-content_qQNWu6x"};
|
|
63573
63743
|
|
|
63574
|
-
var
|
|
63575
|
-
return React__default.createElement("div", {
|
|
63576
|
-
className: headerStyles['vitro-dialog-header']
|
|
63577
|
-
}, props.title);
|
|
63578
|
-
};
|
|
63579
|
-
|
|
63580
|
-
var dialogStyles = {"vitro-dialog":"_dialog_vitro-dialog_2NzcRZg"};
|
|
63581
|
-
|
|
63582
|
-
var styles$z = {"vitro-dialog-button-close":"_dialog-button-close_vitro-dialog-button-close_1p27cEz","vitro-button-close":"_dialog-button-close_vitro-button-close_2BpzTR0"};
|
|
63583
|
-
|
|
63584
|
-
var Dialog = function Dialog(props) {
|
|
63585
|
-
var className = dialogStyles['vitro-dialog'];
|
|
63586
|
-
var onClose = function onClose() {
|
|
63587
|
-
if (props.onClose) {
|
|
63588
|
-
props.onClose();
|
|
63589
|
-
}
|
|
63590
|
-
};
|
|
63591
|
-
var onOutsideClick = function onOutsideClick(e) {
|
|
63592
|
-
if (e.target && e.target.className === className) {
|
|
63593
|
-
onClose();
|
|
63594
|
-
}
|
|
63595
|
-
};
|
|
63744
|
+
var DialogContent = function DialogContent(props) {
|
|
63596
63745
|
return React__default.createElement("div", {
|
|
63597
|
-
className: className
|
|
63598
|
-
|
|
63599
|
-
}, React__default.createElement(DialogComponent, {
|
|
63600
|
-
width: props.width,
|
|
63601
|
-
height: props.height
|
|
63602
|
-
}, props.isDismissible && React__default.createElement("button", {
|
|
63603
|
-
className: styles$z['vitro-dialog-button-close'],
|
|
63604
|
-
onClick: onClose
|
|
63605
|
-
}), React__default.createElement(DialogHeader, {
|
|
63606
|
-
title: props.title
|
|
63607
|
-
}), props.children.length ? props.children.map(function (child) {
|
|
63608
|
-
return React__default.cloneElement(child, _extends({}, props));
|
|
63609
|
-
}) : React__default.cloneElement(props.children, _extends({}, props))));
|
|
63746
|
+
className: styles$z['vitro-dialog-content'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY)
|
|
63747
|
+
}, props.children);
|
|
63610
63748
|
};
|
|
63611
63749
|
|
|
63612
|
-
var styles$A = {"vitro-dialog-
|
|
63750
|
+
var styles$A = {"vitro-dialog-header":"_dialog-header_vitro-dialog-header_2W3GraU","vitro-title":"_dialog-header_vitro-title_2k8SPhE","vitro-description":"_dialog-header_vitro-description_Hiq51VI","vitro-icon":"_dialog-header_vitro-icon_3GtsVWO"};
|
|
63613
63751
|
|
|
63614
|
-
var
|
|
63752
|
+
var DialogHeader = function DialogHeader(props) {
|
|
63615
63753
|
return React__default.createElement("div", {
|
|
63616
|
-
className: styles$A['vitro-dialog-
|
|
63617
|
-
}, props.
|
|
63754
|
+
className: styles$A['vitro-dialog-header']
|
|
63755
|
+
}, props.imageUrl && React__default.createElement(Icon, {
|
|
63756
|
+
defaultUrl: props.imageUrl,
|
|
63757
|
+
className: styles$A['vitro-icon']
|
|
63758
|
+
}), React__default.createElement("div", null, React__default.createElement("h1", {
|
|
63759
|
+
className: styles$A['vitro-title']
|
|
63760
|
+
}, props.title), props.description && React__default.createElement("h2", {
|
|
63761
|
+
className: styles$A['vitro-description']
|
|
63762
|
+
}, props.description)));
|
|
63618
63763
|
};
|
|
63619
63764
|
|
|
63620
63765
|
var styles$B = {"vitro-dialog-button":"_dialog-button_vitro-dialog-button_1fQ5l22"};
|
|
@@ -63625,6 +63770,8 @@ var DialogButton = function DialogButton(props) {
|
|
|
63625
63770
|
}));
|
|
63626
63771
|
};
|
|
63627
63772
|
|
|
63773
|
+
var dialogButtonCloseStyles = {"vitro-dialog-button-close":"_dialog-button-close_vitro-dialog-button-close_1p27cEz","vitro-button-close":"_dialog-button-close_vitro-button-close_2BpzTR0"};
|
|
63774
|
+
|
|
63628
63775
|
var DialogCloseButton = function DialogCloseButton(props) {
|
|
63629
63776
|
useEffect(function () {
|
|
63630
63777
|
window.document.addEventListener(EVENT.KEYDOWN, escFunction, false);
|
|
@@ -63641,7 +63788,7 @@ var DialogCloseButton = function DialogCloseButton(props) {
|
|
|
63641
63788
|
onClick: props.onClose,
|
|
63642
63789
|
text: props.text,
|
|
63643
63790
|
isDisabled: props.isDisabled,
|
|
63644
|
-
className:
|
|
63791
|
+
className: dialogButtonCloseStyles['vitro-button-close']
|
|
63645
63792
|
});
|
|
63646
63793
|
};
|
|
63647
63794
|
|
|
@@ -63655,18 +63802,77 @@ var LOCALE$5;
|
|
|
63655
63802
|
var styles$C = {"vitro-dialog-footer":"_dialog-footer_vitro-dialog-footer_2vUQ3aG"};
|
|
63656
63803
|
|
|
63657
63804
|
var DialogFooter = function DialogFooter(props) {
|
|
63805
|
+
var _props$buttonList, _props$buttonList2;
|
|
63658
63806
|
var localeService = useInjection(SERVICE.LOCALE);
|
|
63659
|
-
var labelClose = props.labelClose || localeService.create(props.
|
|
63660
|
-
var
|
|
63807
|
+
var labelClose = props.labelClose || localeService.create((_props$buttonList = props.buttonList) !== null && _props$buttonList !== void 0 && _props$buttonList.length ? LOCALE$5.ACTION_CANCEL : LOCALE$5.ACTION_CLOSE);
|
|
63808
|
+
var onClose = function onClose() {
|
|
63809
|
+
if (props.onClose) {
|
|
63810
|
+
props.onClose(props.dialog);
|
|
63811
|
+
}
|
|
63812
|
+
};
|
|
63661
63813
|
return React__default.createElement("div", {
|
|
63662
63814
|
className: styles$C['vitro-dialog-footer']
|
|
63663
|
-
}, props.
|
|
63664
|
-
text: labelAction,
|
|
63665
|
-
onClick: props.onActionClick
|
|
63666
|
-
}), props.isDismissible && React__default.createElement(DialogCloseButton, {
|
|
63815
|
+
}, props.isDismissible && props.onClose && React__default.createElement(DialogCloseButton, {
|
|
63667
63816
|
text: labelClose,
|
|
63668
|
-
|
|
63669
|
-
|
|
63817
|
+
isDisabled: !props.isDismissible,
|
|
63818
|
+
onClose: onClose
|
|
63819
|
+
}), (_props$buttonList2 = props.buttonList) !== null && _props$buttonList2 !== void 0 && _props$buttonList2.length ? props.buttonList.map(function (button) {
|
|
63820
|
+
return React__default.createElement(DialogButton, {
|
|
63821
|
+
text: button.text,
|
|
63822
|
+
onClick: function onClick() {
|
|
63823
|
+
return button.onClick(props.dialog);
|
|
63824
|
+
},
|
|
63825
|
+
isDisabled: button.isDisabled,
|
|
63826
|
+
className: button.className
|
|
63827
|
+
});
|
|
63828
|
+
}) : null);
|
|
63829
|
+
};
|
|
63830
|
+
|
|
63831
|
+
var dialogStyles = {"vitro-dialog":"_dialog_vitro-dialog_2NzcRZg"};
|
|
63832
|
+
|
|
63833
|
+
var Dialog = function Dialog(props) {
|
|
63834
|
+
var _props$buttonList;
|
|
63835
|
+
var _useState = useState(null),
|
|
63836
|
+
component = _useState[0],
|
|
63837
|
+
setComponent = _useState[1];
|
|
63838
|
+
var className = dialogStyles['vitro-dialog'];
|
|
63839
|
+
var showFooter = !props.isHideFooter && (((_props$buttonList = props.buttonList) === null || _props$buttonList === void 0 ? void 0 : _props$buttonList.length) || props.onClose);
|
|
63840
|
+
useEffect(function () {
|
|
63841
|
+
if (props.content) {
|
|
63842
|
+
var c = React__default.createElement(props.content.component, props.content.props);
|
|
63843
|
+
setComponent(c);
|
|
63844
|
+
}
|
|
63845
|
+
}, [props.content]);
|
|
63846
|
+
var onClose = function onClose() {
|
|
63847
|
+
if (props.onClose) {
|
|
63848
|
+
props.onClose(props.dialog);
|
|
63849
|
+
}
|
|
63850
|
+
};
|
|
63851
|
+
var onOutsideClick = function onOutsideClick(e) {
|
|
63852
|
+
if (e.target && e.target.className === className) {
|
|
63853
|
+
onClose();
|
|
63854
|
+
}
|
|
63855
|
+
};
|
|
63856
|
+
return React__default.createElement("div", {
|
|
63857
|
+
className: className,
|
|
63858
|
+
onClick: onOutsideClick
|
|
63859
|
+
}, React__default.createElement(DialogComponent, {
|
|
63860
|
+
width: props.width,
|
|
63861
|
+
height: props.height
|
|
63862
|
+
}, props.isDismissible && React__default.createElement("button", {
|
|
63863
|
+
className: dialogButtonCloseStyles['vitro-dialog-button-close'],
|
|
63864
|
+
onClick: onClose
|
|
63865
|
+
}), React__default.createElement(DialogHeader, {
|
|
63866
|
+
title: props.title,
|
|
63867
|
+
description: props.description,
|
|
63868
|
+
imageUrl: props.imageUrl
|
|
63869
|
+
}), component && React__default.createElement(DialogContent, null, component), props.children, showFooter ? React__default.createElement(DialogFooter, {
|
|
63870
|
+
dialog: props.dialog,
|
|
63871
|
+
buttonList: props.buttonList,
|
|
63872
|
+
labelClose: props.labelClose,
|
|
63873
|
+
onClose: props.onClose,
|
|
63874
|
+
isDismissible: props.isDismissible
|
|
63875
|
+
}) : null));
|
|
63670
63876
|
};
|
|
63671
63877
|
|
|
63672
63878
|
var styles$D = {"vitro-user-profile":"_user-profile_vitro-user-profile_11XpBoQ","vitro-dropdown-item":"_user-profile_vitro-dropdown-item_dSErsta"};
|
|
@@ -63794,5 +64000,46 @@ var ActivityItem = function ActivityItem(props) {
|
|
|
63794
64000
|
})));
|
|
63795
64001
|
};
|
|
63796
64002
|
|
|
63797
|
-
|
|
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 };
|
|
63798
64045
|
//# sourceMappingURL=index.modern.js.map
|