@reltio/components 1.4.2156 → 1.4.2158
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/BarChart/helpers.js +3 -0
- package/ChartLegend/styles.js +2 -1
- package/ChartTooltip/styles.js +2 -1
- package/CollaborationItem/components/CommentTarget/styles.js +2 -1
- package/ComplexAttributeLabel/styles.js +2 -1
- package/DefaultCellValueRenderer/styles.js +1 -1
- package/EditModeComplexAttribute/styles.js +2 -1
- package/EntitySelector/components/EntityOption/styles.js +1 -1
- package/HOCs/withFilter/components/FilterChip/styles.js +1 -1
- package/HOCs/withReactSelectMuiSkin/styles.js +2 -1
- package/HierarchyNodeTitle/styles.js +1 -1
- package/InlineSimpleAttribute/styles.js +2 -1
- package/PivotingTooltip/components/PivotingTooltipContent/styles.js +2 -1
- package/PivotingTooltip/styles.js +2 -1
- package/ProfileBand/styles.js +4 -1
- package/ProfileCard/components/ProfileCardContent/styles.js +2 -2
- package/ProfilesList/styles.js +6 -3
- package/ReadOnlyComplexAttribute/styles.js +2 -1
- package/SimpleAttribute/styles.js +2 -1
- package/TableWithBars/components/AttributeCellRenderer/styles.js +1 -1
- package/TypeaheadEditor/styles.js +2 -1
- package/ValueChip/styles.js +1 -1
- package/cjs/BarChart/helpers.js +3 -0
- package/cjs/ChartLegend/styles.js +2 -1
- package/cjs/ChartTooltip/styles.js +2 -1
- package/cjs/CollaborationItem/components/CommentTarget/styles.js +2 -1
- package/cjs/ComplexAttributeLabel/styles.js +2 -1
- package/cjs/DefaultCellValueRenderer/styles.js +1 -1
- package/cjs/EditModeComplexAttribute/styles.js +2 -1
- package/cjs/EntitySelector/components/EntityOption/styles.js +1 -1
- package/cjs/HOCs/withFilter/components/FilterChip/styles.js +1 -1
- package/cjs/HOCs/withReactSelectMuiSkin/styles.js +2 -1
- package/cjs/HierarchyNodeTitle/styles.js +1 -1
- package/cjs/InlineSimpleAttribute/styles.js +2 -1
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/styles.js +2 -1
- package/cjs/PivotingTooltip/styles.js +2 -1
- package/cjs/ProfileBand/styles.js +4 -1
- package/cjs/ProfileCard/components/ProfileCardContent/styles.js +2 -2
- package/cjs/ProfilesList/styles.js +6 -3
- package/cjs/ReadOnlyComplexAttribute/styles.js +2 -1
- package/cjs/SimpleAttribute/styles.js +2 -1
- package/cjs/TableWithBars/components/AttributeCellRenderer/styles.js +1 -1
- package/cjs/TypeaheadEditor/styles.js +2 -1
- package/cjs/ValueChip/styles.js +1 -1
- package/cjs/constants/theme.d.ts +5 -0
- package/cjs/constants/theme.js +5 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/styles.js +2 -1
- package/cjs/features/activity-log/EntityObject/styles.js +1 -0
- package/cjs/features/activity-log/Field/styles.js +2 -1
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/styles.js +2 -1
- package/cjs/features/activity-log/RelationObject/styles.js +2 -1
- package/cjs/features/workflow/AttributesChanges/components/DiffRenderer/styles.js +2 -1
- package/cjs/features/workflow/AttributesChanges/styles.js +2 -1
- package/cjs/hooks/useSegmentsLoader/useSegmentsLoader.js +3 -3
- package/constants/theme.d.ts +5 -0
- package/constants/theme.js +5 -0
- package/features/activity-log/ActivitiesFactory/components/SimpleActivity/styles.js +2 -1
- package/features/activity-log/EntityObject/styles.js +1 -0
- package/features/activity-log/Field/styles.js +2 -1
- package/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/styles.js +2 -1
- package/features/activity-log/RelationObject/styles.js +2 -1
- package/features/workflow/AttributesChanges/components/DiffRenderer/styles.js +2 -1
- package/features/workflow/AttributesChanges/styles.js +2 -1
- package/hooks/useSegmentsLoader/useSegmentsLoader.js +4 -4
- package/package.json +1 -1
package/BarChart/helpers.js
CHANGED
|
@@ -18,6 +18,9 @@ export var getBarChartSettings = function (_a) {
|
|
|
18
18
|
fill: '#000',
|
|
19
19
|
opacity: '0.54'
|
|
20
20
|
},
|
|
21
|
+
tickFormatter: function (value, _index) {
|
|
22
|
+
return typeof value === 'string' ? value.replace(/ /g, '\u00A0') : value;
|
|
23
|
+
},
|
|
21
24
|
angle: isLabelRotated ? -45 : 0,
|
|
22
25
|
textAnchor: isLabelRotated ? 'end' : 'middle',
|
|
23
26
|
stroke: '#666'
|
package/ChartLegend/styles.js
CHANGED
package/ChartTooltip/styles.js
CHANGED
|
@@ -42,7 +42,8 @@ export var useStyles = makeStyles(function () { return ({
|
|
|
42
42
|
marginLeft: '16px',
|
|
43
43
|
padding: '6px 0',
|
|
44
44
|
lineHeight: '14px',
|
|
45
|
-
width: 'calc(100% - 71px)'
|
|
45
|
+
width: 'calc(100% - 71px)',
|
|
46
|
+
whiteSpace: 'break-spaces'
|
|
46
47
|
},
|
|
47
48
|
actions: function (_a) {
|
|
48
49
|
var hasMasking = _a.hasMasking;
|
|
@@ -68,7 +68,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
68
68
|
lineHeight: '15px',
|
|
69
69
|
textDecoration: 'none',
|
|
70
70
|
paddingLeft: '8px',
|
|
71
|
-
wordBreak: 'break-word'
|
|
71
|
+
wordBreak: 'break-word',
|
|
72
|
+
whiteSpace: 'break-spaces'
|
|
72
73
|
},
|
|
73
74
|
seeAllButton: {
|
|
74
75
|
cursor: 'pointer'
|
|
@@ -9,7 +9,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
9
9
|
content: {
|
|
10
10
|
color: theme.palette.primary.main,
|
|
11
11
|
cursor: 'pointer',
|
|
12
|
-
lineHeight: '16px'
|
|
12
|
+
lineHeight: '16px',
|
|
13
|
+
whiteSpace: 'break-spaces'
|
|
13
14
|
}
|
|
14
15
|
}); });
|
|
15
16
|
export var usePivotingTooltipStyles = makeStyles({
|
package/ProfileBand/styles.js
CHANGED
|
@@ -39,6 +39,7 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
39
39
|
letterSpacing: '0.25px',
|
|
40
40
|
color: theme.palette.text.primary,
|
|
41
41
|
wordBreak: 'break-word',
|
|
42
|
+
whiteSpace: 'break-spaces',
|
|
42
43
|
'&+ $specialInfo': {
|
|
43
44
|
marginTop: '4px'
|
|
44
45
|
}
|
|
@@ -50,6 +51,7 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
50
51
|
lineHeight: '16px',
|
|
51
52
|
fontSize: '14px',
|
|
52
53
|
fontWeight: 400,
|
|
54
|
+
whiteSpace: 'break-spaces',
|
|
53
55
|
'&+ $businessCard': {
|
|
54
56
|
marginLeft: '12px'
|
|
55
57
|
}
|
|
@@ -59,7 +61,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
59
61
|
display: 'inline-flex',
|
|
60
62
|
fontSize: '14px',
|
|
61
63
|
marginTop: '4px',
|
|
62
|
-
lineHeight: '1.2'
|
|
64
|
+
lineHeight: '1.2',
|
|
65
|
+
whiteSpace: 'break-spaces'
|
|
63
66
|
},
|
|
64
67
|
specialInfo: {
|
|
65
68
|
display: 'flex',
|
|
@@ -13,7 +13,7 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
13
13
|
label: {
|
|
14
14
|
textOverflow: 'ellipsis',
|
|
15
15
|
overflow: 'hidden',
|
|
16
|
-
whiteSpace: '
|
|
16
|
+
whiteSpace: 'pre',
|
|
17
17
|
fontWeight: 400,
|
|
18
18
|
fontSize: '13px',
|
|
19
19
|
lineHeight: '15px',
|
|
@@ -25,7 +25,7 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
25
25
|
fontSize: '10px',
|
|
26
26
|
lineHeight: '12px',
|
|
27
27
|
color: theme.palette.text.secondary,
|
|
28
|
-
whiteSpace: '
|
|
28
|
+
whiteSpace: 'pre',
|
|
29
29
|
overflow: 'hidden',
|
|
30
30
|
textOverflow: 'ellipsis'
|
|
31
31
|
},
|
package/ProfilesList/styles.js
CHANGED
|
@@ -78,13 +78,16 @@ export var useStyles = makeStyles(function (theme) {
|
|
|
78
78
|
fontWeight: 500,
|
|
79
79
|
color: theme.palette.primary.main,
|
|
80
80
|
marginRight: '17px',
|
|
81
|
-
textDecoration: 'none'
|
|
81
|
+
textDecoration: 'none',
|
|
82
|
+
whiteSpace: 'break-spaces'
|
|
82
83
|
},
|
|
83
84
|
secondaryLabel: {
|
|
84
|
-
marginRight: '12px'
|
|
85
|
+
marginRight: '12px',
|
|
86
|
+
whiteSpace: 'break-spaces'
|
|
85
87
|
},
|
|
86
88
|
businessCard: {
|
|
87
|
-
color: 'rgba(0, 0, 0, 0.54)'
|
|
89
|
+
color: 'rgba(0, 0, 0, 0.54)',
|
|
90
|
+
whiteSpace: 'break-spaces'
|
|
88
91
|
},
|
|
89
92
|
secondRow: {
|
|
90
93
|
display: 'flex',
|
|
@@ -23,7 +23,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
23
23
|
},
|
|
24
24
|
attributeValue: {
|
|
25
25
|
verticalAlign: 'middle',
|
|
26
|
-
wordBreak: 'break-all'
|
|
26
|
+
wordBreak: 'break-all',
|
|
27
|
+
whiteSpace: 'break-spaces'
|
|
27
28
|
},
|
|
28
29
|
updateAttribute: __assign(__assign({ width: 'fit-content', padding: '0 4px', marginLeft: '-4px' }, historyPalettes[HistoryOperations.updateAttribute]), { '& > a': {
|
|
29
30
|
color: historyPalettes[HistoryOperations.updateAttribute].color
|
package/ValueChip/styles.js
CHANGED
package/cjs/BarChart/helpers.js
CHANGED
|
@@ -21,6 +21,9 @@ var getBarChartSettings = function (_a) {
|
|
|
21
21
|
fill: '#000',
|
|
22
22
|
opacity: '0.54'
|
|
23
23
|
},
|
|
24
|
+
tickFormatter: function (value, _index) {
|
|
25
|
+
return typeof value === 'string' ? value.replace(/ /g, '\u00A0') : value;
|
|
26
|
+
},
|
|
24
27
|
angle: isLabelRotated ? -45 : 0,
|
|
25
28
|
textAnchor: isLabelRotated ? 'end' : 'middle',
|
|
26
29
|
stroke: '#666'
|
|
@@ -4,7 +4,8 @@ exports.useStyles = void 0;
|
|
|
4
4
|
var styles_1 = require("@mui/styles");
|
|
5
5
|
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
6
6
|
complexWrapper: {
|
|
7
|
-
position: 'relative'
|
|
7
|
+
position: 'relative',
|
|
8
|
+
whiteSpace: 'break-spaces'
|
|
8
9
|
},
|
|
9
10
|
editor: {
|
|
10
11
|
display: 'flex',
|
|
@@ -45,7 +45,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
|
|
|
45
45
|
marginLeft: '16px',
|
|
46
46
|
padding: '6px 0',
|
|
47
47
|
lineHeight: '14px',
|
|
48
|
-
width: 'calc(100% - 71px)'
|
|
48
|
+
width: 'calc(100% - 71px)',
|
|
49
|
+
whiteSpace: 'break-spaces'
|
|
49
50
|
},
|
|
50
51
|
actions: function (_a) {
|
|
51
52
|
var hasMasking = _a.hasMasking;
|
|
@@ -71,7 +71,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
71
71
|
lineHeight: '15px',
|
|
72
72
|
textDecoration: 'none',
|
|
73
73
|
paddingLeft: '8px',
|
|
74
|
-
wordBreak: 'break-word'
|
|
74
|
+
wordBreak: 'break-word',
|
|
75
|
+
whiteSpace: 'break-spaces'
|
|
75
76
|
},
|
|
76
77
|
seeAllButton: {
|
|
77
78
|
cursor: 'pointer'
|
|
@@ -12,7 +12,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
12
12
|
content: {
|
|
13
13
|
color: theme.palette.primary.main,
|
|
14
14
|
cursor: 'pointer',
|
|
15
|
-
lineHeight: '16px'
|
|
15
|
+
lineHeight: '16px',
|
|
16
|
+
whiteSpace: 'break-spaces'
|
|
16
17
|
}
|
|
17
18
|
}); });
|
|
18
19
|
exports.usePivotingTooltipStyles = (0, styles_1.makeStyles)({
|
|
@@ -42,6 +42,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
42
42
|
letterSpacing: '0.25px',
|
|
43
43
|
color: theme.palette.text.primary,
|
|
44
44
|
wordBreak: 'break-word',
|
|
45
|
+
whiteSpace: 'break-spaces',
|
|
45
46
|
'&+ $specialInfo': {
|
|
46
47
|
marginTop: '4px'
|
|
47
48
|
}
|
|
@@ -53,6 +54,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
53
54
|
lineHeight: '16px',
|
|
54
55
|
fontSize: '14px',
|
|
55
56
|
fontWeight: 400,
|
|
57
|
+
whiteSpace: 'break-spaces',
|
|
56
58
|
'&+ $businessCard': {
|
|
57
59
|
marginLeft: '12px'
|
|
58
60
|
}
|
|
@@ -62,7 +64,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
62
64
|
display: 'inline-flex',
|
|
63
65
|
fontSize: '14px',
|
|
64
66
|
marginTop: '4px',
|
|
65
|
-
lineHeight: '1.2'
|
|
67
|
+
lineHeight: '1.2',
|
|
68
|
+
whiteSpace: 'break-spaces'
|
|
66
69
|
},
|
|
67
70
|
specialInfo: {
|
|
68
71
|
display: 'flex',
|
|
@@ -16,7 +16,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
16
16
|
label: {
|
|
17
17
|
textOverflow: 'ellipsis',
|
|
18
18
|
overflow: 'hidden',
|
|
19
|
-
whiteSpace: '
|
|
19
|
+
whiteSpace: 'pre',
|
|
20
20
|
fontWeight: 400,
|
|
21
21
|
fontSize: '13px',
|
|
22
22
|
lineHeight: '15px',
|
|
@@ -28,7 +28,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
28
28
|
fontSize: '10px',
|
|
29
29
|
lineHeight: '12px',
|
|
30
30
|
color: theme.palette.text.secondary,
|
|
31
|
-
whiteSpace: '
|
|
31
|
+
whiteSpace: 'pre',
|
|
32
32
|
overflow: 'hidden',
|
|
33
33
|
textOverflow: 'ellipsis'
|
|
34
34
|
},
|
|
@@ -81,13 +81,16 @@ exports.useStyles = (0, styles_2.makeStyles)(function (theme) {
|
|
|
81
81
|
fontWeight: 500,
|
|
82
82
|
color: theme.palette.primary.main,
|
|
83
83
|
marginRight: '17px',
|
|
84
|
-
textDecoration: 'none'
|
|
84
|
+
textDecoration: 'none',
|
|
85
|
+
whiteSpace: 'break-spaces'
|
|
85
86
|
},
|
|
86
87
|
secondaryLabel: {
|
|
87
|
-
marginRight: '12px'
|
|
88
|
+
marginRight: '12px',
|
|
89
|
+
whiteSpace: 'break-spaces'
|
|
88
90
|
},
|
|
89
91
|
businessCard: {
|
|
90
|
-
color: 'rgba(0, 0, 0, 0.54)'
|
|
92
|
+
color: 'rgba(0, 0, 0, 0.54)',
|
|
93
|
+
whiteSpace: 'break-spaces'
|
|
91
94
|
},
|
|
92
95
|
secondRow: {
|
|
93
96
|
display: 'flex',
|
|
@@ -26,7 +26,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
26
26
|
},
|
|
27
27
|
attributeValue: {
|
|
28
28
|
verticalAlign: 'middle',
|
|
29
|
-
wordBreak: 'break-all'
|
|
29
|
+
wordBreak: 'break-all',
|
|
30
|
+
whiteSpace: 'break-spaces'
|
|
30
31
|
},
|
|
31
32
|
updateAttribute: __assign(__assign({ width: 'fit-content', padding: '0 4px', marginLeft: '-4px' }, mdm_sdk_1.historyPalettes[mdm_sdk_1.HistoryOperations.updateAttribute]), { '& > a': {
|
|
32
33
|
color: mdm_sdk_1.historyPalettes[mdm_sdk_1.HistoryOperations.updateAttribute].color
|
package/cjs/ValueChip/styles.js
CHANGED
package/cjs/constants/theme.d.ts
CHANGED
package/cjs/constants/theme.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
9
9
|
color: theme.palette.primary.main,
|
|
10
10
|
textDecoration: 'none',
|
|
11
11
|
fontWeight: 400,
|
|
12
|
+
whiteSpace: 'break-spaces',
|
|
12
13
|
'&.removed': {
|
|
13
14
|
pointerEvents: 'none',
|
|
14
15
|
color: theme.palette.text.secondary
|
|
@@ -8,7 +8,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
8
8
|
lineHeight: '20px',
|
|
9
9
|
color: theme.palette.text.primary,
|
|
10
10
|
marginTop: 4,
|
|
11
|
-
display: 'block'
|
|
11
|
+
display: 'block',
|
|
12
|
+
whiteSpace: 'break-spaces'
|
|
12
13
|
},
|
|
13
14
|
fieldName: {
|
|
14
15
|
color: theme.palette.text.secondary,
|
|
@@ -12,7 +12,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
12
12
|
link: {
|
|
13
13
|
color: theme.palette.primary.main,
|
|
14
14
|
textDecoration: 'none',
|
|
15
|
-
fontWeight: 400
|
|
15
|
+
fontWeight: 400,
|
|
16
|
+
whiteSpace: 'break-spaces'
|
|
16
17
|
},
|
|
17
18
|
delimiter: {
|
|
18
19
|
margin: '0 8px'
|
|
@@ -12,7 +12,8 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
12
12
|
color: theme.palette.primary.main,
|
|
13
13
|
fontSize: '12px',
|
|
14
14
|
letterSpacing: 0,
|
|
15
|
-
lineHeight: '16px'
|
|
15
|
+
lineHeight: '16px',
|
|
16
|
+
whiteSpace: 'break-spaces'
|
|
16
17
|
},
|
|
17
18
|
disabledLink: {
|
|
18
19
|
pointerEvents: 'none',
|
|
@@ -61,10 +61,10 @@ var useSegmentsLoader = function (_a) {
|
|
|
61
61
|
var _e = sorting || {}, sort = _e.field, order = _e.order;
|
|
62
62
|
var hasActiveFilter = (0, mdm_sdk_1.isActiveSegmentsFilter)(filters !== null && filters !== void 0 ? filters : {});
|
|
63
63
|
var hasSearchValue = Boolean((filters === null || filters === void 0 ? void 0 : filters.searchValue) && filters.searchValue.length > 0);
|
|
64
|
-
var filterString = (0, mdm_sdk_1.buildSegmentsFilterString)(
|
|
64
|
+
var filterString = (0, mdm_sdk_1.buildSegmentsFilterString)(filters);
|
|
65
65
|
var params = (0, react_1.useMemo)(function () {
|
|
66
|
-
return (0, ramda_1.reject)(mdm_sdk_1.isEmptyValue, __assign(__assign({ sort: sort, order: order, max: rowsPerPage, offset: page * rowsPerPage, filter: filterString }, (parentId && !hasActiveFilter ? { parentId: parentId } : {})), (hasActiveFilter ? { fetchAll: true } : {})));
|
|
67
|
-
}, [sort, order, rowsPerPage, page, filterString, parentId, hasActiveFilter]);
|
|
66
|
+
return (0, ramda_1.reject)(mdm_sdk_1.isEmptyValue, __assign(__assign({ sort: sort, order: order, max: rowsPerPage, offset: page * rowsPerPage, filter: filterString }, (parentId && !hasActiveFilter && !hasSearchValue ? { parentId: parentId } : {})), (hasActiveFilter || hasSearchValue ? { fetchAll: true } : {})));
|
|
67
|
+
}, [sort, order, rowsPerPage, page, filterString, parentId, hasActiveFilter, hasSearchValue]);
|
|
68
68
|
var loadRequest = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
69
|
var signal, response, error_1;
|
|
70
70
|
var _a;
|
package/constants/theme.d.ts
CHANGED
package/constants/theme.js
CHANGED
|
@@ -5,7 +5,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
5
5
|
lineHeight: '20px',
|
|
6
6
|
color: theme.palette.text.primary,
|
|
7
7
|
marginTop: 4,
|
|
8
|
-
display: 'block'
|
|
8
|
+
display: 'block',
|
|
9
|
+
whiteSpace: 'break-spaces'
|
|
9
10
|
},
|
|
10
11
|
fieldName: {
|
|
11
12
|
color: theme.palette.text.secondary,
|
|
@@ -9,7 +9,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
9
9
|
color: theme.palette.primary.main,
|
|
10
10
|
fontSize: '12px',
|
|
11
11
|
letterSpacing: 0,
|
|
12
|
-
lineHeight: '16px'
|
|
12
|
+
lineHeight: '16px',
|
|
13
|
+
whiteSpace: 'break-spaces'
|
|
13
14
|
},
|
|
14
15
|
disabledLink: {
|
|
15
16
|
pointerEvents: 'none',
|
|
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
49
49
|
import { reject } from 'ramda';
|
|
50
|
-
import { getSegments, isAbortError, isEmptyValue,
|
|
50
|
+
import { getSegments, isAbortError, isEmptyValue, buildSegmentsFilterString, isActiveSegmentsFilter } from '@reltio/mdm-sdk';
|
|
51
51
|
import { RequestStates } from '../../types';
|
|
52
52
|
import { showDefaultErrorMessage } from '../../helpers/errors';
|
|
53
53
|
export var useSegmentsLoader = function (_a) {
|
|
@@ -58,10 +58,10 @@ export var useSegmentsLoader = function (_a) {
|
|
|
58
58
|
var _e = sorting || {}, sort = _e.field, order = _e.order;
|
|
59
59
|
var hasActiveFilter = isActiveSegmentsFilter(filters !== null && filters !== void 0 ? filters : {});
|
|
60
60
|
var hasSearchValue = Boolean((filters === null || filters === void 0 ? void 0 : filters.searchValue) && filters.searchValue.length > 0);
|
|
61
|
-
var filterString = buildSegmentsFilterString(
|
|
61
|
+
var filterString = buildSegmentsFilterString(filters);
|
|
62
62
|
var params = useMemo(function () {
|
|
63
|
-
return reject(isEmptyValue, __assign(__assign({ sort: sort, order: order, max: rowsPerPage, offset: page * rowsPerPage, filter: filterString }, (parentId && !hasActiveFilter ? { parentId: parentId } : {})), (hasActiveFilter ? { fetchAll: true } : {})));
|
|
64
|
-
}, [sort, order, rowsPerPage, page, filterString, parentId, hasActiveFilter]);
|
|
63
|
+
return reject(isEmptyValue, __assign(__assign({ sort: sort, order: order, max: rowsPerPage, offset: page * rowsPerPage, filter: filterString }, (parentId && !hasActiveFilter && !hasSearchValue ? { parentId: parentId } : {})), (hasActiveFilter || hasSearchValue ? { fetchAll: true } : {})));
|
|
64
|
+
}, [sort, order, rowsPerPage, page, filterString, parentId, hasActiveFilter, hasSearchValue]);
|
|
65
65
|
var loadRequest = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
66
|
var signal, response, error_1;
|
|
67
67
|
var _a;
|