@agilemotion/oui-react-js 1.6.4 → 1.6.6
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/dist/ApplicationManager.js +675 -1044
- package/dist/BasicApp.js +9 -27
- package/dist/BasicAppHome.js +27 -101
- package/dist/DynamicJS.js +109 -197
- package/dist/InteractionPortalApp.js +7 -27
- package/dist/InteractionPortalAppHome.js +21 -87
- package/dist/InteractionPortalApp_old.js +60 -122
- package/dist/RestUtils.js +269 -410
- package/dist/TypedValue.js +20 -26
- package/dist/Utils.js +295 -481
- package/dist/WithRouter.js +9 -17
- package/dist/assets/jss/components/authNavbarStyle.js +168 -171
- package/dist/assets/jss/components/buttonStyle.js +2 -5
- package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
- package/dist/assets/jss/components/cardBodyStyle.js +2 -5
- package/dist/assets/jss/components/cardFooterStyle.js +2 -5
- package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
- package/dist/assets/jss/components/cardIconStyle.js +2 -5
- package/dist/assets/jss/components/cardStyle.js +2 -5
- package/dist/assets/jss/components/cardTextStyle.js +2 -5
- package/dist/assets/jss/components/customDropdownStyle.js +171 -173
- package/dist/assets/jss/components/customInputStyle.js +5 -13
- package/dist/assets/jss/components/dropdownStyle.js +71 -74
- package/dist/assets/jss/components/footerStyle.js +14 -23
- package/dist/assets/jss/components/headerLinksStyle.js +52 -53
- package/dist/assets/jss/components/headerStyle.js +68 -73
- package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
- package/dist/assets/jss/components/navbarStyle.js +79 -84
- package/dist/assets/jss/components/sidebarStyle.js +438 -441
- package/dist/assets/jss/components/typographyStyle.js +5 -13
- package/dist/assets/jss/rootStyle.js +85 -151
- package/dist/assets/jss/views/layoutStyle.js +45 -51
- package/dist/assets/jss/views/loginBasicStyle.js +2 -5
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
- package/dist/assets/jss/views/loginStyle.js +80 -87
- package/dist/components/AlertBar.js +20 -75
- package/dist/components/AlertItem.js +13 -49
- package/dist/components/AlertTemplate.js +12 -18
- package/dist/components/Button.js +41 -112
- package/dist/components/Calendar.js +99 -208
- package/dist/components/ConfirmationDialog.js +13 -54
- package/dist/components/DataGrid.js +271 -695
- package/dist/components/DataGridColumn.js +24 -74
- package/dist/components/DataGridFilter.js +107 -245
- package/dist/components/DataGridHeading.js +34 -78
- package/dist/components/Dialog.js +37 -130
- package/dist/components/DocumentTemplateDesigner.js +16 -57
- package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
- package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
- package/dist/components/DocumentViewer.js +25 -65
- package/dist/components/DocumentViewerComponent.js +13 -44
- package/dist/components/ElementResizeHandler.js +148 -200
- package/dist/components/FileThumb.js +15 -56
- package/dist/components/Graph.js +98 -203
- package/dist/components/GraphNode.js +20 -61
- package/dist/components/HtmlPanel.js +38 -105
- package/dist/components/Icon.js +174 -253
- package/dist/components/LoadingIndicator.js +4 -11
- package/dist/components/LottieIcon.js +63 -60
- package/dist/components/PopupView.js +21 -60
- package/dist/components/Portlet.js +18 -60
- package/dist/components/RegularButton.js +34 -42
- package/dist/components/SignaturePanel.js +19 -67
- package/dist/components/SocketManager.js +133 -228
- package/dist/components/StepperTitleBar.js +48 -99
- package/dist/components/TabPage.js +30 -47
- package/dist/components/TabPanel.js +35 -122
- package/dist/components/TableCellContent.js +34 -98
- package/dist/components/TemplateDesigner.js +115 -230
- package/dist/components/TemplateItemEventHandler.js +298 -481
- package/dist/components/TemplateTable.js +117 -218
- package/dist/components/TitleBar.js +15 -53
- package/dist/components/Toolbar.js +44 -110
- package/dist/components/Tooltip.js +37 -56
- package/dist/components/Tree.js +50 -143
- package/dist/components/UseIsVisible.js +5 -25
- package/dist/components/card/Card.js +35 -39
- package/dist/components/card/CardAvatar.js +21 -32
- package/dist/components/card/CardBody.js +29 -36
- package/dist/components/card/CardFooter.js +26 -35
- package/dist/components/card/CardHeader.js +29 -36
- package/dist/components/card/CardIcon.js +15 -29
- package/dist/components/card/CardText.js +15 -29
- package/dist/components/customInput/CustomInput.js +38 -40
- package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
- package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
- package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
- package/dist/components/dashboard/components/Header.js +15 -52
- package/dist/components/dashboard/components/LeftDrawer.js +9 -23
- package/dist/components/dashboard/components/UserIdentity.js +4 -12
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
- package/dist/components/dashboard/components/portal/Timeline.js +3 -8
- package/dist/components/dashboard/components/portal/Workspace.js +4 -13
- package/dist/components/footer/Footer.js +23 -45
- package/dist/components/footer/HomeFooter.js +38 -78
- package/dist/components/form/AddressSearch.js +26 -76
- package/dist/components/form/AutoComplete.js +54 -168
- package/dist/components/form/BaseField.js +59 -189
- package/dist/components/form/Checkbox.js +11 -24
- package/dist/components/form/DatePicker.js +28 -82
- package/dist/components/form/FieldSet.js +84 -300
- package/dist/components/form/Form.js +206 -501
- package/dist/components/form/GridField.js +83 -243
- package/dist/components/form/IconField.js +10 -21
- package/dist/components/form/ImageEditor.js +98 -208
- package/dist/components/form/LabelField.js +13 -28
- package/dist/components/form/LookupField.js +36 -102
- package/dist/components/form/MultiFileUploadField.js +67 -134
- package/dist/components/form/RadioGroup.js +20 -57
- package/dist/components/form/Section.js +33 -118
- package/dist/components/form/SelectItem.js +36 -83
- package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
- package/dist/components/form/Switch.js +11 -24
- package/dist/components/form/TextField.js +19 -55
- package/dist/components/form/TimePicker.js +18 -43
- package/dist/components/form/TransferList.js +76 -200
- package/dist/components/form/UploadField.js +134 -256
- package/dist/components/grid/GridContainer.js +10 -23
- package/dist/components/grid/GridItem.js +10 -23
- package/dist/components/layout/CollapsiblePanel.js +20 -59
- package/dist/components/layout/Layout.js +40 -149
- package/dist/components/layout/View.js +65 -195
- package/dist/components/layout/ViewContainer.js +13 -33
- package/dist/components/layout/ViewPort.js +14 -48
- package/dist/components/layout/Window.js +62 -135
- package/dist/components/layout/WindowViewPort.js +18 -63
- package/dist/components/media/ClosablePanel.js +9 -18
- package/dist/components/media/LobbyWaitingList.js +11 -17
- package/dist/components/media/MediaSoupHelper.js +173 -401
- package/dist/components/media/SideBarContent.js +17 -34
- package/dist/components/media/SocketRequest.js +7 -18
- package/dist/components/media/SocketResponse.js +5 -14
- package/dist/components/media/Timer.js +18 -54
- package/dist/components/media/Toolbar.js +97 -254
- package/dist/components/media/ToolbarButton.js +34 -95
- package/dist/components/media/Toolbar_bck.js +70 -186
- package/dist/components/media/Tracks.js +19 -33
- package/dist/components/media/TrainingRoom.js +121 -374
- package/dist/components/media/Transports.js +17 -29
- package/dist/components/media/VCEventManager.js +45 -116
- package/dist/components/media/VCEventType.js +82 -168
- package/dist/components/media/VCParticipantList.js +16 -51
- package/dist/components/media/VCParticipantListItem.js +44 -141
- package/dist/components/media/VCRoom.js +14 -58
- package/dist/components/media/VCRoomParticipant.js +235 -556
- package/dist/components/media/VCRoomRecorder.js +106 -204
- package/dist/components/media/VCRoomWorkspace.js +248 -584
- package/dist/components/media/Video.js +27 -112
- package/dist/components/media/VideoPlayer.js +23 -91
- package/dist/components/media/chat/ChatRoom.js +143 -361
- package/dist/components/media/chat/ChatRoomItem.js +17 -58
- package/dist/components/media/chat/ChatRoomList.js +15 -60
- package/dist/components/menu/CollapsibleMenu.js +22 -52
- package/dist/components/menu/MenuBars.js +50 -116
- package/dist/components/menu/MenuButton.js +53 -130
- package/dist/components/menu/MenuItem.js +11 -51
- package/dist/components/menu/MenuLink.js +13 -41
- package/dist/components/menu/PopupMenu.js +13 -25
- package/dist/components/navbars/AuthNavbar.js +21 -56
- package/dist/components/navbars/HomeNavbar.js +213 -290
- package/dist/components/navbars/PortalNavbar.js +26 -81
- package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
- package/dist/components/signatures/AlertItem.js +14 -50
- package/dist/components/signatures/Card.js +6 -16
- package/dist/components/signatures/DocumentContainer.js +57 -165
- package/dist/components/signatures/ImageSignatureInput.js +64 -124
- package/dist/components/signatures/MenuButton.js +28 -63
- package/dist/components/signatures/Prompt.js +6 -41
- package/dist/components/signatures/ResponsiveTable.js +181 -370
- package/dist/components/signatures/SearchView.js +34 -112
- package/dist/components/signatures/SignatorySearch.js +11 -44
- package/dist/components/signatures/SignatorySearchForm.js +19 -50
- package/dist/components/signatures/SignatureInput.js +28 -91
- package/dist/components/signatures/SignatureInputProps.js +49 -144
- package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
- package/dist/components/signatures/Toolbar.js +99 -173
- package/dist/components/signatures/ViewUtils.js +207 -313
- package/dist/components/typography/Danger.js +6 -11
- package/dist/components/typography/Info.js +7 -11
- package/dist/components/typography/Link.js +6 -12
- package/dist/event/ActionHandlers.js +48 -87
- package/dist/event/Event.js +21 -25
- package/dist/event/EventListener.js +54 -48
- package/dist/event/EventType.js +18 -40
- package/dist/event/LoadDataActionHandler.js +10 -31
- package/dist/event/Observable.js +204 -396
- package/dist/event/RouteActionHandler.js +119 -171
- package/dist/event/ScriptActionHandler.js +10 -32
- package/dist/event/ServiceCallActionHandler.js +37 -64
- package/dist/event/SignalGraphActionHandler.js +9 -31
- package/dist/js/Addresses.js +23 -42
- package/dist/js/Calendar.js +41 -89
- package/dist/js/DynamicLib.js +11 -23
- package/dist/js/Media.js +80 -174
- package/dist/js/Validators.js +6 -12
- package/dist/js/Windows.js +22 -40
- package/dist/redux/store/ConfigureStore.js +12 -29
- package/dist/redux/store/DashboardStore.js +47 -120
- package/dist/redux/store/History.js +2 -5
- package/dist/redux/store/SecurityStore.js +22 -65
- package/dist/security/TokenManager.js +29 -53
- package/dist/theme-default.js +3 -8
- package/dist/view/Dashboard.js +140 -308
- package/dist/view/PortalDashboard.js +6 -13
- package/dist/view/Settings.js +3 -11
- package/dist/view/Views.js +15 -35
- package/dist/view/security/ChangePasswordBasic.js +41 -147
- package/dist/view/security/ForgotPassword.js +26 -106
- package/dist/view/security/ForgotPasswordBasic.js +22 -96
- package/dist/view/security/Login.js +29 -117
- package/dist/view/security/LoginBasic.js +28 -108
- package/dist/view/security/LoginInteractionPortal.js +28 -106
- package/dist/view/security/ResetPassword.js +25 -110
- package/dist/view/security/ResetPasswordBasic.js +39 -142
- package/dist/view/security/Security.js +14 -26
- package/package.json +25 -20
|
@@ -1,131 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = EnhancedTable;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _styles = require("@material-ui/core/styles");
|
|
15
|
-
|
|
16
10
|
var _reactSuperResponsiveTable = require("react-super-responsive-table");
|
|
17
|
-
|
|
18
11
|
require("react-super-responsive-table/dist/SuperResponsiveTableStyle.css");
|
|
19
|
-
|
|
20
12
|
var _TablePagination = _interopRequireDefault(require("@material-ui/core/TablePagination"));
|
|
21
|
-
|
|
22
13
|
var _TableSortLabel = _interopRequireDefault(require("@material-ui/core/TableSortLabel"));
|
|
23
|
-
|
|
24
14
|
var _Toolbar = _interopRequireDefault(require("./Toolbar"));
|
|
25
|
-
|
|
26
15
|
var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
|
|
27
|
-
|
|
28
16
|
var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox"));
|
|
29
|
-
|
|
30
17
|
var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
|
|
31
|
-
|
|
32
18
|
require("./ResponsiveTable.css");
|
|
33
|
-
|
|
34
19
|
var _RestUtils = require("../../RestUtils");
|
|
35
|
-
|
|
36
20
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
41
|
-
|
|
42
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
43
|
-
|
|
44
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
45
|
-
|
|
46
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
47
|
-
|
|
48
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
49
|
-
|
|
50
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
51
|
-
|
|
52
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
53
|
-
|
|
54
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
55
|
-
|
|
56
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
57
|
-
|
|
58
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
59
|
-
|
|
60
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
61
|
-
|
|
62
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
63
|
-
|
|
64
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
65
|
-
|
|
66
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
67
|
-
|
|
68
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
69
|
-
|
|
70
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
71
|
-
|
|
72
|
-
var utils = new _ViewUtils.default();
|
|
73
|
-
var MULTI_SELECT_CHECKBOX_COL_WIDTH = 64;
|
|
74
|
-
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
const utils = new _ViewUtils.default();
|
|
23
|
+
const MULTI_SELECT_CHECKBOX_COL_WIDTH = 64;
|
|
75
24
|
function evaluateTableCellWidth(multiSelect, headCell, headCellCount) {
|
|
76
25
|
return multiSelect === true ? "calc(" + (typeof headCell.widthRatio !== 'undefined' ? 100 * headCell.widthRatio + "%" : 100 / headCellCount + "%") + " - " + MULTI_SELECT_CHECKBOX_COL_WIDTH / headCellCount + "px)" : typeof headCell.widthRatio !== 'undefined' ? 100 * headCell.widthRatio + "%" : 100 / headCellCount + "%";
|
|
77
26
|
}
|
|
78
|
-
|
|
79
27
|
function desc(a, b, orderBy) {
|
|
80
28
|
if (b[orderBy] < a[orderBy]) {
|
|
81
29
|
return -1;
|
|
82
30
|
}
|
|
83
|
-
|
|
84
31
|
if (b[orderBy] > a[orderBy]) {
|
|
85
32
|
return 1;
|
|
86
33
|
}
|
|
87
|
-
|
|
88
34
|
return 0;
|
|
89
35
|
}
|
|
90
|
-
|
|
91
36
|
function stableSort(array, cmp) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
stabilizedThis.sort(function (a, b) {
|
|
96
|
-
var order = cmp(a[0], b[0]);
|
|
37
|
+
const stabilizedThis = array.map((el, index) => [el, index]);
|
|
38
|
+
stabilizedThis.sort((a, b) => {
|
|
39
|
+
const order = cmp(a[0], b[0]);
|
|
97
40
|
if (order !== 0) return order;
|
|
98
41
|
return a[1] - b[1];
|
|
99
42
|
});
|
|
100
|
-
return stabilizedThis.map(
|
|
101
|
-
return el[0];
|
|
102
|
-
});
|
|
43
|
+
return stabilizedThis.map(el => el[0]);
|
|
103
44
|
}
|
|
104
|
-
|
|
105
45
|
function getSorting(order, orderBy) {
|
|
106
|
-
return order === 'desc' ?
|
|
107
|
-
return desc(a, b, orderBy);
|
|
108
|
-
} : function (a, b) {
|
|
109
|
-
return -desc(a, b, orderBy);
|
|
110
|
-
};
|
|
46
|
+
return order === 'desc' ? (a, b) => desc(a, b, orderBy) : (a, b) => -desc(a, b, orderBy);
|
|
111
47
|
}
|
|
112
|
-
|
|
113
48
|
function EnhancedTableHead(props) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
49
|
+
const {
|
|
50
|
+
classes,
|
|
51
|
+
onSelectAllClick,
|
|
52
|
+
order,
|
|
53
|
+
orderBy,
|
|
54
|
+
numSelected,
|
|
55
|
+
rowCount,
|
|
56
|
+
onRequestSort,
|
|
57
|
+
headCells
|
|
58
|
+
} = props;
|
|
59
|
+
const createSortHandler = property => event => {
|
|
60
|
+
onRequestSort(event, property);
|
|
127
61
|
};
|
|
128
|
-
|
|
129
62
|
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Thead, {
|
|
130
63
|
className: classes.tableHead,
|
|
131
64
|
style: {
|
|
@@ -147,25 +80,22 @@ function EnhancedTableHead(props) {
|
|
|
147
80
|
inputProps: {
|
|
148
81
|
'aria-label': 'select all'
|
|
149
82
|
}
|
|
150
|
-
})) : null, headCells.map(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}, order === 'desc' ? 'sorted descending' : 'sorted ascending') : null));
|
|
166
|
-
})));
|
|
83
|
+
})) : null, headCells.map(headCell => /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Th, {
|
|
84
|
+
key: headCell.id,
|
|
85
|
+
align: headCell.numeric === true ? 'right' : 'left',
|
|
86
|
+
padding: headCell.disablePadding ? 'none' : 'default',
|
|
87
|
+
className: classes.tableHeaderCell,
|
|
88
|
+
style: {
|
|
89
|
+
width: headCell.width
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement(_TableSortLabel.default, {
|
|
92
|
+
active: orderBy === headCell.id,
|
|
93
|
+
direction: order,
|
|
94
|
+
onClick: createSortHandler(headCell.id)
|
|
95
|
+
}, headCell.label, orderBy === headCell.id ? /*#__PURE__*/_react.default.createElement("span", {
|
|
96
|
+
className: classes.visuallyHidden
|
|
97
|
+
}, order === 'desc' ? 'sorted descending' : 'sorted ascending') : null)))));
|
|
167
98
|
}
|
|
168
|
-
|
|
169
99
|
EnhancedTableHead.propTypes = {
|
|
170
100
|
classes: _propTypes.default.object.isRequired,
|
|
171
101
|
numSelected: _propTypes.default.number.isRequired,
|
|
@@ -175,228 +105,157 @@ EnhancedTableHead.propTypes = {
|
|
|
175
105
|
orderBy: _propTypes.default.string.isRequired,
|
|
176
106
|
rowCount: _propTypes.default.number.isRequired
|
|
177
107
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
};
|
|
231
|
-
});
|
|
232
|
-
|
|
108
|
+
const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
109
|
+
root: {
|
|
110
|
+
width: '100%',
|
|
111
|
+
marginTop: theme.spacing(3)
|
|
112
|
+
},
|
|
113
|
+
paper: {
|
|
114
|
+
width: '100%',
|
|
115
|
+
height: '100%',
|
|
116
|
+
position: 'relative',
|
|
117
|
+
zIndex: '0'
|
|
118
|
+
},
|
|
119
|
+
scrollPadding: {
|
|
120
|
+
padding: '8px !important'
|
|
121
|
+
},
|
|
122
|
+
noScrollPadding: {
|
|
123
|
+
padding: '0 !important',
|
|
124
|
+
width: '1px !important'
|
|
125
|
+
},
|
|
126
|
+
tableBody: {
|
|
127
|
+
display: 'block',
|
|
128
|
+
overflowY: 'auto'
|
|
129
|
+
},
|
|
130
|
+
tableHeaderCell: {
|
|
131
|
+
overflow: 'inherit',
|
|
132
|
+
textAlign: 'left !important'
|
|
133
|
+
},
|
|
134
|
+
tableHead: {
|
|
135
|
+
fontSize: '14px !important',
|
|
136
|
+
display: 'block',
|
|
137
|
+
overflow: 'inherit'
|
|
138
|
+
},
|
|
139
|
+
tableSelected: {
|
|
140
|
+
backgroundColor: '#e1e1e1'
|
|
141
|
+
},
|
|
142
|
+
tableRow: {},
|
|
143
|
+
tableWrapper: {
|
|
144
|
+
height: '100%'
|
|
145
|
+
},
|
|
146
|
+
table: {
|
|
147
|
+
height: '100%'
|
|
148
|
+
},
|
|
149
|
+
visuallyHidden: {
|
|
150
|
+
border: 0,
|
|
151
|
+
clip: 'rect(0 0 0 0)',
|
|
152
|
+
height: 1,
|
|
153
|
+
margin: -1,
|
|
154
|
+
padding: 0,
|
|
155
|
+
position: 'absolute',
|
|
156
|
+
top: 20,
|
|
157
|
+
width: 1
|
|
158
|
+
}
|
|
159
|
+
}));
|
|
233
160
|
function EnhancedTable(props) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var _React$useState9 = _react.default.useState(""),
|
|
258
|
-
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
259
|
-
selectedRow = _React$useState10[0],
|
|
260
|
-
setSelectedRow = _React$useState10[1];
|
|
261
|
-
|
|
262
|
-
var _React$useState11 = _react.default.useState(0),
|
|
263
|
-
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
264
|
-
page = _React$useState12[0],
|
|
265
|
-
setPage = _React$useState12[1];
|
|
266
|
-
|
|
267
|
-
var _React$useState13 = _react.default.useState(!utils.isNull(props.rows) ? props.rows : []),
|
|
268
|
-
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
269
|
-
rows = _React$useState14[0],
|
|
270
|
-
setRows = _React$useState14[1];
|
|
271
|
-
|
|
272
|
-
var _React$useState15 = _react.default.useState(0),
|
|
273
|
-
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
274
|
-
scrollWidth = _React$useState16[0],
|
|
275
|
-
setScrollWidth = _React$useState16[1];
|
|
276
|
-
|
|
277
|
-
var _React$useState17 = _react.default.useState(true),
|
|
278
|
-
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
279
|
-
dense = _React$useState18[0],
|
|
280
|
-
setDense = _React$useState18[1];
|
|
281
|
-
|
|
282
|
-
var _React$useState19 = _react.default.useState(utils.isNull(props.autoFetchData) || props.autoFetchData === true),
|
|
283
|
-
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
284
|
-
fetchEnabled = _React$useState20[0],
|
|
285
|
-
setFetchEnabled = _React$useState20[1];
|
|
286
|
-
|
|
287
|
-
var _React$useState21 = _react.default.useState(10),
|
|
288
|
-
_React$useState22 = _slicedToArray(_React$useState21, 2),
|
|
289
|
-
rowsPerPage = _React$useState22[0],
|
|
290
|
-
setRowsPerPage = _React$useState22[1];
|
|
291
|
-
|
|
292
|
-
var headCells = props.headCells;
|
|
293
|
-
var actionsToolbar = props.actionsToolbar;
|
|
294
|
-
|
|
295
|
-
var _React$useState23 = _react.default.useState(props.searchParameters),
|
|
296
|
-
_React$useState24 = _slicedToArray(_React$useState23, 2),
|
|
297
|
-
searchParameters = _React$useState24[0],
|
|
298
|
-
setSearchParameters = _React$useState24[1];
|
|
299
|
-
|
|
300
|
-
for (var i = 0; i < props.headCells.length; i++) {
|
|
301
|
-
var headCell = props.headCells[i];
|
|
161
|
+
const utils = new _ViewUtils.default();
|
|
162
|
+
const classes = useStyles();
|
|
163
|
+
const [order, setOrder] = _react.default.useState('asc');
|
|
164
|
+
const [orderBy, setOrderBy] = _react.default.useState('id');
|
|
165
|
+
const [selected, setSelected] = _react.default.useState([]);
|
|
166
|
+
const [totalNumberOfRows, setTotalNumberOfRows] = _react.default.useState(0);
|
|
167
|
+
const [selectedRow, setSelectedRow] = _react.default.useState("");
|
|
168
|
+
const [page, setPage] = _react.default.useState(0);
|
|
169
|
+
const [rows, setRows] = _react.default.useState(!utils.isNull(props.rows) ? props.rows : []);
|
|
170
|
+
const [scrollWidth, setScrollWidth] = _react.default.useState(0);
|
|
171
|
+
const [dense, setDense] = _react.default.useState(true);
|
|
172
|
+
const [fetchEnabled, setFetchEnabled] = _react.default.useState(utils.isNull(props.autoFetchData) || props.autoFetchData === true);
|
|
173
|
+
const [rowsPerPage, setRowsPerPage] = _react.default.useState(10);
|
|
174
|
+
const {
|
|
175
|
+
headCells
|
|
176
|
+
} = props;
|
|
177
|
+
const {
|
|
178
|
+
actionsToolbar
|
|
179
|
+
} = props;
|
|
180
|
+
const [searchParameters, setSearchParameters] = _react.default.useState(props.searchParameters);
|
|
181
|
+
for (let i = 0; i < props.headCells.length; i++) {
|
|
182
|
+
let headCell = props.headCells[i];
|
|
302
183
|
headCell.width = evaluateTableCellWidth(props.multiSelect, headCell, props.headCells.length);
|
|
303
184
|
}
|
|
304
|
-
|
|
305
|
-
_react.default.useEffect(function () {
|
|
185
|
+
_react.default.useEffect(() => {
|
|
306
186
|
if (!utils.isNull(props.rows)) {
|
|
307
187
|
setRows(props.rows);
|
|
308
188
|
}
|
|
309
189
|
}, [props.rows]);
|
|
310
|
-
|
|
311
|
-
_react.default.useEffect(function () {
|
|
190
|
+
_react.default.useEffect(() => {
|
|
312
191
|
if (fetchEnabled && !utils.isNull(props.searchParameters) && !(utils.isNull(props.dataUrl) || utils.isNull(props.dataService))) {
|
|
313
192
|
setSearchParameters(props.searchParameters);
|
|
314
|
-
|
|
315
193
|
if (!utils.isNull(props.dataService)) {
|
|
316
194
|
alert(props.dataService);
|
|
317
|
-
(0, _RestUtils.invokeRpc)(props.dataService, null, "",
|
|
195
|
+
(0, _RestUtils.invokeRpc)(props.dataService, null, "", result => {
|
|
318
196
|
setRows(result.data.records);
|
|
319
197
|
setTotalNumberOfRows(result.data.totalNumberOfRecords);
|
|
320
|
-
|
|
321
198
|
if (!utils.isNull(props.onDataArrive)) {
|
|
322
199
|
props.onDataArrive(result.data);
|
|
323
200
|
}
|
|
324
|
-
|
|
325
201
|
updateScrollBarPadding();
|
|
326
|
-
},
|
|
202
|
+
}, e => {
|
|
327
203
|
alert(e.message);
|
|
328
204
|
});
|
|
329
205
|
} else {
|
|
330
|
-
utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)),
|
|
206
|
+
utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)), data => {
|
|
331
207
|
var result;
|
|
332
|
-
|
|
333
208
|
if (typeof data === "string") {
|
|
334
209
|
result = JSON.parse(data);
|
|
335
210
|
} else {
|
|
336
211
|
result = data;
|
|
337
212
|
}
|
|
338
|
-
|
|
339
213
|
if (!utils.isNull(result)) {
|
|
340
214
|
setRows(result.records);
|
|
341
215
|
setTotalNumberOfRows(result.totalNumberOfRecords);
|
|
342
|
-
|
|
343
216
|
if (!utils.isNull(props.onDataArrive)) {
|
|
344
217
|
props.onDataArrive(result);
|
|
345
218
|
}
|
|
346
|
-
|
|
347
219
|
updateScrollBarPadding();
|
|
348
220
|
}
|
|
349
221
|
}, null);
|
|
350
222
|
}
|
|
351
223
|
}
|
|
352
|
-
|
|
353
224
|
setFetchEnabled(true);
|
|
354
225
|
}, [props.searchParameters]);
|
|
355
|
-
|
|
356
|
-
_react.default.useEffect(function () {
|
|
226
|
+
_react.default.useEffect(() => {
|
|
357
227
|
updateScrollBarPadding();
|
|
358
228
|
}, [rows]);
|
|
359
|
-
|
|
360
229
|
function updateScrollBarPadding() {
|
|
361
230
|
var tbody = document.getElementById('mainTableBody');
|
|
362
|
-
|
|
363
231
|
if (tbody !== null && typeof tbody !== 'undefined') {
|
|
364
232
|
setScrollWidth(tbody.offsetWidth - tbody.clientWidth);
|
|
365
233
|
}
|
|
366
234
|
}
|
|
367
|
-
|
|
368
235
|
window.onresize = function onresize() {
|
|
369
236
|
updateScrollBarPadding();
|
|
370
237
|
};
|
|
371
|
-
|
|
372
238
|
function getRequestJson(currentPage, curretRowsPerPage, paged) {
|
|
373
239
|
return utils.getRequest(currentPage, curretRowsPerPage, searchParameters, paged);
|
|
374
240
|
}
|
|
375
|
-
|
|
376
241
|
function handleRequestSort(event, property) {
|
|
377
|
-
|
|
242
|
+
const isDesc = orderBy === property && order === 'desc';
|
|
378
243
|
setOrder(isDesc ? 'asc' : 'desc');
|
|
379
244
|
setOrderBy(property);
|
|
380
245
|
}
|
|
381
|
-
|
|
382
246
|
function handleSelectAllClick(event) {
|
|
383
247
|
if (event.target.checked) {
|
|
384
|
-
|
|
385
|
-
return n.name;
|
|
386
|
-
});
|
|
248
|
+
const newSelecteds = rows.map(n => n.name);
|
|
387
249
|
setSelected(newSelecteds);
|
|
388
250
|
props.onSelectionChange(newSelecteds);
|
|
389
251
|
return;
|
|
390
252
|
}
|
|
391
|
-
|
|
392
253
|
setSelected([]);
|
|
393
254
|
props.onSelectionChange([]);
|
|
394
255
|
}
|
|
395
|
-
|
|
396
256
|
function doHandleClick(event, id) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
257
|
+
const selectedIndex = selected.indexOf(id);
|
|
258
|
+
let newSelected = [];
|
|
400
259
|
if (props.multiSelect === true) {
|
|
401
260
|
if (selectedIndex === -1) {
|
|
402
261
|
newSelected = newSelected.concat(selected, id);
|
|
@@ -410,82 +269,62 @@ function EnhancedTable(props) {
|
|
|
410
269
|
} else {
|
|
411
270
|
newSelected.push(id);
|
|
412
271
|
}
|
|
413
|
-
|
|
414
|
-
var selectedRows = [];
|
|
415
|
-
|
|
272
|
+
let selectedRows = [];
|
|
416
273
|
for (var i = 0; i < rows.length; i++) {
|
|
417
|
-
|
|
418
|
-
|
|
274
|
+
let row = rows[i];
|
|
419
275
|
for (var j = 0; j < newSelected.length; j++) {
|
|
420
276
|
if (row.map.id === newSelected[j]) {
|
|
421
277
|
selectedRows.push(row);
|
|
422
278
|
}
|
|
423
279
|
}
|
|
424
280
|
}
|
|
425
|
-
|
|
426
281
|
setSelected(newSelected);
|
|
427
|
-
|
|
428
282
|
if (!utils.isNull(props.onSelectionChange)) {
|
|
429
283
|
props.onSelectionChange(selectedRows);
|
|
430
284
|
}
|
|
431
|
-
|
|
432
285
|
setSelectedRow(id);
|
|
433
286
|
}
|
|
434
|
-
|
|
435
287
|
function handleClick(event, id) {
|
|
436
288
|
if (!utils.isNull(props.onCellSelectionChange)) {
|
|
437
289
|
return;
|
|
438
290
|
}
|
|
439
|
-
|
|
440
291
|
doHandleClick(event, id);
|
|
441
292
|
}
|
|
442
|
-
|
|
443
293
|
function handleCellClick(event, id, headCell) {
|
|
444
294
|
if (headCell.contentType !== "document") {
|
|
445
295
|
// TODO : Evaluate if this call is necessary
|
|
446
296
|
doHandleClick(event, id);
|
|
447
297
|
}
|
|
448
|
-
|
|
449
298
|
if (!utils.isNull(props.onCellSelectionChange)) {
|
|
450
299
|
props.onCellSelectionChange(id, headCell);
|
|
451
300
|
}
|
|
452
301
|
}
|
|
453
|
-
|
|
454
302
|
function handleChangePage(event, newPage) {
|
|
455
|
-
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(newPage + 1, rowsPerPage, true),
|
|
303
|
+
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(newPage + 1, rowsPerPage, true), data => {
|
|
456
304
|
setRows(data.Data);
|
|
457
305
|
setPage(newPage);
|
|
458
|
-
|
|
459
306
|
if (!utils.isNull(props.onDataArrive)) {
|
|
460
307
|
props.onDataArrive(data);
|
|
461
308
|
}
|
|
462
309
|
}, null);
|
|
463
310
|
}
|
|
464
|
-
|
|
465
311
|
function handleChangeRowsPerPage(event) {
|
|
466
312
|
var curretRowsPerPage = +event.target.value;
|
|
467
|
-
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(1, curretRowsPerPage, true),
|
|
313
|
+
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(1, curretRowsPerPage, true), result => {
|
|
468
314
|
setRows(result.Data);
|
|
469
315
|
setRowsPerPage(curretRowsPerPage);
|
|
470
316
|
setPage(0);
|
|
471
|
-
|
|
472
317
|
if (!utils.isNull(props.onDataArrive)) {
|
|
473
318
|
props.onDataArrive(result);
|
|
474
319
|
}
|
|
475
|
-
|
|
476
320
|
updateScrollBarPadding();
|
|
477
321
|
}, null);
|
|
478
322
|
}
|
|
479
|
-
|
|
480
323
|
function handleChangeDense(event) {
|
|
481
324
|
setDense(event.target.checked);
|
|
482
325
|
updateScrollBarPadding();
|
|
483
326
|
}
|
|
484
|
-
|
|
485
|
-
var isSelected = function isSelected(id) {
|
|
486
|
-
return selected.indexOf(id) !== -1;
|
|
487
|
-
};
|
|
488
|
-
|
|
327
|
+
const isSelected = id => selected.indexOf(id) !== -1;
|
|
489
328
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Paper.default, {
|
|
490
329
|
className: classes.paper
|
|
491
330
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -518,18 +357,16 @@ function EnhancedTable(props) {
|
|
|
518
357
|
maxHeight: utils.isNull(props.bodyMaxHeight) ? props.bodyMaxHeight : "42vh"
|
|
519
358
|
},
|
|
520
359
|
id: "mainTableBody"
|
|
521
|
-
}, stableSort(rows, getSorting(order, orderBy)).map(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
360
|
+
}, stableSort(rows, getSorting(order, orderBy)).map((row, index) => {
|
|
361
|
+
const isItemSelected = isSelected(row.map.id);
|
|
362
|
+
const labelId = `enhanced-table-checkbox-${index}`;
|
|
363
|
+
let counter = 0;
|
|
525
364
|
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
526
365
|
style: {
|
|
527
366
|
display: 'flex',
|
|
528
367
|
flexWrap: 'wrap'
|
|
529
368
|
},
|
|
530
|
-
onClick:
|
|
531
|
-
return handleClick(event, row.map.id);
|
|
532
|
-
},
|
|
369
|
+
onClick: event => handleClick(event, row.map.id),
|
|
533
370
|
role: "checkbox",
|
|
534
371
|
"aria-checked": isItemSelected,
|
|
535
372
|
tabIndex: -1,
|
|
@@ -545,46 +382,38 @@ function EnhancedTable(props) {
|
|
|
545
382
|
inputProps: {
|
|
546
383
|
'aria-labelledby': labelId
|
|
547
384
|
}
|
|
548
|
-
})) : null, headCells.map(
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
onClick: function onClick(event) {
|
|
581
|
-
return handleCellClick(event, row.map.id, headCell);
|
|
582
|
-
}
|
|
583
|
-
}, /*#__PURE__*/_react.default.createElement(TableCellContent, {
|
|
584
|
-
contentValue: row.map[headCell.id],
|
|
585
|
-
contentType: headCell.contentType
|
|
586
|
-
}));
|
|
587
|
-
}));
|
|
385
|
+
})) : null, headCells.map(headCell => counter++ === headCells.length - 1 && actionsToolbar !== null && typeof actionsToolbar !== "undefined" ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
386
|
+
style: {
|
|
387
|
+
width: headCell.width
|
|
388
|
+
},
|
|
389
|
+
align: "left",
|
|
390
|
+
key: headCell.id
|
|
391
|
+
}, /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
392
|
+
highlight: false,
|
|
393
|
+
title: "",
|
|
394
|
+
buttonClickHandler: buttonId => props.buttonClickHandler(buttonId),
|
|
395
|
+
config: actionsToolbar
|
|
396
|
+
})) : headCell.numeric === true ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
397
|
+
style: {
|
|
398
|
+
width: headCell.width
|
|
399
|
+
},
|
|
400
|
+
align: "right",
|
|
401
|
+
key: headCell.id,
|
|
402
|
+
onClick: event => handleCellClick(event, row.map.id, headCell)
|
|
403
|
+
}, /*#__PURE__*/_react.default.createElement(TableCellContent, {
|
|
404
|
+
contentValue: row.map[headCell.id],
|
|
405
|
+
contentType: headCell.contentType
|
|
406
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
407
|
+
style: {
|
|
408
|
+
width: headCell.width
|
|
409
|
+
},
|
|
410
|
+
align: "left",
|
|
411
|
+
key: headCell.id,
|
|
412
|
+
onClick: event => handleCellClick(event, row.map.id, headCell)
|
|
413
|
+
}, /*#__PURE__*/_react.default.createElement(TableCellContent, {
|
|
414
|
+
contentValue: row.map[headCell.id],
|
|
415
|
+
contentType: headCell.contentType
|
|
416
|
+
}))));
|
|
588
417
|
})) : null)), props.paged === false ? "" : /*#__PURE__*/_react.default.createElement(_TablePagination.default, {
|
|
589
418
|
rowsPerPageOptions: [5, 10, 25],
|
|
590
419
|
component: "div",
|
|
@@ -601,50 +430,32 @@ function EnhancedTable(props) {
|
|
|
601
430
|
onChangeRowsPerPage: handleChangeRowsPerPage
|
|
602
431
|
})));
|
|
603
432
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
var _super = _createSuper(TableCellContent);
|
|
609
|
-
|
|
610
|
-
function TableCellContent(props) {
|
|
611
|
-
var _this;
|
|
612
|
-
|
|
613
|
-
_classCallCheck(this, TableCellContent);
|
|
614
|
-
|
|
615
|
-
_this = _super.call(this, props);
|
|
616
|
-
_this.state = {
|
|
433
|
+
class TableCellContent extends _react.default.Component {
|
|
434
|
+
constructor(props) {
|
|
435
|
+
super(props);
|
|
436
|
+
this.state = {
|
|
617
437
|
contentValue: props.contentValue ? props.contentValue : null,
|
|
618
438
|
contentType: props.contentType,
|
|
619
439
|
className: props.className
|
|
620
440
|
};
|
|
621
|
-
return _this;
|
|
622
441
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
if (this.state.contentType === 'document') {
|
|
635
|
-
displayValue = /*#__PURE__*/_react.default.createElement("span", {
|
|
636
|
-
style: linkStyle
|
|
637
|
-
}, this.state.contentValue);
|
|
638
|
-
} else {
|
|
639
|
-
displayValue = this.state.contentValue;
|
|
640
|
-
}
|
|
442
|
+
render() {
|
|
443
|
+
let displayValue;
|
|
444
|
+
const linkStyle = {
|
|
445
|
+
cursor: 'pointer',
|
|
446
|
+
textDecoration: 'underline'
|
|
447
|
+
};
|
|
448
|
+
if (this.state.contentType !== 'undefined') {
|
|
449
|
+
if (this.state.contentType === 'document') {
|
|
450
|
+
displayValue = /*#__PURE__*/_react.default.createElement("span", {
|
|
451
|
+
style: linkStyle
|
|
452
|
+
}, this.state.contentValue);
|
|
641
453
|
} else {
|
|
642
454
|
displayValue = this.state.contentValue;
|
|
643
455
|
}
|
|
644
|
-
|
|
645
|
-
|
|
456
|
+
} else {
|
|
457
|
+
displayValue = this.state.contentValue;
|
|
646
458
|
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}(_react.default.Component);
|
|
459
|
+
return displayValue;
|
|
460
|
+
}
|
|
461
|
+
}
|