@agilemotion/oui-react-js 1.3.7 → 1.3.8

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.
@@ -54,7 +54,7 @@ class BusinessPortalApp extends _react.Component {
54
54
  }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
55
55
  path: "/forgot-password",
56
56
  render: () => /*#__PURE__*/_react.default.createElement(_ForgotPasswordBasic.default, {
57
- url: location + this.props.implConfig.contextRoot + this.props.implConfig.authUrl + "/password/forgot",
57
+ url: location + this.props.contextRoot + this.props.implConfig.authUrl + "/password/forgot",
58
58
  background: this.props.implConfig.loginBackgroundColor,
59
59
  textColor: this.props.implConfig.loginTextColor,
60
60
  title: this.props.implConfig.loginTitle,
@@ -63,7 +63,7 @@ class BusinessPortalApp extends _react.Component {
63
63
  }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
64
64
  path: "/reset-password",
65
65
  render: () => /*#__PURE__*/_react.default.createElement(_ResetPasswordBasic.default, {
66
- url: location + this.props.implConfig.contextRoot + this.props.implConfig.authUrl + "/password/confirmForgot",
66
+ url: location + this.props.contextRoot + this.props.implConfig.authUrl + "/password/confirmForgot",
67
67
  background: this.props.implConfig.loginBackgroundColor,
68
68
  textColor: this.props.implConfig.loginTextColor,
69
69
  title: this.props.implConfig.loginTitle,
@@ -72,7 +72,7 @@ class BusinessPortalApp extends _react.Component {
72
72
  }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
73
73
  path: "/change-password",
74
74
  render: () => /*#__PURE__*/_react.default.createElement(_ChangePasswordBasic.default, {
75
- url: location + this.props.implConfig.contextRoot + this.props.implConfig.authUrl + "/password/challenge",
75
+ url: location + this.props.contextRoot + this.props.implConfig.authUrl + "/password/challenge",
76
76
  background: this.props.implConfig.loginBackgroundColor,
77
77
  textColor: this.props.implConfig.loginTextColor,
78
78
  title: this.props.implConfig.loginTitle,
package/dist/RestUtils.js CHANGED
@@ -361,14 +361,14 @@ class RestUtils {
361
361
  window.open(encodeURI(url), '_blank');
362
362
  } else {
363
363
  if (_Utils.default.isNull(track) || track === true) {
364
- (0, _reactPromiseTracker.trackPromise)(this.exeuteFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback));
364
+ (0, _reactPromiseTracker.trackPromise)(this.executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback));
365
365
  } else {
366
- this.exeuteFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback);
366
+ this.executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback);
367
367
  }
368
368
  }
369
369
  }
370
370
 
371
- exeuteFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback) {
371
+ executeFetch(url, fetchConfig, successCallback, viewId, successMessage, errorCallback) {
372
372
  return fetch(encodeURI(url), fetchConfig).then(status).then(json).then(data => {
373
373
  this.processSuccessfulResponseData(null, data, successCallback, viewId, successMessage);
374
374
  }).catch(e => {
@@ -91,7 +91,13 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
91
91
 
92
92
  _ServiceCallActionHandler.default.execute(actionConfig, null, null, props.viewId, data => {
93
93
  let file = {};
94
- file.base64 = data.payloadBase64;
94
+
95
+ if (data.payloadBase64) {
96
+ file.base64 = data.payloadBase64;
97
+ } else if (data.url) {
98
+ file.base64 = data.url.replace('data:application/pdf;base64,', '');
99
+ }
100
+
95
101
  file.type = props.config.fileType;
96
102
  setValue(file);
97
103
  }, () => {});
@@ -1,5 +1,4 @@
1
1
  .dropTarget {
2
- border: 2px dashed #a1a1a1;
3
2
  }
4
3
 
5
4
  ._draggable_ {
@@ -137,10 +137,9 @@ const BasicBusinessAppDashboard = props => {
137
137
  _react.default.useEffect(() => {
138
138
  document.body.classList.add("white-content");
139
139
 
140
- if (navigator.platform.indexOf("Win") > -1) {
141
- ps.destroy();
142
- document.documentElement.className.add("perfect-scrollbar-off");
143
- document.documentElement.classList.remove("perfect-scrollbar-on");
140
+ if (navigator.platform.indexOf("Win") > -1) {//ps.destroy();
141
+ //document.documentElement.className.add("perfect-scrollbar-off");
142
+ //document.documentElement.classList.remove("perfect-scrollbar-on");
144
143
  }
145
144
 
146
145
  window.removeEventListener("scroll", showNavbarButton);
@@ -176,10 +176,9 @@ const BusinessPortalAppDashboard = /*#__PURE__*/_react.default.memo(props => {
176
176
  _react.default.useEffect(() => {
177
177
  document.body.classList.add("white-content");
178
178
 
179
- if (navigator.platform.indexOf("Win") > -1) {
180
- ps.destroy();
181
- document.documentElement.className.add("perfect-scrollbar-off");
182
- document.documentElement.classList.remove("perfect-scrollbar-on");
179
+ if (navigator.platform.indexOf("Win") > -1) {//ps.destroy();
180
+ //document.documentElement.className.add("perfect-scrollbar-off");
181
+ //document.documentElement.classList.remove("perfect-scrollbar-on");
183
182
  }
184
183
 
185
184
  window.removeEventListener("scroll", showNavbarButton); //dispatch(actionCreators.setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor));
@@ -168,18 +168,17 @@ class Sidebar extends _react.default.Component {
168
168
  componentDidMount() {
169
169
  // if you are using a Windows Machine, the scrollbars will have a Mac look
170
170
  if (navigator.platform.indexOf("Win") > -1) {
171
- ps = new _perfectScrollbar.default(this.refs.sidebar, {
172
- suppressScrollX: true,
173
- suppressScrollY: false
174
- });
171
+ /*ps = new PerfectScrollbar(this.refs.sidebar, {
172
+ suppressScrollX: true,
173
+ suppressScrollY: false,
174
+ });*/
175
175
  }
176
176
  }
177
177
 
178
178
  componentWillUnmount() {
179
179
  // we need to destroy the false scrollbar when we navigate
180
180
  // to a page that doesn't have this component rendered
181
- if (navigator.platform.indexOf("Win") > -1) {
182
- ps.destroy();
181
+ if (navigator.platform.indexOf("Win") > -1) {//ps.destroy();
183
182
  }
184
183
  }
185
184
 
@@ -11,6 +11,8 @@ var _BaseField = require("./BaseField");
11
11
 
12
12
  var _SignatureTemplateDesigner = _interopRequireDefault(require("../signatures/SignatureTemplateDesigner"));
13
13
 
14
+ var _Utils = _interopRequireDefault(require("../../Utils"));
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
16
18
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -26,7 +28,8 @@ const SignatureTemplateDesignerComponent = /*#__PURE__*/_react.default.memo( /*#
26
28
  ref: /*#__PURE__*/_react.default.createRef(),
27
29
  viewId: props.viewId,
28
30
  loadCompleteHandler: () => {},
29
- showToolbar: false,
31
+ showToolbar: _Utils.default.getComponentAttribute(props.config.designer, "showToolbar", false),
32
+ autoLoadData: _Utils.default.getComponentAttribute(props.config.designer, "autoLoadData", false),
30
33
  valueChangeHandler: value => {
31
34
  base.handleValueChange(value);
32
35
  }
@@ -156,7 +156,6 @@ const DocumentContainer = props => {
156
156
  rendererProps["sgvp".concat(signingInput.index)] = props => /*#__PURE__*/_react.default.createElement("div", {
157
157
  style: {
158
158
  borderRadius: '4px',
159
- border: '4px dashed ' + color,
160
159
  position: 'absolute',
161
160
  width: '100px',
162
161
  height: '60px'
@@ -29,6 +29,10 @@ var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
29
29
 
30
30
  require("./ResponsiveTable.css");
31
31
 
32
+ var _RestUtils = require("../../RestUtils");
33
+
34
+ var _Utils = _interopRequireDefault(require("../../Utils"));
35
+
32
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
37
 
34
38
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -269,28 +273,44 @@ function EnhancedTable(props) {
269
273
  }, [props.rows]);
270
274
 
271
275
  _react.default.useEffect(() => {
272
- if (fetchEnabled && !utils.isNull(props.searchParameters) && !utils.isNull(props.dataUrl)) {
276
+ if (fetchEnabled && !utils.isNull(props.searchParameters) && !(utils.isNull(props.dataUrl) || utils.isNull(props.dataService))) {
273
277
  setSearchParameters(props.searchParameters);
274
- utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)), data => {
275
- var result;
276
-
277
- if (typeof data === "string") {
278
- result = JSON.parse(data);
279
- } else {
280
- result = data;
281
- }
282
278
 
283
- if (!utils.isNull(result)) {
284
- setRows(result.records);
285
- setTotalNumberOfRows(result.totalNumberOfRecords);
279
+ if (!utils.isNull(props.dataService)) {
280
+ (0, _RestUtils.invokeRpc)(props.dataService, null, "prepareOffer", result => {
281
+ setRows(result.data.records);
282
+ setTotalNumberOfRows(result.data.totalNumberOfRecords);
286
283
 
287
284
  if (!utils.isNull(props.onDataArrive)) {
288
- props.onDataArrive(result);
285
+ props.onDataArrive(result.data);
289
286
  }
290
287
 
291
288
  updateScrollBarPadding();
292
- }
293
- }, null);
289
+ }, e => {
290
+ alert(e.message);
291
+ });
292
+ } else {
293
+ utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)), data => {
294
+ var result;
295
+
296
+ if (typeof data === "string") {
297
+ result = JSON.parse(data);
298
+ } else {
299
+ result = data;
300
+ }
301
+
302
+ if (!utils.isNull(result)) {
303
+ setRows(result.records);
304
+ setTotalNumberOfRows(result.totalNumberOfRecords);
305
+
306
+ if (!utils.isNull(props.onDataArrive)) {
307
+ props.onDataArrive(result);
308
+ }
309
+
310
+ updateScrollBarPadding();
311
+ }
312
+ }, null);
313
+ }
294
314
  }
295
315
 
296
316
  setFetchEnabled(true);
@@ -219,6 +219,7 @@ function SearchView(props) {
219
219
  handleSelectionChange(selection);
220
220
  },
221
221
  dataUrl: props.dataUrl,
222
+ dataService: props.dataService,
222
223
  onDataArrive: data => handleDataArrived(data),
223
224
  mode: props.mode,
224
225
  autoFetchData: props.autoFetchData,
@@ -92,6 +92,7 @@ class SignatorySearch extends _react.Component {
92
92
  }, /*#__PURE__*/_react.default.createElement(_SearchView.default, {
93
93
  headCells: headCells,
94
94
  dataUrl: this.props.signatoryUrl,
95
+ dataService: this.props.signatoryService,
95
96
  model: this.state.model,
96
97
  toolbarConfig: toolbarConfig,
97
98
  searchParameters: searchParameters,
@@ -138,6 +138,7 @@ const SigPropsLookupField = /*#__PURE__*/_react.default.forwardRef(props => {
138
138
  }
139
139
  }, /*#__PURE__*/_react.default.createElement(_SignatorySearch.default, {
140
140
  signatoryUrl: props.signatoryUrl,
141
+ signatoryService: props.signatoryService,
141
142
  onLookupValueChange: selection => setCurrentSelection(selection[0])
142
143
  })), /*#__PURE__*/_react.default.createElement("div", {
143
144
  style: {
@@ -284,6 +285,7 @@ const SignatureInputProps = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
284
285
  valueChangeHandler: valueChangeHandler,
285
286
  disabled: value === null,
286
287
  signatoryUrl: props.signatoryUrl,
288
+ signatoryService: props.signatoryService,
287
289
  error: !signatoryValid
288
290
  }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
289
291
  style: {
@@ -179,7 +179,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
179
179
  initializing = _React$useState14[0],
180
180
  setInitializing = _React$useState14[1];
181
181
 
182
- const _React$useState15 = _react.default.useState(true),
182
+ const _React$useState15 = _react.default.useState(_Utils.default.isNull(props.autoLoadData) || props.autoLoadData === true),
183
183
  _React$useState16 = _slicedToArray(_React$useState15, 2),
184
184
  loading = _React$useState16[0],
185
185
  setLoading = _React$useState16[1];
@@ -673,6 +673,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
673
673
  }, /*#__PURE__*/_react.default.createElement(_SignatureInputProps.default, {
674
674
  value: selectedInputBoxValue,
675
675
  signatoryUrl: location + _ApplicationContext.default.getBaseApiUrl() + props.config.signatoryUrl,
676
+ signatoryService: props.config.signatoryService,
676
677
  saveHandler: (id, values) => saveProps(id, values),
677
678
  deleteHandler: (id, values) => deleteInputItem(id, values),
678
679
  dublicateHandler: id => handleDuplicate(id)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemotion/oui-react-js",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "babel": {
5
5
  "presets": [
6
6
  "@babel/preset-env",