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