@reltio/components 1.4.1578 → 1.4.1580
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/cjs/components/AttributeListItem/AttributeListItem.d.ts +3 -1
- package/cjs/components/AttributeListItem/AttributeListItem.js +3 -3
- package/cjs/hooks/useAPI/API.d.ts +1 -1
- package/cjs/hooks/useAPI/API.js +101 -121
- package/cjs/hooks/useAPI/helpers.d.ts +8 -27
- package/cjs/hooks/useAPI/helpers.js +49 -89
- package/cjs/hooks/useAPI/types.d.ts +3 -6
- package/cjs/hooks/useAPI/useAPI.js +29 -53
- package/cjs/hooks/useCustomScripts.js +26 -61
- package/esm/components/AttributeListItem/AttributeListItem.d.ts +3 -1
- package/esm/components/AttributeListItem/AttributeListItem.js +3 -3
- package/esm/hooks/useAPI/API.d.ts +1 -1
- package/esm/hooks/useAPI/API.js +101 -121
- package/esm/hooks/useAPI/helpers.d.ts +8 -27
- package/esm/hooks/useAPI/helpers.js +42 -84
- package/esm/hooks/useAPI/types.d.ts +3 -6
- package/esm/hooks/useAPI/useAPI.js +32 -56
- package/esm/hooks/useCustomScripts.js +29 -64
- package/package.json +3 -3
|
@@ -46,15 +46,15 @@ var contexts_1 = require("../../contexts");
|
|
|
46
46
|
var API_1 = require("./API");
|
|
47
47
|
var helpers_1 = require("./helpers");
|
|
48
48
|
var useAPI = function (config) {
|
|
49
|
-
var _a, _b, _c, _d;
|
|
50
49
|
if (config === void 0) { config = {}; }
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
50
|
+
var _a = config.action || {}, processApiRequest = _a.processApiRequest, processApiResponse = _a.processApiResponse, platform = _a.platform;
|
|
51
|
+
var _b = (0, react_1.useState)(), html = _b[0], setHtml = _b[1];
|
|
52
|
+
var _c = (0, react_1.useState)([]), listenersToReset = _c[0], setListenersToReset = _c[1];
|
|
53
|
+
var _d = (0, react_1.useState)([]), popupListenersToReset = _d[0], setPopupListenersToReset = _d[1];
|
|
54
|
+
var _e = (0, react_1.useState)(true), visible = _e[0], setVisible = _e[1];
|
|
55
|
+
var _f = (0, react_1.useState)(), popup = _f[0], setPopup = _f[1];
|
|
56
|
+
var _g = (0, react_1.useState)(null), tooltip = _g[0], setTooltip = _g[1];
|
|
57
|
+
var _h = (0, react_1.useState)({}), customStyles = _h[0], setCustomStyles = _h[1];
|
|
58
58
|
var workerRef = (0, react_1.useRef)();
|
|
59
59
|
var requestListeners = (0, react_1.useRef)({});
|
|
60
60
|
var responseListeners = (0, react_1.useRef)({});
|
|
@@ -77,10 +77,8 @@ var useAPI = function (config) {
|
|
|
77
77
|
var entityUri = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEntityUri);
|
|
78
78
|
var isEditableMode = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getIsEditableMode);
|
|
79
79
|
var environment = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getWorkflowEnvironmentUrl);
|
|
80
|
-
var
|
|
80
|
+
var _j = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getSearchProviderData) || {}, typeSearch = _j.type, search = _j.data;
|
|
81
81
|
var searchQuery = typeSearch === 'search' ? search === null || search === void 0 ? void 0 : search.query : null;
|
|
82
|
-
var isOldUI = !(0, helpers_1.isNewUI)(servicesPath);
|
|
83
|
-
var supportedInterceptHandlers = isOldUI ? qxApi.interceptors : interceptHandlers;
|
|
84
82
|
var openSearch = function (search) { return dispatch(mdm_module_1.ui.actions.openSearch(search)); };
|
|
85
83
|
var innerText = '';
|
|
86
84
|
var popupText = '';
|
|
@@ -169,15 +167,8 @@ var useAPI = function (config) {
|
|
|
169
167
|
break;
|
|
170
168
|
}
|
|
171
169
|
case mdm_sdk_1.CustomAction.REQUEST: {
|
|
172
|
-
var
|
|
173
|
-
|
|
174
|
-
!(0, ramda_1.startsWith)(apiPath, (0, ramda_1.pathOr)('', ['params', 'url'], task));
|
|
175
|
-
var isApiAction = (0, ramda_1.pathEq)(['params', 'name'], mdm_sdk_1.RequestAction.API, task);
|
|
176
|
-
var processedParams = (0, ramda_1.pipe)((0, ramda_1.evolve)({
|
|
177
|
-
url: (0, ramda_1.ifElse)((0, ramda_1.both)((0, ramda_1.always)(isGlobalUrl), (0, ramda_1.always)(isApiAction)), (0, ramda_1.concat)("".concat(processedApiPath, "/api/").concat(tenant)), (0, ramda_1.replace)(reltioPath, apiPath))
|
|
178
|
-
}), (0, ramda_1.when)((0, ramda_1.has)('url'), (0, ramda_1.assocPath)(['validationUrl'], task.params.url)))(task.params);
|
|
179
|
-
var processedTask = __assign(__assign({}, task), { params: processedParams });
|
|
180
|
-
(0, API_1.processRequest)(__assign({ name: processedTask.params.name, paramObject: processedTask, permissions: config.action.permissions, worker: worker, metadata: metadata, config: config, user: user, servicesPath: servicesPath, apiPath: reltioPath, tenant: tenant, workflowPath: workflowPath, entity: entity, entityUri: entityUri, environment: environment, query: searchQuery, openSearch: openSearch, workflowCheckPermission: workflowCheckPermission }, qxApi));
|
|
170
|
+
var processedTask = (0, helpers_1.getProcessedTask)(task, apiPath, reltioPath, tenant);
|
|
171
|
+
(0, API_1.processRequest)(__assign({ params: processedTask.params, permissions: config.action.permissions, worker: worker, metadata: metadata, config: config, user: user, servicesPath: servicesPath, apiPath: reltioPath, tenant: tenant, workflowPath: workflowPath, entity: entity, entityUri: entityUri, environment: environment, query: searchQuery, openSearch: openSearch, workflowCheckPermission: workflowCheckPermission }, qxApi));
|
|
181
172
|
break;
|
|
182
173
|
}
|
|
183
174
|
case mdm_sdk_1.CustomAction.RETURN_PROCESSED_API_RESPONSE: {
|
|
@@ -207,20 +198,18 @@ var useAPI = function (config) {
|
|
|
207
198
|
var _a;
|
|
208
199
|
responseListeners.current = __assign(__assign({}, responseListeners.current), (_a = {}, _a[responseId] = { next: next }, _a));
|
|
209
200
|
};
|
|
210
|
-
var qooxdooRequestInterceptor = (0, helpers_1.setUpQooxdooRequestInterceptor)({ workerRef: workerRef, setRequestListeners: setRequestListeners });
|
|
211
|
-
var qooxdooResponseInterceptor = (0, helpers_1.setUpQooxdooResponseInterceptor)({ workerRef: workerRef, setResponseListeners: setResponseListeners });
|
|
212
201
|
var requestInterceptor = (0, helpers_1.setUpRequestInterceptor)({
|
|
213
202
|
apiPath: apiPath,
|
|
214
203
|
reltioPath: reltioPath,
|
|
215
204
|
tenant: tenant,
|
|
216
|
-
processApiRequest:
|
|
205
|
+
processApiRequest: processApiRequest,
|
|
217
206
|
workerRef: workerRef,
|
|
218
207
|
setRequestListeners: setRequestListeners
|
|
219
208
|
});
|
|
220
209
|
var responseInterceptor = (0, helpers_1.setUpResponseInterceptor)({
|
|
221
210
|
reltioPath: reltioPath,
|
|
222
211
|
apiPath: apiPath,
|
|
223
|
-
processApiResponse:
|
|
212
|
+
processApiResponse: processApiResponse,
|
|
224
213
|
workerRef: workerRef,
|
|
225
214
|
setResponseListeners: setResponseListeners
|
|
226
215
|
});
|
|
@@ -229,11 +218,10 @@ var useAPI = function (config) {
|
|
|
229
218
|
(_a = workerRef.current) === null || _a === void 0 ? void 0 : _a.postMessage({ action: 'event', type: type, data: data });
|
|
230
219
|
};
|
|
231
220
|
var pendingInterceptors = (0, react_1.useRef)(false);
|
|
232
|
-
var needDelayedRequestForInterceptors =
|
|
233
|
-
interceptHandlers &&
|
|
221
|
+
var needDelayedRequestForInterceptors = interceptHandlers &&
|
|
234
222
|
!(0, mdm_sdk_1.isEmptyValue)(config.action) &&
|
|
235
|
-
|
|
236
|
-
(
|
|
223
|
+
platform !== mdm_sdk_1.CustomScriptPlatform.CLASSIC &&
|
|
224
|
+
(processApiRequest || processApiResponse);
|
|
237
225
|
if (needDelayedRequestForInterceptors) {
|
|
238
226
|
if (!pendingInterceptors.current && !workerRef.current) {
|
|
239
227
|
interceptHandlers.startInterceptorInit();
|
|
@@ -241,7 +229,7 @@ var useAPI = function (config) {
|
|
|
241
229
|
}
|
|
242
230
|
}
|
|
243
231
|
(0, react_1.useEffect)(function () {
|
|
244
|
-
if (
|
|
232
|
+
if ((0, helpers_1.isValidCustomScript)(config.action)) {
|
|
245
233
|
workerRef.current = (0, mdm_sdk_1.initializeWebWorker)(workerUrl, process, config);
|
|
246
234
|
if (pendingInterceptors.current) {
|
|
247
235
|
interceptHandlers.finishInterceptorInit();
|
|
@@ -270,30 +258,18 @@ var useAPI = function (config) {
|
|
|
270
258
|
postEventMessage('execute', null);
|
|
271
259
|
}, [config]);
|
|
272
260
|
(0, react_1.useEffect)(function () {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
addInternalRequestInterceptor(requestInterceptor);
|
|
287
|
-
addInternalResponseInterceptor(responseInterceptor);
|
|
288
|
-
workerRef.current.onerror = function () {
|
|
289
|
-
removeInternalRequestInterceptor_1(requestInterceptor);
|
|
290
|
-
removeInternalResponseInterceptor_1(responseInterceptor);
|
|
291
|
-
};
|
|
292
|
-
return function () {
|
|
293
|
-
removeInternalRequestInterceptor_1(requestInterceptor);
|
|
294
|
-
removeInternalResponseInterceptor_1(responseInterceptor);
|
|
295
|
-
};
|
|
296
|
-
}
|
|
261
|
+
if (!(0, mdm_sdk_1.isEmptyValue)(interceptHandlers) && (processApiRequest || processApiResponse)) {
|
|
262
|
+
var addInternalRequestInterceptor = interceptHandlers.addInternalRequestInterceptor, addInternalResponseInterceptor = interceptHandlers.addInternalResponseInterceptor, removeInternalRequestInterceptor_1 = interceptHandlers.removeInternalRequestInterceptor, removeInternalResponseInterceptor_1 = interceptHandlers.removeInternalResponseInterceptor;
|
|
263
|
+
addInternalRequestInterceptor(requestInterceptor);
|
|
264
|
+
addInternalResponseInterceptor(responseInterceptor);
|
|
265
|
+
workerRef.current.onerror = function () {
|
|
266
|
+
removeInternalRequestInterceptor_1(requestInterceptor);
|
|
267
|
+
removeInternalResponseInterceptor_1(responseInterceptor);
|
|
268
|
+
};
|
|
269
|
+
return function () {
|
|
270
|
+
removeInternalRequestInterceptor_1(requestInterceptor);
|
|
271
|
+
removeInternalResponseInterceptor_1(responseInterceptor);
|
|
272
|
+
};
|
|
297
273
|
}
|
|
298
274
|
}, [config]);
|
|
299
275
|
return { html: html, visible: visible, tooltip: tooltip, customStyles: customStyles, onClick: onClick, popup: popup };
|
|
@@ -65,12 +65,6 @@ var workflow_1 = require("../components/workflow");
|
|
|
65
65
|
var contexts_1 = require("../contexts");
|
|
66
66
|
var useAPI_1 = require("./useAPI");
|
|
67
67
|
var helpers_1 = require("./useAPI/helpers");
|
|
68
|
-
var isURLtoProcess = function (processApi, url) {
|
|
69
|
-
return (processApi || []).some(function (request) {
|
|
70
|
-
var regExp = new RegExp("^".concat(request, "$"));
|
|
71
|
-
return request.replace(/\/*$/, '') === url || (request && regExp.test(url));
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
68
|
var getCustomViewConfig = function (config) {
|
|
75
69
|
var processApiResponse = config.processApiResponse, processApiRequest = config.processApiRequest, permissions = config.permissions, files = config.files, otherProps = __rest(config, ["processApiResponse", "processApiRequest", "permissions", "files"]);
|
|
76
70
|
return __assign({ action: { processApiResponse: processApiResponse, processApiRequest: processApiRequest, permissions: permissions, files: files } }, otherProps);
|
|
@@ -78,7 +72,7 @@ var getCustomViewConfig = function (config) {
|
|
|
78
72
|
var useCustomScripts = function (config) {
|
|
79
73
|
var _a;
|
|
80
74
|
var customScripts = config.reduce(function (acc, customScript) {
|
|
81
|
-
if (
|
|
75
|
+
if ((0, helpers_1.isValidCustomScript)(customScript)) {
|
|
82
76
|
return __spreadArray(__spreadArray([], acc, true), [__assign(__assign({}, customScript), { actionId: (0, nanoid_1.nanoid)() })], false);
|
|
83
77
|
}
|
|
84
78
|
return acc;
|
|
@@ -118,16 +112,8 @@ var useCustomScripts = function (config) {
|
|
|
118
112
|
break;
|
|
119
113
|
}
|
|
120
114
|
case mdm_sdk_1.CustomAction.REQUEST: {
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
var isGlobalUrl = (0, ramda_1.startsWith)('/', (0, ramda_1.pathOr)('', ['params', 'url'], task)) &&
|
|
124
|
-
!(0, ramda_1.startsWith)(apiPath, (0, ramda_1.pathOr)('', ['params', 'url'], task));
|
|
125
|
-
var isApiAction = (0, ramda_1.pathEq)(['params', 'name'], mdm_sdk_1.RequestAction.API, task);
|
|
126
|
-
var processedParams = (0, ramda_1.pipe)((0, ramda_1.evolve)({
|
|
127
|
-
url: (0, ramda_1.ifElse)((0, ramda_1.both)((0, ramda_1.always)(isGlobalUrl), (0, ramda_1.always)(isApiAction)), (0, ramda_1.concat)("".concat(processedApiPath, "/api/").concat(tenant)), (0, ramda_1.replace)(reltioPath, apiPath))
|
|
128
|
-
}), (0, ramda_1.when)((0, ramda_1.has)('url'), (0, ramda_1.assocPath)(['validationUrl'], task.params.url)))(task.params);
|
|
129
|
-
var processedTask = __assign(__assign({}, task), { params: processedParams });
|
|
130
|
-
(0, useAPI_1.processRequest)(__assign({ name: processedTask.params.name, paramObject: processedTask, permissions: config.action.permissions, worker: worker, metadata: metadata, config: config, user: user, apiPath: reltioPath, servicesPath: servicesPath, tenant: tenant, workflowPath: workflowPath, entity: entity, entityUri: entityUri, environment: environment, query: typeSearch === 'search' ? search === null || search === void 0 ? void 0 : search.query : null, openSearch: openSearch, workflowCheckPermission: workflowCheckPermission }, qxApi));
|
|
115
|
+
var processedTask = (0, helpers_1.getProcessedTask)(task, apiPath, reltioPath, tenant);
|
|
116
|
+
(0, useAPI_1.processRequest)(__assign({ params: processedTask.params, permissions: config.action.permissions, worker: worker, metadata: metadata, config: config, user: user, apiPath: reltioPath, servicesPath: servicesPath, tenant: tenant, workflowPath: workflowPath, entity: entity, entityUri: entityUri, environment: environment, query: typeSearch === 'search' ? search === null || search === void 0 ? void 0 : search.query : null, openSearch: openSearch, workflowCheckPermission: workflowCheckPermission }, qxApi));
|
|
131
117
|
break;
|
|
132
118
|
}
|
|
133
119
|
case mdm_sdk_1.CustomAction.RETURN_PROCESSED_API_RESPONSE: {
|
|
@@ -166,14 +152,13 @@ var useCustomScripts = function (config) {
|
|
|
166
152
|
}, [config, metadata]);
|
|
167
153
|
var customScriptRequestInterceptor = function (_a) {
|
|
168
154
|
var _b;
|
|
169
|
-
var
|
|
170
|
-
var fakeURL =
|
|
171
|
-
|
|
172
|
-
: "".concat(reltioPath).concat(url.replace(apiPath, ''));
|
|
173
|
-
var actionId = (0, ramda_1.pipe)((0, ramda_1.map)((0, ramda_1.pick)(['actionId', 'processApiRequest'])), (0, ramda_1.find)(function (_a) {
|
|
155
|
+
var url = _a.url, next = _a.next, resolve = _a.resolve, options = _a.options;
|
|
156
|
+
var fakeURL = (0, helpers_1.getRequestFakeUrl)(url, apiPath, reltioPath, tenant);
|
|
157
|
+
var customScript = customScripts.find(function (_a) {
|
|
174
158
|
var processApiRequest = _a.processApiRequest;
|
|
175
|
-
return isURLtoProcess(
|
|
176
|
-
})
|
|
159
|
+
return (0, helpers_1.isURLtoProcess)(fakeURL, processApiRequest);
|
|
160
|
+
});
|
|
161
|
+
var actionId = customScript === null || customScript === void 0 ? void 0 : customScript.actionId;
|
|
177
162
|
if (actionId) {
|
|
178
163
|
var requestId = (0, nanoid_1.nanoid)();
|
|
179
164
|
requestListeners.current = __assign(__assign({}, requestListeners.current), (_b = {}, _b[requestId] = { options: options, next: next, id: requestId, resolve: resolve }, _b));
|
|
@@ -182,7 +167,7 @@ var useCustomScripts = function (config) {
|
|
|
182
167
|
id: requestId,
|
|
183
168
|
url: fakeURL,
|
|
184
169
|
method: options.method,
|
|
185
|
-
headers: __assign(__assign({}, options.headers), {
|
|
170
|
+
headers: __assign(__assign({}, options.headers), { actionId: actionId }),
|
|
186
171
|
data: options.body || options.data
|
|
187
172
|
});
|
|
188
173
|
}
|
|
@@ -191,20 +176,26 @@ var useCustomScripts = function (config) {
|
|
|
191
176
|
}
|
|
192
177
|
};
|
|
193
178
|
var customScriptResponseInterceptor = function (_a) {
|
|
194
|
-
var _b;
|
|
195
179
|
var url = _a.url, response = _a.response, next = _a.next, options = _a.options, abort = _a.abort;
|
|
196
|
-
|
|
180
|
+
var fakeURL = (0, helpers_1.getResponseFakeUrl)(url, apiPath, reltioPath);
|
|
181
|
+
var customScript = customScripts.find(function (_a) {
|
|
182
|
+
var processApiResponse = _a.processApiResponse;
|
|
183
|
+
return (0, helpers_1.isURLtoProcess)(fakeURL, processApiResponse);
|
|
184
|
+
});
|
|
185
|
+
var actionId = customScript === null || customScript === void 0 ? void 0 : customScript.actionId;
|
|
186
|
+
if (actionId) {
|
|
187
|
+
var responseId_1 = (0, nanoid_1.nanoid)();
|
|
197
188
|
response
|
|
198
189
|
.json()
|
|
199
190
|
.then(function (data) {
|
|
200
191
|
var _a;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
192
|
+
responseListeners.current = __assign(__assign({}, responseListeners.current), (_a = {}, _a[responseId_1] = { next: next }, _a));
|
|
193
|
+
workers.current[actionId].postMessage({
|
|
194
|
+
action: 'apiResponse',
|
|
195
|
+
id: responseId_1,
|
|
196
|
+
url: fakeURL,
|
|
197
|
+
method: options.method,
|
|
198
|
+
data: data
|
|
208
199
|
});
|
|
209
200
|
})
|
|
210
201
|
.catch(function (error) {
|
|
@@ -212,33 +203,7 @@ var useCustomScripts = function (config) {
|
|
|
212
203
|
});
|
|
213
204
|
}
|
|
214
205
|
else {
|
|
215
|
-
|
|
216
|
-
var actionId_1 = (0, ramda_1.pipe)((0, ramda_1.map)((0, ramda_1.pick)(['actionId', 'processApiResponse'])), (0, ramda_1.find)(function (_a) {
|
|
217
|
-
var processApiResponse = _a.processApiResponse;
|
|
218
|
-
return isURLtoProcess(processApiResponse, fakeURL_1);
|
|
219
|
-
}), (0, ramda_1.prop)('actionId'))(customScripts);
|
|
220
|
-
if (actionId_1) {
|
|
221
|
-
var responseId_1 = (0, nanoid_1.nanoid)();
|
|
222
|
-
response
|
|
223
|
-
.json()
|
|
224
|
-
.then(function (data) {
|
|
225
|
-
var _a;
|
|
226
|
-
responseListeners.current = __assign(__assign({}, responseListeners.current), (_a = {}, _a[responseId_1] = { next: next }, _a));
|
|
227
|
-
workers.current[actionId_1].postMessage({
|
|
228
|
-
action: 'apiResponse',
|
|
229
|
-
id: responseId_1,
|
|
230
|
-
url: fakeURL_1,
|
|
231
|
-
method: options.method,
|
|
232
|
-
data: data
|
|
233
|
-
});
|
|
234
|
-
})
|
|
235
|
-
.catch(function (error) {
|
|
236
|
-
abort(error);
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
next(response);
|
|
241
|
-
}
|
|
206
|
+
next(response);
|
|
242
207
|
}
|
|
243
208
|
};
|
|
244
209
|
(0, react_1.useEffect)(function () {
|
|
@@ -33,6 +33,8 @@ type Props = {
|
|
|
33
33
|
style?: ListItemProps['style'];
|
|
34
34
|
LogoIcon?: React.ElementType;
|
|
35
35
|
className?: string;
|
|
36
|
+
disableNonSelectable?: boolean;
|
|
37
|
+
disableGutters?: boolean;
|
|
36
38
|
};
|
|
37
|
-
declare const _default: React.MemoExoticComponent<({ groupId, data, checked, isFocused, isRequired, label, labelInText, level, onClick, hideCheckBox, hideIcon, notSelectable, disableHorizontalScrollbar, style, subItemMargin, LogoIcon, className }: Props) => JSX.Element>;
|
|
39
|
+
declare const _default: React.MemoExoticComponent<({ groupId, data, checked, isFocused, isRequired, label, labelInText, level, onClick, hideCheckBox, hideIcon, notSelectable, disableHorizontalScrollbar, style, subItemMargin, LogoIcon, className, disableNonSelectable, disableGutters }: Props) => JSX.Element>;
|
|
38
40
|
export default _default;
|
|
@@ -16,7 +16,7 @@ import { useStyles } from './styles';
|
|
|
16
16
|
export var RecommendedIconWithTooltip = withTooltip(RecommendedIcon);
|
|
17
17
|
var AttributeListItem = function (_a) {
|
|
18
18
|
var _b, _c, _d;
|
|
19
|
-
var groupId = _a.groupId, data = _a.data, _e = _a.checked, checked = _e === void 0 ? false : _e, _f = _a.isFocused, isFocused = _f === void 0 ? false : _f, _g = _a.isRequired, isRequired = _g === void 0 ? false : _g, label = _a.label, labelInText = _a.labelInText, level = _a.level, _h = _a.onClick, onClick = _h === void 0 ? noop : _h, _j = _a.hideCheckBox, hideCheckBox = _j === void 0 ? false : _j, _k = _a.hideIcon, hideIcon = _k === void 0 ? false : _k, _l = _a.notSelectable, notSelectable = _l === void 0 ? false : _l, _m = _a.disableHorizontalScrollbar, disableHorizontalScrollbar = _m === void 0 ? false : _m, _o = _a.style, style = _o === void 0 ? {} : _o, _p = _a.subItemMargin, subItemMargin = _p === void 0 ? 20 : _p, LogoIcon = _a.LogoIcon, className = _a.className;
|
|
19
|
+
var groupId = _a.groupId, data = _a.data, _e = _a.checked, checked = _e === void 0 ? false : _e, _f = _a.isFocused, isFocused = _f === void 0 ? false : _f, _g = _a.isRequired, isRequired = _g === void 0 ? false : _g, label = _a.label, labelInText = _a.labelInText, level = _a.level, _h = _a.onClick, onClick = _h === void 0 ? noop : _h, _j = _a.hideCheckBox, hideCheckBox = _j === void 0 ? false : _j, _k = _a.hideIcon, hideIcon = _k === void 0 ? false : _k, _l = _a.notSelectable, notSelectable = _l === void 0 ? false : _l, _m = _a.disableHorizontalScrollbar, disableHorizontalScrollbar = _m === void 0 ? false : _m, _o = _a.style, style = _o === void 0 ? {} : _o, _p = _a.subItemMargin, subItemMargin = _p === void 0 ? 20 : _p, LogoIcon = _a.LogoIcon, className = _a.className, disableNonSelectable = _a.disableNonSelectable, disableGutters = _a.disableGutters;
|
|
20
20
|
var styles = useStyles();
|
|
21
21
|
var attrType = (data || {}).attrType;
|
|
22
22
|
var isButton = (!hideCheckBox || !isNested(attrType)) && !notSelectable;
|
|
@@ -27,10 +27,10 @@ var AttributeListItem = function (_a) {
|
|
|
27
27
|
};
|
|
28
28
|
// TODO: ListItem needs to be split to ListItem and ListItemButton after material ui releases stable version(https://github.com/mui-org/material-ui/pull/26446). The "button" prop will be deprecated.
|
|
29
29
|
return (React.createElement(ExpandedValueTooltip, { value: labelInText || label, className: styles.itemTooltip, placement: "bottom-end" },
|
|
30
|
-
React.createElement(ListItem, { className: classnames(styles.container, styles.listItem, (_b = {}, _b[styles.defaultCursor] = !isButton, _b), className), onClick: isButton ? handleItemClick : undefined, style: style, dense: true, button: isButton, classes: {
|
|
30
|
+
React.createElement(ListItem, { className: classnames(styles.container, styles.listItem, (_b = {}, _b[styles.defaultCursor] = !isButton, _b), className), onClick: isButton ? handleItemClick : undefined, style: style, dense: true, button: isButton, disabled: disableNonSelectable && notSelectable, classes: {
|
|
31
31
|
focusVisible: styles.listItemFocus,
|
|
32
32
|
selected: styles.listItemFocus
|
|
33
|
-
}, selected: isFocused, tabIndex: -1 },
|
|
33
|
+
}, selected: isFocused, tabIndex: -1, disableGutters: disableGutters },
|
|
34
34
|
!hideCheckBox && (React.createElement(Checkbox, { checked: checked, disableRipple: true, disabled: !isButton, className: classnames(styles.checkbox, (_c = {}, _c[styles.checked] = checked, _c)), tabIndex: -1 })),
|
|
35
35
|
React.createElement(Marginator, { margin: subItemMargin, level: level, className: styles.marginWrapper },
|
|
36
36
|
React.createElement(React.Fragment, null,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProcessRequestParams } from './types';
|
|
2
|
-
export declare const processRequest: ({
|
|
2
|
+
export declare const processRequest: ({ params, permissions, worker, metadata, config, apiPath, servicesPath, user, workflowPath, entity, tenant, entityUri, query, openSearch, environment, getCurrentPerspectiveId, showPerspective, workflowCheckPermission, setEntityUri }: ProcessRequestParams) => void;
|