@reltio/components 1.4.2238 → 1.4.2240
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/DataTenantBadge/DataTenantBadge.js +3 -3
- package/DataTenantBadge/DataTenantBadge.test.js +3 -3
- package/DropDownSelector/DropDownSelector.d.ts +2 -1
- package/DropDownSelector/DropDownSelector.js +2 -2
- package/EntitySelector/EntitySelector.d.ts +2 -1
- package/EntitySelector/EntitySelector.js +2 -2
- package/EntityUriLink/EntityUriLink.d.ts +1 -0
- package/EntityUriLink/EntityUriLink.js +2 -2
- package/ProfileCard/ProfileCard.d.ts +2 -1
- package/ProfileCard/ProfileCard.js +2 -2
- package/ProfileCard/ProfileCard.test.js +19 -0
- package/ProfileCard/components/ProfileCardContent/ProfileCardContent.d.ts +2 -1
- package/ProfileCard/components/ProfileCardContent/ProfileCardContent.js +2 -2
- package/TenantsDropDownSelector/TenantsDropDownSelector.d.ts +2 -1
- package/TenantsDropDownSelector/TenantsDropDownSelector.js +2 -3
- package/TenantsDropDownSelector/TenantsDropDownSelector.spec.js +34 -3
- package/cjs/DataTenantBadge/DataTenantBadge.js +2 -2
- package/cjs/DataTenantBadge/DataTenantBadge.test.js +3 -3
- package/cjs/DropDownSelector/DropDownSelector.d.ts +2 -1
- package/cjs/DropDownSelector/DropDownSelector.js +2 -2
- package/cjs/EntitySelector/EntitySelector.d.ts +2 -1
- package/cjs/EntitySelector/EntitySelector.js +2 -2
- package/cjs/EntityUriLink/EntityUriLink.d.ts +1 -0
- package/cjs/EntityUriLink/EntityUriLink.js +2 -2
- package/cjs/ProfileCard/ProfileCard.d.ts +2 -1
- package/cjs/ProfileCard/ProfileCard.js +2 -2
- package/cjs/ProfileCard/ProfileCard.test.js +19 -0
- package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.d.ts +2 -1
- package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.js +2 -2
- package/cjs/TenantsDropDownSelector/TenantsDropDownSelector.d.ts +2 -1
- package/cjs/TenantsDropDownSelector/TenantsDropDownSelector.js +1 -2
- package/cjs/TenantsDropDownSelector/TenantsDropDownSelector.spec.js +34 -3
- package/cjs/contexts/MdmModuleContext/context.d.ts +2 -0
- package/cjs/contexts/MdmModuleContext/hooks.d.ts +1 -0
- package/cjs/contexts/MdmModuleContext/hooks.js +6 -2
- package/cjs/contexts/MdmModuleContext/index.d.ts +1 -1
- package/cjs/contexts/MdmModuleContext/index.js +3 -2
- package/cjs/hooks/useMatchesLoader/useMatchesLoader.js +3 -1
- package/cjs/hooks/useMatchesLoader/useMatchesLoader.test.js +124 -22
- package/contexts/MdmModuleContext/context.d.ts +2 -0
- package/contexts/MdmModuleContext/hooks.d.ts +1 -0
- package/contexts/MdmModuleContext/hooks.js +3 -0
- package/contexts/MdmModuleContext/index.d.ts +1 -1
- package/contexts/MdmModuleContext/index.js +1 -1
- package/hooks/useMatchesLoader/useMatchesLoader.js +4 -2
- package/hooks/useMatchesLoader/useMatchesLoader.test.js +125 -23
- package/package.json +2 -2
|
@@ -46,6 +46,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
49
58
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
59
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
60
|
};
|
|
@@ -60,14 +69,19 @@ var defaultDataTenants = [
|
|
|
60
69
|
{ id: 'tenantId2', name: 'secondTenantName' },
|
|
61
70
|
{ id: 'tenantId3', name: 'thirdTenantName', label: 'Third tenant name' }
|
|
62
71
|
];
|
|
72
|
+
var defaultDataTenantsWithIdBuilder = __spreadArray(__spreadArray([], defaultDataTenants, true), [
|
|
73
|
+
{ id: 'tenantId4', name: 'idBuilderTenant', idBuilderSubscription: true }
|
|
74
|
+
], false);
|
|
63
75
|
var defaultMdmValues = {
|
|
64
76
|
dataTenants: defaultDataTenants,
|
|
77
|
+
dataTenantsWithIdBuilder: defaultDataTenantsWithIdBuilder,
|
|
65
78
|
tenant: tenantObject
|
|
66
79
|
};
|
|
67
80
|
var defaultProps = {
|
|
68
81
|
onChangeTenant: jest.fn(),
|
|
69
82
|
entityTypeUri: 'entityTypeUris',
|
|
70
|
-
selectedTenant: tenantObject
|
|
83
|
+
selectedTenant: tenantObject,
|
|
84
|
+
dataTenants: defaultDataTenantsWithIdBuilder
|
|
71
85
|
};
|
|
72
86
|
var setUp = function (_a) {
|
|
73
87
|
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
@@ -80,8 +94,8 @@ var setUp = function (_a) {
|
|
|
80
94
|
};
|
|
81
95
|
describe('TenantsDropDownSelector test', function () {
|
|
82
96
|
it('should render nothing if dataTenants is empty', function () {
|
|
83
|
-
var
|
|
84
|
-
var container = setUp({
|
|
97
|
+
var props = __assign(__assign({}, defaultProps), { dataTenants: [] });
|
|
98
|
+
var container = setUp({ props: props }).container;
|
|
85
99
|
expect(container).toBeEmptyDOMElement();
|
|
86
100
|
});
|
|
87
101
|
it('should render nothing if onChangeTenant is undefined', function () {
|
|
@@ -130,4 +144,21 @@ describe('TenantsDropDownSelector test', function () {
|
|
|
130
144
|
}
|
|
131
145
|
});
|
|
132
146
|
}); });
|
|
147
|
+
it('should use dataTenants passed via props', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
148
|
+
var user, button, menuItems;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
user = setUp().user;
|
|
153
|
+
button = react_2.screen.getByText('T');
|
|
154
|
+
return [4 /*yield*/, user.click(button)];
|
|
155
|
+
case 1:
|
|
156
|
+
_a.sent();
|
|
157
|
+
menuItems = react_2.screen.getAllByRole('menuitem');
|
|
158
|
+
expect(menuItems).toHaveLength(4); // 1 customer tenant + 3 data tenants (including idBuilder in defaultDataTenantsWithIdBuilder)
|
|
159
|
+
(0, react_2.within)(menuItems[3]).getByText('idBuilderTenant');
|
|
160
|
+
return [2 /*return*/];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}); });
|
|
133
164
|
});
|
|
@@ -47,6 +47,7 @@ export type MdmModuleValuesContextProps = Partial<{
|
|
|
47
47
|
tenant: DataTenant;
|
|
48
48
|
environment: string;
|
|
49
49
|
dataTenants: DataTenant[];
|
|
50
|
+
dataTenantsWithIdBuilder: DataTenant[];
|
|
50
51
|
searchOptions: SearchOptions;
|
|
51
52
|
activityFilter: ActivityFilter;
|
|
52
53
|
globalFilter: GlobalFilter;
|
|
@@ -263,6 +264,7 @@ export declare const MdmModuleValuesContext: import("@fluentui/react-context-sel
|
|
|
263
264
|
tenant: DataTenant;
|
|
264
265
|
environment: string;
|
|
265
266
|
dataTenants: DataTenant[];
|
|
267
|
+
dataTenantsWithIdBuilder: DataTenant[];
|
|
266
268
|
searchOptions: SearchOptions;
|
|
267
269
|
activityFilter: ActivityFilter;
|
|
268
270
|
globalFilter: GlobalFilter;
|
|
@@ -47,6 +47,7 @@ export declare const useMdmTenant: () => string;
|
|
|
47
47
|
export declare const useMdmTenantName: () => string;
|
|
48
48
|
export declare const useMdmEnvironment: () => string;
|
|
49
49
|
export declare const useMdmDataTenants: () => import("@reltio/mdm-sdk").DataTenant[];
|
|
50
|
+
export declare const useMdmDataTenantsWithIdBuilder: () => import("@reltio/mdm-sdk").DataTenant[];
|
|
50
51
|
export declare const useMdmSearchNavigationData: () => import("@reltio/mdm-sdk").SearchNavigationData;
|
|
51
52
|
export declare const useMdmSearchProviderData: () => import("@reltio/mdm-sdk").SearchProviderData;
|
|
52
53
|
export declare const useMdmIsCollaborationEnabled: () => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.useMdmCanUserMakeExport = exports.useMdmDcrReviewValidation = exports.useMdmReviewDCREnabled = exports.useMdmShowMasking = exports.useMdmControlAttributes = exports.useMdmHiddenAttributes = exports.useMdmListener = exports.useMdmAction = exports.useMdmAuthoringItemsByEntityType = exports.useMdmGlobalSearchRequestOptions = exports.useMdmDependentLookupEditorContext = exports.useMdmRelationsDrafts = exports.useMdmAllRelationsToAddAndEdit = exports.useMdmDependentLookupsStructureNode = exports.useMdmActiveErrorsForAttributesPager = exports.useMdmDependentLookupEditorState = exports.useMdmInitialConnection = exports.useMdmInitialConnectionTempEntity = exports.useMdmModifiedEntity = exports.useMdmModifiedEntityDefaultProfilePic = exports.useMdmIsSourcesScreenEnabled = exports.useMdmProfileErrors = exports.useMdmIsWorkflowEnabled = void 0;
|
|
3
|
+
exports.useMdmSearchProviderData = exports.useMdmSearchNavigationData = exports.useMdmDataTenantsWithIdBuilder = exports.useMdmDataTenants = exports.useMdmEnvironment = exports.useMdmTenantName = exports.useMdmTenant = exports.useMdmTenantObject = exports.useMdmUserRoles = exports.useMdmUsername = exports.useMdmUser = exports.useMdmMetadata = exports.useMdmDependentLookups = exports.useMdmLookups = exports.useMdmProfileLastLoadedTime = exports.useMdmHistoryEvent = exports.useMdmHistorySlice = exports.useMdmHistoryMode = exports.useMdmHistoryDiff = exports.useMdmIsEditableMode = exports.useMdmIsViewMode = exports.useMdmMode = exports.useMdmEntityUriWithDataTenant = exports.useMdmEntityWithDiff = exports.useMdmEntityUri = exports.useMdmEntity = exports.useMdmModifiedEntities = exports.useMdmLookupAutocomplete = exports.useMdmAttributesSortingStrategy = exports.useMdmMaxValuesInResponse = exports.useMdmAttributesPresentation = exports.useMdmDateTimeMask = exports.useMdmDateMask = exports.useMdmPivotingAttributes = exports.useMdmShowEntityId = exports.useMdmImageAttributesFieldsOrder = exports.useMdmCollaborationPath = exports.useMdmImagePath = exports.useMdmApiPath = exports.useMdmReltioPath = exports.useMdmImageServicePath = exports.useMdmWorkflowPath = exports.useMdmServicesPath = exports.useMdmDtssPath = exports.useMdmUiPath = exports.useMdmAbsoluteImagePath = exports.useMdmExportPath = exports.useMdmWorkflowEnvironmentUrl = exports.useMdmUiError = exports.useMdmAutoCloseInterval = void 0;
|
|
4
|
+
exports.useMdmCanUserMakeExport = exports.useMdmDcrReviewValidation = exports.useMdmReviewDCREnabled = exports.useMdmShowMasking = exports.useMdmControlAttributes = exports.useMdmHiddenAttributes = exports.useMdmListener = exports.useMdmAction = exports.useMdmAuthoringItemsByEntityType = exports.useMdmGlobalSearchRequestOptions = exports.useMdmDependentLookupEditorContext = exports.useMdmRelationsDrafts = exports.useMdmAllRelationsToAddAndEdit = exports.useMdmDependentLookupsStructureNode = exports.useMdmActiveErrorsForAttributesPager = exports.useMdmDependentLookupEditorState = exports.useMdmInitialConnection = exports.useMdmInitialConnectionTempEntity = exports.useMdmModifiedEntity = exports.useMdmModifiedEntityDefaultProfilePic = exports.useMdmIsSourcesScreenEnabled = exports.useMdmProfileErrors = exports.useMdmIsWorkflowEnabled = exports.useMdmIsCollaborationEnabled = void 0;
|
|
5
5
|
var react_context_selector_1 = require("@fluentui/react-context-selector");
|
|
6
6
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
7
7
|
var context_1 = require("./context");
|
|
@@ -120,6 +120,10 @@ var useMdmEnvironment = function () { return useMdmModuleValuesContext(function
|
|
|
120
120
|
exports.useMdmEnvironment = useMdmEnvironment;
|
|
121
121
|
var useMdmDataTenants = function () { return useMdmModuleValuesContext(function (context) { return context.dataTenants; }); };
|
|
122
122
|
exports.useMdmDataTenants = useMdmDataTenants;
|
|
123
|
+
var useMdmDataTenantsWithIdBuilder = function () {
|
|
124
|
+
return useMdmModuleValuesContext(function (context) { return context.dataTenantsWithIdBuilder; });
|
|
125
|
+
};
|
|
126
|
+
exports.useMdmDataTenantsWithIdBuilder = useMdmDataTenantsWithIdBuilder;
|
|
123
127
|
var useMdmSearchNavigationData = function () { return useMdmModuleValuesContext(function (context) { return context.searchNavigationData; }); };
|
|
124
128
|
exports.useMdmSearchNavigationData = useMdmSearchNavigationData;
|
|
125
129
|
var useMdmSearchProviderData = function () { return useMdmModuleValuesContext(function (context) { return context.searchProviderData; }); };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { MdmModuleProvider } from './provider';
|
|
2
|
-
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled, useMdmDcrReviewValidation, useMdmImagePath } from './hooks';
|
|
2
|
+
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmDataTenantsWithIdBuilder, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled, useMdmDcrReviewValidation, useMdmImagePath } from './hooks';
|
|
3
3
|
export type { MdmModuleActionsContextProps, MdmModuleValuesContextProps, MdmModuleListenersContextProps } from './context';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.useMdmImagePath = exports.useMdmDcrReviewValidation = exports.useMdmReviewDCREnabled = exports.useMdmShowMasking = exports.useMdmControlAttributes = exports.useMdmHiddenAttributes = exports.useMdmIsSourcesScreenEnabled = exports.useMdmListener = exports.useMdmAction = exports.useMdmAuthoringItemsByEntityType = exports.useMdmGlobalSearchRequestOptions = exports.useMdmDependentLookupEditorContext = exports.useMdmAllRelationsToAddAndEdit = exports.useMdmDependentLookupsStructureNode = exports.useMdmActiveErrorsForAttributesPager = exports.useMdmDependentLookupEditorState = exports.useMdmInitialConnection = exports.useMdmInitialConnectionTempEntity = exports.useMdmModifiedEntity = exports.useMdmModifiedEntityDefaultProfilePic = exports.useMdmRelationsDrafts = exports.useMdmProfileErrors = exports.useMdmIsWorkflowEnabled = void 0;
|
|
3
|
+
exports.useMdmSearchProviderData = exports.useMdmSearchNavigationData = exports.useMdmDataTenantsWithIdBuilder = exports.useMdmDataTenants = exports.useMdmEnvironment = exports.useMdmTenantName = exports.useMdmTenant = exports.useMdmTenantObject = exports.useMdmUserRoles = exports.useMdmUsername = exports.useMdmUser = exports.useMdmMetadata = exports.useMdmDependentLookups = exports.useMdmLookups = exports.useMdmProfileLastLoadedTime = exports.useMdmHistoryEvent = exports.useMdmHistorySlice = exports.useMdmHistoryMode = exports.useMdmHistoryDiff = exports.useMdmIsEditableMode = exports.useMdmIsViewMode = exports.useMdmMode = exports.useMdmEntityUriWithDataTenant = exports.useMdmEntityWithDiff = exports.useMdmEntityUri = exports.useMdmEntity = exports.useMdmModifiedEntities = exports.useMdmLookupAutocomplete = exports.useMdmAttributesSortingStrategy = exports.useMdmMaxValuesInResponse = exports.useMdmAttributesPresentation = exports.useMdmDateTimeMask = exports.useMdmDateMask = exports.useMdmPivotingAttributes = exports.useMdmShowEntityId = exports.useMdmImageAttributesFieldsOrder = exports.useMdmCollaborationPath = exports.useMdmApiPath = exports.useMdmReltioPath = exports.useMdmImageServicePath = exports.useMdmWorkflowPath = exports.useMdmServicesPath = exports.useMdmDtssPath = exports.useMdmUiPath = exports.useMdmAbsoluteImagePath = exports.useMdmExportPath = exports.useMdmWorkflowEnvironmentUrl = exports.useMdmUiError = exports.useMdmAutoCloseInterval = exports.MdmModuleProvider = void 0;
|
|
4
|
+
exports.useMdmImagePath = exports.useMdmDcrReviewValidation = exports.useMdmReviewDCREnabled = exports.useMdmShowMasking = exports.useMdmControlAttributes = exports.useMdmHiddenAttributes = exports.useMdmIsSourcesScreenEnabled = exports.useMdmListener = exports.useMdmAction = exports.useMdmAuthoringItemsByEntityType = exports.useMdmGlobalSearchRequestOptions = exports.useMdmDependentLookupEditorContext = exports.useMdmAllRelationsToAddAndEdit = exports.useMdmDependentLookupsStructureNode = exports.useMdmActiveErrorsForAttributesPager = exports.useMdmDependentLookupEditorState = exports.useMdmInitialConnection = exports.useMdmInitialConnectionTempEntity = exports.useMdmModifiedEntity = exports.useMdmModifiedEntityDefaultProfilePic = exports.useMdmRelationsDrafts = exports.useMdmProfileErrors = exports.useMdmIsWorkflowEnabled = exports.useMdmIsCollaborationEnabled = void 0;
|
|
5
5
|
var provider_1 = require("./provider");
|
|
6
6
|
Object.defineProperty(exports, "MdmModuleProvider", { enumerable: true, get: function () { return provider_1.MdmModuleProvider; } });
|
|
7
7
|
var hooks_1 = require("./hooks");
|
|
@@ -51,6 +51,7 @@ Object.defineProperty(exports, "useMdmTenant", { enumerable: true, get: function
|
|
|
51
51
|
Object.defineProperty(exports, "useMdmTenantName", { enumerable: true, get: function () { return hooks_1.useMdmTenantName; } });
|
|
52
52
|
Object.defineProperty(exports, "useMdmEnvironment", { enumerable: true, get: function () { return hooks_1.useMdmEnvironment; } });
|
|
53
53
|
Object.defineProperty(exports, "useMdmDataTenants", { enumerable: true, get: function () { return hooks_1.useMdmDataTenants; } });
|
|
54
|
+
Object.defineProperty(exports, "useMdmDataTenantsWithIdBuilder", { enumerable: true, get: function () { return hooks_1.useMdmDataTenantsWithIdBuilder; } });
|
|
54
55
|
Object.defineProperty(exports, "useMdmSearchNavigationData", { enumerable: true, get: function () { return hooks_1.useMdmSearchNavigationData; } });
|
|
55
56
|
Object.defineProperty(exports, "useMdmSearchProviderData", { enumerable: true, get: function () { return hooks_1.useMdmSearchProviderData; } });
|
|
56
57
|
Object.defineProperty(exports, "useMdmIsCollaborationEnabled", { enumerable: true, get: function () { return hooks_1.useMdmIsCollaborationEnabled; } });
|
|
@@ -26,7 +26,7 @@ var useMatchesLoader = function (_a) {
|
|
|
26
26
|
var metadata = (0, MdmModuleContext_1.useMdmMetadata)();
|
|
27
27
|
var tenant = (0, MdmModuleContext_1.useMdmTenant)();
|
|
28
28
|
var dtssPath = (0, MdmModuleContext_1.useMdmDtssPath)();
|
|
29
|
-
var dataTenants = (0, MdmModuleContext_1.
|
|
29
|
+
var dataTenants = (0, MdmModuleContext_1.useMdmDataTenantsWithIdBuilder)();
|
|
30
30
|
var showMasking = (0, MdmModuleContext_1.useMdmShowMasking)();
|
|
31
31
|
var _f = (0, MdmModuleContext_1.useMdmGlobalSearchRequestOptions)() || {}, activityFilter = _f.activityFilter, globalFilter = _f.globalFilter;
|
|
32
32
|
var activeness = typeof options.showInactiveEntities === 'boolean'
|
|
@@ -65,6 +65,7 @@ var useMatchesLoader = function (_a) {
|
|
|
65
65
|
dtssPath: dtssPath,
|
|
66
66
|
entity: entity,
|
|
67
67
|
customerTenant: tenant,
|
|
68
|
+
dataTenants: dataTenants,
|
|
68
69
|
offset: page * rowsPerPage,
|
|
69
70
|
max: rowsPerPage,
|
|
70
71
|
force: force
|
|
@@ -102,6 +103,7 @@ var useMatchesLoader = function (_a) {
|
|
|
102
103
|
[
|
|
103
104
|
globalFilter,
|
|
104
105
|
activeness,
|
|
106
|
+
dataTenants,
|
|
105
107
|
dtssPath,
|
|
106
108
|
enabled,
|
|
107
109
|
entityUri,
|
|
@@ -10,6 +10,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
13
49
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
51
|
};
|
|
@@ -19,7 +55,14 @@ var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
|
19
55
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
20
56
|
var MdmModuleContext_1 = require("../../contexts/MdmModuleContext");
|
|
21
57
|
var useMatchesLoader_1 = require("./useMatchesLoader");
|
|
22
|
-
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getTransitiveMatches: jest.fn() })); });
|
|
58
|
+
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getTransitiveMatches: jest.fn(), getMatchesForDataTenantEntity: jest.fn(), isDataTenantEntity: jest.fn().mockImplementation(function (entity) { return !!entity.dataTenant; }) })); });
|
|
59
|
+
/**
|
|
60
|
+
* useMatchesLoader runs a useEffect that calls getMatches() on mount. getMatches() is async:
|
|
61
|
+
* it calls the SDK (getTransitiveMatches / getMatchesForDataTenantEntity), and when the
|
|
62
|
+
* promise resolves, it updates the state (setTotal, setMatches, setEntitiesMap), which triggers
|
|
63
|
+
* a re-render. waitForNextUpdate() waits for that next render, so assertions run after
|
|
64
|
+
* the async load has completed and we avoid races.
|
|
65
|
+
*/
|
|
23
66
|
describe('Test useMatchesLoader hook', function () {
|
|
24
67
|
var defaultProps = {
|
|
25
68
|
enabled: true,
|
|
@@ -49,37 +92,96 @@ describe('Test useMatchesLoader hook', function () {
|
|
|
49
92
|
}
|
|
50
93
|
]
|
|
51
94
|
}); };
|
|
52
|
-
var
|
|
95
|
+
var defaultDataTenantsWithIdBuilder = [{ id: 'tenantId4', name: 'idBuilderTenant', idBuilderSubscription: false }];
|
|
96
|
+
var defaultMdmValues = {
|
|
97
|
+
metadata: getMetadata(),
|
|
98
|
+
dataTenantsWithIdBuilder: defaultDataTenantsWithIdBuilder
|
|
99
|
+
};
|
|
53
100
|
var setUp = function (_a) {
|
|
54
101
|
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
55
102
|
var Providers = function (_a) {
|
|
56
103
|
var children = _a.children;
|
|
57
104
|
return react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues }, children);
|
|
58
105
|
};
|
|
59
|
-
return
|
|
106
|
+
return (0, react_hooks_1.renderHook)(useMatchesLoader_1.useMatchesLoader, { initialProps: props, wrapper: Providers });
|
|
60
107
|
};
|
|
61
108
|
afterEach(function () {
|
|
62
109
|
jest.clearAllMocks();
|
|
63
110
|
});
|
|
64
111
|
describe('Data masking behaviour', function () {
|
|
65
|
-
it('should call transitive endpoint without options if metadata doesnt have masked attribute', function () {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
112
|
+
it('should call transitive endpoint without options if metadata doesnt have masked attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
|
+
var waitForNextUpdate;
|
|
114
|
+
return __generator(this, function (_a) {
|
|
115
|
+
switch (_a.label) {
|
|
116
|
+
case 0:
|
|
117
|
+
waitForNextUpdate = setUp().waitForNextUpdate;
|
|
118
|
+
return [4 /*yield*/, waitForNextUpdate()];
|
|
119
|
+
case 1:
|
|
120
|
+
_a.sent();
|
|
121
|
+
expect(mdm_sdk_1.getTransitiveMatches).toHaveBeenCalledTimes(1);
|
|
122
|
+
expect(mdm_sdk_1.getTransitiveMatches).not.toHaveBeenCalledWith(expect.objectContaining({ options: expect.anything() }));
|
|
123
|
+
return [2 /*return*/];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}); });
|
|
127
|
+
it('should call transitive endpoint with sendMasked option if metadata has masked attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
|
+
var metadata, waitForNextUpdate;
|
|
129
|
+
return __generator(this, function (_a) {
|
|
130
|
+
switch (_a.label) {
|
|
131
|
+
case 0:
|
|
132
|
+
metadata = getMetadata();
|
|
133
|
+
metadata.entityTypes[0].attributes[0].masking = { regexPattern: '.{4}$' };
|
|
134
|
+
waitForNextUpdate = setUp({ mdmValues: { metadata: metadata } }).waitForNextUpdate;
|
|
135
|
+
return [4 /*yield*/, waitForNextUpdate()];
|
|
136
|
+
case 1:
|
|
137
|
+
_a.sent();
|
|
138
|
+
expect(mdm_sdk_1.getTransitiveMatches).toHaveBeenCalledTimes(1);
|
|
139
|
+
expect(mdm_sdk_1.getTransitiveMatches).toHaveBeenCalledWith(expect.objectContaining({ options: 'sendMasked,showAccess' }));
|
|
140
|
+
return [2 /*return*/];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}); });
|
|
144
|
+
it('should not add sendMasked or showAccess option if showMasking configuration property is false', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
145
|
+
var metadata, waitForNextUpdate;
|
|
146
|
+
return __generator(this, function (_a) {
|
|
147
|
+
switch (_a.label) {
|
|
148
|
+
case 0:
|
|
149
|
+
metadata = getMetadata();
|
|
150
|
+
metadata.entityTypes[0].attributes[0].masking = { regexPattern: '.{4}$' };
|
|
151
|
+
waitForNextUpdate = setUp({ mdmValues: { metadata: metadata, showMasking: false } }).waitForNextUpdate;
|
|
152
|
+
return [4 /*yield*/, waitForNextUpdate()];
|
|
153
|
+
case 1:
|
|
154
|
+
_a.sent();
|
|
155
|
+
expect(mdm_sdk_1.getTransitiveMatches).toHaveBeenCalledTimes(1);
|
|
156
|
+
expect(mdm_sdk_1.getTransitiveMatches).not.toHaveBeenCalledWith(expect.objectContaining({ options: expect.anything() }));
|
|
157
|
+
return [2 /*return*/];
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}); });
|
|
84
161
|
});
|
|
162
|
+
it('should pass dataTenants to getMatchesForDataTenantEntity when entity has dataTenant', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
+
var dataTenantEntity, dataTenants, waitForNextUpdate;
|
|
164
|
+
return __generator(this, function (_a) {
|
|
165
|
+
switch (_a.label) {
|
|
166
|
+
case 0:
|
|
167
|
+
dataTenantEntity = {
|
|
168
|
+
uri: 'entities/dataTenantEntity',
|
|
169
|
+
type: 'configuration/entityTypes/HCP',
|
|
170
|
+
dataTenant: 'tenantId4',
|
|
171
|
+
attributes: {}
|
|
172
|
+
};
|
|
173
|
+
dataTenants = [{ id: 'tenantId4', name: 'tenant', idBuilderSubscription: false }];
|
|
174
|
+
waitForNextUpdate = setUp({
|
|
175
|
+
props: __assign(__assign({}, defaultProps), { entity: dataTenantEntity }),
|
|
176
|
+
mdmValues: __assign(__assign({}, defaultMdmValues), { dataTenantsWithIdBuilder: dataTenants })
|
|
177
|
+
}).waitForNextUpdate;
|
|
178
|
+
return [4 /*yield*/, waitForNextUpdate()];
|
|
179
|
+
case 1:
|
|
180
|
+
_a.sent();
|
|
181
|
+
expect(mdm_sdk_1.getMatchesForDataTenantEntity).toHaveBeenCalledTimes(1);
|
|
182
|
+
expect(mdm_sdk_1.getMatchesForDataTenantEntity).toHaveBeenCalledWith(expect.objectContaining({ dataTenants: dataTenants }));
|
|
183
|
+
return [2 /*return*/];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}); });
|
|
85
187
|
});
|
|
@@ -47,6 +47,7 @@ export type MdmModuleValuesContextProps = Partial<{
|
|
|
47
47
|
tenant: DataTenant;
|
|
48
48
|
environment: string;
|
|
49
49
|
dataTenants: DataTenant[];
|
|
50
|
+
dataTenantsWithIdBuilder: DataTenant[];
|
|
50
51
|
searchOptions: SearchOptions;
|
|
51
52
|
activityFilter: ActivityFilter;
|
|
52
53
|
globalFilter: GlobalFilter;
|
|
@@ -263,6 +264,7 @@ export declare const MdmModuleValuesContext: import("@fluentui/react-context-sel
|
|
|
263
264
|
tenant: DataTenant;
|
|
264
265
|
environment: string;
|
|
265
266
|
dataTenants: DataTenant[];
|
|
267
|
+
dataTenantsWithIdBuilder: DataTenant[];
|
|
266
268
|
searchOptions: SearchOptions;
|
|
267
269
|
activityFilter: ActivityFilter;
|
|
268
270
|
globalFilter: GlobalFilter;
|
|
@@ -47,6 +47,7 @@ export declare const useMdmTenant: () => string;
|
|
|
47
47
|
export declare const useMdmTenantName: () => string;
|
|
48
48
|
export declare const useMdmEnvironment: () => string;
|
|
49
49
|
export declare const useMdmDataTenants: () => import("@reltio/mdm-sdk").DataTenant[];
|
|
50
|
+
export declare const useMdmDataTenantsWithIdBuilder: () => import("@reltio/mdm-sdk").DataTenant[];
|
|
50
51
|
export declare const useMdmSearchNavigationData: () => import("@reltio/mdm-sdk").SearchNavigationData;
|
|
51
52
|
export declare const useMdmSearchProviderData: () => import("@reltio/mdm-sdk").SearchProviderData;
|
|
52
53
|
export declare const useMdmIsCollaborationEnabled: () => boolean;
|
|
@@ -69,6 +69,9 @@ export var useMdmTenant = function () { return useMdmModuleValuesContext(functio
|
|
|
69
69
|
export var useMdmTenantName = function () { return useMdmModuleValuesContext(function (context) { var _a; return (_a = context.tenant) === null || _a === void 0 ? void 0 : _a.name; }); };
|
|
70
70
|
export var useMdmEnvironment = function () { return useMdmModuleValuesContext(function (context) { return context.environment; }); };
|
|
71
71
|
export var useMdmDataTenants = function () { return useMdmModuleValuesContext(function (context) { return context.dataTenants; }); };
|
|
72
|
+
export var useMdmDataTenantsWithIdBuilder = function () {
|
|
73
|
+
return useMdmModuleValuesContext(function (context) { return context.dataTenantsWithIdBuilder; });
|
|
74
|
+
};
|
|
72
75
|
export var useMdmSearchNavigationData = function () { return useMdmModuleValuesContext(function (context) { return context.searchNavigationData; }); };
|
|
73
76
|
export var useMdmSearchProviderData = function () { return useMdmModuleValuesContext(function (context) { return context.searchProviderData; }); };
|
|
74
77
|
export var useMdmIsCollaborationEnabled = function () {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { MdmModuleProvider } from './provider';
|
|
2
|
-
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled, useMdmDcrReviewValidation, useMdmImagePath } from './hooks';
|
|
2
|
+
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmDataTenantsWithIdBuilder, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled, useMdmDcrReviewValidation, useMdmImagePath } from './hooks';
|
|
3
3
|
export type { MdmModuleActionsContextProps, MdmModuleValuesContextProps, MdmModuleListenersContextProps } from './context';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MdmModuleProvider } from './provider';
|
|
2
|
-
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled, useMdmDcrReviewValidation, useMdmImagePath } from './hooks';
|
|
2
|
+
export { useMdmAutoCloseInterval, useMdmUiError, useMdmWorkflowEnvironmentUrl, useMdmExportPath, useMdmAbsoluteImagePath, useMdmUiPath, useMdmDtssPath, useMdmServicesPath, useMdmWorkflowPath, useMdmImageServicePath, useMdmReltioPath, useMdmApiPath, useMdmCollaborationPath, useMdmImageAttributesFieldsOrder, useMdmShowEntityId, useMdmPivotingAttributes, useMdmDateMask, useMdmDateTimeMask, useMdmAttributesPresentation, useMdmMaxValuesInResponse, useMdmAttributesSortingStrategy, useMdmLookupAutocomplete, useMdmModifiedEntities, useMdmEntity, useMdmEntityUri, useMdmEntityWithDiff, useMdmEntityUriWithDataTenant, useMdmMode, useMdmIsViewMode, useMdmIsEditableMode, useMdmHistoryDiff, useMdmHistoryMode, useMdmHistorySlice, useMdmHistoryEvent, useMdmProfileLastLoadedTime, useMdmLookups, useMdmDependentLookups, useMdmMetadata, useMdmUser, useMdmUsername, useMdmUserRoles, useMdmTenantObject, useMdmTenant, useMdmTenantName, useMdmEnvironment, useMdmDataTenants, useMdmDataTenantsWithIdBuilder, useMdmSearchNavigationData, useMdmSearchProviderData, useMdmIsCollaborationEnabled, useMdmIsWorkflowEnabled, useMdmProfileErrors, useMdmRelationsDrafts, useMdmModifiedEntityDefaultProfilePic, useMdmModifiedEntity, useMdmInitialConnectionTempEntity, useMdmInitialConnection, useMdmDependentLookupEditorState, useMdmActiveErrorsForAttributesPager, useMdmDependentLookupsStructureNode, useMdmAllRelationsToAddAndEdit, useMdmDependentLookupEditorContext, useMdmGlobalSearchRequestOptions, useMdmAuthoringItemsByEntityType, useMdmAction, useMdmListener, useMdmIsSourcesScreenEnabled, useMdmHiddenAttributes, useMdmControlAttributes, useMdmShowMasking, useMdmReviewDCREnabled, useMdmDcrReviewValidation, useMdmImagePath } from './hooks';
|
|
@@ -13,7 +13,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
13
13
|
import { ActivityFilter, collectAllTransitiveEntitiesUris, getEntitiesMapForTransitiveMatches, getMatchesForDataTenantEntity, getMatchesFromDataTenants, getTransitiveMatches, isDataTenantEntity, isTempUri, withDtssPotentialItems, addGlobalFilterToQuery, addGetTransitiveMatchesMaskingOptions } from '@reltio/mdm-sdk';
|
|
14
14
|
import { usePagingSimulator } from '../usePagingSimulator';
|
|
15
15
|
import { useSafePromise } from '../useSafePromise';
|
|
16
|
-
import {
|
|
16
|
+
import { useMdmDataTenantsWithIdBuilder, useMdmDtssPath, useMdmGlobalSearchRequestOptions, useMdmMetadata, useMdmTenant, useMdmShowMasking } from '../../contexts/MdmModuleContext';
|
|
17
17
|
export var useMatchesLoader = function (_a) {
|
|
18
18
|
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;
|
|
19
19
|
var _b = sorting || {}, order = _b.order, field = _b.field;
|
|
@@ -23,7 +23,7 @@ export var useMatchesLoader = function (_a) {
|
|
|
23
23
|
var metadata = useMdmMetadata();
|
|
24
24
|
var tenant = useMdmTenant();
|
|
25
25
|
var dtssPath = useMdmDtssPath();
|
|
26
|
-
var dataTenants =
|
|
26
|
+
var dataTenants = useMdmDataTenantsWithIdBuilder();
|
|
27
27
|
var showMasking = useMdmShowMasking();
|
|
28
28
|
var _f = useMdmGlobalSearchRequestOptions() || {}, activityFilter = _f.activityFilter, globalFilter = _f.globalFilter;
|
|
29
29
|
var activeness = typeof options.showInactiveEntities === 'boolean'
|
|
@@ -62,6 +62,7 @@ export var useMatchesLoader = function (_a) {
|
|
|
62
62
|
dtssPath: dtssPath,
|
|
63
63
|
entity: entity,
|
|
64
64
|
customerTenant: tenant,
|
|
65
|
+
dataTenants: dataTenants,
|
|
65
66
|
offset: page * rowsPerPage,
|
|
66
67
|
max: rowsPerPage,
|
|
67
68
|
force: force
|
|
@@ -99,6 +100,7 @@ export var useMatchesLoader = function (_a) {
|
|
|
99
100
|
[
|
|
100
101
|
globalFilter,
|
|
101
102
|
activeness,
|
|
103
|
+
dataTenants,
|
|
102
104
|
dtssPath,
|
|
103
105
|
enabled,
|
|
104
106
|
entityUri,
|