@reltio/components 1.4.1530 → 1.4.1532

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.
@@ -10,7 +10,6 @@ var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
10
10
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
11
11
  var usePagingSimulator_1 = require("./usePagingSimulator");
12
12
  var useSafePromise_1 = require("./useSafePromise");
13
- var ramda_1 = require("ramda");
14
13
  var useMatchesLoader = function (_a) {
15
14
  var enabled = _a.enabled, entity = _a.entity, filter = _a.filter, rules = _a.rules, onFinishLoading = _a.onFinishLoading, onStartLoading = _a.onStartLoading, options = _a.options, page = _a.page, rowsPerPage = _a.rowsPerPage, sorting = _a.sorting, markMatchedValues = _a.markMatchedValues;
16
15
  var _b = sorting || {}, order = _b.order, field = _b.field;
@@ -26,20 +25,22 @@ var useMatchesLoader = function (_a) {
26
25
  ? mdm_sdk_1.ActivityFilters.ALL
27
26
  : mdm_sdk_1.ActivityFilters.ACTIVE_ONLY
28
27
  : activityFilter;
28
+ var entityUri = entity === null || entity === void 0 ? void 0 : entity.uri;
29
29
  var dtssParams = (0, react_1.useMemo)(function () { return ({
30
30
  dtssPath: dtssPath,
31
31
  dataTenants: dataTenants,
32
32
  entity: entity,
33
33
  customerTenant: tenant,
34
34
  dtssRequest: mdm_sdk_1.getMatchesFromDataTenants
35
- }); }, [dtssPath, dataTenants, entity, tenant]);
35
+ }); },
36
+ //eslint-disable-next-line react-hooks/exhaustive-deps
37
+ [dtssPath, dataTenants, entityUri, tenant]);
36
38
  //eslint-disable-next-line react-hooks/exhaustive-deps
37
39
  var getTransitiveMatchesWithDtss = (0, react_1.useCallback)((0, mdm_sdk_1.withDtssPotentialItems)(dtssParams, mdm_sdk_1.getTransitiveMatches), [
38
40
  dtssParams
39
41
  ]);
40
42
  var getTransitiveMatchesWithPaging = (0, usePagingSimulator_1.usePagingSimulator)(getTransitiveMatchesWithDtss);
41
43
  var getPagedMatchesForDataTenantEntity = (0, usePagingSimulator_1.usePagingSimulator)(mdm_sdk_1.getMatchesForDataTenantEntity);
42
- var entityUri = (0, ramda_1.prop)('uri', entity);
43
44
  var safePromise = (0, useSafePromise_1.useSafePromise)();
44
45
  var getMatches = (0, react_1.useCallback)(function (force) {
45
46
  if (force === void 0) { force = false; }
@@ -4,7 +4,6 @@ import mdmModule from '@reltio/mdm-module';
4
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
- import { prop } from 'ramda';
8
7
  export var useMatchesLoader = function (_a) {
9
8
  var enabled = _a.enabled, entity = _a.entity, filter = _a.filter, rules = _a.rules, onFinishLoading = _a.onFinishLoading, onStartLoading = _a.onStartLoading, options = _a.options, page = _a.page, rowsPerPage = _a.rowsPerPage, sorting = _a.sorting, markMatchedValues = _a.markMatchedValues;
10
9
  var _b = sorting || {}, order = _b.order, field = _b.field;
@@ -20,20 +19,22 @@ export var useMatchesLoader = function (_a) {
20
19
  ? ActivityFilters.ALL
21
20
  : ActivityFilters.ACTIVE_ONLY
22
21
  : activityFilter;
22
+ var entityUri = entity === null || entity === void 0 ? void 0 : entity.uri;
23
23
  var dtssParams = useMemo(function () { return ({
24
24
  dtssPath: dtssPath,
25
25
  dataTenants: dataTenants,
26
26
  entity: entity,
27
27
  customerTenant: tenant,
28
28
  dtssRequest: getMatchesFromDataTenants
29
- }); }, [dtssPath, dataTenants, entity, tenant]);
29
+ }); },
30
+ //eslint-disable-next-line react-hooks/exhaustive-deps
31
+ [dtssPath, dataTenants, entityUri, tenant]);
30
32
  //eslint-disable-next-line react-hooks/exhaustive-deps
31
33
  var getTransitiveMatchesWithDtss = useCallback(withDtssPotentialItems(dtssParams, getTransitiveMatches), [
32
34
  dtssParams
33
35
  ]);
34
36
  var getTransitiveMatchesWithPaging = usePagingSimulator(getTransitiveMatchesWithDtss);
35
37
  var getPagedMatchesForDataTenantEntity = usePagingSimulator(getMatchesForDataTenantEntity);
36
- var entityUri = prop('uri', entity);
37
38
  var safePromise = useSafePromise();
38
39
  var getMatches = useCallback(function (force) {
39
40
  if (force === void 0) { force = false; }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1530",
3
+ "version": "1.4.1532",
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.1530",
11
- "@reltio/mdm-sdk": "^1.4.1530",
10
+ "@reltio/mdm-module": "^1.4.1532",
11
+ "@reltio/mdm-sdk": "^1.4.1532",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",