orc-shared 1.6.0-dev.3 → 1.6.0-dev.4
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/components/MaterialUI/DataDisplay/Table.js +2 -2
- package/dist/components/MaterialUI/Inputs/InputBase.js +1 -1
- package/dist/components/MaterialUI/hocs/withDeferredPopper.js +1 -1
- package/dist/components/Routing/SubPage.js +6 -7
- package/dist/hooks/useNotificationRequestState.js +2 -2
- package/dist/selectors/authentication.js +2 -2
- package/dist/selectors/metadata.js +1 -1
- package/package.json +1 -1
- package/src/components/MaterialUI/Inputs/InputBase.js +1 -1
- package/src/components/MaterialUI/Inputs/InputBase.test.js +2 -2
- package/src/components/Routing/SubPage.js +0 -1
|
@@ -296,8 +296,8 @@ var buildTableRows = function buildTableRows(rows, classes, customClasses, selec
|
|
|
296
296
|
};
|
|
297
297
|
var mappedRows = rows.map(function (row) {
|
|
298
298
|
var _row$style$show, _row$style, _row$style$customClas, _row$style2;
|
|
299
|
-
var showStyle = (_row$style$show = row == null
|
|
300
|
-
var rowClass = (_row$style$customClas = row == null
|
|
299
|
+
var showStyle = (_row$style$show = row == null || (_row$style = row.style) == null ? void 0 : _row$style.show) != null ? _row$style$show : false;
|
|
300
|
+
var rowClass = (_row$style$customClas = row == null || (_row$style2 = row.style) == null ? void 0 : _row$style2.customClass) != null ? _row$style$customClas : "";
|
|
301
301
|
var customClassName = showStyle ? rowClass : "";
|
|
302
302
|
return /*#__PURE__*/_react.default.createElement(MemoTableRow, {
|
|
303
303
|
className: (0, _classnames.default)(classes.tableRow, customClasses.tableRow, customClasses[row.className], customClasses[customClassName]),
|
|
@@ -204,7 +204,7 @@ var InputBase = function InputBase(_ref) {
|
|
|
204
204
|
multiline: multiline,
|
|
205
205
|
startAdornment: startAdornment,
|
|
206
206
|
endAdornment: endAdornment,
|
|
207
|
-
|
|
207
|
+
minRows: rows,
|
|
208
208
|
title: tooltipText,
|
|
209
209
|
autoComplete: autoComplete
|
|
210
210
|
})), error && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -116,7 +116,7 @@ var withDeferredPopper = function withDeferredPopper(Comp) {
|
|
|
116
116
|
}, props));
|
|
117
117
|
var togglePopper = function togglePopper(event) {
|
|
118
118
|
var _event$_dispatchInsta;
|
|
119
|
-
var linkParent = event == null
|
|
119
|
+
var linkParent = event == null || (_event$_dispatchInsta = event._dispatchInstances) == null ? void 0 : _event$_dispatchInsta.filter(function (item) {
|
|
120
120
|
return item.elementType === "a";
|
|
121
121
|
});
|
|
122
122
|
if (linkParent) {
|
|
@@ -46,7 +46,7 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
48
|
var SubPage = function SubPage(_ref) {
|
|
49
|
-
var _props$title, _props$title2, _props$title3, _props$componentProps
|
|
49
|
+
var _props$title, _props$title2, _props$title3, _props$componentProps;
|
|
50
50
|
var config = _ref.config,
|
|
51
51
|
match = _ref.match,
|
|
52
52
|
location = _ref.location,
|
|
@@ -78,13 +78,12 @@ var SubPage = function SubPage(_ref) {
|
|
|
78
78
|
}));
|
|
79
79
|
var modalProps = new _modalProps.default();
|
|
80
80
|
var titleComponent = props != null && (_props$title = props.title) != null && _props$title.id ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, {
|
|
81
|
-
id: props == null
|
|
82
|
-
defaultMesaage: props == null
|
|
81
|
+
id: props == null || (_props$title2 = props.title) == null ? void 0 : _props$title2.id,
|
|
82
|
+
defaultMesaage: props == null || (_props$title3 = props.title) == null ? void 0 : _props$title3.defaultMessage
|
|
83
83
|
}) : props == null ? void 0 : props.title;
|
|
84
84
|
modalProps.set(_modalProps.default.propNames.title, titleComponent);
|
|
85
85
|
modalProps.set(_modalProps.default.propNames.open, true);
|
|
86
86
|
modalProps.set(_modalProps.default.propNames.type, "fullwidth");
|
|
87
|
-
modalProps.set(_modalProps.default.propNames.backdropClickCallback, closeSubPage);
|
|
88
87
|
var actionPanel = /*#__PURE__*/_react.default.createElement("div", {
|
|
89
88
|
className: classes.actionPanel
|
|
90
89
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
@@ -93,11 +92,11 @@ var SubPage = function SubPage(_ref) {
|
|
|
93
92
|
disableElevation: true,
|
|
94
93
|
onClick: closeSubPage
|
|
95
94
|
}, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _sharedMessages.default.close)));
|
|
96
|
-
if (((_props$componentProps = props.componentProps) == null
|
|
97
|
-
var _props$
|
|
95
|
+
if (((_props$componentProps = props.componentProps) == null || (_props$componentProps = _props$componentProps.actionPanel()) == null ? void 0 : _props$componentProps.length) > 0) {
|
|
96
|
+
var _props$componentProps2;
|
|
98
97
|
actionPanel = /*#__PURE__*/_react.default.createElement("div", {
|
|
99
98
|
className: classes.actionPanel
|
|
100
|
-
}, (_props$
|
|
99
|
+
}, (_props$componentProps2 = props.componentProps) == null ? void 0 : _props$componentProps2.actionPanel().map(function (action) {
|
|
101
100
|
var _action$label;
|
|
102
101
|
return /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
103
102
|
key: (_action$label = action.label) == null ? void 0 : _action$label.id,
|
|
@@ -68,8 +68,8 @@ var useNotificationRequestState = function useNotificationRequestState(_ref) {
|
|
|
68
68
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
69
|
}, [formatMessage, successAction, successMessageId, successMessageValues]);
|
|
70
70
|
var onError = (0, _react.useCallback)(function (errorResponse) {
|
|
71
|
-
var _errorResponse$respon, _errorResponse$respon2
|
|
72
|
-
var errorMessage = (_errorResponse$respon = errorResponse == null
|
|
71
|
+
var _errorResponse$respon, _errorResponse$respon2;
|
|
72
|
+
var errorMessage = (_errorResponse$respon = errorResponse == null || (_errorResponse$respon2 = errorResponse.response) == null || (_errorResponse$respon2 = _errorResponse$respon2.responseStatus) == null ? void 0 : _errorResponse$respon2.message) != null ? _errorResponse$respon : null;
|
|
73
73
|
var message = formatMessage(errorMessageId, _objectSpread(_objectSpread({}, errorMessageValues), {}, {
|
|
74
74
|
errorMessage: errorMessage != null ? errorMessage : formatMessage(_sharedMessages.default.errorUnknown)
|
|
75
75
|
}));
|
|
@@ -41,8 +41,8 @@ var hasRolePermissions = function hasRolePermissions(appRolesClaims, scopeId, ro
|
|
|
41
41
|
if (appRolesClaims != null && scopeId != null) {
|
|
42
42
|
var allowed = !!appRolesClaims.getIn(["*", role]) || !!appRolesClaims.getIn([scopeId, role]);
|
|
43
43
|
if (!allowed) {
|
|
44
|
-
var _scopes$get$toJS$pare, _scopes$get
|
|
45
|
-
var parentScopeId = (_scopes$get$toJS$pare = (_scopes$get = scopes.get(scopeId)) == null
|
|
44
|
+
var _scopes$get$toJS$pare, _scopes$get;
|
|
45
|
+
var parentScopeId = (_scopes$get$toJS$pare = (_scopes$get = scopes.get(scopeId)) == null || (_scopes$get = _scopes$get.toJS()) == null ? void 0 : _scopes$get.parentScopeId) != null ? _scopes$get$toJS$pare : null;
|
|
46
46
|
return hasRolePermissions(appRolesClaims, parentScopeId, role, scopes);
|
|
47
47
|
}
|
|
48
48
|
return allowed;
|
|
@@ -369,7 +369,7 @@ var resolveProductPropertyValue = function resolveProductPropertyValue(property,
|
|
|
369
369
|
case "Lookup":
|
|
370
370
|
var lookupName = (_property$lookupDefin = property.lookupDefinition) == null ? void 0 : _property$lookupDefin.lookupName;
|
|
371
371
|
var lookup = lookups == null ? void 0 : lookups.get(lookupName);
|
|
372
|
-
var lookupValue = lookup == null
|
|
372
|
+
var lookupValue = lookup == null || (_lookup$get = lookup.get("values")) == null ? void 0 : _lookup$get.get(propertyValue);
|
|
373
373
|
return (0, _localizationHelper.getLocalization)(lookupValue == null ? void 0 : lookupValue.get("displayName"), locale, lookupValue == null ? void 0 : lookupValue.get("value"));
|
|
374
374
|
default:
|
|
375
375
|
return propertyValue;
|
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ describe("InputBase Component", () => {
|
|
|
71
71
|
const component = <InputBase inputProps={inputProps} />;
|
|
72
72
|
|
|
73
73
|
const mountedComponent = mount(component);
|
|
74
|
-
const expected = <InputBaseMUI value={aValue} title={aValue}
|
|
74
|
+
const expected = <InputBaseMUI value={aValue} title={aValue} minRows={defaultRows} />;
|
|
75
75
|
|
|
76
76
|
expect(mountedComponent.containsMatchingElement(expected), "to be truthy");
|
|
77
77
|
});
|
|
@@ -91,7 +91,7 @@ describe("InputBase Component", () => {
|
|
|
91
91
|
const component = <InputBase inputProps={inputProps} />;
|
|
92
92
|
|
|
93
93
|
const mountedComponent = mount(component);
|
|
94
|
-
const expected = <InputBaseMUI value={aValue} title={aValue}
|
|
94
|
+
const expected = <InputBaseMUI value={aValue} title={aValue} minRows={desiredNumberOfRows} />;
|
|
95
95
|
|
|
96
96
|
expect(mountedComponent.containsMatchingElement(expected), "to be truthy");
|
|
97
97
|
});
|
|
@@ -56,7 +56,6 @@ export const SubPage = ({ config, match, location, history, root, modulePrependP
|
|
|
56
56
|
modalProps.set(ModalProps.propNames.title, titleComponent);
|
|
57
57
|
modalProps.set(ModalProps.propNames.open, true);
|
|
58
58
|
modalProps.set(ModalProps.propNames.type, "fullwidth");
|
|
59
|
-
modalProps.set(ModalProps.propNames.backdropClickCallback, closeSubPage);
|
|
60
59
|
|
|
61
60
|
let actionPanel = (
|
|
62
61
|
<div className={classes.actionPanel}>
|