@reltio/components 1.4.1941 → 1.4.1943
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/AsyncReactSelect/AsyncReactSelect.d.ts +1 -1
- package/cjs/AttributeSelector/AttributeSelector.js +1 -2
- package/cjs/AttributeSelector/AttributeSelector.specs.js +1 -1
- package/cjs/AttributesFilterSelector/AttributesFilterSelector.test.js +2 -2
- package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +3 -3
- package/cjs/ConnectionEditor/ConnectionEditor.test.js +4 -4
- package/cjs/CreatableReactSelect/CreatableReactSelect.d.ts +1 -1
- package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +12 -12
- package/cjs/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +1 -1
- package/cjs/EntitySelector/EntitySelector.test.js +2 -2
- package/cjs/EntitySelector/components/Group/Group.test.js +1 -0
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.d.ts +2 -10
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.js +2 -2
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.d.ts +3 -17
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.js +0 -28
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.d.ts +4 -14
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.js +1 -12
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.d.ts +3 -12
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.js +0 -9
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.d.ts +4 -11
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.js +0 -14
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.d.ts +9 -8
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.js +0 -5
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.d.ts +4 -9
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.js +2 -19
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.d.ts +4 -9
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.js +0 -6
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.d.ts +3 -9
- package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.js +0 -6
- package/cjs/HOCs/withReactSelectMuiSkin/helpers.d.ts +13 -88
- package/cjs/HOCs/withReactSelectMuiSkin/styles.d.ts +1 -1
- package/cjs/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.d.ts +4 -3
- package/cjs/MatchRulesSelector/MatchRulesSelector.test.js +4 -4
- package/cjs/MultiSelect/MultiSelect.js +1 -1
- package/cjs/MultiValueSelector/MultiValueSelector.js +1 -1
- package/cjs/ReactSelect/ReactSelect.d.ts +1 -1
- package/cjs/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.js +1 -1
- package/cjs/RelationEditor/IntegrationRelationEditor.test.js +5 -5
- package/cjs/RolesEditor/RolesEditor.test.js +2 -2
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.test.js +2 -2
- package/cjs/SourceSystemsSelector/SourceSystemsSelector.test.js +2 -2
- package/cjs/UserSelector/UserSelector.js +1 -1
- package/cjs/UserSelector/UserSelector.specs.js +1 -1
- package/cjs/constants/reactSelect.d.ts +1 -1
- package/cjs/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +4 -4
- package/cjs/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.js +1 -1
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.js +1 -1
- package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.js +1 -1
- package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +2 -2
- package/cjs/features/activity-log/RelationObject/styles.d.ts +1 -1
- package/cjs/features/history/HistoryActivitySelector/HistoryActivitySelector.js +1 -1
- package/cjs/features/history/HistoryActivitySelector/HistoryActivitySelector.specs.js +3 -3
- package/cjs/features/history/HistoryFilterButton/HistoryFilterButton.test.js +6 -6
- package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +6 -6
- package/cjs/features/workflow/ReassignButton/ReassignButton.spec.js +2 -2
- package/cjs/types/index.d.ts +40 -0
- package/esm/AsyncReactSelect/AsyncReactSelect.d.ts +1 -1
- package/esm/AttributeSelector/AttributeSelector.js +1 -2
- package/esm/AttributeSelector/AttributeSelector.specs.js +1 -1
- package/esm/AttributesFilterSelector/AttributesFilterSelector.test.js +2 -2
- package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +3 -3
- package/esm/ConnectionEditor/ConnectionEditor.test.js +4 -4
- package/esm/CreatableReactSelect/CreatableReactSelect.d.ts +1 -1
- package/esm/DependentLookupEditor/DependentLookupEditor.test.js +12 -12
- package/esm/EditModeAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +1 -1
- package/esm/EntitySelector/EntitySelector.test.js +2 -2
- package/esm/EntitySelector/components/Group/Group.test.js +1 -0
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.d.ts +2 -10
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectClearIndicator/ReactSelectClearIndicator.js +2 -2
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.d.ts +3 -17
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.js +0 -28
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.d.ts +4 -14
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectDropdownIndicator/ReactSelectDropdownIndicator.js +1 -12
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.d.ts +3 -12
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectGroupHeading/ReactSelectGroupHeading.js +0 -9
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.d.ts +4 -11
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectMenu/ReactSelectMenu.js +0 -14
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.d.ts +9 -8
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectNoOptionsMessage/ReactSelectNoOptionsMessage.js +0 -5
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.d.ts +4 -9
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.js +2 -19
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.d.ts +4 -9
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.js +0 -6
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.d.ts +3 -9
- package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectValueContainer/ReactSelectValueContainer.js +0 -6
- package/esm/HOCs/withReactSelectMuiSkin/helpers.d.ts +13 -88
- package/esm/HOCs/withReactSelectMuiSkin/styles.d.ts +1 -1
- package/esm/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.d.ts +4 -3
- package/esm/MatchRulesSelector/MatchRulesSelector.test.js +4 -4
- package/esm/MultiSelect/MultiSelect.js +2 -2
- package/esm/MultiValueSelector/MultiValueSelector.js +2 -2
- package/esm/ReactSelect/ReactSelect.d.ts +1 -1
- package/esm/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.js +1 -1
- package/esm/RelationEditor/IntegrationRelationEditor.test.js +5 -5
- package/esm/RolesEditor/RolesEditor.test.js +2 -2
- package/esm/SimpleAttributeEditor/SimpleAttributeEditor.test.js +2 -2
- package/esm/SourceSystemsSelector/SourceSystemsSelector.test.js +2 -2
- package/esm/UserSelector/UserSelector.js +2 -2
- package/esm/UserSelector/UserSelector.specs.js +1 -1
- package/esm/constants/reactSelect.d.ts +1 -1
- package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +4 -4
- package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.js +2 -2
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.js +2 -2
- package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.js +2 -2
- package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +2 -2
- package/esm/features/activity-log/RelationObject/styles.d.ts +1 -1
- package/esm/features/history/HistoryActivitySelector/HistoryActivitySelector.js +2 -2
- package/esm/features/history/HistoryActivitySelector/HistoryActivitySelector.specs.js +3 -3
- package/esm/features/history/HistoryFilterButton/HistoryFilterButton.test.js +6 -6
- package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +6 -6
- package/esm/features/workflow/ReassignButton/ReassignButton.spec.js +2 -2
- package/esm/types/index.d.ts +40 -0
- package/package.json +3 -3
package/cjs/types/index.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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('
|
|
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('
|
|
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('
|
|
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).
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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:
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
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('
|
|
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('
|
|
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('
|
|
475
|
+
expect(wrapper.find('Input').prop('value')).toBe('');
|
|
476
476
|
});
|
|
477
477
|
});
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconButtonProps } from '@mui/material/IconButton';
|
|
3
|
-
|
|
4
|
-
|
|
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 (
|
|
16
|
-
var
|
|
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
|
};
|
package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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;
|
package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectPlaceholder/ReactSelectPlaceholder.js
CHANGED
|
@@ -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,
|
|
17
|
-
return (React.createElement(Typography,
|
|
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
|
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 { SingleValueWithMuiSkinProps } from '../../../../types';
|
|
4
|
+
export declare const ReactSelectSingleValue: (props: SingleValueWithMuiSkinProps<TypographyProps>) => JSX.Element;
|