@reltio/components 1.4.1069 → 1.4.1074
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/AttributeGroupIcon/AttributeGroupIcon.d.ts +11 -0
- package/cjs/components/AttributeGroupIcon/AttributeGroupIcon.js +20 -0
- package/cjs/components/AttributeGroupIcon/styles.d.ts +1 -0
- package/cjs/components/AttributeGroupIcon/styles.js +11 -0
- package/cjs/components/AttributesFiltersBuilder/AttributesFiltersBuilder.d.ts +9 -0
- package/cjs/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +112 -0
- package/cjs/components/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.d.ts +9 -0
- package/cjs/components/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.js +53 -0
- package/cjs/components/AttributesFiltersBuilder/components/FilterSelector/FilterSelector.d.ts +7 -0
- package/cjs/components/AttributesFiltersBuilder/components/FilterSelector/FilterSelector.js +56 -0
- package/cjs/components/AttributesFiltersBuilder/components/FilterSelector/styles.d.ts +2 -0
- package/cjs/components/AttributesFiltersBuilder/components/FilterSelector/styles.js +9 -0
- package/cjs/components/AttributesFiltersBuilder/components/RowActions/RowActions.d.ts +4 -0
- package/cjs/components/AttributesFiltersBuilder/components/RowActions/RowActions.js +51 -0
- package/cjs/components/AttributesFiltersBuilder/components/RowActions/styles.d.ts +1 -0
- package/cjs/components/AttributesFiltersBuilder/components/RowActions/styles.js +23 -0
- package/cjs/components/AttributesFiltersBuilder/components/ValueEditor/ValueEditor.d.ts +4 -0
- package/cjs/components/AttributesFiltersBuilder/components/ValueEditor/ValueEditor.js +60 -0
- package/cjs/components/AttributesFiltersBuilder/components/ValueEditor/styles.d.ts +1 -0
- package/cjs/components/AttributesFiltersBuilder/components/ValueEditor/styles.js +25 -0
- package/cjs/components/AttributesFiltersBuilder/helpers.d.ts +12 -0
- package/cjs/components/AttributesFiltersBuilder/helpers.js +77 -0
- package/cjs/components/AttributesFiltersBuilder/styles.d.ts +1 -0
- package/cjs/components/AttributesFiltersBuilder/styles.js +21 -0
- package/cjs/components/AttributesFiltersBuilder/types.d.ts +24 -0
- package/cjs/components/AttributesFiltersBuilder/types.js +2 -0
- package/cjs/components/AttributesFiltersButton/ActionButtons/ActionButtons.d.ts +8 -0
- package/cjs/components/AttributesFiltersButton/ActionButtons/ActionButtons.js +18 -0
- package/cjs/components/AttributesFiltersButton/ActionButtons/styles.d.ts +1 -0
- package/cjs/components/AttributesFiltersButton/ActionButtons/styles.js +26 -0
- package/cjs/components/AttributesFiltersButton/AttributesFiltersButton.d.ts +9 -0
- package/cjs/components/AttributesFiltersButton/AttributesFiltersButton.js +82 -0
- package/cjs/components/AttributesFiltersButton/styles.d.ts +1 -0
- package/cjs/components/AttributesFiltersButton/styles.js +30 -0
- package/cjs/components/BasicAttributeSelector/AttributeTitle/AttributeTitle.d.ts +14 -0
- package/cjs/components/BasicAttributeSelector/AttributeTitle/AttributeTitle.js +27 -0
- package/cjs/components/BasicAttributeSelector/AttributeTitle/styles.d.ts +2 -0
- package/cjs/components/BasicAttributeSelector/AttributeTitle/styles.js +44 -0
- package/cjs/components/BasicAttributeSelector/BasicAttributeSelector.d.ts +4 -0
- package/cjs/components/BasicAttributeSelector/BasicAttributeSelector.js +99 -0
- package/cjs/components/BasicAttributeSelector/helpers.d.ts +22 -0
- package/cjs/components/BasicAttributeSelector/helpers.js +80 -0
- package/cjs/components/BasicAttributeSelector/styles.d.ts +2 -0
- package/cjs/components/BasicAttributeSelector/styles.js +14 -0
- package/cjs/components/ConnectionEditor/ConnectionEditor.d.ts +12 -3
- package/cjs/components/ConnectionEditor/ConnectionEditor.js +72 -5
- package/cjs/components/ConnectionEditor/styles.d.ts +1 -0
- package/cjs/components/ConnectionEditor/styles.js +12 -0
- package/cjs/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +3 -2
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.d.ts +2 -2
- package/cjs/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.d.ts +2 -2
- package/cjs/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +1 -1
- package/cjs/components/SelectAttributesList/SelectAttributesList.d.ts +14 -0
- package/cjs/components/SelectAttributesList/SelectAttributesList.js +75 -0
- package/cjs/components/SelectAttributesList/styles.d.ts +1 -0
- package/cjs/components/SelectAttributesList/styles.js +16 -0
- package/cjs/components/SelectionPopup/SelectionPopup.d.ts +1 -1
- package/cjs/components/SidePanel/SidePanelContentHeader/SidePanelContentHeader.d.ts +2 -2
- package/cjs/components/attributes/editMode/EntitySelector/EntitySelector.d.ts +1 -1
- package/cjs/components/attributes/editMode/EntitySelector/EntitySelector.js +13 -6
- package/cjs/components/index.d.ts +4 -0
- package/cjs/components/index.js +9 -1
- package/cjs/components/workflow/hooks/useWorkflowAssignee.d.ts +1 -1
- package/cjs/components/workflow/hooks/useWorkflowAssignee.js +2 -2
- package/cjs/constants/prop-types.d.ts +1 -1
- package/cjs/constants/prop-types.js +1 -1
- package/cjs/hooks/useEditableConnection.d.ts +10 -4
- package/cjs/hooks/useEditableConnection.js +27 -3
- package/cjs/icons/Duplicate.d.ts +3 -0
- package/cjs/icons/Duplicate.js +28 -0
- package/cjs/icons/index.d.ts +6 -3
- package/cjs/icons/index.js +14 -7
- package/cjs/types/index.d.ts +40 -0
- package/esm/components/AttributeGroupIcon/AttributeGroupIcon.d.ts +11 -0
- package/esm/components/AttributeGroupIcon/AttributeGroupIcon.js +15 -0
- package/esm/components/AttributeGroupIcon/styles.d.ts +1 -0
- package/esm/components/AttributeGroupIcon/styles.js +8 -0
- package/esm/components/AttributesFiltersBuilder/AttributesFiltersBuilder.d.ts +9 -0
- package/esm/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +88 -0
- package/esm/components/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.d.ts +9 -0
- package/esm/components/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.js +29 -0
- package/esm/components/AttributesFiltersBuilder/components/FilterSelector/FilterSelector.d.ts +7 -0
- package/esm/components/AttributesFiltersBuilder/components/FilterSelector/FilterSelector.js +32 -0
- package/esm/components/AttributesFiltersBuilder/components/FilterSelector/styles.d.ts +2 -0
- package/esm/components/AttributesFiltersBuilder/components/FilterSelector/styles.js +7 -0
- package/esm/components/AttributesFiltersBuilder/components/RowActions/RowActions.d.ts +4 -0
- package/esm/components/AttributesFiltersBuilder/components/RowActions/RowActions.js +27 -0
- package/esm/components/AttributesFiltersBuilder/components/RowActions/styles.d.ts +1 -0
- package/esm/components/AttributesFiltersBuilder/components/RowActions/styles.js +20 -0
- package/esm/components/AttributesFiltersBuilder/components/ValueEditor/ValueEditor.d.ts +4 -0
- package/esm/components/AttributesFiltersBuilder/components/ValueEditor/ValueEditor.js +36 -0
- package/esm/components/AttributesFiltersBuilder/components/ValueEditor/styles.d.ts +1 -0
- package/esm/components/AttributesFiltersBuilder/components/ValueEditor/styles.js +22 -0
- package/esm/components/AttributesFiltersBuilder/helpers.d.ts +12 -0
- package/esm/components/AttributesFiltersBuilder/helpers.js +70 -0
- package/esm/components/AttributesFiltersBuilder/styles.d.ts +1 -0
- package/esm/components/AttributesFiltersBuilder/styles.js +18 -0
- package/esm/components/AttributesFiltersBuilder/types.d.ts +24 -0
- package/esm/components/AttributesFiltersBuilder/types.js +1 -0
- package/esm/components/AttributesFiltersButton/ActionButtons/ActionButtons.d.ts +8 -0
- package/esm/components/AttributesFiltersButton/ActionButtons/ActionButtons.js +13 -0
- package/esm/components/AttributesFiltersButton/ActionButtons/styles.d.ts +1 -0
- package/esm/components/AttributesFiltersButton/ActionButtons/styles.js +23 -0
- package/esm/components/AttributesFiltersButton/AttributesFiltersButton.d.ts +9 -0
- package/esm/components/AttributesFiltersButton/AttributesFiltersButton.js +58 -0
- package/esm/components/AttributesFiltersButton/styles.d.ts +1 -0
- package/esm/components/AttributesFiltersButton/styles.js +27 -0
- package/esm/components/BasicAttributeSelector/AttributeTitle/AttributeTitle.d.ts +14 -0
- package/esm/components/BasicAttributeSelector/AttributeTitle/AttributeTitle.js +22 -0
- package/esm/components/BasicAttributeSelector/AttributeTitle/styles.d.ts +2 -0
- package/esm/components/BasicAttributeSelector/AttributeTitle/styles.js +42 -0
- package/esm/components/BasicAttributeSelector/BasicAttributeSelector.d.ts +4 -0
- package/esm/components/BasicAttributeSelector/BasicAttributeSelector.js +75 -0
- package/esm/components/BasicAttributeSelector/helpers.d.ts +22 -0
- package/esm/components/BasicAttributeSelector/helpers.js +72 -0
- package/esm/components/BasicAttributeSelector/styles.d.ts +2 -0
- package/esm/components/BasicAttributeSelector/styles.js +12 -0
- package/esm/components/ConnectionEditor/ConnectionEditor.d.ts +12 -3
- package/esm/components/ConnectionEditor/ConnectionEditor.js +74 -7
- package/esm/components/ConnectionEditor/styles.d.ts +1 -0
- package/esm/components/ConnectionEditor/styles.js +9 -0
- package/esm/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +3 -2
- package/esm/components/QueryBuilderRow/QueryBuilderRow.d.ts +2 -2
- package/esm/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.d.ts +2 -2
- package/esm/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +1 -1
- package/esm/components/SelectAttributesList/SelectAttributesList.d.ts +14 -0
- package/esm/components/SelectAttributesList/SelectAttributesList.js +51 -0
- package/esm/components/SelectAttributesList/styles.d.ts +1 -0
- package/esm/components/SelectAttributesList/styles.js +13 -0
- package/esm/components/SelectionPopup/SelectionPopup.d.ts +1 -1
- package/esm/components/SidePanel/SidePanelContentHeader/SidePanelContentHeader.d.ts +2 -2
- package/esm/components/attributes/editMode/EntitySelector/EntitySelector.d.ts +1 -1
- package/esm/components/attributes/editMode/EntitySelector/EntitySelector.js +13 -6
- package/esm/components/index.d.ts +4 -0
- package/esm/components/index.js +4 -0
- package/esm/components/workflow/hooks/useWorkflowAssignee.d.ts +1 -1
- package/esm/components/workflow/hooks/useWorkflowAssignee.js +1 -1
- package/esm/constants/prop-types.d.ts +1 -1
- package/esm/constants/prop-types.js +1 -1
- package/esm/hooks/useEditableConnection.d.ts +10 -4
- package/esm/hooks/useEditableConnection.js +24 -3
- package/esm/icons/Duplicate.d.ts +3 -0
- package/esm/icons/Duplicate.js +23 -0
- package/esm/icons/index.d.ts +6 -3
- package/esm/icons/index.js +6 -3
- package/esm/types/index.d.ts +40 -0
- package/package.json +3 -3
|
@@ -33,7 +33,7 @@ import EntityCreator from '../EntityCreator';
|
|
|
33
33
|
import { EmptyStub } from '../../../../core';
|
|
34
34
|
import Group from './components/Group';
|
|
35
35
|
import { useStyles } from './styles';
|
|
36
|
-
var buildEntityOptions = function (entityTypes) { return function (entities) {
|
|
36
|
+
var buildEntityOptions = function (entityTypes, onCreate) { return function (entities) {
|
|
37
37
|
var newOptions = entities.map(function (entity) { return (__assign(__assign({}, entity), { label: getLabel(entity.label), entityType: entityTypes.find(function (_a) {
|
|
38
38
|
var uri = _a.uri;
|
|
39
39
|
return uri === entity.type;
|
|
@@ -49,8 +49,13 @@ var buildEntityOptions = function (entityTypes) { return function (entities) {
|
|
|
49
49
|
]
|
|
50
50
|
: options;
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
? entityTypes
|
|
52
|
+
var filteredEntityTypes = onCreate
|
|
53
|
+
? entityTypes
|
|
54
|
+
: entityTypes.filter(function (type) {
|
|
55
|
+
return newOptions.some(function (option) { return option.type === type.uri; });
|
|
56
|
+
});
|
|
57
|
+
return filteredEntityTypes.length > 1
|
|
58
|
+
? filteredEntityTypes.map(function (type) {
|
|
54
59
|
return {
|
|
55
60
|
label: type.label,
|
|
56
61
|
entityType: type.uri,
|
|
@@ -60,9 +65,9 @@ var buildEntityOptions = function (entityTypes) { return function (entities) {
|
|
|
60
65
|
: addDummyOptionToEmptyOptionList(newOptions);
|
|
61
66
|
}; };
|
|
62
67
|
var EntitySelector = function (_a) {
|
|
63
|
-
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, max = _a.max, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy,
|
|
68
|
+
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, max = _a.max, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _d = _a.disableLinkClick, disableLinkClick = _d === void 0 ? false : _d, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick"]);
|
|
64
69
|
var styles = useStyles();
|
|
65
|
-
var
|
|
70
|
+
var _e = useState(''), inputValue = _e[0], setInputValue = _e[1];
|
|
66
71
|
var entityTypes = useMemo(function () { return entityTypesUris.map(function (type) { return getEntityType(metadata, type); }); }, [
|
|
67
72
|
entityTypesUris,
|
|
68
73
|
metadata
|
|
@@ -94,7 +99,9 @@ var EntitySelector = function (_a) {
|
|
|
94
99
|
handleChange({});
|
|
95
100
|
};
|
|
96
101
|
var groupMode = useMemo(function () { return entityTypes.length !== 1; }, [entityTypes]);
|
|
97
|
-
var getOptions = function (value) {
|
|
102
|
+
var getOptions = function (value) {
|
|
103
|
+
return getFilteredEntities(filters, options, value).then(buildEntityOptions(entityTypes, onCreate));
|
|
104
|
+
};
|
|
98
105
|
var currentEntityType = (isEmpty(entity) ? entityTypes[0] : getEntityType(metadata, entity.entityType)) || {};
|
|
99
106
|
var createLabel = onCreate && i18n.text("Create " + (inputValue ? "\"" + inputValue + "\" as " : '') + "new " + currentEntityType.label);
|
|
100
107
|
var label = i18n.text("Select " + (entityTypes.length === 1 ? entityTypes[0].label + " " : '') + "profile");
|
|
@@ -126,4 +126,8 @@ export { MergeButton } from './MergeButton/MergeButton';
|
|
|
126
126
|
export { NotMatchButton } from './NotMatchButton/NotMatchButton';
|
|
127
127
|
export { ActionButton, ActionButtonMode } from './ActionButton/ActionButton';
|
|
128
128
|
export { default as ProfilesList } from './ProfilesList';
|
|
129
|
+
export { default as BasicAttributeSelector } from './BasicAttributeSelector/BasicAttributeSelector';
|
|
130
|
+
export { default as AttributeGroupIcon } from './AttributeGroupIcon/AttributeGroupIcon';
|
|
131
|
+
export { default as AttributesFiltersButton } from './AttributesFiltersButton/AttributesFiltersButton';
|
|
132
|
+
export { default as AttributesFiltersBuilder } from './AttributesFiltersBuilder/AttributesFiltersBuilder';
|
|
129
133
|
export { ConnectionEditor } from './ConnectionEditor';
|
package/esm/components/index.js
CHANGED
|
@@ -126,4 +126,8 @@ export { MergeButton } from './MergeButton/MergeButton';
|
|
|
126
126
|
export { NotMatchButton } from './NotMatchButton/NotMatchButton';
|
|
127
127
|
export { ActionButton, ActionButtonMode } from './ActionButton/ActionButton';
|
|
128
128
|
export { default as ProfilesList } from './ProfilesList';
|
|
129
|
+
export { default as BasicAttributeSelector } from './BasicAttributeSelector/BasicAttributeSelector';
|
|
130
|
+
export { default as AttributeGroupIcon } from './AttributeGroupIcon/AttributeGroupIcon';
|
|
131
|
+
export { default as AttributesFiltersButton } from './AttributesFiltersButton/AttributesFiltersButton';
|
|
132
|
+
export { default as AttributesFiltersBuilder } from './AttributesFiltersBuilder/AttributesFiltersBuilder';
|
|
129
133
|
export { ConnectionEditor } from './ConnectionEditor';
|
|
@@ -3,7 +3,7 @@ declare type AssigneeOption = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const useWorkflowAssignee: ({ assignee, taskId, isOpen }: Pick<WorkflowTaskData, 'taskId' | 'assignee' | 'isOpen'
|
|
6
|
+
export declare const useWorkflowAssignee: ({ assignee, taskId, isOpen }: Partial<Pick<WorkflowTaskData, 'taskId' | 'assignee' | 'isOpen'>>) => {
|
|
7
7
|
assignee: AssigneeOption;
|
|
8
8
|
getAssignees: (text: any) => Promise<void | unknown[]>;
|
|
9
9
|
updateAssignee: (newValue: AssigneeOption) => void;
|
|
@@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';
|
|
|
4
4
|
import { getAssigneeForTask, updateAssigneeForTask, utils } from '@reltio/mdm-sdk';
|
|
5
5
|
import mdmModule from '@reltio/mdm-module';
|
|
6
6
|
import { useSafePromise } from '../../../hooks';
|
|
7
|
-
import { WorkflowTasksContext } from '../../../contexts
|
|
7
|
+
import { WorkflowTasksContext } from '../../../contexts';
|
|
8
8
|
import { showWorkflowError } from '../helpers/errors';
|
|
9
9
|
import { useWorkflowCheckPermission } from './useWorkflowCheckPermission';
|
|
10
10
|
import { isOpenTask } from '../helpers';
|
|
@@ -90,7 +90,7 @@ export const QueryBuilderAttributeDataType: PropTypes.Requireable<PropTypes.Infe
|
|
|
90
90
|
groupName: PropTypes.Requireable<string>;
|
|
91
91
|
}>>;
|
|
92
92
|
export const QueryBuilderAttributeType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
|
-
id: PropTypes.Requireable<string>;
|
|
93
|
+
id: PropTypes.Requireable<string | number>;
|
|
94
94
|
values: PropTypes.Requireable<any[]>;
|
|
95
95
|
data: PropTypes.Requireable<PropTypes.InferProps<{
|
|
96
96
|
title: PropTypes.Requireable<string>;
|
|
@@ -55,7 +55,7 @@ var QueryBuilderAttributeDataType = PropTypes.shape({
|
|
|
55
55
|
groupName: PropTypes.string
|
|
56
56
|
});
|
|
57
57
|
var QueryBuilderAttributeType = PropTypes.shape({
|
|
58
|
-
id: PropTypes.string,
|
|
58
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
59
59
|
values: PropTypes.array,
|
|
60
60
|
data: QueryBuilderAttributeDataType,
|
|
61
61
|
filter: PropTypes.string,
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { EditingConnection, AttributeItem } from '@reltio/mdm-sdk';
|
|
1
|
+
import { EditingConnection, AttributeItem, Entity } from '@reltio/mdm-sdk';
|
|
2
2
|
declare type EditRelationActions = {
|
|
3
3
|
onChangeAttribute: (attribute: AttributeItem) => void;
|
|
4
4
|
onAddAttributes: (attributes: AttributeItem[]) => void;
|
|
5
|
-
onRemoveAttribute: (
|
|
5
|
+
onRemoveAttribute: (attributes: AttributeItem) => void;
|
|
6
|
+
onChangeEntity: (entity: Entity) => void;
|
|
7
|
+
onChangeRelationType: (value: {
|
|
8
|
+
type: string;
|
|
9
|
+
direction: string;
|
|
10
|
+
}) => void;
|
|
6
11
|
};
|
|
7
12
|
declare type Props = {
|
|
8
13
|
connection: EditingConnection;
|
|
9
|
-
onConnectionChange: (
|
|
14
|
+
onConnectionChange: (connection: EditingConnection) => void;
|
|
15
|
+
relatedEntity?: Entity;
|
|
10
16
|
};
|
|
11
|
-
export declare const useEditableConnection: ({ connection, onConnectionChange }: Props) => EditRelationActions;
|
|
17
|
+
export declare const useEditableConnection: ({ connection, onConnectionChange, relatedEntity }: Props) => EditRelationActions;
|
|
12
18
|
export {};
|
|
@@ -10,10 +10,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { useCallback } from 'react';
|
|
13
|
+
import { isAvailableRelationBetweenEntities, Directions, getRelationType, removeEntityAttribute, addEntityAttributes, changeEntityAttribute } from '@reltio/mdm-sdk';
|
|
13
14
|
import { pipe } from 'ramda';
|
|
14
|
-
import {
|
|
15
|
+
import { useSelector } from 'react-redux';
|
|
16
|
+
import mdmModule from '@reltio/mdm-module';
|
|
15
17
|
export var useEditableConnection = function (_a) {
|
|
16
|
-
var connection = _a.connection, onConnectionChange = _a.onConnectionChange;
|
|
18
|
+
var connection = _a.connection, onConnectionChange = _a.onConnectionChange, relatedEntity = _a.relatedEntity;
|
|
19
|
+
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
17
20
|
var onRelationChange = useCallback(function (relation) { return onConnectionChange(__assign(__assign({}, connection), { relation: relation })); }, [
|
|
18
21
|
connection,
|
|
19
22
|
onConnectionChange
|
|
@@ -30,9 +33,27 @@ export var useEditableConnection = function (_a) {
|
|
|
30
33
|
connection.relation,
|
|
31
34
|
onRelationChange
|
|
32
35
|
]);
|
|
36
|
+
var handleChangeRelationType = useCallback(function (_a) {
|
|
37
|
+
var type = _a.type, direction = _a.direction;
|
|
38
|
+
var newConnection = {
|
|
39
|
+
entity: connection.entity &&
|
|
40
|
+
isAvailableRelationBetweenEntities(direction === Directions.OUT, connection.entity, relatedEntity, metadata, getRelationType(metadata, type))
|
|
41
|
+
? connection.entity
|
|
42
|
+
: null,
|
|
43
|
+
relation: __assign(__assign({}, connection.relation), { attributes: {}, type: type,
|
|
44
|
+
direction: direction })
|
|
45
|
+
};
|
|
46
|
+
onConnectionChange(newConnection);
|
|
47
|
+
}, [connection, onConnectionChange, relatedEntity, metadata]);
|
|
48
|
+
var handleChangeEntity = useCallback(function (entity) { return onConnectionChange(__assign(__assign({}, connection), { entity: entity })); }, [
|
|
49
|
+
connection,
|
|
50
|
+
onConnectionChange
|
|
51
|
+
]);
|
|
33
52
|
return {
|
|
34
53
|
onAddAttributes: handleAddAttributes,
|
|
35
54
|
onChangeAttribute: handleChangeAttribute,
|
|
36
|
-
onRemoveAttribute: handleRemoveAttribute
|
|
55
|
+
onRemoveAttribute: handleRemoveAttribute,
|
|
56
|
+
onChangeEntity: handleChangeEntity,
|
|
57
|
+
onChangeRelationType: handleChangeRelationType
|
|
37
58
|
};
|
|
38
59
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import React from 'react';
|
|
13
|
+
var SvgDuplicate = function (props) {
|
|
14
|
+
return (React.createElement("svg", __assign({ width: 20, height: 20, viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", focusable: "false" }, props),
|
|
15
|
+
React.createElement("defs", null,
|
|
16
|
+
React.createElement("path", { d: "M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM8 8v12h12V8H8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z", id: "Duplicate_svg__a" })),
|
|
17
|
+
React.createElement("g", { transform: "translate(-2 -2)", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|
18
|
+
React.createElement("mask", { id: "Duplicate_svg__b", fill: "#fff" },
|
|
19
|
+
React.createElement("use", { xlinkHref: "#Duplicate_svg__a" })),
|
|
20
|
+
React.createElement("g", { mask: "url(#Duplicate_svg__b)", fill: "#000", fillOpacity: 0.54 },
|
|
21
|
+
React.createElement("path", { d: "M0 0h24v24H0z" })))));
|
|
22
|
+
};
|
|
23
|
+
export default SvgDuplicate;
|
package/esm/icons/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { default as DeleteRequestTaskIcon } from './DeleteRequestTaskIcon';
|
|
|
14
14
|
export { default as Details } from './Details';
|
|
15
15
|
export { default as Download } from './Download';
|
|
16
16
|
export { default as Draw } from './Draw';
|
|
17
|
+
export { default as Duplicate } from './Duplicate';
|
|
17
18
|
export { default as EmptySearchResults } from './EmptySearchResults';
|
|
18
19
|
export { default as Error } from './Error';
|
|
19
20
|
export { default as Filter } from './Filter';
|
|
@@ -21,17 +22,19 @@ export { default as Ignored } from './Ignored';
|
|
|
21
22
|
export { default as IgnoredOutlined } from './IgnoredOutlined';
|
|
22
23
|
export { default as LogIn } from './LogIn';
|
|
23
24
|
export { default as LogOut } from './LogOut';
|
|
24
|
-
export { default as Merge } from './Merge';
|
|
25
25
|
export { default as MlMatch } from './MlMatch';
|
|
26
|
+
export { default as Merge } from './Merge';
|
|
27
|
+
export { default as MergeDark } from './MergeDark';
|
|
26
28
|
export { default as NestedAttribute } from './NestedAttribute';
|
|
27
29
|
export { default as NoData } from './NoData';
|
|
28
30
|
export { default as NoDataSearch } from './NoDataSearch';
|
|
29
31
|
export { default as NoMatches } from './NoMatches';
|
|
32
|
+
export { default as NotMatchDark } from './NotMatchDark';
|
|
33
|
+
export { default as PmIcon } from './PmIcon';
|
|
34
|
+
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
30
35
|
export { default as Pin } from './Pin';
|
|
31
36
|
export { default as PinOutlined } from './PinOutlined';
|
|
32
37
|
export { default as PivotingIcon } from './PivotingIcon';
|
|
33
|
-
export { default as PmIcon } from './PmIcon';
|
|
34
|
-
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
35
38
|
export { default as Polygon } from './Polygon';
|
|
36
39
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
37
40
|
export { default as Profile } from './Profile';
|
package/esm/icons/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { default as DeleteRequestTaskIcon } from './DeleteRequestTaskIcon';
|
|
|
14
14
|
export { default as Details } from './Details';
|
|
15
15
|
export { default as Download } from './Download';
|
|
16
16
|
export { default as Draw } from './Draw';
|
|
17
|
+
export { default as Duplicate } from './Duplicate';
|
|
17
18
|
export { default as EmptySearchResults } from './EmptySearchResults';
|
|
18
19
|
export { default as Error } from './Error';
|
|
19
20
|
export { default as Filter } from './Filter';
|
|
@@ -21,17 +22,19 @@ export { default as Ignored } from './Ignored';
|
|
|
21
22
|
export { default as IgnoredOutlined } from './IgnoredOutlined';
|
|
22
23
|
export { default as LogIn } from './LogIn';
|
|
23
24
|
export { default as LogOut } from './LogOut';
|
|
24
|
-
export { default as Merge } from './Merge';
|
|
25
25
|
export { default as MlMatch } from './MlMatch';
|
|
26
|
+
export { default as Merge } from './Merge';
|
|
27
|
+
export { default as MergeDark } from './MergeDark';
|
|
26
28
|
export { default as NestedAttribute } from './NestedAttribute';
|
|
27
29
|
export { default as NoData } from './NoData';
|
|
28
30
|
export { default as NoDataSearch } from './NoDataSearch';
|
|
29
31
|
export { default as NoMatches } from './NoMatches';
|
|
32
|
+
export { default as NotMatchDark } from './NotMatchDark';
|
|
33
|
+
export { default as PmIcon } from './PmIcon';
|
|
34
|
+
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
30
35
|
export { default as Pin } from './Pin';
|
|
31
36
|
export { default as PinOutlined } from './PinOutlined';
|
|
32
37
|
export { default as PivotingIcon } from './PivotingIcon';
|
|
33
|
-
export { default as PmIcon } from './PmIcon';
|
|
34
|
-
export { default as PmTaskIcon } from './PmTaskIcon';
|
|
35
38
|
export { default as Polygon } from './Polygon';
|
|
36
39
|
export { default as PotentialMatch } from './PotentialMatch';
|
|
37
40
|
export { default as Profile } from './Profile';
|
package/esm/types/index.d.ts
CHANGED
|
@@ -57,6 +57,46 @@ export declare type QueryBuilderAttribute = {
|
|
|
57
57
|
filter: string;
|
|
58
58
|
operator: string;
|
|
59
59
|
};
|
|
60
|
+
export declare type AttributeSelectorItem = {
|
|
61
|
+
attrType: AttributeType;
|
|
62
|
+
entityTypeUri: string;
|
|
63
|
+
fieldName: string;
|
|
64
|
+
groupName: string;
|
|
65
|
+
title: string;
|
|
66
|
+
uri: string;
|
|
67
|
+
children?: AttributeSelectorItem[];
|
|
68
|
+
pathToTitle?: string[];
|
|
69
|
+
};
|
|
70
|
+
export declare type AttributeSelectorItemsGroup = {
|
|
71
|
+
id?: string;
|
|
72
|
+
title: string;
|
|
73
|
+
attributes: AttributeSelectorItem[];
|
|
74
|
+
};
|
|
75
|
+
export declare type AttributeSelectionInfo = {
|
|
76
|
+
index: number;
|
|
77
|
+
checked: boolean;
|
|
78
|
+
attribute: AttributeSelectorItem;
|
|
79
|
+
selectedAttributes: AttributeSelectorItem[];
|
|
80
|
+
};
|
|
81
|
+
export declare type BasicAttributeSelectorProps = {
|
|
82
|
+
className?: string;
|
|
83
|
+
itemsGroups: AttributeSelectorItemsGroup[];
|
|
84
|
+
value: AttributeSelectorItem;
|
|
85
|
+
onSelect: (selectInfo: AttributeSelectionInfo) => void;
|
|
86
|
+
onRestoreFocus?: () => void;
|
|
87
|
+
onOpenPopup?: () => void;
|
|
88
|
+
getLabel?: (value: {
|
|
89
|
+
fieldName?: string;
|
|
90
|
+
pathToTitle?: string[];
|
|
91
|
+
title: string;
|
|
92
|
+
}) => string;
|
|
93
|
+
disableRestoreFocus?: boolean;
|
|
94
|
+
disableEnforceFocus?: boolean;
|
|
95
|
+
single?: boolean;
|
|
96
|
+
ungroup?: boolean;
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
hideCheckBox?: boolean;
|
|
99
|
+
};
|
|
60
100
|
export declare enum RequestStates {
|
|
61
101
|
INIT = "init",
|
|
62
102
|
LOADING = "loading",
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1074",
|
|
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.1074",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1074",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|