@agilemotion/oui-react-js 1.8.69 → 1.8.71

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/Utils.js CHANGED
@@ -326,6 +326,12 @@ class Utils {
326
326
  }
327
327
  return current[keys[keys.length - 1]];
328
328
  }
329
+ static stripHtml(html) {
330
+ if (!html) return '';
331
+ const temp = document.createElement('div');
332
+ temp.innerHTML = html;
333
+ return temp.textContent.replace(/\s+/g, ' ').trim();
334
+ }
329
335
  }
330
336
  exports.default = Utils;
331
337
  _Utils = Utils;
@@ -9,6 +9,8 @@ var _Utils = _interopRequireDefault(require("../Utils"));
9
9
  var _Alert = _interopRequireDefault(require("react-bootstrap/Alert"));
10
10
  var _EventType = _interopRequireDefault(require("../event/EventType"));
11
11
  var _Observable = _interopRequireDefault(require("../event/Observable"));
12
+ var _OverlayTrigger = _interopRequireDefault(require("react-bootstrap/OverlayTrigger"));
13
+ var _Tooltip = _interopRequireDefault(require("react-bootstrap/Tooltip"));
12
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
15
  const AlertBar = /*#__PURE__*/_react.default.memo(props => {
14
16
  const [message, setMessage] = _react.default.useState(props.config.message);
@@ -77,8 +79,14 @@ const AlertBar = /*#__PURE__*/_react.default.memo(props => {
77
79
  width: '100%'
78
80
  }
79
81
  }, /*#__PURE__*/_react.default.createElement("p", {
82
+ title: message,
80
83
  style: {
81
- color: 'rgba(255, 255, 255, 0.8)'
84
+ color: 'rgba(255, 255, 255, 0.8)',
85
+ overflow: 'hidden',
86
+ textOverflow: 'ellipsis',
87
+ whiteSpace: 'nowrap',
88
+ maxWidth: 'calc(100% - 32px)',
89
+ margin: 0
82
90
  }
83
91
  }, message))) : null;
84
92
  });
@@ -42,11 +42,14 @@ const TabPage = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.for
42
42
  let componentKey = 0;
43
43
  return /*#__PURE__*/_react.default.createElement("div", {
44
44
  style: _Utils.default.mergeStyles({
45
- width: "100%"
45
+ width: "100%",
46
+ height: '100%',
47
+ borderRadius: '4px',
48
+ padding: '8px'
46
49
  }, props.config)
47
50
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({
48
51
  component: "div",
49
- className: "w-100",
52
+ className: "w-100 h-100",
50
53
  role: "tabpanel",
51
54
  hidden: value !== index,
52
55
  id: "simple-tabpanel-".concat(index),
@@ -56,7 +59,8 @@ const TabPage = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.for
56
59
  className: classes.formTabPanel,
57
60
  style: {
58
61
  margin: 0,
59
- padding: 0
62
+ padding: 0,
63
+ height: '100%'
60
64
  }
61
65
  }, children)));
62
66
  }));
@@ -105,9 +105,6 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
105
105
  }
106
106
  function renderPage(page, pageIndex) {
107
107
  return /*#__PURE__*/_react.default.createElement("div", {
108
- style: {
109
- margin: '16px'
110
- },
111
108
  className: 'tab-page-container'
112
109
  }, page.components.map((component, index) => {
113
110
  return renderTabPageComponent(component, page.id, pageIndex + index);
@@ -150,16 +147,18 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
150
147
  };
151
148
  };
152
149
  return !_Utils.default.isNull(visibleTabPages) && /*#__PURE__*/_react.default.createElement("div", {
153
- style: _Utils.default.mergeStyles({
154
- width: '100%'
155
- }, props.config)
150
+ style: {
151
+ width: '100%',
152
+ height: '100%',
153
+ borderBottom: '1px solid #d1d1d1'
154
+ }
156
155
  }, /*#__PURE__*/_react.default.createElement(_AppBar.default, {
157
156
  position: "static",
158
157
  color: "default",
159
158
  style: {
160
159
  background: 'transparent',
161
160
  boxShadow: 'none',
162
- borderBottom: '1px solid #d1d1d1'
161
+ borderBottom: '1px solid #e1e1e1'
163
162
  }
164
163
  }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
165
164
  value: tabValue,
@@ -186,6 +185,7 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
186
185
  }, a11yProps(index), {
187
186
  sx: {
188
187
  maxWidth: 240,
188
+ height: '100%',
189
189
  // constrain so wrapping can occur
190
190
  whiteSpace: 'normal',
191
191
  // allow wrap
@@ -195,13 +195,23 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
195
195
  // keep original casing
196
196
  color: _ApplicationManager.default.isFormMarkersEnabled() && errors !== null && errors[page.id] === true ? '#ed5249' : undefined
197
197
  }
198
- }))))), visibleTabPages.map((page, index) => {
199
- return /*#__PURE__*/_react.default.createElement(_TabPage.default, {
198
+ }))))), /*#__PURE__*/_react.default.createElement("div", {
199
+ style: _Utils.default.mergeStyles({
200
+ width: '100%',
201
+ height: 'calc(100% - 64px)'
202
+ }, props.config)
203
+ }, visibleTabPages.map((page, index) => {
204
+ return /*#__PURE__*/_react.default.createElement("div", {
205
+ style: {
206
+ height: '100%',
207
+ display: tabValue === index ? null : 'none'
208
+ }
209
+ }, /*#__PURE__*/_react.default.createElement(_TabPage.default, {
200
210
  value: tabValue,
201
211
  key: index,
202
212
  index: index,
203
213
  config: page
204
- }, renderPage(page, index));
205
- }));
214
+ }, renderPage(page, index)));
215
+ })));
206
216
  }));
207
217
  var _default = exports.default = TabPanel;
@@ -57,13 +57,10 @@ const TitleBar = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
57
57
  return /*#__PURE__*/_react.default.createElement("div", {
58
58
  className: 'title-bar'
59
59
  }, /*#__PURE__*/_react.default.createElement("div", {
60
- style: {
61
- padding: '4px 0 4px 0',
62
- fontSize: '24px',
63
- color: '#202124'
64
- }
60
+ className: "title-bar-content",
61
+ title: _Utils.default.stripHtml(title)
65
62
  }, /*#__PURE__*/_react.default.createElement(_reactHtmlRenderer.default, {
66
- html: "<p>".concat(title, "</p>")
63
+ html: title
67
64
  })));
68
65
  }));
69
66
  var _default = exports.default = TitleBar;
@@ -119,6 +119,8 @@ const Toolbar = props => {
119
119
  setConfig(props.tableRow ? _objectSpread(_objectSpread({}, props.config), {}, {
120
120
  id: props.config.id + '_' + ((_props$tableRow$id = props.tableRow.id) === null || _props$tableRow$id === void 0 ? void 0 : _props$tableRow$id.replaceAll('-', ''))
121
121
  }) : props.config);
122
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
123
+ setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id, true));
122
124
  }, []);
123
125
  function createButtonItemHandle(id) {
124
126
  var _props$tableRow$id2;
@@ -14,7 +14,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
14
14
  const SelectItemComponent = props => {
15
15
  var _props$config$attribu, _props$config$attribu2, _props$config$attribu3, _props$config$attribu4;
16
16
  const base = props.base;
17
- const [optionsLoaded, setOptionsLoaded] = _react.default.useState(false);
17
+ const optionsLoaded = _react.default.useRef(false);
18
18
  const [loadFullOptionList, setLoadFullOptionList] = _react.default.useState(false);
19
19
  const [value, setValue] = _react.default.useState(_Utils.default.isNull(props.value) ? '' : props.value.id);
20
20
  const initialValue = _react.default.useRef(null);
@@ -26,7 +26,7 @@ const SelectItemComponent = props => {
26
26
  let defaultOptions = [];
27
27
  defaultOptions.push(newValue);
28
28
  base.setSelectOptions(defaultOptions);
29
- setOptionsLoaded(true);
29
+ optionsLoaded.current = true;
30
30
  console.log("DEFAULT SETTINGS SET");
31
31
  }
32
32
  if (_Utils.default.isNull(initialValue.current) && !_Utils.default.isNull(newValue)) {
@@ -35,11 +35,12 @@ const SelectItemComponent = props => {
35
35
  setValue(newValue ? newValue.id : '');
36
36
  }
37
37
  _react.default.useEffect(() => {
38
- processValueChange(base.value, optionsLoaded);
38
+ processValueChange(base.value, optionsLoaded.current);
39
39
  }, [base.value]);
40
40
  _react.default.useEffect(() => {
41
- initialValue.current = null;
42
- processValueChange(base.valueObject[base.valueProperty], false);
41
+ if (!initialValue.current) {
42
+ processValueChange(base.valueObject[base.valueProperty], optionsLoaded.current);
43
+ }
43
44
  }, [base.valueObject[base.valueProperty]]);
44
45
  _react.default.useEffect(() => {
45
46
  if (!_Utils.default.isNull(base.selectOptions) && base.selectOptions.length > 0) {
@@ -75,7 +76,7 @@ const SelectItemComponent = props => {
75
76
  _Utils.default.publishErrorMessage(e, props.viewId);
76
77
  }
77
78
  });
78
- setOptionsLoaded(true);
79
+ optionsLoaded.current = true;
79
80
  }
80
81
  }, [loadFullOptionList, props.refreshData]);
81
82
  return /*#__PURE__*/_react.default.createElement(_material.FormControl, {
@@ -1,8 +1,8 @@
1
1
  .parent-layout {
2
2
  overflow: hidden;
3
- block-size: 100dvh;
4
3
  display: flex;
5
4
  flex-direction: column;
6
- height: auto !important;
7
- padding: 16px !important;
5
+ height: 100% !important;
6
+ width: 100% !important;
7
+ padding: 8px 0 0 0 !important;
8
8
  }
@@ -1,4 +1,4 @@
1
- :root { --header-h: 72px; --view-header-h: 112px; --view-header-min: 112px}
1
+ :root { --header-h: 72px; --view-header-h: 104px; --view-header-min: 104px}
2
2
 
3
3
  .view {
4
4
  padding: 16px 8px 16px 32px;
@@ -31,12 +31,48 @@
31
31
  font-weight: bold;
32
32
  }
33
33
 
34
+ .title-bar {
35
+ height: 36px;
36
+ display: flex;
37
+ align-items: center;
38
+ }
39
+
40
+ .title-bar-content {
41
+ font-size: 24px;
42
+ color: #202124;
43
+
44
+ overflow: hidden;
45
+ white-space: nowrap;
46
+ text-overflow: ellipsis;
47
+
48
+ width: 100%;
49
+ }
50
+
51
+ .title-bar-content p {
52
+ display: inline;
53
+ margin: 0;
54
+ padding: 0;
55
+ }
56
+
57
+ .default-oui-layout {
58
+ min-height: 0;
59
+ }
60
+
34
61
  .view .sticky-header {
35
- position: sticky; top: 0; z-index: 1;
36
- box-sizing: border-box;
37
- block-size: auto; /* allow both grow & shrink */
38
- min-block-size: var(--view-header-min); /* constant floor only */
39
- overflow: visible;
62
+ position: sticky;
63
+ top: 0;
64
+ z-index: 10;
65
+
66
+ height: var(--view-header-h);
67
+ min-height: var(--view-header-h);
68
+ max-height: var(--view-header-h);
69
+
70
+ overflow: hidden !important;
71
+ background: #fff;
72
+
73
+ display: flex;
74
+ flex-direction: column;
75
+ justify-content: flex-end; /* pushes content to the bottom */
40
76
  }
41
77
 
42
78
  .view .scrolling-body {
@@ -74,6 +110,10 @@
74
110
  .max-h-40 {
75
111
  }
76
112
 
113
+ .tab-page-container {
114
+ height: 100%;
115
+ }
116
+
77
117
  /* 150% zoom res */
78
118
  @media (max-width: 1512px) and (max-height: 982px) and (min-resolution: 2dppx) {
79
119
  .max-h-40 {
@@ -17,7 +17,7 @@ class ProcurementMeetings {
17
17
  _defineProperty(this, "emitSocketEvent", (viewId, systemEventType, data, meeting) => {
18
18
  return new Promise((resolve, reject) => {
19
19
  let recipientIds = [];
20
- if (meeting) {
20
+ if (meeting && meeting.attendees) {
21
21
  for (const attendee of meeting.attendees) {
22
22
  let username = attendee.username;
23
23
  if (username !== _ApplicationManager.default.getUserDetails().username) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemotion/oui-react-js",
3
- "version": "1.8.69",
3
+ "version": "1.8.71",
4
4
  "description": "AgileMotion React UI Component Library - A comprehensive collection of dashboard components, forms, media controls, and more",
5
5
  "license": "ISC",
6
6
  "author": "",