@reltio/components 1.4.1102 → 1.4.1105
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
|
@@ -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;
|
|
@@ -49,9 +49,10 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
49
49
|
var ArrowExpandButton_1 = __importDefault(require("../../ArrowExpandButton/ArrowExpandButton"));
|
|
50
50
|
var styles_1 = __importDefault(require("./styles"));
|
|
51
51
|
var MatchRulesBadge = react_1.forwardRef(function (_a, ref) {
|
|
52
|
+
var _b;
|
|
52
53
|
var children = _a.children, expanded = _a.expanded, onExpand = _a.onExpand, className = _a.className, otherProps = __rest(_a, ["children", "expanded", "onExpand", "className"]);
|
|
53
54
|
var styles = styles_1.default();
|
|
54
|
-
return (react_1.default.createElement("div", __assign({ onClick: onExpand, ref: ref, className: classnames_1.default(styles.container, className) }, otherProps),
|
|
55
|
+
return (react_1.default.createElement("div", __assign({ onClick: onExpand, ref: ref, className: classnames_1.default(styles.container, className, (_b = {}, _b[styles.expanded] = expanded, _b)) }, otherProps),
|
|
55
56
|
react_1.default.createElement(ArrowExpandButton_1.default, { expanded: expanded }),
|
|
56
57
|
react_1.default.createElement("div", { className: styles.label }, children)));
|
|
57
58
|
});
|
|
@@ -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;
|
|
@@ -6,16 +6,18 @@ var styles = styles_1.makeStyles(function (theme) {
|
|
|
6
6
|
label: {
|
|
7
7
|
backgroundColor: 'rgba(43,152,240,0.12)',
|
|
8
8
|
fontSize: '12px',
|
|
9
|
-
lineHeight: '
|
|
9
|
+
lineHeight: '15px',
|
|
10
10
|
color: theme.palette.text.primary,
|
|
11
11
|
display: 'flex',
|
|
12
12
|
alignItems: 'center',
|
|
13
|
-
padding: '
|
|
13
|
+
padding: '2px 7px'
|
|
14
14
|
},
|
|
15
15
|
container: {
|
|
16
16
|
display: 'flex',
|
|
17
17
|
alignItems: 'center',
|
|
18
|
-
cursor: 'pointer'
|
|
18
|
+
cursor: 'pointer'
|
|
19
|
+
},
|
|
20
|
+
expanded: {
|
|
19
21
|
marginBottom: '8px'
|
|
20
22
|
}
|
|
21
23
|
};
|
|
@@ -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">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "image" | "secondaryLabel" | "link" | "
|
|
1
|
+
declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "image" | "secondaryLabel" | "link" | "info" | "container" | "thirdRow" | "entityId" | "entityIdLabel" | "entityIdValue">;
|
|
2
2
|
export default useStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root" | "profileCardWrapper" | "profileCardContainer" | "rulesContainer">;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare var _default: React.MemoExoticComponent<{
|
|
2
|
-
({ className, rowsData, columnsData, theadRowsNumber }: {
|
|
2
|
+
({ className, rowsData, columnsData, theadRowsNumber, setHoveredColumn, resetHoveredColumn }: {
|
|
3
3
|
className: any;
|
|
4
4
|
rowsData: any;
|
|
5
5
|
columnsData: any;
|
|
6
6
|
theadRowsNumber?: number;
|
|
7
|
+
setHoveredColumn: any;
|
|
8
|
+
resetHoveredColumn: any;
|
|
7
9
|
}): JSX.Element;
|
|
8
10
|
propTypes: {
|
|
9
11
|
rowsData: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -15,6 +17,8 @@ declare var _default: React.MemoExoticComponent<{
|
|
|
15
17
|
columnsData: PropTypes.Requireable<object[]>;
|
|
16
18
|
theadRowsNumber: PropTypes.Requireable<number>;
|
|
17
19
|
className: PropTypes.Requireable<string>;
|
|
20
|
+
setHoveredColumn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
resetHoveredColumn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
22
|
};
|
|
19
23
|
}>;
|
|
20
24
|
export default _default;
|
|
@@ -44,14 +44,14 @@ var DefaultCellRenderer = function (_a) {
|
|
|
44
44
|
return value || null;
|
|
45
45
|
};
|
|
46
46
|
var VerticalHeadingsTable = function (_a) {
|
|
47
|
-
var className = _a.className, rowsData = _a.rowsData, columnsData = _a.columnsData, _b = _a.theadRowsNumber, theadRowsNumber = _b === void 0 ? 0 : _b;
|
|
47
|
+
var className = _a.className, rowsData = _a.rowsData, columnsData = _a.columnsData, _b = _a.theadRowsNumber, theadRowsNumber = _b === void 0 ? 0 : _b, setHoveredColumn = _a.setHoveredColumn, resetHoveredColumn = _a.resetHoveredColumn;
|
|
48
48
|
var renderRow = function (rowData) {
|
|
49
49
|
var CellRenderer = rowData.cellRenderer || DefaultCellRenderer;
|
|
50
50
|
var HeadCellRenderer = rowData.headCellRenderer || DefaultHeadCellRenderer;
|
|
51
51
|
return (react_1.default.createElement("tr", { key: rowData.id },
|
|
52
52
|
react_1.default.createElement("th", { key: rowData.id },
|
|
53
53
|
react_1.default.createElement(HeadCellRenderer, __assign({}, rowData))),
|
|
54
|
-
columnsData.map(function (columnValue, index) { return (react_1.default.createElement("td", { key: index },
|
|
54
|
+
columnsData.map(function (columnValue, index) { return (react_1.default.createElement("td", { key: index, onMouseOver: function () { return setHoveredColumn(columnValue); }, onMouseLeave: resetHoveredColumn },
|
|
55
55
|
react_1.default.createElement(CellRenderer, { value: columnValue[rowData.id], columnValue: columnValue, rowData: rowData }))); })));
|
|
56
56
|
};
|
|
57
57
|
return (react_1.default.createElement("table", { className: className },
|
|
@@ -67,6 +67,8 @@ VerticalHeadingsTable.propTypes = {
|
|
|
67
67
|
})),
|
|
68
68
|
columnsData: prop_types_1.default.arrayOf(prop_types_1.default.object),
|
|
69
69
|
theadRowsNumber: prop_types_1.default.number,
|
|
70
|
-
className: prop_types_1.default.string
|
|
70
|
+
className: prop_types_1.default.string,
|
|
71
|
+
setHoveredColumn: prop_types_1.default.func,
|
|
72
|
+
resetHoveredColumn: prop_types_1.default.func
|
|
71
73
|
};
|
|
72
74
|
exports.default = react_1.memo(VerticalHeadingsTable);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "label" | "actions" | "
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "label" | "actions" | "editor" | "expandButton" | "editedLabel" | "titleContainer" | "errorWrapperHelperText">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"dense" | "icon" | "
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"dense" | "icon" | "buttonLabel" | "moreButton" | "moreAttributes" | "popupContainer" | "moreAttributesPopup">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "button" | "placeholder" | "
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "button" | "placeholder" | "editor" | "wrapper" | "addButton" | "errorWrapper" | "editor-value" | "editor-read-only-value" | "editor-actions" | "editedLabel">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"attributeValue" | "text" | "input" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"attributeValue" | "text" | "input" | "editor" | "moreButton" | "sourceIcon" | "attributeTitle" | "attributeWrapper">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"input" | "root" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"input" | "root" | "inputRoot" | "paper" | "dateOptionLabel" | "dropdownIndicator">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"underline" | "icon" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"underline" | "icon" | "inputLabel" | "iconButtonRoot" | "adornedEnd" | "adornmentPositionEnd" | "inputRoot">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"underline" | "
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"underline" | "inputLabel" | "adornedEnd" | "inputRoot" | "paper" | "menuItem" | "menuText" | "dropdownIndicator">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"underline" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"underline" | "inputLabel" | "iconButtonRoot" | "adornedEnd" | "inputRoot">;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const useStyles: (props: {
|
|
2
2
|
color: string;
|
|
3
|
-
}) => import("@material-ui/core/styles/withStyles").ClassNameMap<"title" | "priority" | "flex" | "caption" | "icon" | "header" | "line" | "date" | "
|
|
3
|
+
}) => import("@material-ui/core/styles/withStyles").ClassNameMap<"title" | "priority" | "flex" | "caption" | "icon" | "header" | "line" | "date" | "card" | "withBackground" | "lineWrapper" | "info" | "commentsInfo" | "commentsIcon" | "infoValue" | "infoBlock" | "flag" | "mainInfo" | "controlsBox" | "controlsInRow" | "comments">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "inputRoot" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "inputRoot" | "popoverPaper" | "simpleDropDownSelector" | "cancelButton">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"dueDate" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"dueDate" | "dueDateInput" | "inputLabel">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"content" | "last" | "line" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"content" | "last" | "line" | "decorator" | "lineBlock" | "withLinePadding" | "noLine" | "plain" | "rowDivider">;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SandboxAPIContext = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
exports.SandboxAPIContext = react_1.default.createContext({
|
|
9
|
+
getCurrentPerspectiveId: function () { return ''; },
|
|
10
|
+
setEntityUri: function () { },
|
|
11
|
+
showPerspective: function () { }
|
|
12
|
+
});
|
package/cjs/contexts/index.d.ts
CHANGED
|
@@ -15,5 +15,6 @@ export { EntityMarkerContext } from './EntityMarkerContext';
|
|
|
15
15
|
export { WorkflowTasksContext } from './WorkflowTasksContext';
|
|
16
16
|
export { RelatedObjectUrisContext } from './RelatedObjectUrisContext';
|
|
17
17
|
export { EntityContext } from './EntityContext';
|
|
18
|
+
export { SandboxAPIContext } from './SandboxAPIContext';
|
|
18
19
|
export { useReloadAllFacets, ReloadFacetProvider, useReloadFacet } from './ReloadFacetContext';
|
|
19
20
|
export { SearchFiltersContext } from './SearchFiltersContext';
|
package/cjs/contexts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = exports.PivotingAttributeContext = exports.UsersContext = exports.CollaborationContext = exports.BlockImageGalleryDialogContext = exports.ViewIdContext = exports.PopupBoundariesContext = exports.HistoryDiffContext = exports.AsyncMountContext = void 0;
|
|
3
|
+
exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.SandboxAPIContext = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = exports.PivotingAttributeContext = exports.UsersContext = exports.CollaborationContext = exports.BlockImageGalleryDialogContext = exports.ViewIdContext = exports.PopupBoundariesContext = exports.HistoryDiffContext = exports.AsyncMountContext = void 0;
|
|
4
4
|
var AsyncMountContext_1 = require("./AsyncMountContext");
|
|
5
5
|
Object.defineProperty(exports, "AsyncMountContext", { enumerable: true, get: function () { return AsyncMountContext_1.AsyncMountContext; } });
|
|
6
6
|
var HistoryAppearanceContext_1 = require("./HistoryAppearanceContext");
|
|
@@ -40,6 +40,8 @@ var RelatedObjectUrisContext_1 = require("./RelatedObjectUrisContext");
|
|
|
40
40
|
Object.defineProperty(exports, "RelatedObjectUrisContext", { enumerable: true, get: function () { return RelatedObjectUrisContext_1.RelatedObjectUrisContext; } });
|
|
41
41
|
var EntityContext_1 = require("./EntityContext");
|
|
42
42
|
Object.defineProperty(exports, "EntityContext", { enumerable: true, get: function () { return EntityContext_1.EntityContext; } });
|
|
43
|
+
var SandboxAPIContext_1 = require("./SandboxAPIContext");
|
|
44
|
+
Object.defineProperty(exports, "SandboxAPIContext", { enumerable: true, get: function () { return SandboxAPIContext_1.SandboxAPIContext; } });
|
|
43
45
|
var ReloadFacetContext_1 = require("./ReloadFacetContext");
|
|
44
46
|
Object.defineProperty(exports, "useReloadAllFacets", { enumerable: true, get: function () { return ReloadFacetContext_1.useReloadAllFacets; } });
|
|
45
47
|
Object.defineProperty(exports, "ReloadFacetProvider", { enumerable: true, get: function () { return ReloadFacetContext_1.ReloadFacetProvider; } });
|
package/cjs/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { useActions } from './useActions';
|
|
2
|
+
export { useAPI, CustomAction } from './useAPI';
|
|
3
|
+
export type { CustomActionTask } from './useAPI';
|
|
2
4
|
export { useAsyncMount } from './useAsyncMount';
|
|
3
5
|
export { useCollaboration } from './useCollaboration';
|
|
4
6
|
export { useDidUpdateEffect } from './useDidUpdateEffect';
|
|
@@ -15,5 +17,6 @@ export { useMatchesLoader } from './useMatchesLoader';
|
|
|
15
17
|
export { usePagingSimulator } from './usePagingSimulator';
|
|
16
18
|
export { useMergeAllRequest } from './useMergeAllRequest';
|
|
17
19
|
export { useMarkAsNotMatchRequest } from './useMarkAsNotMatchRequest';
|
|
20
|
+
export { useCustomScripts } from './useCustomScripts';
|
|
18
21
|
export { useEditableConnection } from './useEditableConnection';
|
|
19
22
|
export { useReadableSearchState } from './useReadableSearchState';
|
package/cjs/hooks/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useReadableSearchState = exports.useEditableConnection = exports.useMarkAsNotMatchRequest = exports.useMergeAllRequest = exports.usePagingSimulator = exports.useMatchesLoader = exports.useConfigPermissions = exports.useWhyDidYouUpdate = exports.useUsers = exports.useSavedState = exports.useSafePromise = exports.useRunOnceAfterValueInitialization = exports.useRelationsLoader = exports.useRelationTypeSelector = exports.usePrevious = exports.useDidUpdateEffect = exports.useCollaboration = exports.useAsyncMount = exports.useActions = void 0;
|
|
3
|
+
exports.useReadableSearchState = exports.useEditableConnection = exports.useCustomScripts = exports.useMarkAsNotMatchRequest = exports.useMergeAllRequest = exports.usePagingSimulator = exports.useMatchesLoader = exports.useConfigPermissions = exports.useWhyDidYouUpdate = exports.useUsers = exports.useSavedState = exports.useSafePromise = exports.useRunOnceAfterValueInitialization = exports.useRelationsLoader = exports.useRelationTypeSelector = exports.usePrevious = exports.useDidUpdateEffect = exports.useCollaboration = exports.useAsyncMount = exports.CustomAction = exports.useAPI = exports.useActions = void 0;
|
|
4
4
|
var useActions_1 = require("./useActions");
|
|
5
5
|
Object.defineProperty(exports, "useActions", { enumerable: true, get: function () { return useActions_1.useActions; } });
|
|
6
|
+
var useAPI_1 = require("./useAPI");
|
|
7
|
+
Object.defineProperty(exports, "useAPI", { enumerable: true, get: function () { return useAPI_1.useAPI; } });
|
|
8
|
+
Object.defineProperty(exports, "CustomAction", { enumerable: true, get: function () { return useAPI_1.CustomAction; } });
|
|
6
9
|
var useAsyncMount_1 = require("./useAsyncMount");
|
|
7
10
|
Object.defineProperty(exports, "useAsyncMount", { enumerable: true, get: function () { return useAsyncMount_1.useAsyncMount; } });
|
|
8
11
|
var useCollaboration_1 = require("./useCollaboration");
|
|
@@ -35,6 +38,8 @@ var useMergeAllRequest_1 = require("./useMergeAllRequest");
|
|
|
35
38
|
Object.defineProperty(exports, "useMergeAllRequest", { enumerable: true, get: function () { return useMergeAllRequest_1.useMergeAllRequest; } });
|
|
36
39
|
var useMarkAsNotMatchRequest_1 = require("./useMarkAsNotMatchRequest");
|
|
37
40
|
Object.defineProperty(exports, "useMarkAsNotMatchRequest", { enumerable: true, get: function () { return useMarkAsNotMatchRequest_1.useMarkAsNotMatchRequest; } });
|
|
41
|
+
var useCustomScripts_1 = require("./useCustomScripts");
|
|
42
|
+
Object.defineProperty(exports, "useCustomScripts", { enumerable: true, get: function () { return useCustomScripts_1.useCustomScripts; } });
|
|
38
43
|
var useEditableConnection_1 = require("./useEditableConnection");
|
|
39
44
|
Object.defineProperty(exports, "useEditableConnection", { enumerable: true, get: function () { return useEditableConnection_1.useEditableConnection; } });
|
|
40
45
|
var useReadableSearchState_1 = require("./useReadableSearchState");
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ProcessRequestParams } from './types';
|
|
2
|
+
export declare const processRequest: ({ name, paramObject, permissions, worker, metadata, config, apiPath, user, workflowPath, entity, tenant, entityUri, query, openSearch, environment, getCurrentPerspectiveId, showPerspective, workflowCheckPermission, setEntityUri }: ProcessRequestParams) => void;
|
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.processRequest = void 0;
|
|
15
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
16
|
+
var types_1 = require("./types");
|
|
17
|
+
var processFromQuery = function (params, permissions, workflowPath, tenant, environment) {
|
|
18
|
+
if (!params.processDefinitionId) {
|
|
19
|
+
return new Promise(function (resolve) { return resolve({ errorMessage: 'processDefinitionId is empty' }); });
|
|
20
|
+
}
|
|
21
|
+
if (!params.searchString) {
|
|
22
|
+
return new Promise(function (resolve) { return resolve({ errorMessage: 'searchString is empty' }); });
|
|
23
|
+
}
|
|
24
|
+
if (!workflowPath) {
|
|
25
|
+
return new Promise(function (resolve) { return resolve({ errorMessage: 'Workflow path is not defined' }); });
|
|
26
|
+
}
|
|
27
|
+
var errors = validateParams(__assign({ url: '/processInstances/_generateFromQuery' }, params), permissions);
|
|
28
|
+
if (errors) {
|
|
29
|
+
return new Promise(function (resolve) { return resolve(errors); });
|
|
30
|
+
}
|
|
31
|
+
return mdm_sdk_1.startProcessFromQuery({
|
|
32
|
+
workflowPath: workflowPath,
|
|
33
|
+
processType: params.processDefinitionId,
|
|
34
|
+
searchString: params.searchString,
|
|
35
|
+
tenant: tenant,
|
|
36
|
+
environment: environment
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var workflowRequest = function (params, permissions, workflowPath, tenant) {
|
|
40
|
+
var url = params.url;
|
|
41
|
+
var errors = validateParams(params, permissions);
|
|
42
|
+
if (errors) {
|
|
43
|
+
return new Promise(function (resolve) { return resolve(errors); });
|
|
44
|
+
}
|
|
45
|
+
var isExternalUrl = url.includes('http:') || url.includes('https:');
|
|
46
|
+
if (!workflowPath && !isExternalUrl) {
|
|
47
|
+
return new Promise(function (resolve) { return resolve({ errorMessage: 'Workflow path is not defined' }); });
|
|
48
|
+
}
|
|
49
|
+
return mdm_sdk_1.sendWorkflowRequest({
|
|
50
|
+
url: url,
|
|
51
|
+
method: params.method || 'GET',
|
|
52
|
+
data: params.data,
|
|
53
|
+
tenant: tenant,
|
|
54
|
+
headers: params.headers,
|
|
55
|
+
workflowPath: workflowPath
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var sendApiRequest = function (params, permissions) {
|
|
59
|
+
var errors = validateParams(params, permissions);
|
|
60
|
+
if (errors) {
|
|
61
|
+
return new Promise(function (resolve) { return resolve(errors); });
|
|
62
|
+
}
|
|
63
|
+
return mdm_sdk_1.sendRequestFromCustomSandbox({
|
|
64
|
+
url: params.url,
|
|
65
|
+
method: params.method,
|
|
66
|
+
data: params.data,
|
|
67
|
+
headers: params.headers
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
var validateParams = function (params, permissions) {
|
|
71
|
+
var url = params.url;
|
|
72
|
+
if (!url)
|
|
73
|
+
return { errorMessage: 'URL is empty' };
|
|
74
|
+
var allowed = permissions === null || permissions === void 0 ? void 0 : permissions.some(function (perm) {
|
|
75
|
+
var parsed = perm.match(/^(?:([^:?#]+):)?(?:\/\/((?:(([^:@?]*)(?::([^:@?]*))?)?@)?((?:\[[0-9A-Fa-f:]+)|(?:[^:?#]*))(?::(\d*))?))?((((?:[^?#]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/);
|
|
76
|
+
var protocol = parsed[1];
|
|
77
|
+
var host = parsed[6];
|
|
78
|
+
var protocolAndHost = protocol + "://" + host;
|
|
79
|
+
var re = new RegExp('^' + perm + '$');
|
|
80
|
+
var formattedPerm = perm.replace(/\/*$/, '');
|
|
81
|
+
return (formattedPerm === url ||
|
|
82
|
+
(host && host === formattedPerm) ||
|
|
83
|
+
(host && protocolAndHost === formattedPerm) ||
|
|
84
|
+
(formattedPerm && formattedPerm.indexOf('/') === 0 && url && url.indexOf(formattedPerm) === 0) ||
|
|
85
|
+
(formattedPerm && re.test(url)));
|
|
86
|
+
});
|
|
87
|
+
if (!allowed || ((permissions === null || permissions === void 0 ? void 0 : permissions.length) || 0) === 0) {
|
|
88
|
+
return { errorMessage: 'Not enough permissions' };
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
};
|
|
92
|
+
var processRequest = function (_a) {
|
|
93
|
+
var name = _a.name, paramObject = _a.paramObject, permissions = _a.permissions, worker = _a.worker, metadata = _a.metadata, config = _a.config, apiPath = _a.apiPath, user = _a.user, workflowPath = _a.workflowPath, entity = _a.entity, tenant = _a.tenant, entityUri = _a.entityUri, query = _a.query, openSearch = _a.openSearch, environment = _a.environment, getCurrentPerspectiveId = _a.getCurrentPerspectiveId, showPerspective = _a.showPerspective, workflowCheckPermission = _a.workflowCheckPermission, setEntityUri = _a.setEntityUri;
|
|
94
|
+
var handleRequest = function (request) {
|
|
95
|
+
request
|
|
96
|
+
.then(function (data) {
|
|
97
|
+
worker.postMessage(__assign({ action: 'response', result: { data: data } }, paramObject.params));
|
|
98
|
+
})
|
|
99
|
+
.catch(function () {
|
|
100
|
+
worker.postMessage(__assign({ action: 'response', result: { data: {}, headers: '', status: 0 } }, paramObject.params));
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
switch (name) {
|
|
104
|
+
case types_1.RequestAction.API: {
|
|
105
|
+
var request = sendApiRequest(paramObject.params, permissions);
|
|
106
|
+
handleRequest(request);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case types_1.RequestAction.WORKFLOW: {
|
|
110
|
+
var request = workflowRequest(paramObject.params, permissions, workflowPath, tenant);
|
|
111
|
+
handleRequest(request);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case types_1.RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY: {
|
|
115
|
+
var request = processFromQuery(paramObject.params, permissions, workflowPath, tenant, environment);
|
|
116
|
+
handleRequest(request);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case types_1.RequestAction.GET_CONFIGURATION: {
|
|
120
|
+
worker.postMessage(__assign({ action: 'response', result: metadata }, paramObject.params));
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case types_1.RequestAction.GET_UI_CONFIGURATION: {
|
|
124
|
+
var response = __assign(__assign({}, config), { action: __assign({}, config.action) });
|
|
125
|
+
if (response.action.permissions) {
|
|
126
|
+
delete response.action.permissions;
|
|
127
|
+
}
|
|
128
|
+
worker.postMessage(__assign({ action: 'response', result: response }, paramObject.params));
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case types_1.RequestAction.SET_ENTITY_URI: {
|
|
132
|
+
var listener = function () { return worker.postMessage(__assign({ action: 'response', result: entity }, paramObject.params)); };
|
|
133
|
+
setEntityUri(entityUri, listener);
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
case types_1.RequestAction.SET_PERSPECTIVE: {
|
|
137
|
+
showPerspective(paramObject.params.perspective);
|
|
138
|
+
worker.postMessage(__assign({ action: 'response', result: getCurrentPerspectiveId() }, paramObject.params));
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
case types_1.RequestAction.GET_PERSPECTIVE: {
|
|
142
|
+
if (getCurrentPerspectiveId) {
|
|
143
|
+
worker.postMessage(__assign({ action: 'response', result: getCurrentPerspectiveId() }, paramObject.params));
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
case types_1.RequestAction.WORKFLOW_CHECK_PERMISSION: {
|
|
148
|
+
worker.postMessage(__assign({ action: 'response', result: workflowCheckPermission(paramObject.params.permission) }, paramObject.params));
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
case types_1.RequestAction.GET_SEARCH_QUERY: {
|
|
152
|
+
worker.postMessage(__assign({ action: 'response', result: query }, paramObject.params));
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case types_1.RequestAction.OPEN_SEARCH: {
|
|
156
|
+
openSearch({ viewId: config.id, searchState: paramObject.params.searchState });
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
case types_1.RequestAction.GET_ENTITY_URI: {
|
|
160
|
+
worker.postMessage(__assign({ action: 'response', result: entityUri }, paramObject.params));
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
case types_1.RequestAction.GET_ENTITY: {
|
|
164
|
+
worker.postMessage(__assign({ action: 'response', result: entity }, paramObject.params));
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case types_1.RequestAction.GET_API_PATH: {
|
|
168
|
+
worker.postMessage(__assign({ action: 'response', result: apiPath }, paramObject.params));
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
case types_1.RequestAction.WORKFLOW_GET_WORKFLOW_PATH: {
|
|
172
|
+
worker.postMessage(__assign({ action: 'response', result: workflowPath }, paramObject.params));
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case types_1.RequestAction.GET_TENANT: {
|
|
176
|
+
worker.postMessage(__assign({ action: 'response', result: tenant }, paramObject.params));
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case types_1.RequestAction.GET_USER: {
|
|
180
|
+
worker.postMessage(__assign({ action: 'response', result: user }, paramObject.params));
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
case types_1.RequestAction.ALERT: {
|
|
184
|
+
window.alert(paramObject.params.text);
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
case types_1.RequestAction.CONFIRM: {
|
|
188
|
+
window.confirm(paramObject.params.text);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case types_1.RequestAction.PROMPT: {
|
|
192
|
+
window.prompt(paramObject.params.text, paramObject.params.defaultText || '');
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
case types_1.RequestAction.OPEN_WINDOW: {
|
|
196
|
+
window.open(paramObject.params.url, '_blank');
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
exports.processRequest = processRequest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getWorkerURL: (uiPath: string, tenant: string) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkerURL = void 0;
|
|
4
|
+
var getWorkerURL = function (uiPath, tenant) {
|
|
5
|
+
if (uiPath === null || uiPath === void 0 ? void 0 : uiPath.includes('nui')) {
|
|
6
|
+
return uiPath.replace(tenant + "/", '') + "worker_api.js";
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return uiPath + "worker_api.js";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.getWorkerURL = getWorkerURL;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkerURL = exports.processRequest = exports.CustomAction = exports.useAPI = void 0;
|
|
4
|
+
var useAPI_1 = require("./useAPI");
|
|
5
|
+
Object.defineProperty(exports, "useAPI", { enumerable: true, get: function () { return useAPI_1.useAPI; } });
|
|
6
|
+
var types_1 = require("./types");
|
|
7
|
+
Object.defineProperty(exports, "CustomAction", { enumerable: true, get: function () { return types_1.CustomAction; } });
|
|
8
|
+
var API_1 = require("./API");
|
|
9
|
+
Object.defineProperty(exports, "processRequest", { enumerable: true, get: function () { return API_1.processRequest; } });
|
|
10
|
+
var helpers_1 = require("./helpers");
|
|
11
|
+
Object.defineProperty(exports, "getWorkerURL", { enumerable: true, get: function () { return helpers_1.getWorkerURL; } });
|