@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
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ViewContext = exports.SYSTEM_EVENT = exports.LEGEND_ARROW_ICON = void 0;
|
|
7
|
+
var _Observable = _interopRequireDefault(require("./event/Observable"));
|
|
8
|
+
var _Event = _interopRequireDefault(require("./event/Event"));
|
|
9
|
+
var _EventType = _interopRequireDefault(require("./event/EventType"));
|
|
10
|
+
var _Utils = _interopRequireDefault(require("./Utils"));
|
|
11
|
+
var _DynamicJS = _interopRequireWildcard(require("./DynamicJS"));
|
|
12
|
+
var _Graph = _interopRequireDefault(require("./components/Graph"));
|
|
13
|
+
var _ApplicationManager = _interopRequireDefault(require("./ApplicationManager"));
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const SYSTEM_EVENT = exports.SYSTEM_EVENT = 'SYSTEM_EVENT';
|
|
18
|
+
const LEGEND_ARROW_ICON = exports.LEGEND_ARROW_ICON = ` <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:__COLOR__'></i> `;
|
|
19
|
+
class ViewContext {
|
|
20
|
+
constructor(id) {
|
|
21
|
+
this.views = [];
|
|
22
|
+
this.props = {};
|
|
23
|
+
this.navHistory = [];
|
|
24
|
+
this.graphs = [];
|
|
25
|
+
this.id = id;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* update appbar title
|
|
30
|
+
*
|
|
31
|
+
* @param viewId
|
|
32
|
+
* @param title
|
|
33
|
+
*/
|
|
34
|
+
updateAppBarTitle = (viewId, title) => {
|
|
35
|
+
let view = this.getView(viewId);
|
|
36
|
+
if (!view) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
let legendIconArrow = LEGEND_ARROW_ICON.replace('__COLOR__', this.props.secondaryColor);
|
|
40
|
+
let titleValue = '';
|
|
41
|
+
if (!title.match(_DynamicJS.TEMPLATE_REGEX)) {
|
|
42
|
+
titleValue = title;
|
|
43
|
+
} else {
|
|
44
|
+
titleValue = _DynamicJS.default.executeScript(viewId + 'Title', title, viewId);
|
|
45
|
+
}
|
|
46
|
+
for (const navHistoryElement of this.navHistory) {
|
|
47
|
+
if (navHistoryElement.viewId === viewId) {
|
|
48
|
+
navHistoryElement.title = titleValue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
let legendValue = '<span>';
|
|
52
|
+
let counter = 0;
|
|
53
|
+
for (const navHistoryElement of this.navHistory) {
|
|
54
|
+
legendValue += `${navHistoryElement.title}`;
|
|
55
|
+
if (counter++ < this.navHistory.length - 1) {
|
|
56
|
+
legendValue += legendIconArrow;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
legendValue += '</span>';
|
|
60
|
+
this.props.appBarTitle = legendValue;
|
|
61
|
+
let property = {};
|
|
62
|
+
property.name = 'title-' + viewId;
|
|
63
|
+
property.value = this.props.appBarTitle;
|
|
64
|
+
|
|
65
|
+
// When we introduce the view manager, it must become the event source instead of applicationManager
|
|
66
|
+
let event = new _Event.default(_ApplicationManager.default, SYSTEM_EVENT, property);
|
|
67
|
+
_Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, event);
|
|
68
|
+
if (this.graphs.length > 0) {
|
|
69
|
+
property = {};
|
|
70
|
+
property.name = 'stepperTitle';
|
|
71
|
+
let event = new _Event.default(_ApplicationManager.default, SYSTEM_EVENT, property);
|
|
72
|
+
_Observable.default.fireEvent(_EventType.default.APPLICATION_CONTEXT_CHANGE, event);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* clears all views
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
clear = () => {
|
|
81
|
+
this.views.splice(0, this.views.length);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* add view configuration
|
|
86
|
+
*
|
|
87
|
+
* @param view the listener to be added
|
|
88
|
+
* @param path
|
|
89
|
+
* @param forward
|
|
90
|
+
*/
|
|
91
|
+
addView = (view, path, forward) => {
|
|
92
|
+
let topView = this.getTopView();
|
|
93
|
+
if (topView) {
|
|
94
|
+
this.closeView(topView.config.id, forward);
|
|
95
|
+
}
|
|
96
|
+
if (view.parent) {
|
|
97
|
+
this.navHistory.splice(0, this.navHistory.length);
|
|
98
|
+
for (const contextView of this.views) {
|
|
99
|
+
if (!_Utils.default.isNull(contextView) && !_Utils.default.isNull(contextView.handle.api)) {
|
|
100
|
+
this.closeView(contextView.handle.api.id, forward);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (forward || view.parent) {
|
|
105
|
+
let historyElement = {};
|
|
106
|
+
historyElement.viewId = view.config.id;
|
|
107
|
+
historyElement.parent = view.parent;
|
|
108
|
+
historyElement.graphId = view.graphId;
|
|
109
|
+
historyElement.path = path;
|
|
110
|
+
this.navHistory.push(historyElement);
|
|
111
|
+
}
|
|
112
|
+
this.views.push(view);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* closes the current view
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
closeAllViews = () => {
|
|
120
|
+
for (const view of this.views) {
|
|
121
|
+
this.closeView(view.config.id, false);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* get all view
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
getViews = () => {
|
|
130
|
+
return this.views;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* get all graphs
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
137
|
+
getGraphs = () => {
|
|
138
|
+
return this.graphs;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* closes the specified view
|
|
143
|
+
*
|
|
144
|
+
* @param viewId the listener to be added
|
|
145
|
+
* @param forward
|
|
146
|
+
*/
|
|
147
|
+
closeView = (viewId, forward) => {
|
|
148
|
+
let view = this.getView(viewId);
|
|
149
|
+
if (view) {
|
|
150
|
+
if (!_Utils.default.isNull(view) && !_Utils.default.isNull(view.handle.api)) {
|
|
151
|
+
_Observable.default.clearEventListeners(viewId);
|
|
152
|
+
let index = this.views.findIndex(v => v.handle.api.id === viewId);
|
|
153
|
+
if (index >= 0) {
|
|
154
|
+
this.views.splice(index, 1);
|
|
155
|
+
if (!forward) {
|
|
156
|
+
let viewIndex = this.navHistory.findIndex(h => h.viewId === viewId);
|
|
157
|
+
if (viewIndex >= 0) {
|
|
158
|
+
this.navHistory.splice(viewIndex, 1);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Returns a view configuration with a particular id
|
|
168
|
+
*
|
|
169
|
+
*/
|
|
170
|
+
getView = id => {
|
|
171
|
+
for (const view of this.views) {
|
|
172
|
+
if (id === view.config.id) {
|
|
173
|
+
return view;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return null;
|
|
177
|
+
};
|
|
178
|
+
getTopView() {
|
|
179
|
+
if (this.views.length > 0) {
|
|
180
|
+
return this.views[this.views.length - 1];
|
|
181
|
+
}
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
signalGraph(id, event) {
|
|
185
|
+
if (this.graphs.length > 0) {
|
|
186
|
+
let graphToSignal = this.graphs[this.graphs.length - 1];
|
|
187
|
+
for (const graph of this.graphs) {
|
|
188
|
+
if (id === graph.id) {
|
|
189
|
+
graphToSignal = graph;
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
graphToSignal.signal(event);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
getUserDetails() {
|
|
197
|
+
return this.props.userDetails;
|
|
198
|
+
}
|
|
199
|
+
removeLoadedGraph() {
|
|
200
|
+
if (this.graphs.length > 0) {
|
|
201
|
+
let graph = this.graphs[this.graphs.length - 1];
|
|
202
|
+
let graphViews = this.views.filter(view => view.graphId === graph.id);
|
|
203
|
+
for (const graphView of graphViews) {
|
|
204
|
+
this.closeView(graphView.config.id, false);
|
|
205
|
+
}
|
|
206
|
+
this.graphs.splice(0, this.graphs.length);
|
|
207
|
+
let graphHistory = this.navHistory.filter(view => view.graphId === graph.id);
|
|
208
|
+
for (const graphHistoryElement of graphHistory) {
|
|
209
|
+
this.navHistory.splice(this.navHistory.findIndex(e => e === graphHistoryElement), 1);
|
|
210
|
+
}
|
|
211
|
+
return graph;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
loadGraph(isParent, config, parameterValues) {
|
|
215
|
+
if (isParent) {
|
|
216
|
+
this.navHistory.splice(0, this.navHistory.length);
|
|
217
|
+
for (const contextView of this.views) {
|
|
218
|
+
this.closeView(contextView.handle.api.id, false);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
let graph = new _Graph.default(_Utils.default.parseConfig(config));
|
|
222
|
+
this.graphs.push(graph);
|
|
223
|
+
for (const parameterValue of parameterValues) {
|
|
224
|
+
graph.model[parameterValue.name] = parameterValue.value;
|
|
225
|
+
}
|
|
226
|
+
graph.init();
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
getPreviousHistoryElement = () => {
|
|
233
|
+
if (this.navHistory.length > 1) {
|
|
234
|
+
return this.navHistory[this.navHistory.length - 2];
|
|
235
|
+
}
|
|
236
|
+
return null;
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
exports.ViewContext = ViewContext;
|
|
@@ -20,7 +20,7 @@ const AlertBar = /*#__PURE__*/_react.default.memo(props => {
|
|
|
20
20
|
let defaultAction = {
|
|
21
21
|
actionType: 'script',
|
|
22
22
|
script: {
|
|
23
|
-
lines: [
|
|
23
|
+
lines: [`if('${props.viewId}' === $event.viewId) {`, ` @#{${props.config.id}}.message = $event.data.message`, ` @#{${props.config.id}}.variant = $event.data.messageType === 'ERROR' ? 'danger' : $event.data.messageType === 'WARN' ? 'warning' : $event.data.messageType === 'SUCCESS' ? 'success' : 'info'`, `}`]
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
if (_Utils.default.isNull(eventHandlingConfig.subscriptions)) {
|
|
@@ -15,6 +15,7 @@ var _Event = _interopRequireDefault(require("../event/Event"));
|
|
|
15
15
|
var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
16
16
|
var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
|
|
17
17
|
var _DynamicJS = _interopRequireDefault(require("../DynamicJS"));
|
|
18
|
+
require("./Button.css");
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
20
21
|
root: {
|
|
@@ -49,7 +50,8 @@ const Button = props => {
|
|
|
49
50
|
}, [config]);
|
|
50
51
|
_react.default.useEffect(() => {
|
|
51
52
|
try {
|
|
52
|
-
let
|
|
53
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
54
|
+
let label = _DynamicJS.default.executeScript(parsedConfig.id + 'label', _Utils.default.getComponentAttribute(parsedConfig, 'label', ''), parsedConfig.viewId, true, null, null, false);
|
|
53
55
|
setLabel(label);
|
|
54
56
|
} catch (e) {
|
|
55
57
|
setLabel(_Utils.default.getComponentAttribute(props.config, 'label', ''));
|
|
@@ -93,7 +95,7 @@ const Button = props => {
|
|
|
93
95
|
};
|
|
94
96
|
};
|
|
95
97
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
-
className: classes.root
|
|
98
|
+
className: `${classes.root} oui button`,
|
|
97
99
|
style: {
|
|
98
100
|
width: props.attributes?.style?.width,
|
|
99
101
|
display: visible ? 'block' : 'none'
|
|
@@ -118,7 +120,7 @@ const Button = props => {
|
|
|
118
120
|
onClick: handleClick
|
|
119
121
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
120
122
|
id: props.config.icon,
|
|
121
|
-
color: props.config.attributes?.style?.color ? props.config.attributes?.style?.color :
|
|
123
|
+
color: props.config.attributes?.style?.color ? props.config.attributes?.style?.color : _ApplicationManager.default.getApplicationSecondaryColor()
|
|
122
124
|
})) : /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
123
125
|
variant: color === 'secondary' || color === 'primary' ? 'contained' : 'text',
|
|
124
126
|
"aria-controls": "menu-list-grow",
|
|
@@ -273,8 +273,9 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
273
273
|
if (filterHandle && filterHandle.api) {
|
|
274
274
|
filterHandle.api.refresh();
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
277
|
+
if (!_Utils.default.isNull(parsedConfig.visible)) {
|
|
278
|
+
setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
|
|
278
279
|
}
|
|
279
280
|
},
|
|
280
281
|
set visible(visible) {
|
|
@@ -468,7 +469,8 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
468
469
|
let isEditable = false;
|
|
469
470
|
let visibleColumnCount = 0;
|
|
470
471
|
for (const column of config.columns) {
|
|
471
|
-
|
|
472
|
+
let hidden = _Utils.default.getComponentAttribute(column, 'hidden', false);
|
|
473
|
+
if (!_Utils.default.evaluateBooleanExpression(hidden, props.config.id)) {
|
|
472
474
|
visibleColumnCount++;
|
|
473
475
|
}
|
|
474
476
|
}
|
|
@@ -745,6 +747,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
745
747
|
return editorHandles[column.id + "_editor"];
|
|
746
748
|
}
|
|
747
749
|
return visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
750
|
+
id: props.config.id,
|
|
748
751
|
style: _Utils.default.isNull(props.hasBorder) || props.hasBorder === true ? _Utils.default.mergeStyles({
|
|
749
752
|
margin: '0',
|
|
750
753
|
border: '1px solid #e2e2e2',
|
|
@@ -879,7 +882,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
879
882
|
inputProps: {
|
|
880
883
|
'aria-labelledby': labelId
|
|
881
884
|
}
|
|
882
|
-
})) : null, config.columns.map(column => column.attributes['hidden'] === true ? null : column.layout ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
885
|
+
})) : null, config.columns.map(column => _Utils.default.evaluateBooleanExpression(column.attributes['hidden'], props.config.id) === true ? null : column.layout ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
883
886
|
style: {
|
|
884
887
|
padding: 0,
|
|
885
888
|
width: column.attributes.width ? column.attributes.width : 100 / config.columns.length + '%',
|
|
@@ -924,6 +927,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
924
927
|
criteria: criteria
|
|
925
928
|
}))));
|
|
926
929
|
})))), _Utils.default.isNull(props.pagination) || props.pagination === true ? /*#__PURE__*/_react.default.createElement(_TablePagination.default, {
|
|
930
|
+
className: "grid-table-pagination",
|
|
927
931
|
rowsPerPageOptions: rowsPerPageOptions,
|
|
928
932
|
component: "div",
|
|
929
933
|
count: totalNumberOfRows,
|
|
@@ -32,7 +32,7 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
32
32
|
if (!_Utils.default.isNull(props.config)) {
|
|
33
33
|
let visibleCols = 0;
|
|
34
34
|
for (const column of config.columns) {
|
|
35
|
-
let attribute = column.attributes['hidden'];
|
|
35
|
+
let attribute = _Utils.default.evaluateBooleanExpression(column.attributes['hidden'], props.config.id);
|
|
36
36
|
if (_Utils.default.isNull(attribute) || attribute === false) {
|
|
37
37
|
visibleCols++;
|
|
38
38
|
}
|
|
@@ -242,7 +242,7 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
242
242
|
style: {
|
|
243
243
|
width: column.width
|
|
244
244
|
}
|
|
245
|
-
}, !column.attributes['hidden'] ? column.attributes['filterable'] === true ? /*#__PURE__*/_react.default.createElement("div", {
|
|
245
|
+
}, !_Utils.default.evaluateBooleanExpression(column.attributes['hidden'], props.config.id) ? column.attributes['filterable'] === true ? /*#__PURE__*/_react.default.createElement("div", {
|
|
246
246
|
className: (!_Utils.default.isNull(props.filterWrapperClass) ? props.filterWrapperClass : 'filterWraper') + ' row no-margin no-padding'
|
|
247
247
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
248
248
|
className: 'col no-margin no-padding'
|
|
@@ -70,7 +70,7 @@ const DataGridHeading = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.def
|
|
|
70
70
|
inputProps: {
|
|
71
71
|
'aria-label': 'select all'
|
|
72
72
|
}
|
|
73
|
-
})) : null, props.config.columns.map(column => column.attributes['hidden'] === true ? null : /*#__PURE__*/_react.default.createElement(_DataGridColumn.default, {
|
|
73
|
+
})) : null, props.config.columns.map(column => _Utils.default.evaluateBooleanExpression(column.attributes['hidden'], props.config.id) === true ? null : /*#__PURE__*/_react.default.createElement(_DataGridColumn.default, {
|
|
74
74
|
key: columnCounter++,
|
|
75
75
|
config: column,
|
|
76
76
|
handle: createColumnHandle(),
|
|
@@ -22,6 +22,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
22
22
|
const [label, setLabel] = _react.default.useState(null);
|
|
23
23
|
const [hasLoadingError, setHasLoadingError] = _react.default.useState(false);
|
|
24
24
|
const [value, setValue] = _react.default.useState(null);
|
|
25
|
+
const [visible, setVisible] = _react.default.useState(false);
|
|
25
26
|
const wordEditorValueHandler = {};
|
|
26
27
|
_react.default.useEffect(() => {
|
|
27
28
|
props.handle.api = api();
|
|
@@ -34,6 +35,9 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
34
35
|
setLabel(_DynamicJS.default.evaluateExpression(label));
|
|
35
36
|
let event = new _Event.default(props.handle, props.viewId, null);
|
|
36
37
|
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
38
|
+
if (props.config.attributes?.autoLoadData === false) {
|
|
39
|
+
setLoading(false);
|
|
40
|
+
}
|
|
37
41
|
}, []);
|
|
38
42
|
function doLoadData(actionConfig) {
|
|
39
43
|
if (!_Utils.default.isNull(actionConfig) && !_Utils.default.isNull(actionConfig.value)) {
|
|
@@ -105,6 +109,13 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
105
109
|
set label(label) {
|
|
106
110
|
setLabel(label);
|
|
107
111
|
},
|
|
112
|
+
refresh() {
|
|
113
|
+
if (!_Utils.default.isNull(props.config) && !_Utils.default.isNull(props.config.visible)) {
|
|
114
|
+
setVisible(_Utils.default.evaluateBooleanExpression(props.config.visible, props.config.id));
|
|
115
|
+
} else {
|
|
116
|
+
setVisible(true);
|
|
117
|
+
}
|
|
118
|
+
},
|
|
108
119
|
getDocumentValue: async () => {
|
|
109
120
|
if (wordEditorValueHandler.api) {
|
|
110
121
|
return await wordEditorValueHandler.api.getValue();
|
|
@@ -113,13 +124,14 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
113
124
|
}
|
|
114
125
|
};
|
|
115
126
|
};
|
|
116
|
-
|
|
127
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
128
|
+
return visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
117
129
|
style: _Utils.default.mergeStyles({}, props.config)
|
|
118
130
|
}, props.config.attributes?.label && /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
-
style: _Utils.default.mergeObjects({
|
|
131
|
+
style: _Utils.default.mergeObjects(props.config.attributes?.labelStyle, {
|
|
120
132
|
fontSize: '20px',
|
|
121
133
|
color: '#1d253b'
|
|
122
|
-
}
|
|
134
|
+
})
|
|
123
135
|
}, label), loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
124
136
|
style: {
|
|
125
137
|
marginTop: '16px'
|
|
@@ -140,13 +152,13 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
140
152
|
let event = new _Event.default(props.handle, props.viewId, null);
|
|
141
153
|
_Observable.default.fireEvent(_EventType.default.VALUE_CHANGE, event);
|
|
142
154
|
},
|
|
143
|
-
allowUnresolvedChanges: props.config.
|
|
144
|
-
disableRejectChanges: props.config.
|
|
145
|
-
disableAcceptChanges: props.config.
|
|
146
|
-
readOnly: props.config.
|
|
147
|
-
commentsOnly: props.config.
|
|
148
|
-
enableUpload: props.config.
|
|
149
|
-
trackChanges: props.config.
|
|
155
|
+
allowUnresolvedChanges: _Utils.default.evaluateBooleanExpression(parsedConfig.allowUnresolvedChanges, props.config.id),
|
|
156
|
+
disableRejectChanges: _Utils.default.evaluateBooleanExpression(parsedConfig.disableRejectChanges, props.config.id),
|
|
157
|
+
disableAcceptChanges: _Utils.default.evaluateBooleanExpression(parsedConfig.disableAcceptChanges, props.config.id),
|
|
158
|
+
readOnly: _Utils.default.evaluateBooleanExpression(parsedConfig.readOnly, props.config.id),
|
|
159
|
+
commentsOnly: _Utils.default.evaluateBooleanExpression(parsedConfig.commentsOnly, props.config.id),
|
|
160
|
+
enableUpload: _Utils.default.evaluateBooleanExpression(parsedConfig.enableUpload, props.config.id),
|
|
161
|
+
trackChanges: _Utils.default.evaluateBooleanExpression(parsedConfig.trackChanges, props.config.id)
|
|
150
162
|
}));
|
|
151
163
|
}));
|
|
152
164
|
var _default = exports.default = DocumentViewer;
|
package/dist/components/Graph.js
CHANGED
|
@@ -57,6 +57,8 @@ class Graph {
|
|
|
57
57
|
if (root.action.actionType === 'route') {
|
|
58
58
|
root.action.window = this.config.isWindow;
|
|
59
59
|
root.action.graphId = this.config.id;
|
|
60
|
+
root.action.pinned = this.config.pinned;
|
|
61
|
+
root.action.defaultDisplayState = this.config.defaultDisplayState;
|
|
60
62
|
}
|
|
61
63
|
if (root.onStart) {
|
|
62
64
|
for (const action of root.onStart.actions) {
|
|
@@ -85,7 +85,6 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
|
|
|
85
85
|
},
|
|
86
86
|
loadData: (actionConfig, event) => {
|
|
87
87
|
if (actionConfig && actionConfig.value) {
|
|
88
|
-
console.log("\n\n\n\n\n HTML PANEL : ", actionConfig.value);
|
|
89
88
|
let data = _ApplicationManager.default.resolveExpressionValue(actionConfig.value, event?.data);
|
|
90
89
|
console.log("DATA : ", data);
|
|
91
90
|
let templateScript = Handlebars.compile(template);
|
package/dist/components/Icon.js
CHANGED
|
@@ -44,6 +44,10 @@ var _WarningRounded = _interopRequireDefault(require("@mui/icons-material/Warnin
|
|
|
44
44
|
var _Help = _interopRequireDefault(require("@mui/icons-material/Help"));
|
|
45
45
|
var _Link = _interopRequireDefault(require("@mui/icons-material/Link"));
|
|
46
46
|
var _Visibility = _interopRequireDefault(require("@mui/icons-material/Visibility"));
|
|
47
|
+
var _Done = _interopRequireDefault(require("@mui/icons-material/Done"));
|
|
48
|
+
var _Phone = _interopRequireDefault(require("@mui/icons-material/Phone"));
|
|
49
|
+
var _Cancel = _interopRequireDefault(require("@mui/icons-material/Cancel"));
|
|
50
|
+
var _colors = require("@mui/material/colors");
|
|
47
51
|
var _iconsMaterial = require("@mui/icons-material");
|
|
48
52
|
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); }
|
|
49
53
|
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; }
|
|
@@ -239,6 +243,24 @@ class Icon extends _react.Component {
|
|
|
239
243
|
color: this.props.color
|
|
240
244
|
}
|
|
241
245
|
});
|
|
246
|
+
} else if (this.props.id === 'DONE') {
|
|
247
|
+
return /*#__PURE__*/_react.default.createElement(_Done.default, {
|
|
248
|
+
style: {
|
|
249
|
+
color: '#2e7d32'
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
} else if (this.props.id === 'CANCEL') {
|
|
253
|
+
return /*#__PURE__*/_react.default.createElement(_Close.default, {
|
|
254
|
+
sx: {
|
|
255
|
+
color: _colors.red[500]
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
} else if (this.props.id === 'PHONE') {
|
|
259
|
+
return /*#__PURE__*/_react.default.createElement(_Phone.default, {
|
|
260
|
+
style: {
|
|
261
|
+
color: '#2e7d32'
|
|
262
|
+
}
|
|
263
|
+
});
|
|
242
264
|
}
|
|
243
265
|
return null;
|
|
244
266
|
}
|
|
@@ -19,7 +19,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
19
|
|
|
20
20
|
const LottieIcon = props => {
|
|
21
21
|
if (props.id === 'waiting-sm') {
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_reactLottie.default, {
|
|
23
23
|
options: {
|
|
24
24
|
loop: true,
|
|
25
25
|
autoplay: true,
|
|
@@ -30,27 +30,27 @@ const LottieIcon = props => {
|
|
|
30
30
|
},
|
|
31
31
|
height: 80,
|
|
32
32
|
width: 80
|
|
33
|
-
})
|
|
33
|
+
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/*if (props.id === 'call-loading') {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
return (
|
|
38
|
+
<div>
|
|
39
|
+
<Lottie
|
|
40
|
+
options={{
|
|
41
|
+
loop: true,
|
|
42
|
+
autoplay: true,
|
|
43
|
+
animationData: callLoading,
|
|
44
|
+
rendererSettings: {
|
|
45
|
+
preserveAspectRatio: "xMidYMid slice"
|
|
46
|
+
}
|
|
47
|
+
}}
|
|
48
|
+
height={40}
|
|
49
|
+
width={40}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}*/
|
|
54
54
|
|
|
55
55
|
if (props.id === 'waiting') {
|
|
56
56
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactLottie.default, {
|
|
@@ -11,6 +11,7 @@ var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
|
11
11
|
var _VCEventManager = _interopRequireDefault(require("./media/VCEventManager"));
|
|
12
12
|
var _Event = _interopRequireDefault(require("../event/Event"));
|
|
13
13
|
var _VCEventType = require("./media/VCEventType");
|
|
14
|
+
var _Observable = _interopRequireDefault(require("../event/Observable"));
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
class SocketManager {
|
|
16
17
|
constructor() {
|
|
@@ -62,6 +63,8 @@ class SocketManager {
|
|
|
62
63
|
socket: this.socket,
|
|
63
64
|
payload: payload
|
|
64
65
|
});
|
|
66
|
+
let event = new _Event.default(_ApplicationManager.default, 'SYSTEM_EVENT', payload);
|
|
67
|
+
_Observable.default.fireEvent(value, event);
|
|
65
68
|
}
|
|
66
69
|
});
|
|
67
70
|
}
|
|
@@ -120,6 +123,7 @@ class SocketManager {
|
|
|
120
123
|
meetingId: meetingId
|
|
121
124
|
}).catch(error => {});
|
|
122
125
|
}
|
|
126
|
+
_ApplicationManager.default.setHasActiveMeeting(false);
|
|
123
127
|
};
|
|
124
128
|
endSession = meetingId => {
|
|
125
129
|
if (this.socket) {
|
|
@@ -133,6 +137,7 @@ class SocketManager {
|
|
|
133
137
|
}).catch(error => {});
|
|
134
138
|
}).catch(error => {});
|
|
135
139
|
}
|
|
140
|
+
_ApplicationManager.default.setHasActiveMeeting(false);
|
|
136
141
|
};
|
|
137
142
|
createEvent() {
|
|
138
143
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
9
|
+
var _Observable = _interopRequireDefault(require("../event/Observable"));
|
|
10
|
+
var _Event = _interopRequireDefault(require("../event/Event"));
|
|
11
|
+
var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
12
|
+
var _LottieIcon = _interopRequireDefault(require("./LottieIcon"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const Spinner = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
15
|
+
const [visible, setVisible] = _react.default.useState(true);
|
|
16
|
+
_react.default.useEffect(() => {
|
|
17
|
+
props.handle.api = api();
|
|
18
|
+
});
|
|
19
|
+
_react.default.useEffect(() => {
|
|
20
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
21
|
+
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
22
|
+
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
23
|
+
props.handle.api.refresh();
|
|
24
|
+
return () => {
|
|
25
|
+
_Observable.default.clearComponentEventListeners(props.handle);
|
|
26
|
+
};
|
|
27
|
+
}, []);
|
|
28
|
+
const api = () => {
|
|
29
|
+
return {
|
|
30
|
+
get id() {
|
|
31
|
+
return props.config.id;
|
|
32
|
+
},
|
|
33
|
+
loadData: (actionConfig, event) => {},
|
|
34
|
+
refresh() {
|
|
35
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
36
|
+
if (!_Utils.default.isNull(props.config) && !_Utils.default.isNull(parsedConfig.visible)) {
|
|
37
|
+
setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
|
|
38
|
+
} else {
|
|
39
|
+
setVisible(true);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
getChildren: () => {
|
|
43
|
+
return [];
|
|
44
|
+
},
|
|
45
|
+
set visible(visible) {
|
|
46
|
+
setVisible(visible);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
return visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
style: _Utils.default.mergeStyles({}, props.config)
|
|
52
|
+
}, !_Utils.default.isNull(props.config) ? /*#__PURE__*/_react.default.createElement(_LottieIcon.default, {
|
|
53
|
+
id: props.config.icon
|
|
54
|
+
}) : null);
|
|
55
|
+
}));
|
|
56
|
+
var _default = exports.default = Spinner;
|