@reltio/components 1.4.1942 → 1.4.1944

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 (115) hide show
  1. package/cjs/AsyncReactSelect/AsyncReactSelect.d.ts +1 -1
  2. package/cjs/AttributeSelector/AttributeSelector.js +1 -2
  3. package/cjs/AttributeSelector/AttributeSelector.specs.js +1 -1
  4. package/cjs/AttributesFilterSelector/AttributesFilterSelector.test.js +2 -2
  5. package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +3 -3
  6. package/cjs/ConnectionEditor/ConnectionEditor.test.js +4 -4
  7. package/cjs/CreatableReactSelect/CreatableReactSelect.d.ts +1 -1
  8. package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +12 -12
  9. package/cjs/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +1 -1
  10. package/cjs/EntitySelector/EntitySelector.test.js +2 -2
  11. package/cjs/EntitySelector/components/Group/Group.test.js +1 -0
  12. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.d.ts +2 -10
  13. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.js +2 -2
  14. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.d.ts +3 -17
  15. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.js +0 -28
  16. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.d.ts +4 -14
  17. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.js +1 -12
  18. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.d.ts +3 -12
  19. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.js +0 -9
  20. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.d.ts +4 -11
  21. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.js +0 -14
  22. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.d.ts +9 -8
  23. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.js +0 -5
  24. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.d.ts +4 -9
  25. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.js +2 -19
  26. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.d.ts +4 -9
  27. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.js +0 -6
  28. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.d.ts +3 -9
  29. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.js +0 -6
  30. package/cjs/HOCs/withReactSelectMuiSkin/helpers.d.ts +13 -88
  31. package/cjs/HOCs/withReactSelectMuiSkin/styles.d.ts +1 -1
  32. package/cjs/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.d.ts +4 -3
  33. package/cjs/MatchRulesSelector/MatchRulesSelector.test.js +4 -4
  34. package/cjs/MultiSelect/MultiSelect.js +1 -1
  35. package/cjs/MultiValueSelector/MultiValueSelector.js +1 -1
  36. package/cjs/ReactSelect/ReactSelect.d.ts +1 -1
  37. package/cjs/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.js +1 -1
  38. package/cjs/RelationEditor/IntegrationRelationEditor.test.js +5 -5
  39. package/cjs/RolesEditor/RolesEditor.test.js +2 -2
  40. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.test.js +2 -2
  41. package/cjs/SourceSystemsSelector/SourceSystemsSelector.test.js +2 -2
  42. package/cjs/UserSelector/UserSelector.js +1 -1
  43. package/cjs/UserSelector/UserSelector.specs.js +1 -1
  44. package/cjs/constants/reactSelect.d.ts +1 -1
  45. package/cjs/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +4 -4
  46. package/cjs/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.js +1 -1
  47. package/cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.js +1 -1
  48. package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.js +1 -1
  49. package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +2 -2
  50. package/cjs/features/activity-log/RelationObject/styles.d.ts +1 -1
  51. package/cjs/features/activity-log/hooks/useActivitiesLoader.js +5 -2
  52. package/cjs/features/history/HistoryActivitySelector/HistoryActivitySelector.js +1 -1
  53. package/cjs/features/history/HistoryActivitySelector/HistoryActivitySelector.specs.js +3 -3
  54. package/cjs/features/history/HistoryFilterButton/HistoryFilterButton.test.js +6 -6
  55. package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +6 -6
  56. package/cjs/features/workflow/ReassignButton/ReassignButton.spec.js +2 -2
  57. package/cjs/types/index.d.ts +40 -0
  58. package/esm/AsyncReactSelect/AsyncReactSelect.d.ts +1 -1
  59. package/esm/AttributeSelector/AttributeSelector.js +1 -2
  60. package/esm/AttributeSelector/AttributeSelector.specs.js +1 -1
  61. package/esm/AttributesFilterSelector/AttributesFilterSelector.test.js +2 -2
  62. package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +3 -3
  63. package/esm/ConnectionEditor/ConnectionEditor.test.js +4 -4
  64. package/esm/CreatableReactSelect/CreatableReactSelect.d.ts +1 -1
  65. package/esm/DependentLookupEditor/DependentLookupEditor.test.js +12 -12
  66. package/esm/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +1 -1
  67. package/esm/EntitySelector/EntitySelector.test.js +2 -2
  68. package/esm/EntitySelector/components/Group/Group.test.js +1 -0
  69. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.d.ts +2 -10
  70. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.js +2 -2
  71. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.d.ts +3 -17
  72. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.js +0 -28
  73. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.d.ts +4 -14
  74. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.js +1 -12
  75. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.d.ts +3 -12
  76. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.js +0 -9
  77. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.d.ts +4 -11
  78. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.js +0 -14
  79. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.d.ts +9 -8
  80. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.js +0 -5
  81. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.d.ts +4 -9
  82. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.js +2 -19
  83. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.d.ts +4 -9
  84. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.js +0 -6
  85. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.d.ts +3 -9
  86. package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.js +0 -6
  87. package/esm/HOCs/withReactSelectMuiSkin/helpers.d.ts +13 -88
  88. package/esm/HOCs/withReactSelectMuiSkin/styles.d.ts +1 -1
  89. package/esm/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.d.ts +4 -3
  90. package/esm/MatchRulesSelector/MatchRulesSelector.test.js +4 -4
  91. package/esm/MultiSelect/MultiSelect.js +2 -2
  92. package/esm/MultiValueSelector/MultiValueSelector.js +2 -2
  93. package/esm/ReactSelect/ReactSelect.d.ts +1 -1
  94. package/esm/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.js +1 -1
  95. package/esm/RelationEditor/IntegrationRelationEditor.test.js +5 -5
  96. package/esm/RolesEditor/RolesEditor.test.js +2 -2
  97. package/esm/SimpleAttributeEditor/SimpleAttributeEditor.test.js +2 -2
  98. package/esm/SourceSystemsSelector/SourceSystemsSelector.test.js +2 -2
  99. package/esm/UserSelector/UserSelector.js +2 -2
  100. package/esm/UserSelector/UserSelector.specs.js +1 -1
  101. package/esm/constants/reactSelect.d.ts +1 -1
  102. package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +4 -4
  103. package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.js +2 -2
  104. package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.js +2 -2
  105. package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.js +2 -2
  106. package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +2 -2
  107. package/esm/features/activity-log/RelationObject/styles.d.ts +1 -1
  108. package/esm/features/activity-log/hooks/useActivitiesLoader.js +6 -3
  109. package/esm/features/history/HistoryActivitySelector/HistoryActivitySelector.js +2 -2
  110. package/esm/features/history/HistoryActivitySelector/HistoryActivitySelector.specs.js +3 -3
  111. package/esm/features/history/HistoryFilterButton/HistoryFilterButton.test.js +6 -6
  112. package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +6 -6
  113. package/esm/features/workflow/ReassignButton/ReassignButton.spec.js +2 -2
  114. package/esm/types/index.d.ts +40 -0
  115. package/package.json +3 -3
@@ -144,7 +144,7 @@ describe('ReassignButton tests', function () {
144
144
  return [4 /*yield*/, user.click(react_2.screen.getByTestId('select-dropdown-indicator'))];
145
145
  case 2:
146
146
  _a.sent();
147
- return [4 /*yield*/, react_2.screen.findByRole('menuitem', { name: 'firstUser' })];
147
+ return [4 /*yield*/, react_2.screen.findByRole('option', { name: 'firstUser' })];
148
148
  case 3:
149
149
  item = _a.sent();
150
150
  return [4 /*yield*/, user.click(item)];
@@ -210,7 +210,7 @@ describe('ReassignButton tests', function () {
210
210
  return [4 /*yield*/, user.click(react_2.screen.getByTestId('select-dropdown-indicator'))];
211
211
  case 2:
212
212
  _a.sent();
213
- return [4 /*yield*/, react_2.screen.findByRole('menuitem', { name: newAssigneeName })];
213
+ return [4 /*yield*/, react_2.screen.findByRole('option', { name: newAssigneeName })];
214
214
  case 3:
215
215
  item = _a.sent();
216
216
  return [4 /*yield*/, user.click(item)];
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import { AttributeType, AttributeValue, ConnectionRelationType, Crosswalk, RelationCrosswalk, SearchFilter, SearchOperator } from '@reltio/mdm-sdk';
3
+ import { TextFieldProps } from '@mui/material/TextField';
3
4
  import { Layout as LayoutItem } from 'react-grid-layout';
5
+ import { ClearIndicatorProps, ControlProps, DropdownIndicatorProps, GroupHeadingProps, MenuProps, PlaceholderProps, SingleValueProps, ValueContainerProps } from 'react-select';
4
6
  export type ReactGridLayoutItem = LayoutItem;
5
7
  export type ReltioGridLayoutOptions = {
6
8
  cols: number;
@@ -192,3 +194,41 @@ export type ReadOnlyAttributeClasses = {
192
194
  wrapper?: string;
193
195
  wrapperWithLines?: string;
194
196
  };
197
+ export type ReactSelectMuiSkinProps = {
198
+ classes?: Record<string, string>;
199
+ error?: boolean;
200
+ TextFieldProps?: TextFieldProps;
201
+ innerRef?: React.MutableRefObject<any>;
202
+ inputRef?: React.MutableRefObject<any>;
203
+ menuListFooter?: JSX.Element;
204
+ };
205
+ export type DropdownIndicatorWithMuiSkinProps<T> = DropdownIndicatorProps & {
206
+ selectProps: DropdownIndicatorProps['selectProps'] & ReactSelectMuiSkinProps;
207
+ innerProps: T;
208
+ };
209
+ export type ClearIndicatorWithMuiSkinProps<T> = ClearIndicatorProps & {
210
+ selectProps: ClearIndicatorProps['selectProps'] & ReactSelectMuiSkinProps;
211
+ innerProps: T;
212
+ };
213
+ export type ControlWithMuiSkinProps<T> = ControlProps & {
214
+ selectProps: ControlProps['selectProps'] & ReactSelectMuiSkinProps;
215
+ innerProps: T;
216
+ };
217
+ export type GroupHeadingWithMuiSkinProps = GroupHeadingProps & {
218
+ selectProps: GroupHeadingProps['selectProps'] & ReactSelectMuiSkinProps;
219
+ };
220
+ export type MenuWithMuiSkinProps<T> = MenuProps & {
221
+ selectProps: MenuProps['selectProps'] & ReactSelectMuiSkinProps;
222
+ innerProps: T;
223
+ };
224
+ export type PlaceholderWithMuiSkinProps<T> = PlaceholderProps & {
225
+ selectProps: PlaceholderProps['selectProps'] & ReactSelectMuiSkinProps;
226
+ innerProps: T;
227
+ };
228
+ export type ValueContainerWithMuiSkinProps = ValueContainerProps & {
229
+ selectProps: ValueContainerProps['selectProps'] & ReactSelectMuiSkinProps;
230
+ };
231
+ export type SingleValueWithMuiSkinProps<T> = SingleValueProps & {
232
+ selectProps: SingleValueProps['selectProps'] & ReactSelectMuiSkinProps;
233
+ innerProps: T;
234
+ };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const AsyncReactSelect: {
3
- (props: any): JSX.Element;
3
+ (props: Omit<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>, "onChange" | "value" | "onMenuClose" | "onMenuOpen" | "menuIsOpen" | "inputValue" | "onInputChange"> & Partial<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<unknown> & import("..").ReactSelectMuiSkinProps): JSX.Element;
4
4
  displayName: string;
5
5
  defaultProps: {
6
6
  components: {};
@@ -23,7 +23,6 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import React, { useCallback, useMemo } from 'react';
24
24
  import i18n from 'ui-i18n';
25
25
  import classnames from 'classnames';
26
- import { pipe, defaultTo } from 'ramda';
27
26
  import { getAttributeTypeSubAttributes } from '@reltio/mdm-sdk';
28
27
  import Typography from '@mui/material/Typography';
29
28
  import { MultiSelect } from '../MultiSelect';
@@ -73,5 +72,5 @@ export var AttributeSelector = function (_a) {
73
72
  DropdownIndicator: ReactSelectDropdownIndicatorWithIconButton,
74
73
  MultiValue: CustomMultiValue,
75
74
  Option: CustomOption
76
- }, onChange: pipe(defaultTo([]), onChange), styles: customStyles, classes: styles, menuPlacement: menuPlacement, menuPortalTarget: document.body, menuShouldBlockScroll: true, captureMenuScroll: false })));
75
+ }, onChange: onChange, styles: customStyles, classes: styles, menuPlacement: menuPlacement, menuPortalTarget: document.body, menuShouldBlockScroll: true, captureMenuScroll: false })));
77
76
  };
@@ -170,7 +170,7 @@ describe('AttributeSelector tests', function () {
170
170
  return [4 /*yield*/, user.click(screen.getByText('Activity'))];
171
171
  case 2:
172
172
  _a.sent();
173
- expect(onChangeSpy).toHaveBeenCalledWith(newAttributes);
173
+ expect(onChangeSpy).toHaveBeenCalledWith(newAttributes, expect.any(Object));
174
174
  return [2 /*return*/];
175
175
  }
176
176
  });
@@ -104,7 +104,7 @@ describe('AttributesFilterSelector tests', function () {
104
104
  return [4 /*yield*/, user.click(screen.getByTestId('filter-selector'))];
105
105
  case 1:
106
106
  _a.sent();
107
- menuItems = screen.getAllByRole('menuitem');
107
+ menuItems = screen.getAllByRole('option');
108
108
  expect(menuItems.map(function (item) { return item.textContent; })).toEqual(['Equals', 'Not', 'Exists', 'Missing value']);
109
109
  return [2 /*return*/];
110
110
  }
@@ -149,7 +149,7 @@ describe('AttributesFilterSelector tests', function () {
149
149
  return [4 /*yield*/, user.click(screen.getByTestId('filter-selector'))];
150
150
  case 1:
151
151
  _a.sent();
152
- menuItems = screen.getAllByRole('menuitem');
152
+ menuItems = screen.getAllByRole('option');
153
153
  expect(menuItems.map(function (item) { return item.textContent; })).toEqual(['In']);
154
154
  return [2 /*return*/];
155
155
  }
@@ -107,7 +107,7 @@ describe('AttributesFiltersBuilder tests', function () {
107
107
  user = setUp({ filters: [] }).user;
108
108
  expect(screen.getByText('Select attribute')).toBeInTheDocument();
109
109
  expect(screen.getByText('Equals')).toBeInTheDocument();
110
- expect(screen.getByRole('textbox')).toBeDisabled();
110
+ expect(screen.getByRole('combobox')).toBeDisabled();
111
111
  expect(screen.queryByRole('button', { name: 'Add' })).not.toBeInTheDocument();
112
112
  expect(screen.queryByRole('button', { name: 'Duplicate' })).not.toBeInTheDocument();
113
113
  expect(screen.queryByRole('button', { name: 'Delete' })).not.toBeInTheDocument();
@@ -131,7 +131,7 @@ describe('AttributesFiltersBuilder tests', function () {
131
131
  expect(within(intRow).getByTestId('filter-value-editor')).toHaveTextContent('99');
132
132
  expect(within(dateRow).getByTestId('attribute-selector')).toHaveTextContent('Nested Test / Nested Test Level 2 / Date Level 2');
133
133
  expect(within(dateRow).getByText('On')).toBeInTheDocument();
134
- expect(within(dateRow).getAllByRole('textbox')[1]).toHaveValue('05/09/2023');
134
+ expect(within(dateRow).getByRole('textbox')).toHaveValue('05/09/2023');
135
135
  expect(within(emptyRow).getByTestId('attribute-selector')).toHaveTextContent('Select attribute');
136
136
  expect(within(emptyRow).getByText('Equals')).toBeInTheDocument();
137
137
  expect(within(emptyRow).queryByTestId('filter-value-editor')).not.toBeInTheDocument();
@@ -189,7 +189,7 @@ describe('AttributesFiltersBuilder tests', function () {
189
189
  return [4 /*yield*/, user.click(selector)];
190
190
  case 1:
191
191
  _a.sent();
192
- return [4 /*yield*/, user.click(screen.getByRole('menuitem', { name: 'Not' }))];
192
+ return [4 /*yield*/, user.click(screen.getByRole('option', { name: 'Not' }))];
193
193
  case 2:
194
194
  _a.sent();
195
195
  expect(onChangeSpy).toBeCalledWith([
@@ -324,12 +324,12 @@ describe('ConnectionEditor test', function () {
324
324
  };
325
325
  typeAheadSearch.mockResolvedValueOnce([newEntity]);
326
326
  user = setUp(propsWithRelations).user;
327
- profileSelector = screen.getAllByRole('textbox')[1];
327
+ profileSelector = screen.getAllByRole('combobox')[1];
328
328
  return [4 /*yield*/, user.click(profileSelector)];
329
329
  case 1:
330
330
  _a.sent();
331
331
  expect(screen.queryByText(wrongEntity.label)).not.toBeInTheDocument();
332
- return [4 /*yield*/, user.click(screen.getByRole('menuitem', { name: 'C Committee' }))];
332
+ return [4 /*yield*/, user.click(screen.getByRole('option', { name: 'C Committee' }))];
333
333
  case 2:
334
334
  _a.sent();
335
335
  expect(onChangeEntity).toHaveBeenCalledWith(__assign(__assign({}, newEntity), { entityType: metadata.entityTypes[2] }));
@@ -344,11 +344,11 @@ describe('ConnectionEditor test', function () {
344
344
  case 0:
345
345
  user = setUp(propsWithRelations).user;
346
346
  expect(onChangeRelationType).not.toHaveBeenCalled();
347
- relationshipTypeSelector = screen.getAllByRole('textbox')[0];
347
+ relationshipTypeSelector = screen.getAllByRole('combobox')[0];
348
348
  return [4 /*yield*/, user.click(relationshipTypeSelector)];
349
349
  case 1:
350
350
  _a.sent();
351
- return [4 /*yield*/, user.click(screen.getByRole('menuitem', { name: 'H L has address undefined ↔ undefined' }))];
351
+ return [4 /*yield*/, user.click(screen.getByRole('option', { name: 'H L has address undefined ↔ undefined' }))];
352
352
  case 2:
353
353
  _a.sent();
354
354
  expect(onChangeRelationType).toHaveBeenCalledWith({
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const CreatableReactSelect: {
3
- (props: any): JSX.Element;
3
+ (props: Omit<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>, "onChange" | "value" | "onMenuClose" | "onMenuOpen" | "menuIsOpen" | "inputValue" | "onInputChange"> & Partial<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<unknown> & import("..").ReactSelectMuiSkinProps): JSX.Element;
4
4
  displayName: string;
5
5
  defaultProps: {
6
6
  components: {};
@@ -127,7 +127,7 @@ describe('DependentLookupEditor', function () {
127
127
  wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
128
128
  });
129
129
  wrapper.update();
130
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(newInputValue);
130
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
131
131
  expect(props.onChange).not.toHaveBeenCalled();
132
132
  expect(props.getLookups).toBeCalledWith({
133
133
  type: 'COUNTRY_CD',
@@ -140,7 +140,7 @@ describe('DependentLookupEditor', function () {
140
140
  wrapper.find(ReactSelect).prop('onInputChange')('', { action: 'input-blur' });
141
141
  });
142
142
  wrapper.update();
143
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe('');
143
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('');
144
144
  expect(props.onChange).not.toHaveBeenCalled();
145
145
  expect(props.getLookups).toBeCalledWith({
146
146
  type: 'COUNTRY_CD',
@@ -165,13 +165,13 @@ describe('DependentLookupEditor', function () {
165
165
  wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
166
166
  });
167
167
  wrapper.update();
168
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(newInputValue);
168
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
169
169
  expect(props.onChange).not.toHaveBeenCalled();
170
170
  act(function () {
171
171
  wrapper.find(ReactSelect).prop('onInputChange')('', { action: 'menu-close' });
172
172
  });
173
173
  wrapper.update();
174
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe('u');
174
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('u');
175
175
  expect(props.onChange).not.toHaveBeenCalled();
176
176
  return [2 /*return*/];
177
177
  });
@@ -186,7 +186,7 @@ describe('DependentLookupEditor', function () {
186
186
  wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
187
187
  });
188
188
  wrapper.update();
189
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(newInputValue);
189
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
190
190
  expect(props.onChange).not.toHaveBeenCalled();
191
191
  expect(props.getLookups).toBeCalledWith({
192
192
  type: 'COUNTRY_CD',
@@ -199,7 +199,7 @@ describe('DependentLookupEditor', function () {
199
199
  wrapper.find(ReactSelect).prop('onInputChange')('', { action: 'input-blur' });
200
200
  });
201
201
  wrapper.update();
202
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(getOptionLabel(value));
202
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(getOptionLabel(value));
203
203
  expect(props.onChange).not.toHaveBeenCalled();
204
204
  expect(props.getLookups).toBeCalledWith({
205
205
  type: 'COUNTRY_CD',
@@ -221,7 +221,7 @@ describe('DependentLookupEditor', function () {
221
221
  wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
222
222
  });
223
223
  wrapper.update();
224
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(newInputValue);
224
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
225
225
  expect(props.onChange).not.toHaveBeenCalled();
226
226
  expect(props.getLookups).toBeCalledWith({
227
227
  type: 'COUNTRY_CD',
@@ -234,7 +234,7 @@ describe('DependentLookupEditor', function () {
234
234
  wrapper.find(ReactSelect).prop('onInputChange')('', { action: 'menu-close' });
235
235
  });
236
236
  wrapper.update();
237
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(getOptionLabel(value));
237
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(getOptionLabel(value));
238
238
  expect(props.onChange).not.toHaveBeenCalled();
239
239
  expect(props.getLookups).toBeCalledWith({
240
240
  type: 'COUNTRY_CD',
@@ -764,7 +764,7 @@ describe('DependentLookupEditor', function () {
764
764
  }));
765
765
  value = { lookupCode: 'US', value: 'USA' };
766
766
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups, value: value, multiple: false })));
767
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe('USA (US)');
767
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('USA (US)');
768
768
  newInputValue = 'u';
769
769
  act(function () {
770
770
  wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
@@ -773,7 +773,7 @@ describe('DependentLookupEditor', function () {
773
773
  case 1:
774
774
  _a.sent();
775
775
  wrapper.update();
776
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(newInputValue);
776
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
777
777
  expect(props.onChange).not.toHaveBeenCalled();
778
778
  expect(getLookups).toBeCalledWith({
779
779
  type: 'COUNTRY_CD',
@@ -798,7 +798,7 @@ describe('DependentLookupEditor', function () {
798
798
  }));
799
799
  value = { lookupCode: 'US', value: 'USA' };
800
800
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups, value: value, multiple: false })));
801
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe('USA (US)');
801
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('USA (US)');
802
802
  newInputValue = '';
803
803
  act(function () {
804
804
  wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
@@ -807,7 +807,7 @@ describe('DependentLookupEditor', function () {
807
807
  case 1:
808
808
  _a.sent();
809
809
  wrapper.update();
810
- expect(wrapper.find(ReactSelect).find('Input').last().text()).toBe(newInputValue);
810
+ expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
811
811
  expect(props.onChange).toHaveBeenCalledWith('');
812
812
  expect(getLookups).toBeCalledWith({
813
813
  type: 'COUNTRY_CD',
@@ -99,7 +99,7 @@ describe('SpecialRenderer tests', function () {
99
99
  setUp({ attributeType: attributeType, values: ['configuration/roles/OfficeStaff'] });
100
100
  expect(screen.getByTestId('reltio-attribute-label')).toHaveTextContent(attributeType.label);
101
101
  expect(screen.getAllByTestId('reltio-attribute-value')).toHaveLength(1);
102
- expect(screen.getByRole('textbox')).toBeInTheDocument();
102
+ expect(screen.getByRole('combobox')).toBeInTheDocument();
103
103
  expect(screen.getByText('Office Staff')).toBeInTheDocument();
104
104
  });
105
105
  it('should render Tags component for tags and special icon before title', function () {
@@ -461,7 +461,7 @@ describe('EntitySelector', function () {
461
461
  });
462
462
  wrapper.update();
463
463
  expect(mockOnChange).toBeCalledWith('newValue');
464
- expect(wrapper.find('StateManager').state().inputValue).toBe('');
464
+ expect(wrapper.find('Input').prop('value')).toBe('');
465
465
  });
466
466
  it('should run onClear', function () {
467
467
  var entityTypesUris = ['configuration/entityTypes/HCP'];
@@ -472,6 +472,6 @@ describe('EntitySelector', function () {
472
472
  });
473
473
  wrapper.update();
474
474
  expect(mockOnChange).toBeCalled();
475
- expect(wrapper.find('StateManager').state().inputValue).toBe('');
475
+ expect(wrapper.find('Input').prop('value')).toBe('');
476
476
  });
477
477
  });
@@ -24,6 +24,7 @@ describe('Group', function () {
24
24
  },
25
25
  children: ['child1', 'child2'],
26
26
  getStyles: jest.fn(),
27
+ getClassNames: jest.fn(),
27
28
  cx: jest.fn(),
28
29
  Heading: EmptyStub
29
30
  };
@@ -1,12 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { IconButtonProps } from '@mui/material/IconButton';
3
- type Props = {
4
- innerProps: Omit<IconButtonProps, 'size' | 'className'>;
5
- selectProps: {
6
- classes: {
7
- clearIndicator: string;
8
- };
9
- };
10
- };
11
- export declare const ReactSelectClearIndicator: ({ selectProps: { classes }, innerProps }: Props) => JSX.Element;
12
- export {};
3
+ import { ClearIndicatorWithMuiSkinProps } from '../../../../types';
4
+ export declare const ReactSelectClearIndicator: (props: ClearIndicatorWithMuiSkinProps<IconButtonProps>) => JSX.Element;
@@ -12,8 +12,8 @@ var __assign = (this && this.__assign) || function () {
12
12
  import React from 'react';
13
13
  import HighlightOffIcon from '@mui/icons-material/HighlightOff';
14
14
  import IconButton from '@mui/material/IconButton';
15
- export var ReactSelectClearIndicator = function (_a) {
16
- var classes = _a.selectProps.classes, innerProps = _a.innerProps;
15
+ export var ReactSelectClearIndicator = function (props) {
16
+ var innerProps = props.innerProps, classes = props.selectProps.classes;
17
17
  return (React.createElement(IconButton, __assign({}, innerProps, { className: classes.clearIndicator, size: "large" }),
18
18
  React.createElement(HighlightOffIcon, null)));
19
19
  };
@@ -1,17 +1,3 @@
1
- export function ReactSelectControl(props: any): JSX.Element;
2
- export namespace ReactSelectControl {
3
- namespace propTypes {
4
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
- let innerProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
6
- onMouseDown: PropTypes.Validator<(...args: any[]) => any>;
7
- }>>>;
8
- let innerRef: PropTypes.Validator<any>;
9
- let selectProps: PropTypes.Requireable<PropTypes.InferProps<{
10
- classes: PropTypes.Requireable<PropTypes.InferProps<{
11
- control: PropTypes.Validator<string>;
12
- }>>;
13
- TextFieldProps: PropTypes.Requireable<object>;
14
- }>>;
15
- }
16
- }
17
- import PropTypes from 'prop-types';
1
+ import React from 'react';
2
+ import { ControlWithMuiSkinProps } from '../../../../types';
3
+ export declare const ReactSelectControl: (props: ControlWithMuiSkinProps<React.HTMLAttributes<HTMLInputElement>>) => JSX.Element;
@@ -10,40 +10,12 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React from 'react';
13
- import PropTypes from 'prop-types';
14
13
  import TextField from '@mui/material/TextField';
15
14
  var InputComponent = React.forwardRef(function (props, ref) {
16
15
  return React.createElement("div", __assign({ ref: ref }, props));
17
16
  });
18
17
  InputComponent.displayName = 'InputComponent';
19
- InputComponent.propTypes = {
20
- inputRef: PropTypes.oneOfType([
21
- PropTypes.func,
22
- PropTypes.shape({
23
- current: PropTypes.any.isRequired
24
- })
25
- ])
26
- };
27
18
  export var ReactSelectControl = function (props) {
28
19
  var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, _a = props.selectProps, classes = _a.classes, _b = _a.TextFieldProps, TextFieldProps = _b === void 0 ? {} : _b;
29
20
  return (React.createElement(TextField, __assign({ variant: "standard", fullWidth: true }, TextFieldProps, { InputProps: __assign(__assign({ inputComponent: InputComponent }, TextFieldProps.InputProps), { inputProps: __assign(__assign({ className: classes.control, ref: innerRef, children: children }, innerProps), TextFieldProps.inputProps) }) })));
30
21
  };
31
- ReactSelectControl.propTypes = {
32
- children: PropTypes.node,
33
- innerProps: PropTypes.shape({
34
- onMouseDown: PropTypes.func.isRequired
35
- }).isRequired,
36
- innerRef: PropTypes.oneOfType([
37
- PropTypes.oneOf([null]),
38
- PropTypes.func,
39
- PropTypes.shape({
40
- current: PropTypes.any.isRequired
41
- })
42
- ]).isRequired,
43
- selectProps: PropTypes.shape({
44
- classes: PropTypes.shape({
45
- control: PropTypes.string.isRequired
46
- }),
47
- TextFieldProps: PropTypes.object
48
- })
49
- };
@@ -1,14 +1,4 @@
1
- export function ReactSelectDropdownIndicator(props: any): JSX.Element;
2
- export namespace ReactSelectDropdownIndicator {
3
- namespace propTypes {
4
- let innerProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
5
- onMouseDown: PropTypes.Validator<(...args: any[]) => any>;
6
- onTouchEnd: PropTypes.Validator<(...args: any[]) => any>;
7
- 'aria-hidden': PropTypes.Validator<string>;
8
- }>>>;
9
- let selectProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
10
- classes: PropTypes.Validator<object>;
11
- }>>>;
12
- }
13
- }
14
- import PropTypes from 'prop-types';
1
+ /// <reference types="react" />
2
+ import { IconButtonProps } from '@mui/material/IconButton';
3
+ import { DropdownIndicatorWithMuiSkinProps } from '../../../../types';
4
+ export declare const ReactSelectDropdownIndicator: (props: DropdownIndicatorWithMuiSkinProps<IconButtonProps>) => JSX.Element;
@@ -10,21 +10,10 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React from 'react';
13
- import PropTypes from 'prop-types';
14
13
  import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
15
14
  import IconButton from '@mui/material/IconButton';
16
15
  export var ReactSelectDropdownIndicator = function (props) {
17
- var classes = props.selectProps.classes, innerProps = props.innerProps;
16
+ var innerProps = props.innerProps, classes = props.selectProps.classes;
18
17
  return (React.createElement(IconButton, __assign({}, innerProps, { className: classes.dropdownIndicator, size: "large" }),
19
18
  React.createElement(ArrowDropDownIcon, null)));
20
19
  };
21
- ReactSelectDropdownIndicator.propTypes = {
22
- innerProps: PropTypes.shape({
23
- onMouseDown: PropTypes.func.isRequired,
24
- onTouchEnd: PropTypes.func.isRequired,
25
- 'aria-hidden': PropTypes.string.isRequired
26
- }).isRequired,
27
- selectProps: PropTypes.shape({
28
- classes: PropTypes.object.isRequired
29
- }).isRequired
30
- };
@@ -1,12 +1,3 @@
1
- export function ReactSelectGroupHeading(props: any): JSX.Element;
2
- export namespace ReactSelectGroupHeading {
3
- namespace propTypes {
4
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
- let selectProps: PropTypes.Requireable<PropTypes.InferProps<{
6
- classes: PropTypes.Requireable<PropTypes.InferProps<{
7
- groupHeading: PropTypes.Requireable<string>;
8
- }>>;
9
- }>>;
10
- }
11
- }
12
- import PropTypes from 'prop-types';
1
+ /// <reference types="react" />
2
+ import { GroupHeadingWithMuiSkinProps } from '../../../../types';
3
+ export declare const ReactSelectGroupHeading: (props: GroupHeadingWithMuiSkinProps) => JSX.Element;
@@ -1,16 +1,7 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
  import Typography from '@mui/material/Typography';
5
4
  export var ReactSelectGroupHeading = function (props) {
6
5
  var children = props.children, classes = props.selectProps.classes;
7
6
  return (React.createElement(Typography, { variant: "subtitle2", className: classNames(classes.groupHeading) }, children));
8
7
  };
9
- ReactSelectGroupHeading.propTypes = {
10
- children: PropTypes.node,
11
- selectProps: PropTypes.shape({
12
- classes: PropTypes.shape({
13
- groupHeading: PropTypes.string
14
- })
15
- })
16
- };
@@ -1,11 +1,4 @@
1
- export function ReactSelectMenu(props: any): JSX.Element;
2
- export namespace ReactSelectMenu {
3
- namespace propTypes {
4
- let children: PropTypes.Validator<PropTypes.ReactElementLike>;
5
- let innerProps: PropTypes.Validator<object>;
6
- let selectProps: PropTypes.Validator<object>;
7
- let innerRef: PropTypes.Requireable<any>;
8
- let getStyles: PropTypes.Requireable<(...args: any[]) => any>;
9
- }
10
- }
11
- import PropTypes from 'prop-types';
1
+ /// <reference types="react" />
2
+ import { PaperProps } from '@mui/material/Paper';
3
+ import { MenuWithMuiSkinProps } from '../../../../types';
4
+ export declare const ReactSelectMenu: (props: MenuWithMuiSkinProps<PaperProps>) => JSX.Element;
@@ -10,22 +10,8 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React from 'react';
13
- import PropTypes from 'prop-types';
14
13
  import Paper from '@mui/material/Paper';
15
14
  export var ReactSelectMenu = function (props) {
16
15
  var classes = props.selectProps.classes, innerProps = props.innerProps, innerRef = props.innerRef, getStyles = props.getStyles, children = props.children;
17
16
  return (React.createElement(Paper, __assign({ ref: innerRef, style: getStyles('menu', props), className: classes.menu }, innerProps), children));
18
17
  };
19
- ReactSelectMenu.propTypes = {
20
- children: PropTypes.element.isRequired,
21
- innerProps: PropTypes.object.isRequired,
22
- selectProps: PropTypes.object.isRequired,
23
- innerRef: PropTypes.oneOfType([
24
- PropTypes.oneOf([null]),
25
- PropTypes.func,
26
- PropTypes.shape({
27
- current: PropTypes.any.isRequired
28
- })
29
- ]),
30
- getStyles: PropTypes.func
31
- };
@@ -1,8 +1,9 @@
1
- export function ReactSelectNoOptionsMessage(props: any): JSX.Element;
2
- export namespace ReactSelectNoOptionsMessage {
3
- namespace propTypes {
4
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
- let selectProps: PropTypes.Validator<object>;
6
- }
7
- }
8
- import PropTypes from 'prop-types';
1
+ import React from 'react';
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ selectProps: {
5
+ classes: Record<string, string>;
6
+ };
7
+ };
8
+ export declare const ReactSelectNoOptionsMessage: (props: Props) => JSX.Element;
9
+ export {};
@@ -1,11 +1,6 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import Typography from '@mui/material/Typography';
4
3
  export var ReactSelectNoOptionsMessage = function (props) {
5
4
  var classes = props.selectProps.classes, children = props.children;
6
5
  return (React.createElement(Typography, { color: "textSecondary", className: classes.noOptionsMessage }, children));
7
6
  };
8
- ReactSelectNoOptionsMessage.propTypes = {
9
- children: PropTypes.node,
10
- selectProps: PropTypes.object.isRequired
11
- };
@@ -1,9 +1,4 @@
1
- export function ReactSelectPlaceholder(props: any): JSX.Element;
2
- export namespace ReactSelectPlaceholder {
3
- namespace propTypes {
4
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
- let innerProps: PropTypes.Requireable<object>;
6
- let selectProps: PropTypes.Validator<object>;
7
- }
8
- }
9
- import PropTypes from 'prop-types';
1
+ /// <reference types="react" />
2
+ import { TypographyProps } from '@mui/material/Typography';
3
+ import { PlaceholderWithMuiSkinProps } from '../../../../types';
4
+ export declare const ReactSelectPlaceholder: (props: PlaceholderWithMuiSkinProps<TypographyProps>) => JSX.Element;
@@ -1,23 +1,6 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import React from 'react';
13
- import PropTypes from 'prop-types';
14
2
  import Typography from '@mui/material/Typography';
15
3
  export var ReactSelectPlaceholder = function (props) {
16
- var classes = props.selectProps.classes, _a = props.innerProps, innerProps = _a === void 0 ? {} : _a, children = props.children;
17
- return (React.createElement(Typography, __assign({ color: "textSecondary", className: classes.placeholder }, innerProps), children));
18
- };
19
- ReactSelectPlaceholder.propTypes = {
20
- children: PropTypes.node,
21
- innerProps: PropTypes.object,
22
- selectProps: PropTypes.object.isRequired
4
+ var classes = props.selectProps.classes, children = props.children;
5
+ return (React.createElement(Typography, { color: "textSecondary", className: classes.placeholder }, children));
23
6
  };