@reltio/components 1.4.1602 → 1.4.1604
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/HOCs/index.d.ts +2 -0
- package/cjs/HOCs/index.js +5 -1
- package/cjs/HOCs/withDateRangeSelector/helpers.d.ts +8 -0
- package/cjs/HOCs/withDateRangeSelector/helpers.js +21 -0
- package/cjs/HOCs/withDateRangeSelector/styles.d.ts +1 -0
- package/cjs/HOCs/withDateRangeSelector/styles.js +18 -0
- package/cjs/HOCs/withDateRangeSelector/withDateRangeSelector.d.ts +19 -0
- package/cjs/HOCs/withDateRangeSelector/withDateRangeSelector.js +114 -0
- package/cjs/HOCs/withDragHandle/styles.d.ts +1 -0
- package/cjs/HOCs/withDragHandle/styles.js +43 -0
- package/cjs/HOCs/withDragHandle/withDragHandle.d.ts +6 -0
- package/cjs/HOCs/withDragHandle/withDragHandle.js +33 -0
- package/cjs/components/ActionButton/styles.d.ts +1 -1
- package/cjs/components/AttributeSelector/AttributeSelector.js +2 -2
- package/cjs/components/BasicTableView/BasicTablePagination/BasicTablePagination.d.ts +15 -26
- package/cjs/components/BasicTableView/BasicTablePagination/BasicTablePagination.js +5 -16
- package/cjs/components/BasicTableView/BasicTablePagination/styles.d.ts +1 -1
- package/cjs/components/BasicTableView/BasicTablePagination/styles.js +20 -1
- package/cjs/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +1 -0
- package/cjs/components/BasicView/BasicView.d.ts +1 -1
- package/cjs/components/CollaborationItem/SendMessageArea/styles.d.ts +1 -1
- package/cjs/components/ConfirmationDialog/styles.d.ts +1 -1
- package/cjs/components/DateRangePicker/DateRangePicker.d.ts +0 -1
- package/cjs/components/DateRangePicker/DateRangePicker.js +9 -12
- package/cjs/components/DateRangePicker/styles.d.ts +1 -1
- package/cjs/components/DateRangePicker/styles.js +3 -29
- package/cjs/components/DropDownMenuButton/styles.d.ts +1 -1
- package/cjs/components/DropDownSelector/styles.d.ts +1 -1
- package/cjs/components/FacetViewHeader/styles.js +0 -2
- package/cjs/components/ImageGalleryDialog/styles.d.ts +1 -1
- package/cjs/components/MetadataTypesSelector/styles.d.ts +1 -1
- package/cjs/components/ModeSwitcherSelect/styles.d.ts +1 -1
- package/cjs/components/MultipleInput/styles.d.ts +1 -1
- package/cjs/components/MultipliableSelect/styles.d.ts +1 -1
- package/cjs/components/Popper/Popper.d.ts +1 -1
- package/cjs/components/PopupWithArrow/styles.d.ts +1 -1
- package/cjs/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/cjs/components/ProfilesList/styles.d.ts +1 -1
- package/cjs/components/ReactSelect/MultiSelect/MultiSelect.d.ts +2 -0
- package/cjs/components/ReactSelect/MultiSelect/MultiSelect.js +2 -0
- package/cjs/components/ReltioGridLayout/styles.js +2 -2
- package/cjs/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.d.ts +2 -2
- package/cjs/components/SmallIconButton/SmallIconButton.d.ts +1 -1
- package/cjs/components/SmallIconButton/index.d.ts +1 -1
- package/cjs/components/UserSelector/UserSelector.js +2 -2
- package/cjs/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +12 -7
- package/cjs/components/activityLog/ActivityFilterEditor/ActivitySelector.js +2 -2
- package/cjs/components/activityLog/ActivityFilterEditor/DateRangeSelector.js +1 -1
- package/cjs/components/activityLog/ActivityFilterEditor/EntityTypesSelector.js +2 -2
- package/cjs/components/activityLog/ActivityFilterEditor/SourceSelector.js +2 -2
- package/cjs/components/activityLog/ActivityFilterEditor/styles.d.ts +2 -1
- package/cjs/components/activityLog/ActivityFilterEditor/styles.js +5 -5
- package/cjs/components/activityLog/ActivityLog/ActivityLog.d.ts +1 -7
- package/cjs/components/activityLog/ActivityLog/ActivityLog.js +10 -12
- package/cjs/components/activityLog/ActivityLog/items/ActivityItem/ActivityItem.js +7 -9
- package/cjs/components/activityLog/ActivityLog/items/ActivityItem/styles.d.ts +1 -1
- package/cjs/components/activityLog/ActivityLog/items/ActivityItem/styles.js +5 -4
- package/cjs/components/activityLog/ActivityLog/items/GroupItem/styles.js +2 -1
- package/cjs/components/activityLog/ActivityLog/styles.js +3 -2
- package/cjs/components/activityLog/ActivityLogFilter/styles.js +4 -3
- package/cjs/components/activityLog/activities/ActivityTitle/styles.js +1 -2
- package/cjs/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
- package/cjs/components/attributes/OvIcon/OvIcon.d.ts +1 -1
- package/cjs/components/attributes/inline/SimpleAttributeEditor/styles.d.ts +1 -1
- package/cjs/components/commonReactSelectComponents/arrowIndicatorStyles.d.ts +1 -1
- package/cjs/components/editors/BooleanRadioEditor/styles.d.ts +1 -1
- package/cjs/components/editors/CustomDateRangeEditor/CustomDateRangeEditor.js +6 -9
- package/cjs/components/editors/CustomDateRangeEditor/styles.d.ts +1 -1
- package/cjs/components/editors/DateEditor/styles.d.ts +1 -1
- package/cjs/components/editors/DateRangeEditor/DateRangeEditor.d.ts +28 -17
- package/cjs/components/editors/DateRangeEditor/DateRangeEditor.js +24 -72
- package/cjs/components/editors/DateRangeEditor/styles.d.ts +1 -1
- package/cjs/components/editors/DateRangeEditor/styles.js +0 -12
- package/cjs/components/editors/TimestampEditor/styles.d.ts +1 -1
- package/cjs/components/history/DateRangeSelector/DateRangeSelector.js +1 -1
- package/cjs/components/history/HistoryActivitySelector/HistoryActivitySelector.d.ts +2 -1
- package/cjs/components/history/HistoryActivitySelector/HistoryActivitySelector.js +7 -4
- package/cjs/components/history/HistoryFilterButton/HistoryFilterButton.js +14 -9
- package/cjs/components/history/HistoryFilterButton/styles.d.ts +1 -1
- package/cjs/components/history/HistoryFilterButton/styles.js +8 -13
- package/cjs/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
- package/cjs/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
- package/cjs/components/history/HistoryMenuButton/styles.d.ts +1 -1
- package/esm/HOCs/index.d.ts +2 -0
- package/esm/HOCs/index.js +2 -0
- package/esm/HOCs/withDateRangeSelector/helpers.d.ts +8 -0
- package/esm/HOCs/withDateRangeSelector/helpers.js +17 -0
- package/esm/HOCs/withDateRangeSelector/styles.d.ts +1 -0
- package/esm/HOCs/withDateRangeSelector/styles.js +15 -0
- package/esm/HOCs/withDateRangeSelector/withDateRangeSelector.d.ts +19 -0
- package/esm/HOCs/withDateRangeSelector/withDateRangeSelector.js +86 -0
- package/esm/HOCs/withDragHandle/styles.d.ts +1 -0
- package/esm/HOCs/withDragHandle/styles.js +40 -0
- package/esm/HOCs/withDragHandle/withDragHandle.d.ts +6 -0
- package/esm/HOCs/withDragHandle/withDragHandle.js +28 -0
- package/esm/components/ActionButton/styles.d.ts +1 -1
- package/esm/components/AttributeSelector/AttributeSelector.js +2 -2
- package/esm/components/BasicTableView/BasicTablePagination/BasicTablePagination.d.ts +15 -26
- package/esm/components/BasicTableView/BasicTablePagination/BasicTablePagination.js +6 -17
- package/esm/components/BasicTableView/BasicTablePagination/styles.d.ts +1 -1
- package/esm/components/BasicTableView/BasicTablePagination/styles.js +20 -1
- package/esm/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +2 -1
- package/esm/components/BasicView/BasicView.d.ts +1 -1
- package/esm/components/CollaborationItem/SendMessageArea/styles.d.ts +1 -1
- package/esm/components/ConfirmationDialog/styles.d.ts +1 -1
- package/esm/components/DateRangePicker/DateRangePicker.d.ts +0 -1
- package/esm/components/DateRangePicker/DateRangePicker.js +9 -12
- package/esm/components/DateRangePicker/styles.d.ts +1 -1
- package/esm/components/DateRangePicker/styles.js +3 -29
- package/esm/components/DropDownMenuButton/styles.d.ts +1 -1
- package/esm/components/DropDownSelector/styles.d.ts +1 -1
- package/esm/components/FacetViewHeader/styles.js +0 -2
- package/esm/components/ImageGalleryDialog/styles.d.ts +1 -1
- package/esm/components/MetadataTypesSelector/styles.d.ts +1 -1
- package/esm/components/ModeSwitcherSelect/styles.d.ts +1 -1
- package/esm/components/MultipleInput/styles.d.ts +1 -1
- package/esm/components/MultipliableSelect/styles.d.ts +1 -1
- package/esm/components/Popper/Popper.d.ts +1 -1
- package/esm/components/PopupWithArrow/styles.d.ts +1 -1
- package/esm/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/esm/components/ProfilesList/styles.d.ts +1 -1
- package/esm/components/ReactSelect/MultiSelect/MultiSelect.d.ts +2 -0
- package/esm/components/ReactSelect/MultiSelect/MultiSelect.js +2 -0
- package/esm/components/ReltioGridLayout/styles.js +2 -2
- package/esm/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.d.ts +2 -2
- package/esm/components/SmallIconButton/SmallIconButton.d.ts +1 -1
- package/esm/components/SmallIconButton/index.d.ts +1 -1
- package/esm/components/UserSelector/UserSelector.js +2 -2
- package/esm/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +12 -7
- package/esm/components/activityLog/ActivityFilterEditor/ActivitySelector.js +2 -2
- package/esm/components/activityLog/ActivityFilterEditor/DateRangeSelector.js +1 -1
- package/esm/components/activityLog/ActivityFilterEditor/EntityTypesSelector.js +2 -2
- package/esm/components/activityLog/ActivityFilterEditor/SourceSelector.js +2 -2
- package/esm/components/activityLog/ActivityFilterEditor/styles.d.ts +2 -1
- package/esm/components/activityLog/ActivityFilterEditor/styles.js +5 -5
- package/esm/components/activityLog/ActivityLog/ActivityLog.d.ts +1 -7
- package/esm/components/activityLog/ActivityLog/ActivityLog.js +10 -12
- package/esm/components/activityLog/ActivityLog/items/ActivityItem/ActivityItem.js +7 -9
- package/esm/components/activityLog/ActivityLog/items/ActivityItem/styles.d.ts +1 -1
- package/esm/components/activityLog/ActivityLog/items/ActivityItem/styles.js +5 -4
- package/esm/components/activityLog/ActivityLog/items/GroupItem/styles.js +2 -1
- package/esm/components/activityLog/ActivityLog/styles.js +3 -2
- package/esm/components/activityLog/ActivityLogFilter/styles.js +4 -3
- package/esm/components/activityLog/activities/ActivityTitle/styles.js +1 -2
- package/esm/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
- package/esm/components/attributes/OvIcon/OvIcon.d.ts +1 -1
- package/esm/components/attributes/inline/SimpleAttributeEditor/styles.d.ts +1 -1
- package/esm/components/commonReactSelectComponents/arrowIndicatorStyles.d.ts +1 -1
- package/esm/components/editors/BooleanRadioEditor/styles.d.ts +1 -1
- package/esm/components/editors/CustomDateRangeEditor/CustomDateRangeEditor.js +6 -9
- package/esm/components/editors/CustomDateRangeEditor/styles.d.ts +1 -1
- package/esm/components/editors/DateEditor/styles.d.ts +1 -1
- package/esm/components/editors/DateRangeEditor/DateRangeEditor.d.ts +28 -17
- package/esm/components/editors/DateRangeEditor/DateRangeEditor.js +26 -74
- package/esm/components/editors/DateRangeEditor/styles.d.ts +1 -1
- package/esm/components/editors/DateRangeEditor/styles.js +0 -12
- package/esm/components/editors/TimestampEditor/styles.d.ts +1 -1
- package/esm/components/history/DateRangeSelector/DateRangeSelector.js +1 -1
- package/esm/components/history/HistoryActivitySelector/HistoryActivitySelector.d.ts +2 -1
- package/esm/components/history/HistoryActivitySelector/HistoryActivitySelector.js +7 -4
- package/esm/components/history/HistoryFilterButton/HistoryFilterButton.js +14 -9
- package/esm/components/history/HistoryFilterButton/styles.d.ts +1 -1
- package/esm/components/history/HistoryFilterButton/styles.js +8 -13
- package/esm/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
- package/esm/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
- package/esm/components/history/HistoryMenuButton/styles.d.ts +1 -1
- package/package.json +3 -3
- package/cjs/components/editors/DateRangeEditor/helpers.d.ts +0 -9
- package/cjs/components/editors/DateRangeEditor/helpers.js +0 -24
- package/esm/components/editors/DateRangeEditor/helpers.d.ts +0 -9
- package/esm/components/editors/DateRangeEditor/helpers.js +0 -20
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const customStyles: {
|
|
2
2
|
input: (currentStyles: any) => any;
|
|
3
|
+
menuPortal: (currentStyles: any) => any;
|
|
3
4
|
};
|
|
4
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"option" | "labels" | "container" | "divider" | "filterSubtitle" | "agoLabel" | "dateOption" | "dateOptionAgo" | "dateOptionWithin" | "dateOptionLabel" | "dropDownInput" | "
|
|
5
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"option" | "labels" | "container" | "divider" | "filterSubtitle" | "agoLabel" | "dateOption" | "dateOptionAgo" | "dateOptionWithin" | "dateOptionLabel" | "dropDownInput" | "editorFields" | "clearButton" | "selectorWrapper" | "selectorsGroup" | "selectorHint">;
|
|
@@ -11,11 +11,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { makeStyles } from '@mui/styles';
|
|
13
13
|
export var customStyles = {
|
|
14
|
-
input: function (currentStyles) { return (__assign(__assign({}, currentStyles), { fontSize: '14px' })); }
|
|
14
|
+
input: function (currentStyles) { return (__assign(__assign({}, currentStyles), { fontSize: '14px' })); },
|
|
15
|
+
menuPortal: function (currentStyles) { return (__assign(__assign({}, currentStyles), { zIndex: 1300 })); }
|
|
15
16
|
};
|
|
16
17
|
export var useStyles = makeStyles({
|
|
17
18
|
container: {
|
|
18
|
-
padding: 16,
|
|
19
19
|
width: 500,
|
|
20
20
|
boxSizing: 'border-box'
|
|
21
21
|
},
|
|
@@ -53,9 +53,9 @@ export var useStyles = makeStyles({
|
|
|
53
53
|
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
54
54
|
borderTop: '4px'
|
|
55
55
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
editorFields: {
|
|
57
|
+
maxHeight: 400,
|
|
58
|
+
borderColor: 'rgba(0,0,0,0.12)'
|
|
59
59
|
},
|
|
60
60
|
clearButton: {
|
|
61
61
|
marginRight: 'auto'
|
|
@@ -3,12 +3,6 @@ type Props = {
|
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
5
|
activities: unknown[];
|
|
6
|
-
count: number;
|
|
7
|
-
page: number;
|
|
8
|
-
onChangePage: (page: number) => void;
|
|
9
|
-
rowsPerPage: number;
|
|
10
|
-
onChangeRowsPerPage: (rowsPerPage: number) => void;
|
|
11
|
-
rowsPerPageOptions: number[];
|
|
12
6
|
};
|
|
13
|
-
declare const ActivityLog: ({ width, height, activities
|
|
7
|
+
declare const ActivityLog: ({ width, height, activities }: Props) => JSX.Element;
|
|
14
8
|
export default ActivityLog;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import i18n from 'ui-i18n';
|
|
3
2
|
import classnames from 'classnames';
|
|
4
3
|
import { adjust, evolve, filter, map, not, pipe } from 'ramda';
|
|
5
4
|
import { buildGroupedItems, flattenGroupedItems, getItemKey, isGroupItem } from './helpers';
|
|
@@ -8,12 +7,10 @@ import { removeIgnoredItems } from '../utils/activities';
|
|
|
8
7
|
import GroupItem from './items/GroupItem/GroupItem';
|
|
9
8
|
import ActivityItem from './items/ActivityItem/ActivityItem';
|
|
10
9
|
import AutoSizeList from '../../AutoSizeList/AutoSizeList';
|
|
11
|
-
import BasicTablePagination from '../../BasicTableView/BasicTablePagination/BasicTablePagination';
|
|
12
10
|
import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
|
|
13
11
|
import { useStyles } from './styles';
|
|
14
|
-
var PAGINATION_HEIGHT = 60;
|
|
15
12
|
var ActivityLog = function (_a) {
|
|
16
|
-
var width = _a.width, height = _a.height, activities = _a.activities
|
|
13
|
+
var width = _a.width, height = _a.height, activities = _a.activities;
|
|
17
14
|
var styles = useStyles();
|
|
18
15
|
var _b = useState([]), groupedItems = _b[0], setGroupedItems = _b[1];
|
|
19
16
|
var toggleGroupedItem = function (index) {
|
|
@@ -30,17 +27,18 @@ var ActivityLog = function (_a) {
|
|
|
30
27
|
var _b;
|
|
31
28
|
var data = _a.data, index = _a.index;
|
|
32
29
|
var item = data[index];
|
|
30
|
+
var isSingleRow = data.length === 1;
|
|
31
|
+
var isFirstRow = index === 0;
|
|
32
|
+
var isLastRow = index === data.length - 1;
|
|
33
33
|
return (React.createElement("div", { className: classnames(styles.listRow, (_b = {},
|
|
34
|
-
_b[styles.singleRow] =
|
|
35
|
-
_b[styles.firstRow] =
|
|
36
|
-
_b[styles.lastRow] =
|
|
34
|
+
_b[styles.singleRow] = isSingleRow,
|
|
35
|
+
_b[styles.firstRow] = isFirstRow,
|
|
36
|
+
_b[styles.lastRow] = isLastRow,
|
|
37
37
|
_b)) }, isGroupItem(item) ? (React.createElement(GroupItem, { item: item, onToggle: toggleGroupedItem })) : (React.createElement(React.Fragment, null,
|
|
38
38
|
React.createElement(ActivityItem, { item: item }),
|
|
39
|
-
React.createElement(Divider, { className: styles.rowDivider, light: true, variant:
|
|
39
|
+
!isLastRow && React.createElement(Divider, { className: styles.rowDivider, light: true, variant: "inset" })))));
|
|
40
40
|
}, []); // eslint-disable-line
|
|
41
|
-
return (React.createElement(
|
|
42
|
-
React.createElement(
|
|
43
|
-
React.createElement(AutoSizeList, { width: width, height: height - PAGINATION_HEIGHT, data: flatItems, defaultItemSize: 40, itemKey: getItemKey }, renderRow)),
|
|
44
|
-
React.createElement(BasicTablePagination, { count: count, onChangePage: onChangePage, page: page, rowsPerPage: rowsPerPage, onChangeRowsPerPage: onChangeRowsPerPage, rowsPerPageOptions: rowsPerPageOptions, labelRowsPerPage: i18n.text('Events per page:') })));
|
|
41
|
+
return (React.createElement(CollapsibleItemsProvider, null,
|
|
42
|
+
React.createElement(AutoSizeList, { width: width, height: height, data: flatItems, defaultItemSize: 40, itemKey: getItemKey }, renderRow)));
|
|
45
43
|
};
|
|
46
44
|
export default ActivityLog;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Typography from '@mui/material/Typography';
|
|
3
2
|
import { getActivityType, splitActivityByType } from '../../../utils/activities';
|
|
4
3
|
import ActivitiesFactory from '../../../activities/ActivitiesFactory';
|
|
5
4
|
import { useStyles } from './styles';
|
|
@@ -12,13 +11,12 @@ var ActivityItem = function (_a) {
|
|
|
12
11
|
return (React.createElement("div", { className: styles.activityItem, "data-reltio-id": "activity-log-item" },
|
|
13
12
|
React.createElement("div", { className: styles.activityIcon }, ActivitiesFactory.getIcon(type)),
|
|
14
13
|
React.createElement("div", { className: styles.activityInfo },
|
|
15
|
-
React.createElement(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}))));
|
|
14
|
+
React.createElement("div", { className: styles.userContainer },
|
|
15
|
+
React.createElement("span", { className: styles.activityUser }, item.user),
|
|
16
|
+
React.createElement("span", { className: styles.date }, i18n.date(item.timestamp, 'LT'))),
|
|
17
|
+
activities.map(function (activity, index) { return (React.createElement("div", { key: index, className: styles.activityEvent }, ActivitiesFactory.getComponent({
|
|
18
|
+
type: getActivityType(activity),
|
|
19
|
+
data: activity
|
|
20
|
+
}))); }))));
|
|
23
21
|
};
|
|
24
22
|
export default ActivityItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"date" | "activityItem" | "activityIcon" | "activityInfo" | "activityUser" | "activityEvent">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"date" | "activityItem" | "activityIcon" | "userContainer" | "activityInfo" | "activityUser" | "activityEvent">;
|
|
@@ -4,7 +4,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
4
4
|
display: 'flex',
|
|
5
5
|
minHeight: '40px',
|
|
6
6
|
padding: '10px 0 5px 0',
|
|
7
|
-
boxSizing: 'border-box'
|
|
7
|
+
boxSizing: 'border-box',
|
|
8
|
+
paddingRight: '16px'
|
|
8
9
|
},
|
|
9
10
|
activityIcon: {
|
|
10
11
|
marginLeft: '-13px',
|
|
@@ -23,6 +24,9 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
23
24
|
fontSize: '14px'
|
|
24
25
|
}
|
|
25
26
|
},
|
|
27
|
+
userContainer: {
|
|
28
|
+
display: 'flex'
|
|
29
|
+
},
|
|
26
30
|
activityInfo: {
|
|
27
31
|
flex: 1,
|
|
28
32
|
overflow: 'hidden',
|
|
@@ -40,9 +44,6 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
40
44
|
marginTop: '5px'
|
|
41
45
|
},
|
|
42
46
|
date: {
|
|
43
|
-
position: 'absolute',
|
|
44
|
-
right: 0,
|
|
45
|
-
marginTop: '5px',
|
|
46
47
|
fontSize: 12,
|
|
47
48
|
lineHeight: '16px',
|
|
48
49
|
color: theme.palette.text.primary,
|
|
@@ -4,14 +4,15 @@ export var useStyles = makeStyles({
|
|
|
4
4
|
marginLeft: '28px'
|
|
5
5
|
},
|
|
6
6
|
listRow: {
|
|
7
|
-
paddingLeft: '
|
|
7
|
+
paddingLeft: '28px',
|
|
8
|
+
position: 'relative',
|
|
8
9
|
'&::before': {
|
|
9
10
|
content: '""',
|
|
10
11
|
width: '2px',
|
|
11
12
|
position: 'absolute',
|
|
12
13
|
height: '100%',
|
|
13
14
|
top: 0,
|
|
14
|
-
left: '
|
|
15
|
+
left: '27px',
|
|
15
16
|
backgroundColor: '#D8D8D8',
|
|
16
17
|
zIndex: '-1'
|
|
17
18
|
},
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
export var useStyles = makeStyles({
|
|
3
3
|
header: {
|
|
4
|
-
width: 'auto',
|
|
5
4
|
display: 'flex',
|
|
6
|
-
alignItems: 'center'
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
overflow: 'hidden',
|
|
7
|
+
flexGrow: 1
|
|
7
8
|
},
|
|
8
9
|
label: {
|
|
9
|
-
|
|
10
|
+
marginRight: '4px',
|
|
10
11
|
fontSize: '14px'
|
|
11
12
|
},
|
|
12
13
|
buttonsWrapper: {
|
|
@@ -25,7 +25,7 @@ export declare const ChipWithTooltip: React.ForwardRefExoticComponent<import("pr
|
|
|
25
25
|
variant?: import("@mui/types").OverridableStringUnion<"filled" | "outlined", import("@mui/material/Chip").ChipPropsVariantOverrides>;
|
|
26
26
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
27
27
|
ref?: React.Ref<HTMLDivElement>;
|
|
28
|
-
}, "label" | "icon" | "children" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "
|
|
28
|
+
}, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "deleteIcon" | "avatar" | "clickable" | "onDelete" | "skipFocusWhenDisabled">>;
|
|
29
29
|
type Props = {
|
|
30
30
|
className?: string;
|
|
31
31
|
description?: string;
|
|
@@ -26,7 +26,7 @@ export declare const ChipWithTooltip: React.ForwardRefExoticComponent<import("pr
|
|
|
26
26
|
variant?: import("@mui/types").OverridableStringUnion<"filled" | "outlined", import("@mui/material/Chip").ChipPropsVariantOverrides>;
|
|
27
27
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
28
28
|
ref?: React.Ref<HTMLDivElement>;
|
|
29
|
-
}, "label" | "icon" | "children" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "
|
|
29
|
+
}, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "deleteIcon" | "avatar" | "clickable" | "onDelete" | "skipFocusWhenDisabled">>;
|
|
30
30
|
type ComplexWithLabel = NestedAttributeValue | ReferenceAttributeValue;
|
|
31
31
|
type Props = {
|
|
32
32
|
className?: string;
|
|
@@ -2,5 +2,5 @@ type StylesProps = {
|
|
|
2
2
|
color: string;
|
|
3
3
|
containerWidth: number;
|
|
4
4
|
};
|
|
5
|
-
export declare const useStyles: (props: StylesProps) => import("@mui/styles").ClassNameMap<"input" | "
|
|
5
|
+
export declare const useStyles: (props: StylesProps) => import("@mui/styles").ClassNameMap<"input" | "textField" | "paper" | "inputMultiline" | "booleanEditor" | "timestampEditor" | "popoverRoot">;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useArrowIndicatorStyles: (props?: any) => import("@mui/styles").ClassNameMap<"
|
|
1
|
+
export const useArrowIndicatorStyles: (props?: any) => import("@mui/styles").ClassNameMap<"expanded" | "disabled">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"label" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"label" | "isCrossedOut" | "editors" | "checkboxPrimary">;
|
|
@@ -5,7 +5,7 @@ import { isNil } from 'ramda';
|
|
|
5
5
|
import { DataTypes, formatDataTypeValue } from '@reltio/mdm-sdk';
|
|
6
6
|
import { noop } from '../../../core';
|
|
7
7
|
import TextField from '@mui/material/TextField';
|
|
8
|
-
import
|
|
8
|
+
import Popover from '@mui/material/Popover';
|
|
9
9
|
import DropdownIndicatorWithIconButton from '../../commonReactSelectComponents/DropdownIndicatorWithIconButton';
|
|
10
10
|
import DateRangePicker from '../../DateRangePicker/DateRangePicker';
|
|
11
11
|
import { useStyles } from './styles';
|
|
@@ -44,16 +44,13 @@ var CustomDateRangeEditor = function (_a) {
|
|
|
44
44
|
}, InputLabelProps: {
|
|
45
45
|
shrink: false
|
|
46
46
|
}, placeholder: i18n.text("".concat(placeholder, " \u2014 ").concat(placeholder)) }),
|
|
47
|
-
React.createElement(
|
|
47
|
+
React.createElement(Popover, { open: open, anchorEl: inputRef.current, onClose: onCancel, anchorOrigin: {
|
|
48
48
|
vertical: 'bottom',
|
|
49
|
-
horizontal: '
|
|
49
|
+
horizontal: 'right'
|
|
50
50
|
}, transformOrigin: {
|
|
51
51
|
vertical: 'top',
|
|
52
|
-
horizontal: '
|
|
53
|
-
}, elevation: 2,
|
|
54
|
-
|
|
55
|
-
style: { width: '100%' }
|
|
56
|
-
} },
|
|
57
|
-
React.createElement(DateRangePicker, { values: values, onCancel: onCancel, onApply: onApply, type: DataTypes.TYPE_ACTIVENESS_DATE }))));
|
|
52
|
+
horizontal: 'right'
|
|
53
|
+
}, elevation: 2 },
|
|
54
|
+
React.createElement(DateRangePicker, { values: values, onApply: onApply, type: DataTypes.TYPE_ACTIVENESS_DATE }))));
|
|
58
55
|
};
|
|
59
56
|
export default CustomDateRangeEditor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"input" | "root" | "inputRoot" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"input" | "root" | "inputRoot" | "paper" | "dropdownIndicator" | "dateOptionLabel">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"adornedEnd" | "inputRoot" | "isCrossedOut">;
|
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DatePeriod } from '@reltio/mdm-sdk';
|
|
3
3
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
4
|
-
import { MenuProps } from '@mui/material/Menu';
|
|
5
|
-
import { Option, Values } from './helpers';
|
|
6
4
|
export type DateRangeEditorProps = {
|
|
7
5
|
label?: string;
|
|
8
|
-
values?:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
onChange?: (value: Values) => void;
|
|
12
|
-
dataTypeDefinition?: DataTypeDefinition;
|
|
13
|
-
MenuProps?: Partial<MenuProps>;
|
|
6
|
+
values?: DatePeriod | string;
|
|
7
|
+
editorLabel?: string;
|
|
8
|
+
editorPlaceholder?: string;
|
|
14
9
|
TextFieldProps?: TextFieldProps;
|
|
15
|
-
DateRangePickerProps?: {
|
|
16
|
-
minDate?: Date;
|
|
17
|
-
maxDate?: Date;
|
|
18
|
-
};
|
|
19
|
-
className?: string;
|
|
20
10
|
classes?: {
|
|
21
11
|
dropdownIndicator?: string;
|
|
22
12
|
root?: string;
|
|
23
13
|
};
|
|
14
|
+
className?: string;
|
|
15
|
+
isPickingDate?: boolean;
|
|
16
|
+
isMenuOpen?: boolean;
|
|
17
|
+
onMenuToggle?: () => void;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: {
|
|
20
|
+
(props: DateRangeEditorProps & React.RefAttributes<HTMLDivElement> & {
|
|
21
|
+
values?: string | [Date, Date] | Omit<import("@reltio/mdm-sdk/src/constants/filter-values").default, "PICK_DATE">;
|
|
22
|
+
options?: import("../../../HOCs/withDateRangeSelector/helpers").Option[];
|
|
23
|
+
dataTypeDefinition?: import("@reltio/mdm-sdk").DataTypeDefinition;
|
|
24
|
+
getValuesDateRange?: (value: string | [Date, Date] | Omit<import("@reltio/mdm-sdk/src/constants/filter-values").default, "PICK_DATE">) => [Date, Date];
|
|
25
|
+
onChange?: (value: string | [Date, Date] | Omit<import("@reltio/mdm-sdk/src/constants/filter-values").default, "PICK_DATE">) => void;
|
|
26
|
+
DateRangePickerProps?: Partial<{
|
|
27
|
+
onApply: ([startDate, endDate]: [Date, Date]) => void;
|
|
28
|
+
values?: [Date, Date];
|
|
29
|
+
type?: string;
|
|
30
|
+
minDate?: Date;
|
|
31
|
+
maxDate?: Date;
|
|
32
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
MenuProps?: Partial<import("@mui/material").MenuProps>;
|
|
34
|
+
}): JSX.Element;
|
|
35
|
+
displayName: string;
|
|
24
36
|
};
|
|
25
|
-
|
|
26
|
-
export default DateRangeEditor;
|
|
37
|
+
export default _default;
|
|
@@ -20,83 +20,35 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React, {
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
24
|
import classnames from 'classnames';
|
|
25
|
-
import
|
|
26
|
-
import { identity, isNil, prop } from 'ramda';
|
|
27
|
-
import { DataTypes, AllDateRangeValues, getRangeOptionLabel, getLocaleFormat } from '@reltio/mdm-sdk';
|
|
25
|
+
import { isNil } from 'ramda';
|
|
28
26
|
import TextField from '@mui/material/TextField';
|
|
29
|
-
import MenuItem from '@mui/material/MenuItem';
|
|
30
|
-
import Typography from '@mui/material/Typography';
|
|
31
|
-
import Menu from '@mui/material/Menu';
|
|
32
|
-
import { getEditorValue, convertValuesToDate } from './helpers';
|
|
33
27
|
import DropdownIndicatorWithIconButton from '../../commonReactSelectComponents/DropdownIndicatorWithIconButton';
|
|
34
|
-
import
|
|
28
|
+
import withDateRangeSelector from '../../../HOCs/withDateRangeSelector/withDateRangeSelector';
|
|
35
29
|
import { useStyles } from './styles';
|
|
36
|
-
var
|
|
37
|
-
var DateRangeEditor = function (_a) {
|
|
30
|
+
var DateRangeEditor = forwardRef(function (_a, ref) {
|
|
38
31
|
var _b, _c;
|
|
39
|
-
var
|
|
40
|
-
var label = _a.label, values = _a.values, options = _a.options, _e = _a.getValuesDateRange, getValuesDateRange = _e === void 0 ? convertValuesToDate : _e, _f = _a.onChange, onChange = _f === void 0 ? identity : _f, _g = _a.dataTypeDefinition, dataTypeDefinition = _g === void 0 ? {
|
|
41
|
-
type: DataTypes.TYPE_DATE
|
|
42
|
-
} : _g, DateRangePickerProps = _a.DateRangePickerProps, TextFieldProps = _a.TextFieldProps, MenuProps = _a.MenuProps, otherProps = __rest(_a, ["label", "values", "options", "getValuesDateRange", "onChange", "dataTypeDefinition", "DateRangePickerProps", "TextFieldProps", "MenuProps"]);
|
|
43
|
-
var classes = otherProps.classes;
|
|
44
|
-
var isTimestamp = dataTypeDefinition.type === DataTypes.TYPE_TIMESTAMP;
|
|
45
|
-
var enhancePlaceHolder = isTimestamp ? function (timeFormat) { return timeFormat.replace(/^[hH]:/, 'HH:'); } : identity;
|
|
46
|
-
var placeholder = isTimestamp ? getLocaleFormat() : dateFormat;
|
|
47
|
-
var rangeOptions = useMemo(function () {
|
|
48
|
-
return options ||
|
|
49
|
-
Object.values(AllDateRangeValues).map(function (option) { return ({ value: option, label: getRangeOptionLabel(option) }); });
|
|
50
|
-
}, [options]);
|
|
51
|
-
var inputRef = useRef(null);
|
|
52
|
-
var _h = useState(false), open = _h[0], setOpen = _h[1];
|
|
53
|
-
var _j = useState(), customValue = _j[0], setCustomValue = _j[1];
|
|
32
|
+
var label = _a.label, editorLabel = _a.editorLabel, editorPlaceholder = _a.editorPlaceholder, values = _a.values, TextFieldProps = _a.TextFieldProps, isPickingDate = _a.isPickingDate, isMenuOpen = _a.isMenuOpen, onMenuToggle = _a.onMenuToggle, otherProps = __rest(_a, ["label", "editorLabel", "editorPlaceholder", "values", "TextFieldProps", "isPickingDate", "isMenuOpen", "onMenuToggle"]);
|
|
54
33
|
var styles = useStyles();
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
menuIsOpen: open
|
|
78
|
-
}, innerProps: {} })), classes: {
|
|
79
|
-
root: classnames(styles.inputRoot, (_b = {}, _b[styles.uppercase] = !customValue && Array.isArray(values), _b)),
|
|
80
|
-
underline: classnames((_c = {}, _c[styles.underline] = open, _c)),
|
|
81
|
-
adornedEnd: styles.adornedEnd
|
|
82
|
-
}, disableUnderline: isNil(values), readOnly: true }, TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.InputProps), InputLabelProps: {
|
|
83
|
-
classes: {
|
|
84
|
-
root: open ? styles.inputLabel : undefined
|
|
85
|
-
},
|
|
86
|
-
shrink: !isNil(label)
|
|
87
|
-
}, placeholder: editorPlaceholder })),
|
|
88
|
-
React.createElement(Menu, __assign({ variant: "menu", open: open, autoFocus: false, classes: { paper: styles.paper }, anchorEl: inputRef.current, onClose: onCancel, anchorOrigin: {
|
|
89
|
-
vertical: 'bottom',
|
|
90
|
-
horizontal: 'left'
|
|
91
|
-
}, transformOrigin: {
|
|
92
|
-
vertical: 'top',
|
|
93
|
-
horizontal: 'left'
|
|
94
|
-
}, elevation: 2, MenuListProps: {
|
|
95
|
-
autoFocusItem: open,
|
|
96
|
-
style: {
|
|
97
|
-
width: customValue ? '100%' : prop('clientWidth', inputRef.current)
|
|
98
|
-
}
|
|
99
|
-
} }, MenuProps), customValue ? (React.createElement(DateRangePicker, __assign({ values: getValuesDateRange(values), onCancel: onCancel, onApply: onItemClick, type: dataTypeDefinition.type }, DateRangePickerProps))) : (rangeOptions.map(function (option) { return (React.createElement(MenuItem, { key: option.value, value: option.value, onClick: function () { return onItemClick(option.value); }, className: styles.menuItem },
|
|
100
|
-
React.createElement(Typography, { classes: { root: styles.menuText } }, option.label))); })))));
|
|
101
|
-
};
|
|
102
|
-
export default DateRangeEditor;
|
|
34
|
+
var classes = otherProps.classes;
|
|
35
|
+
return (React.createElement(TextField, __assign({}, TextFieldProps, otherProps, { ref: ref, label: label, value: (TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.value) || editorLabel, onClick: onMenuToggle, variant: "filled", size: "small", InputProps: __assign({ endAdornment: (React.createElement(DropdownIndicatorWithIconButton, { selectProps: {
|
|
36
|
+
classes: {
|
|
37
|
+
dropdownIndicator: classnames(styles.dropdownIndicator, classes === null || classes === void 0 ? void 0 : classes.dropdownIndicator)
|
|
38
|
+
},
|
|
39
|
+
menuIsOpen: isMenuOpen
|
|
40
|
+
}, innerProps: {} })), classes: {
|
|
41
|
+
root: classnames(styles.inputRoot, (_b = {},
|
|
42
|
+
_b[styles.uppercase] = !isPickingDate && Array.isArray(values),
|
|
43
|
+
_b)),
|
|
44
|
+
underline: classnames((_c = {}, _c[styles.underline] = isMenuOpen, _c)),
|
|
45
|
+
adornedEnd: styles.adornedEnd
|
|
46
|
+
}, disableUnderline: isNil(values), readOnly: true }, TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.InputProps), InputLabelProps: {
|
|
47
|
+
classes: {
|
|
48
|
+
root: isMenuOpen ? styles.inputLabel : undefined
|
|
49
|
+
},
|
|
50
|
+
shrink: !isNil(label)
|
|
51
|
+
}, placeholder: editorPlaceholder })));
|
|
52
|
+
});
|
|
53
|
+
DateRangeEditor.displayName = 'DateRangeEditor';
|
|
54
|
+
export default withDateRangeSelector(DateRangeEditor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"underline" | "uppercase" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"underline" | "uppercase" | "inputLabel" | "adornedEnd" | "inputRoot" | "dropdownIndicator">;
|
|
@@ -5,18 +5,6 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
5
5
|
cursor: 'pointer',
|
|
6
6
|
color: 'rgba(0, 0, 0, 0.54)'
|
|
7
7
|
},
|
|
8
|
-
paper: {
|
|
9
|
-
minWidth: '112px'
|
|
10
|
-
},
|
|
11
|
-
menuItem: {
|
|
12
|
-
minHeight: '32px'
|
|
13
|
-
},
|
|
14
|
-
menuText: {
|
|
15
|
-
color: theme.palette.text.primary,
|
|
16
|
-
fontSize: '13px',
|
|
17
|
-
lineHeight: '15px',
|
|
18
|
-
letterSpacing: 0
|
|
19
|
-
},
|
|
20
8
|
underline: {
|
|
21
9
|
'&:after': {
|
|
22
10
|
transform: 'scaleX(1)'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"underline" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"underline" | "iconButtonRoot" | "inputLabel" | "adornedEnd" | "inputRoot" | "isCrossedOut">;
|
|
@@ -52,7 +52,7 @@ var DateRangeSelector = function (_a) {
|
|
|
52
52
|
setInterval(emptyInterval);
|
|
53
53
|
}
|
|
54
54
|
}, [value]);
|
|
55
|
-
return (React.createElement("div", { className: classnames(styles.root, className) },
|
|
55
|
+
return (React.createElement("div", { className: classnames(styles.root, className), "data-reltio-id": "date-range-selector" },
|
|
56
56
|
React.createElement(Typography, { className: styles.title, variant: 'subtitle1' }, i18n.text('Date')),
|
|
57
57
|
React.createElement("div", { className: styles.intervalContainer },
|
|
58
58
|
React.createElement(SimpleDropDownSelector, { label: '', className: styles.typeInput, value: {
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
selectedHistoryActivityTypes: HistoryActivityType[];
|
|
5
5
|
onChange: (activities: HistoryActivityType[]) => void;
|
|
6
6
|
className?: string;
|
|
7
|
+
disableUnderline?: boolean;
|
|
7
8
|
};
|
|
8
|
-
declare const HistoryActivitySelector: ({ selectedHistoryActivityTypes, onChange, className }: Props) => JSX.Element;
|
|
9
|
+
declare const HistoryActivitySelector: ({ selectedHistoryActivityTypes, onChange, className, disableUnderline }: Props) => JSX.Element;
|
|
9
10
|
export default HistoryActivitySelector;
|
|
@@ -8,15 +8,18 @@ import DropdownIndicatorWithIconButton from '../../commonReactSelectComponents/D
|
|
|
8
8
|
import { getHistoryActivityLabel, historyActivityOptions } from './utils';
|
|
9
9
|
import { customStyles, useStyles } from './styles';
|
|
10
10
|
var HistoryActivitySelector = function (_a) {
|
|
11
|
-
var selectedHistoryActivityTypes = _a.selectedHistoryActivityTypes, onChange = _a.onChange, className = _a.className;
|
|
11
|
+
var selectedHistoryActivityTypes = _a.selectedHistoryActivityTypes, onChange = _a.onChange, className = _a.className, disableUnderline = _a.disableUnderline;
|
|
12
12
|
var styles = useStyles();
|
|
13
13
|
var valueToOption = function (value) { return ({ value: value, label: getHistoryActivityLabel(value) }); };
|
|
14
14
|
var prepareValues = function (values) { return values.map(valueToOption); };
|
|
15
15
|
var options = prepareValues(historyActivityOptions);
|
|
16
|
-
return (React.createElement("div", { className: classnames(styles.root, className) },
|
|
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(defaultTo([]), pluck('value'), onChange), options: options, TextFieldProps: {
|
|
18
|
+
React.createElement(MultiSelect, { value: prepareValues(selectedHistoryActivityTypes), onChange: pipe(defaultTo([]), pluck('value'), onChange), options: options, TextFieldProps: {
|
|
19
|
+
InputProps: { disableUnderline: disableUnderline },
|
|
20
|
+
classes: { root: styles.dropDownInput }
|
|
21
|
+
}, components: {
|
|
19
22
|
DropdownIndicator: DropdownIndicatorWithIconButton
|
|
20
|
-
}, styles: customStyles, classes: styles, menuPlacement: "bottom", menuPortalTarget: document.body })));
|
|
23
|
+
}, styles: customStyles, classes: styles, menuPlacement: "bottom", menuPortalTarget: document.body, menuShouldBlockScroll: true, captureMenuScroll: false })));
|
|
21
24
|
};
|
|
22
25
|
export default HistoryActivitySelector;
|
|
@@ -15,7 +15,10 @@ import { curry, dissoc } from 'ramda';
|
|
|
15
15
|
import FilterListIcon from '@mui/icons-material/FilterList';
|
|
16
16
|
import Button from '@mui/material/Button';
|
|
17
17
|
import Popover from '@mui/material/Popover';
|
|
18
|
-
import
|
|
18
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
19
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
20
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
21
|
+
import Divider from '@mui/material/Divider';
|
|
19
22
|
import { isDateRangeValid } from '@reltio/mdm-sdk';
|
|
20
23
|
import { SmallIconButton } from '../../SmallIconButton';
|
|
21
24
|
import UserSelector from '../../UserSelector/UserSelector';
|
|
@@ -64,14 +67,16 @@ var HistoryFilterButton = function (_a) {
|
|
|
64
67
|
vertical: 'top',
|
|
65
68
|
horizontal: 'right'
|
|
66
69
|
} },
|
|
67
|
-
React.createElement(
|
|
68
|
-
|
|
69
|
-
React.createElement(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
React.createElement(DialogTitle, null, i18n.text('Filter')),
|
|
71
|
+
React.createElement(DialogContent, { dividers: true, className: styles.filterContainer },
|
|
72
|
+
React.createElement(DateRangeSelector, { value: dateRange, onChange: handlePropChange('dateRange'), className: styles.filterItem }),
|
|
73
|
+
React.createElement(Divider, { light: true, className: styles.divider }),
|
|
74
|
+
React.createElement(UserSelector, { selectedUsers: users, onChange: handlePropChange('users'), className: styles.filterItem, disableUnderline: true }),
|
|
75
|
+
React.createElement(Divider, { light: true, className: styles.divider }),
|
|
76
|
+
React.createElement(HistoryActivitySelector, { selectedHistoryActivityTypes: activities, onChange: handlePropChange('activities'), className: styles.filterItem, disableUnderline: true }),
|
|
77
|
+
React.createElement(Divider, { light: true, className: styles.divider }),
|
|
78
|
+
React.createElement(AttributeSelector, { selectedAttributes: attributes, entityType: entityType, onChange: handlePropChange('attributes'), className: styles.filterItem, title: i18n.text('Attribute updated'), disableUnderline: true })),
|
|
79
|
+
React.createElement(DialogActions, null,
|
|
75
80
|
React.createElement(Button, { onClick: clearAllButtonHandler, className: styles.clearButton }, i18n.text('Clear all')),
|
|
76
81
|
React.createElement(Button, { onClick: togglePopup }, i18n.text('Cancel')),
|
|
77
82
|
React.createElement(Button, { color: "primary", onClick: applyButtonHandler }, i18n.text('Apply'))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"input" | "popup" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"input" | "popup" | "divider" | "clearButton" | "filterContainer" | "filterItem">;
|