@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
|
});
|
|
@@ -49,13 +51,31 @@ var _Calendar = _interopRequireDefault(require("../js/Calendar"));
|
|
|
49
51
|
|
|
50
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
51
53
|
|
|
52
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
54
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
55
|
+
|
|
56
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
57
|
+
|
|
58
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
53
59
|
|
|
54
|
-
function
|
|
60
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
61
|
+
|
|
62
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
55
63
|
|
|
56
64
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
67
|
+
|
|
68
|
+
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."); }
|
|
69
|
+
|
|
70
|
+
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); }
|
|
71
|
+
|
|
72
|
+
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; }
|
|
73
|
+
|
|
74
|
+
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; }
|
|
75
|
+
|
|
76
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
77
|
+
|
|
78
|
+
var eventTemplate = {
|
|
59
79
|
id: '',
|
|
60
80
|
title: '',
|
|
61
81
|
start: '',
|
|
@@ -83,38 +103,66 @@ const eventTemplate = {
|
|
|
83
103
|
}
|
|
84
104
|
};
|
|
85
105
|
|
|
86
|
-
|
|
106
|
+
var status = function status(response) {
|
|
87
107
|
if (response.ok) {
|
|
88
108
|
return Promise.resolve(response);
|
|
89
109
|
} else {
|
|
90
|
-
|
|
110
|
+
var error = new Error(response.statusText);
|
|
91
111
|
error.code = response.status;
|
|
92
112
|
return Promise.reject(error);
|
|
93
113
|
}
|
|
94
114
|
};
|
|
95
115
|
|
|
96
|
-
|
|
116
|
+
var json = function json(response) {
|
|
97
117
|
return response.text();
|
|
98
118
|
};
|
|
99
119
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
var location = window.location.protocol + "//" + window.location.hostname;
|
|
121
|
+
|
|
122
|
+
var Calendar = function Calendar(props) {
|
|
123
|
+
var isRtl = props.isRtl;
|
|
124
|
+
|
|
125
|
+
var _useState = (0, _react.useState)([]),
|
|
126
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
127
|
+
events = _useState2[0],
|
|
128
|
+
setEvents = _useState2[1];
|
|
129
|
+
|
|
130
|
+
var _useState3 = (0, _react.useState)(true),
|
|
131
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
132
|
+
loading = _useState4[0],
|
|
133
|
+
setLoading = _useState4[1];
|
|
134
|
+
|
|
135
|
+
var _useState5 = (0, _react.useState)(false),
|
|
136
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
137
|
+
open = _useState6[0],
|
|
138
|
+
setOpen = _useState6[1];
|
|
139
|
+
|
|
140
|
+
var _useState7 = (0, _react.useState)(null),
|
|
141
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
142
|
+
selectedEvent = _useState8[0],
|
|
143
|
+
setSelectedEvent = _useState8[1];
|
|
144
|
+
|
|
145
|
+
var calendarRef = (0, _react.useRef)(null);
|
|
146
|
+
var dialogRef = (0, _react.useRef)(null);
|
|
147
|
+
|
|
148
|
+
var _useState9 = (0, _react.useState)(null),
|
|
149
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
150
|
+
dialogTop = _useState10[0],
|
|
151
|
+
setDialogTop = _useState10[1];
|
|
152
|
+
|
|
153
|
+
var _useState11 = (0, _react.useState)(null),
|
|
154
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
155
|
+
dialogLeft = _useState12[0],
|
|
156
|
+
setDialogLeft = _useState12[1];
|
|
157
|
+
|
|
158
|
+
var _useState13 = (0, _react.useState)(0),
|
|
159
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
160
|
+
refresher = _useState14[0],
|
|
161
|
+
setRefresher = _useState14[1];
|
|
162
|
+
|
|
163
|
+
var contextChangeHandler = {};
|
|
164
|
+
var counter = 1;
|
|
165
|
+
var StyledDialog = (0, _withStyles.default)({
|
|
118
166
|
root: {
|
|
119
167
|
pointerEvents: "none"
|
|
120
168
|
},
|
|
@@ -130,11 +178,14 @@ const Calendar = props => {
|
|
|
130
178
|
left: dialogLeft,
|
|
131
179
|
borderRadius: '4px'
|
|
132
180
|
}
|
|
133
|
-
})(
|
|
134
|
-
|
|
135
|
-
|
|
181
|
+
})(function (props) {
|
|
182
|
+
return /*#__PURE__*/_react.default.createElement(_Dialog.default, _extends({
|
|
183
|
+
hideBackdrop: true
|
|
184
|
+
}, props));
|
|
185
|
+
});
|
|
136
186
|
|
|
137
|
-
|
|
187
|
+
var loadEvents = function loadEvents() {
|
|
188
|
+
var track = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
138
189
|
fetch(encodeURI(location + _ApplicationManager.default.getContextRoot() + '/calendar/api/v1/event/list'), {
|
|
139
190
|
method: 'GET',
|
|
140
191
|
headers: {
|
|
@@ -143,26 +194,28 @@ const Calendar = props => {
|
|
|
143
194
|
'Authorization': 'Bearer ' + sessionStorage.getItem("accessToken"),
|
|
144
195
|
'idToken': sessionStorage.getItem("idToken")
|
|
145
196
|
}
|
|
146
|
-
}).then(status).then(json).then(response
|
|
197
|
+
}).then(status).then(json).then(function (response) {
|
|
147
198
|
setEvents(JSON.parse(response));
|
|
148
|
-
}).catch(ignored
|
|
199
|
+
}).catch(function (ignored) {});
|
|
149
200
|
};
|
|
150
201
|
|
|
151
|
-
|
|
202
|
+
var handler = function handler() {
|
|
152
203
|
return {
|
|
153
204
|
get id() {
|
|
154
205
|
return 'calendar';
|
|
155
206
|
},
|
|
156
207
|
|
|
157
|
-
onContextChange: (context, newValues)
|
|
158
|
-
if (Object.keys(newValues).find(
|
|
208
|
+
onContextChange: function onContextChange(context, newValues) {
|
|
209
|
+
if (Object.keys(newValues).find(function (key) {
|
|
210
|
+
return key === 'windowDisplayState';
|
|
211
|
+
})) {
|
|
159
212
|
setRefresher(counter > 20 ? 0 : counter++);
|
|
160
213
|
}
|
|
161
214
|
}
|
|
162
215
|
};
|
|
163
216
|
};
|
|
164
217
|
|
|
165
|
-
(0, _react.useEffect)(()
|
|
218
|
+
(0, _react.useEffect)(function () {
|
|
166
219
|
contextChangeHandler.api = handler();
|
|
167
220
|
loadEvents();
|
|
168
221
|
|
|
@@ -170,15 +223,15 @@ const Calendar = props => {
|
|
|
170
223
|
handler: contextChangeHandler
|
|
171
224
|
});
|
|
172
225
|
}, []);
|
|
173
|
-
(0, _react.useEffect)(()
|
|
226
|
+
(0, _react.useEffect)(function () {
|
|
174
227
|
contextChangeHandler.api = handler();
|
|
175
228
|
});
|
|
176
229
|
|
|
177
|
-
|
|
230
|
+
var calenderScrollListener = function calenderScrollListener() {
|
|
178
231
|
setOpen(false);
|
|
179
232
|
};
|
|
180
233
|
|
|
181
|
-
|
|
234
|
+
var calendarOptions = {
|
|
182
235
|
events: events,
|
|
183
236
|
plugins: [_interaction.default, _daygrid.default, _timegrid.default, _list.default, _rrule.default],
|
|
184
237
|
initialView: 'dayGridMonth',
|
|
@@ -224,23 +277,18 @@ const Calendar = props => {
|
|
|
224
277
|
? Docs: https://fullcalendar.io/docs/navLinks
|
|
225
278
|
*/
|
|
226
279
|
navLinks: true,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
event: calendarEvent
|
|
230
|
-
}) {
|
|
280
|
+
eventClassNames: function eventClassNames(_ref) {
|
|
281
|
+
var calendarEvent = _ref.event;
|
|
231
282
|
// eslint-disable-next-line no-underscore-dangle
|
|
232
|
-
|
|
283
|
+
var colorName = '#945c33';
|
|
233
284
|
return ["bg-light-".concat(colorName)];
|
|
234
285
|
},
|
|
235
|
-
|
|
236
|
-
viewDidMount() {
|
|
286
|
+
viewDidMount: function viewDidMount() {
|
|
237
287
|
setOpen(false);
|
|
238
288
|
},
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
event: event
|
|
243
|
-
}) {
|
|
289
|
+
eventClick: function eventClick(_ref2) {
|
|
290
|
+
var el = _ref2.el,
|
|
291
|
+
event = _ref2.event;
|
|
244
292
|
// * Only grab required field otherwise it goes in infinity loop
|
|
245
293
|
// ! Always grab all fields rendered by form (even if it get `undefined`) otherwise due to Vue3/Composition API you might get: "object is not extensible"
|
|
246
294
|
// event.value = grabEventDataFromEventApi(clickedEvent)
|
|
@@ -248,12 +296,12 @@ const Calendar = props => {
|
|
|
248
296
|
// isAddNewEventSidebarActive.value = true
|
|
249
297
|
setOpen(true);
|
|
250
298
|
var rect = el.getBoundingClientRect();
|
|
251
|
-
|
|
252
|
-
|
|
299
|
+
var topOffset = rect.bottom + 250 > document.body.getBoundingClientRect().bottom ? -1 * (rect.bottom + 250 - document.body.getBoundingClientRect().bottom) : 8;
|
|
300
|
+
var leftOffset = rect.right + 400 > document.body.getBoundingClientRect().right ? rect.right + 400 - document.body.getBoundingClientRect().right : 64;
|
|
253
301
|
setDialogTop(rect.top + topOffset + 'px');
|
|
254
302
|
setDialogLeft(rect.left - leftOffset + 'px');
|
|
255
303
|
setSelectedEvent(event);
|
|
256
|
-
|
|
304
|
+
var elementsByClassName = document.getElementsByClassName('fc-scroller-liquid-absolute');
|
|
257
305
|
|
|
258
306
|
if (elementsByClassName && elementsByClassName.length > 0) {
|
|
259
307
|
elementsByClassName[0].removeEventListener("scroll", calenderScrollListener);
|
|
@@ -267,23 +315,23 @@ const Calendar = props => {
|
|
|
267
315
|
elementsByClassName[0].addEventListener('scroll', calenderScrollListener);
|
|
268
316
|
}
|
|
269
317
|
},
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
let startTime = (0, _moment.default)(info.dateStr, 'ddd MMM D YYYY HH:mm:ss ZZ');
|
|
318
|
+
dateClick: function dateClick(info) {
|
|
319
|
+
var date = new Date(info.dateStr);
|
|
320
|
+
var timeDate = new Date();
|
|
321
|
+
var startTime = (0, _moment.default)(info.dateStr, 'ddd MMM D YYYY HH:mm:ss ZZ');
|
|
275
322
|
timeDate.setHours(timeDate.getHours() + 1);
|
|
276
323
|
startTime.set({
|
|
277
324
|
h: timeDate.getHours(),
|
|
278
325
|
m: 0
|
|
279
326
|
});
|
|
280
|
-
|
|
327
|
+
var endTime = (0, _moment.default)(info.dateStr, 'ddd MMM D YYYY HH:mm:ss ZZ');
|
|
281
328
|
timeDate.setHours(timeDate.getHours() + 1);
|
|
282
329
|
endTime.set({
|
|
283
330
|
h: timeDate.getHours(),
|
|
284
331
|
m: 0
|
|
285
332
|
});
|
|
286
|
-
|
|
333
|
+
|
|
334
|
+
var calendarEvent = _objectSpread(_objectSpread({}, eventTemplate), {}, {
|
|
287
335
|
schedule: {
|
|
288
336
|
startDate: date,
|
|
289
337
|
endDate: date,
|
|
@@ -293,7 +341,7 @@ const Calendar = props => {
|
|
|
293
341
|
recurringEndDate: date
|
|
294
342
|
},
|
|
295
343
|
eventType: _Utils.default.getComponentAttribute(props.config, 'eventType', 'TRAINING')
|
|
296
|
-
};
|
|
344
|
+
});
|
|
297
345
|
|
|
298
346
|
if (_Utils.default.isStringEmpty(calendarEvent.id)) {
|
|
299
347
|
calendarEvent.id = null;
|
|
@@ -301,7 +349,7 @@ const Calendar = props => {
|
|
|
301
349
|
|
|
302
350
|
if (!open && (0, _moment.default)(new Date()).startOf('day') <= (0, _moment.default)(date).startOf('day')) {
|
|
303
351
|
console.log("CALENDAR DATE CLICK");
|
|
304
|
-
|
|
352
|
+
var event = new _Event.default(props.handle, props.viewId, calendarEvent);
|
|
305
353
|
|
|
306
354
|
_Observable.default.fireEvent(_EventType.default.CALENDAR_DATE_CLICK, event);
|
|
307
355
|
}
|
|
@@ -312,9 +360,9 @@ const Calendar = props => {
|
|
|
312
360
|
? Docs: https://fullcalendar.io/docs/eventDrop
|
|
313
361
|
? We can use `eventDragStop` but it doesn't return updated event so we have to use `eventDrop` which returns updated event
|
|
314
362
|
*/
|
|
315
|
-
eventDrop({
|
|
316
|
-
|
|
317
|
-
|
|
363
|
+
eventDrop: function eventDrop(_ref3) {
|
|
364
|
+
var droppedEvent = _ref3.event;
|
|
365
|
+
|
|
318
366
|
//dispatch(updateEvent(droppedEvent));
|
|
319
367
|
_reactHotToast.default.success('Event Updated');
|
|
320
368
|
},
|
|
@@ -323,9 +371,9 @@ const Calendar = props => {
|
|
|
323
371
|
Handle event resize
|
|
324
372
|
? Docs: https://fullcalendar.io/docs/eventResize
|
|
325
373
|
*/
|
|
326
|
-
eventResize({
|
|
327
|
-
|
|
328
|
-
|
|
374
|
+
eventResize: function eventResize(_ref4) {
|
|
375
|
+
var resizedEvent = _ref4.event;
|
|
376
|
+
|
|
329
377
|
//dispatch(updateEvent(resizedEvent));
|
|
330
378
|
_reactHotToast.default.success('Event Updated');
|
|
331
379
|
},
|
|
@@ -334,30 +382,29 @@ const Calendar = props => {
|
|
|
334
382
|
Handle event mouse enter
|
|
335
383
|
? Docs: https://fullcalendar.io/docs/eventMouseEnter
|
|
336
384
|
*/
|
|
337
|
-
eventMouseEnter({
|
|
338
|
-
el
|
|
339
|
-
|
|
340
|
-
}
|
|
385
|
+
eventMouseEnter: function eventMouseEnter(_ref5) {
|
|
386
|
+
var el = _ref5.el,
|
|
387
|
+
event = _ref5.event;
|
|
388
|
+
},
|
|
341
389
|
|
|
342
390
|
/*
|
|
343
391
|
Handle event mouse enter
|
|
344
392
|
? Docs: https://fullcalendar.io/docs/eventMouseEnter
|
|
345
393
|
*/
|
|
346
|
-
eventMouseLeave({
|
|
347
|
-
el
|
|
348
|
-
}
|
|
349
|
-
|
|
394
|
+
eventMouseLeave: function eventMouseLeave(_ref6) {
|
|
395
|
+
var el = _ref6.el;
|
|
396
|
+
},
|
|
350
397
|
ref: calendarRef,
|
|
351
398
|
// Get direction from app state (store)
|
|
352
399
|
direction: isRtl ? 'rtl' : 'ltr'
|
|
353
400
|
};
|
|
354
401
|
|
|
355
|
-
_react.default.useEffect(()
|
|
402
|
+
_react.default.useEffect(function () {
|
|
356
403
|
props.handle.api = api();
|
|
357
404
|
|
|
358
|
-
|
|
405
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
359
406
|
|
|
360
|
-
|
|
407
|
+
var eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
|
|
361
408
|
eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
|
|
362
409
|
|
|
363
410
|
_Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
|
|
@@ -365,29 +412,29 @@ const Calendar = props => {
|
|
|
365
412
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
366
413
|
}, []);
|
|
367
414
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
415
|
+
var toDateTimeString = function toDateTimeString(date) {
|
|
416
|
+
var dateStr = selectedEvent.start.toLocaleDateString();
|
|
417
|
+
var timeStrTokens = selectedEvent.start.toLocaleTimeString().split(':');
|
|
371
418
|
return dateStr + ' ' + timeStrTokens[0] + ':' + timeStrTokens[1];
|
|
372
419
|
};
|
|
373
420
|
|
|
374
|
-
|
|
421
|
+
var getFormObject = function getFormObject(event) {
|
|
375
422
|
return _Calendar.default.calendarEventToFormObject(event);
|
|
376
423
|
};
|
|
377
424
|
|
|
378
|
-
|
|
425
|
+
var api = function api() {
|
|
379
426
|
return {
|
|
380
427
|
get id() {
|
|
381
428
|
return props.config.id;
|
|
382
429
|
},
|
|
383
430
|
|
|
384
|
-
getChildren: ()
|
|
431
|
+
getChildren: function getChildren() {
|
|
385
432
|
return [];
|
|
386
433
|
}
|
|
387
434
|
};
|
|
388
435
|
};
|
|
389
436
|
|
|
390
|
-
|
|
437
|
+
var createEventPopup = function createEventPopup(el) {
|
|
391
438
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, selectedEvent && /*#__PURE__*/_react.default.createElement("div", {
|
|
392
439
|
className: 'event-popup'
|
|
393
440
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -395,16 +442,18 @@ const Calendar = props => {
|
|
|
395
442
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
396
443
|
className: 'left col no-padding no-margin'
|
|
397
444
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
398
|
-
onClick: ()
|
|
445
|
+
onClick: function onClick() {
|
|
446
|
+
return setOpen(false);
|
|
447
|
+
}
|
|
399
448
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
400
449
|
id: 'CLOSE',
|
|
401
450
|
color: '#01476C'
|
|
402
451
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
403
452
|
className: 'right col no-padding no-margin'
|
|
404
453
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
405
|
-
onClick: ()
|
|
454
|
+
onClick: function onClick() {
|
|
406
455
|
console.log("SELECTED EVENT : ", getFormObject(selectedEvent));
|
|
407
|
-
|
|
456
|
+
var event = new _Event.default(props.handle, props.viewId, getFormObject(selectedEvent));
|
|
408
457
|
|
|
409
458
|
_Observable.default.fireEvent(_EventType.default.CALENDAR_DATE_CLICK, event);
|
|
410
459
|
}
|
|
@@ -429,9 +478,9 @@ const Calendar = props => {
|
|
|
429
478
|
borderRadius: '4px',
|
|
430
479
|
marginRight: '2px'
|
|
431
480
|
},
|
|
432
|
-
onClick: e
|
|
481
|
+
onClick: function onClick(e) {
|
|
433
482
|
setOpen(false);
|
|
434
|
-
|
|
483
|
+
var event = new _Event.default(props.handle, props.viewId, getFormObject(selectedEvent));
|
|
435
484
|
|
|
436
485
|
_Observable.default.fireEvent(_EventType.default.CALENDAR_EVENT_START, event);
|
|
437
486
|
}
|
|
@@ -454,7 +503,7 @@ const Calendar = props => {
|
|
|
454
503
|
}, /*#__PURE__*/_react.default.createElement(_react2.default, calendarOptions), ' '), /*#__PURE__*/_react.default.createElement(StyledDialog, {
|
|
455
504
|
open: open,
|
|
456
505
|
ref: dialogRef,
|
|
457
|
-
onClose: ()
|
|
506
|
+
onClose: function onClose() {
|
|
458
507
|
setOpen(false);
|
|
459
508
|
},
|
|
460
509
|
"aria-labelledby": "alert-dialog-title",
|
|
@@ -21,17 +21,42 @@ var _DialogTitle = _interopRequireDefault(require("@material-ui/core/DialogTitle
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
const [open, setOpen] = _react.default.useState(false);
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
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."); }
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
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); }
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
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; }
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
var ConfirmationDialog = /*#__PURE__*/_react.default.memo(function (props) {
|
|
37
|
+
var _React$useState = _react.default.useState(false),
|
|
38
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
39
|
+
open = _React$useState2[0],
|
|
40
|
+
setOpen = _React$useState2[1];
|
|
41
|
+
|
|
42
|
+
var _React$useState3 = _react.default.useState(null),
|
|
43
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
44
|
+
message = _React$useState4[0],
|
|
45
|
+
setMessage = _React$useState4[1];
|
|
46
|
+
|
|
47
|
+
var _React$useState5 = _react.default.useState(null),
|
|
48
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
49
|
+
title = _React$useState6[0],
|
|
50
|
+
setTitle = _React$useState6[1];
|
|
51
|
+
|
|
52
|
+
var _React$useState7 = _react.default.useState(null),
|
|
53
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
54
|
+
callbackHandler = _React$useState8[0],
|
|
55
|
+
setCallbackHandler = _React$useState8[1];
|
|
56
|
+
|
|
57
|
+
_react.default.useEffect(function () {
|
|
58
|
+
props.controller.openDialog = function (message, callbackHandler) {
|
|
59
|
+
var title = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
35
60
|
setMessage(message);
|
|
36
61
|
setCallbackHandler(callbackHandler);
|
|
37
62
|
setTitle(title);
|
|
@@ -39,7 +64,7 @@ const ConfirmationDialog = /*#__PURE__*/_react.default.memo(props => {
|
|
|
39
64
|
};
|
|
40
65
|
});
|
|
41
66
|
|
|
42
|
-
|
|
67
|
+
var handler = function handler(result) {
|
|
43
68
|
callbackHandler.execute(result);
|
|
44
69
|
setOpen(false);
|
|
45
70
|
};
|
|
@@ -53,18 +78,18 @@ const ConfirmationDialog = /*#__PURE__*/_react.default.memo(props => {
|
|
|
53
78
|
}, title) : null, /*#__PURE__*/_react.default.createElement(_DialogContent.default, null, /*#__PURE__*/_react.default.createElement(_DialogContentText.default, {
|
|
54
79
|
id: "alert-dialog-description"
|
|
55
80
|
}, message)), /*#__PURE__*/_react.default.createElement(_DialogActions.default, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
56
|
-
onClick: ()
|
|
81
|
+
onClick: function onClick() {
|
|
57
82
|
handler(false);
|
|
58
83
|
},
|
|
59
84
|
color: "primary"
|
|
60
85
|
}, "No"), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
61
|
-
onClick: ()
|
|
86
|
+
onClick: function onClick() {
|
|
62
87
|
handler(true);
|
|
63
88
|
},
|
|
64
89
|
color: "primary",
|
|
65
90
|
autoFocus: true
|
|
66
91
|
}, "Yes")));
|
|
67
|
-
}, ()
|
|
92
|
+
}, function () {
|
|
68
93
|
return true;
|
|
69
94
|
});
|
|
70
95
|
|