@agilemotion/oui-react-js 1.8.39 → 1.8.41

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.
@@ -299,12 +299,15 @@ class ApplicationManager {
299
299
  cachedFile.content = file.content;
300
300
  }
301
301
  };
302
- updateContext = values => {
303
- _Observable.default.emitContextChangeEvent(applicationContext, values);
302
+ updateContext = (() => function (values) {
303
+ let publish = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
304
+ if (publish) {
305
+ _Observable.default.emitContextChangeEvent(applicationContext, values);
306
+ }
304
307
  Object.keys(values).forEach(key => {
305
308
  applicationContext[key] = values[key];
306
309
  });
307
- };
310
+ })();
308
311
 
309
312
  /**
310
313
  * add view configuration
package/dist/Utils.js CHANGED
@@ -149,6 +149,9 @@ class Utils {
149
149
  static getFieldColspan = field => {
150
150
  return !Utils.isNull(field.attributes) && !Utils.isNull(field.attributes['colspan']) ? parseInt(typeof field.attributes.colspan === 'string' ? _DynamicJS.default.executeScript("__colspan_" + field.id, field.attributes.colspan) : field.attributes.colspan) : 1;
151
151
  };
152
+ static prop = value => {
153
+ return _ApplicationManager.default.isExpression(value) ? _DynamicJS.default.executeScript("readProp_" + Math.random(), value, null, true, null, null, false) : value;
154
+ };
152
155
  static createRow = () => {
153
156
  let row = {};
154
157
  row.fields = [];
@@ -1,3 +1,4 @@
1
1
  .oui button {
2
- margin-right: 4px !important;
2
+ margin-right: 4px !important;
3
+ height: 40px;
3
4
  }
@@ -90,6 +90,7 @@ const Button = props => {
90
90
  refresh() {
91
91
  let parsedConfig = _Utils.default.parseConfig(config ? config : props.config, props.viewId);
92
92
  setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id));
93
+ console.log("\n\n\n\nVISIBILITY CHECK [" + props.config.id + "] - [" + parsedConfig.visible + "] - [" + _Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id) + "]");
93
94
  setVisible(_Utils.default.isNull(parsedConfig.visible) || _Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
94
95
  }
95
96
  };
@@ -40,11 +40,12 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
40
40
  }
41
41
  }, []);
42
42
  function doLoadData(actionConfig) {
43
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
43
44
  if (!_Utils.default.isNull(actionConfig) && !_Utils.default.isNull(actionConfig.value)) {
44
45
  let value = _ApplicationManager.default.isExpression(actionConfig.value) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.value) : actionConfig.value;
45
46
  // TODO : set value
46
47
  } else {
47
- let service = !_Utils.default.isNull(props.config.dataService) ? props.config.dataService : actionConfig !== null ? actionConfig.dataService : null;
48
+ let service = !_Utils.default.isNull(parsedConfig.dataService) ? parsedConfig.dataService : actionConfig !== null ? actionConfig.dataService : null;
48
49
  if (!_Utils.default.isNull(service)) {
49
50
  if (service.type === 'rpc') {
50
51
  (0, _RestService.invokeRpc)({
@@ -66,7 +67,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
66
67
  file.base64 = data.url.replace('data:application/pdf;base64,', '').replace('data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,', '');
67
68
  }
68
69
  file.name = data.name;
69
- file.type = props.config.fileType;
70
+ file.type = _Utils.default.prop(parsedConfig.fileType);
70
71
  setValue(file);
71
72
  setHasLoadingError(false);
72
73
  setLoading(false);
@@ -128,10 +129,10 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
128
129
  return visible && /*#__PURE__*/_react.default.createElement("div", {
129
130
  style: _Utils.default.mergeStyles({}, props.config)
130
131
  }, props.config.attributes?.label && /*#__PURE__*/_react.default.createElement("div", {
131
- style: _Utils.default.mergeObjects(props.config.attributes?.labelStyle, {
132
+ style: _Utils.default.mergeObjects({
132
133
  fontSize: '20px',
133
134
  color: '#1d253b'
134
- })
135
+ }, props.config.attributes?.labelStyle)
135
136
  }, label), loading && /*#__PURE__*/_react.default.createElement("div", {
136
137
  style: {
137
138
  marginTop: '16px'
@@ -141,10 +142,10 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
141
142
  marginTop: '16px',
142
143
  color: 'red'
143
144
  }
144
- }, "Error loading document"), !loading && !hasLoadingError && props.config.fileType === 'application/pdf' && !_Utils.default.isNull(value) && /*#__PURE__*/_react.default.createElement(_PDFViewer.default, {
145
+ }, "Error loading document"), !loading && !hasLoadingError && _Utils.default.prop(parsedConfig.fileType) === 'application/pdf' && !_Utils.default.isNull(value) && /*#__PURE__*/_react.default.createElement(_PDFViewer.default, {
145
146
  file: value,
146
147
  onDocumentLoadSuccess: () => {}
147
- }), !loading && !hasLoadingError && props.config.fileType === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' && (!_Utils.default.isNull(value) || props.config.enableUpload) && /*#__PURE__*/_react.default.createElement(_WordDocumentViewer.default, {
148
+ }), !loading && !hasLoadingError && _Utils.default.prop(parsedConfig.fileType) === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' && (!_Utils.default.isNull(value) || props.config.enableUpload) && /*#__PURE__*/_react.default.createElement(_WordDocumentViewer.default, {
148
149
  file: value,
149
150
  onDocumentLoadSuccess: () => {},
150
151
  valueHandler: wordEditorValueHandler,
@@ -160,7 +160,7 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
160
160
  }
161
161
  }, /*#__PURE__*/_react.default.createElement(_DialogTitle.default, {
162
162
  id: "alert-dialog-title"
163
- }, !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes['pickerLabel']) ? props.config.attributes['pickerLabel'] : props.config.attributes['label']), /*#__PURE__*/_react.default.createElement("div", {
163
+ }, !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes?.pickerLabel) ? props.config.attributes?.pickerLabel : props.config.attributes?.label), /*#__PURE__*/_react.default.createElement("div", {
164
164
  style: {
165
165
  maxHeight: "calc(38vh - 52px)",
166
166
  overflow: "auto",
@@ -1,9 +1,9 @@
1
- .coll-panel-container {
2
- font-family: sans-serif;
3
- text-align: center;
4
- }
5
-
6
- .coll-panel-btn:focus {
7
- outline: 0;
8
- box-shadow: none;
9
- }
1
+ .coll-panel-container {
2
+ font-family: sans-serif;
3
+ text-align: center;
4
+ }
5
+
6
+ .coll-panel-btn:focus {
7
+ outline: 0;
8
+ box-shadow: none;
9
+ }
@@ -1,125 +1,125 @@
1
- .view {
2
- padding: 0 32px;
3
- background-color: #ffffff;
4
- border-radius: 4px;
5
- }
6
-
7
- .window-unpinned .view {
8
- width: 0 !important;;
9
- }
10
-
11
- .window-pinned .view {
12
- padding: 0 8px;
13
- }
14
-
15
- .no-margin {
16
- margin-left: 0 !important;
17
- margin-right: 0 !important;
18
- }
19
-
20
- .no-padding {
21
- padding-left: 0 !important;
22
- padding-right: 0 !important;
23
- }
24
-
25
- .centered-flex-box {
26
- display: flex;
27
- align-Items: center;
28
- justify-content: center
29
- }
30
-
31
- .max-h-40 {
32
- }
33
-
34
- /* 150% zoom res */
35
- @media (max-width: 1512px) and (max-height: 982px) and (min-resolution: 2dppx) {
36
- .max-h-40 {
37
- max-height: 150px !important;
38
- }
39
-
40
- .flex-nowrap {
41
- flex-wrap: wrap !important;
42
- }
43
-
44
- .flex-child-nowrap {
45
- width: 100% !important;
46
- }
47
-
48
- .view {
49
- padding: 0 8px !important;
50
- }
51
-
52
- .grid-table-pagination div {
53
- font-size: 12px;
54
- }
55
-
56
- .grid-table-pagination p {
57
- overflow: hidden;
58
- text-overflow: ellipsis;
59
- white-space: nowrap;
60
- max-width: 12px;
61
- font-size: 12px;
62
- margin-top: 4px;
63
- }
64
-
65
- .tab-page-container {
66
- margin: 0;
67
- }
68
-
69
- .default-oui-layout {
70
- margin: 8px;
71
- padding: 0 !important;
72
- }
73
-
74
- .defaultForm {
75
- margin: 0;
76
- }
77
-
78
- .oui-form-item {
79
- min-width: 232px !important;
80
- }
81
-
82
- .oui-form-item-container {
83
- min-width: 240px !important;
84
- margin: 0 4px;
85
- }
86
- }
87
-
88
- /* Smartphones (landscape); */
89
- @media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
90
- .view {
91
- padding: 0 16px;
92
- }
93
- }
94
-
95
- /* Smartphones (portrait); */
96
- @media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
97
- .view {
98
- padding: 0 16px;
99
- }
100
- }
101
-
102
- /* iPads (portrait and landscape); */
103
- @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
104
- .view {
105
- padding: 0 24px;
106
- }
107
- }
108
-
109
- /* iPad 3 */
110
- @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
111
- .view {
112
- padding: 0 24px;
113
- }
114
- }
115
-
116
- /* small desktop screens */
117
- @media only screen and (max-width : 600px) {
118
- }
119
-
120
- /* low resolution desktop */
121
- @media only screen and (max-width : 1200px) {
122
- .view {
123
-
124
- }
125
- }
1
+ .view {
2
+ padding: 0 32px;
3
+ background-color: #ffffff;
4
+ border-radius: 4px;
5
+ }
6
+
7
+ .window-unpinned .view {
8
+ width: 0 !important;;
9
+ }
10
+
11
+ .window-pinned .view {
12
+ padding: 0 8px;
13
+ }
14
+
15
+ .no-margin {
16
+ margin-left: 0 !important;
17
+ margin-right: 0 !important;
18
+ }
19
+
20
+ .no-padding {
21
+ padding-left: 0 !important;
22
+ padding-right: 0 !important;
23
+ }
24
+
25
+ .centered-flex-box {
26
+ display: flex;
27
+ align-Items: center;
28
+ justify-content: center
29
+ }
30
+
31
+ .max-h-40 {
32
+ }
33
+
34
+ /* 150% zoom res */
35
+ @media (max-width: 1512px) and (max-height: 982px) and (min-resolution: 2dppx) {
36
+ .max-h-40 {
37
+ max-height: 150px !important;
38
+ }
39
+
40
+ .flex-nowrap {
41
+ flex-wrap: wrap !important;
42
+ }
43
+
44
+ .flex-child-nowrap {
45
+ width: 100% !important;
46
+ }
47
+
48
+ .view {
49
+ padding: 0 8px !important;
50
+ }
51
+
52
+ .grid-table-pagination div {
53
+ font-size: 12px;
54
+ }
55
+
56
+ .grid-table-pagination p {
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ white-space: nowrap;
60
+ max-width: 12px;
61
+ font-size: 12px;
62
+ margin-top: 4px;
63
+ }
64
+
65
+ .tab-page-container {
66
+ margin: 0;
67
+ }
68
+
69
+ .default-oui-layout {
70
+ margin: 8px;
71
+ padding: 0 !important;
72
+ }
73
+
74
+ .defaultForm {
75
+ margin: 0;
76
+ }
77
+
78
+ .oui-form-item {
79
+ min-width: 232px !important;
80
+ }
81
+
82
+ .oui-form-item-container {
83
+ min-width: 240px !important;
84
+ margin: 0 4px;
85
+ }
86
+ }
87
+
88
+ /* Smartphones (landscape); */
89
+ @media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
90
+ .view {
91
+ padding: 0 16px;
92
+ }
93
+ }
94
+
95
+ /* Smartphones (portrait); */
96
+ @media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
97
+ .view {
98
+ padding: 0 16px;
99
+ }
100
+ }
101
+
102
+ /* iPads (portrait and landscape); */
103
+ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
104
+ .view {
105
+ padding: 0 24px;
106
+ }
107
+ }
108
+
109
+ /* iPad 3 */
110
+ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
111
+ .view {
112
+ padding: 0 24px;
113
+ }
114
+ }
115
+
116
+ /* small desktop screens */
117
+ @media only screen and (max-width : 600px) {
118
+ }
119
+
120
+ /* low resolution desktop */
121
+ @media only screen and (max-width : 1200px) {
122
+ .view {
123
+
124
+ }
125
+ }
@@ -41,19 +41,19 @@ const PaperComponent = props => {
41
41
  bottom: bottom
42
42
  });
43
43
  };
44
- return /*#__PURE__*/_react.default.createElement(_reactDraggable.default, {
45
- disabled: props.disabled,
46
- bounds: bounds,
47
- onStart: handleStart,
48
- handle: "#meeting-window-header",
49
- cancel: '[class*="MuiDialogContent-root"]',
50
- nodeRef: nodeRef
51
- }, /*#__PURE__*/_react.default.createElement(_Paper.default, _extends({}, props, {
52
- ref: nodeRef,
53
- style: {
54
- minWidth: '320px'
55
- }
56
- })));
44
+ return /*#__PURE__*/_react.default.createElement(_Paper.default, _extends({}, props, {
45
+ ref: nodeRef
46
+ }))
47
+ /*<Draggable
48
+ disabled={props.disabled}
49
+ bounds={bounds}
50
+ onStart={handleStart}
51
+ handle="#meeting-window-header"
52
+ cancel={'[class*="MuiDialogContent-root"]'}
53
+ nodeRef={nodeRef}
54
+ >
55
+ <Paper {...props} ref={nodeRef} style={{minWidth: '320px'}}/>
56
+ </Draggable>*/;
57
57
  };
58
58
  const Window = props => {
59
59
  const {
@@ -148,14 +148,18 @@ const Window = props => {
148
148
  paper.style.left = 'unset';
149
149
  paper.style.right = '0';
150
150
  paper.style.position = 'absolute';
151
- paper.style.top = '72px';
151
+ paper.style.top = '52px';
152
+ paper.style.margin = '32px 0';
153
+ paper.style.maxWidth = 'unset';
152
154
  let header = document.getElementsByClassName('dialogHeader')[0];
153
155
  header.getElementsByTagName('button')[0].style.color = '#000000';
154
- setDisplayState('PINNED');
156
+ if (displayState !== 'PINNED') {
157
+ setDisplayState('PINNED');
158
+ }
155
159
  if (updateContext) {
156
160
  _ApplicationManager.default.updateContext({
157
161
  windowDisplayState: 'PINNED'
158
- });
162
+ }, false);
159
163
  }
160
164
  props.onPinned();
161
165
  }
@@ -179,11 +183,13 @@ const Window = props => {
179
183
  let header = document.getElementsByClassName('dialogHeader')[0];
180
184
  header.getElementsByTagName('button')[0].style.color = '#000000';
181
185
  document.getElementById('meeting-window-header').style.cursor = 'move';
182
- setDisplayState('MINIMIZED');
186
+ if (displayState !== 'MINIMIZED') {
187
+ setDisplayState('MINIMIZED');
188
+ }
183
189
  if (updateContext) {
184
190
  _ApplicationManager.default.updateContext({
185
191
  windowDisplayState: 'MINIMIZED'
186
- });
192
+ }, false);
187
193
  }
188
194
  }
189
195
  }
@@ -203,7 +209,8 @@ const Window = props => {
203
209
  paper.style.boxShadow = 'unset';
204
210
  paper.style.transform = 'translate(0, 0)';
205
211
  paper.style.backgroundColor = '#FFFFFF';
206
- paper.style.width = 'calc(100% - ' + isNaN(getLeftOffset()) ? '344' : getLeftOffset() + 'px)';
212
+ paper.style.width = 'unset';
213
+ paper.style.maxWidth = 'unset';
207
214
  paper.style.height = 'calc(100% - 88px)';
208
215
  paper.style.margin = '8px';
209
216
  paper.style.right = '0';
@@ -213,11 +220,13 @@ const Window = props => {
213
220
  let header = document.getElementsByClassName('dialogHeader')[0];
214
221
  header.getElementsByTagName('button')[0].style.color = 'rgba(0, 0, 0, 0.54)';
215
222
  document.getElementById('meeting-window-header').style.cursor = 'default';
216
- setDisplayState('MAXIMIZED');
223
+ if (displayState !== 'MAXIMIZED') {
224
+ setDisplayState('MAXIMIZED');
225
+ }
217
226
  if (updateContext) {
218
227
  _ApplicationManager.default.updateContext({
219
228
  windowDisplayState: 'MAXIMIZED'
220
- });
229
+ }, false);
221
230
  }
222
231
  }
223
232
  };
@@ -234,7 +243,7 @@ const Window = props => {
234
243
  }, /*#__PURE__*/_react.default.createElement(_WindowDialog.default, {
235
244
  leftOffset: props.leftOffset,
236
245
  disableEnforceFocus: true,
237
- open: open,
246
+ open: true,
238
247
  onClose: e => {
239
248
  props.onClose();
240
249
  },
@@ -1,36 +1,36 @@
1
- .loaderModal {
2
- display: block; /* Hidden by default */
3
- position: fixed; /* Stay in place */
4
- z-index: 3000; /* Sit on top */
5
- left: 0;
6
- top: 0;
7
- width: 100vw; /* Full width */
8
- height: 100vh; /* Full height */
9
- overflow: hidden; /* Enable scroll if needed */
10
- background-color: rgb(0,0,0); /* Fallback color */
11
- background-color: rgba(0,0,0,0.1); /* Black w/ opacity */
12
- }
13
-
14
- /* Modal Content/Box */
15
- .modal-content {
16
- background-color: transparent;
17
- margin: 30% auto; /* 15% from the top and centered */
18
- padding: 20px;
19
- border: 1px solid #888;
20
- width: 10%; /* Could be more or less, depending on screen size */
21
- }
22
-
23
- /* The Close Button */
24
- .close {
25
- color: #aaa;
26
- float: right;
27
- font-size: 28px;
28
- font-weight: bold;
29
- }
30
-
31
- .close:hover,
32
- .close:focus {
33
- color: black;
34
- text-decoration: none;
35
- cursor: pointer;
36
- }
1
+ .loaderModal {
2
+ display: block; /* Hidden by default */
3
+ position: fixed; /* Stay in place */
4
+ z-index: 3000; /* Sit on top */
5
+ left: 0;
6
+ top: 0;
7
+ width: 100vw; /* Full width */
8
+ height: 100vh; /* Full height */
9
+ overflow: hidden; /* Enable scroll if needed */
10
+ background-color: rgb(0,0,0); /* Fallback color */
11
+ background-color: rgba(0,0,0,0.1); /* Black w/ opacity */
12
+ }
13
+
14
+ /* Modal Content/Box */
15
+ .modal-content {
16
+ background-color: transparent;
17
+ margin: 30% auto; /* 15% from the top and centered */
18
+ padding: 20px;
19
+ border: 1px solid #888;
20
+ width: 10%; /* Could be more or less, depending on screen size */
21
+ }
22
+
23
+ /* The Close Button */
24
+ .close {
25
+ color: #aaa;
26
+ float: right;
27
+ font-size: 28px;
28
+ font-weight: bold;
29
+ }
30
+
31
+ .close:hover,
32
+ .close:focus {
33
+ color: black;
34
+ text-decoration: none;
35
+ cursor: pointer;
36
+ }
@@ -35,7 +35,8 @@ const SideBarContent = props => {
35
35
  }) : /*#__PURE__*/_react.default.createElement(_ChatRoom.default, {
36
36
  chatTab: true,
37
37
  selectedChat: meetingChat,
38
- meetingId: meetingId
38
+ meetingId: meetingId,
39
+ isHost: isHost
39
40
  })));
40
41
  };
41
42
  var _default = exports.default = SideBarContent;
@@ -1,4 +1,4 @@
1
- .user-video {
2
- min-width: 280px;
3
- height: 280px;
4
- }
1
+ .user-video {
2
+ min-width: 280px;
3
+ height: 280px;
4
+ }
@@ -90,8 +90,9 @@ const ChatRoom = props => {
90
90
  let chatParticipant = selectedChat.participants.find(p => p.username === currentUser.username);
91
91
  const data = {
92
92
  pollId: poll.id,
93
- optionId: poll.selectedOption,
94
- chatParticipant: chatParticipant
93
+ optionId: poll.selectedOption || poll.tieBreakerOption,
94
+ chatParticipant: chatParticipant,
95
+ tieBreaker: !_Utils.default.isNull(poll.tieBreakerOption)
95
96
  };
96
97
  (0, _RestUtils.postData)(`${location + '/' + _ApplicationManager.default.getContextRoot()}/calendar/api/v1/poll/vote`, response => {
97
98
  fetchChat();
@@ -633,6 +634,7 @@ const ChatRoom = props => {
633
634
  return /*#__PURE__*/_react.default.createElement(_PollContainer.default, {
634
635
  poll: message.poll,
635
636
  chatTab: props.chatTab,
637
+ isHost: props.isHost,
636
638
  pollCreator: message.participant,
637
639
  createdDate: message.createdDate,
638
640
  submitPollVoteHandler: poll => submitPollVoteHandler(poll),