@reltio/components 1.4.1543 → 1.4.1545

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.
Files changed (29) hide show
  1. package/cjs/components/ProfileBand/styles.d.ts +1 -1
  2. package/cjs/components/SettingsMenu/SettingsMenu.js +2 -1
  3. package/cjs/components/SettingsMenu/SettingsMenuItemRender/SettingsMenuItemRender.d.ts +8 -0
  4. package/cjs/components/SettingsMenu/SettingsMenuItemRender/SettingsMenuItemRender.js +48 -0
  5. package/cjs/components/SettingsMenu/SettingsMenuItemRender/styles.d.ts +1 -0
  6. package/cjs/components/SettingsMenu/SettingsMenuItemRender/styles.js +18 -0
  7. package/cjs/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.d.ts +4 -128
  8. package/cjs/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +7 -3
  9. package/cjs/components/attributes/readMode/ReferenceAttribute/index.d.ts +2 -136
  10. package/cjs/components/attributes/readMode/ReferenceAttribute/index.js +1 -11
  11. package/cjs/components/attributes/types/attributes.d.ts +24 -0
  12. package/cjs/components/attributes/types/attributes.js +2 -0
  13. package/cjs/components/attributes/types/index.d.ts +1 -0
  14. package/cjs/components/attributes/types/index.js +1 -0
  15. package/esm/components/ProfileBand/styles.d.ts +1 -1
  16. package/esm/components/SettingsMenu/SettingsMenu.js +2 -1
  17. package/esm/components/SettingsMenu/SettingsMenuItemRender/SettingsMenuItemRender.d.ts +8 -0
  18. package/esm/components/SettingsMenu/SettingsMenuItemRender/SettingsMenuItemRender.js +20 -0
  19. package/esm/components/SettingsMenu/SettingsMenuItemRender/styles.d.ts +1 -0
  20. package/esm/components/SettingsMenu/SettingsMenuItemRender/styles.js +15 -0
  21. package/esm/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.d.ts +4 -128
  22. package/esm/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +8 -4
  23. package/esm/components/attributes/readMode/ReferenceAttribute/index.d.ts +2 -136
  24. package/esm/components/attributes/readMode/ReferenceAttribute/index.js +1 -10
  25. package/esm/components/attributes/types/attributes.d.ts +24 -0
  26. package/esm/components/attributes/types/attributes.js +1 -0
  27. package/esm/components/attributes/types/index.d.ts +1 -0
  28. package/esm/components/attributes/types/index.js +1 -0
  29. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
- export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"inactive" | "label" | "secondaryLabel" | "entityType" | "profileBand" | "entityId" | "badge" | "profileIcon" | "profileBandWrapper" | "imageProfileIcon" | "profileInfo" | "businessCard" | "specialInfo">;
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"inactive" | "label" | "entityType" | "secondaryLabel" | "profileBand" | "entityId" | "badge" | "profileIcon" | "profileBandWrapper" | "imageProfileIcon" | "profileInfo" | "businessCard" | "specialInfo">;
2
2
  export default useStyles;
@@ -8,12 +8,13 @@ var Settings_1 = __importDefault(require("@material-ui/icons/Settings"));
8
8
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
9
9
  var SmallIconButton_1 = require("../SmallIconButton");
10
10
  var DropDownMenuButton_1 = __importDefault(require("../DropDownMenuButton/DropDownMenuButton"));
11
+ var SettingsMenuItemRender_1 = __importDefault(require("./SettingsMenuItemRender/SettingsMenuItemRender"));
11
12
  var SettingsMenu = function (_a) {
12
13
  var items = _a.items, menuId = _a.menuId;
13
14
  return (react_1.default.createElement(DropDownMenuButton_1.default, { buttonComponent: SmallIconButton_1.SmallIconButtonWithTooltip, buttonProps: {
14
15
  icon: Settings_1.default,
15
16
  tooltipTitle: ui_i18n_1.default.text('Settings'),
16
17
  size: 'L'
17
- }, menuId: menuId, menuItems: items }));
18
+ }, menuId: menuId, menuItems: items, MenuItemRenderer: SettingsMenuItemRender_1.default }));
18
19
  };
19
20
  exports.default = SettingsMenu;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DropDownMenuItem } from '../../../types';
3
+ declare type Props = {
4
+ item: DropDownMenuItem;
5
+ onMenuClose?: (e: any) => void;
6
+ };
7
+ declare const SettingsMenuItemRenderer: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>;
8
+ export default SettingsMenuItemRenderer;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ var react_1 = __importStar(require("react"));
30
+ var ramda_1 = require("ramda");
31
+ var Checkbox_1 = __importDefault(require("@material-ui/core/Checkbox"));
32
+ var MenuItem_1 = __importDefault(require("@material-ui/core/MenuItem"));
33
+ var Typography_1 = __importDefault(require("@material-ui/core/Typography"));
34
+ var styles_1 = require("./styles");
35
+ var SettingsMenuItemRenderer = (0, react_1.forwardRef)(function (_a, ref) {
36
+ var item = _a.item, _b = _a.onMenuClose, onMenuClose = _b === void 0 ? ramda_1.identity : _b;
37
+ var styles = (0, styles_1.useStyles)();
38
+ var text = item.text, onClick = item.onClick, id = item.id, selected = item.selected;
39
+ var handleClick = function (e) {
40
+ onMenuClose(e);
41
+ onClick(e);
42
+ };
43
+ return (react_1.default.createElement(MenuItem_1.default, { classes: { root: styles.menuItem }, onClick: handleClick, ref: ref, "data-modal": true, "data-reltio-id": "reltio-settings-menu-item".concat(id) },
44
+ react_1.default.createElement(Checkbox_1.default, { checked: selected, className: styles.checkbox, color: "primary" }),
45
+ react_1.default.createElement(Typography_1.default, { classes: { root: styles.menuText } }, text)));
46
+ });
47
+ SettingsMenuItemRenderer.displayName = 'SettingsMenuItemRenderer';
48
+ exports.default = SettingsMenuItemRenderer;
@@ -0,0 +1 @@
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"checkbox" | "menuItem" | "menuText">;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useStyles = void 0;
4
+ var styles_1 = require("@material-ui/core/styles");
5
+ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
6
+ menuItem: {
7
+ height: '32px'
8
+ },
9
+ menuText: {
10
+ color: theme.palette.text.primary,
11
+ fontSize: '13px',
12
+ lineHeight: '15px'
13
+ },
14
+ checkbox: {
15
+ padding: 0,
16
+ marginRight: '15px'
17
+ }
18
+ }); });
@@ -1,129 +1,5 @@
1
- declare const _default: React.MemoExoticComponent<{
2
- ({ attributeValue, metadata, attributeType, uiPath, ...otherProps }: {
3
- [x: string]: any;
4
- attributeValue: any;
5
- metadata: any;
6
- attributeType: any;
7
- uiPath: any;
8
- }): JSX.Element;
9
- propTypes: {
10
- attributeType: import("prop-types").Requireable<import("prop-types").InferProps<{
11
- label: import("prop-types").Requireable<string>;
12
- name: import("prop-types").Requireable<string>;
13
- description: import("prop-types").Requireable<string>;
14
- type: import("prop-types").Requireable<string>;
15
- hidden: import("prop-types").Requireable<boolean>;
16
- faceted: import("prop-types").Requireable<boolean>;
17
- searchable: import("prop-types").Requireable<boolean>;
18
- uri: import("prop-types").Requireable<string>;
19
- access: import("prop-types").Requireable<string[]>;
20
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
21
- minValue: import("prop-types").Requireable<number>;
22
- maxValue: import("prop-types").Requireable<number>;
23
- }>>;
24
- }>>;
25
- showEmptyEditors: import("prop-types").Requireable<boolean>;
26
- lazy: import("prop-types").Requireable<boolean>;
27
- mode: import("prop-types").Requireable<any>;
28
- metadata: import("prop-types").Requireable<import("prop-types").InferProps<{
29
- uri: import("prop-types").Requireable<string>;
30
- description: import("prop-types").Requireable<string>;
31
- label: import("prop-types").Requireable<string>;
32
- schemaVersion: import("prop-types").Requireable<string>;
33
- entityTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
34
- typeColor: import("prop-types").Requireable<string>;
35
- typeIcon: import("prop-types").Requireable<string>;
36
- typeImage: import("prop-types").Requireable<string>;
37
- label: import("prop-types").Requireable<string>;
38
- uri: import("prop-types").Requireable<string>;
39
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
40
- label: import("prop-types").Requireable<string>;
41
- name: import("prop-types").Requireable<string>;
42
- description: import("prop-types").Requireable<string>;
43
- type: import("prop-types").Requireable<string>;
44
- hidden: import("prop-types").Requireable<boolean>;
45
- faceted: import("prop-types").Requireable<boolean>;
46
- searchable: import("prop-types").Requireable<boolean>;
47
- uri: import("prop-types").Requireable<string>;
48
- access: import("prop-types").Requireable<string[]>;
49
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
50
- minValue: import("prop-types").Requireable<number>;
51
- maxValue: import("prop-types").Requireable<number>;
52
- }>>;
53
- }>[]>;
54
- }>[]>;
55
- roles: import("prop-types").Requireable<object[]>;
56
- groupTypes: import("prop-types").Requireable<object[]>;
57
- relationTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
58
- label: import("prop-types").Requireable<string>;
59
- uri: import("prop-types").Requireable<string>;
60
- typeColor: import("prop-types").Requireable<string>;
61
- direction: import("prop-types").Requireable<string>;
62
- startObject: import("prop-types").Requireable<object>;
63
- endObject: import("prop-types").Requireable<object>;
64
- }>[]>;
65
- graphTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
66
- uri: import("prop-types").Requireable<string>;
67
- label: import("prop-types").Requireable<string>;
68
- extendsTypeUri: import("prop-types").Requireable<string>;
69
- relationshipTypeURIs: import("prop-types").Requireable<string[]>;
70
- }>[]>;
71
- interactionTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
72
- uri: import("prop-types").Requireable<string>;
73
- label: import("prop-types").Requireable<string>;
74
- memberTypes: import("prop-types").Requireable<any[]>;
75
- extendsTypeUri: import("prop-types").Requireable<string>;
76
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
77
- label: import("prop-types").Requireable<string>;
78
- name: import("prop-types").Requireable<string>;
79
- description: import("prop-types").Requireable<string>;
80
- type: import("prop-types").Requireable<string>;
81
- hidden: import("prop-types").Requireable<boolean>;
82
- faceted: import("prop-types").Requireable<boolean>;
83
- searchable: import("prop-types").Requireable<boolean>;
84
- uri: import("prop-types").Requireable<string>;
85
- access: import("prop-types").Requireable<string[]>;
86
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
87
- minValue: import("prop-types").Requireable<number>;
88
- maxValue: import("prop-types").Requireable<number>;
89
- }>>;
90
- }>[]>;
91
- }>[]>;
92
- sources: import("prop-types").Requireable<object[]>;
93
- }>>;
94
- ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
95
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
96
- attributeTypeUri: import("prop-types").Validator<string>;
97
- parentUri: import("prop-types").Validator<string>;
98
- uri: import("prop-types").Requireable<string>;
99
- message: import("prop-types").Requireable<string>;
100
- }>>;
101
- errors: import("prop-types").Requireable<import("prop-types").InferProps<{
102
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
103
- attributeTypeUri: import("prop-types").Validator<string>;
104
- parentUri: import("prop-types").Validator<string>;
105
- uri: import("prop-types").Requireable<string>;
106
- message: import("prop-types").Requireable<string>;
107
- }>[]>;
108
- crosswalks: import("prop-types").Requireable<any[]>;
109
- onAddAttributes: import("prop-types").Requireable<(...args: any[]) => any>;
110
- onAddOneMore: import("prop-types").Requireable<(...args: any[]) => any>;
111
- onDeleteAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
112
- onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
113
- additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
114
- hideDeleteButton: import("prop-types").Requireable<boolean>;
115
- showNonOv: import("prop-types").Requireable<boolean>;
116
- state: import("prop-types").Requireable<string>;
117
- expanded: import("prop-types").Requireable<boolean>;
118
- attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
119
- refEntity: import("prop-types").Requireable<object>;
120
- refRelation: import("prop-types").Requireable<object>;
121
- value: import("prop-types").Requireable<object>;
122
- ov: import("prop-types").Requireable<boolean>;
123
- type: import("prop-types").Requireable<string>;
124
- uri: import("prop-types").Requireable<string>;
125
- }>>;
126
- };
127
- }>;
1
+ import React from 'react';
2
+ import { ReferenceAttributeValue } from '@reltio/mdm-sdk';
3
+ import { ComplexAttributeProps } from '../../types';
4
+ declare const _default: React.MemoExoticComponent<({ attributeValue, attributeType, ...otherProps }: ComplexAttributeProps<ReferenceAttributeValue>) => JSX.Element>;
128
5
  export default _default;
129
- import React from "react";
@@ -51,6 +51,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
51
51
  var react_1 = __importStar(require("react"));
52
52
  var classnames_1 = __importDefault(require("classnames"));
53
53
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
54
+ var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
55
+ var react_redux_1 = require("react-redux");
54
56
  var contexts_1 = require("../../../../contexts");
55
57
  var ComplexAttribute_1 = __importDefault(require("../ComplexAttribute/ComplexAttribute"));
56
58
  var InternalLink_1 = __importDefault(require("../../../InternalLink/InternalLink"));
@@ -58,7 +60,9 @@ var SearchHighlighter_1 = __importDefault(require("../../../SearchHighlighter/Se
58
60
  var commonStyles_1 = require("../helpers/commonStyles");
59
61
  var styles_1 = __importDefault(require("./styles"));
60
62
  var ReferenceAttribute = function (_a) {
61
- var attributeValue = _a.attributeValue, metadata = _a.metadata, attributeType = _a.attributeType, uiPath = _a.uiPath, otherProps = __rest(_a, ["attributeValue", "metadata", "attributeType", "uiPath"]);
63
+ var attributeValue = _a.attributeValue, attributeType = _a.attributeType, otherProps = __rest(_a, ["attributeValue", "attributeType"]);
64
+ var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
65
+ var uiPath = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getUIPath);
62
66
  var styles = (0, styles_1.default)();
63
67
  var ovValueStyles = (0, commonStyles_1.useOvValueStyles)();
64
68
  var refEntityURI = (0, mdm_sdk_1.getReferencedEntityUriFromAttrValue)(attributeValue);
@@ -69,7 +73,8 @@ var ReferenceAttribute = function (_a) {
69
73
  var _a;
70
74
  var attributeAppearance = (0, mdm_sdk_1.getHistoryAppearanceByUri)(attributeValue.uri, appearance);
71
75
  var historyAttributesClassName = (0, mdm_sdk_1.getHistoryAttributeClassName)(attributeAppearance);
72
- return (react_1.default.createElement(InternalLink_1.default, { href: (0, mdm_sdk_1.isEmptyValue)(appearance) ? generateEntityUrl({ uiPath: uiPath, uri: refEntityURI }) : undefined, className: (0, classnames_1.default)(styles[historyAttributesClassName], (_a = {},
76
+ var screen = (refEntityURI === null || refEntityURI === void 0 ? void 0 : refEntityURI.startsWith('changeRequests')) ? 'dcrReview' : 'profile';
77
+ return (react_1.default.createElement(InternalLink_1.default, { href: (0, mdm_sdk_1.isEmptyValue)(appearance) ? generateEntityUrl({ uiPath: uiPath, uri: refEntityURI, screen: screen }) : undefined, className: (0, classnames_1.default)(styles[historyAttributesClassName], (_a = {},
73
78
  _a[ovValueStyles.ovFalse] = !(0, mdm_sdk_1.isOv)(attributeValue),
74
79
  _a)) },
75
80
  react_1.default.createElement(SearchHighlighter_1.default, { text: (0, mdm_sdk_1.getLabel)(attributeValue.label) }),
@@ -78,5 +83,4 @@ var ReferenceAttribute = function (_a) {
78
83
  }, [attributeValue, appearance, uiPath, refEntityURI, styles, ovValueStyles.ovFalse, generateEntityUrl]);
79
84
  return (react_1.default.createElement(ComplexAttribute_1.default, __assign({ attributeTypesList: attributeTypeList, attributeValue: attributeValue, label: entityLabel, attributeType: attributeType }, otherProps)));
80
85
  };
81
- ReferenceAttribute.propTypes = mdm_sdk_1.ReferenceAttributeType;
82
86
  exports.default = (0, react_1.memo)(ReferenceAttribute);
@@ -1,136 +1,2 @@
1
- export { ReferenceAttribute };
2
- declare const _default: import("react-redux").ConnectedComponent<import("react").MemoExoticComponent<{
3
- ({ attributeValue, metadata, attributeType, uiPath, ...otherProps }: {
4
- [x: string]: any;
5
- attributeValue: any;
6
- metadata: any;
7
- attributeType: any;
8
- uiPath: any;
9
- }): JSX.Element;
10
- propTypes: {
11
- attributeType: import("prop-types").Requireable<import("prop-types").InferProps<{
12
- label: import("prop-types").Requireable<string>;
13
- name: import("prop-types").Requireable<string>;
14
- description: import("prop-types").Requireable<string>;
15
- type: import("prop-types").Requireable<string>;
16
- hidden: import("prop-types").Requireable<boolean>;
17
- faceted: import("prop-types").Requireable<boolean>;
18
- searchable: import("prop-types").Requireable<boolean>;
19
- uri: import("prop-types").Requireable<string>;
20
- access: import("prop-types").Requireable<string[]>;
21
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
22
- minValue: import("prop-types").Requireable<number>;
23
- maxValue: import("prop-types").Requireable<number>;
24
- }>>;
25
- }>>;
26
- showEmptyEditors: import("prop-types").Requireable<boolean>;
27
- lazy: import("prop-types").Requireable<boolean>;
28
- mode: import("prop-types").Requireable<any>;
29
- metadata: import("prop-types").Requireable<import("prop-types").InferProps<{
30
- uri: import("prop-types").Requireable<string>;
31
- description: import("prop-types").Requireable<string>;
32
- label: import("prop-types").Requireable<string>;
33
- schemaVersion: import("prop-types").Requireable<string>;
34
- entityTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
35
- typeColor: import("prop-types").Requireable<string>;
36
- typeIcon: import("prop-types").Requireable<string>;
37
- typeImage: import("prop-types").Requireable<string>;
38
- label: import("prop-types").Requireable<string>;
39
- uri: import("prop-types").Requireable<string>;
40
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
41
- label: import("prop-types").Requireable<string>;
42
- name: import("prop-types").Requireable<string>;
43
- description: import("prop-types").Requireable<string>;
44
- type: import("prop-types").Requireable<string>;
45
- hidden: import("prop-types").Requireable<boolean>;
46
- faceted: import("prop-types").Requireable<boolean>;
47
- searchable: import("prop-types").Requireable<boolean>;
48
- uri: import("prop-types").Requireable<string>;
49
- access: import("prop-types").Requireable<string[]>;
50
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
51
- minValue: import("prop-types").Requireable<number>;
52
- maxValue: import("prop-types").Requireable<number>;
53
- }>>;
54
- }>[]>;
55
- }>[]>;
56
- roles: import("prop-types").Requireable<object[]>;
57
- groupTypes: import("prop-types").Requireable<object[]>;
58
- relationTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
59
- label: import("prop-types").Requireable<string>;
60
- uri: import("prop-types").Requireable<string>;
61
- typeColor: import("prop-types").Requireable<string>;
62
- direction: import("prop-types").Requireable<string>;
63
- startObject: import("prop-types").Requireable<object>;
64
- endObject: import("prop-types").Requireable<object>;
65
- }>[]>;
66
- graphTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
67
- uri: import("prop-types").Requireable<string>;
68
- label: import("prop-types").Requireable<string>;
69
- extendsTypeUri: import("prop-types").Requireable<string>;
70
- relationshipTypeURIs: import("prop-types").Requireable<string[]>;
71
- }>[]>;
72
- interactionTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
73
- uri: import("prop-types").Requireable<string>;
74
- label: import("prop-types").Requireable<string>;
75
- memberTypes: import("prop-types").Requireable<any[]>;
76
- extendsTypeUri: import("prop-types").Requireable<string>;
77
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
78
- label: import("prop-types").Requireable<string>;
79
- name: import("prop-types").Requireable<string>;
80
- description: import("prop-types").Requireable<string>;
81
- type: import("prop-types").Requireable<string>;
82
- hidden: import("prop-types").Requireable<boolean>;
83
- faceted: import("prop-types").Requireable<boolean>;
84
- searchable: import("prop-types").Requireable<boolean>;
85
- uri: import("prop-types").Requireable<string>;
86
- access: import("prop-types").Requireable<string[]>;
87
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
88
- minValue: import("prop-types").Requireable<number>;
89
- maxValue: import("prop-types").Requireable<number>;
90
- }>>;
91
- }>[]>;
92
- }>[]>;
93
- sources: import("prop-types").Requireable<object[]>;
94
- }>>;
95
- ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
96
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
97
- attributeTypeUri: import("prop-types").Validator<string>;
98
- parentUri: import("prop-types").Validator<string>;
99
- uri: import("prop-types").Requireable<string>;
100
- message: import("prop-types").Requireable<string>;
101
- }>>;
102
- errors: import("prop-types").Requireable<import("prop-types").InferProps<{
103
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
104
- attributeTypeUri: import("prop-types").Validator<string>;
105
- parentUri: import("prop-types").Validator<string>;
106
- uri: import("prop-types").Requireable<string>;
107
- message: import("prop-types").Requireable<string>;
108
- }>[]>;
109
- crosswalks: import("prop-types").Requireable<any[]>;
110
- onAddAttributes: import("prop-types").Requireable<(...args: any[]) => any>;
111
- onAddOneMore: import("prop-types").Requireable<(...args: any[]) => any>;
112
- onDeleteAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
113
- onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
114
- additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
115
- hideDeleteButton: import("prop-types").Requireable<boolean>;
116
- showNonOv: import("prop-types").Requireable<boolean>;
117
- state: import("prop-types").Requireable<string>;
118
- expanded: import("prop-types").Requireable<boolean>;
119
- attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
120
- refEntity: import("prop-types").Requireable<object>;
121
- refRelation: import("prop-types").Requireable<object>;
122
- value: import("prop-types").Requireable<object>;
123
- ov: import("prop-types").Requireable<boolean>;
124
- type: import("prop-types").Requireable<string>;
125
- uri: import("prop-types").Requireable<string>;
126
- }>>;
127
- };
128
- }>, import("react-redux").Omit<{
129
- [x: string]: any;
130
- attributeValue: any;
131
- metadata: any;
132
- attributeType: any;
133
- uiPath: any;
134
- }, "metadata" | "uiPath" | "dispatch">>;
135
- export default _default;
136
- import ReferenceAttribute from "./ReferenceAttribute";
1
+ import ReferenceAttribute from './ReferenceAttribute';
2
+ export default ReferenceAttribute;
@@ -3,15 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ReferenceAttribute = void 0;
7
- var react_redux_1 = require("react-redux");
8
6
  var ReferenceAttribute_1 = __importDefault(require("./ReferenceAttribute"));
9
- exports.ReferenceAttribute = ReferenceAttribute_1.default;
10
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
11
- var mapStateToProps = function (state) {
12
- return {
13
- metadata: mdm_module_1.default.selectors.getMetadata(state),
14
- uiPath: mdm_module_1.default.selectors.getUIPath(state)
15
- };
16
- };
17
- exports.default = (0, react_redux_1.connect)(mapStateToProps)(ReferenceAttribute_1.default);
7
+ exports.default = ReferenceAttribute_1.default;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { AttributeError, AttributeItem, AttributeType, Crosswalk, Mode } from '@reltio/mdm-sdk';
3
+ import { ScrollToElementContext } from '../../../contexts';
4
+ export declare type ComplexAttributeProps<T> = {
5
+ attributeValue: T;
6
+ attributeType: AttributeType;
7
+ showEmptyEditors: boolean;
8
+ lazy?: boolean;
9
+ ownError?: AttributeError;
10
+ errors?: AttributeError[];
11
+ mode?: Mode;
12
+ crosswalks?: Crosswalk[];
13
+ showNonOv?: boolean;
14
+ onAddAttributes: (params: AttributeItem[]) => void;
15
+ onAddOneMore: (params: AttributeItem) => void;
16
+ onDeleteAttribute: (param: AttributeItem) => void;
17
+ onChangeAttribute: (param: AttributeItem) => void;
18
+ additionalControlsRenderer?: (props: any) => JSX.Element;
19
+ hideDeleteButton?: boolean;
20
+ highlightedError?: React.ContextType<typeof ScrollToElementContext>;
21
+ highlightedAttribute?: React.ContextType<typeof ScrollToElementContext>;
22
+ state?: 'deleted' | 'edited';
23
+ expanded?: boolean;
24
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * from './attributesView';
2
+ export * from './attributes';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./attributesView"), exports);
18
+ __exportStar(require("./attributes"), exports);
@@ -1,2 +1,2 @@
1
- export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"inactive" | "label" | "secondaryLabel" | "entityType" | "profileBand" | "entityId" | "badge" | "profileIcon" | "profileBandWrapper" | "imageProfileIcon" | "profileInfo" | "businessCard" | "specialInfo">;
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"inactive" | "label" | "entityType" | "secondaryLabel" | "profileBand" | "entityId" | "badge" | "profileIcon" | "profileBandWrapper" | "imageProfileIcon" | "profileInfo" | "businessCard" | "specialInfo">;
2
2
  export default useStyles;
@@ -3,12 +3,13 @@ import SettingsIcon from '@material-ui/icons/Settings';
3
3
  import i18n from 'ui-i18n';
4
4
  import { SmallIconButtonWithTooltip } from '../SmallIconButton';
5
5
  import DropDownMenuButton from '../DropDownMenuButton/DropDownMenuButton';
6
+ import SettingsMenuItemRenderer from './SettingsMenuItemRender/SettingsMenuItemRender';
6
7
  var SettingsMenu = function (_a) {
7
8
  var items = _a.items, menuId = _a.menuId;
8
9
  return (React.createElement(DropDownMenuButton, { buttonComponent: SmallIconButtonWithTooltip, buttonProps: {
9
10
  icon: SettingsIcon,
10
11
  tooltipTitle: i18n.text('Settings'),
11
12
  size: 'L'
12
- }, menuId: menuId, menuItems: items }));
13
+ }, menuId: menuId, menuItems: items, MenuItemRenderer: SettingsMenuItemRenderer }));
13
14
  };
14
15
  export default SettingsMenu;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DropDownMenuItem } from '../../../types';
3
+ declare type Props = {
4
+ item: DropDownMenuItem;
5
+ onMenuClose?: (e: any) => void;
6
+ };
7
+ declare const SettingsMenuItemRenderer: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>;
8
+ export default SettingsMenuItemRenderer;
@@ -0,0 +1,20 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { identity } from 'ramda';
3
+ import Checkbox from '@material-ui/core/Checkbox';
4
+ import MenuItem from '@material-ui/core/MenuItem';
5
+ import Typography from '@material-ui/core/Typography';
6
+ import { useStyles } from './styles';
7
+ var SettingsMenuItemRenderer = forwardRef(function (_a, ref) {
8
+ var item = _a.item, _b = _a.onMenuClose, onMenuClose = _b === void 0 ? identity : _b;
9
+ var styles = useStyles();
10
+ var text = item.text, onClick = item.onClick, id = item.id, selected = item.selected;
11
+ var handleClick = function (e) {
12
+ onMenuClose(e);
13
+ onClick(e);
14
+ };
15
+ return (React.createElement(MenuItem, { classes: { root: styles.menuItem }, onClick: handleClick, ref: ref, "data-modal": true, "data-reltio-id": "reltio-settings-menu-item".concat(id) },
16
+ React.createElement(Checkbox, { checked: selected, className: styles.checkbox, color: "primary" }),
17
+ React.createElement(Typography, { classes: { root: styles.menuText } }, text)));
18
+ });
19
+ SettingsMenuItemRenderer.displayName = 'SettingsMenuItemRenderer';
20
+ export default SettingsMenuItemRenderer;
@@ -0,0 +1 @@
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"checkbox" | "menuItem" | "menuText">;
@@ -0,0 +1,15 @@
1
+ import { makeStyles } from '@material-ui/core/styles';
2
+ export var useStyles = makeStyles(function (theme) { return ({
3
+ menuItem: {
4
+ height: '32px'
5
+ },
6
+ menuText: {
7
+ color: theme.palette.text.primary,
8
+ fontSize: '13px',
9
+ lineHeight: '15px'
10
+ },
11
+ checkbox: {
12
+ padding: 0,
13
+ marginRight: '15px'
14
+ }
15
+ }); });
@@ -1,129 +1,5 @@
1
- declare const _default: React.MemoExoticComponent<{
2
- ({ attributeValue, metadata, attributeType, uiPath, ...otherProps }: {
3
- [x: string]: any;
4
- attributeValue: any;
5
- metadata: any;
6
- attributeType: any;
7
- uiPath: any;
8
- }): JSX.Element;
9
- propTypes: {
10
- attributeType: import("prop-types").Requireable<import("prop-types").InferProps<{
11
- label: import("prop-types").Requireable<string>;
12
- name: import("prop-types").Requireable<string>;
13
- description: import("prop-types").Requireable<string>;
14
- type: import("prop-types").Requireable<string>;
15
- hidden: import("prop-types").Requireable<boolean>;
16
- faceted: import("prop-types").Requireable<boolean>;
17
- searchable: import("prop-types").Requireable<boolean>;
18
- uri: import("prop-types").Requireable<string>;
19
- access: import("prop-types").Requireable<string[]>;
20
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
21
- minValue: import("prop-types").Requireable<number>;
22
- maxValue: import("prop-types").Requireable<number>;
23
- }>>;
24
- }>>;
25
- showEmptyEditors: import("prop-types").Requireable<boolean>;
26
- lazy: import("prop-types").Requireable<boolean>;
27
- mode: import("prop-types").Requireable<any>;
28
- metadata: import("prop-types").Requireable<import("prop-types").InferProps<{
29
- uri: import("prop-types").Requireable<string>;
30
- description: import("prop-types").Requireable<string>;
31
- label: import("prop-types").Requireable<string>;
32
- schemaVersion: import("prop-types").Requireable<string>;
33
- entityTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
34
- typeColor: import("prop-types").Requireable<string>;
35
- typeIcon: import("prop-types").Requireable<string>;
36
- typeImage: import("prop-types").Requireable<string>;
37
- label: import("prop-types").Requireable<string>;
38
- uri: import("prop-types").Requireable<string>;
39
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
40
- label: import("prop-types").Requireable<string>;
41
- name: import("prop-types").Requireable<string>;
42
- description: import("prop-types").Requireable<string>;
43
- type: import("prop-types").Requireable<string>;
44
- hidden: import("prop-types").Requireable<boolean>;
45
- faceted: import("prop-types").Requireable<boolean>;
46
- searchable: import("prop-types").Requireable<boolean>;
47
- uri: import("prop-types").Requireable<string>;
48
- access: import("prop-types").Requireable<string[]>;
49
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
50
- minValue: import("prop-types").Requireable<number>;
51
- maxValue: import("prop-types").Requireable<number>;
52
- }>>;
53
- }>[]>;
54
- }>[]>;
55
- roles: import("prop-types").Requireable<object[]>;
56
- groupTypes: import("prop-types").Requireable<object[]>;
57
- relationTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
58
- label: import("prop-types").Requireable<string>;
59
- uri: import("prop-types").Requireable<string>;
60
- typeColor: import("prop-types").Requireable<string>;
61
- direction: import("prop-types").Requireable<string>;
62
- startObject: import("prop-types").Requireable<object>;
63
- endObject: import("prop-types").Requireable<object>;
64
- }>[]>;
65
- graphTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
66
- uri: import("prop-types").Requireable<string>;
67
- label: import("prop-types").Requireable<string>;
68
- extendsTypeUri: import("prop-types").Requireable<string>;
69
- relationshipTypeURIs: import("prop-types").Requireable<string[]>;
70
- }>[]>;
71
- interactionTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
72
- uri: import("prop-types").Requireable<string>;
73
- label: import("prop-types").Requireable<string>;
74
- memberTypes: import("prop-types").Requireable<any[]>;
75
- extendsTypeUri: import("prop-types").Requireable<string>;
76
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
77
- label: import("prop-types").Requireable<string>;
78
- name: import("prop-types").Requireable<string>;
79
- description: import("prop-types").Requireable<string>;
80
- type: import("prop-types").Requireable<string>;
81
- hidden: import("prop-types").Requireable<boolean>;
82
- faceted: import("prop-types").Requireable<boolean>;
83
- searchable: import("prop-types").Requireable<boolean>;
84
- uri: import("prop-types").Requireable<string>;
85
- access: import("prop-types").Requireable<string[]>;
86
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
87
- minValue: import("prop-types").Requireable<number>;
88
- maxValue: import("prop-types").Requireable<number>;
89
- }>>;
90
- }>[]>;
91
- }>[]>;
92
- sources: import("prop-types").Requireable<object[]>;
93
- }>>;
94
- ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
95
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
96
- attributeTypeUri: import("prop-types").Validator<string>;
97
- parentUri: import("prop-types").Validator<string>;
98
- uri: import("prop-types").Requireable<string>;
99
- message: import("prop-types").Requireable<string>;
100
- }>>;
101
- errors: import("prop-types").Requireable<import("prop-types").InferProps<{
102
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
103
- attributeTypeUri: import("prop-types").Validator<string>;
104
- parentUri: import("prop-types").Validator<string>;
105
- uri: import("prop-types").Requireable<string>;
106
- message: import("prop-types").Requireable<string>;
107
- }>[]>;
108
- crosswalks: import("prop-types").Requireable<any[]>;
109
- onAddAttributes: import("prop-types").Requireable<(...args: any[]) => any>;
110
- onAddOneMore: import("prop-types").Requireable<(...args: any[]) => any>;
111
- onDeleteAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
112
- onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
113
- additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
114
- hideDeleteButton: import("prop-types").Requireable<boolean>;
115
- showNonOv: import("prop-types").Requireable<boolean>;
116
- state: import("prop-types").Requireable<string>;
117
- expanded: import("prop-types").Requireable<boolean>;
118
- attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
119
- refEntity: import("prop-types").Requireable<object>;
120
- refRelation: import("prop-types").Requireable<object>;
121
- value: import("prop-types").Requireable<object>;
122
- ov: import("prop-types").Requireable<boolean>;
123
- type: import("prop-types").Requireable<string>;
124
- uri: import("prop-types").Requireable<string>;
125
- }>>;
126
- };
127
- }>;
1
+ import React from 'react';
2
+ import { ReferenceAttributeValue } from '@reltio/mdm-sdk';
3
+ import { ComplexAttributeProps } from '../../types';
4
+ declare const _default: React.MemoExoticComponent<({ attributeValue, attributeType, ...otherProps }: ComplexAttributeProps<ReferenceAttributeValue>) => JSX.Element>;
128
5
  export default _default;
129
- import React from "react";
@@ -22,7 +22,9 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React, { memo, useContext, useMemo } from 'react';
24
24
  import classnames from 'classnames';
25
- import { getAttributeTypeSubAttributes, getHistoryAppearanceByUri, getHistoryAttributeClassName, getLabel, getReferencedEntityUriFromAttrValue, isEmptyValue, isOv, ReferenceAttributeType } from '@reltio/mdm-sdk';
25
+ import { getAttributeTypeSubAttributes, getHistoryAppearanceByUri, getHistoryAttributeClassName, getLabel, getReferencedEntityUriFromAttrValue, isEmptyValue, isOv } from '@reltio/mdm-sdk';
26
+ import mdmModule from '@reltio/mdm-module';
27
+ import { useSelector } from 'react-redux';
26
28
  import { HistoryDiffContext, UrlGeneratorsContext } from '../../../../contexts';
27
29
  import ComplexAttribute from '../ComplexAttribute/ComplexAttribute';
28
30
  import InternalLink from '../../../InternalLink/InternalLink';
@@ -30,7 +32,9 @@ import SearchHighlighter from '../../../SearchHighlighter/SearchHighlighter';
30
32
  import { useOvValueStyles } from '../helpers/commonStyles';
31
33
  import useStyles from './styles';
32
34
  var ReferenceAttribute = function (_a) {
33
- var attributeValue = _a.attributeValue, metadata = _a.metadata, attributeType = _a.attributeType, uiPath = _a.uiPath, otherProps = __rest(_a, ["attributeValue", "metadata", "attributeType", "uiPath"]);
35
+ var attributeValue = _a.attributeValue, attributeType = _a.attributeType, otherProps = __rest(_a, ["attributeValue", "attributeType"]);
36
+ var metadata = useSelector(mdmModule.selectors.getMetadata);
37
+ var uiPath = useSelector(mdmModule.selectors.getUIPath);
34
38
  var styles = useStyles();
35
39
  var ovValueStyles = useOvValueStyles();
36
40
  var refEntityURI = getReferencedEntityUriFromAttrValue(attributeValue);
@@ -41,7 +45,8 @@ var ReferenceAttribute = function (_a) {
41
45
  var _a;
42
46
  var attributeAppearance = getHistoryAppearanceByUri(attributeValue.uri, appearance);
43
47
  var historyAttributesClassName = getHistoryAttributeClassName(attributeAppearance);
44
- return (React.createElement(InternalLink, { href: isEmptyValue(appearance) ? generateEntityUrl({ uiPath: uiPath, uri: refEntityURI }) : undefined, className: classnames(styles[historyAttributesClassName], (_a = {},
48
+ var screen = (refEntityURI === null || refEntityURI === void 0 ? void 0 : refEntityURI.startsWith('changeRequests')) ? 'dcrReview' : 'profile';
49
+ return (React.createElement(InternalLink, { href: isEmptyValue(appearance) ? generateEntityUrl({ uiPath: uiPath, uri: refEntityURI, screen: screen }) : undefined, className: classnames(styles[historyAttributesClassName], (_a = {},
45
50
  _a[ovValueStyles.ovFalse] = !isOv(attributeValue),
46
51
  _a)) },
47
52
  React.createElement(SearchHighlighter, { text: getLabel(attributeValue.label) }),
@@ -50,5 +55,4 @@ var ReferenceAttribute = function (_a) {
50
55
  }, [attributeValue, appearance, uiPath, refEntityURI, styles, ovValueStyles.ovFalse, generateEntityUrl]);
51
56
  return (React.createElement(ComplexAttribute, __assign({ attributeTypesList: attributeTypeList, attributeValue: attributeValue, label: entityLabel, attributeType: attributeType }, otherProps)));
52
57
  };
53
- ReferenceAttribute.propTypes = ReferenceAttributeType;
54
58
  export default memo(ReferenceAttribute);
@@ -1,136 +1,2 @@
1
- export { ReferenceAttribute };
2
- declare const _default: import("react-redux").ConnectedComponent<import("react").MemoExoticComponent<{
3
- ({ attributeValue, metadata, attributeType, uiPath, ...otherProps }: {
4
- [x: string]: any;
5
- attributeValue: any;
6
- metadata: any;
7
- attributeType: any;
8
- uiPath: any;
9
- }): JSX.Element;
10
- propTypes: {
11
- attributeType: import("prop-types").Requireable<import("prop-types").InferProps<{
12
- label: import("prop-types").Requireable<string>;
13
- name: import("prop-types").Requireable<string>;
14
- description: import("prop-types").Requireable<string>;
15
- type: import("prop-types").Requireable<string>;
16
- hidden: import("prop-types").Requireable<boolean>;
17
- faceted: import("prop-types").Requireable<boolean>;
18
- searchable: import("prop-types").Requireable<boolean>;
19
- uri: import("prop-types").Requireable<string>;
20
- access: import("prop-types").Requireable<string[]>;
21
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
22
- minValue: import("prop-types").Requireable<number>;
23
- maxValue: import("prop-types").Requireable<number>;
24
- }>>;
25
- }>>;
26
- showEmptyEditors: import("prop-types").Requireable<boolean>;
27
- lazy: import("prop-types").Requireable<boolean>;
28
- mode: import("prop-types").Requireable<any>;
29
- metadata: import("prop-types").Requireable<import("prop-types").InferProps<{
30
- uri: import("prop-types").Requireable<string>;
31
- description: import("prop-types").Requireable<string>;
32
- label: import("prop-types").Requireable<string>;
33
- schemaVersion: import("prop-types").Requireable<string>;
34
- entityTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
35
- typeColor: import("prop-types").Requireable<string>;
36
- typeIcon: import("prop-types").Requireable<string>;
37
- typeImage: import("prop-types").Requireable<string>;
38
- label: import("prop-types").Requireable<string>;
39
- uri: import("prop-types").Requireable<string>;
40
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
41
- label: import("prop-types").Requireable<string>;
42
- name: import("prop-types").Requireable<string>;
43
- description: import("prop-types").Requireable<string>;
44
- type: import("prop-types").Requireable<string>;
45
- hidden: import("prop-types").Requireable<boolean>;
46
- faceted: import("prop-types").Requireable<boolean>;
47
- searchable: import("prop-types").Requireable<boolean>;
48
- uri: import("prop-types").Requireable<string>;
49
- access: import("prop-types").Requireable<string[]>;
50
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
51
- minValue: import("prop-types").Requireable<number>;
52
- maxValue: import("prop-types").Requireable<number>;
53
- }>>;
54
- }>[]>;
55
- }>[]>;
56
- roles: import("prop-types").Requireable<object[]>;
57
- groupTypes: import("prop-types").Requireable<object[]>;
58
- relationTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
59
- label: import("prop-types").Requireable<string>;
60
- uri: import("prop-types").Requireable<string>;
61
- typeColor: import("prop-types").Requireable<string>;
62
- direction: import("prop-types").Requireable<string>;
63
- startObject: import("prop-types").Requireable<object>;
64
- endObject: import("prop-types").Requireable<object>;
65
- }>[]>;
66
- graphTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
67
- uri: import("prop-types").Requireable<string>;
68
- label: import("prop-types").Requireable<string>;
69
- extendsTypeUri: import("prop-types").Requireable<string>;
70
- relationshipTypeURIs: import("prop-types").Requireable<string[]>;
71
- }>[]>;
72
- interactionTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
73
- uri: import("prop-types").Requireable<string>;
74
- label: import("prop-types").Requireable<string>;
75
- memberTypes: import("prop-types").Requireable<any[]>;
76
- extendsTypeUri: import("prop-types").Requireable<string>;
77
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
78
- label: import("prop-types").Requireable<string>;
79
- name: import("prop-types").Requireable<string>;
80
- description: import("prop-types").Requireable<string>;
81
- type: import("prop-types").Requireable<string>;
82
- hidden: import("prop-types").Requireable<boolean>;
83
- faceted: import("prop-types").Requireable<boolean>;
84
- searchable: import("prop-types").Requireable<boolean>;
85
- uri: import("prop-types").Requireable<string>;
86
- access: import("prop-types").Requireable<string[]>;
87
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
88
- minValue: import("prop-types").Requireable<number>;
89
- maxValue: import("prop-types").Requireable<number>;
90
- }>>;
91
- }>[]>;
92
- }>[]>;
93
- sources: import("prop-types").Requireable<object[]>;
94
- }>>;
95
- ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
96
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
97
- attributeTypeUri: import("prop-types").Validator<string>;
98
- parentUri: import("prop-types").Validator<string>;
99
- uri: import("prop-types").Requireable<string>;
100
- message: import("prop-types").Requireable<string>;
101
- }>>;
102
- errors: import("prop-types").Requireable<import("prop-types").InferProps<{
103
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
104
- attributeTypeUri: import("prop-types").Validator<string>;
105
- parentUri: import("prop-types").Validator<string>;
106
- uri: import("prop-types").Requireable<string>;
107
- message: import("prop-types").Requireable<string>;
108
- }>[]>;
109
- crosswalks: import("prop-types").Requireable<any[]>;
110
- onAddAttributes: import("prop-types").Requireable<(...args: any[]) => any>;
111
- onAddOneMore: import("prop-types").Requireable<(...args: any[]) => any>;
112
- onDeleteAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
113
- onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
114
- additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
115
- hideDeleteButton: import("prop-types").Requireable<boolean>;
116
- showNonOv: import("prop-types").Requireable<boolean>;
117
- state: import("prop-types").Requireable<string>;
118
- expanded: import("prop-types").Requireable<boolean>;
119
- attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
120
- refEntity: import("prop-types").Requireable<object>;
121
- refRelation: import("prop-types").Requireable<object>;
122
- value: import("prop-types").Requireable<object>;
123
- ov: import("prop-types").Requireable<boolean>;
124
- type: import("prop-types").Requireable<string>;
125
- uri: import("prop-types").Requireable<string>;
126
- }>>;
127
- };
128
- }>, import("react-redux").Omit<{
129
- [x: string]: any;
130
- attributeValue: any;
131
- metadata: any;
132
- attributeType: any;
133
- uiPath: any;
134
- }, "metadata" | "uiPath" | "dispatch">>;
135
- export default _default;
136
- import ReferenceAttribute from "./ReferenceAttribute";
1
+ import ReferenceAttribute from './ReferenceAttribute';
2
+ export default ReferenceAttribute;
@@ -1,11 +1,2 @@
1
- import { connect } from 'react-redux';
2
1
  import ReferenceAttribute from './ReferenceAttribute';
3
- import mdmModule from '@reltio/mdm-module';
4
- var mapStateToProps = function (state) {
5
- return {
6
- metadata: mdmModule.selectors.getMetadata(state),
7
- uiPath: mdmModule.selectors.getUIPath(state)
8
- };
9
- };
10
- export { ReferenceAttribute };
11
- export default connect(mapStateToProps)(ReferenceAttribute);
2
+ export default ReferenceAttribute;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { AttributeError, AttributeItem, AttributeType, Crosswalk, Mode } from '@reltio/mdm-sdk';
3
+ import { ScrollToElementContext } from '../../../contexts';
4
+ export declare type ComplexAttributeProps<T> = {
5
+ attributeValue: T;
6
+ attributeType: AttributeType;
7
+ showEmptyEditors: boolean;
8
+ lazy?: boolean;
9
+ ownError?: AttributeError;
10
+ errors?: AttributeError[];
11
+ mode?: Mode;
12
+ crosswalks?: Crosswalk[];
13
+ showNonOv?: boolean;
14
+ onAddAttributes: (params: AttributeItem[]) => void;
15
+ onAddOneMore: (params: AttributeItem) => void;
16
+ onDeleteAttribute: (param: AttributeItem) => void;
17
+ onChangeAttribute: (param: AttributeItem) => void;
18
+ additionalControlsRenderer?: (props: any) => JSX.Element;
19
+ hideDeleteButton?: boolean;
20
+ highlightedError?: React.ContextType<typeof ScrollToElementContext>;
21
+ highlightedAttribute?: React.ContextType<typeof ScrollToElementContext>;
22
+ state?: 'deleted' | 'edited';
23
+ expanded?: boolean;
24
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
1
  export * from './attributesView';
2
+ export * from './attributes';
@@ -1 +1,2 @@
1
1
  export * from './attributesView';
2
+ export * from './attributes';
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1543",
3
+ "version": "1.4.1545",
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.1543",
11
- "@reltio/mdm-sdk": "^1.4.1543",
10
+ "@reltio/mdm-module": "^1.4.1545",
11
+ "@reltio/mdm-sdk": "^1.4.1545",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",