@reltio/components 1.4.892 → 1.4.893
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/editors/TimestampEditor/TimestampEditor.js +5 -1
- package/cjs/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.d.ts +7 -0
- package/cjs/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +41 -0
- package/cjs/components/workflow/cards/PotentialMatchTaskCard/styles.d.ts +1 -0
- package/cjs/components/workflow/cards/PotentialMatchTaskCard/styles.js +9 -0
- package/cjs/components/workflow/cards/WorkflowTaskCardsFactory.js +2 -2
- package/cjs/components/workflow/components/LineDecorator/styles.js +1 -1
- package/esm/components/editors/TimestampEditor/TimestampEditor.js +5 -1
- package/esm/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.d.ts +7 -0
- package/esm/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +36 -0
- package/esm/components/workflow/cards/PotentialMatchTaskCard/styles.d.ts +1 -0
- package/esm/components/workflow/cards/PotentialMatchTaskCard/styles.js +6 -0
- package/esm/components/workflow/cards/WorkflowTaskCardsFactory.js +2 -2
- package/esm/components/workflow/components/LineDecorator/styles.js +1 -1
- package/package.json +3 -3
|
@@ -64,7 +64,11 @@ var TimestampEditor = function (_a) {
|
|
|
64
64
|
var _e = react_1.useState(false), isCalendarOpen = _e[0], setIsCalendarOpen = _e[1];
|
|
65
65
|
var timestampFormat = format || dateFormat + " " + timeFormat;
|
|
66
66
|
var isAmPmFormat = timestampFormat && timestampFormat.toLowerCase().includes('a');
|
|
67
|
-
return (react_1.default.createElement(pickers_1.KeyboardDateTimePicker, __assign({ format: timestampFormat, rifmFormatter: isAmPmFormat ? makeAmPmFormatter(timestampFormat) : undefined, variant: "inline", invalidDateMessage: ui_i18n_1.default.text('Invalid Date Format'), maxDateMessage: ui_i18n_1.default.text('Date should not be after maximal date'), minDateMessage: ui_i18n_1.default.text('Date should not be before minimal date'), inputVariant: variant,
|
|
67
|
+
return (react_1.default.createElement(pickers_1.KeyboardDateTimePicker, __assign({ format: timestampFormat, rifmFormatter: isAmPmFormat ? makeAmPmFormatter(timestampFormat) : undefined, variant: "inline", invalidDateMessage: ui_i18n_1.default.text('Invalid Date Format'), maxDateMessage: ui_i18n_1.default.text('Date should not be after maximal date'), minDateMessage: ui_i18n_1.default.text('Date should not be before minimal date'), inputVariant: variant,
|
|
68
|
+
//there is a bug in the picker types that prevents time picker from showing seconds picker (see https://github.com/mui-org/material-ui-pickers/issues/739)
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
70
|
+
// @ts-ignore: wrong type
|
|
71
|
+
views: ['year', 'date', 'hours', 'minutes', 'seconds'], autoOk: true, InputAdornmentProps: { position: 'end' }, KeyboardButtonProps: {
|
|
68
72
|
classes: { root: styles.iconButtonRoot },
|
|
69
73
|
onKeyPress: ramda_1.invoker(0, 'stopPropagation')
|
|
70
74
|
}, keyboardIcon: react_1.default.createElement(DateRange_1.default, null), onChange: ramda_1.when(mdm_sdk_1.utils.dates.isValidMomentDateOrNull, ramda_1.pipe(mdm_sdk_1.utils.dates.momentToDate, onChange)), label: label, "aria-label": label, value: value, placeholder: ui_i18n_1.default.text((dateFormat + " HH:MM").toUpperCase()), ampm: false, onClose: function () { return setIsCalendarOpen(false); }, onOpen: function () { return setIsCalendarOpen(true); }, InputProps: __assign({ classes: {
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_redux_1 = require("react-redux");
|
|
8
|
+
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
9
|
+
var styles_1 = require("./styles");
|
|
10
|
+
var GenericWorkflowTaskCard_1 = __importDefault(require("../GenericWorkflowTaskCard/GenericWorkflowTaskCard"));
|
|
11
|
+
var LineDecorator_1 = __importDefault(require("../../components/LineDecorator/LineDecorator"));
|
|
12
|
+
var PmTaskIcon_1 = __importDefault(require("../../../../icons/PmTaskIcon"));
|
|
13
|
+
var useMatchesLoader_1 = require("../../../../hooks/useMatchesLoader");
|
|
14
|
+
var ProfileMatchCard_1 = require("../../../ProfileMatchCard/ProfileMatchCard");
|
|
15
|
+
var defaultOptions = {
|
|
16
|
+
showTransitiveMatches: true,
|
|
17
|
+
showInactiveEntities: false
|
|
18
|
+
};
|
|
19
|
+
var PotentialMatchTaskCard = function (_a) {
|
|
20
|
+
var task = _a.task;
|
|
21
|
+
var styles = styles_1.useStyles();
|
|
22
|
+
var objectURIs = task.objectURIs;
|
|
23
|
+
var entity = react_redux_1.useSelector(mdm_module_1.default.selectors.getEntity);
|
|
24
|
+
var metadata = react_redux_1.useSelector(mdm_module_1.default.selectors.getMetadata);
|
|
25
|
+
var _b = useMatchesLoader_1.useMatchesLoader({
|
|
26
|
+
enabled: !!entity.uri,
|
|
27
|
+
entity: entity,
|
|
28
|
+
filter: '',
|
|
29
|
+
rowsPerPage: Number.MAX_SAFE_INTEGER,
|
|
30
|
+
page: 0,
|
|
31
|
+
options: defaultOptions
|
|
32
|
+
}), matches = _b.matches, entitiesMap = _b.entitiesMap;
|
|
33
|
+
var match = matches === null || matches === void 0 ? void 0 : matches.find(function (_a) {
|
|
34
|
+
var object = _a.object;
|
|
35
|
+
return objectURIs.includes(object.uri);
|
|
36
|
+
});
|
|
37
|
+
return (react_1.default.createElement(GenericWorkflowTaskCard_1.default, { task: task, Icon: PmTaskIcon_1.default }, match && (react_1.default.createElement(LineDecorator_1.default, { last: true },
|
|
38
|
+
react_1.default.createElement("div", { className: styles.pmCard },
|
|
39
|
+
react_1.default.createElement(ProfileMatchCard_1.ProfileMatchCard, { metadata: metadata, entity: entity, match: match, entitiesMap: entitiesMap }))))));
|
|
40
|
+
};
|
|
41
|
+
exports.default = PotentialMatchTaskCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"pmCard">;
|
|
@@ -7,9 +7,9 @@ var react_1 = __importDefault(require("react"));
|
|
|
7
7
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
8
8
|
var GenericWorkflowTaskCard_1 = __importDefault(require("./GenericWorkflowTaskCard/GenericWorkflowTaskCard"));
|
|
9
9
|
var DataChangeRequestTaskCard_1 = __importDefault(require("./DataChangeRequestTaskCard/DataChangeRequestTaskCard"));
|
|
10
|
+
var PotentialMatchTaskCard_1 = __importDefault(require("./PotentialMatchTaskCard/PotentialMatchTaskCard"));
|
|
10
11
|
var DefaultTaskIcon_1 = __importDefault(require("../../../icons/DefaultTaskIcon"));
|
|
11
12
|
var DeleteRequestTaskIcon_1 = __importDefault(require("../../../icons/DeleteRequestTaskIcon"));
|
|
12
|
-
var PmTaskIcon_1 = __importDefault(require("../../../icons/PmTaskIcon"));
|
|
13
13
|
var WorkflowTaskCardsFactory = /** @class */ (function () {
|
|
14
14
|
function WorkflowTaskCardsFactory() {
|
|
15
15
|
}
|
|
@@ -20,7 +20,7 @@ var WorkflowTaskCardsFactory = /** @class */ (function () {
|
|
|
20
20
|
case mdm_sdk_1.PredefinedWorkflowProcessType.dataChangeRequestReview:
|
|
21
21
|
return react_1.default.createElement(DataChangeRequestTaskCard_1.default, { task: task });
|
|
22
22
|
case mdm_sdk_1.PredefinedWorkflowProcessType.potentialMatchReview:
|
|
23
|
-
return react_1.default.createElement(
|
|
23
|
+
return react_1.default.createElement(PotentialMatchTaskCard_1.default, { task: task });
|
|
24
24
|
case mdm_sdk_1.PredefinedWorkflowProcessType.recommendForDelete:
|
|
25
25
|
return react_1.default.createElement(GenericWorkflowTaskCard_1.default, { task: task, Icon: DeleteRequestTaskIcon_1.default });
|
|
26
26
|
default:
|
|
@@ -40,7 +40,11 @@ var TimestampEditor = function (_a) {
|
|
|
40
40
|
var _e = useState(false), isCalendarOpen = _e[0], setIsCalendarOpen = _e[1];
|
|
41
41
|
var timestampFormat = format || dateFormat + " " + timeFormat;
|
|
42
42
|
var isAmPmFormat = timestampFormat && timestampFormat.toLowerCase().includes('a');
|
|
43
|
-
return (React.createElement(KeyboardDateTimePicker, __assign({ format: timestampFormat, rifmFormatter: isAmPmFormat ? makeAmPmFormatter(timestampFormat) : undefined, variant: "inline", invalidDateMessage: i18n.text('Invalid Date Format'), maxDateMessage: i18n.text('Date should not be after maximal date'), minDateMessage: i18n.text('Date should not be before minimal date'), inputVariant: variant,
|
|
43
|
+
return (React.createElement(KeyboardDateTimePicker, __assign({ format: timestampFormat, rifmFormatter: isAmPmFormat ? makeAmPmFormatter(timestampFormat) : undefined, variant: "inline", invalidDateMessage: i18n.text('Invalid Date Format'), maxDateMessage: i18n.text('Date should not be after maximal date'), minDateMessage: i18n.text('Date should not be before minimal date'), inputVariant: variant,
|
|
44
|
+
//there is a bug in the picker types that prevents time picker from showing seconds picker (see https://github.com/mui-org/material-ui-pickers/issues/739)
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
46
|
+
// @ts-ignore: wrong type
|
|
47
|
+
views: ['year', 'date', 'hours', 'minutes', 'seconds'], autoOk: true, InputAdornmentProps: { position: 'end' }, KeyboardButtonProps: {
|
|
44
48
|
classes: { root: styles.iconButtonRoot },
|
|
45
49
|
onKeyPress: invoker(0, 'stopPropagation')
|
|
46
50
|
}, keyboardIcon: React.createElement(DateRangeIcon, null), onChange: when(utils.dates.isValidMomentDateOrNull, pipe(utils.dates.momentToDate, onChange)), label: label, "aria-label": label, value: value, placeholder: i18n.text((dateFormat + " HH:MM").toUpperCase()), ampm: false, onClose: function () { return setIsCalendarOpen(false); }, onOpen: function () { return setIsCalendarOpen(true); }, InputProps: __assign({ classes: {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSelector } from 'react-redux';
|
|
3
|
+
import mdmModule from '@reltio/mdm-module';
|
|
4
|
+
import { useStyles } from './styles';
|
|
5
|
+
import GenericWorkflowTaskCard from '../GenericWorkflowTaskCard/GenericWorkflowTaskCard';
|
|
6
|
+
import LineDecorator from '../../components/LineDecorator/LineDecorator';
|
|
7
|
+
import PmTaskIcon from '../../../../icons/PmTaskIcon';
|
|
8
|
+
import { useMatchesLoader } from '../../../../hooks/useMatchesLoader';
|
|
9
|
+
import { ProfileMatchCard } from '../../../ProfileMatchCard/ProfileMatchCard';
|
|
10
|
+
var defaultOptions = {
|
|
11
|
+
showTransitiveMatches: true,
|
|
12
|
+
showInactiveEntities: false
|
|
13
|
+
};
|
|
14
|
+
var PotentialMatchTaskCard = function (_a) {
|
|
15
|
+
var task = _a.task;
|
|
16
|
+
var styles = useStyles();
|
|
17
|
+
var objectURIs = task.objectURIs;
|
|
18
|
+
var entity = useSelector(mdmModule.selectors.getEntity);
|
|
19
|
+
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
20
|
+
var _b = useMatchesLoader({
|
|
21
|
+
enabled: !!entity.uri,
|
|
22
|
+
entity: entity,
|
|
23
|
+
filter: '',
|
|
24
|
+
rowsPerPage: Number.MAX_SAFE_INTEGER,
|
|
25
|
+
page: 0,
|
|
26
|
+
options: defaultOptions
|
|
27
|
+
}), matches = _b.matches, entitiesMap = _b.entitiesMap;
|
|
28
|
+
var match = matches === null || matches === void 0 ? void 0 : matches.find(function (_a) {
|
|
29
|
+
var object = _a.object;
|
|
30
|
+
return objectURIs.includes(object.uri);
|
|
31
|
+
});
|
|
32
|
+
return (React.createElement(GenericWorkflowTaskCard, { task: task, Icon: PmTaskIcon }, match && (React.createElement(LineDecorator, { last: true },
|
|
33
|
+
React.createElement("div", { className: styles.pmCard },
|
|
34
|
+
React.createElement(ProfileMatchCard, { metadata: metadata, entity: entity, match: match, entitiesMap: entitiesMap }))))));
|
|
35
|
+
};
|
|
36
|
+
export default PotentialMatchTaskCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"pmCard">;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { PredefinedWorkflowProcessType } from '@reltio/mdm-sdk';
|
|
3
3
|
import GenericWorkflowTaskCard from './GenericWorkflowTaskCard/GenericWorkflowTaskCard';
|
|
4
4
|
import DataChangeRequestTaskCard from './DataChangeRequestTaskCard/DataChangeRequestTaskCard';
|
|
5
|
+
import PotentialMatchTaskCard from './PotentialMatchTaskCard/PotentialMatchTaskCard';
|
|
5
6
|
import DefaultTaskIcon from '../../../icons/DefaultTaskIcon';
|
|
6
7
|
import DeleteRequestTaskIcon from '../../../icons/DeleteRequestTaskIcon';
|
|
7
|
-
import PmTaskIcon from '../../../icons/PmTaskIcon';
|
|
8
8
|
var WorkflowTaskCardsFactory = /** @class */ (function () {
|
|
9
9
|
function WorkflowTaskCardsFactory() {
|
|
10
10
|
}
|
|
@@ -15,7 +15,7 @@ var WorkflowTaskCardsFactory = /** @class */ (function () {
|
|
|
15
15
|
case PredefinedWorkflowProcessType.dataChangeRequestReview:
|
|
16
16
|
return React.createElement(DataChangeRequestTaskCard, { task: task });
|
|
17
17
|
case PredefinedWorkflowProcessType.potentialMatchReview:
|
|
18
|
-
return React.createElement(
|
|
18
|
+
return React.createElement(PotentialMatchTaskCard, { task: task });
|
|
19
19
|
case PredefinedWorkflowProcessType.recommendForDelete:
|
|
20
20
|
return React.createElement(GenericWorkflowTaskCard, { task: task, Icon: DeleteRequestTaskIcon });
|
|
21
21
|
default:
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.893",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "^2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.893",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.893",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|