@reltio/components 1.4.907 → 1.4.911
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/ActionButton.d.ts +16 -0
- package/cjs/components/ActionButton/ActionButton.js +90 -0
- package/cjs/components/ActionButton/styles.d.ts +1 -0
- package/cjs/components/ActionButton/styles.js +50 -0
- package/cjs/components/MergeButton/MergeButton.d.ts +15 -0
- package/cjs/components/MergeButton/MergeButton.js +64 -0
- package/cjs/components/NotMatchButton/NotMatchButton.d.ts +15 -0
- package/cjs/components/NotMatchButton/NotMatchButton.js +64 -0
- package/cjs/components/ProfileMatchCard/ProfileMatchCard.d.ts +2 -1
- package/cjs/components/ProfileMatchCard/ProfileMatchCard.js +3 -2
- package/cjs/components/attributes/AttributesView/AttributesView.d.ts +1 -1
- package/cjs/components/attributes/AttributesView/AttributesView.js +2 -2
- package/cjs/components/attributes/AttributesView/index.d.ts +1 -1
- package/cjs/components/attributes/editMode/AttributesList/AttributesList.js +3 -1
- package/cjs/components/attributes/editMode/AttributesPager/AttributeRenderer.js +4 -1
- package/cjs/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
- package/cjs/components/attributes/editMode/AttributesView/AttributesView.js +9 -2
- package/cjs/components/attributes/editMode/AttributesView/index.d.ts +9 -1
- package/cjs/components/attributes/editMode/contexts/PinnedAttributesContext.d.ts +2 -0
- package/cjs/components/attributes/editMode/contexts/PinnedAttributesContext.js +8 -0
- package/cjs/components/attributes/readMode/AttributesView/index.d.ts +8 -0
- package/cjs/components/attributes/types/attributesView.d.ts +4 -0
- package/cjs/components/history/HistoryMenuButton/HistoryMenuButton.js +46 -1
- package/cjs/components/history/HistoryMenuButton/MenuItemRenderer.d.ts +12 -0
- package/cjs/components/history/HistoryMenuButton/MenuItemRenderer.js +44 -0
- package/cjs/components/history/HistoryMenuButton/styles.d.ts +1 -1
- package/cjs/components/history/HistoryMenuButton/styles.js +13 -0
- package/cjs/components/index.d.ts +3 -0
- package/cjs/components/index.js +8 -1
- package/cjs/contexts/CollaborationContext/index.d.ts +1 -0
- package/cjs/contexts/CollaborationContext/index.js +1 -0
- package/cjs/hooks/index.d.ts +2 -0
- package/cjs/hooks/index.js +5 -1
- package/cjs/hooks/useCollaboration.d.ts +11 -10
- package/cjs/hooks/useCollaboration.js +24 -15
- package/cjs/hooks/useMarkAsNotMatchRequest.d.ts +12 -0
- package/cjs/hooks/useMarkAsNotMatchRequest.js +29 -0
- package/cjs/hooks/useMergeAllRequest.d.ts +12 -0
- package/cjs/hooks/useMergeAllRequest.js +29 -0
- package/esm/components/ActionButton/ActionButton.d.ts +16 -0
- package/esm/components/ActionButton/ActionButton.js +65 -0
- package/esm/components/ActionButton/styles.d.ts +1 -0
- package/esm/components/ActionButton/styles.js +47 -0
- package/esm/components/MergeButton/MergeButton.d.ts +15 -0
- package/esm/components/MergeButton/MergeButton.js +39 -0
- package/esm/components/NotMatchButton/NotMatchButton.d.ts +15 -0
- package/esm/components/NotMatchButton/NotMatchButton.js +39 -0
- package/esm/components/ProfileMatchCard/ProfileMatchCard.d.ts +2 -1
- package/esm/components/ProfileMatchCard/ProfileMatchCard.js +3 -2
- package/esm/components/attributes/AttributesView/AttributesView.d.ts +1 -1
- package/esm/components/attributes/AttributesView/AttributesView.js +2 -2
- package/esm/components/attributes/AttributesView/index.d.ts +1 -1
- package/esm/components/attributes/editMode/AttributesList/AttributesList.js +4 -2
- package/esm/components/attributes/editMode/AttributesPager/AttributeRenderer.js +5 -2
- package/esm/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
- package/esm/components/attributes/editMode/AttributesView/AttributesView.js +10 -3
- package/esm/components/attributes/editMode/AttributesView/index.d.ts +9 -1
- package/esm/components/attributes/editMode/contexts/PinnedAttributesContext.d.ts +2 -0
- package/esm/components/attributes/editMode/contexts/PinnedAttributesContext.js +2 -0
- package/esm/components/attributes/readMode/AttributesView/index.d.ts +8 -0
- package/esm/components/attributes/types/attributesView.d.ts +4 -0
- package/esm/components/history/HistoryMenuButton/HistoryMenuButton.js +27 -1
- package/esm/components/history/HistoryMenuButton/MenuItemRenderer.d.ts +12 -0
- package/esm/components/history/HistoryMenuButton/MenuItemRenderer.js +20 -0
- package/esm/components/history/HistoryMenuButton/styles.d.ts +1 -1
- package/esm/components/history/HistoryMenuButton/styles.js +13 -0
- package/esm/components/index.d.ts +3 -0
- package/esm/components/index.js +3 -0
- package/esm/contexts/CollaborationContext/index.d.ts +1 -0
- package/esm/contexts/CollaborationContext/index.js +1 -0
- package/esm/hooks/index.d.ts +2 -0
- package/esm/hooks/index.js +2 -0
- package/esm/hooks/useCollaboration.d.ts +11 -10
- package/esm/hooks/useCollaboration.js +25 -16
- package/esm/hooks/useMarkAsNotMatchRequest.d.ts +12 -0
- package/esm/hooks/useMarkAsNotMatchRequest.js +22 -0
- package/esm/hooks/useMergeAllRequest.d.ts +12 -0
- package/esm/hooks/useMergeAllRequest.js +22 -0
- package/package.json +3 -3
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var react_1 = __importStar(require("react"));
|
|
26
|
+
var MenuItem_1 = __importDefault(require("@material-ui/core/MenuItem"));
|
|
27
|
+
var Typography_1 = __importDefault(require("@material-ui/core/Typography"));
|
|
28
|
+
var Check_1 = __importDefault(require("@material-ui/icons/Check"));
|
|
29
|
+
var core_1 = require("../../../core");
|
|
30
|
+
var styles_1 = require("./styles");
|
|
31
|
+
var MenuItemRenderer = react_1.forwardRef(function (_a, ref) {
|
|
32
|
+
var item = _a.item, _b = _a.onMenuClose, onMenuClose = _b === void 0 ? core_1.noop : _b;
|
|
33
|
+
var styles = styles_1.useStyles();
|
|
34
|
+
var text = item.text, selected = item.selected, onClick = item.onClick;
|
|
35
|
+
var handleClick = function (e) {
|
|
36
|
+
onMenuClose();
|
|
37
|
+
onClick(e);
|
|
38
|
+
};
|
|
39
|
+
return (react_1.default.createElement(MenuItem_1.default, { classes: { root: styles.menuItem }, onClick: handleClick, ref: ref },
|
|
40
|
+
selected && react_1.default.createElement(Check_1.default, { className: styles.checkIcon }),
|
|
41
|
+
react_1.default.createElement(Typography_1.default, { classes: { root: styles.menuText } }, text)));
|
|
42
|
+
});
|
|
43
|
+
MenuItemRenderer.displayName = 'MenuItemRenderer';
|
|
44
|
+
exports.default = MenuItemRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"icon">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"icon" | "menuItem" | "menuText" | "checkIcon">;
|
|
@@ -5,5 +5,18 @@ var styles_1 = require("@material-ui/core/styles");
|
|
|
5
5
|
exports.useStyles = styles_1.makeStyles({
|
|
6
6
|
icon: {
|
|
7
7
|
margin: 5
|
|
8
|
+
},
|
|
9
|
+
menuItem: {
|
|
10
|
+
minHeight: '32px'
|
|
11
|
+
},
|
|
12
|
+
menuText: {
|
|
13
|
+
fontSize: '13px',
|
|
14
|
+
lineHeight: '15px',
|
|
15
|
+
letterSpacing: 0,
|
|
16
|
+
marginLeft: '30px'
|
|
17
|
+
},
|
|
18
|
+
checkIcon: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
color: 'rgba(0, 0, 0, 0.54)'
|
|
8
21
|
}
|
|
9
22
|
});
|
|
@@ -122,3 +122,6 @@ export { default as OvIcon } from './attributes/OvIcon';
|
|
|
122
122
|
export { default as RelationEditor } from './RelationEditor';
|
|
123
123
|
export * from './workflow';
|
|
124
124
|
export { ProfileMatchCard } from './ProfileMatchCard/ProfileMatchCard';
|
|
125
|
+
export { MergeButton } from './MergeButton/MergeButton';
|
|
126
|
+
export { NotMatchButton } from './NotMatchButton/NotMatchButton';
|
|
127
|
+
export { ActionButton, ActionButtonMode } from './ActionButton/ActionButton';
|
package/cjs/components/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.EntityTypeIcon = exports.EntityTypeBadge = exports.EntityAvatar = exports.EMPTY_STATE_VARIANTS = exports.EMPTY_STATE_ICONS = exports.EmptyState = exports.NoResults = exports.NoData = exports.DropDownSelector = exports.DropDownMenuButton = exports.Drawer = exports.DataTypeValue = exports.ConnectionRelationTypeSelector = exports.ConfigureColumnsPopup = exports.MenuWithPopper = exports.DropdownIndicatorWithIconButton = exports.DropdownIndicator = exports.CommentsContainer = exports.ColorBar = exports.CollapseButton = exports.CollaborationItem = exports.ClickAwayProvider = exports.BasicViewHeader = exports.BasicViewContent = exports.BasicView = exports.ProfileBandNavigation = exports.AvatarWithFallback = exports.AutoSizeList = exports.ReadOnlyAttributesPager = exports.SimpleAttribute = exports.ReferenceAttribute = exports.NestedAttribute = exports.ImageAttributesLine = exports.ReadOnlyAttributesList = exports.ReadOnlyAttributeValuesBlock = exports.EditableAttribute = exports.ReadOnlyAttribute = exports.CardinalityMessage = exports.AttributesPager = exports.SimpleAttributeEditor = exports.RelationTypeSelector = exports.ReferenceAttributeEditor = exports.NestedAttributeEditor = exports.MoreAttributesButton = exports.EntitySelector = exports.EntityCreator = exports.AttributesList = exports.BranchDecorator = exports.AttributesView = exports.AttributeListItem = void 0;
|
|
17
17
|
exports.SimpleDropDownSelector = exports.SidePanelContentHeader = exports.SidePanel = exports.SideButtonsPanel = exports.SelectorWithOnlyOptionAutoSelect = exports.SelectionPopupPopper = exports.SelectionPopup = exports.useKeyboardNavigation = exports.WhiteSearchInput = exports.SearchInput = exports.ScoreLabel = exports.Score = exports.ResizablePanes = exports.ReltioGridLayout = exports.ReactSortableTreeUtils = exports.ReactSortableTreeHandlers = exports.ReactSortableTree = exports.ReactSelectOptionFilters = exports.MultiSelect = exports.QueryBuilderRowsGroup = exports.QueryBuilderRow = exports.ProfileCard = exports.ProfileBand = exports.PotentialMatchReviewCard = exports.PopupWithArrow = exports.Popper = exports.MultipleInput = exports.ModeSwitcherSelect = exports.ModeSwitcher = exports.TransitiveMatchBlock = exports.SimpleMatchRulesBuilder = exports.SimpleMatchRulesBlock = exports.MatchRulesBlock = exports.LoadingSpinner = exports.Link = exports.LinearLoadIndicator = exports.ImportModes = exports.ImportButton = exports.ImageGalleryDialog = exports.Highlighter = exports.HierarchicalAttributeTooltip = exports.HideOnShrink = exports.FlipCard = exports.FacetViewHeader = exports.ExpandedValueTooltip = exports.ErrorWrapper = exports.ErrorPopup = exports.ErrorBoundary = exports.EntityUriLink = exports.EntityTypesSelector = void 0;
|
|
18
|
-
exports.ProfileMatchCard = exports.RelationEditor = exports.OvIcon = exports.ErrorMessage = exports.ReltioMap = exports.ConfirmDeleteDialog = exports.ConfirmationDialog = exports.Marginator = exports.LightArrowTooltip = exports.ArrowExpandButton = exports.ScrollableTabs = exports.ExpandableSearchInput = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SourceIcon = exports.SmallIconButtonWithTooltip = exports.SmallIconButton = void 0;
|
|
18
|
+
exports.ActionButtonMode = exports.ActionButton = exports.NotMatchButton = exports.MergeButton = exports.ProfileMatchCard = exports.RelationEditor = exports.OvIcon = exports.ErrorMessage = exports.ReltioMap = exports.ConfirmDeleteDialog = exports.ConfirmationDialog = exports.Marginator = exports.LightArrowTooltip = exports.ArrowExpandButton = exports.ScrollableTabs = exports.ExpandableSearchInput = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SourceIcon = exports.SmallIconButtonWithTooltip = exports.SmallIconButton = void 0;
|
|
19
19
|
__exportStar(require("./activityLog"), exports);
|
|
20
20
|
var AttributeListItem_1 = require("./AttributeListItem/AttributeListItem");
|
|
21
21
|
Object.defineProperty(exports, "AttributeListItem", { enumerable: true, get: function () { return __importDefault(AttributeListItem_1).default; } });
|
|
@@ -260,3 +260,10 @@ Object.defineProperty(exports, "RelationEditor", { enumerable: true, get: functi
|
|
|
260
260
|
__exportStar(require("./workflow"), exports);
|
|
261
261
|
var ProfileMatchCard_1 = require("./ProfileMatchCard/ProfileMatchCard");
|
|
262
262
|
Object.defineProperty(exports, "ProfileMatchCard", { enumerable: true, get: function () { return ProfileMatchCard_1.ProfileMatchCard; } });
|
|
263
|
+
var MergeButton_1 = require("./MergeButton/MergeButton");
|
|
264
|
+
Object.defineProperty(exports, "MergeButton", { enumerable: true, get: function () { return MergeButton_1.MergeButton; } });
|
|
265
|
+
var NotMatchButton_1 = require("./NotMatchButton/NotMatchButton");
|
|
266
|
+
Object.defineProperty(exports, "NotMatchButton", { enumerable: true, get: function () { return NotMatchButton_1.NotMatchButton; } });
|
|
267
|
+
var ActionButton_1 = require("./ActionButton/ActionButton");
|
|
268
|
+
Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function () { return ActionButton_1.ActionButton; } });
|
|
269
|
+
Object.defineProperty(exports, "ActionButtonMode", { enumerable: true, get: function () { return ActionButton_1.ActionButtonMode; } });
|
|
@@ -6,6 +6,7 @@ export declare const CollaborationContext: React.Context<{
|
|
|
6
6
|
comments: Comment[];
|
|
7
7
|
currentComment: Comment;
|
|
8
8
|
getComments: (uri: string, pageToken?: string) => void;
|
|
9
|
+
getCommentsCount: (objectIds: string[]) => void;
|
|
9
10
|
getComment: (commentId: Comment['commentId']) => void;
|
|
10
11
|
createComment: (params: Pick<Comment, 'content' | 'namedUsers' | 'objectType' | 'relatedObjectUris'> & {
|
|
11
12
|
uri: string;
|
|
@@ -12,6 +12,7 @@ exports.CollaborationContext = react_1.default.createContext({
|
|
|
12
12
|
currentComment: null,
|
|
13
13
|
getComment: noop,
|
|
14
14
|
getComments: function () { return new Promise(noop); },
|
|
15
|
+
getCommentsCount: noop,
|
|
15
16
|
createComment: function () { return new Promise(noop); },
|
|
16
17
|
editComment: function () { return new Promise(noop); },
|
|
17
18
|
createReply: function () { return new Promise(noop); },
|
package/cjs/hooks/index.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export { useWhyDidYouUpdate } from './useWhyDidYouUpdate';
|
|
|
13
13
|
export { useConfigPermissions } from './useConfigPermissions';
|
|
14
14
|
export { useMatchesLoader } from './useMatchesLoader';
|
|
15
15
|
export { usePagingSimulator } from './usePagingSimulator';
|
|
16
|
+
export { useMergeAllRequest } from './useMergeAllRequest';
|
|
17
|
+
export { useMarkAsNotMatchRequest } from './useMarkAsNotMatchRequest';
|
package/cjs/hooks/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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;
|
|
4
4
|
var useActions_1 = require("./useActions");
|
|
5
5
|
Object.defineProperty(exports, "useActions", { enumerable: true, get: function () { return useActions_1.useActions; } });
|
|
6
6
|
var useAsyncMount_1 = require("./useAsyncMount");
|
|
@@ -31,3 +31,7 @@ var useMatchesLoader_1 = require("./useMatchesLoader");
|
|
|
31
31
|
Object.defineProperty(exports, "useMatchesLoader", { enumerable: true, get: function () { return useMatchesLoader_1.useMatchesLoader; } });
|
|
32
32
|
var usePagingSimulator_1 = require("./usePagingSimulator");
|
|
33
33
|
Object.defineProperty(exports, "usePagingSimulator", { enumerable: true, get: function () { return usePagingSimulator_1.usePagingSimulator; } });
|
|
34
|
+
var useMergeAllRequest_1 = require("./useMergeAllRequest");
|
|
35
|
+
Object.defineProperty(exports, "useMergeAllRequest", { enumerable: true, get: function () { return useMergeAllRequest_1.useMergeAllRequest; } });
|
|
36
|
+
var useMarkAsNotMatchRequest_1 = require("./useMarkAsNotMatchRequest");
|
|
37
|
+
Object.defineProperty(exports, "useMarkAsNotMatchRequest", { enumerable: true, get: function () { return useMarkAsNotMatchRequest_1.useMarkAsNotMatchRequest; } });
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { CollaborationObjectTypes, Comment, CommentsMap } from '@reltio/mdm-sdk';
|
|
2
2
|
export declare const useCollaboration: (objectIds?: string[], objectTypes?: CollaborationObjectTypes[]) => {
|
|
3
|
-
|
|
4
|
-
currentComment: Comment;
|
|
3
|
+
clearCurrentComment: () => void;
|
|
5
4
|
comments: Comment[];
|
|
6
|
-
|
|
5
|
+
commentsMap: CommentsMap;
|
|
6
|
+
createComment: ({ content, namedUsers, objectType, uri, relatedObjectUris }: any) => Promise<void>;
|
|
7
7
|
createReply: ({ content, namedUsers, commentId, action, uri }: any) => Promise<void>;
|
|
8
|
-
|
|
8
|
+
currentComment: Comment;
|
|
9
9
|
deleteComment: ({ uri, commentId }: any) => void;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
sending: boolean;
|
|
10
|
+
editComment: ({ content, namedUsers, objectType, uri, relatedObjectUris, commentId, replies }: any) => Promise<void>;
|
|
11
|
+
getComment: (commentId: string) => void;
|
|
12
|
+
getComments: (relatedObjectUri: string, pageToken?: string) => void;
|
|
13
|
+
getCommentsCount: (objectIds: string[], shouldResetCommentsMap?: any) => void;
|
|
15
14
|
loading: boolean;
|
|
16
15
|
objectTypes: CollaborationObjectTypes[];
|
|
17
|
-
getComments: (relatedObjectUri: string, pageToken?: string) => void;
|
|
18
16
|
pageToken: string;
|
|
17
|
+
reOpenThread: ({ commentId, uri }: any) => void;
|
|
18
|
+
resolveThread: ({ commentId, uri }: any) => void;
|
|
19
|
+
sending: boolean;
|
|
19
20
|
};
|
|
@@ -39,18 +39,26 @@ var useCollaboration = function (objectIds, objectTypes) {
|
|
|
39
39
|
var _d = react_1.useState(null), currentComment = _d[0], setCurrentComment = _d[1];
|
|
40
40
|
var _e = react_1.useState(false), sending = _e[0], setSending = _e[1];
|
|
41
41
|
var _f = react_1.useState(false), loading = _f[0], setLoading = _f[1];
|
|
42
|
-
react_1.
|
|
43
|
-
|
|
42
|
+
var addCommentsToCommentsMap = react_1.useCallback(function (commentsMap) {
|
|
43
|
+
setCommentsMap(function (currentCommentsMap) { return (__assign(__assign({}, currentCommentsMap), commentsMap)); });
|
|
44
|
+
}, []);
|
|
45
|
+
var entityUri = entity === null || entity === void 0 ? void 0 : entity.uri;
|
|
46
|
+
var getCommentsCount = react_1.useCallback(function (objectIds, shouldResetCommentsMap) {
|
|
47
|
+
if (shouldResetCommentsMap === void 0) { shouldResetCommentsMap = false; }
|
|
48
|
+
if (isCollaborationEnabled && entityUri && !mdm_sdk_1.isTempUri(entityUri)) {
|
|
44
49
|
var onError = function (e) {
|
|
45
50
|
console.warn('Collaboration error', e);
|
|
46
51
|
setCommentsMap(null);
|
|
47
52
|
};
|
|
48
|
-
ramda_1.pipe(mdm_sdk_1.getCommentsCount, ramda_1.andThen(ramda_1.map(ramda_1.props(['objectId', 'comments']))), ramda_1.andThen(ramda_1.fromPairs), ramda_1.andThen(setCommentsMap), ramda_1.otherwise(onError))({ uris: objectIds, tenant: tenant, collaborationPath: collaborationPath });
|
|
53
|
+
ramda_1.pipe(mdm_sdk_1.getCommentsCount, ramda_1.andThen(ramda_1.map(ramda_1.props(['objectId', 'comments']))), ramda_1.andThen(ramda_1.fromPairs), ramda_1.andThen(shouldResetCommentsMap ? setCommentsMap : addCommentsToCommentsMap), ramda_1.otherwise(onError))({ uris: objectIds, tenant: tenant, collaborationPath: collaborationPath });
|
|
49
54
|
}
|
|
50
55
|
else {
|
|
51
56
|
setCommentsMap(null);
|
|
52
57
|
}
|
|
53
|
-
}, [
|
|
58
|
+
}, [addCommentsToCommentsMap, collaborationPath, entityUri, isCollaborationEnabled, tenant]);
|
|
59
|
+
react_1.useEffect(function () {
|
|
60
|
+
getCommentsCount(objectIds, true);
|
|
61
|
+
}, [objectIds, getCommentsCount]);
|
|
54
62
|
var getComments = react_1.useCallback(function (relatedObjectUri, pageToken) {
|
|
55
63
|
mdm_sdk_1.getComments({ collaborationPath: collaborationPath, tenant: tenant, relatedObjectUri: relatedObjectUri, pageToken: pageToken })
|
|
56
64
|
.then(function (_a) {
|
|
@@ -204,22 +212,23 @@ var useCollaboration = function (objectIds, objectTypes) {
|
|
|
204
212
|
setCurrentComment(null);
|
|
205
213
|
}, []);
|
|
206
214
|
return {
|
|
207
|
-
|
|
208
|
-
currentComment: currentComment,
|
|
215
|
+
clearCurrentComment: clearCurrentComment,
|
|
209
216
|
comments: comments,
|
|
210
|
-
|
|
217
|
+
commentsMap: commentsMap,
|
|
218
|
+
createComment: createComment,
|
|
211
219
|
createReply: createReply,
|
|
212
|
-
|
|
220
|
+
currentComment: currentComment,
|
|
213
221
|
deleteComment: deleteComment,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
sending: sending,
|
|
222
|
+
editComment: editComment,
|
|
223
|
+
getComment: getComment,
|
|
224
|
+
getComments: getComments,
|
|
225
|
+
getCommentsCount: getCommentsCount,
|
|
219
226
|
loading: loading,
|
|
220
227
|
objectTypes: objectTypes,
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
pageToken: pageToken,
|
|
229
|
+
reOpenThread: reOpenThread,
|
|
230
|
+
resolveThread: resolveThread,
|
|
231
|
+
sending: sending
|
|
223
232
|
};
|
|
224
233
|
};
|
|
225
234
|
exports.useCollaboration = useCollaboration;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Entity } from '@reltio/mdm-sdk';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
entities: Entity[];
|
|
4
|
+
entity: Entity;
|
|
5
|
+
onFinishRequest?: () => void;
|
|
6
|
+
onStartRequest?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const useMarkAsNotMatchRequest: ({ entities, entity, onFinishRequest, onStartRequest }: Props) => {
|
|
9
|
+
isPending: boolean;
|
|
10
|
+
sendMarkAsNotMatchRequest: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
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.useMarkAsNotMatchRequest = void 0;
|
|
7
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
10
|
+
var react_1 = require("react");
|
|
11
|
+
var useMarkAsNotMatchRequest = function (_a) {
|
|
12
|
+
var entities = _a.entities, entity = _a.entity, onFinishRequest = _a.onFinishRequest, onStartRequest = _a.onStartRequest;
|
|
13
|
+
var tenant = react_redux_1.useSelector(mdm_module_1.default.selectors.getTenant);
|
|
14
|
+
var dtssPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getDtssPath);
|
|
15
|
+
var _b = react_1.useState(false), isPending = _b[0], setIsPending = _b[1];
|
|
16
|
+
var sendMarkAsNotMatchRequest = react_1.useCallback(function () {
|
|
17
|
+
onStartRequest === null || onStartRequest === void 0 ? void 0 : onStartRequest();
|
|
18
|
+
setIsPending(true);
|
|
19
|
+
var params = { dtssPath: dtssPath, customerTenant: tenant, entity: entity, entities: entities };
|
|
20
|
+
(mdm_sdk_1.isDataTenantEntity(entity)
|
|
21
|
+
? mdm_sdk_1.markDataTenantEntityAsNotMatch(params)
|
|
22
|
+
: mdm_sdk_1.markMixedEntitiesAsNotMatches(params)).finally(function () {
|
|
23
|
+
onFinishRequest === null || onFinishRequest === void 0 ? void 0 : onFinishRequest();
|
|
24
|
+
setIsPending(false);
|
|
25
|
+
});
|
|
26
|
+
}, [dtssPath, entities, entity, onFinishRequest, onStartRequest, tenant]);
|
|
27
|
+
return { isPending: isPending, sendMarkAsNotMatchRequest: sendMarkAsNotMatchRequest };
|
|
28
|
+
};
|
|
29
|
+
exports.useMarkAsNotMatchRequest = useMarkAsNotMatchRequest;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Entity } from '@reltio/mdm-sdk';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
entities: Entity[];
|
|
4
|
+
entity: Entity;
|
|
5
|
+
onFinishRequest?: () => void;
|
|
6
|
+
onStartRequest?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const useMergeAllRequest: ({ entities, entity, onFinishRequest, onStartRequest }: Props) => {
|
|
9
|
+
isPending: boolean;
|
|
10
|
+
sendMergeAllRequest: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
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.useMergeAllRequest = void 0;
|
|
7
|
+
var react_1 = require("react");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
10
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
11
|
+
var useMergeAllRequest = function (_a) {
|
|
12
|
+
var entities = _a.entities, entity = _a.entity, onFinishRequest = _a.onFinishRequest, onStartRequest = _a.onStartRequest;
|
|
13
|
+
var tenant = react_redux_1.useSelector(mdm_module_1.default.selectors.getTenant);
|
|
14
|
+
var dtssPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getDtssPath);
|
|
15
|
+
var _b = react_1.useState(false), isPending = _b[0], setIsPending = _b[1];
|
|
16
|
+
var sendMergeAllRequest = react_1.useCallback(function () {
|
|
17
|
+
onStartRequest === null || onStartRequest === void 0 ? void 0 : onStartRequest();
|
|
18
|
+
setIsPending(true);
|
|
19
|
+
var params = { dtssPath: dtssPath, customerTenant: tenant, entity: entity, entities: entities };
|
|
20
|
+
(mdm_sdk_1.isDataTenantEntity(entity)
|
|
21
|
+
? mdm_sdk_1.mergeDataTenantEntity(params)
|
|
22
|
+
: mdm_sdk_1.mergeCustomerTenantEntityWithMixedEntities(params)).finally(function () {
|
|
23
|
+
onFinishRequest === null || onFinishRequest === void 0 ? void 0 : onFinishRequest();
|
|
24
|
+
setIsPending(false);
|
|
25
|
+
});
|
|
26
|
+
}, [dtssPath, entities, entity, onFinishRequest, onStartRequest, tenant]);
|
|
27
|
+
return { isPending: isPending, sendMergeAllRequest: sendMergeAllRequest };
|
|
28
|
+
};
|
|
29
|
+
exports.useMergeAllRequest = useMergeAllRequest;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum ActionButtonMode {
|
|
3
|
+
iconButton = "iconButton",
|
|
4
|
+
button = "button",
|
|
5
|
+
menuItem = "menuItem"
|
|
6
|
+
}
|
|
7
|
+
export declare type Props = {
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
icon: React.ElementType;
|
|
11
|
+
label: string;
|
|
12
|
+
mode: ActionButtonMode;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
onMenuClose?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const ActionButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
|
+
import classnames from 'classnames';
|
|
25
|
+
import Button from '@material-ui/core/Button';
|
|
26
|
+
import MenuItem from '@material-ui/core/MenuItem';
|
|
27
|
+
import Typography from '@material-ui/core/Typography';
|
|
28
|
+
import { useStyles } from './styles';
|
|
29
|
+
import { noop } from '../../core';
|
|
30
|
+
import ExpandedValueTooltip from '../ExpandedValueTooltip/ExpandedValueTooltip';
|
|
31
|
+
import { SmallIconButtonWithTooltip } from '../SmallIconButton';
|
|
32
|
+
export var ActionButtonMode;
|
|
33
|
+
(function (ActionButtonMode) {
|
|
34
|
+
ActionButtonMode["iconButton"] = "iconButton";
|
|
35
|
+
ActionButtonMode["button"] = "button";
|
|
36
|
+
ActionButtonMode["menuItem"] = "menuItem";
|
|
37
|
+
})(ActionButtonMode || (ActionButtonMode = {}));
|
|
38
|
+
export var ActionButton = forwardRef(function (_a, ref) {
|
|
39
|
+
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? ActionButtonMode.iconButton : _b, label = _a.label, disabled = _a.disabled, Icon = _a.icon, _c = _a.onClick, onClick = _c === void 0 ? noop : _c, _d = _a.onMenuClose, onMenuClose = _d === void 0 ? noop : _d, otherProps = __rest(_a, ["className", "mode", "label", "disabled", "icon", "onClick", "onMenuClose"]);
|
|
40
|
+
var styles = useStyles();
|
|
41
|
+
var getButtonView = function () {
|
|
42
|
+
switch (mode) {
|
|
43
|
+
case 'iconButton': {
|
|
44
|
+
return (React.createElement(SmallIconButtonWithTooltip, __assign({ disabled: disabled, className: classnames(styles.iconButton, className), size: "S", tooltipTitle: label, onClick: onClick, icon: Icon }, otherProps)));
|
|
45
|
+
}
|
|
46
|
+
case 'button': {
|
|
47
|
+
return (React.createElement(Button, __assign({ className: classnames(styles.button, className), disabled: disabled, startIcon: React.createElement(Icon, null), onClick: onClick, color: "primary", classes: { startIcon: styles.startIcon, label: styles.label } }, otherProps),
|
|
48
|
+
React.createElement(ExpandedValueTooltip, { value: label },
|
|
49
|
+
React.createElement("div", { className: styles.overflowStyle }, label))));
|
|
50
|
+
}
|
|
51
|
+
case 'menuItem': {
|
|
52
|
+
var handleClick = function () {
|
|
53
|
+
onMenuClose();
|
|
54
|
+
onClick();
|
|
55
|
+
};
|
|
56
|
+
return (React.createElement(MenuItem, __assign({ classes: { root: styles.menuItem }, onClick: handleClick, disabled: disabled, ref: ref }, otherProps),
|
|
57
|
+
React.createElement(React.Fragment, null,
|
|
58
|
+
React.createElement(Icon, { className: styles.menuIcon }),
|
|
59
|
+
React.createElement(Typography, { classes: { root: styles.menuText } }, label))));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
return getButtonView();
|
|
64
|
+
});
|
|
65
|
+
ActionButton.displayName = 'ActionButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"label" | "button" | "startIcon" | "menuItem" | "menuText" | "iconButton" | "overflowStyle" | "menuIcon">;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
2
|
+
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
|
+
button: {
|
|
4
|
+
padding: '9px 16px 9px 12px',
|
|
5
|
+
'& svg g path': {
|
|
6
|
+
fill: theme.palette.primary.main,
|
|
7
|
+
fillOpacity: 1
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
iconButton: {
|
|
11
|
+
'& svg g path': {
|
|
12
|
+
fill: theme.palette.primary.main,
|
|
13
|
+
fillOpacity: 1
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
startIcon: {
|
|
17
|
+
marginLeft: 0,
|
|
18
|
+
marginRight: '8px',
|
|
19
|
+
width: '18px',
|
|
20
|
+
height: '18px',
|
|
21
|
+
alignItems: 'center'
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
whiteSpace: 'nowrap',
|
|
25
|
+
fontSize: '14px',
|
|
26
|
+
lineHeight: '16px',
|
|
27
|
+
letterSpacing: 0
|
|
28
|
+
},
|
|
29
|
+
overflowStyle: {
|
|
30
|
+
overflow: 'hidden',
|
|
31
|
+
whiteSpace: 'nowrap',
|
|
32
|
+
textOverflow: 'ellipsis'
|
|
33
|
+
},
|
|
34
|
+
menuIcon: {
|
|
35
|
+
marginRight: '12px'
|
|
36
|
+
},
|
|
37
|
+
menuItem: {
|
|
38
|
+
minHeight: '28px',
|
|
39
|
+
padding: '2px 16px 2px 12px'
|
|
40
|
+
},
|
|
41
|
+
menuText: {
|
|
42
|
+
color: theme.palette.text.primary,
|
|
43
|
+
fontSize: '13px',
|
|
44
|
+
lineHeight: '15px',
|
|
45
|
+
letterSpacing: 0
|
|
46
|
+
}
|
|
47
|
+
}); });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionButtonMode } from '../ActionButton/ActionButton';
|
|
3
|
+
import { Entity } from '@reltio/mdm-sdk';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
className?: string;
|
|
6
|
+
entities: Entity[];
|
|
7
|
+
entity: Entity;
|
|
8
|
+
mode?: ActionButtonMode;
|
|
9
|
+
onMenuClose?: () => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onStartRequest?: () => void;
|
|
12
|
+
onFinishRequest?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const MergeButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
|
+
import i18n from 'ui-i18n';
|
|
25
|
+
import MergeIcon from './mergeIcon.svg';
|
|
26
|
+
import { noop } from '../../core';
|
|
27
|
+
import { ActionButton, ActionButtonMode } from '../ActionButton/ActionButton';
|
|
28
|
+
import { useMergeAllRequest } from '../../hooks';
|
|
29
|
+
export var MergeButton = forwardRef(function (_a, ref) {
|
|
30
|
+
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? ActionButtonMode.iconButton : _b, _c = _a.onMenuClose, onMenuClose = _c === void 0 ? noop : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, entity = _a.entity, entities = _a.entities, onStartRequest = _a.onStartRequest, onFinishRequest = _a.onFinishRequest, otherProps = __rest(_a, ["className", "mode", "onMenuClose", "disabled", "entity", "entities", "onStartRequest", "onFinishRequest"]);
|
|
31
|
+
var sendMergeAllRequest = useMergeAllRequest({
|
|
32
|
+
entity: entity,
|
|
33
|
+
entities: entities,
|
|
34
|
+
onStartRequest: onStartRequest,
|
|
35
|
+
onFinishRequest: onFinishRequest
|
|
36
|
+
}).sendMergeAllRequest;
|
|
37
|
+
return (React.createElement(ActionButton, __assign({ className: className, disabled: disabled, mode: mode, label: i18n.text('Merge'), icon: MergeIcon, onClick: sendMergeAllRequest, onMenuClose: onMenuClose, ref: ref }, otherProps)));
|
|
38
|
+
});
|
|
39
|
+
MergeButton.displayName = 'mergeButton';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Entity } from '@reltio/mdm-sdk';
|
|
2
|
+
import { ActionButtonMode } from '../ActionButton/ActionButton';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
className?: string;
|
|
6
|
+
entities: Entity[];
|
|
7
|
+
entity: Entity;
|
|
8
|
+
mode?: ActionButtonMode;
|
|
9
|
+
onMenuClose?: () => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onStartRequest?: () => void;
|
|
12
|
+
onFinishRequest?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const NotMatchButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { ActionButton, ActionButtonMode } from '../ActionButton/ActionButton';
|
|
24
|
+
import React, { forwardRef } from 'react';
|
|
25
|
+
import NotMatchIcon from './notMatch.svg';
|
|
26
|
+
import { noop } from '../../core';
|
|
27
|
+
import i18n from 'ui-i18n';
|
|
28
|
+
import { useMarkAsNotMatchRequest } from '../../hooks/useMarkAsNotMatchRequest';
|
|
29
|
+
export var NotMatchButton = forwardRef(function (_a, ref) {
|
|
30
|
+
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? ActionButtonMode.iconButton : _b, _c = _a.onMenuClose, onMenuClose = _c === void 0 ? noop : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, entity = _a.entity, entities = _a.entities, onStartRequest = _a.onStartRequest, onFinishRequest = _a.onFinishRequest, otherProps = __rest(_a, ["className", "mode", "onMenuClose", "disabled", "entity", "entities", "onStartRequest", "onFinishRequest"]);
|
|
31
|
+
var sendMarkAsNotMatchRequest = useMarkAsNotMatchRequest({
|
|
32
|
+
entity: entity,
|
|
33
|
+
entities: entities,
|
|
34
|
+
onStartRequest: onStartRequest,
|
|
35
|
+
onFinishRequest: onFinishRequest
|
|
36
|
+
}).sendMarkAsNotMatchRequest;
|
|
37
|
+
return (React.createElement(ActionButton, __assign({ className: className, disabled: disabled, mode: mode, label: i18n.text('Not a match'), icon: NotMatchIcon, onClick: sendMarkAsNotMatchRequest, onMenuClose: onMenuClose, ref: ref }, otherProps)));
|
|
38
|
+
});
|
|
39
|
+
NotMatchButton.displayName = 'notMatchButton';
|
|
@@ -8,6 +8,7 @@ declare type Props = {
|
|
|
8
8
|
match: PotentialMatch;
|
|
9
9
|
metadata: Metadata;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const ProfileMatchCard: ({ children, entitiesMap, entity, match, metadata }: Props) => JSX.Element;
|
|
13
|
+
export declare const ProfileMatchCard: ({ children, entitiesMap, entity, match, metadata, className }: Props) => JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -2,10 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { useStyles } from './styles';
|
|
3
3
|
import ProfileCard from '../ProfileCard/ProfileCard';
|
|
4
4
|
import MatchRulesBlock from '../MatchRulesBlock/MatchRulesBlock';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
export var ProfileMatchCard = function (_a) {
|
|
6
|
-
var children = _a.children, entitiesMap = _a.entitiesMap, entity = _a.entity, match = _a.match, metadata = _a.metadata;
|
|
7
|
+
var children = _a.children, entitiesMap = _a.entitiesMap, entity = _a.entity, match = _a.match, metadata = _a.metadata, className = _a.className;
|
|
7
8
|
var styles = useStyles();
|
|
8
|
-
return (React.createElement("div", { className: styles.root },
|
|
9
|
+
return (React.createElement("div", { className: classnames(styles.root, className) },
|
|
9
10
|
React.createElement("div", { className: styles.profileCardWrapper },
|
|
10
11
|
React.createElement(ProfileCard, { entity: match.object, classes: { container: styles.profileCardContainer }, disableEntityTypeColor: true }),
|
|
11
12
|
children),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AttributesViewOwnProps } from '../types';
|
|
3
|
-
declare const AttributesView: ({ mode, attributesCount, ...restProps }: AttributesViewOwnProps) => JSX.Element;
|
|
3
|
+
declare const AttributesView: ({ mode, attributesCount, pinnedAttributes, ...restProps }: AttributesViewOwnProps) => JSX.Element;
|
|
4
4
|
export default AttributesView;
|
|
@@ -25,7 +25,7 @@ import { isViewMode, Mode } from '@reltio/mdm-sdk';
|
|
|
25
25
|
import ReadModeAttributesView from '../readMode/AttributesView';
|
|
26
26
|
import EditModeAttributesView from '../editMode/AttributesView';
|
|
27
27
|
var AttributesView = function (_a) {
|
|
28
|
-
var _b = _a.mode, mode = _b === void 0 ? Mode.Viewing : _b, attributesCount = _a.attributesCount, restProps = __rest(_a, ["mode", "attributesCount"]);
|
|
29
|
-
return isViewMode(mode) ? (React.createElement(ReadModeAttributesView, __assign({ attributesCount: attributesCount }, restProps))) : (React.createElement(EditModeAttributesView, __assign({ mode: mode }, restProps)));
|
|
28
|
+
var _b = _a.mode, mode = _b === void 0 ? Mode.Viewing : _b, attributesCount = _a.attributesCount, pinnedAttributes = _a.pinnedAttributes, restProps = __rest(_a, ["mode", "attributesCount", "pinnedAttributes"]);
|
|
29
|
+
return isViewMode(mode) ? (React.createElement(ReadModeAttributesView, __assign({ attributesCount: attributesCount }, restProps))) : (React.createElement(EditModeAttributesView, __assign({ mode: mode, pinnedAttributes: pinnedAttributes }, restProps)));
|
|
30
30
|
};
|
|
31
31
|
export default AttributesView;
|