@reltio/components 1.4.1853 → 1.4.1855

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 (171) hide show
  1. package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.js +1 -1
  2. package/cjs/ConnectionEditor/ConnectionEditor.d.ts +3 -3
  3. package/cjs/ConnectionEditor/ConnectionEditor.test.js +2 -2
  4. package/cjs/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.d.ts +14 -34
  5. package/cjs/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +1 -20
  6. package/cjs/DependentLookupEditor/DependentLookupEditor.d.ts +27 -44
  7. package/cjs/DependentLookupEditor/DependentLookupEditor.js +3 -21
  8. package/cjs/DropDownEditor/DropDownEditor.d.ts +14 -15
  9. package/cjs/DropDownEditor/DropDownEditor.js +0 -6
  10. package/cjs/EditModeAttributesList/EditModeAttributesList.d.ts +14 -3
  11. package/cjs/EditModeAttributesList/EditModeAttributesList.js +0 -20
  12. package/cjs/EditModeAttributesPager/EditModeAttributesPager.d.ts +3 -2
  13. package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.d.ts +2 -3
  14. package/cjs/EditModeAttributesPager/types.d.ts +7 -6
  15. package/cjs/EditModeComplexAttribute/EditModeComplexAttribute.d.ts +41 -4
  16. package/cjs/EditModeComplexAttribute/EditModeComplexAttribute.js +6 -17
  17. package/cjs/EditModeComplexAttribute/index.d.ts +1 -0
  18. package/cjs/EntitySelector/EntitySelector.d.ts +19 -31
  19. package/cjs/EntitySelector/EntitySelector.js +0 -14
  20. package/cjs/EntitySelector/components/EntityOption/EntityOption.d.ts +17 -22
  21. package/cjs/EntitySelector/components/EntityOption/EntityOption.js +0 -18
  22. package/cjs/ErrorWrapper/ErrorWrapper.d.ts +2 -2
  23. package/cjs/FilterEditor/FilterEditor.d.ts +16 -23
  24. package/cjs/FilterEditor/FilterEditor.js +2 -14
  25. package/cjs/FilterValueEditor/FilterValueEditor.d.ts +14 -24
  26. package/cjs/FilterValueEditor/FilterValueEditor.js +0 -9
  27. package/cjs/HOCs/withFilter/ColumnFilter.js +1 -1
  28. package/cjs/LookupEditor/LookupEditor.d.ts +11 -33
  29. package/cjs/LookupEditor/LookupEditor.js +1 -14
  30. package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.d.ts +11 -21
  31. package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.js +0 -7
  32. package/cjs/LookupEditor/components/GroupedDropDownEditor/helpers.d.ts +9 -2
  33. package/cjs/LookupEditor/components/GroupedDropDownEditor/helpers.js +7 -7
  34. package/cjs/LookupEditor/components/GroupedDropDownEditor/styles.d.ts +1 -1
  35. package/cjs/NestedAttribute/NestedAttribute.d.ts +4 -124
  36. package/cjs/NestedAttribute/NestedAttribute.js +0 -1
  37. package/cjs/NestedAttributeEditor/NestedAttributeEditor.d.ts +5 -1
  38. package/cjs/NestedAttributeEditor/NestedAttributeEditor.js +0 -1
  39. package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.d.ts +14 -44
  40. package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +0 -12
  41. package/cjs/ReadOnlyComplexAttribute/index.d.ts +1 -0
  42. package/cjs/ReferenceAttribute/ReferenceAttribute.d.ts +3 -24
  43. package/cjs/ReferenceAttribute/ReferenceAttribute.test.js +2 -2
  44. package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.d.ts +5 -2
  45. package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.js +2 -3
  46. package/cjs/RelationTypeSelector/RelationTypeSelector.d.ts +9 -26
  47. package/cjs/RelationTypeSelector/RelationTypeSelector.js +2 -14
  48. package/cjs/SaveSegmentDialog/SaveSegmentDialog.d.ts +3 -1
  49. package/cjs/SaveSegmentDialog/SaveSegmentDialog.js +9 -6
  50. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +39 -16
  51. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.js +0 -17
  52. package/cjs/SimpleAttributeEditor/useAttributeValuePermissions.d.ts +1 -1
  53. package/cjs/components/ImageDetailsView/helpers/index.d.ts +5 -2
  54. package/cjs/components/ImportButton/ImportButton.d.ts +2 -1
  55. package/cjs/components/MultipliableSelect/MultipliableSelect.d.ts +20 -30
  56. package/cjs/components/MultipliableSelect/MultipliableSelect.js +0 -15
  57. package/cjs/components/ProfileBand/styles.d.ts +1 -1
  58. package/cjs/components/QueryBuilderRow/QueryBuilderRow.d.ts +43 -107
  59. package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +0 -25
  60. package/cjs/components/QueryBuilderRow/components/ReadOnlyFilter.d.ts +4 -3
  61. package/cjs/components/QueryBuilderRow/components/ReadOnlyLogicOperator.d.ts +4 -10
  62. package/cjs/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +1 -6
  63. package/cjs/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.d.ts +33 -64
  64. package/cjs/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +3 -51
  65. package/cjs/components/ReactSelect/AsyncSelect.d.ts +0 -45
  66. package/cjs/components/ReactSelect/CreatableSelect.d.ts +0 -45
  67. package/cjs/components/ReactSelect/Select.d.ts +0 -45
  68. package/cjs/components/ReactSelect/withMuiSkin.d.ts +3 -48
  69. package/cjs/components/ReactSelect/withMuiSkin.js +0 -50
  70. package/cjs/components/ReactSortableTree/node-renderer-default.d.ts +2 -2
  71. package/cjs/components/ReadableSearchQuery/ReadableSearchQuery.d.ts +2 -4
  72. package/cjs/components/SearchInput/SearchInput.d.ts +1 -1
  73. package/cjs/components/SelectionPopup/SelectionPopup.d.ts +1 -1
  74. package/cjs/constants/index.d.ts +1 -1
  75. package/cjs/constants/index.js +1 -4
  76. package/cjs/constants/prop-types.d.ts +0 -81
  77. package/cjs/constants/prop-types.js +17 -46
  78. package/cjs/constants/textField.d.ts +2 -2
  79. package/cjs/contexts/ScrollToElementContext/index.d.ts +1 -1
  80. package/cjs/helpers/basicTable.d.ts +2 -7
  81. package/cjs/hooks/useRelationTypeSelector.d.ts +12 -8
  82. package/cjs/hooks/useRelationTypeSelector.js +3 -1
  83. package/cjs/hooks/useSavedSearchesRequest/useSavedSearchesRequest.d.ts +1 -1
  84. package/cjs/hooks/useSavedSearchesRequest/useSavedSearchesRequest.js +7 -3
  85. package/cjs/types/index.d.ts +19 -2
  86. package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.js +1 -1
  87. package/esm/ConnectionEditor/ConnectionEditor.d.ts +3 -3
  88. package/esm/ConnectionEditor/ConnectionEditor.test.js +2 -2
  89. package/esm/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.d.ts +14 -34
  90. package/esm/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +1 -17
  91. package/esm/DependentLookupEditor/DependentLookupEditor.d.ts +27 -44
  92. package/esm/DependentLookupEditor/DependentLookupEditor.js +4 -22
  93. package/esm/DropDownEditor/DropDownEditor.d.ts +14 -15
  94. package/esm/DropDownEditor/DropDownEditor.js +0 -6
  95. package/esm/EditModeAttributesList/EditModeAttributesList.d.ts +14 -3
  96. package/esm/EditModeAttributesList/EditModeAttributesList.js +1 -21
  97. package/esm/EditModeAttributesPager/EditModeAttributesPager.d.ts +3 -2
  98. package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.d.ts +2 -3
  99. package/esm/EditModeAttributesPager/types.d.ts +7 -6
  100. package/esm/EditModeComplexAttribute/EditModeComplexAttribute.d.ts +41 -4
  101. package/esm/EditModeComplexAttribute/EditModeComplexAttribute.js +7 -18
  102. package/esm/EditModeComplexAttribute/index.d.ts +1 -0
  103. package/esm/EntitySelector/EntitySelector.d.ts +19 -31
  104. package/esm/EntitySelector/EntitySelector.js +1 -15
  105. package/esm/EntitySelector/components/EntityOption/EntityOption.d.ts +17 -22
  106. package/esm/EntitySelector/components/EntityOption/EntityOption.js +0 -18
  107. package/esm/ErrorWrapper/ErrorWrapper.d.ts +2 -2
  108. package/esm/FilterEditor/FilterEditor.d.ts +16 -23
  109. package/esm/FilterEditor/FilterEditor.js +3 -15
  110. package/esm/FilterValueEditor/FilterValueEditor.d.ts +14 -24
  111. package/esm/FilterValueEditor/FilterValueEditor.js +1 -10
  112. package/esm/HOCs/withFilter/ColumnFilter.js +1 -1
  113. package/esm/LookupEditor/LookupEditor.d.ts +11 -33
  114. package/esm/LookupEditor/LookupEditor.js +1 -11
  115. package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.d.ts +11 -21
  116. package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.js +0 -7
  117. package/esm/LookupEditor/components/GroupedDropDownEditor/helpers.d.ts +9 -2
  118. package/esm/LookupEditor/components/GroupedDropDownEditor/helpers.js +7 -7
  119. package/esm/LookupEditor/components/GroupedDropDownEditor/styles.d.ts +1 -1
  120. package/esm/NestedAttribute/NestedAttribute.d.ts +4 -124
  121. package/esm/NestedAttribute/NestedAttribute.js +1 -2
  122. package/esm/NestedAttributeEditor/NestedAttributeEditor.d.ts +5 -1
  123. package/esm/NestedAttributeEditor/NestedAttributeEditor.js +1 -2
  124. package/esm/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.d.ts +14 -44
  125. package/esm/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +1 -13
  126. package/esm/ReadOnlyComplexAttribute/index.d.ts +1 -0
  127. package/esm/ReferenceAttribute/ReferenceAttribute.d.ts +3 -24
  128. package/esm/ReferenceAttribute/ReferenceAttribute.test.js +2 -2
  129. package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.d.ts +5 -2
  130. package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.js +3 -4
  131. package/esm/RelationTypeSelector/RelationTypeSelector.d.ts +9 -26
  132. package/esm/RelationTypeSelector/RelationTypeSelector.js +2 -14
  133. package/esm/SaveSegmentDialog/SaveSegmentDialog.d.ts +3 -1
  134. package/esm/SaveSegmentDialog/SaveSegmentDialog.js +9 -6
  135. package/esm/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +39 -16
  136. package/esm/SimpleAttributeEditor/SimpleAttributeEditor.js +1 -18
  137. package/esm/SimpleAttributeEditor/useAttributeValuePermissions.d.ts +1 -1
  138. package/esm/components/ImageDetailsView/helpers/index.d.ts +5 -2
  139. package/esm/components/ImportButton/ImportButton.d.ts +2 -1
  140. package/esm/components/MultipliableSelect/MultipliableSelect.d.ts +20 -30
  141. package/esm/components/MultipliableSelect/MultipliableSelect.js +0 -15
  142. package/esm/components/ProfileBand/styles.d.ts +1 -1
  143. package/esm/components/QueryBuilderRow/QueryBuilderRow.d.ts +43 -107
  144. package/esm/components/QueryBuilderRow/QueryBuilderRow.js +0 -25
  145. package/esm/components/QueryBuilderRow/components/ReadOnlyFilter.d.ts +4 -3
  146. package/esm/components/QueryBuilderRow/components/ReadOnlyLogicOperator.d.ts +4 -10
  147. package/esm/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +1 -6
  148. package/esm/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.d.ts +33 -64
  149. package/esm/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +3 -28
  150. package/esm/components/ReactSelect/AsyncSelect.d.ts +0 -45
  151. package/esm/components/ReactSelect/CreatableSelect.d.ts +0 -45
  152. package/esm/components/ReactSelect/Select.d.ts +0 -45
  153. package/esm/components/ReactSelect/withMuiSkin.d.ts +3 -48
  154. package/esm/components/ReactSelect/withMuiSkin.js +0 -50
  155. package/esm/components/ReactSortableTree/node-renderer-default.d.ts +2 -2
  156. package/esm/components/ReadableSearchQuery/ReadableSearchQuery.d.ts +2 -4
  157. package/esm/components/SearchInput/SearchInput.d.ts +1 -1
  158. package/esm/components/SelectionPopup/SelectionPopup.d.ts +1 -1
  159. package/esm/constants/index.d.ts +1 -1
  160. package/esm/constants/index.js +1 -1
  161. package/esm/constants/prop-types.d.ts +0 -81
  162. package/esm/constants/prop-types.js +17 -38
  163. package/esm/constants/textField.d.ts +2 -2
  164. package/esm/contexts/ScrollToElementContext/index.d.ts +1 -1
  165. package/esm/helpers/basicTable.d.ts +2 -7
  166. package/esm/hooks/useRelationTypeSelector.d.ts +12 -8
  167. package/esm/hooks/useRelationTypeSelector.js +3 -1
  168. package/esm/hooks/useSavedSearchesRequest/useSavedSearchesRequest.d.ts +1 -1
  169. package/esm/hooks/useSavedSearchesRequest/useSavedSearchesRequest.js +8 -4
  170. package/esm/types/index.d.ts +19 -2
  171. package/package.json +2 -2
@@ -21,14 +21,12 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React from 'react';
24
- import PropTypes from 'prop-types';
25
24
  import classnames from 'classnames';
26
25
  import i18n from 'ui-i18n';
27
26
  import { isNil, pipe, prop } from 'ramda';
28
27
  import { wrapInArrayIfNeeded } from '@reltio/mdm-sdk';
29
28
  import CheckIcon from '@mui/icons-material/Check';
30
29
  import MenuItem from '@mui/material/MenuItem';
31
- import { DropDownEntryType, DropDownGroupEntryType, SelectValueType } from '../../../constants/prop-types';
32
30
  import MultipliableSelect from '../../../components/MultipliableSelect/MultipliableSelect';
33
31
  import { findEntryByValue, flattenGroupedEntries } from './helpers';
34
32
  import { useStyles } from './styles';
@@ -47,8 +45,3 @@ export var GroupedDropDownEditor = function (_a) {
47
45
  label || value.toString()));
48
46
  })) : (React.createElement(MenuItem, { className: styles.emptyLabel, disabled: true }, i18n.text('No results found')))));
49
47
  };
50
- GroupedDropDownEditor.propTypes = {
51
- value: PropTypes.oneOfType([SelectValueType, PropTypes.arrayOf(SelectValueType)]),
52
- entries: PropTypes.arrayOf(PropTypes.oneOfType([DropDownEntryType, DropDownGroupEntryType])).isRequired,
53
- classes: PropTypes.object
54
- };
@@ -1,2 +1,9 @@
1
- export const flattenGroupedEntries: any;
2
- export const findEntryByValue: any;
1
+ import { CurriedFunction2, PrimitiveValue } from '@reltio/mdm-sdk';
2
+ import { DropDownGroupEntryType, DropDownEntryType } from '../../../types';
3
+ type FlattenEntry = DropDownEntryType & {
4
+ depth: number;
5
+ isGroup?: boolean;
6
+ };
7
+ export declare const flattenGroupedEntries: (entries: DropDownEntryType[] | DropDownGroupEntryType[]) => FlattenEntry[];
8
+ export declare const findEntryByValue: CurriedFunction2<Array<FlattenEntry>, PrimitiveValue, FlattenEntry>;
9
+ export {};
@@ -22,12 +22,12 @@ import { chain, curry, has } from 'ramda';
22
22
  var isGroupEntry = has('values');
23
23
  var flattenEntry = curry(function (depth, entry) {
24
24
  return isGroupEntry(entry)
25
- ? __spreadArray([{ label: entry.label, depth: depth, isGroup: true }], chain(flattenEntry(depth + 1), entry.values), true) : __assign(__assign({}, entry), { depth: depth });
25
+ ? __spreadArray([
26
+ { label: entry.label, depth: depth, isGroup: true }
27
+ ], chain(flattenEntry(depth + 1), entry.values), true) : __assign(__assign({}, entry), { depth: depth });
26
28
  });
27
29
  export var flattenGroupedEntries = chain(flattenEntry(0));
28
- export var findEntryByValue = curry(function (entries, _value) {
29
- return entries.find(function (_a) {
30
- var isGroup = _a.isGroup, value = _a.value;
31
- return !isGroup && value === _value;
32
- });
33
- });
30
+ export var findEntryByValue = curry(function (entries, _value) { return entries.find(function (_a) {
31
+ var isGroup = _a.isGroup, value = _a.value;
32
+ return !isGroup && value === _value;
33
+ }); });
@@ -1 +1 @@
1
- export const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"icon" | "root" | "checkIcon" | "emptyLabel">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"icon" | "root" | "checkIcon" | "emptyLabel">;
@@ -1,125 +1,5 @@
1
- declare const _default: React.MemoExoticComponent<{
2
- ({ attributeValue, attributeType, ...otherProps }: {
3
- [x: string]: any;
4
- attributeValue: any;
5
- attributeType: any;
6
- }): JSX.Element;
7
- propTypes: {
8
- attributeType: import("prop-types").Requireable<import("prop-types").InferProps<{
9
- label: import("prop-types").Requireable<string>;
10
- name: import("prop-types").Requireable<string>;
11
- description: import("prop-types").Requireable<string>;
12
- type: import("prop-types").Requireable<string>;
13
- hidden: import("prop-types").Requireable<boolean>;
14
- faceted: import("prop-types").Requireable<boolean>;
15
- searchable: import("prop-types").Requireable<boolean>;
16
- uri: import("prop-types").Requireable<string>;
17
- access: import("prop-types").Requireable<string[]>;
18
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
19
- minValue: import("prop-types").Requireable<number>;
20
- maxValue: import("prop-types").Requireable<number>;
21
- }>>;
22
- }>>;
23
- showEmptyEditors: import("prop-types").Requireable<boolean>;
24
- lazy: import("prop-types").Requireable<boolean>;
25
- mode: import("prop-types").Requireable<import("@reltio/mdm-sdk").Mode>;
26
- metadata: import("prop-types").Requireable<import("prop-types").InferProps<{
27
- uri: import("prop-types").Requireable<string>;
28
- description: import("prop-types").Requireable<string>;
29
- label: import("prop-types").Requireable<string>;
30
- schemaVersion: import("prop-types").Requireable<string>;
31
- entityTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
32
- typeColor: import("prop-types").Requireable<string>;
33
- typeIcon: import("prop-types").Requireable<string>;
34
- typeImage: import("prop-types").Requireable<string>;
35
- label: import("prop-types").Requireable<string>;
36
- uri: import("prop-types").Requireable<string>;
37
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
38
- label: import("prop-types").Requireable<string>;
39
- name: import("prop-types").Requireable<string>;
40
- description: import("prop-types").Requireable<string>;
41
- type: import("prop-types").Requireable<string>;
42
- hidden: import("prop-types").Requireable<boolean>;
43
- faceted: import("prop-types").Requireable<boolean>;
44
- searchable: import("prop-types").Requireable<boolean>;
45
- uri: import("prop-types").Requireable<string>;
46
- access: import("prop-types").Requireable<string[]>;
47
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
48
- minValue: import("prop-types").Requireable<number>;
49
- maxValue: import("prop-types").Requireable<number>;
50
- }>>;
51
- }>[]>;
52
- }>[]>;
53
- roles: import("prop-types").Requireable<object[]>;
54
- groupTypes: import("prop-types").Requireable<object[]>;
55
- relationTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
56
- label: import("prop-types").Requireable<string>;
57
- uri: import("prop-types").Requireable<string>;
58
- typeColor: import("prop-types").Requireable<string>;
59
- direction: import("prop-types").Requireable<string>;
60
- startObject: import("prop-types").Requireable<object>;
61
- endObject: import("prop-types").Requireable<object>;
62
- }>[]>;
63
- graphTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
64
- uri: import("prop-types").Requireable<string>;
65
- label: import("prop-types").Requireable<string>;
66
- extendsTypeUri: import("prop-types").Requireable<string>;
67
- relationshipTypeURIs: import("prop-types").Requireable<string[]>;
68
- }>[]>;
69
- interactionTypes: import("prop-types").Requireable<import("prop-types").InferProps<{
70
- uri: import("prop-types").Requireable<string>;
71
- label: import("prop-types").Requireable<string>;
72
- memberTypes: import("prop-types").Requireable<any[]>;
73
- extendsTypeUri: import("prop-types").Requireable<string>;
74
- attributes: import("prop-types").Requireable<import("prop-types").InferProps<{
75
- label: import("prop-types").Requireable<string>;
76
- name: import("prop-types").Requireable<string>;
77
- description: import("prop-types").Requireable<string>;
78
- type: import("prop-types").Requireable<string>;
79
- hidden: import("prop-types").Requireable<boolean>;
80
- faceted: import("prop-types").Requireable<boolean>;
81
- searchable: import("prop-types").Requireable<boolean>;
82
- uri: import("prop-types").Requireable<string>;
83
- access: import("prop-types").Requireable<string[]>;
84
- cardinality: import("prop-types").Requireable<import("prop-types").InferProps<{
85
- minValue: import("prop-types").Requireable<number>;
86
- maxValue: import("prop-types").Requireable<number>;
87
- }>>;
88
- }>[]>;
89
- }>[]>;
90
- sources: import("prop-types").Requireable<object[]>;
91
- }>>;
92
- ownError: import("prop-types").Requireable<import("prop-types").InferProps<{
93
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
94
- attributeTypeUri: import("prop-types").Validator<string>;
95
- parentUri: import("prop-types").Validator<string>;
96
- uri: import("prop-types").Requireable<string>;
97
- message: import("prop-types").Requireable<string>;
98
- }>>;
99
- errors: import("prop-types").Requireable<import("prop-types").InferProps<{
100
- type: import("prop-types").Validator<NonNullable<import("@reltio/mdm-sdk").ErrorType>>;
101
- attributeTypeUri: import("prop-types").Validator<string>;
102
- parentUri: import("prop-types").Validator<string>;
103
- uri: import("prop-types").Requireable<string>;
104
- message: import("prop-types").Requireable<string>;
105
- }>[]>;
106
- crosswalks: import("prop-types").Requireable<any[]>;
107
- onAddAttributes: import("prop-types").Requireable<(...args: any[]) => any>;
108
- onAddOneMore: import("prop-types").Requireable<(...args: any[]) => any>;
109
- onDeleteAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
110
- onChangeAttribute: import("prop-types").Requireable<(...args: any[]) => any>;
111
- additionalControlsRenderer: import("prop-types").Requireable<(...args: any[]) => any>;
112
- hideDeleteButton: import("prop-types").Requireable<boolean>;
113
- showNonOv: import("prop-types").Requireable<boolean>;
114
- state: import("prop-types").Requireable<string>;
115
- expanded: import("prop-types").Requireable<boolean>;
116
- attributeValue: import("prop-types").Requireable<import("prop-types").InferProps<{
117
- value: import("prop-types").Requireable<object>;
118
- ov: import("prop-types").Requireable<boolean>;
119
- type: import("prop-types").Requireable<string>;
120
- uri: import("prop-types").Requireable<string>;
121
- }>>;
122
- };
123
- }>;
124
- export default _default;
125
1
  import React from 'react';
2
+ import { NestedAttributeValue } from '@reltio/mdm-sdk';
3
+ import { ReadOnlyComplexAttributeProps } from '../ReadOnlyComplexAttribute';
4
+ declare const _default: React.MemoExoticComponent<({ attributeValue, attributeType, ...otherProps }: ReadOnlyComplexAttributeProps<NestedAttributeValue>) => JSX.Element>;
5
+ export default _default;
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import React, { memo, useContext, useMemo } from 'react';
24
24
  import Box from '@mui/material/Box';
25
25
  import classnames from 'classnames';
26
- import { evaluateDeepEntityLabel, getAttributeTypeSubAttributes, getHistoryAppearanceByUri, getHistoryAttributeClassName, getLabel, NestedAttributeType } from '@reltio/mdm-sdk';
26
+ import { evaluateDeepEntityLabel, getAttributeTypeSubAttributes, getHistoryAppearanceByUri, getHistoryAttributeClassName, getLabel } from '@reltio/mdm-sdk';
27
27
  import { HistoryDiffContext } from '../contexts/HistoryAppearanceContext';
28
28
  import { ReadOnlyComplexAttribute } from '../ReadOnlyComplexAttribute';
29
29
  import { PivotingTooltip } from '../PivotingTooltip';
@@ -45,5 +45,4 @@ var NestedAttribute = function (_a) {
45
45
  }, [appearance, styles, attributeValue, attributeType]);
46
46
  return (React.createElement(ReadOnlyComplexAttribute, __assign({ label: attributeLabel, attributeValue: attributeValue, attributeTypesList: getAttributeTypeSubAttributes({}, attributeType), attributeType: attributeType }, otherProps)));
47
47
  };
48
- NestedAttribute.propTypes = NestedAttributeType;
49
48
  export default memo(NestedAttribute);
@@ -1,2 +1,6 @@
1
- export const NestedAttributeEditor: React.NamedExoticComponent<object>;
2
1
  import React from 'react';
2
+ import { NestedAttributeValue } from '@reltio/mdm-sdk';
3
+ import { EditModeComplexAttributeProps } from '../EditModeComplexAttribute';
4
+ type Props = EditModeComplexAttributeProps<NestedAttributeValue>;
5
+ export declare const NestedAttributeEditor: React.MemoExoticComponent<(props: Props) => JSX.Element>;
6
+ export {};
@@ -10,12 +10,11 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React, { memo } from 'react';
13
- import { evaluateDeepEntityLabel, getLabel, NestedAttributeType } from '@reltio/mdm-sdk';
13
+ import { evaluateDeepEntityLabel, getLabel } from '@reltio/mdm-sdk';
14
14
  import { EditModeComplexAttribute } from '../EditModeComplexAttribute';
15
15
  export var NestedAttributeEditor = memo(function (props) {
16
16
  var attributeValue = props.attributeValue, attributeType = props.attributeType;
17
17
  var label = evaluateDeepEntityLabel(attributeValue, attributeType.dataLabelPattern);
18
18
  return (React.createElement(EditModeComplexAttribute, __assign({ label: getLabel(label), attributeTypesList: attributeType.attributes || attributeType.analyticsAttributes }, props)));
19
19
  });
20
- NestedAttributeEditor.propTypes = NestedAttributeType;
21
20
  NestedAttributeEditor.displayName = 'NestedAttributeEditor';
@@ -1,45 +1,15 @@
1
- export function ReadOnlyComplexAttribute({ attributeTypesList, attributeValue, label, expanded: expandedProp, children, showNonOv, attributeType, LabelRenderer, RightSlot }: {
2
- attributeTypesList: any;
3
- attributeValue: any;
4
- label: any;
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { AttributeType, ComplexAttributeValue } from '@reltio/mdm-sdk';
3
+ import { AdditionalControlsRenderer } from '../types';
4
+ export type ReadOnlyComplexAttributeProps<T> = {
5
+ attributeTypesList?: AttributeType[];
6
+ attributeValue: T;
7
+ label?: string | ReactNode;
5
8
  expanded?: boolean;
6
- children: any;
7
- showNonOv: any;
8
- attributeType: any;
9
- LabelRenderer: any;
10
- RightSlot: any;
11
- }): JSX.Element;
12
- export namespace ReadOnlyComplexAttribute {
13
- namespace propTypes {
14
- export let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
- export let label: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
16
- export let attributeTypesList: PropTypes.Requireable<PropTypes.InferProps<{
17
- label: PropTypes.Requireable<string>;
18
- name: PropTypes.Requireable<string>;
19
- description: PropTypes.Requireable<string>;
20
- type: PropTypes.Requireable<string>;
21
- hidden: PropTypes.Requireable<boolean>;
22
- faceted: PropTypes.Requireable<boolean>;
23
- searchable: PropTypes.Requireable<boolean>;
24
- uri: PropTypes.Requireable<string>;
25
- access: PropTypes.Requireable<string[]>;
26
- cardinality: PropTypes.Requireable<PropTypes.InferProps<{
27
- minValue: PropTypes.Requireable<number>;
28
- maxValue: PropTypes.Requireable<number>;
29
- }>>;
30
- }>[]>;
31
- export let attributeValue: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
32
- value: PropTypes.Requireable<object>;
33
- ov: PropTypes.Requireable<boolean>;
34
- type: PropTypes.Requireable<string>;
35
- uri: PropTypes.Requireable<string>;
36
- }>>>;
37
- export let expanded: PropTypes.Requireable<boolean>;
38
- export let showNonOv: PropTypes.Requireable<boolean>;
39
- export { AttributeTypeType as attributeType };
40
- export let LabelRenderer: PropTypes.Requireable<PropTypes.ReactComponentLike>;
41
- export let RightSlot: PropTypes.Requireable<PropTypes.ReactComponentLike>;
42
- }
43
- }
44
- import PropTypes from 'prop-types';
45
- import { AttributeTypeType } from '@reltio/mdm-sdk';
9
+ children?: ReactNode;
10
+ showNonOv?: boolean;
11
+ attributeType?: AttributeType;
12
+ LabelRenderer?: (props: AdditionalControlsRenderer<ComplexAttributeValue>) => ReactElement;
13
+ RightSlot?: (props: AdditionalControlsRenderer<ComplexAttributeValue>) => ReactElement;
14
+ };
15
+ export declare const ReadOnlyComplexAttribute: <T extends ComplexAttributeValue>({ attributeTypesList, attributeValue, label, expanded: expandedProp, children, showNonOv, attributeType, LabelRenderer, RightSlot }: ReadOnlyComplexAttributeProps<T>) => JSX.Element;
@@ -10,9 +10,8 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React, { useContext, useEffect, useMemo, useState } from 'react';
13
- import PropTypes from 'prop-types';
14
13
  import classnames from 'classnames';
15
- import { AttributeTypeType, isAnalyticAttribute, NestedAttributeValueType, ReferenceAttributeValueType, CollaborationObjectTypes, createRelatedObjectUris, isOv, isSpecialAttribute, isRelationUri } from '@reltio/mdm-sdk';
14
+ import { isAnalyticAttribute, CollaborationObjectTypes, createRelatedObjectUris, isOv, isSpecialAttribute, isRelationUri } from '@reltio/mdm-sdk';
16
15
  import Typography from '@mui/material/Typography';
17
16
  import { ReadOnlyAttributesList } from '../ReadOnlyAttributesList';
18
17
  import { ArrowExpandButton } from '../ArrowExpandButton';
@@ -50,14 +49,3 @@ export var ReadOnlyComplexAttribute = function (_a) {
50
49
  }), objectType: objectType })))),
51
50
  expanded && (React.createElement(ReadOnlyAttributesList, { attrTypes: attributeTypesList, entity: attributeListEntity, drawLines: true, parentUri: uri, showNonOv: showNonOv }, children))));
52
51
  };
53
- ReadOnlyComplexAttribute.propTypes = {
54
- children: PropTypes.node,
55
- label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
56
- attributeTypesList: PropTypes.arrayOf(AttributeTypeType),
57
- attributeValue: PropTypes.oneOfType([NestedAttributeValueType, ReferenceAttributeValueType]),
58
- expanded: PropTypes.bool,
59
- showNonOv: PropTypes.bool,
60
- attributeType: AttributeTypeType,
61
- LabelRenderer: PropTypes.elementType,
62
- RightSlot: PropTypes.elementType
63
- };
@@ -1 +1,2 @@
1
1
  export { ReadOnlyComplexAttribute } from './ReadOnlyComplexAttribute';
2
+ export type { ReadOnlyComplexAttributeProps } from './ReadOnlyComplexAttribute';
@@ -1,25 +1,4 @@
1
1
  import React from 'react';
2
- import { AttributeError, AttributeItem, AttributeType, Crosswalk, Mode, ReferenceAttributeValue } from '@reltio/mdm-sdk';
3
- import { ScrollToElementContext } from '../contexts/ScrollToElementContext';
4
- export type Props = {
5
- attributeValue: ReferenceAttributeValue;
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
- };
25
- export declare const ReferenceAttribute: React.MemoExoticComponent<({ attributeValue, attributeType, ...otherProps }: Props) => JSX.Element>;
2
+ import { ReferenceAttributeValue } from '@reltio/mdm-sdk';
3
+ import { ReadOnlyComplexAttributeProps } from '../ReadOnlyComplexAttribute';
4
+ export declare const ReferenceAttribute: React.MemoExoticComponent<({ attributeValue, attributeType, ...otherProps }: ReadOnlyComplexAttributeProps<ReferenceAttributeValue>) => JSX.Element>;
@@ -159,7 +159,7 @@ describe('read mode ReferenceAttribute', function () {
159
159
  collaborationPath: collaborationPath
160
160
  };
161
161
  var setUp = function (_a) {
162
- var attributeValue = _a.attributeValue, attributeType = _a.attributeType, state = _a.state, _b = _a.searchValue, searchValue = _b === void 0 ? '' : _b, _c = _a.historyDiff, historyDiff = _c === void 0 ? defaultHistoryDiff : _c;
162
+ var attributeValue = _a.attributeValue, attributeType = _a.attributeType, _b = _a.searchValue, searchValue = _b === void 0 ? '' : _b, _c = _a.historyDiff, historyDiff = _c === void 0 ? defaultHistoryDiff : _c;
163
163
  var user = userEvent.setup();
164
164
  var Providers = function (_a) {
165
165
  var children = _a.children;
@@ -168,7 +168,7 @@ describe('read mode ReferenceAttribute', function () {
168
168
  React.createElement(HistoryDiffContext.Provider, { value: historyDiff },
169
169
  React.createElement(SearchValueContext.Provider, { value: searchValue }, children)))));
170
170
  };
171
- var renderer = render(React.createElement(ReferenceAttribute, { attributeValue: attributeValue, attributeType: attributeType, showEmptyEditors: false, onAddAttributes: jest.fn, onAddOneMore: jest.fn, onDeleteAttribute: jest.fn, onChangeAttribute: jest.fn, state: state }), {
171
+ var renderer = render(React.createElement(ReferenceAttribute, { attributeValue: attributeValue, attributeType: attributeType }), {
172
172
  wrapper: Providers
173
173
  });
174
174
  return __assign(__assign({}, renderer), { user: user });
@@ -1,3 +1,6 @@
1
- declare const _default: React.ComponentType<any>;
2
- export default _default;
3
1
  import React from 'react';
2
+ import { ReferenceAttributeValue } from '@reltio/mdm-sdk';
3
+ import { EditModeComplexAttributeProps } from '../EditModeComplexAttribute';
4
+ type Props = EditModeComplexAttributeProps<ReferenceAttributeValue>;
5
+ declare const _default: React.ComponentType<Props>;
6
+ export default _default;
@@ -21,10 +21,9 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React, { useMemo, useCallback, useRef } from 'react';
24
- import PropTypes from 'prop-types';
25
24
  import classnames from 'classnames';
26
25
  import { identity, pipe, isEmpty } from 'ramda';
27
- import { evaluateDeepEntityLabel, ReferenceAttributeType, referencedEntityAttributeTypesSelectionStrategy, getEntityType, getReferencedEntityFromAttrValue, getReferencedRelationFromAttrValue, getReferencedEntityUri, getReferencedEntityTypeUri, getReferencedEntityTypeUriFromAttrType, getReferencedRelationAttrTypesUris, findAttributeTypeByUri, getCreatableAttributeTypes, createTemporaryEntity, convertReferencedEntityForAttrValue, createReferencedRelationForAttrValue, addReferencedRelationCrosswalks, getReferencedEntityUriFromAttrValue, checkCanEditAttribute, checkMetadataForCreate, isReltioCrosswalk, getErrorMessage, getErrorId, getReferencedEntityActiveError, isTempUri, getLabel, isAttributeTypeError } from '@reltio/mdm-sdk';
26
+ import { evaluateDeepEntityLabel, referencedEntityAttributeTypesSelectionStrategy, getEntityType, getReferencedEntityFromAttrValue, getReferencedRelationFromAttrValue, getReferencedEntityUri, getReferencedEntityTypeUri, getReferencedEntityTypeUriFromAttrType, getReferencedRelationAttrTypesUris, findAttributeTypeByUri, getCreatableAttributeTypes, createTemporaryEntity, convertReferencedEntityForAttrValue, createReferencedRelationForAttrValue, addReferencedRelationCrosswalks, getReferencedEntityUriFromAttrValue, checkCanEditAttribute, checkMetadataForCreate, isReltioCrosswalk, getErrorMessage, getErrorId, getReferencedEntityActiveError, isTempUri, getLabel, isAttributeTypeError } from '@reltio/mdm-sdk';
28
27
  import { EditModeComplexAttribute } from '../EditModeComplexAttribute';
29
28
  import { EntitySelector } from '../EntitySelector';
30
29
  import { ErrorWrapper } from '../ErrorWrapper';
@@ -125,10 +124,10 @@ var ReferenceAttributeEditor = function (props) {
125
124
  _a[styles.dense] = errorMessage || (selectedEntity && isTempUri(selectedEntity.entityUri)),
126
125
  _a)), entity: selectedEntity || {}, entityTypesUris: entityTypesUris, max: 20, globalSearchRequestOptions: globalSearchRequestOptions, mode: mode, isDisabled: !canChangeReferencedEntity, onChange: onChangeEntity, onCreate: canCreateReferencedEntity ? onCreateEntity : undefined, metadata: metadata, attributeTypesSelectionStrategy: newEntityAttrTypesSelectionStrategy })))));
127
126
  };
128
- ReferenceAttributeEditor.propTypes = __assign(__assign({}, ReferenceAttributeType), { highlightedError: PropTypes.object });
129
127
  export default withContext(ScrollToElementContext, function (contextValue, _a) {
130
128
  var attributeValue = _a.attributeValue, attributeType = _a.attributeType;
131
129
  var _b = contextValue || {}, element = _b.element, type = _b.type;
132
- var isHighlighted = isHighlightedErrorType(type) && isAttributeTypeError(element, attributeValue.uri, attributeType.uri);
130
+ var isHighlighted = isHighlightedErrorType(type) &&
131
+ isAttributeTypeError(element, attributeValue.uri, attributeType.uri);
133
132
  return { highlightedError: isHighlighted ? contextValue : null };
134
133
  }, ReferenceAttributeEditor);
@@ -1,27 +1,10 @@
1
- export function RelationTypeSelector({ value, options, onChange, TextFieldProps, ...otherProps }: {
2
- [x: string]: any;
3
- value?: {};
4
- options?: any[];
5
- onChange?: any;
6
- TextFieldProps: any;
7
- }): JSX.Element;
8
- export namespace RelationTypeSelector {
9
- namespace propTypes {
10
- export { ValueType as value };
11
- export let options: PropTypes.Requireable<PropTypes.InferProps<{
12
- label: PropTypes.Validator<string>;
13
- value: PropTypes.Validator<string>;
14
- startObject: PropTypes.Requireable<object>;
15
- endObject: PropTypes.Requireable<object>;
16
- }>[]>;
17
- export let onChange: PropTypes.Requireable<(...args: any[]) => any>;
18
- }
19
- }
20
- declare const ValueType: PropTypes.Requireable<PropTypes.InferProps<{
21
- label: PropTypes.Validator<string>;
22
- value: PropTypes.Validator<string>;
23
- startObject: PropTypes.Requireable<object>;
24
- endObject: PropTypes.Requireable<object>;
25
- }>>;
26
- import PropTypes from 'prop-types';
1
+ import { TextFieldProps } from '@mui/material/TextField';
2
+ import { RelationOption as RelationOptionType } from '../types';
3
+ type Props = {
4
+ value?: RelationOptionType;
5
+ options?: RelationOptionType[];
6
+ onChange?: (value: RelationOptionType) => void;
7
+ TextFieldProps?: TextFieldProps;
8
+ };
9
+ export declare const RelationTypeSelector: ({ value, options, onChange, TextFieldProps, ...otherProps }: Props) => JSX.Element;
27
10
  export {};
@@ -21,11 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React, { useMemo } from 'react';
24
- import PropTypes from 'prop-types';
24
+ import { defaultTo, identity } from 'ramda';
25
25
  import i18n from 'ui-i18n';
26
- import { identity, defaultTo } from 'ramda';
27
- import { RelationOption } from './components/RelationOption';
28
26
  import { DropDownSelector } from '../DropDownSelector';
27
+ import { RelationOption } from './components/RelationOption';
29
28
  export var RelationTypeSelector = function (_a) {
30
29
  var _b = _a.value, value = _b === void 0 ? {} : _b, _c = _a.options, options = _c === void 0 ? [] : _c, _d = _a.onChange, onChange = _d === void 0 ? identity : _d, TextFieldProps = _a.TextFieldProps, otherProps = __rest(_a, ["value", "options", "onChange", "TextFieldProps"]);
31
30
  var textFieldProps = useMemo(function () {
@@ -34,14 +33,3 @@ export var RelationTypeSelector = function (_a) {
34
33
  }, [TextFieldProps]);
35
34
  return (React.createElement(DropDownSelector, __assign({ value: value, options: options, onChange: onChange, label: i18n.text('Select relationship type '), components: { Option: RelationOption }, TextFieldProps: textFieldProps }, otherProps)));
36
35
  };
37
- var ValueType = PropTypes.shape({
38
- label: PropTypes.string.isRequired,
39
- value: PropTypes.string.isRequired,
40
- startObject: PropTypes.object,
41
- endObject: PropTypes.object
42
- });
43
- RelationTypeSelector.propTypes = {
44
- value: ValueType,
45
- options: PropTypes.arrayOf(ValueType),
46
- onChange: PropTypes.func
47
- };
@@ -1,8 +1,10 @@
1
+ import { SavedSearchData } from '@reltio/mdm-sdk';
1
2
  type Props = {
3
+ data?: SavedSearchData;
2
4
  isOpen: boolean;
3
5
  isSaving: boolean;
4
6
  onClose: () => void;
5
7
  onSave: (name: string, description: string, isPublic: boolean) => void;
6
8
  };
7
- export declare const SaveSegmentDialog: ({ isOpen, isSaving, onClose, onSave }: Props) => JSX.Element;
9
+ export declare const SaveSegmentDialog: ({ data, isOpen, isSaving, onClose, onSave }: Props) => JSX.Element;
8
10
  export {};
@@ -43,6 +43,7 @@ import DialogActions from '@mui/material/DialogActions';
43
43
  import Button from '@mui/material/Button';
44
44
  import { DropDownEditor } from '../DropDownEditor';
45
45
  import { TextEditor } from '../TextEditor';
46
+ import { useMdmUsername } from '../contexts';
46
47
  import { useStyles } from './styles';
47
48
  var SharingOption;
48
49
  (function (SharingOption) {
@@ -54,12 +55,14 @@ var SHARING_OPTIONS = [
54
55
  { label: i18n.text('All users'), value: SharingOption.Public }
55
56
  ];
56
57
  export var SaveSegmentDialog = function (_a) {
57
- var isOpen = _a.isOpen, isSaving = _a.isSaving, onClose = _a.onClose, onSave = _a.onSave;
58
+ var data = _a.data, isOpen = _a.isOpen, isSaving = _a.isSaving, onClose = _a.onClose, onSave = _a.onSave;
58
59
  var styles = useStyles();
60
+ var username = useMdmUsername();
59
61
  var _b = useState(''), name = _b[0], setName = _b[1];
60
62
  var _c = useState(''), description = _c[0], setDescription = _c[1];
61
63
  var _d = useState(SharingOption.Private), share = _d[0], setShare = _d[1];
62
64
  var isValid = name.trim() !== '';
65
+ var shouldSaveAsNew = (data === null || data === void 0 ? void 0 : data.owner) !== username;
63
66
  var handleChangeName = useCallback(function (event) {
64
67
  setName(event.target.value);
65
68
  }, []);
@@ -77,13 +80,13 @@ export var SaveSegmentDialog = function (_a) {
77
80
  }); }, [onSave, name, description, share]);
78
81
  useEffect(function () {
79
82
  if (isOpen) {
80
- setName('');
81
- setDescription('');
82
- setShare(SharingOption.Private);
83
+ setName((data === null || data === void 0 ? void 0 : data.name) || '');
84
+ setDescription((data === null || data === void 0 ? void 0 : data.description) || '');
85
+ setShare((data === null || data === void 0 ? void 0 : data.isPublic) ? SharingOption.Public : SharingOption.Private);
83
86
  }
84
- }, [isOpen]);
87
+ }, [isOpen, data]);
85
88
  return (React.createElement(Dialog, { onClose: onClose, open: isOpen, PaperProps: { classes: { root: styles.root } } },
86
- React.createElement(DialogTitle, null, i18n.text('Save segment')),
89
+ React.createElement(DialogTitle, null, shouldSaveAsNew ? i18n.text('Save as new segment') : i18n.text('Save segment')),
87
90
  React.createElement(DialogContent, { className: styles.dialogContent },
88
91
  React.createElement(TextEditor, { label: i18n.text('Name'), required: true, variant: "filled", onInput: handleChangeName, value: name, size: "small", autoFocus: true }),
89
92
  React.createElement(TextEditor, { label: i18n.text('Description (optional)'), multiline: true, variant: "filled", value: description, onInput: handleChangeDescription, size: "small", rows: 5 }),
@@ -1,19 +1,42 @@
1
+ import React from 'react';
2
+ import { SimpleAttributeValue, AttributeType, Mode, AttributeError, PrimitiveValue } from '@reltio/mdm-sdk';
3
+ import { AdditionalControlsRenderer } from '../types';
1
4
  declare const _default: React.ForwardRefExoticComponent<Pick<{
2
- [x: string]: any;
3
- className: any;
4
- attributeValue: any;
5
- attributeType: any;
6
- isReltioCrosswalk: any;
7
- ownError: any;
8
- mode: any;
9
- onAddOneMore: any;
10
- onDeleteAttribute: any;
11
- onChangeAttribute: any;
12
- onDeactivateError: any;
13
- additionalControlsRenderer: any;
14
- state: any;
15
- highlightedError: any;
5
+ className?: string;
6
+ attributeValue: SimpleAttributeValue;
7
+ attributeType: AttributeType;
8
+ isReltioCrosswalk?: boolean;
9
+ state: "edited" | "deleted";
10
+ mode: Mode;
11
+ onAddOneMore?: () => void;
12
+ onDeleteAttribute?: (attribute: {
13
+ uri: string;
14
+ attributeType: AttributeType;
15
+ }) => void;
16
+ onChangeAttribute: (attribute: {
17
+ attributeType: AttributeType;
18
+ uri: string;
19
+ value: PrimitiveValue;
20
+ silent?: boolean;
21
+ }) => void;
22
+ onDeactivateError: (errorId: string) => void;
23
+ additionalControlsRenderer?: (props: AdditionalControlsRenderer<SimpleAttributeValue>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
24
+ ownError?: AttributeError;
25
+ highlightedError?: {
26
+ element: string | AttributeType | AttributeError;
27
+ type: import("../contexts/ScrollToElementContext").ScrollType;
28
+ highlightError?: (element: AttributeError) => void;
29
+ highlightAttribute?: (element: AttributeType) => void;
30
+ highlightView?: (element: string) => void;
31
+ scrollIntoRef: (ref: React.Ref<HTMLDivElement>) => void;
32
+ };
16
33
  isEmptyEditor?: boolean;
17
- }, string | number> & React.RefAttributes<unknown>>;
34
+ } & Partial<{
35
+ [x: string]: any;
36
+ fieldName: any;
37
+ value: any;
38
+ onChange: any;
39
+ dataTypeDefinition: any;
40
+ TextFieldProps?: {};
41
+ }>, string | number> & React.RefAttributes<unknown>>;
18
42
  export default _default;
19
- import React from 'react';