@reltio/components 1.4.1853 → 1.4.1854

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 (163) 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/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +39 -16
  49. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.js +0 -17
  50. package/cjs/SimpleAttributeEditor/useAttributeValuePermissions.d.ts +1 -1
  51. package/cjs/components/ImageDetailsView/helpers/index.d.ts +5 -2
  52. package/cjs/components/ImportButton/ImportButton.d.ts +2 -1
  53. package/cjs/components/MultipliableSelect/MultipliableSelect.d.ts +20 -30
  54. package/cjs/components/MultipliableSelect/MultipliableSelect.js +0 -15
  55. package/cjs/components/ProfileBand/styles.d.ts +1 -1
  56. package/cjs/components/QueryBuilderRow/QueryBuilderRow.d.ts +43 -107
  57. package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +0 -25
  58. package/cjs/components/QueryBuilderRow/components/ReadOnlyFilter.d.ts +4 -3
  59. package/cjs/components/QueryBuilderRow/components/ReadOnlyLogicOperator.d.ts +4 -10
  60. package/cjs/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +1 -6
  61. package/cjs/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.d.ts +33 -64
  62. package/cjs/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +3 -51
  63. package/cjs/components/ReactSelect/AsyncSelect.d.ts +0 -45
  64. package/cjs/components/ReactSelect/CreatableSelect.d.ts +0 -45
  65. package/cjs/components/ReactSelect/Select.d.ts +0 -45
  66. package/cjs/components/ReactSelect/withMuiSkin.d.ts +3 -48
  67. package/cjs/components/ReactSelect/withMuiSkin.js +0 -50
  68. package/cjs/components/ReactSortableTree/node-renderer-default.d.ts +2 -2
  69. package/cjs/components/ReadableSearchQuery/ReadableSearchQuery.d.ts +2 -4
  70. package/cjs/components/SearchInput/SearchInput.d.ts +1 -1
  71. package/cjs/components/SelectionPopup/SelectionPopup.d.ts +1 -1
  72. package/cjs/constants/index.d.ts +1 -1
  73. package/cjs/constants/index.js +1 -4
  74. package/cjs/constants/prop-types.d.ts +0 -81
  75. package/cjs/constants/prop-types.js +17 -46
  76. package/cjs/constants/textField.d.ts +2 -2
  77. package/cjs/contexts/ScrollToElementContext/index.d.ts +1 -1
  78. package/cjs/helpers/basicTable.d.ts +2 -7
  79. package/cjs/hooks/useRelationTypeSelector.d.ts +12 -8
  80. package/cjs/hooks/useRelationTypeSelector.js +3 -1
  81. package/cjs/types/index.d.ts +19 -2
  82. package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.js +1 -1
  83. package/esm/ConnectionEditor/ConnectionEditor.d.ts +3 -3
  84. package/esm/ConnectionEditor/ConnectionEditor.test.js +2 -2
  85. package/esm/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.d.ts +14 -34
  86. package/esm/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +1 -17
  87. package/esm/DependentLookupEditor/DependentLookupEditor.d.ts +27 -44
  88. package/esm/DependentLookupEditor/DependentLookupEditor.js +4 -22
  89. package/esm/DropDownEditor/DropDownEditor.d.ts +14 -15
  90. package/esm/DropDownEditor/DropDownEditor.js +0 -6
  91. package/esm/EditModeAttributesList/EditModeAttributesList.d.ts +14 -3
  92. package/esm/EditModeAttributesList/EditModeAttributesList.js +1 -21
  93. package/esm/EditModeAttributesPager/EditModeAttributesPager.d.ts +3 -2
  94. package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.d.ts +2 -3
  95. package/esm/EditModeAttributesPager/types.d.ts +7 -6
  96. package/esm/EditModeComplexAttribute/EditModeComplexAttribute.d.ts +41 -4
  97. package/esm/EditModeComplexAttribute/EditModeComplexAttribute.js +7 -18
  98. package/esm/EditModeComplexAttribute/index.d.ts +1 -0
  99. package/esm/EntitySelector/EntitySelector.d.ts +19 -31
  100. package/esm/EntitySelector/EntitySelector.js +1 -15
  101. package/esm/EntitySelector/components/EntityOption/EntityOption.d.ts +17 -22
  102. package/esm/EntitySelector/components/EntityOption/EntityOption.js +0 -18
  103. package/esm/ErrorWrapper/ErrorWrapper.d.ts +2 -2
  104. package/esm/FilterEditor/FilterEditor.d.ts +16 -23
  105. package/esm/FilterEditor/FilterEditor.js +3 -15
  106. package/esm/FilterValueEditor/FilterValueEditor.d.ts +14 -24
  107. package/esm/FilterValueEditor/FilterValueEditor.js +1 -10
  108. package/esm/HOCs/withFilter/ColumnFilter.js +1 -1
  109. package/esm/LookupEditor/LookupEditor.d.ts +11 -33
  110. package/esm/LookupEditor/LookupEditor.js +1 -11
  111. package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.d.ts +11 -21
  112. package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.js +0 -7
  113. package/esm/LookupEditor/components/GroupedDropDownEditor/helpers.d.ts +9 -2
  114. package/esm/LookupEditor/components/GroupedDropDownEditor/helpers.js +7 -7
  115. package/esm/LookupEditor/components/GroupedDropDownEditor/styles.d.ts +1 -1
  116. package/esm/NestedAttribute/NestedAttribute.d.ts +4 -124
  117. package/esm/NestedAttribute/NestedAttribute.js +1 -2
  118. package/esm/NestedAttributeEditor/NestedAttributeEditor.d.ts +5 -1
  119. package/esm/NestedAttributeEditor/NestedAttributeEditor.js +1 -2
  120. package/esm/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.d.ts +14 -44
  121. package/esm/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +1 -13
  122. package/esm/ReadOnlyComplexAttribute/index.d.ts +1 -0
  123. package/esm/ReferenceAttribute/ReferenceAttribute.d.ts +3 -24
  124. package/esm/ReferenceAttribute/ReferenceAttribute.test.js +2 -2
  125. package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.d.ts +5 -2
  126. package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.js +3 -4
  127. package/esm/RelationTypeSelector/RelationTypeSelector.d.ts +9 -26
  128. package/esm/RelationTypeSelector/RelationTypeSelector.js +2 -14
  129. package/esm/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +39 -16
  130. package/esm/SimpleAttributeEditor/SimpleAttributeEditor.js +1 -18
  131. package/esm/SimpleAttributeEditor/useAttributeValuePermissions.d.ts +1 -1
  132. package/esm/components/ImageDetailsView/helpers/index.d.ts +5 -2
  133. package/esm/components/ImportButton/ImportButton.d.ts +2 -1
  134. package/esm/components/MultipliableSelect/MultipliableSelect.d.ts +20 -30
  135. package/esm/components/MultipliableSelect/MultipliableSelect.js +0 -15
  136. package/esm/components/ProfileBand/styles.d.ts +1 -1
  137. package/esm/components/QueryBuilderRow/QueryBuilderRow.d.ts +43 -107
  138. package/esm/components/QueryBuilderRow/QueryBuilderRow.js +0 -25
  139. package/esm/components/QueryBuilderRow/components/ReadOnlyFilter.d.ts +4 -3
  140. package/esm/components/QueryBuilderRow/components/ReadOnlyLogicOperator.d.ts +4 -10
  141. package/esm/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +1 -6
  142. package/esm/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.d.ts +33 -64
  143. package/esm/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +3 -28
  144. package/esm/components/ReactSelect/AsyncSelect.d.ts +0 -45
  145. package/esm/components/ReactSelect/CreatableSelect.d.ts +0 -45
  146. package/esm/components/ReactSelect/Select.d.ts +0 -45
  147. package/esm/components/ReactSelect/withMuiSkin.d.ts +3 -48
  148. package/esm/components/ReactSelect/withMuiSkin.js +0 -50
  149. package/esm/components/ReactSortableTree/node-renderer-default.d.ts +2 -2
  150. package/esm/components/ReadableSearchQuery/ReadableSearchQuery.d.ts +2 -4
  151. package/esm/components/SearchInput/SearchInput.d.ts +1 -1
  152. package/esm/components/SelectionPopup/SelectionPopup.d.ts +1 -1
  153. package/esm/constants/index.d.ts +1 -1
  154. package/esm/constants/index.js +1 -1
  155. package/esm/constants/prop-types.d.ts +0 -81
  156. package/esm/constants/prop-types.js +17 -38
  157. package/esm/constants/textField.d.ts +2 -2
  158. package/esm/contexts/ScrollToElementContext/index.d.ts +1 -1
  159. package/esm/helpers/basicTable.d.ts +2 -7
  160. package/esm/hooks/useRelationTypeSelector.d.ts +12 -8
  161. package/esm/hooks/useRelationTypeSelector.js +3 -1
  162. package/esm/types/index.d.ts +19 -2
  163. package/package.json +2 -2
@@ -21,7 +21,6 @@ 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 skinComponents from './commonComponents';
26
25
  import useStyles from './styles';
27
26
  import { mergeClasses } from '../../core/utils';
@@ -38,54 +37,5 @@ export default function withMuiSkin(SelectComponent) {
38
37
  components: {},
39
38
  classes: {}
40
39
  };
41
- WrappedSelectComponent.propTypes = {
42
- /* You could redefine any of these components */
43
- components: PropTypes.shape({
44
- ClearIndicator: PropTypes.func,
45
- Control: PropTypes.func,
46
- DropdownIndicator: PropTypes.func,
47
- DownChevron: PropTypes.func,
48
- CrossIcon: PropTypes.func,
49
- Group: PropTypes.func,
50
- GroupHeading: PropTypes.func,
51
- IndicatorsContainer: PropTypes.func,
52
- IndicatorSeparator: PropTypes.func,
53
- Input: PropTypes.func,
54
- LoadingIndicator: PropTypes.func,
55
- Menu: PropTypes.func,
56
- MenuList: PropTypes.func,
57
- MenuPortal: PropTypes.func,
58
- LoadingMessage: PropTypes.func,
59
- NoOptionsMessage: PropTypes.func,
60
- MultiValue: PropTypes.func,
61
- MultiValueContainer: PropTypes.func,
62
- MultiValueLabel: PropTypes.func,
63
- MultiValueRemove: PropTypes.func,
64
- Option: PropTypes.func,
65
- Placeholder: PropTypes.func,
66
- SelectContainer: PropTypes.func,
67
- SingleValue: PropTypes.func,
68
- ValueContainer: PropTypes.func
69
- }),
70
- /* Classes are passed to mui skin components. Provided classes will be merged with existing ones. */
71
- classes: PropTypes.shape({
72
- control: PropTypes.string,
73
- valueContainer: PropTypes.string,
74
- multiValue: PropTypes.string,
75
- noOptionsMessage: PropTypes.string,
76
- singleValue: PropTypes.string,
77
- placeholder: PropTypes.string,
78
- menu: PropTypes.string,
79
- clearIndicator: PropTypes.string,
80
- dropdownIndicator: PropTypes.string,
81
- option: PropTypes.string,
82
- 'option--selected': PropTypes.string
83
- }),
84
- /* Props from https://material-ui.com/api/text-field/ */
85
- TextFieldProps: PropTypes.object,
86
- error: PropTypes.bool,
87
- /* Plus all necessary props for wrapped react-select component. See docs on https://react-select.com */
88
- innerRef: PropTypes.object
89
- };
90
40
  return WrappedSelectComponent;
91
41
  }
@@ -43,9 +43,9 @@ declare namespace NodeRendererDefault {
43
43
  }
44
44
  namespace propTypes {
45
45
  export let node: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
46
- let title_1: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
46
+ let title_1: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>>;
47
47
  export { title_1 as title };
48
- let subtitle_1: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
48
+ let subtitle_1: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>>;
49
49
  export { subtitle_1 as subtitle };
50
50
  export let path: PropTypes.Validator<NonNullable<string | number>[]>;
51
51
  export let treeIndex: PropTypes.Validator<number>;
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ReadableQueryPrimitive } from '@reltio/mdm-sdk';
3
- type Props = {
3
+ declare const ReadableSearchQuery: React.ForwardRefExoticComponent<{
4
4
  readableQuery?: ReadableQueryPrimitive[];
5
- className?: string;
6
- };
7
- declare const ReadableSearchQuery: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
5
+ } & React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLElement>>;
8
6
  export default ReadableSearchQuery;
@@ -3,7 +3,7 @@ import { InputProps } from '@mui/material/Input';
3
3
  export type SearchInputProps = InputProps & {
4
4
  value?: string;
5
5
  autofocus?: boolean;
6
- onSearch: (value?: string) => void;
6
+ onSearch?: (value?: string) => void;
7
7
  rootRef?: React.MutableRefObject<HTMLInputElement>;
8
8
  height: number;
9
9
  placeholder?: string;
@@ -7,7 +7,7 @@ type Props = {
7
7
  children: React.ReactNode;
8
8
  PaperProps?: Record<string, unknown>;
9
9
  searchInputOnKeyDown: (event: React.KeyboardEvent) => void;
10
- onSearch: (value?: string) => void;
10
+ onSearch?: (value?: string) => void;
11
11
  className?: string;
12
12
  hideTitle?: boolean;
13
13
  hideSearchInput?: boolean;
@@ -1,4 +1,4 @@
1
- export { SortingType, ColumnFilterType, ColumnsDataType, QueryBuilderAttributeType, QueryBuilderAttributeDataType } from './prop-types';
1
+ export { SortingType, QueryBuilderAttributeType } from './prop-types';
2
2
  export { COMMENTS_CONTAINER_VISIBILITY_AREA } from './classnames';
3
3
  export { ALWAYS_VISIBLE_TYPE_URIS } from './attributes';
4
4
  export { MAP_DRAWING_MODES, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
@@ -1,4 +1,4 @@
1
- export { SortingType, ColumnFilterType, ColumnsDataType, QueryBuilderAttributeType, QueryBuilderAttributeDataType } from './prop-types';
1
+ export { SortingType, QueryBuilderAttributeType } from './prop-types';
2
2
  export { COMMENTS_CONTAINER_VISIBILITY_AREA } from './classnames';
3
3
  export { ALWAYS_VISIBLE_TYPE_URIS } from './attributes';
4
4
  export { MAP_DRAWING_MODES, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
@@ -1,88 +1,7 @@
1
- export const SelectValueType: PropTypes.Requireable<NonNullable<string | number | object>>;
2
- export const DropDownEntryType: PropTypes.Requireable<PropTypes.InferProps<{
3
- value: PropTypes.Validator<NonNullable<NonNullable<string | number | object>>>;
4
- label: PropTypes.Requireable<string>;
5
- }>>;
6
- export const DropDownGroupEntryType: PropTypes.Requireable<PropTypes.InferProps<{
7
- label: PropTypes.Validator<string>;
8
- values: PropTypes.Validator<object[]>;
9
- }>>;
10
- export const ColumnDataType: PropTypes.Requireable<PropTypes.InferProps<{
11
- id: PropTypes.Requireable<string>;
12
- label: PropTypes.Requireable<string>;
13
- dataTypeDefinition: PropTypes.Requireable<object>;
14
- resizable: PropTypes.Requireable<boolean>;
15
- sortable: PropTypes.Requireable<boolean>;
16
- filterable: PropTypes.Requireable<boolean>;
17
- headCellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
18
- rowCellValueRenderer: PropTypes.Requireable<(...args: any[]) => any>;
19
- nestedPath: PropTypes.Requireable<string[]>;
20
- }>>;
21
1
  export const SortingType: PropTypes.Requireable<PropTypes.InferProps<{
22
2
  field: PropTypes.Requireable<string>;
23
3
  order: PropTypes.Requireable<string>;
24
4
  }>>;
25
- export const ColumnFilterType: PropTypes.Requireable<PropTypes.InferProps<{
26
- value: PropTypes.Requireable<NonNullable<NonNullable<NonNullable<string | number | boolean | PropTypes.InferProps<{
27
- value: PropTypes.Requireable<string>;
28
- lookupCode: PropTypes.Requireable<string>;
29
- }>> | NonNullable<string | number | boolean | PropTypes.InferProps<{
30
- value: PropTypes.Requireable<string>;
31
- lookupCode: PropTypes.Requireable<string>;
32
- }>>[]> | NonNullable<NonNullable<string | number | boolean | PropTypes.InferProps<{
33
- value: PropTypes.Requireable<string>;
34
- lookupCode: PropTypes.Requireable<string>;
35
- }>> | NonNullable<string | number | boolean | PropTypes.InferProps<{
36
- value: PropTypes.Requireable<string>;
37
- lookupCode: PropTypes.Requireable<string>;
38
- }>>[]>[]>>;
39
- filter: PropTypes.Requireable<string>;
40
- }>>;
41
- export const ColumnsDataType: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
42
- id: PropTypes.Requireable<string>;
43
- label: PropTypes.Requireable<string>;
44
- dataTypeDefinition: PropTypes.Requireable<object>;
45
- }>[] | PropTypes.InferProps<{
46
- id: PropTypes.Requireable<string>;
47
- label: PropTypes.Requireable<string>;
48
- columns: PropTypes.Requireable<PropTypes.InferProps<{
49
- id: PropTypes.Requireable<string>;
50
- label: PropTypes.Requireable<string>;
51
- dataTypeDefinition: PropTypes.Requireable<object>;
52
- }>[]>;
53
- }>[]>>;
54
- export const GroupedColumnsDataType: PropTypes.Requireable<PropTypes.InferProps<{
55
- id: PropTypes.Requireable<string>;
56
- label: PropTypes.Requireable<string>;
57
- columns: PropTypes.Requireable<PropTypes.InferProps<{
58
- id: PropTypes.Requireable<string>;
59
- label: PropTypes.Requireable<string>;
60
- dataTypeDefinition: PropTypes.Requireable<object>;
61
- }>[]>;
62
- }>[]>;
63
- export const QueryBuilderAttributeDataType: PropTypes.Requireable<PropTypes.InferProps<{
64
- title: PropTypes.Requireable<string>;
65
- pathToTitle: PropTypes.Requireable<string[]>;
66
- fieldName: PropTypes.Requireable<string>;
67
- entityTypeUri: PropTypes.Requireable<string>;
68
- attrType: PropTypes.Requireable<PropTypes.InferProps<{
69
- label: PropTypes.Requireable<string>;
70
- name: PropTypes.Requireable<string>;
71
- description: PropTypes.Requireable<string>;
72
- type: PropTypes.Requireable<string>;
73
- hidden: PropTypes.Requireable<boolean>;
74
- faceted: PropTypes.Requireable<boolean>;
75
- searchable: PropTypes.Requireable<boolean>;
76
- uri: PropTypes.Requireable<string>;
77
- access: PropTypes.Requireable<string[]>;
78
- cardinality: PropTypes.Requireable<PropTypes.InferProps<{
79
- minValue: PropTypes.Requireable<number>;
80
- maxValue: PropTypes.Requireable<number>;
81
- }>>;
82
- }>>;
83
- uri: PropTypes.Requireable<string>;
84
- groupName: PropTypes.Requireable<string>;
85
- }>>;
86
5
  export const QueryBuilderAttributeType: PropTypes.Requireable<PropTypes.InferProps<{
87
6
  id: PropTypes.Requireable<NonNullable<string | number>>;
88
7
  values: PropTypes.Requireable<any[]>;
@@ -1,50 +1,29 @@
1
1
  import PropTypes from 'prop-types';
2
- import { AttributeTypeType, FilterValueType, SortOrderType } from '@reltio/mdm-sdk';
3
- var SelectValueType = PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]);
4
- var DropDownEntryType = PropTypes.shape({
5
- value: SelectValueType.isRequired,
6
- label: PropTypes.string
7
- });
8
- var DropDownGroupEntryType = PropTypes.shape({
9
- label: PropTypes.string.isRequired,
10
- values: PropTypes.arrayOf(PropTypes.object).isRequired
11
- });
12
- var ColumnDataType = PropTypes.shape({
13
- id: PropTypes.string,
14
- label: PropTypes.string,
15
- dataTypeDefinition: PropTypes.object,
16
- resizable: PropTypes.bool,
17
- sortable: PropTypes.bool,
18
- filterable: PropTypes.bool,
19
- headCellRenderer: PropTypes.func,
20
- rowCellValueRenderer: PropTypes.func,
21
- nestedPath: PropTypes.arrayOf(PropTypes.string)
22
- });
23
2
  var SortingType = PropTypes.shape({
24
3
  field: PropTypes.string,
25
- order: SortOrderType
4
+ order: PropTypes.oneOf(['asc', 'desc'])
26
5
  });
27
- var ColumnFilterType = PropTypes.shape({
28
- value: PropTypes.oneOfType([FilterValueType, PropTypes.arrayOf(FilterValueType)]),
29
- filter: PropTypes.string
30
- });
31
- var PlainColumnsDataType = PropTypes.arrayOf(PropTypes.shape({
32
- id: PropTypes.string,
33
- label: PropTypes.string,
34
- dataTypeDefinition: PropTypes.object
35
- }));
36
- var GroupedColumnsDataType = PropTypes.arrayOf(PropTypes.shape({
37
- id: PropTypes.string,
6
+ var AttrType = PropTypes.shape({
38
7
  label: PropTypes.string,
39
- columns: PlainColumnsDataType
40
- }));
41
- var ColumnsDataType = PropTypes.oneOfType([PlainColumnsDataType, GroupedColumnsDataType]);
8
+ name: PropTypes.string,
9
+ description: PropTypes.string,
10
+ type: PropTypes.string,
11
+ hidden: PropTypes.bool,
12
+ faceted: PropTypes.bool,
13
+ searchable: PropTypes.bool,
14
+ uri: PropTypes.string,
15
+ access: PropTypes.arrayOf(PropTypes.string),
16
+ cardinality: PropTypes.shape({
17
+ minValue: PropTypes.number,
18
+ maxValue: PropTypes.number
19
+ })
20
+ });
42
21
  var QueryBuilderAttributeDataType = PropTypes.shape({
43
22
  title: PropTypes.string,
44
23
  pathToTitle: PropTypes.arrayOf(PropTypes.string),
45
24
  fieldName: PropTypes.string,
46
25
  entityTypeUri: PropTypes.string,
47
- attrType: AttributeTypeType,
26
+ attrType: AttrType,
48
27
  uri: PropTypes.string,
49
28
  groupName: PropTypes.string
50
29
  });
@@ -55,4 +34,4 @@ var QueryBuilderAttributeType = PropTypes.shape({
55
34
  filter: PropTypes.string,
56
35
  operator: PropTypes.string
57
36
  });
58
- export { SelectValueType, DropDownEntryType, DropDownGroupEntryType, ColumnDataType, SortingType, ColumnFilterType, ColumnsDataType, GroupedColumnsDataType, QueryBuilderAttributeDataType, QueryBuilderAttributeType };
37
+ export { SortingType, QueryBuilderAttributeType };
@@ -1,6 +1,6 @@
1
1
  export declare const COMMON_TEXT_FIELD_PROPS: {
2
- variant: string;
3
- size: string;
2
+ variant: "filled";
3
+ size: "small";
4
4
  InputProps: {
5
5
  hiddenLabel: boolean;
6
6
  };
@@ -6,7 +6,7 @@ export declare enum ScrollType {
6
6
  NewView = "NewView"
7
7
  }
8
8
  type ScrollToElementContextProps = {
9
- element: unknown;
9
+ element: AttributeError | AttributeType | string;
10
10
  type: ScrollType;
11
11
  highlightError?: (element: AttributeError) => void;
12
12
  highlightAttribute?: (element: AttributeType) => void;
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@reltio/mdm-sdk';
1
+ import { FacetFilter } from '@reltio/mdm-sdk';
2
2
  import { ColumnData, ColumnFilter } from '../types/basicTable';
3
3
  export declare const defaultGetRowCellHeight: ({ columnData, cell }: {
4
4
  columnData: any;
@@ -9,10 +9,5 @@ export declare const defaultRenderRowCell: ({ cell, CellValueRenderer, ...otherP
9
9
  cell: any;
10
10
  CellValueRenderer: any;
11
11
  }) => any;
12
- export declare const columnFilterToMdmFilter: (columnData: Pick<ColumnData, 'id' | 'dataTypeDefinition'>, columnFilter?: ColumnFilter) => {
13
- fieldName: string;
14
- filter: string;
15
- values: import("@reltio/mdm-sdk").SearchValue[];
16
- type: DataTypes;
17
- };
12
+ export declare const columnFilterToMdmFilter: (columnData: Pick<ColumnData, 'id' | 'dataTypeDefinition'>, columnFilter?: ColumnFilter) => FacetFilter;
18
13
  export declare const buildColumnsFilter: (columnsData: ColumnData[], filters?: Record<string, ColumnFilter>) => string;
@@ -1,10 +1,14 @@
1
- export function useRelationTypeSelector({ reversedContextLabels }: {
2
- reversedContextLabels: any;
3
- }): {
4
- getRelationTypesOptions: (inRelations: any, outRelations: any) => any;
5
- fromEditorValue: (inRelationTypes: any, outRelationTypes: any) => (relation: any) => {
6
- type: any;
7
- direction: any;
1
+ import { ConnectionRelation, TRelationType } from '@reltio/mdm-sdk';
2
+ import { RelationOption } from '../types';
3
+ type Props = {
4
+ reversedContextLabels?: boolean;
5
+ };
6
+ export declare const useRelationTypeSelector: ({ reversedContextLabels }: Props) => {
7
+ getRelationTypesOptions: (inRelations: TRelationType[], outRelations: TRelationType[]) => RelationOption[];
8
+ fromEditorValue: (inRelationTypes: TRelationType[], outRelationTypes: TRelationType[]) => (relation: RelationOption) => {
9
+ type: TRelationType;
10
+ direction: string;
8
11
  };
9
- toEditorValue: (relation: any, relationsTypesOptions: any) => any;
12
+ toEditorValue: (relation: ConnectionRelation, relationsTypesOptions: RelationOption[]) => RelationOption | undefined;
10
13
  };
14
+ export {};
@@ -10,7 +10,9 @@ export var useRelationTypeSelector = function (_a) {
10
10
  var byLabel = ascend(prop('label'));
11
11
  var prepareRelation = curry(function (direction, _a) {
12
12
  var uri = _a.uri, label = _a.label, startObject = _a.startObject, endObject = _a.endObject;
13
- var dirObject = direction === (reversedContextLabels ? Directions.OUT : Directions.IN) ? startObject : endObject;
13
+ var dirObject = direction === (reversedContextLabels ? Directions.OUT : Directions.IN)
14
+ ? startObject
15
+ : endObject;
14
16
  return {
15
17
  label: { directionalLabel: getDirectionalLabel(dirObject), typeLabel: label },
16
18
  value: "".concat(uri, ",").concat(direction),
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AttributeType, Crosswalk, RelationCrosswalk, SearchFilter, SearchOperator } from '@reltio/mdm-sdk';
2
+ import { AttributeType, AttributeValue, ConnectionRelationType, Crosswalk, RelationCrosswalk, SearchFilter, SearchOperator } from '@reltio/mdm-sdk';
3
3
  import { Layout as LayoutItem } from 'react-grid-layout';
4
4
  export type ReactGridLayoutItem = LayoutItem;
5
5
  export type ReltioGridLayoutOptions = {
@@ -25,7 +25,7 @@ export type QueryBuilderAttributeData = {
25
25
  filterOptions: Array<string>;
26
26
  };
27
27
  export type QueryBuilderAttribute = {
28
- id: string;
28
+ id: string | number;
29
29
  values: Array<unknown>;
30
30
  data: QueryBuilderAttributeData;
31
31
  filter: string;
@@ -161,3 +161,20 @@ export type ImageAttributeSize = ImageSize & {
161
161
  imageHeight: number;
162
162
  imageMargin: number;
163
163
  };
164
+ export type RelationOption = {
165
+ label: string;
166
+ value: string;
167
+ } & Pick<ConnectionRelationType, 'startObject' | 'endObject'>;
168
+ export type DropDownEntryType = {
169
+ label?: string;
170
+ value: string;
171
+ };
172
+ export type DropDownGroupEntryType = {
173
+ label?: string;
174
+ values: DropDownEntryType[];
175
+ isGroup?: boolean;
176
+ };
177
+ export type AdditionalControlsRenderer<T extends AttributeValue> = {
178
+ attributeType: AttributeType;
179
+ attributeValue: T;
180
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1853",
3
+ "version": "1.4.1854",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -8,7 +8,7 @@
8
8
  "@fluentui/react-context-selector": "^9.1.26",
9
9
  "@react-google-maps/api": "2.7.0",
10
10
  "@react-sigma/core": "3.4.0",
11
- "@reltio/mdm-sdk": "^1.4.1801",
11
+ "@reltio/mdm-sdk": "^1.4.1802",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",