@reltio/components 1.4.1115 → 1.4.1118
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.
|
@@ -20,6 +20,12 @@ var useMatchesLoader = function (_a) {
|
|
|
20
20
|
var tenant = react_redux_1.useSelector(mdm_module_1.default.selectors.getTenant);
|
|
21
21
|
var dtssPath = react_redux_1.useSelector(mdm_module_1.default.selectors.getDtssPath);
|
|
22
22
|
var dataTenants = react_redux_1.useSelector(mdm_module_1.default.selectors.getDataTenants);
|
|
23
|
+
var _f = react_redux_1.useSelector(mdm_module_1.default.selectors.getGlobalSearchRequestOptions) || {}, activityFilter = _f.activityFilter, globalFilter = _f.globalFilter;
|
|
24
|
+
var activeness = typeof options.showInactiveEntities === 'boolean'
|
|
25
|
+
? options.showInactiveEntities
|
|
26
|
+
? mdm_sdk_1.ActivityFilters.ALL
|
|
27
|
+
: mdm_sdk_1.ActivityFilters.ACTIVE_ONLY
|
|
28
|
+
: activityFilter;
|
|
23
29
|
var dtssParams = react_1.useMemo(function () { return ({
|
|
24
30
|
dtssPath: dtssPath,
|
|
25
31
|
dataTenants: dataTenants,
|
|
@@ -57,12 +63,12 @@ var useMatchesLoader = function (_a) {
|
|
|
57
63
|
entityUri: entityUri,
|
|
58
64
|
offset: page * rowsPerPage,
|
|
59
65
|
max: rowsPerPage,
|
|
60
|
-
filter: filter,
|
|
66
|
+
filter: mdm_sdk_1.addGlobalFilterToQuery(globalFilter, filter) || '',
|
|
61
67
|
sort: field,
|
|
62
68
|
order: order,
|
|
63
69
|
force: force,
|
|
64
70
|
deep: options.showTransitiveMatches ? undefined : 1,
|
|
65
|
-
activeness:
|
|
71
|
+
activeness: activeness
|
|
66
72
|
}))
|
|
67
73
|
.then(function (result) {
|
|
68
74
|
var response = result.response, total = result.total, originalResponse = result.originalResponse;
|
|
@@ -77,6 +83,8 @@ var useMatchesLoader = function (_a) {
|
|
|
77
83
|
onFinishLoading === null || onFinishLoading === void 0 ? void 0 : onFinishLoading();
|
|
78
84
|
});
|
|
79
85
|
}, [
|
|
86
|
+
globalFilter,
|
|
87
|
+
activeness,
|
|
80
88
|
dtssPath,
|
|
81
89
|
enabled,
|
|
82
90
|
entityUri,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import mdmModule from '@reltio/mdm-module';
|
|
4
|
-
import { ActivityFilters, collectAllTransitiveEntitiesUris, getEntitiesMapForTransitiveMatches, getMatchesForDataTenantEntity, getMatchesFromDataTenants, getTransitiveMatches, isDataTenantEntity, isTempUri, withDtssPotentialItems } from '@reltio/mdm-sdk';
|
|
4
|
+
import { ActivityFilters, collectAllTransitiveEntitiesUris, getEntitiesMapForTransitiveMatches, getMatchesForDataTenantEntity, getMatchesFromDataTenants, getTransitiveMatches, isDataTenantEntity, isTempUri, withDtssPotentialItems, addGlobalFilterToQuery } from '@reltio/mdm-sdk';
|
|
5
5
|
import { usePagingSimulator } from './usePagingSimulator';
|
|
6
6
|
import { useSafePromise } from './useSafePromise';
|
|
7
7
|
import { prop } from 'ramda';
|
|
@@ -14,6 +14,12 @@ export var useMatchesLoader = function (_a) {
|
|
|
14
14
|
var tenant = useSelector(mdmModule.selectors.getTenant);
|
|
15
15
|
var dtssPath = useSelector(mdmModule.selectors.getDtssPath);
|
|
16
16
|
var dataTenants = useSelector(mdmModule.selectors.getDataTenants);
|
|
17
|
+
var _f = useSelector(mdmModule.selectors.getGlobalSearchRequestOptions) || {}, activityFilter = _f.activityFilter, globalFilter = _f.globalFilter;
|
|
18
|
+
var activeness = typeof options.showInactiveEntities === 'boolean'
|
|
19
|
+
? options.showInactiveEntities
|
|
20
|
+
? ActivityFilters.ALL
|
|
21
|
+
: ActivityFilters.ACTIVE_ONLY
|
|
22
|
+
: activityFilter;
|
|
17
23
|
var dtssParams = useMemo(function () { return ({
|
|
18
24
|
dtssPath: dtssPath,
|
|
19
25
|
dataTenants: dataTenants,
|
|
@@ -51,12 +57,12 @@ export var useMatchesLoader = function (_a) {
|
|
|
51
57
|
entityUri: entityUri,
|
|
52
58
|
offset: page * rowsPerPage,
|
|
53
59
|
max: rowsPerPage,
|
|
54
|
-
filter: filter,
|
|
60
|
+
filter: addGlobalFilterToQuery(globalFilter, filter) || '',
|
|
55
61
|
sort: field,
|
|
56
62
|
order: order,
|
|
57
63
|
force: force,
|
|
58
64
|
deep: options.showTransitiveMatches ? undefined : 1,
|
|
59
|
-
activeness:
|
|
65
|
+
activeness: activeness
|
|
60
66
|
}))
|
|
61
67
|
.then(function (result) {
|
|
62
68
|
var response = result.response, total = result.total, originalResponse = result.originalResponse;
|
|
@@ -71,6 +77,8 @@ export var useMatchesLoader = function (_a) {
|
|
|
71
77
|
onFinishLoading === null || onFinishLoading === void 0 ? void 0 : onFinishLoading();
|
|
72
78
|
});
|
|
73
79
|
}, [
|
|
80
|
+
globalFilter,
|
|
81
|
+
activeness,
|
|
74
82
|
dtssPath,
|
|
75
83
|
enabled,
|
|
76
84
|
entityUri,
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1118",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.1118",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1118",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|