@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.
- 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/activity-log/hooks/useActivitiesLoader.js +5 -2
- 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/activity-log/hooks/useActivitiesLoader.js +6 -3
- 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
|
@@ -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;
|
package/esm/HOCs/withReactSelectMuiSkin/components/ReactSelectSingleValue/ReactSelectSingleValue.js
CHANGED
|
@@ -10,14 +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 Typography from '@mui/material/Typography';
|
|
15
14
|
export var ReactSelectSingleValue = function (props) {
|
|
16
15
|
var classes = props.selectProps.classes, innerProps = props.innerProps, children = props.children;
|
|
17
16
|
return (React.createElement(Typography, __assign({ className: classes.singleValue }, innerProps), children));
|
|
18
17
|
};
|
|
19
|
-
ReactSelectSingleValue.propTypes = {
|
|
20
|
-
children: PropTypes.node,
|
|
21
|
-
innerProps: PropTypes.object,
|
|
22
|
-
selectProps: PropTypes.object.isRequired
|
|
23
|
-
};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
5
|
-
let selectProps: PropTypes.Validator<object>;
|
|
6
|
-
let isMulti: PropTypes.Requireable<boolean>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ValueContainerWithMuiSkinProps } from '../../../../types';
|
|
3
|
+
export declare const ReactSelectValueContainer: (props: ValueContainerWithMuiSkinProps) => JSX.Element;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import classnames from 'classnames';
|
|
4
3
|
export var ReactSelectValueContainer = function (props) {
|
|
5
4
|
var _a;
|
|
6
5
|
var classes = props.selectProps.classes, children = props.children, isMulti = props.isMulti;
|
|
7
6
|
return (React.createElement("div", { className: classnames(classes.valueContainer, (_a = {}, _a[classes['valueContainer--multi']] = isMulti, _a)) }, children));
|
|
8
7
|
};
|
|
9
|
-
ReactSelectValueContainer.propTypes = {
|
|
10
|
-
children: PropTypes.node,
|
|
11
|
-
selectProps: PropTypes.object.isRequired,
|
|
12
|
-
isMulti: PropTypes.bool
|
|
13
|
-
};
|
|
@@ -1,63 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const reactSelectComponents: {
|
|
3
|
-
ClearIndicator: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
}) => JSX.Element;
|
|
11
|
-
Control: {
|
|
12
|
-
(props: any): JSX.Element;
|
|
13
|
-
propTypes: {
|
|
14
|
-
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
15
|
-
innerProps: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
16
|
-
onMouseDown: import("prop-types").Validator<(...args: any[]) => any>;
|
|
17
|
-
}>>>;
|
|
18
|
-
innerRef: import("prop-types").Validator<any>;
|
|
19
|
-
selectProps: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
20
|
-
classes: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
21
|
-
control: import("prop-types").Validator<string>;
|
|
22
|
-
}>>;
|
|
23
|
-
TextFieldProps: import("prop-types").Requireable<object>;
|
|
24
|
-
}>>;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
DropdownIndicator: {
|
|
28
|
-
(props: any): JSX.Element;
|
|
29
|
-
propTypes: {
|
|
30
|
-
innerProps: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
31
|
-
onMouseDown: import("prop-types").Validator<(...args: any[]) => any>;
|
|
32
|
-
onTouchEnd: import("prop-types").Validator<(...args: any[]) => any>;
|
|
33
|
-
'aria-hidden': import("prop-types").Validator<string>;
|
|
34
|
-
}>>>;
|
|
35
|
-
selectProps: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
36
|
-
classes: import("prop-types").Validator<object>;
|
|
37
|
-
}>>>;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
GroupHeading: {
|
|
41
|
-
(props: any): JSX.Element;
|
|
42
|
-
propTypes: {
|
|
43
|
-
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
44
|
-
selectProps: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
45
|
-
classes: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
46
|
-
groupHeading: import("prop-types").Requireable<string>;
|
|
47
|
-
}>>;
|
|
48
|
-
}>>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
Menu: {
|
|
52
|
-
(props: any): JSX.Element;
|
|
53
|
-
propTypes: {
|
|
54
|
-
children: import("prop-types").Validator<import("prop-types").ReactElementLike>;
|
|
55
|
-
innerProps: import("prop-types").Validator<object>;
|
|
56
|
-
selectProps: import("prop-types").Validator<object>;
|
|
57
|
-
innerRef: import("prop-types").Requireable<any>;
|
|
58
|
-
getStyles: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
3
|
+
ClearIndicator: (props: import("../..").ClearIndicatorWithMuiSkinProps<import("@mui/material").IconButtonProps>) => JSX.Element;
|
|
4
|
+
Control: (props: import("../..").ControlWithMuiSkinProps<import("react").HTMLAttributes<HTMLInputElement>>) => JSX.Element;
|
|
5
|
+
DropdownIndicator: (props: import("../..").DropdownIndicatorWithMuiSkinProps<import("@mui/material").IconButtonProps>) => JSX.Element;
|
|
6
|
+
GroupHeading: (props: import("../..").GroupHeadingWithMuiSkinProps) => JSX.Element;
|
|
7
|
+
Menu: (props: import("../..").MenuWithMuiSkinProps<import("@mui/material").PaperProps>) => JSX.Element;
|
|
61
8
|
MultiValue: {
|
|
62
9
|
(props: any): JSX.Element;
|
|
63
10
|
propTypes: {
|
|
@@ -71,13 +18,12 @@ export declare const reactSelectComponents: {
|
|
|
71
18
|
selectProps: import("prop-types").Validator<object>;
|
|
72
19
|
};
|
|
73
20
|
};
|
|
74
|
-
NoOptionsMessage: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
selectProps: import("prop-types").Validator<object>;
|
|
21
|
+
NoOptionsMessage: (props: {
|
|
22
|
+
children: import("react").ReactNode;
|
|
23
|
+
selectProps: {
|
|
24
|
+
classes: Record<string, string>;
|
|
79
25
|
};
|
|
80
|
-
};
|
|
26
|
+
}) => JSX.Element;
|
|
81
27
|
Option: {
|
|
82
28
|
(props: any): JSX.Element;
|
|
83
29
|
propTypes: {
|
|
@@ -102,28 +48,7 @@ export declare const reactSelectComponents: {
|
|
|
102
48
|
}>>;
|
|
103
49
|
};
|
|
104
50
|
};
|
|
105
|
-
Placeholder:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
109
|
-
innerProps: import("prop-types").Requireable<object>;
|
|
110
|
-
selectProps: import("prop-types").Validator<object>;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
SingleValue: {
|
|
114
|
-
(props: any): JSX.Element;
|
|
115
|
-
propTypes: {
|
|
116
|
-
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
117
|
-
innerProps: import("prop-types").Requireable<object>;
|
|
118
|
-
selectProps: import("prop-types").Validator<object>;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
ValueContainer: {
|
|
122
|
-
(props: any): JSX.Element;
|
|
123
|
-
propTypes: {
|
|
124
|
-
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
125
|
-
selectProps: import("prop-types").Validator<object>;
|
|
126
|
-
isMulti: import("prop-types").Requireable<boolean>;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
51
|
+
Placeholder: (props: import("../..").PlaceholderWithMuiSkinProps<import("@mui/material").TypographyProps>) => JSX.Element;
|
|
52
|
+
SingleValue: (props: import("../..").SingleValueWithMuiSkinProps<import("@mui/material").TypographyProps>) => JSX.Element;
|
|
53
|
+
ValueContainer: (props: import("../..").ValueContainerWithMuiSkinProps) => JSX.Element;
|
|
129
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"menu" | "placeholder" | "option" | "singleValue" | "dropdownIndicator" | "control" | "option--selected" | "option--item" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"menu" | "placeholder" | "option" | "singleValue" | "dropdownIndicator" | "control" | "option--selected" | "option--item" | "clearIndicator" | "groupHeading" | "multiValue" | "noOptionsMessage" | "valueContainer" | "multiValue__label" | "valueContainer--multi">;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { Props, GroupBase } from 'react-select';
|
|
3
|
+
import { ReactSelectMuiSkinProps } from '../../types';
|
|
4
|
+
export declare const withReactSelectMuiSkin: <Option, IsMulti extends boolean, Group extends GroupBase<Option> = GroupBase<Option>>(SelectComponent: any) => {
|
|
5
|
+
(props: Omit<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<Option, IsMulti, Group>, "onChange" | "value" | "onMenuClose" | "onMenuOpen" | "menuIsOpen" | "inputValue" | "onInputChange"> & Partial<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<Option, IsMulti, Group>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & ReactSelectMuiSkinProps): JSX.Element;
|
|
5
6
|
displayName: string;
|
|
6
7
|
defaultProps: {
|
|
7
8
|
components: {};
|
|
@@ -101,10 +101,10 @@ describe('MatchRulesSelector tests', function () {
|
|
|
101
101
|
switch (_a.label) {
|
|
102
102
|
case 0:
|
|
103
103
|
user = setUp().user;
|
|
104
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
104
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
105
105
|
case 1:
|
|
106
106
|
_a.sent();
|
|
107
|
-
expect(screen.getAllByRole('
|
|
107
|
+
expect(screen.getAllByRole('option')).toHaveLength(2);
|
|
108
108
|
screen.getByText('matchRule1');
|
|
109
109
|
screen.getByText('matchRule2');
|
|
110
110
|
return [2 /*return*/];
|
|
@@ -118,10 +118,10 @@ describe('MatchRulesSelector tests', function () {
|
|
|
118
118
|
case 0:
|
|
119
119
|
props = __assign(__assign({}, defaultProps), { name: MatchRulesAttrNames.MLRecommendedMatch });
|
|
120
120
|
user = setUp(props).user;
|
|
121
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
121
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
122
122
|
case 1:
|
|
123
123
|
_a.sent();
|
|
124
|
-
expect(screen.getAllByRole('
|
|
124
|
+
expect(screen.getAllByRole('option')).toHaveLength(2);
|
|
125
125
|
screen.getByText('MLmatchRule1');
|
|
126
126
|
screen.getByText('MLmatchRule2');
|
|
127
127
|
return [2 /*return*/];
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React, { useState, useRef } from 'react';
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
|
-
import { omit,
|
|
25
|
+
import { omit, prop } from 'ramda';
|
|
26
26
|
import { CreatableReactSelect } from '../CreatableReactSelect';
|
|
27
27
|
import { ReactSelect } from '../ReactSelect';
|
|
28
28
|
import { AsyncReactSelect } from '../AsyncReactSelect';
|
|
@@ -33,7 +33,7 @@ import { useStyles } from './styles';
|
|
|
33
33
|
var getControlRef = function (innerRef) {
|
|
34
34
|
var controlRef = {};
|
|
35
35
|
if (innerRef.current) {
|
|
36
|
-
controlRef.current =
|
|
36
|
+
controlRef.current = prop('controlRef', innerRef.current);
|
|
37
37
|
}
|
|
38
38
|
return controlRef;
|
|
39
39
|
};
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React, { memo, useCallback, useRef, useMemo } from 'react';
|
|
24
|
-
import {
|
|
24
|
+
import { pipe, pluck } from 'ramda';
|
|
25
25
|
import { isEmptyValue } from '@reltio/mdm-sdk';
|
|
26
26
|
import { ReactSelectDropdownIndicatorWithIconButton } from '../ReactSelectDropdownIndicatorWithIconButton';
|
|
27
27
|
import { ReactSelectOptionWithCheckIcon } from '../ReactSelectOptionWithCheckIcon';
|
|
@@ -37,7 +37,7 @@ var MultiValueSelector = function (_a) {
|
|
|
37
37
|
var valueToOption = useCallback(function (value) { return options.find(function (option) { return option.value === value; }) || { value: value, label: value }; }, [options]);
|
|
38
38
|
var preparedValues = useMemo(function () { return values.map(valueToOption); }, [valueToOption, values]);
|
|
39
39
|
var _d = TextFieldProps.InputProps, InputProps = _d === void 0 ? {} : _d, textFieldClassName = TextFieldProps.className, otherTextFieldProps = __rest(TextFieldProps, ["InputProps", "className"]);
|
|
40
|
-
return (React.createElement(MultiSelect, { value: preparedValues, onChange: pipe(
|
|
40
|
+
return (React.createElement(MultiSelect, { value: preparedValues, onChange: pipe(pluck('value'), onChange), options: options, TextFieldProps: __assign({ InputProps: __assign({ disableUnderline: isEmptyValue(values) }, InputProps), variant: 'filled', className: textFieldClassName, ref: inputRef }, otherTextFieldProps), components: {
|
|
41
41
|
DropdownIndicator: ReactSelectDropdownIndicatorWithIconButton,
|
|
42
42
|
Option: ReactSelectOptionWithCheckIcon,
|
|
43
43
|
Menu: ReactSelectMenuWithPopper,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ReactSelect: {
|
|
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: {};
|
|
@@ -172,7 +172,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
172
172
|
switch (_a.label) {
|
|
173
173
|
case 0:
|
|
174
174
|
user = setUp().user;
|
|
175
|
-
inputs = screen.getAllByRole('
|
|
175
|
+
inputs = screen.getAllByRole('combobox');
|
|
176
176
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
177
177
|
case 1:
|
|
178
178
|
_a.sent();
|
|
@@ -195,7 +195,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
195
195
|
props = __assign(__assign({}, defaultProps), { mode: Mode.Suggesting });
|
|
196
196
|
mdmValues = __assign(__assign({}, defaultMdmValues), { entity: __assign(__assign({}, defaultEntity), { uri: 'entities/123' }) });
|
|
197
197
|
user = setUp({ props: props, mdmValues: mdmValues }).user;
|
|
198
|
-
inputs = screen.getAllByRole('
|
|
198
|
+
inputs = screen.getAllByRole('combobox');
|
|
199
199
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
200
200
|
case 1:
|
|
201
201
|
_a.sent();
|
|
@@ -233,7 +233,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
233
233
|
props = __assign(__assign({}, defaultProps), { mode: Mode.Suggesting });
|
|
234
234
|
mdmValues = __assign(__assign({}, defaultMdmValues), { uiConfigProfile: uiConfigProfile });
|
|
235
235
|
user = setUp({ props: props, mdmValues: mdmValues }).user;
|
|
236
|
-
inputs = screen.getAllByRole('
|
|
236
|
+
inputs = screen.getAllByRole('combobox');
|
|
237
237
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
238
238
|
case 1:
|
|
239
239
|
_a.sent();
|
|
@@ -249,7 +249,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
249
249
|
case 0:
|
|
250
250
|
props = __assign(__assign({}, defaultProps), { mode: Mode.Suggesting });
|
|
251
251
|
user = setUp({ props: props }).user;
|
|
252
|
-
inputs = screen.getAllByRole('
|
|
252
|
+
inputs = screen.getAllByRole('combobox');
|
|
253
253
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
254
254
|
case 1:
|
|
255
255
|
_a.sent();
|
|
@@ -267,7 +267,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
267
267
|
'entities/uri$$123': ['configuration/relationTypes/HasAddress/attributes/Active']
|
|
268
268
|
};
|
|
269
269
|
user = setUp({ hiddenAttributes: hiddenAttributes }).user;
|
|
270
|
-
inputs = screen.getAllByRole('
|
|
270
|
+
inputs = screen.getAllByRole('combobox');
|
|
271
271
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
272
272
|
case 1:
|
|
273
273
|
_a.sent();
|
|
@@ -127,7 +127,7 @@ describe('RolesEditor tests', function () {
|
|
|
127
127
|
switch (_a.label) {
|
|
128
128
|
case 0:
|
|
129
129
|
user = setUp().user;
|
|
130
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
130
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
131
131
|
case 1:
|
|
132
132
|
_a.sent();
|
|
133
133
|
expect(screen.queryByText('Pharmacy')).not.toBeInTheDocument();
|
|
@@ -172,7 +172,7 @@ describe('RolesEditor tests', function () {
|
|
|
172
172
|
onChange = defaultProps.onChange;
|
|
173
173
|
props = __assign(__assign({}, defaultProps), { values: [] });
|
|
174
174
|
user = setUp(props).user;
|
|
175
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
175
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
176
176
|
case 1:
|
|
177
177
|
_a.sent();
|
|
178
178
|
return [4 /*yield*/, user.click(screen.getByText('Practice Manager'))];
|
|
@@ -414,7 +414,7 @@ describe('SimpleAttributeEditor', function () {
|
|
|
414
414
|
case 1:
|
|
415
415
|
_a.sent();
|
|
416
416
|
expect(screen.getByText('Some placeholder')).toBeDefined();
|
|
417
|
-
input = screen.getByRole('
|
|
417
|
+
input = screen.getByRole('combobox');
|
|
418
418
|
expect(input).toBeDefined();
|
|
419
419
|
expect(input.getAttribute('value')).toBe('');
|
|
420
420
|
expect(input.hasAttribute('disabled')).toBe(true);
|
|
@@ -445,7 +445,7 @@ describe('SimpleAttributeEditor', function () {
|
|
|
445
445
|
return [4 /*yield*/, setUp()];
|
|
446
446
|
case 1:
|
|
447
447
|
user = (_a.sent()).user;
|
|
448
|
-
input = screen.getByRole('
|
|
448
|
+
input = screen.getByRole('combobox');
|
|
449
449
|
expect(input).toBeDefined();
|
|
450
450
|
return [4 /*yield*/, user.clear(input)];
|
|
451
451
|
case 2:
|
|
@@ -83,7 +83,7 @@ describe('SourceSystemsSelector tests', function () {
|
|
|
83
83
|
switch (_a.label) {
|
|
84
84
|
case 0:
|
|
85
85
|
user = setUp().user;
|
|
86
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
86
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
87
87
|
case 1:
|
|
88
88
|
_a.sent();
|
|
89
89
|
screen.getByText('A');
|
|
@@ -104,7 +104,7 @@ describe('SourceSystemsSelector tests', function () {
|
|
|
104
104
|
case 0:
|
|
105
105
|
onChange = defaultProps.onChange;
|
|
106
106
|
user = setUp().user;
|
|
107
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
107
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
108
108
|
case 1:
|
|
109
109
|
_a.sent();
|
|
110
110
|
return [4 /*yield*/, user.click(screen.getByText('A'))];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
|
-
import {
|
|
3
|
+
import { pipe, pluck } from 'ramda';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import { getAllUsersForTenant, utils } from '@reltio/mdm-sdk';
|
|
@@ -29,7 +29,7 @@ export var UserSelector = function (_a) {
|
|
|
29
29
|
};
|
|
30
30
|
return (React.createElement("div", { className: classnames(styles.root, className), "data-reltio-id": "user-selector" },
|
|
31
31
|
React.createElement(Typography, { className: styles.title, variant: 'subtitle1' }, i18n.text('User')),
|
|
32
|
-
React.createElement(MultiSelect, { value: prepareValues(selectedUsers), onChange: pipe(
|
|
32
|
+
React.createElement(MultiSelect, { value: prepareValues(selectedUsers), onChange: pipe(pluck('value'), onChange), defaultOptions: true, getOptions: getOptions, TextFieldProps: {
|
|
33
33
|
InputProps: { disableUnderline: disableUnderline },
|
|
34
34
|
className: styles.dropDownInput,
|
|
35
35
|
ref: inputRef
|
|
@@ -87,7 +87,7 @@ describe('UserSelector tests', function () {
|
|
|
87
87
|
onChange = defaultProps.onChange;
|
|
88
88
|
user = setUp().user;
|
|
89
89
|
screen.getByText('User');
|
|
90
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
90
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
91
91
|
case 1:
|
|
92
92
|
_a.sent();
|
|
93
93
|
users.forEach(function (_a) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const ReactSelectOptionFilters: {
|
|
2
|
-
BY_LABEL: (option: import("react-select/src/filters").
|
|
2
|
+
BY_LABEL: (option: import("react-select/dist/declarations/src/filters").FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
3
3
|
};
|
|
@@ -183,7 +183,7 @@ describe('ActivityFilterEditor tests', function () {
|
|
|
183
183
|
entityType = metadata.entityTypes[1];
|
|
184
184
|
user = setUp({ value: filterValue, entityType: entityType }).user;
|
|
185
185
|
attributeSelector = screen.getByTestId('attribute-selector');
|
|
186
|
-
return [4 /*yield*/, user.click(within(attributeSelector).getByRole('
|
|
186
|
+
return [4 /*yield*/, user.click(within(attributeSelector).getByRole('combobox'))];
|
|
187
187
|
case 1:
|
|
188
188
|
_a.sent();
|
|
189
189
|
return [4 /*yield*/, user.click(screen.getByRole('menuitem', { name: 'Activity' }))];
|
|
@@ -205,10 +205,10 @@ describe('ActivityFilterEditor tests', function () {
|
|
|
205
205
|
filterValue = __assign(__assign({}, value), { activities: [ActivityTypes.ENTITY_CHANGED] });
|
|
206
206
|
user = setUp({ value: filterValue }).user;
|
|
207
207
|
entityTypeSelector = screen.getByTestId('entity-types-selector');
|
|
208
|
-
return [4 /*yield*/, user.click(within(entityTypeSelector).getByRole('
|
|
208
|
+
return [4 /*yield*/, user.click(within(entityTypeSelector).getByRole('combobox'))];
|
|
209
209
|
case 1:
|
|
210
210
|
_a.sent();
|
|
211
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
211
|
+
return [4 /*yield*/, user.click(screen.getByRole('option', { name: 'HCA' }))];
|
|
212
212
|
case 2:
|
|
213
213
|
_a.sent();
|
|
214
214
|
newEntityTypes = [metadata.entityTypes[1]];
|
|
@@ -229,7 +229,7 @@ describe('ActivityFilterEditor tests', function () {
|
|
|
229
229
|
entityType = { uri: 'test', attributes: [] };
|
|
230
230
|
user = setUp({ value: filterValue, entityType: entityType }).user;
|
|
231
231
|
activitySelector = screen.getByTestId('activity-selector');
|
|
232
|
-
textbox = within(activitySelector).getByRole('
|
|
232
|
+
textbox = within(activitySelector).getByRole('combobox');
|
|
233
233
|
return [4 /*yield*/, user.click(textbox)];
|
|
234
234
|
case 1:
|
|
235
235
|
_a.sent();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
|
-
import {
|
|
3
|
+
import { pipe, pluck, sortBy } from 'ramda';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import { MultiSelect } from '../../../../../MultiSelect';
|
|
@@ -17,7 +17,7 @@ export var ActivitySelector = function (_a) {
|
|
|
17
17
|
var options = pipe(sortBy(function (option) { return getActivityLabel(option); }), prepareValues)(activityTypes);
|
|
18
18
|
return (React.createElement("div", { className: styles.selectorWrapper, "data-reltio-id": "activity-selector" },
|
|
19
19
|
React.createElement(Typography, { className: classnames(styles.filterSubtitle, styles.labels), variant: 'subtitle1' }, i18n.text('Activity')),
|
|
20
|
-
React.createElement(MultiSelect, { value: prepareValues(selectedActivityTypes), onChange: pipe(
|
|
20
|
+
React.createElement(MultiSelect, { value: prepareValues(selectedActivityTypes), onChange: pipe(pluck('value'), onChange), options: options, TextFieldProps: {
|
|
21
21
|
InputProps: { disableUnderline: true },
|
|
22
22
|
classes: { root: styles.dropDownInput }
|
|
23
23
|
}, components: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import {
|
|
4
|
+
import { pipe, pluck, sortBy } from 'ramda';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import { MultiSelect } from '../../../../../MultiSelect';
|
|
7
7
|
import { ReactSelectDropdownIndicatorWithIconButton } from '../../../../../ReactSelectDropdownIndicatorWithIconButton';
|
|
@@ -14,7 +14,7 @@ export var EntityTypesSelector = function (_a) {
|
|
|
14
14
|
var options = pipe(sortBy(function (option) { return option.label; }), prepareValues)(entityTypes);
|
|
15
15
|
return (React.createElement("div", { className: styles.selectorWrapper, "data-reltio-id": "entity-types-selector" },
|
|
16
16
|
React.createElement(Typography, { className: classnames(styles.filterSubtitle, styles.labels), variant: 'subtitle1' }, i18n.text('Type')),
|
|
17
|
-
React.createElement(MultiSelect, { value: prepareValues(selectedEntityTypes), onChange: pipe(
|
|
17
|
+
React.createElement(MultiSelect, { value: prepareValues(selectedEntityTypes), onChange: pipe(pluck('entityType'), onChange), options: options, TextFieldProps: {
|
|
18
18
|
InputProps: { disableUnderline: true },
|
|
19
19
|
classes: { root: styles.dropDownInput }
|
|
20
20
|
}, components: {
|
package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import {
|
|
4
|
+
import { sortBy, prop } from 'ramda';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import { MultiSelect } from '../../../../../MultiSelect';
|
|
7
7
|
import { ReactSelectDropdownIndicatorWithIconButton } from '../../../../../ReactSelectDropdownIndicatorWithIconButton';
|
|
@@ -14,7 +14,7 @@ export var SourceSelector = function (_a) {
|
|
|
14
14
|
var options = sortBy(function (option) { return option.label; })(metadata.sources);
|
|
15
15
|
return (React.createElement("div", { className: styles.selectorWrapper, "data-reltio-id": "source-selector" },
|
|
16
16
|
React.createElement(Typography, { className: classnames(styles.filterSubtitle, styles.labels), variant: 'subtitle1' }, i18n.text('Source')),
|
|
17
|
-
React.createElement(MultiSelect, { value: selectedSources, onChange:
|
|
17
|
+
React.createElement(MultiSelect, { value: selectedSources, onChange: onChange, options: options, TextFieldProps: {
|
|
18
18
|
InputProps: { disableUnderline: true },
|
|
19
19
|
classes: { root: styles.dropDownInput }
|
|
20
20
|
}, components: {
|
|
@@ -95,7 +95,7 @@ describe('Source selector tests', function () {
|
|
|
95
95
|
onChange = defaultProps.onChange;
|
|
96
96
|
user = setUp().user;
|
|
97
97
|
screen.getByText('Source');
|
|
98
|
-
input = screen.getByRole('
|
|
98
|
+
input = screen.getByRole('combobox');
|
|
99
99
|
return [4 /*yield*/, user.click(input)];
|
|
100
100
|
case 1:
|
|
101
101
|
_b.sent();
|
|
@@ -106,7 +106,7 @@ describe('Source selector tests', function () {
|
|
|
106
106
|
case 2:
|
|
107
107
|
_b.sent();
|
|
108
108
|
_a = defaultMetadata.sources, sources = _a === void 0 ? [] : _a;
|
|
109
|
-
expect(onChange).toHaveBeenCalledWith([sources[0]]);
|
|
109
|
+
expect(onChange).toHaveBeenCalledWith([sources[0]], expect.any(Object));
|
|
110
110
|
return [2 /*return*/];
|
|
111
111
|
}
|
|
112
112
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "delimiter" | "relationship">;
|
|
@@ -35,19 +35,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { useCallback, useContext } from 'react';
|
|
38
|
-
import { getActivities, getActivitiesTotal } from '@reltio/mdm-sdk';
|
|
38
|
+
import { addMetadataSpecificGetActivitiesOptions, getActivities, getActivitiesTotal } from '@reltio/mdm-sdk';
|
|
39
39
|
import { buildActivitiesFilterString } from '../utils/filters';
|
|
40
40
|
import { PageRequestsAbortingContext } from '../../../contexts/PageRequestsAbortingContext';
|
|
41
|
+
import { useMdmMetadata } from '../../../contexts/MdmModuleContext/hooks';
|
|
41
42
|
export var useActivitiesLoader = function (_a) {
|
|
42
43
|
var filter = _a.filter, max = _a.max, offset = _a.offset;
|
|
43
44
|
var signal = useContext(PageRequestsAbortingContext);
|
|
45
|
+
var metadata = useMdmMetadata();
|
|
44
46
|
return useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
|
-
var filterString, data, total;
|
|
47
|
+
var filterString, options, data, total;
|
|
46
48
|
return __generator(this, function (_a) {
|
|
47
49
|
switch (_a.label) {
|
|
48
50
|
case 0:
|
|
49
51
|
filterString = buildActivitiesFilterString(filter);
|
|
50
|
-
|
|
52
|
+
options = addMetadataSpecificGetActivitiesOptions(metadata, { filter: filterString, max: max, offset: offset });
|
|
53
|
+
return [4 /*yield*/, getActivities(options, signal)];
|
|
51
54
|
case 1:
|
|
52
55
|
data = _a.sent();
|
|
53
56
|
return [4 /*yield*/, getActivitiesTotal({ filter: filterString }, signal)];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
|
-
import {
|
|
3
|
+
import { pipe, pluck } from 'ramda';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import { ReactSelectDropdownIndicatorWithIconButton } from '../../../ReactSelectDropdownIndicatorWithIconButton';
|
|
@@ -15,7 +15,7 @@ export var HistoryActivitySelector = function (_a) {
|
|
|
15
15
|
var options = prepareValues(historyActivityOptions);
|
|
16
16
|
return (React.createElement("div", { className: classnames(styles.root, className), "data-reltio-id": "history-activity-selector" },
|
|
17
17
|
React.createElement(Typography, { className: styles.title, variant: 'subtitle1' }, i18n.text('Activity')),
|
|
18
|
-
React.createElement(MultiSelect, { value: prepareValues(selectedHistoryActivityTypes), onChange: pipe(
|
|
18
|
+
React.createElement(MultiSelect, { value: prepareValues(selectedHistoryActivityTypes), onChange: pipe(pluck('value'), onChange), options: options, TextFieldProps: {
|
|
19
19
|
InputProps: { disableUnderline: disableUnderline },
|
|
20
20
|
classes: { root: styles.dropDownInput }
|
|
21
21
|
}, components: {
|
|
@@ -72,10 +72,10 @@ describe('HistoryActivitySelector tests', function () {
|
|
|
72
72
|
user = userEvent.setup();
|
|
73
73
|
render(React.createElement(HistoryActivitySelector, __assign({}, props)));
|
|
74
74
|
expect(screen.getByText('Activity')).toBeInTheDocument();
|
|
75
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
75
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
76
76
|
case 1:
|
|
77
77
|
_a.sent();
|
|
78
|
-
menuItems = screen.getAllByRole('
|
|
78
|
+
menuItems = screen.getAllByRole('option');
|
|
79
79
|
expect(menuItems).toHaveLength(3);
|
|
80
80
|
menuItems.forEach(function (item, i) {
|
|
81
81
|
expect(item).toHaveTextContent(activityOptions[i].label);
|
|
@@ -83,7 +83,7 @@ describe('HistoryActivitySelector tests', function () {
|
|
|
83
83
|
return [4 /*yield*/, user.click(menuItems[1])];
|
|
84
84
|
case 2:
|
|
85
85
|
_a.sent();
|
|
86
|
-
return [4 /*yield*/, user.click(screen.getByRole('
|
|
86
|
+
return [4 /*yield*/, user.click(screen.getByRole('combobox'))];
|
|
87
87
|
case 3:
|
|
88
88
|
_a.sent();
|
|
89
89
|
expect(props.onChange).toHaveBeenCalledWith([HistoryActivityType.UPDATE, HistoryActivityType.MERGE]);
|