@reltio/components 1.4.1979 → 1.4.1981
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.
|
@@ -57,7 +57,7 @@ var types_1 = require("../types");
|
|
|
57
57
|
var NotMatchDark_1 = __importDefault(require("../icons/NotMatchDark"));
|
|
58
58
|
var useMarkAsNotMatchRequest_1 = require("../hooks/useMarkAsNotMatchRequest");
|
|
59
59
|
exports.NotMatchButton = (0, react_1.forwardRef)(function (_a, ref) {
|
|
60
|
-
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? types_1.ActionButtonMode.iconButton : _b, _c = _a.onMenuClose, onMenuClose = _c === void 0 ? ramda_1.identity : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, entity = _a.entity, entities = _a.entities, onStartRequest = _a.onStartRequest, onFinishRequest = _a.onFinishRequest, onError = _a.onError, onSuccess = _a.onSuccess, otherProps = __rest(_a, ["className", "mode", "onMenuClose", "disabled", "entity", "entities", "onStartRequest", "onFinishRequest", "onError", "onSuccess"]);
|
|
60
|
+
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? types_1.ActionButtonMode.iconButton : _b, _c = _a.onMenuClose, onMenuClose = _c === void 0 ? ramda_1.identity : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, entity = _a.entity, entities = _a.entities, onStartRequest = _a.onStartRequest, onFinishRequest = _a.onFinishRequest, onError = _a.onError, onSuccess = _a.onSuccess, confirmMessage = _a.confirmMessage, otherProps = __rest(_a, ["className", "mode", "onMenuClose", "disabled", "entity", "entities", "onStartRequest", "onFinishRequest", "onError", "onSuccess", "confirmMessage"]);
|
|
61
61
|
var sendMarkAsNotMatchRequest = (0, useMarkAsNotMatchRequest_1.useMarkAsNotMatchRequest)({
|
|
62
62
|
entity: entity,
|
|
63
63
|
entities: entities,
|
|
@@ -66,6 +66,11 @@ exports.NotMatchButton = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
66
66
|
onError: onError,
|
|
67
67
|
onSuccess: onSuccess
|
|
68
68
|
}).sendMarkAsNotMatchRequest;
|
|
69
|
-
|
|
69
|
+
var handleClick = (0, react_1.useCallback)(function () {
|
|
70
|
+
if (confirmMessage && !confirm(confirmMessage))
|
|
71
|
+
return;
|
|
72
|
+
sendMarkAsNotMatchRequest();
|
|
73
|
+
}, [sendMarkAsNotMatchRequest, confirmMessage]);
|
|
74
|
+
return (react_1.default.createElement(ActionButton_1.ActionButton, __assign({ className: className, disabled: disabled, mode: mode, label: ui_i18n_1.default.text('Not a match'), icon: NotMatchDark_1.default, onClick: handleClick, onMenuClose: onMenuClose, ref: ref }, otherProps)));
|
|
70
75
|
});
|
|
71
76
|
exports.NotMatchButton.displayName = 'notMatchButton';
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React, { forwardRef } from 'react';
|
|
23
|
+
import React, { forwardRef, useCallback } from 'react';
|
|
24
24
|
import i18n from 'ui-i18n';
|
|
25
25
|
import { identity } from 'ramda';
|
|
26
26
|
import { ActionButton } from '../ActionButton';
|
|
@@ -28,7 +28,7 @@ import { ActionButtonMode } from '../types';
|
|
|
28
28
|
import NotMatchIcon from '../icons/NotMatchDark';
|
|
29
29
|
import { useMarkAsNotMatchRequest } from '../hooks/useMarkAsNotMatchRequest';
|
|
30
30
|
export var NotMatchButton = forwardRef(function (_a, ref) {
|
|
31
|
-
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? ActionButtonMode.iconButton : _b, _c = _a.onMenuClose, onMenuClose = _c === void 0 ? identity : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, entity = _a.entity, entities = _a.entities, onStartRequest = _a.onStartRequest, onFinishRequest = _a.onFinishRequest, onError = _a.onError, onSuccess = _a.onSuccess, otherProps = __rest(_a, ["className", "mode", "onMenuClose", "disabled", "entity", "entities", "onStartRequest", "onFinishRequest", "onError", "onSuccess"]);
|
|
31
|
+
var className = _a.className, _b = _a.mode, mode = _b === void 0 ? ActionButtonMode.iconButton : _b, _c = _a.onMenuClose, onMenuClose = _c === void 0 ? identity : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, entity = _a.entity, entities = _a.entities, onStartRequest = _a.onStartRequest, onFinishRequest = _a.onFinishRequest, onError = _a.onError, onSuccess = _a.onSuccess, confirmMessage = _a.confirmMessage, otherProps = __rest(_a, ["className", "mode", "onMenuClose", "disabled", "entity", "entities", "onStartRequest", "onFinishRequest", "onError", "onSuccess", "confirmMessage"]);
|
|
32
32
|
var sendMarkAsNotMatchRequest = useMarkAsNotMatchRequest({
|
|
33
33
|
entity: entity,
|
|
34
34
|
entities: entities,
|
|
@@ -37,6 +37,11 @@ export var NotMatchButton = forwardRef(function (_a, ref) {
|
|
|
37
37
|
onError: onError,
|
|
38
38
|
onSuccess: onSuccess
|
|
39
39
|
}).sendMarkAsNotMatchRequest;
|
|
40
|
-
|
|
40
|
+
var handleClick = useCallback(function () {
|
|
41
|
+
if (confirmMessage && !confirm(confirmMessage))
|
|
42
|
+
return;
|
|
43
|
+
sendMarkAsNotMatchRequest();
|
|
44
|
+
}, [sendMarkAsNotMatchRequest, confirmMessage]);
|
|
45
|
+
return (React.createElement(ActionButton, __assign({ className: className, disabled: disabled, mode: mode, label: i18n.text('Not a match'), icon: NotMatchIcon, onClick: handleClick, onMenuClose: onMenuClose, ref: ref }, otherProps)));
|
|
41
46
|
});
|
|
42
47
|
NotMatchButton.displayName = 'notMatchButton';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1981",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
10
|
"@react-sigma/core": "3.4.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1881",
|
|
12
12
|
"d3-cloud": "^1.2.5",
|
|
13
13
|
"d3-geo": "^2.0.1",
|
|
14
14
|
"d3-hierarchy": "^2.0.0",
|