@reltio/components 1.4.1179 → 1.4.1182
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getWorkerURL = exports.isNewUI = void 0;
|
|
4
4
|
var isNewUI = function (path) {
|
|
5
5
|
return path === null || path === void 0 ? void 0 : path.includes('/nui');
|
|
6
6
|
};
|
|
@@ -14,12 +14,3 @@ var getWorkerURL = function (uiPath, tenant) {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
exports.getWorkerURL = getWorkerURL;
|
|
17
|
-
var getFullApiPath = function (apiPath) {
|
|
18
|
-
if (exports.isNewUI(apiPath)) {
|
|
19
|
-
return "" + window.location.origin + apiPath;
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return apiPath;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
exports.getFullApiPath = getFullApiPath;
|
|
@@ -53,7 +53,7 @@ var useAPI = function (config) {
|
|
|
53
53
|
var uiPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getUIPath);
|
|
54
54
|
var tenant = react_redux_1.useSelector(mdm_module_1.default.selectors.getTenant);
|
|
55
55
|
var workerUrl = helpers_1.getWorkerURL(uiPath, tenant);
|
|
56
|
-
var
|
|
56
|
+
var reltioPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getReltioPath);
|
|
57
57
|
var workflowPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getWorkflowPath);
|
|
58
58
|
var user = react_redux_1.useSelector(mdm_module_1.default.selectors.getUser);
|
|
59
59
|
var servicesPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getServicesPath);
|
|
@@ -167,7 +167,7 @@ var useAPI = function (config) {
|
|
|
167
167
|
case mdm_sdk_1.CustomAction.REQUEST: {
|
|
168
168
|
API_1.processRequest(__assign({ name: task.params.name, paramObject: task, permissions: config.action.permissions, worker: worker,
|
|
169
169
|
metadata: metadata, config: config, user: user,
|
|
170
|
-
servicesPath: servicesPath, apiPath:
|
|
170
|
+
servicesPath: servicesPath, apiPath: reltioPath, tenant: tenant,
|
|
171
171
|
workflowPath: workflowPath,
|
|
172
172
|
entity: entity,
|
|
173
173
|
entityUri: entityUri,
|
|
@@ -9,11 +9,3 @@ export var getWorkerURL = function (uiPath, tenant) {
|
|
|
9
9
|
return uiPath + "worker_api.js";
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
export var getFullApiPath = function (apiPath) {
|
|
13
|
-
if (isNewUI(apiPath)) {
|
|
14
|
-
return "" + window.location.origin + apiPath;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return apiPath;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
@@ -16,7 +16,7 @@ import { CustomAction, CustomScriptPlatform, initializeWebWorker, isEmptyValue }
|
|
|
16
16
|
import { useWorkflowCheckPermission } from '../../components/workflow';
|
|
17
17
|
import { SandboxAPIContext, SnackbarContext } from '../../contexts';
|
|
18
18
|
import { processRequest } from './API';
|
|
19
|
-
import {
|
|
19
|
+
import { getWorkerURL } from './helpers';
|
|
20
20
|
export var useAPI = function (config) {
|
|
21
21
|
if (config === void 0) { config = {}; }
|
|
22
22
|
var _a = useState(), html = _a[0], setHtml = _a[1];
|
|
@@ -31,7 +31,7 @@ export var useAPI = function (config) {
|
|
|
31
31
|
var uiPath = useSelector(mdmModule.selectors.getUIPath);
|
|
32
32
|
var tenant = useSelector(mdmModule.selectors.getTenant);
|
|
33
33
|
var workerUrl = getWorkerURL(uiPath, tenant);
|
|
34
|
-
var
|
|
34
|
+
var reltioPath = useSelector(mdmModule.selectors.getReltioPath);
|
|
35
35
|
var workflowPath = useSelector(mdmModule.selectors.getWorkflowPath);
|
|
36
36
|
var user = useSelector(mdmModule.selectors.getUser);
|
|
37
37
|
var servicesPath = useSelector(mdmModule.selectors.getServicesPath);
|
|
@@ -145,7 +145,7 @@ export var useAPI = function (config) {
|
|
|
145
145
|
case CustomAction.REQUEST: {
|
|
146
146
|
processRequest(__assign({ name: task.params.name, paramObject: task, permissions: config.action.permissions, worker: worker,
|
|
147
147
|
metadata: metadata, config: config, user: user,
|
|
148
|
-
servicesPath: servicesPath, apiPath:
|
|
148
|
+
servicesPath: servicesPath, apiPath: reltioPath, tenant: tenant,
|
|
149
149
|
workflowPath: workflowPath,
|
|
150
150
|
entity: entity,
|
|
151
151
|
entityUri: entityUri,
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1182",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.1182",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1182",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|