@agilemotion/oui-react-js 1.8.74 → 1.8.76
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 +10 -6
- package/dist/ViewContext.js +6 -4
- package/dist/components/DataGrid.js +7 -3
- package/dist/components/TabPanel.js +5 -5
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +26 -8
- package/dist/components/form/Form.js +4 -2
- package/dist/components/form/LookupField.js +0 -1
- package/dist/view/Dashboard.js +3 -6
- package/package.json +1 -1
|
@@ -212,15 +212,19 @@ class ApplicationManager {
|
|
|
212
212
|
});
|
|
213
213
|
_defineProperty(this, "getViewComponent", (view, id) => {
|
|
214
214
|
if (!_Utils.default.isNull(view) && !_Utils.default.isNull(view.handle) && !_Utils.default.isNull(view.handle.api)) {
|
|
215
|
+
var _view$handle;
|
|
215
216
|
if (id === view.handle.api.id) {
|
|
216
217
|
return view.handle.api;
|
|
217
218
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
219
|
+
if ((_view$handle = view.handle) !== null && _view$handle !== void 0 && (_view$handle = _view$handle.api) !== null && _view$handle !== void 0 && _view$handle.getChild) {
|
|
220
|
+
var _view$handle2;
|
|
221
|
+
let handle = (_view$handle2 = view.handle) === null || _view$handle2 === void 0 || (_view$handle2 = _view$handle2.api) === null || _view$handle2 === void 0 ? void 0 : _view$handle2.getChild(id);
|
|
222
|
+
if (handle) {
|
|
223
|
+
return handle.api;
|
|
224
|
+
}
|
|
225
|
+
if (id === 'view') {
|
|
226
|
+
return view.handle.api;
|
|
227
|
+
}
|
|
224
228
|
}
|
|
225
229
|
}
|
|
226
230
|
});
|
package/dist/ViewContext.js
CHANGED
|
@@ -33,10 +33,12 @@ class ViewContext {
|
|
|
33
33
|
}
|
|
34
34
|
let legendIconArrow = LEGEND_ARROW_ICON.replace('__COLOR__', this.props.secondaryColor);
|
|
35
35
|
let titleValue = '';
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
if (title) {
|
|
37
|
+
if (!title.match(_DynamicJS.TEMPLATE_REGEX)) {
|
|
38
|
+
titleValue = title;
|
|
39
|
+
} else {
|
|
40
|
+
titleValue = _DynamicJS.default.executeScript(viewId + 'Title', title, viewId);
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
for (const navHistoryElement of this.navHistory) {
|
|
42
44
|
if (navHistoryElement.viewId === viewId) {
|
|
@@ -237,6 +237,8 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
237
237
|
// TODO : dispose from observer
|
|
238
238
|
rowsRef.current = [];
|
|
239
239
|
setRows([]);
|
|
240
|
+
let event = new _Event.default(props.handle, props.viewId, getSelectedRows([]));
|
|
241
|
+
_Observable.default.fireEvent(_EventType.default.SELECTION_CHANGE, event);
|
|
240
242
|
},
|
|
241
243
|
addRows: newRows => {
|
|
242
244
|
for (const newRow of newRows) {
|
|
@@ -366,9 +368,11 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
366
368
|
}
|
|
367
369
|
}
|
|
368
370
|
function fireSelectionEvent() {
|
|
369
|
-
if (
|
|
370
|
-
|
|
371
|
-
|
|
371
|
+
if (selected.length > 0) {
|
|
372
|
+
if (!_Utils.default.isNull(config) && (!_Utils.default.isNull(headingHandle) || config.gridType === 'TILE')) {
|
|
373
|
+
let event = new _Event.default(props.handle, props.viewId, getSelectedRows(selected));
|
|
374
|
+
_Observable.default.fireEvent(_EventType.default.SELECTION_CHANGE, event);
|
|
375
|
+
}
|
|
372
376
|
}
|
|
373
377
|
}
|
|
374
378
|
function isRowGrabbable(row) {
|
|
@@ -28,6 +28,7 @@ function a11yProps(index) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
31
|
+
var _props$config, _props$config2, _props$config3, _props$config4;
|
|
31
32
|
const [tabValue, setTabValue] = _react.default.useState(0);
|
|
32
33
|
const [errors, setErrors] = _react.default.useState({});
|
|
33
34
|
const [visibleTabPages, setVisibleTabPages] = _react.default.useState(null);
|
|
@@ -70,7 +71,6 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
|
|
|
70
71
|
}
|
|
71
72
|
let parsedConfig = _Utils.default.parseConfig(page, props.viewId);
|
|
72
73
|
let visible = _Utils.default.isNull(parsedConfig.visible) || _Utils.default.evaluateBooleanExpression(parsedConfig.visible, page.id);
|
|
73
|
-
console.log("VISIBLE : " + page.id + " = " + visible + " - " + parsedConfig.visible);
|
|
74
74
|
if (visible) {
|
|
75
75
|
allVisibleTabPages.push(page);
|
|
76
76
|
}
|
|
@@ -148,9 +148,8 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
|
|
|
148
148
|
};
|
|
149
149
|
return !_Utils.default.isNull(visibleTabPages) && /*#__PURE__*/_react.default.createElement("div", {
|
|
150
150
|
style: {
|
|
151
|
-
width: '100%',
|
|
152
|
-
height: '100%'
|
|
153
|
-
borderBottom: '1px solid #d1d1d1'
|
|
151
|
+
width: (_props$config = props.config) !== null && _props$config !== void 0 && (_props$config = _props$config.attributes) !== null && _props$config !== void 0 && (_props$config = _props$config.style) !== null && _props$config !== void 0 && _props$config.width ? (_props$config2 = props.config) === null || _props$config2 === void 0 || (_props$config2 = _props$config2.attributes) === null || _props$config2 === void 0 || (_props$config2 = _props$config2.style) === null || _props$config2 === void 0 ? void 0 : _props$config2.width : '100%',
|
|
152
|
+
height: (_props$config3 = props.config) !== null && _props$config3 !== void 0 && (_props$config3 = _props$config3.attributes) !== null && _props$config3 !== void 0 && (_props$config3 = _props$config3.style) !== null && _props$config3 !== void 0 && _props$config3.height ? (_props$config4 = props.config) === null || _props$config4 === void 0 || (_props$config4 = _props$config4.attributes) === null || _props$config4 === void 0 || (_props$config4 = _props$config4.style) === null || _props$config4 === void 0 ? void 0 : _props$config4.height : '100%'
|
|
154
153
|
}
|
|
155
154
|
}, /*#__PURE__*/_react.default.createElement(_AppBar.default, {
|
|
156
155
|
position: "static",
|
|
@@ -201,9 +200,10 @@ const TabPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.fo
|
|
|
201
200
|
height: 'calc(100% - 64px)'
|
|
202
201
|
}, props.config)
|
|
203
202
|
}, visibleTabPages.map((page, index) => {
|
|
203
|
+
var _page$attributes, _page$attributes2;
|
|
204
204
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
205
205
|
style: {
|
|
206
|
-
height: '100%',
|
|
206
|
+
height: page !== null && page !== void 0 && (_page$attributes = page.attributes) !== null && _page$attributes !== void 0 && (_page$attributes = _page$attributes.style) !== null && _page$attributes !== void 0 && _page$attributes.height ? page === null || page === void 0 || (_page$attributes2 = page.attributes) === null || _page$attributes2 === void 0 || (_page$attributes2 = _page$attributes2.style) === null || _page$attributes2 === void 0 ? void 0 : _page$attributes2.height : '100%',
|
|
207
207
|
display: tabValue === index ? null : 'none'
|
|
208
208
|
}
|
|
209
209
|
}, /*#__PURE__*/_react.default.createElement(_TabPage.default, {
|
|
@@ -12,6 +12,7 @@ var _material = require("@mui/material");
|
|
|
12
12
|
var _RestUtils = require("../../../../../RestUtils");
|
|
13
13
|
require("./FoldingTabSidebar.css");
|
|
14
14
|
var _CardAvatar = _interopRequireDefault(require("../../../../card/CardAvatar"));
|
|
15
|
+
var _MoreHoriz = _interopRequireDefault(require("@mui/icons-material/MoreHoriz"));
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -129,6 +130,18 @@ function FoldingTabSidebar(props) {
|
|
|
129
130
|
});
|
|
130
131
|
const activeRoute = routeName => activeRouteMenu.id === routeName;
|
|
131
132
|
const getLiClassName = prop => 'li-' + prop.level;
|
|
133
|
+
const fallbackIcon = prop => {
|
|
134
|
+
var _prop$name;
|
|
135
|
+
if (prop.icon) return iconNode;
|
|
136
|
+
if (prop.level === 0) {
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement(_MoreHoriz.default, {
|
|
138
|
+
fontSize: "small"
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
142
|
+
className: "mini-avatar"
|
|
143
|
+
}, ((_prop$name = prop.name) === null || _prop$name === void 0 ? void 0 : _prop$name.charAt(0)) + '...');
|
|
144
|
+
};
|
|
132
145
|
|
|
133
146
|
/* ----------------- createLinks with dynamic classes + theme colors ----------------- */
|
|
134
147
|
const createLinks = routes => {
|
|
@@ -213,14 +226,14 @@ function FoldingTabSidebar(props) {
|
|
|
213
226
|
marginTop: 0
|
|
214
227
|
}
|
|
215
228
|
}))
|
|
216
|
-
}) : !iconNode ?
|
|
229
|
+
}) : !iconNode ? fallbackIcon(prop) : null);
|
|
217
230
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
218
231
|
key: key
|
|
219
232
|
}, shouldShowTooltip ? /*#__PURE__*/_react.default.createElement(_material.Tooltip, {
|
|
220
233
|
title: prop.name,
|
|
221
234
|
placement: "right",
|
|
222
235
|
arrow: true
|
|
223
|
-
}, button) : button, prop.collapse && prop.views && /*#__PURE__*/_react.default.createElement(_material.Collapse, {
|
|
236
|
+
}, button) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, button), prop.collapse && prop.views && /*#__PURE__*/_react.default.createElement(_material.Collapse, {
|
|
224
237
|
in: isOpen,
|
|
225
238
|
timeout: "auto",
|
|
226
239
|
unmountOnExit: true,
|
|
@@ -233,9 +246,7 @@ function FoldingTabSidebar(props) {
|
|
|
233
246
|
className: "nav"
|
|
234
247
|
}, createLinks(prop.views))));
|
|
235
248
|
}
|
|
236
|
-
|
|
237
|
-
// leaf
|
|
238
|
-
return /*#__PURE__*/_react.default.createElement(_material.ListItemButton, {
|
|
249
|
+
const content = /*#__PURE__*/_react.default.createElement(_material.ListItemButton, {
|
|
239
250
|
key: key,
|
|
240
251
|
className: prop.name === 'Dashboard' || prop.name === 'My Work Items' ? isActive ? 'dashboard-link-active' : 'dashboard-link' : leafClassName,
|
|
241
252
|
sx: _objectSpread({
|
|
@@ -256,7 +267,7 @@ function FoldingTabSidebar(props) {
|
|
|
256
267
|
color: (prop.name === 'Dashboard' || prop.name === 'My Work Items') && isActive ? secondaryThemeColor : 'inherit'
|
|
257
268
|
}
|
|
258
269
|
}, iconNode), open ? /*#__PURE__*/_react.default.createElement(_material.ListItemText, {
|
|
259
|
-
primary: /*#__PURE__*/_react.default.createElement(_MenuLink.default, {
|
|
270
|
+
primary: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_MenuLink.default, {
|
|
260
271
|
config: prop.item,
|
|
261
272
|
clickCallback: prop.name === 'Dashboard' ? item => {
|
|
262
273
|
props.dashboardLauncher && props.dashboardLauncher();
|
|
@@ -270,8 +281,15 @@ function FoldingTabSidebar(props) {
|
|
|
270
281
|
id: prop.id,
|
|
271
282
|
level: prop.level,
|
|
272
283
|
tab: TAB
|
|
273
|
-
})
|
|
274
|
-
}) : !iconNode ?
|
|
284
|
+
}))
|
|
285
|
+
}) : !iconNode ? fallbackIcon(prop) : null);
|
|
286
|
+
|
|
287
|
+
// leaf
|
|
288
|
+
return !open ? /*#__PURE__*/_react.default.createElement(_material.Tooltip, {
|
|
289
|
+
title: prop.name,
|
|
290
|
+
placement: "right",
|
|
291
|
+
arrow: true
|
|
292
|
+
}, content) : content;
|
|
275
293
|
});
|
|
276
294
|
};
|
|
277
295
|
|
|
@@ -218,8 +218,10 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
218
218
|
let view = _ApplicationManager.default.getView(props.viewId);
|
|
219
219
|
if (view) {
|
|
220
220
|
let title = view.config.title;
|
|
221
|
-
if (title
|
|
222
|
-
|
|
221
|
+
if (title) {
|
|
222
|
+
if (title.includes(props.config.id)) {
|
|
223
|
+
_ApplicationManager.default.updateAppBarTitle(view.config.id, title);
|
|
224
|
+
}
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
}
|
|
@@ -36,7 +36,6 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
|
|
|
36
36
|
_Observable.default.clearComponentEventListeners(props.gridHandle.api.id);
|
|
37
37
|
};
|
|
38
38
|
_react.default.useEffect(() => {
|
|
39
|
-
console.log("LOOKUP FIELD VALUE CHANGED", base.value);
|
|
40
39
|
setValue(base.value);
|
|
41
40
|
}, [base.value]);
|
|
42
41
|
_react.default.useEffect(() => {
|
package/dist/view/Dashboard.js
CHANGED
|
@@ -55,9 +55,8 @@ const DashboardCard = props => {
|
|
|
55
55
|
if (path && displayType) {
|
|
56
56
|
if (displayType === 'VIEW') {
|
|
57
57
|
(0, _RestUtils.sendRequest)(path, data => {
|
|
58
|
-
data.id = data.id + "
|
|
58
|
+
data.id = data.id + "_" + keyCounter++;
|
|
59
59
|
let dashboardView = {};
|
|
60
|
-
let defaultModel = {};
|
|
61
60
|
dashboardView.config = data;
|
|
62
61
|
dashboardView.parent = false;
|
|
63
62
|
dashboardView.popUp = false;
|
|
@@ -65,9 +64,6 @@ const DashboardCard = props => {
|
|
|
65
64
|
dashboardView.config.window = false;
|
|
66
65
|
dashboardView.handle = {
|
|
67
66
|
api: {
|
|
68
|
-
get id() {
|
|
69
|
-
return data.id;
|
|
70
|
-
},
|
|
71
67
|
loaded: () => {
|
|
72
68
|
return false;
|
|
73
69
|
}
|
|
@@ -75,7 +71,7 @@ const DashboardCard = props => {
|
|
|
75
71
|
};
|
|
76
72
|
_ApplicationManager.default.addDashboardView(dashboardView, path);
|
|
77
73
|
let element = /*#__PURE__*/_react.default.createElement(_View.View, {
|
|
78
|
-
key: data.id,
|
|
74
|
+
key: data.id + "_" + keyCounter,
|
|
79
75
|
config: data,
|
|
80
76
|
parameters: [],
|
|
81
77
|
handle: dashboardView.handle
|
|
@@ -466,6 +462,7 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
|
|
|
466
462
|
handle: handle
|
|
467
463
|
});
|
|
468
464
|
return () => {
|
|
465
|
+
keyCounter = 0;
|
|
469
466
|
_ApplicationManager.default.clearDashboardViews();
|
|
470
467
|
};
|
|
471
468
|
}, []);
|
package/package.json
CHANGED