@agilemotion/oui-react-js 1.6.1 → 1.6.3
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 +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +57 -22
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.js +124 -48
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +32 -17
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +4 -4
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +2 -3
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -115
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -35,8 +37,40 @@ var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
|
35
37
|
|
|
36
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
39
|
|
|
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;
|
|
40
74
|
|
|
41
75
|
function evaluateTableCellWidth(multiSelect, headCell, headCellCount) {
|
|
42
76
|
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 + "%";
|
|
@@ -55,33 +89,41 @@ function desc(a, b, orderBy) {
|
|
|
55
89
|
}
|
|
56
90
|
|
|
57
91
|
function stableSort(array, cmp) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
92
|
+
var stabilizedThis = array.map(function (el, index) {
|
|
93
|
+
return [el, index];
|
|
94
|
+
});
|
|
95
|
+
stabilizedThis.sort(function (a, b) {
|
|
96
|
+
var order = cmp(a[0], b[0]);
|
|
61
97
|
if (order !== 0) return order;
|
|
62
98
|
return a[1] - b[1];
|
|
63
99
|
});
|
|
64
|
-
return stabilizedThis.map(
|
|
100
|
+
return stabilizedThis.map(function (el) {
|
|
101
|
+
return el[0];
|
|
102
|
+
});
|
|
65
103
|
}
|
|
66
104
|
|
|
67
105
|
function getSorting(order, orderBy) {
|
|
68
|
-
return order === 'desc' ?
|
|
106
|
+
return order === 'desc' ? function (a, b) {
|
|
107
|
+
return desc(a, b, orderBy);
|
|
108
|
+
} : function (a, b) {
|
|
109
|
+
return -desc(a, b, orderBy);
|
|
110
|
+
};
|
|
69
111
|
}
|
|
70
112
|
|
|
71
113
|
function EnhancedTableHead(props) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
114
|
+
var classes = props.classes,
|
|
115
|
+
onSelectAllClick = props.onSelectAllClick,
|
|
116
|
+
order = props.order,
|
|
117
|
+
orderBy = props.orderBy,
|
|
118
|
+
numSelected = props.numSelected,
|
|
119
|
+
rowCount = props.rowCount,
|
|
120
|
+
onRequestSort = props.onRequestSort,
|
|
121
|
+
headCells = props.headCells;
|
|
122
|
+
|
|
123
|
+
var createSortHandler = function createSortHandler(property) {
|
|
124
|
+
return function (event) {
|
|
125
|
+
onRequestSort(event, property);
|
|
126
|
+
};
|
|
85
127
|
};
|
|
86
128
|
|
|
87
129
|
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Thead, {
|
|
@@ -105,21 +147,23 @@ function EnhancedTableHead(props) {
|
|
|
105
147
|
inputProps: {
|
|
106
148
|
'aria-label': 'select all'
|
|
107
149
|
}
|
|
108
|
-
})) : null, headCells.map(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
150
|
+
})) : null, headCells.map(function (headCell) {
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Th, {
|
|
152
|
+
key: headCell.id,
|
|
153
|
+
align: headCell.numeric === true ? 'right' : 'left',
|
|
154
|
+
padding: headCell.disablePadding ? 'none' : 'default',
|
|
155
|
+
className: classes.tableHeaderCell,
|
|
156
|
+
style: {
|
|
157
|
+
width: headCell.width
|
|
158
|
+
}
|
|
159
|
+
}, /*#__PURE__*/_react.default.createElement(_TableSortLabel.default, {
|
|
160
|
+
active: orderBy === headCell.id,
|
|
161
|
+
direction: order,
|
|
162
|
+
onClick: createSortHandler(headCell.id)
|
|
163
|
+
}, headCell.label, orderBy === headCell.id ? /*#__PURE__*/_react.default.createElement("span", {
|
|
164
|
+
className: classes.visuallyHidden
|
|
165
|
+
}, order === 'desc' ? 'sorted descending' : 'sorted ascending') : null));
|
|
166
|
+
})));
|
|
123
167
|
}
|
|
124
168
|
|
|
125
169
|
EnhancedTableHead.propTypes = {
|
|
@@ -131,112 +175,146 @@ EnhancedTableHead.propTypes = {
|
|
|
131
175
|
orderBy: _propTypes.default.string.isRequired,
|
|
132
176
|
rowCount: _propTypes.default.number.isRequired
|
|
133
177
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
178
|
+
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
179
|
+
return {
|
|
180
|
+
root: {
|
|
181
|
+
width: '100%',
|
|
182
|
+
marginTop: theme.spacing(3)
|
|
183
|
+
},
|
|
184
|
+
paper: {
|
|
185
|
+
width: '100%',
|
|
186
|
+
height: '100%',
|
|
187
|
+
position: 'relative',
|
|
188
|
+
zIndex: '0'
|
|
189
|
+
},
|
|
190
|
+
scrollPadding: {
|
|
191
|
+
padding: '8px !important'
|
|
192
|
+
},
|
|
193
|
+
noScrollPadding: {
|
|
194
|
+
padding: '0 !important',
|
|
195
|
+
width: '1px !important'
|
|
196
|
+
},
|
|
197
|
+
tableBody: {
|
|
198
|
+
display: 'block',
|
|
199
|
+
overflowY: 'auto'
|
|
200
|
+
},
|
|
201
|
+
tableHeaderCell: {
|
|
202
|
+
overflow: 'inherit',
|
|
203
|
+
textAlign: 'left !important'
|
|
204
|
+
},
|
|
205
|
+
tableHead: {
|
|
206
|
+
fontSize: '14px !important',
|
|
207
|
+
display: 'block',
|
|
208
|
+
overflow: 'inherit'
|
|
209
|
+
},
|
|
210
|
+
tableSelected: {
|
|
211
|
+
backgroundColor: '#e1e1e1'
|
|
212
|
+
},
|
|
213
|
+
tableRow: {},
|
|
214
|
+
tableWrapper: {
|
|
215
|
+
height: '100%'
|
|
216
|
+
},
|
|
217
|
+
table: {
|
|
218
|
+
height: '100%'
|
|
219
|
+
},
|
|
220
|
+
visuallyHidden: {
|
|
221
|
+
border: 0,
|
|
222
|
+
clip: 'rect(0 0 0 0)',
|
|
223
|
+
height: 1,
|
|
224
|
+
margin: -1,
|
|
225
|
+
padding: 0,
|
|
226
|
+
position: 'absolute',
|
|
227
|
+
top: 20,
|
|
228
|
+
width: 1
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
});
|
|
186
232
|
|
|
187
233
|
function EnhancedTable(props) {
|
|
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
|
-
|
|
234
|
+
var utils = new _ViewUtils.default();
|
|
235
|
+
var classes = useStyles();
|
|
236
|
+
|
|
237
|
+
var _React$useState = _react.default.useState('asc'),
|
|
238
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
239
|
+
order = _React$useState2[0],
|
|
240
|
+
setOrder = _React$useState2[1];
|
|
241
|
+
|
|
242
|
+
var _React$useState3 = _react.default.useState('id'),
|
|
243
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
244
|
+
orderBy = _React$useState4[0],
|
|
245
|
+
setOrderBy = _React$useState4[1];
|
|
246
|
+
|
|
247
|
+
var _React$useState5 = _react.default.useState([]),
|
|
248
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
249
|
+
selected = _React$useState6[0],
|
|
250
|
+
setSelected = _React$useState6[1];
|
|
251
|
+
|
|
252
|
+
var _React$useState7 = _react.default.useState(0),
|
|
253
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
254
|
+
totalNumberOfRows = _React$useState8[0],
|
|
255
|
+
setTotalNumberOfRows = _React$useState8[1];
|
|
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];
|
|
224
302
|
headCell.width = evaluateTableCellWidth(props.multiSelect, headCell, props.headCells.length);
|
|
225
303
|
}
|
|
226
304
|
|
|
227
|
-
_react.default.useEffect(()
|
|
305
|
+
_react.default.useEffect(function () {
|
|
228
306
|
if (!utils.isNull(props.rows)) {
|
|
229
307
|
setRows(props.rows);
|
|
230
308
|
}
|
|
231
309
|
}, [props.rows]);
|
|
232
310
|
|
|
233
|
-
_react.default.useEffect(()
|
|
311
|
+
_react.default.useEffect(function () {
|
|
234
312
|
if (fetchEnabled && !utils.isNull(props.searchParameters) && !(utils.isNull(props.dataUrl) || utils.isNull(props.dataService))) {
|
|
235
313
|
setSearchParameters(props.searchParameters);
|
|
236
314
|
|
|
237
315
|
if (!utils.isNull(props.dataService)) {
|
|
238
316
|
alert(props.dataService);
|
|
239
|
-
(0, _RestUtils.invokeRpc)(props.dataService, null, "", result
|
|
317
|
+
(0, _RestUtils.invokeRpc)(props.dataService, null, "", function (result) {
|
|
240
318
|
setRows(result.data.records);
|
|
241
319
|
setTotalNumberOfRows(result.data.totalNumberOfRecords);
|
|
242
320
|
|
|
@@ -245,11 +323,11 @@ function EnhancedTable(props) {
|
|
|
245
323
|
}
|
|
246
324
|
|
|
247
325
|
updateScrollBarPadding();
|
|
248
|
-
}, e
|
|
326
|
+
}, function (e) {
|
|
249
327
|
alert(e.message);
|
|
250
328
|
});
|
|
251
329
|
} else {
|
|
252
|
-
utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)), data
|
|
330
|
+
utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)), function (data) {
|
|
253
331
|
var result;
|
|
254
332
|
|
|
255
333
|
if (typeof data === "string") {
|
|
@@ -275,7 +353,7 @@ function EnhancedTable(props) {
|
|
|
275
353
|
setFetchEnabled(true);
|
|
276
354
|
}, [props.searchParameters]);
|
|
277
355
|
|
|
278
|
-
_react.default.useEffect(()
|
|
356
|
+
_react.default.useEffect(function () {
|
|
279
357
|
updateScrollBarPadding();
|
|
280
358
|
}, [rows]);
|
|
281
359
|
|
|
@@ -296,14 +374,16 @@ function EnhancedTable(props) {
|
|
|
296
374
|
}
|
|
297
375
|
|
|
298
376
|
function handleRequestSort(event, property) {
|
|
299
|
-
|
|
377
|
+
var isDesc = orderBy === property && order === 'desc';
|
|
300
378
|
setOrder(isDesc ? 'asc' : 'desc');
|
|
301
379
|
setOrderBy(property);
|
|
302
380
|
}
|
|
303
381
|
|
|
304
382
|
function handleSelectAllClick(event) {
|
|
305
383
|
if (event.target.checked) {
|
|
306
|
-
|
|
384
|
+
var newSelecteds = rows.map(function (n) {
|
|
385
|
+
return n.name;
|
|
386
|
+
});
|
|
307
387
|
setSelected(newSelecteds);
|
|
308
388
|
props.onSelectionChange(newSelecteds);
|
|
309
389
|
return;
|
|
@@ -314,8 +394,8 @@ function EnhancedTable(props) {
|
|
|
314
394
|
}
|
|
315
395
|
|
|
316
396
|
function doHandleClick(event, id) {
|
|
317
|
-
|
|
318
|
-
|
|
397
|
+
var selectedIndex = selected.indexOf(id);
|
|
398
|
+
var newSelected = [];
|
|
319
399
|
|
|
320
400
|
if (props.multiSelect === true) {
|
|
321
401
|
if (selectedIndex === -1) {
|
|
@@ -331,10 +411,10 @@ function EnhancedTable(props) {
|
|
|
331
411
|
newSelected.push(id);
|
|
332
412
|
}
|
|
333
413
|
|
|
334
|
-
|
|
414
|
+
var selectedRows = [];
|
|
335
415
|
|
|
336
416
|
for (var i = 0; i < rows.length; i++) {
|
|
337
|
-
|
|
417
|
+
var row = rows[i];
|
|
338
418
|
|
|
339
419
|
for (var j = 0; j < newSelected.length; j++) {
|
|
340
420
|
if (row.map.id === newSelected[j]) {
|
|
@@ -372,7 +452,7 @@ function EnhancedTable(props) {
|
|
|
372
452
|
}
|
|
373
453
|
|
|
374
454
|
function handleChangePage(event, newPage) {
|
|
375
|
-
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(newPage + 1, rowsPerPage, true), data
|
|
455
|
+
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(newPage + 1, rowsPerPage, true), function (data) {
|
|
376
456
|
setRows(data.Data);
|
|
377
457
|
setPage(newPage);
|
|
378
458
|
|
|
@@ -384,7 +464,7 @@ function EnhancedTable(props) {
|
|
|
384
464
|
|
|
385
465
|
function handleChangeRowsPerPage(event) {
|
|
386
466
|
var curretRowsPerPage = +event.target.value;
|
|
387
|
-
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(1, curretRowsPerPage, true), result
|
|
467
|
+
utils.invokeUrl(props.dataUrl + "?request=" + getRequestJson(1, curretRowsPerPage, true), function (result) {
|
|
388
468
|
setRows(result.Data);
|
|
389
469
|
setRowsPerPage(curretRowsPerPage);
|
|
390
470
|
setPage(0);
|
|
@@ -402,7 +482,9 @@ function EnhancedTable(props) {
|
|
|
402
482
|
updateScrollBarPadding();
|
|
403
483
|
}
|
|
404
484
|
|
|
405
|
-
|
|
485
|
+
var isSelected = function isSelected(id) {
|
|
486
|
+
return selected.indexOf(id) !== -1;
|
|
487
|
+
};
|
|
406
488
|
|
|
407
489
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Paper.default, {
|
|
408
490
|
className: classes.paper
|
|
@@ -436,16 +518,18 @@ function EnhancedTable(props) {
|
|
|
436
518
|
maxHeight: utils.isNull(props.bodyMaxHeight) ? props.bodyMaxHeight : "42vh"
|
|
437
519
|
},
|
|
438
520
|
id: "mainTableBody"
|
|
439
|
-
}, stableSort(rows, getSorting(order, orderBy)).map((row, index)
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
521
|
+
}, stableSort(rows, getSorting(order, orderBy)).map(function (row, index) {
|
|
522
|
+
var isItemSelected = isSelected(row.map.id);
|
|
523
|
+
var labelId = "enhanced-table-checkbox-".concat(index);
|
|
524
|
+
var counter = 0;
|
|
443
525
|
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
444
526
|
style: {
|
|
445
527
|
display: 'flex',
|
|
446
528
|
flexWrap: 'wrap'
|
|
447
529
|
},
|
|
448
|
-
onClick:
|
|
530
|
+
onClick: function onClick(event) {
|
|
531
|
+
return handleClick(event, row.map.id);
|
|
532
|
+
},
|
|
449
533
|
role: "checkbox",
|
|
450
534
|
"aria-checked": isItemSelected,
|
|
451
535
|
tabIndex: -1,
|
|
@@ -461,38 +545,46 @@ function EnhancedTable(props) {
|
|
|
461
545
|
inputProps: {
|
|
462
546
|
'aria-labelledby': labelId
|
|
463
547
|
}
|
|
464
|
-
})) : null, headCells.map(
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
548
|
+
})) : null, headCells.map(function (headCell) {
|
|
549
|
+
return counter++ === headCells.length - 1 && actionsToolbar !== null && typeof actionsToolbar !== "undefined" ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
550
|
+
style: {
|
|
551
|
+
width: headCell.width
|
|
552
|
+
},
|
|
553
|
+
align: "left",
|
|
554
|
+
key: headCell.id
|
|
555
|
+
}, /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
556
|
+
highlight: false,
|
|
557
|
+
title: "",
|
|
558
|
+
buttonClickHandler: function buttonClickHandler(buttonId) {
|
|
559
|
+
return props.buttonClickHandler(buttonId);
|
|
560
|
+
},
|
|
561
|
+
config: actionsToolbar
|
|
562
|
+
})) : headCell.numeric === true ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
563
|
+
style: {
|
|
564
|
+
width: headCell.width
|
|
565
|
+
},
|
|
566
|
+
align: "right",
|
|
567
|
+
key: headCell.id,
|
|
568
|
+
onClick: function onClick(event) {
|
|
569
|
+
return handleCellClick(event, row.map.id, headCell);
|
|
570
|
+
}
|
|
571
|
+
}, /*#__PURE__*/_react.default.createElement(TableCellContent, {
|
|
572
|
+
contentValue: row.map[headCell.id],
|
|
573
|
+
contentType: headCell.contentType
|
|
574
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
575
|
+
style: {
|
|
576
|
+
width: headCell.width
|
|
577
|
+
},
|
|
578
|
+
align: "left",
|
|
579
|
+
key: headCell.id,
|
|
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
|
+
}));
|
|
496
588
|
})) : null)), props.paged === false ? "" : /*#__PURE__*/_react.default.createElement(_TablePagination.default, {
|
|
497
589
|
rowsPerPageOptions: [5, 10, 25],
|
|
498
590
|
component: "div",
|
|
@@ -510,36 +602,49 @@ function EnhancedTable(props) {
|
|
|
510
602
|
})));
|
|
511
603
|
}
|
|
512
604
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
605
|
+
var TableCellContent = /*#__PURE__*/function (_React$Component) {
|
|
606
|
+
_inherits(TableCellContent, _React$Component);
|
|
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 = {
|
|
517
617
|
contentValue: props.contentValue ? props.contentValue : null,
|
|
518
618
|
contentType: props.contentType,
|
|
519
619
|
className: props.className
|
|
520
620
|
};
|
|
621
|
+
return _this;
|
|
521
622
|
}
|
|
522
623
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
624
|
+
_createClass(TableCellContent, [{
|
|
625
|
+
key: "render",
|
|
626
|
+
value: function render() {
|
|
627
|
+
var displayValue;
|
|
628
|
+
var linkStyle = {
|
|
629
|
+
cursor: 'pointer',
|
|
630
|
+
textDecoration: 'underline'
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
if (this.state.contentType !== 'undefined') {
|
|
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
|
+
}
|
|
535
641
|
} else {
|
|
536
642
|
displayValue = this.state.contentValue;
|
|
537
643
|
}
|
|
538
|
-
} else {
|
|
539
|
-
displayValue = this.state.contentValue;
|
|
540
|
-
}
|
|
541
644
|
|
|
542
|
-
|
|
543
|
-
|
|
645
|
+
return displayValue;
|
|
646
|
+
}
|
|
647
|
+
}]);
|
|
544
648
|
|
|
545
|
-
|
|
649
|
+
return TableCellContent;
|
|
650
|
+
}(_react.default.Component);
|