@agilemotion/oui-react-js 1.8.30 → 1.8.32
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 +116 -304
- package/dist/DynamicJS.js +1 -0
- package/dist/RestService.js +4 -0
- package/dist/ViewContext.js +239 -0
- package/dist/components/AlertBar.js +1 -1
- package/dist/components/Button.css +3 -0
- package/dist/components/Button.js +5 -3
- package/dist/components/DataGrid.css +4 -0
- package/dist/components/DataGrid.js +8 -4
- package/dist/components/DataGridFilter.js +2 -2
- package/dist/components/DataGridHeading.js +1 -1
- package/dist/components/DocumentViewer.js +22 -10
- package/dist/components/Graph.js +2 -0
- package/dist/components/HtmlPanel.js +0 -1
- package/dist/components/Icon.js +22 -0
- package/dist/components/LottieIcon.js +19 -19
- package/dist/components/SocketManager.js +5 -0
- package/dist/components/Spinner.js +56 -0
- package/dist/components/StepperTitleBar.js +11 -2
- package/dist/components/TabPage.js +1 -1
- package/dist/components/TabPanel.js +2 -1
- package/dist/components/TitleBar.js +1 -1
- package/dist/components/Toolbar.js +5 -7
- package/dist/components/WordDocumentViewer.js +27 -4
- package/dist/components/customInput/File.js +1 -2
- package/dist/components/dashboard/SideMenuModuleDashboard.css +4 -0
- package/dist/components/dashboard/components/Header.js +1 -1
- package/dist/components/form/CurrencyField.js +1 -1
- package/dist/components/form/DatePicker.js +1 -1
- package/dist/components/form/FieldSet.js +1 -1
- package/dist/components/form/Form.css +8 -0
- package/dist/components/form/IconField.js +7 -3
- package/dist/components/form/LookupField.js +1 -1
- package/dist/components/form/Section.js +6 -1
- package/dist/components/form/SelectItem.js +1 -0
- package/dist/components/form/TextField.js +1 -0
- package/dist/components/form/TimePicker.js +1 -0
- package/dist/components/form/TransferList.js +6 -5
- package/dist/components/layout/Layout.js +11 -2
- package/dist/components/layout/View.css +57 -0
- package/dist/components/layout/ViewPort.js +1 -0
- package/dist/components/layout/Window.js +4 -1
- package/dist/components/layout/WindowViewPort.js +16 -4
- package/dist/components/media/ClosablePanel.css +1 -1
- package/dist/components/media/ToolbarButton.js +2 -1
- package/dist/components/media/TrainingRoom.js +9 -1
- package/dist/components/media/VCEventType.js +0 -3
- package/dist/components/media/VCRoom.js +15 -1
- package/dist/components/media/chat/ChatRoom.js +6 -17
- package/dist/components/media/chat/ChatRoomItem.js +8 -8
- package/dist/components/media/chat/ChatRooms.scss +27 -13
- package/dist/event/EventType.js +1 -0
- package/dist/event/Observable.js +11 -2
- package/dist/event/RouteActionHandler.js +49 -56
- package/dist/js/ProcurementMeetings.js +65 -0
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ var _TrainingRoom = _interopRequireDefault(require("./TrainingRoom"));
|
|
|
12
12
|
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
13
13
|
var _Event = _interopRequireDefault(require("../../event/Event"));
|
|
14
14
|
var _EventType = _interopRequireDefault(require("../../event/EventType"));
|
|
15
|
+
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
const WAITING_FOR_OTHERS_TO_JOIN_MESSAGE = exports.WAITING_FOR_OTHERS_TO_JOIN_MESSAGE = 'Waiting for others to join';
|
|
17
18
|
const SYSTEM_ERROR_MESSAGE = exports.SYSTEM_ERROR_MESSAGE = 'A system error has occurred. Please try again later or contact your system administrator';
|
|
@@ -20,6 +21,7 @@ const STREAM_ERROR_MESSAGE = exports.STREAM_ERROR_MESSAGE = 'The system cannot i
|
|
|
20
21
|
const VCRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
21
22
|
const [settings, setSettings] = _react.default.useState(null);
|
|
22
23
|
const [calendarEvent, setCalendarEvent] = _react.default.useState(null);
|
|
24
|
+
const vcHandle = {};
|
|
23
25
|
_react.default.useEffect(() => {
|
|
24
26
|
props.handle.api = api();
|
|
25
27
|
});
|
|
@@ -29,6 +31,14 @@ const VCRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forw
|
|
|
29
31
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
30
32
|
let event = new _Event.default(props.handle, props.viewId, null);
|
|
31
33
|
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
34
|
+
return () => {
|
|
35
|
+
let event = new _Event.default(props.handle, props.viewId, {
|
|
36
|
+
meetingId: _ApplicationManager.default.getActiveMeetingKey()
|
|
37
|
+
});
|
|
38
|
+
_Observable.default.fireEvent(_EventType.default.MEETING_ENDED, event);
|
|
39
|
+
|
|
40
|
+
//eventManager.clearComponentEventListeners(props.handle);
|
|
41
|
+
};
|
|
32
42
|
}, []);
|
|
33
43
|
const api = () => {
|
|
34
44
|
return {
|
|
@@ -40,6 +50,9 @@ const VCRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forw
|
|
|
40
50
|
},
|
|
41
51
|
set calendarEvent(calendarEvent) {
|
|
42
52
|
setCalendarEvent(calendarEvent);
|
|
53
|
+
},
|
|
54
|
+
loadChats() {
|
|
55
|
+
vcHandle.api.loadChats();
|
|
43
56
|
}
|
|
44
57
|
};
|
|
45
58
|
};
|
|
@@ -62,7 +75,8 @@ const VCRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forw
|
|
|
62
75
|
}
|
|
63
76
|
}, props.config.roomType === 'training' ? /*#__PURE__*/_react.default.createElement(_TrainingRoom.default, {
|
|
64
77
|
settings: settings,
|
|
65
|
-
calendarEvent: calendarEvent
|
|
78
|
+
calendarEvent: calendarEvent,
|
|
79
|
+
handle: vcHandle
|
|
66
80
|
}) : /*#__PURE__*/_react.default.createElement("div", null, "Unknown room type"))));
|
|
67
81
|
}));
|
|
68
82
|
var _default = exports.default = VCRoom;
|
|
@@ -18,7 +18,6 @@ var _LottieIcon = _interopRequireDefault(require("../../LottieIcon"));
|
|
|
18
18
|
var _reactFeather = require("react-feather");
|
|
19
19
|
var _Utils = _interopRequireDefault(require("../../../Utils"));
|
|
20
20
|
var _VCEventType = require("../VCEventType");
|
|
21
|
-
var _iconsMaterial = require("@mui/icons-material");
|
|
22
21
|
var _linkifyReact = _interopRequireDefault(require("linkify-react"));
|
|
23
22
|
var _File = _interopRequireDefault(require("../../customInput/File"));
|
|
24
23
|
var _ApplicationManager = _interopRequireDefault(require("../../../ApplicationManager"));
|
|
@@ -32,6 +31,7 @@ var _SocketManager = _interopRequireDefault(require("../../SocketManager"));
|
|
|
32
31
|
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
33
32
|
var _ChatPoll = _interopRequireDefault(require("./ChatPoll"));
|
|
34
33
|
var _PollContainer = _interopRequireDefault(require("./PollContainer"));
|
|
34
|
+
var _iconsMaterial = require("@mui/icons-material");
|
|
35
35
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
36
36
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
37
37
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -619,7 +619,7 @@ const ChatRoom = props => {
|
|
|
619
619
|
className: "cv-poll-choice-details"
|
|
620
620
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
621
621
|
className: "cv-choice-percentage"
|
|
622
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
622
|
+
}, /*#__PURE__*/_react.default.createElement(Info, {
|
|
623
623
|
className: "selected-choice-icon"
|
|
624
624
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
625
625
|
className: "cv-choice-text"
|
|
@@ -649,17 +649,9 @@ const ChatRoom = props => {
|
|
|
649
649
|
className: "chatroom"
|
|
650
650
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
651
651
|
className: "chatroom__header"
|
|
652
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
653
|
-
className: "chatroom__headerleft"
|
|
654
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
655
|
-
className: 'chat-avatar'
|
|
656
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Avatar, {
|
|
657
|
-
style: {
|
|
658
|
-
backgroundColor: props.chatTab ? 'transparent' : null
|
|
659
|
-
}
|
|
660
|
-
}, selectedChat.type === 'CALENDAR_MEETING' || selectedChat.participants.length > 2 ? /*#__PURE__*/_react.default.createElement(_reactFeather.Calendar, null) : _Utils.default.getInitials(selectedChat.participants.find(p => p.username !== currentUser.username).name))), /*#__PURE__*/_react.default.createElement("h5", null, getChatRoomTitle())), /*#__PURE__*/_react.default.createElement("div", {
|
|
652
|
+
}, !props.chatTab && /*#__PURE__*/_react.default.createElement("div", {
|
|
661
653
|
className: "chatroom__headerright"
|
|
662
|
-
},
|
|
654
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
663
655
|
title: "Poll"
|
|
664
656
|
}, /*#__PURE__*/_react.default.createElement(_material.IconButton, {
|
|
665
657
|
onClick: e => {
|
|
@@ -667,7 +659,7 @@ const ChatRoom = props => {
|
|
|
667
659
|
}
|
|
668
660
|
}, /*#__PURE__*/_react.default.createElement(_iconsMaterial.Poll, {
|
|
669
661
|
style: {
|
|
670
|
-
color: props.chatTab ? '
|
|
662
|
+
color: props.chatTab ? 'red' : null,
|
|
671
663
|
marginTop: props.chatTab ? '8px' : null
|
|
672
664
|
}
|
|
673
665
|
})))))), mode === 'POLL' ? /*#__PURE__*/_react.default.createElement(_ChatPoll.default, {
|
|
@@ -687,10 +679,7 @@ const ChatRoom = props => {
|
|
|
687
679
|
}, messages.sort((a, b) => new Date(a.createdDate) - new Date(b.createdDate))?.map(renderMessage)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), mode === 'CHAT' && !props.readOnly && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("form", {
|
|
688
680
|
className: "chatroom__sendMessage"
|
|
689
681
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
690
|
-
className: "message__imageSelector"
|
|
691
|
-
style: {
|
|
692
|
-
width: '72px'
|
|
693
|
-
}
|
|
682
|
+
className: "message__imageSelector"
|
|
694
683
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
695
684
|
className: 'chat-input',
|
|
696
685
|
style: {
|
|
@@ -7,12 +7,10 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
9
|
var _moment = _interopRequireDefault(require("moment"));
|
|
10
|
-
var _reactRouterDom = require("react-router-dom");
|
|
11
|
-
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
12
10
|
var _reactFeather = require("react-feather");
|
|
13
|
-
var _Utils = _interopRequireDefault(require("
|
|
14
|
-
var
|
|
15
|
-
var _SocketManager = _interopRequireDefault(require("../../
|
|
11
|
+
var _Utils = _interopRequireDefault(require("../../../Utils"));
|
|
12
|
+
var _ApplicationManager = _interopRequireDefault(require("../../../ApplicationManager"));
|
|
13
|
+
var _SocketManager = _interopRequireDefault(require("../../SocketManager"));
|
|
16
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -21,9 +19,9 @@ const ChatRoomItem = props => {
|
|
|
21
19
|
event,
|
|
22
20
|
selectedChat
|
|
23
21
|
} = props;
|
|
24
|
-
const [currentUser, setCurrentUser] = (0, _react.useState)(
|
|
22
|
+
const [currentUser, setCurrentUser] = (0, _react.useState)(_ApplicationManager.default.getUserDetails());
|
|
25
23
|
(0, _react.useEffect)(() => {
|
|
26
|
-
setCurrentUser(
|
|
24
|
+
setCurrentUser(_ApplicationManager.default.getUserDetails());
|
|
27
25
|
}, []);
|
|
28
26
|
const goToRoom = id => {
|
|
29
27
|
props.selectionHandler(event);
|
|
@@ -48,7 +46,9 @@ const ChatRoomItem = props => {
|
|
|
48
46
|
color: "error",
|
|
49
47
|
badgeContent: getUnreadMessagesCount(),
|
|
50
48
|
max: 9
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Avatar, null, event.type === 'CALENDAR_MEETING' || event.participants.length > 2 ? /*#__PURE__*/_react.default.createElement(_reactFeather.Calendar,
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Avatar, null, event.type === 'CALENDAR_MEETING' || event.participants.length > 2 ? /*#__PURE__*/_react.default.createElement(_reactFeather.Calendar, {
|
|
50
|
+
color: _ApplicationManager.default.getApplicationPrimaryColor()
|
|
51
|
+
}) : _Utils.default.getInitials(event.participants.find(p => p.userId !== currentUser.userId).name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
52
52
|
className: "chatroom__info"
|
|
53
53
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
54
|
className: "chatRoom__title"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
|
|
20
20
|
.file-upload {
|
|
21
21
|
position: absolute;
|
|
22
|
-
margin-top: 8px;
|
|
23
|
-
margin-left: -
|
|
22
|
+
margin-top: -8px;
|
|
23
|
+
margin-left: -48px;
|
|
24
24
|
z-index: 1;
|
|
25
|
-
width:
|
|
25
|
+
width: 24px;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.chat-input {
|
|
@@ -33,27 +33,40 @@
|
|
|
33
33
|
overflow: hidden;
|
|
34
34
|
text-overflow: ellipsis;
|
|
35
35
|
white-space: nowrap;
|
|
36
|
-
|
|
36
|
+
top: -8px;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.chat-input span {
|
|
41
|
+
width: 32px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.chat-input button {
|
|
45
|
+
top: 8px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.chat-input label svg {
|
|
49
|
+
height: 24px;
|
|
37
50
|
}
|
|
38
51
|
|
|
39
52
|
.chat-avatar {
|
|
40
53
|
|
|
41
54
|
}
|
|
42
55
|
|
|
43
|
-
.
|
|
56
|
+
.chatroom {
|
|
44
57
|
display: flex;
|
|
45
58
|
flex-direction: column;
|
|
46
59
|
|
|
47
|
-
.
|
|
60
|
+
.chatroom__rooms {
|
|
48
61
|
max-height: 84.7vh;
|
|
49
62
|
overflow: auto;
|
|
50
63
|
}
|
|
51
64
|
|
|
52
|
-
.
|
|
65
|
+
.chatroom__rooms::-webkit-scrollbar {
|
|
53
66
|
display: none;
|
|
54
67
|
}
|
|
55
68
|
|
|
56
|
-
.
|
|
69
|
+
.chatroom__header {
|
|
57
70
|
display: flex;
|
|
58
71
|
flex-direction: row;
|
|
59
72
|
align-items: center;
|
|
@@ -142,7 +155,7 @@
|
|
|
142
155
|
width: 100%;
|
|
143
156
|
height: 100%;
|
|
144
157
|
max-height: 100%;
|
|
145
|
-
padding: 8px;
|
|
158
|
+
padding: 0 8px;
|
|
146
159
|
|
|
147
160
|
.image__text {
|
|
148
161
|
padding: 0 9%;
|
|
@@ -153,13 +166,10 @@
|
|
|
153
166
|
.chatroom__header {
|
|
154
167
|
display: flex;
|
|
155
168
|
flex-direction: row;
|
|
156
|
-
|
|
157
|
-
justify-content: space-around;
|
|
158
|
-
padding: 4px 4px 4px 8px;
|
|
169
|
+
padding: 0 4px 0 8px;
|
|
159
170
|
padding-right: 7%;
|
|
160
171
|
border-bottom: 1px solid #e1e1e1;
|
|
161
172
|
width: 100%;
|
|
162
|
-
margin-bottom: 16px;
|
|
163
173
|
|
|
164
174
|
.chatroom__headerleft {
|
|
165
175
|
display: flex;
|
|
@@ -193,6 +203,10 @@
|
|
|
193
203
|
align-items: center;
|
|
194
204
|
margin: 0 9% 0 3%;
|
|
195
205
|
|
|
206
|
+
.message__imageSelector {
|
|
207
|
+
width: 48px;
|
|
208
|
+
}
|
|
209
|
+
|
|
196
210
|
.message__imageSelector > input {
|
|
197
211
|
display: none;
|
|
198
212
|
}
|
package/dist/event/EventType.js
CHANGED
package/dist/event/Observable.js
CHANGED
|
@@ -114,9 +114,10 @@ class Observable {
|
|
|
114
114
|
*
|
|
115
115
|
* @param eventType eventType the event type
|
|
116
116
|
* @param be the base event
|
|
117
|
+
* @param log determine whether to log checks
|
|
117
118
|
* @return false if any subscriptions cancel the event.
|
|
118
119
|
*/
|
|
119
|
-
async fireEvent(eventType, be) {
|
|
120
|
+
async fireEvent(eventType, be, log) {
|
|
120
121
|
// Components could be unloading on the cases where screens are busy closing,
|
|
121
122
|
// meaning the "current" object may be nullified, so we need the null check
|
|
122
123
|
// This happens on async events such as RPC_CALL. If there is no view masking,
|
|
@@ -128,7 +129,15 @@ class Observable {
|
|
|
128
129
|
let viewId = be.viewId;
|
|
129
130
|
if (!_Utils.default.isNull(sourceId)) {
|
|
130
131
|
for (const subscription of this.subscriptions) {
|
|
131
|
-
|
|
132
|
+
let domain = subscription.publisherDomain ? subscription.publisherDomain : viewId;
|
|
133
|
+
if (log === true) {
|
|
134
|
+
console.log("VIEW CHECK: " + domain + " ==? " + viewId + " - " + (domain === viewId || _ApplicationManager.SYSTEM_EVENT === viewId));
|
|
135
|
+
console.log("PUBLISHER CHECK: " + subscription.getPublisher() + " : " + sourceId);
|
|
136
|
+
console.log("EVENT TYPE CHECK: " + subscription.getEventType() + " : " + eventType);
|
|
137
|
+
console.log("FULL CHECK: " + ((subscription.getViewId() === viewId || _ApplicationManager.SYSTEM_EVENT === viewId) && subscription.getPublisher() === sourceId && subscription.getEventType() === eventType));
|
|
138
|
+
console.log("\n");
|
|
139
|
+
}
|
|
140
|
+
if ((domain === viewId || _ApplicationManager.SYSTEM_EVENT === viewId) && subscription.getPublisher() === sourceId && subscription.getEventType() === eventType) {
|
|
132
141
|
if (!_Utils.default.isNull(subscription.getActions())) {
|
|
133
142
|
for (let j = 0; j < subscription.getActions().length; j++) {
|
|
134
143
|
let action = subscription.getActions()[j];
|
|
@@ -37,8 +37,8 @@ class RouteActionHandler {
|
|
|
37
37
|
path = _DynamicJS.default.executeScriptObject(currentViewId + 'ViewEvaluator_' + event?.source.id, actionConfig.pathEvaluator);
|
|
38
38
|
} else {
|
|
39
39
|
path = _ApplicationManager.default.isExpression(actionConfig.path) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.path, event?.data) : actionConfig.path;
|
|
40
|
-
if ('@#{history.back}' === actionConfig.path
|
|
41
|
-
let historyElement = _ApplicationManager.default.getPreviousHistoryElement();
|
|
40
|
+
if ('@#{history.back}' === actionConfig.path) {
|
|
41
|
+
let historyElement = _ApplicationManager.default.getPreviousHistoryElement(isWindow ? 'window' : 'main');
|
|
42
42
|
if (historyElement === null) {
|
|
43
43
|
console.error('Invalid path. Cannot go back in history');
|
|
44
44
|
return;
|
|
@@ -65,79 +65,72 @@ class RouteActionHandler {
|
|
|
65
65
|
parameterValues.push(param);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
let currentGraph = _ApplicationManager.default.
|
|
68
|
+
let currentGraph = _ApplicationManager.default.getCurrentGraph(isWindow ? 'window' : 'main');
|
|
69
69
|
if ('@#{home}' === actionConfig.path) {
|
|
70
70
|
_ApplicationManager.default.navigate('/view/unload');
|
|
71
71
|
_ApplicationManager.default.navigate('/view/dashboard');
|
|
72
72
|
} else if ('@#{history.back}' === actionConfig.path && currentGraph) {
|
|
73
73
|
if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
|
|
74
|
-
_ApplicationManager.default.removeLoadedGraph(
|
|
74
|
+
_ApplicationManager.default.removeLoadedGraph(isWindow && currentGraph.config.isWindow ? 'window' : 'main');
|
|
75
75
|
}
|
|
76
76
|
} else {
|
|
77
77
|
let url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/view/get?version=1.0&id=' + path;
|
|
78
78
|
(0, _RestUtils.sendRequest)(url, data => {
|
|
79
79
|
if (isParent && currentGraph) {
|
|
80
80
|
if (isWindow && currentGraph.config.isWindow || !isWindow && !currentGraph.config.isWindow) {
|
|
81
|
-
_ApplicationManager.default.removeLoadedGraph(
|
|
81
|
+
_ApplicationManager.default.removeLoadedGraph(isWindow && currentGraph.config.isWindow ? 'window' : 'main');
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
if (data.type === 'view') {
|
|
85
|
-
let currentView =
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return this.defaultModel[key];
|
|
116
|
-
},
|
|
117
|
-
loaded: () => {
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
_ApplicationManager.default.addView(view, path, forward);
|
|
123
|
-
// None-existing route to ensure that the current view unloads
|
|
124
|
-
if (_Utils.default.isNull(actionConfig.popUp) || actionConfig.popUp === false) {
|
|
125
|
-
if (!isWindow) {
|
|
126
|
-
//applicationManager.navigate('/view/unload');
|
|
127
|
-
_ApplicationManager.default.navigate('/view/' + data.id);
|
|
85
|
+
let currentView = _ApplicationManager.default.getTopView(isWindow ? 'window' : 'main');
|
|
86
|
+
let view = {};
|
|
87
|
+
let defaultModel = {};
|
|
88
|
+
_Utils.default.updateModel(parameterValues, defaultModel);
|
|
89
|
+
view.config = data;
|
|
90
|
+
view.parameters = parameterValues;
|
|
91
|
+
view.parent = isParent;
|
|
92
|
+
view.graphId = actionConfig.graphId;
|
|
93
|
+
view.handle = {
|
|
94
|
+
api: {
|
|
95
|
+
get id() {
|
|
96
|
+
return data.id;
|
|
97
|
+
},
|
|
98
|
+
get model() {
|
|
99
|
+
return defaultModel;
|
|
100
|
+
},
|
|
101
|
+
getChild: id => {
|
|
102
|
+
return null;
|
|
103
|
+
},
|
|
104
|
+
updateModel: values => {
|
|
105
|
+
_Utils.default.updateModel(values, defaultModel);
|
|
106
|
+
},
|
|
107
|
+
setModelValue: (key, value) => {
|
|
108
|
+
this.defaultModel.key = value;
|
|
109
|
+
},
|
|
110
|
+
getModelValue: key => {
|
|
111
|
+
return this.defaultModel[key];
|
|
112
|
+
},
|
|
113
|
+
loaded: () => {
|
|
114
|
+
return false;
|
|
128
115
|
}
|
|
129
116
|
}
|
|
117
|
+
};
|
|
118
|
+
_ApplicationManager.default.addView(view, path, forward, isWindow ? 'window' : 'main');
|
|
119
|
+
// None-existing route to ensure that the current view unloads
|
|
120
|
+
if (_Utils.default.isNull(actionConfig.popUp) || actionConfig.popUp === false) {
|
|
121
|
+
// Windows do not go to the Outlet in the viewport. They get rendered into the window viewport
|
|
122
|
+
if (!isWindow) {
|
|
123
|
+
//applicationManager.navigate('/view/unload');
|
|
124
|
+
_ApplicationManager.default.navigate('/view/' + data.id);
|
|
125
|
+
} else {
|
|
126
|
+
_ApplicationManager.default.openWindowView(view);
|
|
127
|
+
}
|
|
130
128
|
} else {
|
|
131
|
-
|
|
132
|
-
currentView = applicationManager.getCurrentView();
|
|
133
|
-
if (currentView) {
|
|
134
|
-
currentView.handle.api.updateModel(parameterValues);
|
|
135
|
-
let event = new Event(currentView.handle, currentView.config.id, null);
|
|
136
|
-
eventManager.fireEvent(EventType.COMPONENT_LOAD, event);
|
|
137
|
-
}*/
|
|
129
|
+
_ApplicationManager.default.openPopupView(view);
|
|
138
130
|
}
|
|
139
131
|
} else if (data.type === 'graph') {
|
|
140
|
-
|
|
132
|
+
data.isWindow = isWindow;
|
|
133
|
+
_ApplicationManager.default.loadGraph(isParent, data, parameterValues, isPopup ? 'popup' : isWindow ? 'window' : 'main');
|
|
141
134
|
}
|
|
142
135
|
}, e => {
|
|
143
136
|
console.error(e);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ProcurementMeetings = void 0;
|
|
7
|
+
var _Media = require("./Media");
|
|
8
|
+
var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
|
|
9
|
+
var _VCEventType = require("../components/media/VCEventType");
|
|
10
|
+
var _SocketManager = _interopRequireDefault(require("../components/SocketManager"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
class ProcurementMeetings {
|
|
13
|
+
constructor(resolver) {
|
|
14
|
+
this.resolver = resolver;
|
|
15
|
+
}
|
|
16
|
+
emitSocketEvent = (systemEventType, data, meeting) => {
|
|
17
|
+
let receipientIds = [];
|
|
18
|
+
for (const attendee of meeting.attendees) {
|
|
19
|
+
let username = attendee.username;
|
|
20
|
+
if (username !== _ApplicationManager.default.getUserDetails().username) {
|
|
21
|
+
receipientIds.push(username);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
let eventData = {
|
|
25
|
+
systemEventType: systemEventType,
|
|
26
|
+
recipients: receipientIds,
|
|
27
|
+
data: data
|
|
28
|
+
};
|
|
29
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.SYSTEM_EVENT, eventData);
|
|
30
|
+
};
|
|
31
|
+
startMeeting = meeting => {
|
|
32
|
+
this.emitSocketEvent("startMeeting", {
|
|
33
|
+
procurementNumber: meeting.procurementNumber
|
|
34
|
+
}, meeting);
|
|
35
|
+
};
|
|
36
|
+
handleSystemEvent = (event, meeting, viewId) => {
|
|
37
|
+
console.log("PROCESSING MEETING SYSTEM EVENT : ", event);
|
|
38
|
+
let data = event.data;
|
|
39
|
+
if (event.systemEventType === 'startMeeting') {
|
|
40
|
+
if (data.procurementNumber === meeting.procurementNumber) {
|
|
41
|
+
let api = _ApplicationManager.default.resolveComponentApi(viewId);
|
|
42
|
+
api.model.started = true;
|
|
43
|
+
api = _ApplicationManager.default.resolveComponentApi("mainLayout");
|
|
44
|
+
api.refresh();
|
|
45
|
+
api = _ApplicationManager.default.resolveComponentApi("waitingLayout");
|
|
46
|
+
api.refresh();
|
|
47
|
+
|
|
48
|
+
// This event will launch the VC to launch. There is a listener in the view config that launches the view
|
|
49
|
+
_ApplicationManager.default.api.fireEvent('SERVICE_CALL_SUCCESS', {
|
|
50
|
+
source: {
|
|
51
|
+
api: {
|
|
52
|
+
id: 'procurementMeetingSession'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
viewId: 'procurementMeetingSession'
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
} else if (event.systemEventType === 'openPoll') {
|
|
59
|
+
_ApplicationManager.default.resolveComponentApi("vcRoom").loadChats();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
exports.ProcurementMeetings = ProcurementMeetings;
|
|
64
|
+
const instance = new ProcurementMeetings();
|
|
65
|
+
var _default = exports.default = instance;
|