@agilemotion/oui-react-js 1.2.8 → 1.2.9
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.
|
@@ -588,6 +588,14 @@ class ApplicationContext {
|
|
|
588
588
|
return this.props.uiConfigPath;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
+
setFilesApiPath(filesApiPath) {
|
|
592
|
+
this.props.filesApiPath = filesApiPath;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
getFilesApiPath() {
|
|
596
|
+
return this.props.filesApiPath;
|
|
597
|
+
}
|
|
598
|
+
|
|
591
599
|
addApplicationListener(listener) {
|
|
592
600
|
this.listeners.push(listener);
|
|
593
601
|
}
|
package/dist/BasicAppHome.js
CHANGED
|
@@ -68,6 +68,8 @@ class BasicAppHome extends _react.Component {
|
|
|
68
68
|
|
|
69
69
|
_ApplicationContext.default.setBaseApiUrl(this.props.baseApiUrl);
|
|
70
70
|
|
|
71
|
+
_ApplicationContext.default.setFilesApiPath(this.props.filesApiPath);
|
|
72
|
+
|
|
71
73
|
this.props.getDashboardSettings(location + this.props.baseApiUrl + "/ui/setup");
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -88,7 +88,8 @@ const Section = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
|
|
|
88
88
|
parentId: props.parentId,
|
|
89
89
|
loadCompleteHandler: props.loadCompleteHandler,
|
|
90
90
|
viewId: props.viewId,
|
|
91
|
-
values: props.values
|
|
91
|
+
values: props.values,
|
|
92
|
+
key: componentKey++
|
|
92
93
|
}) : component.type === 'tab' ? /*#__PURE__*/_react.default.createElement(_TabPanel.default, {
|
|
93
94
|
keyHandler: props.keyHandler,
|
|
94
95
|
config: component,
|
|
@@ -97,7 +98,8 @@ const Section = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
|
|
|
97
98
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
98
99
|
loadCompleteHandler: props.loadCompleteHandler,
|
|
99
100
|
viewId: props.viewId,
|
|
100
|
-
values: props.values
|
|
101
|
+
values: props.values,
|
|
102
|
+
key: componentKey++
|
|
101
103
|
}) : /*#__PURE__*/_react.default.createElement("div", null, "Unsupported form section component type " + component.type);
|
|
102
104
|
}
|
|
103
105
|
|
|
@@ -211,7 +211,7 @@ const DocumentUpload = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
211
211
|
backgroundRepeat: 'no-repeat',
|
|
212
212
|
backgroundSize: 'cover',
|
|
213
213
|
backgroundColor: 'transparent',
|
|
214
|
-
backgroundImage: !_Utils.default.isNull(viewerFile) ? "url(".concat(viewerFile.base64, ")") : !_Utils.default.isNull(props.config.dataService) ? "url(".concat(location + '/
|
|
214
|
+
backgroundImage: !_Utils.default.isNull(viewerFile) ? "url(".concat(viewerFile.base64, ")") : !_Utils.default.isNull(props.config.dataService) ? "url(".concat(location + _ApplicationContext.default.getBaseApiUrl() + _ApplicationContext.default.getFilesApiPath() + '/get/file?fileId=' + (!_Utils.default.isNull(base.value) ? base.value.id : '-1') + '&fileService=' + props.config.dataService.serviceId + (!_Utils.default.isNull(defaultImage) ? '&defaultImage=' + defaultImage : '') + '&access_token=' + sessionStorage.getItem("accessToken") + '&idToken=' + sessionStorage.getItem("idToken"), ")") : "url(".concat(require('./default-avatar.png'), ")")
|
|
215
215
|
}
|
|
216
216
|
}))) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("label", {
|
|
217
217
|
htmlFor: "contained-button-file"
|
|
@@ -221,7 +221,7 @@ const DocumentUpload = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
221
221
|
disabled: base.disabled,
|
|
222
222
|
className: classes.button
|
|
223
223
|
}, props.config.attributes['label'] ? props.config.attributes['label'] : "Upload File")), /*#__PURE__*/_react.default.createElement("label", null, !_Utils.default.isNull(base.value) ? _Utils.default.isNull(base.value.id) || _Utils.default.isNull(props.config.dataService) ? base.value.name : /*#__PURE__*/_react.default.createElement("a", {
|
|
224
|
-
href: location + '/
|
|
224
|
+
href: location + +_ApplicationContext.default.getBaseApiUrl() + _ApplicationContext.default.getFilesApiPath() + '/get/file?fileId=' + base.value.id + '&fileService=' + props.config.dataService.serviceId + '&access_token=' + sessionStorage.getItem("accessToken") + '&idToken=' + sessionStorage.getItem("idToken"),
|
|
225
225
|
target: '_blank'
|
|
226
226
|
}, base.value.name) : null))), props.showViewer && !multiple || show ? /*#__PURE__*/_react.default.createElement(_DocumentViewer.default, {
|
|
227
227
|
file: viewerFile,
|