@reltio/components 1.4.1101 → 1.4.1104
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/ActionButton/styles.d.ts +1 -1
- package/cjs/components/AttributesFiltersButton/ActionButtons/styles.d.ts +1 -1
- package/cjs/components/DropDownSelector/styles.d.ts +1 -1
- package/cjs/components/MatchRulesBlock/MatchRulesBadge/MatchRulesBadge.js +2 -1
- package/cjs/components/MatchRulesBlock/MatchRulesBadge/styles.d.ts +1 -1
- package/cjs/components/MatchRulesBlock/MatchRulesBadge/styles.js +5 -3
- package/cjs/components/MergeButton/MergeButton.d.ts +1 -0
- package/cjs/components/ModeSwitcherSelect/styles.d.ts +1 -1
- package/cjs/components/NotMatchButton/NotMatchButton.d.ts +1 -0
- package/cjs/components/Popper/styles.d.ts +1 -1
- package/cjs/components/ProfileBand/styles.d.ts +1 -1
- package/cjs/components/ProfileCard/styles.d.ts +1 -1
- package/cjs/components/ProfileMatchCard/styles.d.ts +1 -1
- package/cjs/components/ProfileMatchCard/styles.js +2 -1
- package/cjs/components/VerticalHeadingsTable/VerticalHeadingsTable.d.ts +5 -1
- package/cjs/components/VerticalHeadingsTable/VerticalHeadingsTable.js +5 -3
- package/cjs/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
- package/cjs/components/attributes/editMode/MoreAttributesButton/styles.d.ts +1 -1
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/styles.d.ts +1 -1
- package/cjs/components/crosswalks/CrosswalkAttributes/styles.d.ts +1 -1
- package/cjs/components/editors/CustomDateRangeEditor/styles.d.ts +1 -1
- package/cjs/components/editors/DateEditor/styles.d.ts +1 -1
- package/cjs/components/editors/DateRangeEditor/styles.d.ts +1 -1
- package/cjs/components/editors/TimestampEditor/styles.d.ts +1 -1
- package/cjs/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
- package/cjs/components/workflow/components/AddWorkflowDialog/styles.d.ts +1 -1
- package/cjs/components/workflow/components/DueDateField/styles.d.ts +1 -1
- package/cjs/components/workflow/components/LineDecorator/styles.d.ts +1 -1
- package/cjs/contexts/SandboxAPIContext/index.d.ts +6 -0
- package/cjs/contexts/SandboxAPIContext/index.js +12 -0
- package/cjs/contexts/index.d.ts +1 -0
- package/cjs/contexts/index.js +3 -1
- package/cjs/hooks/index.d.ts +3 -0
- package/cjs/hooks/index.js +6 -1
- package/cjs/hooks/useAPI/API.d.ts +2 -0
- package/cjs/hooks/useAPI/API.js +201 -0
- package/cjs/hooks/useAPI/helpers.d.ts +1 -0
- package/cjs/hooks/useAPI/helpers.js +12 -0
- package/cjs/hooks/useAPI/index.d.ts +5 -0
- package/cjs/hooks/useAPI/index.js +11 -0
- package/cjs/hooks/useAPI/types.d.ts +90 -0
- package/cjs/hooks/useAPI/types.js +42 -0
- package/cjs/hooks/useAPI/useAPI.d.ts +13 -0
- package/cjs/hooks/useAPI/useAPI.js +192 -0
- package/cjs/hooks/useCustomScripts.d.ts +9 -0
- package/cjs/hooks/useCustomScripts.js +215 -0
- package/esm/components/ActionButton/styles.d.ts +1 -1
- package/esm/components/AttributesFiltersButton/ActionButtons/styles.d.ts +1 -1
- package/esm/components/DropDownSelector/styles.d.ts +1 -1
- package/esm/components/MatchRulesBlock/MatchRulesBadge/MatchRulesBadge.js +2 -1
- package/esm/components/MatchRulesBlock/MatchRulesBadge/styles.d.ts +1 -1
- package/esm/components/MatchRulesBlock/MatchRulesBadge/styles.js +5 -3
- package/esm/components/MergeButton/MergeButton.d.ts +1 -0
- package/esm/components/ModeSwitcherSelect/styles.d.ts +1 -1
- package/esm/components/NotMatchButton/NotMatchButton.d.ts +1 -0
- package/esm/components/Popper/styles.d.ts +1 -1
- package/esm/components/ProfileBand/styles.d.ts +1 -1
- package/esm/components/ProfileCard/styles.d.ts +1 -1
- package/esm/components/ProfileMatchCard/styles.d.ts +1 -1
- package/esm/components/ProfileMatchCard/styles.js +2 -1
- package/esm/components/VerticalHeadingsTable/VerticalHeadingsTable.d.ts +5 -1
- package/esm/components/VerticalHeadingsTable/VerticalHeadingsTable.js +5 -3
- package/esm/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
- package/esm/components/attributes/editMode/MoreAttributesButton/styles.d.ts +1 -1
- package/esm/components/attributes/editMode/SimpleAttributeEditor/styles.d.ts +1 -1
- package/esm/components/crosswalks/CrosswalkAttributes/styles.d.ts +1 -1
- package/esm/components/editors/CustomDateRangeEditor/styles.d.ts +1 -1
- package/esm/components/editors/DateEditor/styles.d.ts +1 -1
- package/esm/components/editors/DateRangeEditor/styles.d.ts +1 -1
- package/esm/components/editors/TimestampEditor/styles.d.ts +1 -1
- package/esm/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
- package/esm/components/workflow/components/AddWorkflowDialog/styles.d.ts +1 -1
- package/esm/components/workflow/components/DueDateField/styles.d.ts +1 -1
- package/esm/components/workflow/components/LineDecorator/styles.d.ts +1 -1
- package/esm/contexts/SandboxAPIContext/index.d.ts +6 -0
- package/esm/contexts/SandboxAPIContext/index.js +6 -0
- package/esm/contexts/index.d.ts +1 -0
- package/esm/contexts/index.js +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.js +2 -0
- package/esm/hooks/useAPI/API.d.ts +2 -0
- package/esm/hooks/useAPI/API.js +197 -0
- package/esm/hooks/useAPI/helpers.d.ts +1 -0
- package/esm/hooks/useAPI/helpers.js +8 -0
- package/esm/hooks/useAPI/index.d.ts +5 -0
- package/esm/hooks/useAPI/index.js +4 -0
- package/esm/hooks/useAPI/types.d.ts +90 -0
- package/esm/hooks/useAPI/types.js +39 -0
- package/esm/hooks/useAPI/useAPI.d.ts +13 -0
- package/esm/hooks/useAPI/useAPI.js +169 -0
- package/esm/hooks/useCustomScripts.d.ts +9 -0
- package/esm/hooks/useCustomScripts.js +189 -0
- package/package.json +3 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { CustomScript, CustomViewConfig, PrimitiveValue } from '@reltio/mdm-sdk';
|
|
2
|
+
export declare enum RequestAction {
|
|
3
|
+
WORKFLOW = "workflow",
|
|
4
|
+
WORKFLOW_START_PROCESS_FROM_QUERY = "workflow/startProcessFromQuery",
|
|
5
|
+
API = "api",
|
|
6
|
+
GET_ENTITY_URI = "getEntityUri",
|
|
7
|
+
GET_ENTITY = "getEntity",
|
|
8
|
+
GET_API_PATH = "getApiPath",
|
|
9
|
+
WORKFLOW_GET_WORKFLOW_PATH = "workflow/getWorkflowPath",
|
|
10
|
+
GET_SEARCH_QUERY = "getSearchQuery",
|
|
11
|
+
GET_TENANT = "getTenant",
|
|
12
|
+
GET_USER = "getUser",
|
|
13
|
+
GET_PERSPECTIVE = "getPerspective",
|
|
14
|
+
SET_PERSPECTIVE = "setPerspective",
|
|
15
|
+
SET_ENTITY_URI = "setEntityUri",
|
|
16
|
+
ALERT = "alert",
|
|
17
|
+
CONFIRM = "confirm",
|
|
18
|
+
PROMPT = "prompt",
|
|
19
|
+
OPEN_WINDOW = "openWindow",
|
|
20
|
+
GET_CONFIGURATION = "getConfiguration",
|
|
21
|
+
GET_UI_CONFIGURATION = "getUiConfiguration",
|
|
22
|
+
OPEN_SEARCH = "openSearch",
|
|
23
|
+
WORKFLOW_CHECK_PERMISSION = "workflow/checkPermission"
|
|
24
|
+
}
|
|
25
|
+
export declare type Params = {
|
|
26
|
+
url?: string;
|
|
27
|
+
name?: RequestAction;
|
|
28
|
+
id?: string | number;
|
|
29
|
+
method?: 'PUT' | 'DELETE' | 'GET' | 'POST';
|
|
30
|
+
data?: {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
headers?: {
|
|
34
|
+
[key: string]: string;
|
|
35
|
+
};
|
|
36
|
+
processDefinitionId?: string;
|
|
37
|
+
searchString?: string;
|
|
38
|
+
perspective?: string;
|
|
39
|
+
permission?: string;
|
|
40
|
+
searchState?: unknown;
|
|
41
|
+
defaultText?: string;
|
|
42
|
+
text?: string;
|
|
43
|
+
html?: string;
|
|
44
|
+
};
|
|
45
|
+
export declare type ProcessRequestParams = {
|
|
46
|
+
name: RequestAction;
|
|
47
|
+
paramObject: {
|
|
48
|
+
params: Params;
|
|
49
|
+
};
|
|
50
|
+
permissions?: string[];
|
|
51
|
+
worker: Worker;
|
|
52
|
+
metadata: any;
|
|
53
|
+
config: CustomViewConfig | {
|
|
54
|
+
action: CustomScript;
|
|
55
|
+
};
|
|
56
|
+
user: any;
|
|
57
|
+
apiPath: string;
|
|
58
|
+
workflowPath: string;
|
|
59
|
+
environment: string;
|
|
60
|
+
entity: any;
|
|
61
|
+
tenant: any;
|
|
62
|
+
entityUri: string;
|
|
63
|
+
query: any;
|
|
64
|
+
openSearch: (search: any) => void;
|
|
65
|
+
workflowCheckPermission: (permission?: string) => boolean;
|
|
66
|
+
getCurrentPerspectiveId: () => string;
|
|
67
|
+
showPerspective: (perspective: any) => void;
|
|
68
|
+
setEntityUri: (entityUri: string, listener: () => void) => void;
|
|
69
|
+
};
|
|
70
|
+
export declare enum CustomAction {
|
|
71
|
+
SET_HTML = "setHtml",
|
|
72
|
+
LOG = "log",
|
|
73
|
+
SET_VISIBILITY = "setVisibility",
|
|
74
|
+
MESSAGE = "message",
|
|
75
|
+
SET_ENABLED = "setEnabled",
|
|
76
|
+
SET_TOOLTIP = "setToolTip",
|
|
77
|
+
SET_LABEL = "setLabel",
|
|
78
|
+
SET_HEIGHT = "setHeight",
|
|
79
|
+
SET_WIDTH = "setWidth",
|
|
80
|
+
RETURN_PROCESSED_API_RESPONSE = "returnProcessedApiResponse",
|
|
81
|
+
RETURN_PROCESSED_API_REQUEST = "returnProcessedApiRequest",
|
|
82
|
+
REQUEST = "request"
|
|
83
|
+
}
|
|
84
|
+
export declare type CustomActionTask = {
|
|
85
|
+
action: CustomAction;
|
|
86
|
+
params: Params | PrimitiveValue;
|
|
87
|
+
};
|
|
88
|
+
export declare type Request = Omit<CustomActionTask, 'params'> & {
|
|
89
|
+
params: Params;
|
|
90
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomAction = exports.RequestAction = void 0;
|
|
4
|
+
var RequestAction;
|
|
5
|
+
(function (RequestAction) {
|
|
6
|
+
RequestAction["WORKFLOW"] = "workflow";
|
|
7
|
+
RequestAction["WORKFLOW_START_PROCESS_FROM_QUERY"] = "workflow/startProcessFromQuery";
|
|
8
|
+
RequestAction["API"] = "api";
|
|
9
|
+
RequestAction["GET_ENTITY_URI"] = "getEntityUri";
|
|
10
|
+
RequestAction["GET_ENTITY"] = "getEntity";
|
|
11
|
+
RequestAction["GET_API_PATH"] = "getApiPath";
|
|
12
|
+
RequestAction["WORKFLOW_GET_WORKFLOW_PATH"] = "workflow/getWorkflowPath";
|
|
13
|
+
RequestAction["GET_SEARCH_QUERY"] = "getSearchQuery";
|
|
14
|
+
RequestAction["GET_TENANT"] = "getTenant";
|
|
15
|
+
RequestAction["GET_USER"] = "getUser";
|
|
16
|
+
RequestAction["GET_PERSPECTIVE"] = "getPerspective";
|
|
17
|
+
RequestAction["SET_PERSPECTIVE"] = "setPerspective";
|
|
18
|
+
RequestAction["SET_ENTITY_URI"] = "setEntityUri";
|
|
19
|
+
RequestAction["ALERT"] = "alert";
|
|
20
|
+
RequestAction["CONFIRM"] = "confirm";
|
|
21
|
+
RequestAction["PROMPT"] = "prompt";
|
|
22
|
+
RequestAction["OPEN_WINDOW"] = "openWindow";
|
|
23
|
+
RequestAction["GET_CONFIGURATION"] = "getConfiguration";
|
|
24
|
+
RequestAction["GET_UI_CONFIGURATION"] = "getUiConfiguration";
|
|
25
|
+
RequestAction["OPEN_SEARCH"] = "openSearch";
|
|
26
|
+
RequestAction["WORKFLOW_CHECK_PERMISSION"] = "workflow/checkPermission";
|
|
27
|
+
})(RequestAction = exports.RequestAction || (exports.RequestAction = {}));
|
|
28
|
+
var CustomAction;
|
|
29
|
+
(function (CustomAction) {
|
|
30
|
+
CustomAction["SET_HTML"] = "setHtml";
|
|
31
|
+
CustomAction["LOG"] = "log";
|
|
32
|
+
CustomAction["SET_VISIBILITY"] = "setVisibility";
|
|
33
|
+
CustomAction["MESSAGE"] = "message";
|
|
34
|
+
CustomAction["SET_ENABLED"] = "setEnabled";
|
|
35
|
+
CustomAction["SET_TOOLTIP"] = "setToolTip";
|
|
36
|
+
CustomAction["SET_LABEL"] = "setLabel";
|
|
37
|
+
CustomAction["SET_HEIGHT"] = "setHeight";
|
|
38
|
+
CustomAction["SET_WIDTH"] = "setWidth";
|
|
39
|
+
CustomAction["RETURN_PROCESSED_API_RESPONSE"] = "returnProcessedApiResponse";
|
|
40
|
+
CustomAction["RETURN_PROCESSED_API_REQUEST"] = "returnProcessedApiRequest";
|
|
41
|
+
CustomAction["REQUEST"] = "request";
|
|
42
|
+
})(CustomAction = exports.CustomAction || (exports.CustomAction = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CustomViewConfig } from '@reltio/mdm-sdk';
|
|
2
|
+
export declare const useAPI: (config: CustomViewConfig) => {
|
|
3
|
+
html: HTMLElement;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
tooltip: string;
|
|
6
|
+
customStyles: {
|
|
7
|
+
height?: number | string;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
'pointer-events'?: string;
|
|
10
|
+
};
|
|
11
|
+
message: string;
|
|
12
|
+
onClosePopup: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.useAPI = void 0;
|
|
34
|
+
var react_1 = require("react");
|
|
35
|
+
var react_redux_1 = require("react-redux");
|
|
36
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
37
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
38
|
+
var workflow_1 = require("../../components/workflow");
|
|
39
|
+
var contexts_1 = require("../../contexts");
|
|
40
|
+
var API_1 = require("./API");
|
|
41
|
+
var helpers_1 = require("./helpers");
|
|
42
|
+
var types_1 = require("./types");
|
|
43
|
+
var useAPI = function (config) {
|
|
44
|
+
var _a = config.action, files = _a.files, permissions = _a.permissions;
|
|
45
|
+
var _b = react_1.useState(), html = _b[0], setHtml = _b[1];
|
|
46
|
+
var _c = react_1.useState([]), listenersToReset = _c[0], setListenersToReset = _c[1];
|
|
47
|
+
var _d = react_1.useState(true), visible = _d[0], setVisible = _d[1];
|
|
48
|
+
var _e = react_1.useState(null), tooltip = _e[0], setTooltip = _e[1];
|
|
49
|
+
var _f = react_1.useState(null), customStyles = _f[0], setCustomStyles = _f[1];
|
|
50
|
+
var _g = react_1.useState(''), message = _g[0], setMessage = _g[1];
|
|
51
|
+
var dispatch = react_redux_1.useDispatch();
|
|
52
|
+
var metadata = react_redux_1.useSelector(mdm_module_1.default.selectors.getMetadata) || {};
|
|
53
|
+
var entity = react_redux_1.useSelector(mdm_module_1.default.selectors.getEntity) || {};
|
|
54
|
+
var uiPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getUIPath);
|
|
55
|
+
var tenant = react_redux_1.useSelector(mdm_module_1.default.selectors.getTenant);
|
|
56
|
+
var workerUrl = helpers_1.getWorkerURL(uiPath, tenant);
|
|
57
|
+
var apiPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getApiPath);
|
|
58
|
+
var workflowPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getWorkflowPath);
|
|
59
|
+
var user = react_redux_1.useSelector(mdm_module_1.default.selectors.getUser);
|
|
60
|
+
var entityUri = react_redux_1.useSelector(mdm_module_1.default.selectors.getEntityUri);
|
|
61
|
+
var environment = react_redux_1.useSelector(mdm_module_1.default.selectors.getWorkflowEnvironmentUrl);
|
|
62
|
+
var qxApi = react_1.useContext(contexts_1.SandboxAPIContext);
|
|
63
|
+
var workflowCheckPermission = workflow_1.useWorkflowCheckPermission();
|
|
64
|
+
var _h = react_redux_1.useSelector(mdm_module_1.default.selectors.getSearchProviderData) || {}, typeSearch = _h.type, search = _h.data;
|
|
65
|
+
var openSearch = function (search) { return dispatch(mdm_module_1.ui.actions.openSearch(search)); };
|
|
66
|
+
var process = function (task, worker, innerText) {
|
|
67
|
+
if (task) {
|
|
68
|
+
var handlersToReset_1 = [];
|
|
69
|
+
var processInnerHtml_1 = function (parent) {
|
|
70
|
+
var uiActions = parent.getAttribute('ui-actions');
|
|
71
|
+
var uiTooltip = parent.getAttribute('ui-tooltip');
|
|
72
|
+
var id = parent.getAttribute('id') || parent.getAttribute('name');
|
|
73
|
+
if (uiActions) {
|
|
74
|
+
uiActions.split(',').forEach(function (uiAction) {
|
|
75
|
+
var handler = function () {
|
|
76
|
+
var data = {
|
|
77
|
+
action: 'event',
|
|
78
|
+
type: 'uiAction',
|
|
79
|
+
data: {
|
|
80
|
+
type: uiAction,
|
|
81
|
+
id: id
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
worker.postMessage(data);
|
|
85
|
+
};
|
|
86
|
+
parent.addEventListener(uiAction, handler);
|
|
87
|
+
handlersToReset_1.push(function () {
|
|
88
|
+
parent.removeEventListener(uiAction, handler);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
parent.removeAttribute('ui-actions');
|
|
92
|
+
}
|
|
93
|
+
if (uiTooltip) {
|
|
94
|
+
setTooltip(uiTooltip);
|
|
95
|
+
}
|
|
96
|
+
parent.childNodes.forEach(function (child) {
|
|
97
|
+
if (child.nodeType === 1) {
|
|
98
|
+
//Node.ELEMENT_NODE
|
|
99
|
+
processInnerHtml_1(child);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
var resetHtml = function (html) {
|
|
104
|
+
var docBlock = document.createElement('div');
|
|
105
|
+
docBlock.innerHTML = html || innerText;
|
|
106
|
+
processInnerHtml_1(docBlock);
|
|
107
|
+
setListenersToReset(handlersToReset_1);
|
|
108
|
+
setHtml(docBlock);
|
|
109
|
+
};
|
|
110
|
+
if (task.action === types_1.CustomAction.SET_HTML && innerText !== task.params.html) {
|
|
111
|
+
resetHtml(task.params.html);
|
|
112
|
+
}
|
|
113
|
+
switch (task.action) {
|
|
114
|
+
case types_1.CustomAction.LOG: {
|
|
115
|
+
console.log(task.params); //eslint-disable-line no-console
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case types_1.CustomAction.SET_VISIBILITY: {
|
|
119
|
+
if (task.params === 'visible') {
|
|
120
|
+
setVisible(true);
|
|
121
|
+
resetHtml();
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
setVisible(false);
|
|
125
|
+
}
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
case types_1.CustomAction.SET_TOOLTIP: {
|
|
129
|
+
setTooltip(task.params);
|
|
130
|
+
resetHtml();
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case types_1.CustomAction.SET_HEIGHT: {
|
|
134
|
+
setCustomStyles(function (prev) { return (__assign(__assign({}, (prev || {})), { height: task.params })); });
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
case types_1.CustomAction.SET_WIDTH: {
|
|
138
|
+
setCustomStyles(function (prev) { return (__assign(__assign({}, (prev || {})), { width: task.params })); });
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
case types_1.CustomAction.SET_ENABLED: {
|
|
142
|
+
setCustomStyles(function (prev) {
|
|
143
|
+
var newStyles = __assign({}, (prev || {}));
|
|
144
|
+
if (!task.params) {
|
|
145
|
+
newStyles['pointer-events'] = 'none';
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
delete newStyles['pointer-events'];
|
|
149
|
+
}
|
|
150
|
+
return newStyles;
|
|
151
|
+
});
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
case types_1.CustomAction.MESSAGE: {
|
|
155
|
+
setMessage(task.params);
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
case types_1.CustomAction.REQUEST: {
|
|
159
|
+
API_1.processRequest(__assign({ name: task.params.name, paramObject: task, permissions: permissions,
|
|
160
|
+
worker: worker,
|
|
161
|
+
metadata: metadata, config: config, user: user,
|
|
162
|
+
apiPath: apiPath,
|
|
163
|
+
tenant: tenant,
|
|
164
|
+
workflowPath: workflowPath,
|
|
165
|
+
entity: entity,
|
|
166
|
+
entityUri: entityUri,
|
|
167
|
+
environment: environment, query: typeSearch === 'search' ? search === null || search === void 0 ? void 0 : search.query : null, openSearch: openSearch,
|
|
168
|
+
workflowCheckPermission: workflowCheckPermission }, qxApi));
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
react_1.useEffect(function () {
|
|
175
|
+
var worker = mdm_sdk_1.initializeWebWorker(workerUrl, files, process);
|
|
176
|
+
return function () {
|
|
177
|
+
worker.terminate();
|
|
178
|
+
};
|
|
179
|
+
}, []);
|
|
180
|
+
react_1.useEffect(function () { return function () {
|
|
181
|
+
listenersToReset.forEach(function (listener) { return listener(); });
|
|
182
|
+
}; }, [listenersToReset]);
|
|
183
|
+
return {
|
|
184
|
+
html: html,
|
|
185
|
+
visible: visible,
|
|
186
|
+
tooltip: tooltip,
|
|
187
|
+
customStyles: customStyles,
|
|
188
|
+
message: message,
|
|
189
|
+
onClosePopup: function () { return setMessage(''); }
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
exports.useAPI = useAPI;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequestProvider, CustomScript } from '@reltio/mdm-sdk';
|
|
2
|
+
declare type InterceptHandlers = {
|
|
3
|
+
addInternalRequestInterceptor: ReturnType<typeof createRequestProvider>['addRequestInterceptor'];
|
|
4
|
+
addInternalResponseInterceptor: ReturnType<typeof createRequestProvider>['addResponseInterceptor'];
|
|
5
|
+
removeInternalRequestInterceptor: ReturnType<typeof createRequestProvider>['removeRequestInterceptor'];
|
|
6
|
+
removeInternalResponseInterceptor: ReturnType<typeof createRequestProvider>['removeResponseInterceptor'];
|
|
7
|
+
};
|
|
8
|
+
export declare const useCustomScripts: (config: CustomScript[], { addInternalRequestInterceptor, addInternalResponseInterceptor, removeInternalRequestInterceptor, removeInternalResponseInterceptor }: InterceptHandlers) => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useCustomScripts = void 0;
|
|
37
|
+
var react_1 = require("react");
|
|
38
|
+
var react_redux_1 = require("react-redux");
|
|
39
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
40
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
41
|
+
var nanoid_1 = __importDefault(require("nanoid"));
|
|
42
|
+
var ramda_1 = require("ramda");
|
|
43
|
+
var workflow_1 = require("../components/workflow");
|
|
44
|
+
var contexts_1 = require("../contexts");
|
|
45
|
+
var useAPI_1 = require("./useAPI");
|
|
46
|
+
var isURLtoProcess = function (processApi, url) {
|
|
47
|
+
return (processApi || []).some(function (request) {
|
|
48
|
+
var regExp = new RegExp("^" + request + "$");
|
|
49
|
+
return request.replace(/\/*$/, '') === url || (request && regExp.test(url));
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var useCustomScripts = function (config, _a) {
|
|
53
|
+
var addInternalRequestInterceptor = _a.addInternalRequestInterceptor, addInternalResponseInterceptor = _a.addInternalResponseInterceptor, removeInternalRequestInterceptor = _a.removeInternalRequestInterceptor, removeInternalResponseInterceptor = _a.removeInternalResponseInterceptor;
|
|
54
|
+
var customScripts = config.map(function (customScript) { return (__assign(__assign({}, customScript), { actionId: nanoid_1.default() })); });
|
|
55
|
+
var dispatch = react_redux_1.useDispatch();
|
|
56
|
+
var metadata = react_redux_1.useSelector(mdm_module_1.default.selectors.getMetadata) || {};
|
|
57
|
+
var entity = react_redux_1.useSelector(mdm_module_1.default.selectors.getEntity) || {};
|
|
58
|
+
var uiPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getUIPath);
|
|
59
|
+
var reltioPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getReltioPath);
|
|
60
|
+
var tenant = react_redux_1.useSelector(mdm_module_1.default.selectors.getTenant);
|
|
61
|
+
var workerUrl = useAPI_1.getWorkerURL(uiPath, tenant);
|
|
62
|
+
var apiPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getApiPath);
|
|
63
|
+
var workflowPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getWorkflowPath);
|
|
64
|
+
var user = react_redux_1.useSelector(mdm_module_1.default.selectors.getUser);
|
|
65
|
+
var entityUri = react_redux_1.useSelector(mdm_module_1.default.selectors.getEntityUri);
|
|
66
|
+
var environment = react_redux_1.useSelector(mdm_module_1.default.selectors.getWorkflowEnvironmentUrl);
|
|
67
|
+
var qxApi = react_1.useContext(contexts_1.SandboxAPIContext);
|
|
68
|
+
var workflowCheckPermission = workflow_1.useWorkflowCheckPermission();
|
|
69
|
+
var _b = react_redux_1.useSelector(mdm_module_1.default.selectors.getSearchProviderData) || {}, typeSearch = _b.type, search = _b.data;
|
|
70
|
+
var openSearch = function (search) { return dispatch(mdm_module_1.ui.actions.openSearch(search)); };
|
|
71
|
+
var requestListeners = react_1.useRef({});
|
|
72
|
+
var responseListeners = react_1.useRef({});
|
|
73
|
+
var workers = react_1.useRef({});
|
|
74
|
+
var process = function (task, worker) {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
if (task) {
|
|
77
|
+
switch (task.action) {
|
|
78
|
+
case useAPI_1.CustomAction.REQUEST: {
|
|
79
|
+
if (((_b = (_a = task.params) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.origin) !== 'ui') {
|
|
80
|
+
useAPI_1.processRequest(__assign({ name: task.params.name, paramObject: task, permissions: customScripts[0].permissions, worker: worker,
|
|
81
|
+
metadata: metadata, config: { action: customScripts[0] }, user: user,
|
|
82
|
+
apiPath: apiPath,
|
|
83
|
+
tenant: tenant,
|
|
84
|
+
workflowPath: workflowPath,
|
|
85
|
+
entity: entity,
|
|
86
|
+
entityUri: entityUri,
|
|
87
|
+
environment: environment, query: typeSearch === 'search' ? search === null || search === void 0 ? void 0 : search.query : null, openSearch: openSearch,
|
|
88
|
+
workflowCheckPermission: workflowCheckPermission }, qxApi));
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
var _c = task.params, headers = _c.headers, id = _c.id, fakeURL = _c.url, method = _c.method, data = _c.data;
|
|
92
|
+
var url = fakeURL.replace(reltioPath, apiPath);
|
|
93
|
+
if (requestListeners.current[headers.requestId]) {
|
|
94
|
+
requestListeners.current[headers.requestId].next(url, __assign(__assign({}, data), { id: id,
|
|
95
|
+
task: task,
|
|
96
|
+
headers: headers,
|
|
97
|
+
method: method }));
|
|
98
|
+
requestListeners.current = ramda_1.omit([headers.requestId], requestListeners.current);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case useAPI_1.CustomAction.RETURN_PROCESSED_API_RESPONSE:
|
|
104
|
+
case useAPI_1.CustomAction.RETURN_PROCESSED_API_REQUEST: {
|
|
105
|
+
var _d = task.params, id = _d.id, data = _d.data;
|
|
106
|
+
if (responseListeners.current[id]) {
|
|
107
|
+
responseListeners.current[id].next(data);
|
|
108
|
+
responseListeners.current = ramda_1.omit([id], responseListeners.current);
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
react_1.useEffect(function () {
|
|
116
|
+
workers.current = customScripts.reduce(function (acc, customScript) {
|
|
117
|
+
var _a;
|
|
118
|
+
acc = __assign(__assign({}, acc), (_a = {}, _a[customScript.actionId] = mdm_sdk_1.initializeWebWorker(workerUrl, customScript.files, process), _a));
|
|
119
|
+
return acc;
|
|
120
|
+
}, workers.current);
|
|
121
|
+
return function () {
|
|
122
|
+
Object.keys(workers.current).forEach(function (actionId) {
|
|
123
|
+
workers.current[actionId].terminate();
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
}, [config]);
|
|
127
|
+
var customScriptRequestInterceptor = function (_a) {
|
|
128
|
+
var _b;
|
|
129
|
+
var _c = _a.options, options = _c === void 0 ? {} : _c, url = _a.url, next = _a.next;
|
|
130
|
+
var fakeURL = url.startsWith('/') && !url.startsWith(apiPath)
|
|
131
|
+
? reltioPath + "/api/" + tenant + url
|
|
132
|
+
: "" + reltioPath + url.replace(apiPath, '');
|
|
133
|
+
var actionId = ramda_1.pipe(ramda_1.map(ramda_1.pick(['actionId', 'processApiRequest'])), ramda_1.find(function (_a) {
|
|
134
|
+
var processApiRequest = _a.processApiRequest;
|
|
135
|
+
return isURLtoProcess(processApiRequest, fakeURL);
|
|
136
|
+
}), ramda_1.prop('actionId'))(customScripts);
|
|
137
|
+
if (actionId) {
|
|
138
|
+
var requestId = nanoid_1.default();
|
|
139
|
+
requestListeners.current = __assign(__assign({}, requestListeners.current), (_b = {}, _b[requestId] = { options: options, next: next, id: requestId }, _b));
|
|
140
|
+
workers.current[actionId].postMessage({
|
|
141
|
+
action: 'apiRequest',
|
|
142
|
+
id: requestId,
|
|
143
|
+
url: fakeURL,
|
|
144
|
+
method: options.method,
|
|
145
|
+
headers: __assign(__assign({}, options.headers), { origin: 'ui', requestId: requestId, actionId: actionId }),
|
|
146
|
+
data: options
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
next(url, options);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
var customScriptResponseInterceptor = function (_a) {
|
|
154
|
+
var _b;
|
|
155
|
+
var url = _a.url, response = _a.response, next = _a.next, options = _a.options, abort = _a.abort;
|
|
156
|
+
if (((_b = options === null || options === void 0 ? void 0 : options.headers) === null || _b === void 0 ? void 0 : _b.origin) === 'ui') {
|
|
157
|
+
response
|
|
158
|
+
.json()
|
|
159
|
+
.then(function (data) {
|
|
160
|
+
var _a;
|
|
161
|
+
var _b, _c, _d;
|
|
162
|
+
responseListeners.current = __assign(__assign({}, responseListeners.current), (_a = {}, _a[options.headers.requestId] = { next: next }, _a));
|
|
163
|
+
workers.current[(_b = options.headers) === null || _b === void 0 ? void 0 : _b.actionId].postMessage({
|
|
164
|
+
action: 'response',
|
|
165
|
+
result: { data: data },
|
|
166
|
+
id: options === null || options === void 0 ? void 0 : options.id,
|
|
167
|
+
name: (_d = (_c = options === null || options === void 0 ? void 0 : options.task) === null || _c === void 0 ? void 0 : _c.params) === null || _d === void 0 ? void 0 : _d.name
|
|
168
|
+
});
|
|
169
|
+
})
|
|
170
|
+
.catch(function (error) {
|
|
171
|
+
abort(error);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
var fakeURL_1 = "" + reltioPath + url.replace(apiPath, '');
|
|
176
|
+
var actionId_1 = ramda_1.pipe(ramda_1.map(ramda_1.pick(['actionId', 'processApiResponse'])), ramda_1.find(function (_a) {
|
|
177
|
+
var processApiResponse = _a.processApiResponse;
|
|
178
|
+
return isURLtoProcess(processApiResponse, fakeURL_1);
|
|
179
|
+
}), ramda_1.prop('actionId'))(customScripts);
|
|
180
|
+
if (actionId_1) {
|
|
181
|
+
var responseId_1 = nanoid_1.default();
|
|
182
|
+
response
|
|
183
|
+
.json()
|
|
184
|
+
.then(function (data) {
|
|
185
|
+
var _a;
|
|
186
|
+
responseListeners.current = __assign(__assign({}, responseListeners.current), (_a = {}, _a[responseId_1] = { next: next }, _a));
|
|
187
|
+
workers.current[actionId_1].postMessage({
|
|
188
|
+
action: 'apiResponse',
|
|
189
|
+
id: responseId_1,
|
|
190
|
+
url: fakeURL_1,
|
|
191
|
+
method: options.method,
|
|
192
|
+
data: data
|
|
193
|
+
});
|
|
194
|
+
})
|
|
195
|
+
.catch(function (error) {
|
|
196
|
+
abort(error);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
next(response);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
react_1.useEffect(function () {
|
|
205
|
+
if (!mdm_sdk_1.isEmptyValue(config)) {
|
|
206
|
+
addInternalRequestInterceptor(customScriptRequestInterceptor);
|
|
207
|
+
addInternalResponseInterceptor(customScriptResponseInterceptor);
|
|
208
|
+
return function () {
|
|
209
|
+
removeInternalRequestInterceptor(customScriptRequestInterceptor);
|
|
210
|
+
removeInternalResponseInterceptor(customScriptResponseInterceptor);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}, [config]);
|
|
214
|
+
};
|
|
215
|
+
exports.useCustomScripts = useCustomScripts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "button" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "button" | "menuItem" | "menuText" | "startIcon" | "iconButton" | "overflowStyle" | "menuIcon">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"cancelButton" | "buttonsWrapper" | "applyButton" | "clearButon">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"inputLabel" | "formControl" | "control" | "valueContainer" | "dropdownIndicator" | "filledInputUnderline" | "filledInputRoot">;
|
|
2
2
|
export namespace customStyles {
|
|
3
3
|
function menu(baseStyles: any): any;
|
|
4
4
|
function menuList(baseStyles: any): any;
|
|
@@ -25,9 +25,10 @@ import classnames from 'classnames';
|
|
|
25
25
|
import ArrowExpandButton from '../../ArrowExpandButton/ArrowExpandButton';
|
|
26
26
|
import useStyles from './styles';
|
|
27
27
|
var MatchRulesBadge = forwardRef(function (_a, ref) {
|
|
28
|
+
var _b;
|
|
28
29
|
var children = _a.children, expanded = _a.expanded, onExpand = _a.onExpand, className = _a.className, otherProps = __rest(_a, ["children", "expanded", "onExpand", "className"]);
|
|
29
30
|
var styles = useStyles();
|
|
30
|
-
return (React.createElement("div", __assign({ onClick: onExpand, ref: ref, className: classnames(styles.container, className) }, otherProps),
|
|
31
|
+
return (React.createElement("div", __assign({ onClick: onExpand, ref: ref, className: classnames(styles.container, className, (_b = {}, _b[styles.expanded] = expanded, _b)) }, otherProps),
|
|
31
32
|
React.createElement(ArrowExpandButton, { expanded: expanded }),
|
|
32
33
|
React.createElement("div", { className: styles.label }, children)));
|
|
33
34
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "container">;
|
|
1
|
+
declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "expanded" | "container">;
|
|
2
2
|
export default styles;
|
|
@@ -4,16 +4,18 @@ var styles = makeStyles(function (theme) {
|
|
|
4
4
|
label: {
|
|
5
5
|
backgroundColor: 'rgba(43,152,240,0.12)',
|
|
6
6
|
fontSize: '12px',
|
|
7
|
-
lineHeight: '
|
|
7
|
+
lineHeight: '15px',
|
|
8
8
|
color: theme.palette.text.primary,
|
|
9
9
|
display: 'flex',
|
|
10
10
|
alignItems: 'center',
|
|
11
|
-
padding: '
|
|
11
|
+
padding: '2px 7px'
|
|
12
12
|
},
|
|
13
13
|
container: {
|
|
14
14
|
display: 'flex',
|
|
15
15
|
alignItems: 'center',
|
|
16
|
-
cursor: 'pointer'
|
|
16
|
+
cursor: 'pointer'
|
|
17
|
+
},
|
|
18
|
+
expanded: {
|
|
17
19
|
marginBottom: '8px'
|
|
18
20
|
}
|
|
19
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root" | "outlined" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root" | "outlined" | "menuItem" | "currentValue" | "arrowIcon" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"backdrop" | "popper">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default useStyles;
|
|
2
|
-
declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "entityType" | "secondaryLabel" | "inactive" | "
|
|
2
|
+
declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "entityType" | "secondaryLabel" | "inactive" | "entityId" | "badge" | "profileIcon" | "businessCard" | "profileBandWrapper" | "profileBand" | "imageProfileIcon" | "profileInfo" | "specialInfo">;
|