@reltio/components 1.4.2200 → 1.4.2201
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/ProfileResizablePanes/ProfileResizablePanes.js +1 -1
- package/ProfileResizablePanes/ProfileResizablePanes.spec.js +16 -2
- package/RequestedData/RequestedData.d.ts +12 -0
- package/RequestedData/RequestedData.js +26 -0
- package/RequestedData/RequestedData.module.css.js +9 -0
- package/RequestedData/index.d.ts +1 -0
- package/RequestedData/index.js +1 -0
- package/cjs/ProfileResizablePanes/ProfileResizablePanes.js +1 -1
- package/cjs/ProfileResizablePanes/ProfileResizablePanes.spec.js +16 -2
- package/cjs/RequestedData/RequestedData.d.ts +12 -0
- package/cjs/RequestedData/RequestedData.js +33 -0
- package/cjs/RequestedData/RequestedData.module.css.js +9 -0
- package/cjs/RequestedData/index.d.ts +1 -0
- package/cjs/RequestedData/index.js +5 -0
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +5 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.d.ts +8 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.js +20 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.d.ts +1 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.js +5 -0
- package/cjs/features/activity-log/ActivityFilterEditor/helpers.test.js +3 -2
- package/cjs/features/activity-log/ActivityLog/helpers.js +1 -1
- package/cjs/features/activity-log/InteractionRecord/InteractionRecord.d.ts +7 -0
- package/cjs/features/activity-log/InteractionRecord/InteractionRecord.js +17 -0
- package/cjs/features/activity-log/InteractionRecord/index.d.ts +1 -0
- package/cjs/features/activity-log/InteractionRecord/index.js +5 -0
- package/cjs/features/activity-log/types.d.ts +3 -1
- package/cjs/features/activity-log/types.js +2 -0
- package/cjs/features/activity-log/utils/activities.js +2 -0
- package/cjs/features/history/types.d.ts +2 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +6 -4
- package/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +5 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.d.ts +8 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/InteractionActivity.js +13 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.d.ts +1 -0
- package/features/activity-log/ActivitiesFactory/components/InteractionActivity/index.js +1 -0
- package/features/activity-log/ActivityFilterEditor/helpers.test.js +3 -2
- package/features/activity-log/ActivityLog/helpers.js +1 -1
- package/features/activity-log/InteractionRecord/InteractionRecord.d.ts +7 -0
- package/features/activity-log/InteractionRecord/InteractionRecord.js +10 -0
- package/features/activity-log/InteractionRecord/index.d.ts +1 -0
- package/features/activity-log/InteractionRecord/index.js +1 -0
- package/features/activity-log/types.d.ts +3 -1
- package/features/activity-log/types.js +2 -0
- package/features/activity-log/utils/activities.js +2 -0
- package/features/history/types.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ export var ProfileResizablePanes = function (_a) {
|
|
|
12
12
|
var styles = useStyles();
|
|
13
13
|
var _b = usePerspectivesSettings(perspectiveId), perspectiveSettings = _b.perspectiveSettings, updatePerspectiveSettings = _b.updatePerspectiveSettings;
|
|
14
14
|
var _c = (perspectiveSettings || {}).width, width = _c === void 0 ? DEFAULT_R_PANE_SIZE : _c;
|
|
15
|
-
var active = defaultTab
|
|
15
|
+
var active = !isNil(defaultTab) ? defaultTab : perspectiveSettings === null || perspectiveSettings === void 0 ? void 0 : perspectiveSettings.active;
|
|
16
16
|
var isSidePanelOpen = !isNil(active) && !disabled;
|
|
17
17
|
var handleUpdateSettings = useCallback(function (newSetting) {
|
|
18
18
|
updatePerspectiveSettings(newSetting);
|
|
@@ -70,7 +70,7 @@ var defaultProps = {
|
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
72
|
disabled: false,
|
|
73
|
-
defaultTab:
|
|
73
|
+
defaultTab: undefined
|
|
74
74
|
};
|
|
75
75
|
var setUp = function (props) {
|
|
76
76
|
if (props === void 0) { props = defaultProps; }
|
|
@@ -129,7 +129,21 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
129
129
|
expect(screen.getByRole('button', { name: 'Button 2' })).toBeInTheDocument();
|
|
130
130
|
expect(screen.getByRole('separator')).toBeInTheDocument();
|
|
131
131
|
});
|
|
132
|
-
it('should render resizable panes with open second pane', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
132
|
+
it('should render resizable panes with open second pane with defaultTab:0', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
133
|
+
var container;
|
|
134
|
+
return __generator(this, function (_a) {
|
|
135
|
+
container = setUp(__assign(__assign({}, defaultProps), { defaultTab: 0 })).container;
|
|
136
|
+
expect(screen.getByTestId('content')).toBeInTheDocument();
|
|
137
|
+
expect(screen.getByTestId('rightPanel')).toBeInTheDocument();
|
|
138
|
+
expect(getSplitPane1(container)).toBeInTheDocument();
|
|
139
|
+
expect(getSplitPane2(container)).toBeInTheDocument();
|
|
140
|
+
expect(isResizingDisabled(container)).toBe(false);
|
|
141
|
+
checkPanelSize(getSplitPane1(container), '52.0');
|
|
142
|
+
checkPanelSize(getSplitPane2(container), '48.0');
|
|
143
|
+
return [2 /*return*/];
|
|
144
|
+
});
|
|
145
|
+
}); });
|
|
146
|
+
it('should render resizable panes with open second pane on button click', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
133
147
|
var _a, container, user, button2;
|
|
134
148
|
return __generator(this, function (_b) {
|
|
135
149
|
switch (_b.label) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RequestStates } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
requestState: RequestStates;
|
|
5
|
+
isResponseEmpty?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
DataLoadedComponent?: React.ComponentType;
|
|
8
|
+
DataLoadingComponent?: React.ComponentType;
|
|
9
|
+
DataErrorComponent?: React.ComponentType;
|
|
10
|
+
};
|
|
11
|
+
export declare const RequestedData: ({ requestState, isResponseEmpty, children, DataLoadedComponent, DataLoadingComponent, DataErrorComponent }: Props) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import i18n from 'ui-i18n';
|
|
3
|
+
import { LinearLoadIndicator } from '../LinearLoadIndicator';
|
|
4
|
+
import { EmptySearchResult } from '../EmptySearchResult';
|
|
5
|
+
import { ErrorBoundary } from '../ErrorBoundary';
|
|
6
|
+
import { EMPTY_STATE_ICONS, EMPTY_STATE_VARIANTS, EmptyState } from '../EmptyState';
|
|
7
|
+
import { RequestStates } from '../types';
|
|
8
|
+
import styles from './RequestedData.module.css';
|
|
9
|
+
export var RequestedData = function (_a) {
|
|
10
|
+
var requestState = _a.requestState, isResponseEmpty = _a.isResponseEmpty, children = _a.children, DataLoadedComponent = _a.DataLoadedComponent, _b = _a.DataLoadingComponent, DataLoadingComponent = _b === void 0 ? RequestedDataLoading : _b, _c = _a.DataErrorComponent, DataErrorComponent = _c === void 0 ? RequestedDataError : _c;
|
|
11
|
+
switch (requestState) {
|
|
12
|
+
case RequestStates.LOADED:
|
|
13
|
+
return DataLoadedComponent ? (React.createElement(DataLoadedComponent, null)) : (React.createElement(RequestedDataLoaded, { isResponseEmpty: isResponseEmpty }, children));
|
|
14
|
+
case RequestStates.ERROR:
|
|
15
|
+
return React.createElement(DataErrorComponent, null);
|
|
16
|
+
case RequestStates.LOADING:
|
|
17
|
+
default:
|
|
18
|
+
return React.createElement(DataLoadingComponent, null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var RequestedDataError = function () { return (React.createElement(EmptyState, { LogoRenderer: EMPTY_STATE_ICONS.ERROR, text: i18n.text('Something went wrong'), variant: EMPTY_STATE_VARIANTS.full })); };
|
|
22
|
+
var RequestedDataLoaded = function (_a) {
|
|
23
|
+
var isResponseEmpty = _a.isResponseEmpty, children = _a.children;
|
|
24
|
+
return isResponseEmpty ? (React.createElement(EmptySearchResult, { variant: "noData", className: styles.noData })) : (React.createElement(ErrorBoundary, { error: React.createElement(RequestedDataError, null) }, children));
|
|
25
|
+
};
|
|
26
|
+
var RequestedDataLoading = function () { return React.createElement(LinearLoadIndicator, null); };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"noData":"RequestedData-noData--H4sHo"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
5
|
+
style.type = 'text/css'
|
|
6
|
+
style.innerHTML = `.RequestedData-noData--H4sHo{padding:16px 24px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RequestedData } from './RequestedData';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RequestedData } from './RequestedData';
|
|
@@ -38,7 +38,7 @@ var ProfileResizablePanes = function (_a) {
|
|
|
38
38
|
var styles = (0, styles_1.useStyles)();
|
|
39
39
|
var _b = (0, PerspectivesSettingsContext_1.usePerspectivesSettings)(perspectiveId), perspectiveSettings = _b.perspectiveSettings, updatePerspectiveSettings = _b.updatePerspectiveSettings;
|
|
40
40
|
var _c = (perspectiveSettings || {}).width, width = _c === void 0 ? DEFAULT_R_PANE_SIZE : _c;
|
|
41
|
-
var active = defaultTab
|
|
41
|
+
var active = !(0, ramda_1.isNil)(defaultTab) ? defaultTab : perspectiveSettings === null || perspectiveSettings === void 0 ? void 0 : perspectiveSettings.active;
|
|
42
42
|
var isSidePanelOpen = !(0, ramda_1.isNil)(active) && !disabled;
|
|
43
43
|
var handleUpdateSettings = (0, react_1.useCallback)(function (newSetting) {
|
|
44
44
|
updatePerspectiveSettings(newSetting);
|
|
@@ -75,7 +75,7 @@ var defaultProps = {
|
|
|
75
75
|
}
|
|
76
76
|
],
|
|
77
77
|
disabled: false,
|
|
78
|
-
defaultTab:
|
|
78
|
+
defaultTab: undefined
|
|
79
79
|
};
|
|
80
80
|
var setUp = function (props) {
|
|
81
81
|
if (props === void 0) { props = defaultProps; }
|
|
@@ -134,7 +134,21 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
134
134
|
expect(react_2.screen.getByRole('button', { name: 'Button 2' })).toBeInTheDocument();
|
|
135
135
|
expect(react_2.screen.getByRole('separator')).toBeInTheDocument();
|
|
136
136
|
});
|
|
137
|
-
it('should render resizable panes with open second pane', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
|
+
it('should render resizable panes with open second pane with defaultTab:0', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
138
|
+
var container;
|
|
139
|
+
return __generator(this, function (_a) {
|
|
140
|
+
container = setUp(__assign(__assign({}, defaultProps), { defaultTab: 0 })).container;
|
|
141
|
+
expect(react_2.screen.getByTestId('content')).toBeInTheDocument();
|
|
142
|
+
expect(react_2.screen.getByTestId('rightPanel')).toBeInTheDocument();
|
|
143
|
+
expect(getSplitPane1(container)).toBeInTheDocument();
|
|
144
|
+
expect(getSplitPane2(container)).toBeInTheDocument();
|
|
145
|
+
expect(isResizingDisabled(container)).toBe(false);
|
|
146
|
+
checkPanelSize(getSplitPane1(container), '52.0');
|
|
147
|
+
checkPanelSize(getSplitPane2(container), '48.0');
|
|
148
|
+
return [2 /*return*/];
|
|
149
|
+
});
|
|
150
|
+
}); });
|
|
151
|
+
it('should render resizable panes with open second pane on button click', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
138
152
|
var _a, container, user, button2;
|
|
139
153
|
return __generator(this, function (_b) {
|
|
140
154
|
switch (_b.label) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RequestStates } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
requestState: RequestStates;
|
|
5
|
+
isResponseEmpty?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
DataLoadedComponent?: React.ComponentType;
|
|
8
|
+
DataLoadingComponent?: React.ComponentType;
|
|
9
|
+
DataErrorComponent?: React.ComponentType;
|
|
10
|
+
};
|
|
11
|
+
export declare const RequestedData: ({ requestState, isResponseEmpty, children, DataLoadedComponent, DataLoadingComponent, DataErrorComponent }: Props) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RequestedData = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
9
|
+
var LinearLoadIndicator_1 = require("../LinearLoadIndicator");
|
|
10
|
+
var EmptySearchResult_1 = require("../EmptySearchResult");
|
|
11
|
+
var ErrorBoundary_1 = require("../ErrorBoundary");
|
|
12
|
+
var EmptyState_1 = require("../EmptyState");
|
|
13
|
+
var types_1 = require("../types");
|
|
14
|
+
var RequestedData_module_css_1 = __importDefault(require("./RequestedData.module.css"));
|
|
15
|
+
var RequestedData = function (_a) {
|
|
16
|
+
var requestState = _a.requestState, isResponseEmpty = _a.isResponseEmpty, children = _a.children, DataLoadedComponent = _a.DataLoadedComponent, _b = _a.DataLoadingComponent, DataLoadingComponent = _b === void 0 ? RequestedDataLoading : _b, _c = _a.DataErrorComponent, DataErrorComponent = _c === void 0 ? RequestedDataError : _c;
|
|
17
|
+
switch (requestState) {
|
|
18
|
+
case types_1.RequestStates.LOADED:
|
|
19
|
+
return DataLoadedComponent ? (react_1.default.createElement(DataLoadedComponent, null)) : (react_1.default.createElement(RequestedDataLoaded, { isResponseEmpty: isResponseEmpty }, children));
|
|
20
|
+
case types_1.RequestStates.ERROR:
|
|
21
|
+
return react_1.default.createElement(DataErrorComponent, null);
|
|
22
|
+
case types_1.RequestStates.LOADING:
|
|
23
|
+
default:
|
|
24
|
+
return react_1.default.createElement(DataLoadingComponent, null);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.RequestedData = RequestedData;
|
|
28
|
+
var RequestedDataError = function () { return (react_1.default.createElement(EmptyState_1.EmptyState, { LogoRenderer: EmptyState_1.EMPTY_STATE_ICONS.ERROR, text: ui_i18n_1.default.text('Something went wrong'), variant: EmptyState_1.EMPTY_STATE_VARIANTS.full })); };
|
|
29
|
+
var RequestedDataLoaded = function (_a) {
|
|
30
|
+
var isResponseEmpty = _a.isResponseEmpty, children = _a.children;
|
|
31
|
+
return isResponseEmpty ? (react_1.default.createElement(EmptySearchResult_1.EmptySearchResult, { variant: "noData", className: RequestedData_module_css_1.default.noData })) : (react_1.default.createElement(ErrorBoundary_1.ErrorBoundary, { error: react_1.default.createElement(RequestedDataError, null) }, children));
|
|
32
|
+
};
|
|
33
|
+
var RequestedDataLoading = function () { return react_1.default.createElement(LinearLoadIndicator_1.LinearLoadIndicator, null); };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"noData":"RequestedData-noData--H4sHo"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
5
|
+
style.type = 'text/css'
|
|
6
|
+
style.innerHTML = `.RequestedData-noData--H4sHo{padding:16px 24px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RequestedData } from './RequestedData';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestedData = void 0;
|
|
4
|
+
var RequestedData_1 = require("./RequestedData");
|
|
5
|
+
Object.defineProperty(exports, "RequestedData", { enumerable: true, get: function () { return RequestedData_1.RequestedData; } });
|
|
@@ -16,6 +16,7 @@ var SearchActivity_1 = require("./components/SearchActivity");
|
|
|
16
16
|
var SimpleActivity_1 = require("./components/SimpleActivity");
|
|
17
17
|
var SynchronizationIssuesActivity_1 = require("./components/SynchronizationIssuesActivity");
|
|
18
18
|
var SegmentActivity_1 = require("./components/SegmentActivity");
|
|
19
|
+
var InteractionActivity_1 = require("./components/InteractionActivity");
|
|
19
20
|
var Add_1 = __importDefault(require("../../../icons/Add"));
|
|
20
21
|
var CalendarToday_1 = __importDefault(require("@mui/icons-material/CalendarToday"));
|
|
21
22
|
var Comment_1 = __importDefault(require("../../../icons/Comment"));
|
|
@@ -69,6 +70,9 @@ var ActivitiesFactory = /** @class */ (function () {
|
|
|
69
70
|
case types_1.ActivityTypes.SEGMENT_DELETE:
|
|
70
71
|
case types_1.ActivityTypes.SEGMENT_UPDATE:
|
|
71
72
|
return react_1.default.createElement(SegmentActivity_1.SegmentActivity, { data: data, type: type });
|
|
73
|
+
case types_1.ActivityTypes.INTERACTION_CREATE:
|
|
74
|
+
case types_1.ActivityTypes.INTERACTION_UPDATE:
|
|
75
|
+
return react_1.default.createElement(InteractionActivity_1.InteractionActivity, { data: data, type: type });
|
|
72
76
|
case types_1.ActivityTypes.USER_LOGIN:
|
|
73
77
|
case types_1.ActivityTypes.USER_LOGOUT:
|
|
74
78
|
case types_1.ActivityTypes.MODEL_UPDATED:
|
|
@@ -105,6 +109,7 @@ var ActivitiesFactory = /** @class */ (function () {
|
|
|
105
109
|
case types_1.ActivityTypes.RELATIONSHIP_CREATED:
|
|
106
110
|
case types_1.ActivityTypes.GROUP_CREATED:
|
|
107
111
|
case types_1.ActivityTypes.SEGMENT_CREATE:
|
|
112
|
+
case types_1.ActivityTypes.INTERACTION_CREATE:
|
|
108
113
|
return react_1.default.createElement(Add_1.default, null);
|
|
109
114
|
case types_1.ActivityTypes.ENTITY_REMOVED:
|
|
110
115
|
case types_1.ActivityTypes.RELATIONSHIP_REMOVED:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InteractionActivity = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var CollapsibleActivityRecords_1 = require("../../../CollapsibleActivityRecords");
|
|
9
|
+
var InteractionRecord_1 = require("../../../InteractionRecord");
|
|
10
|
+
var ActivityTitle_1 = require("../../../ActivityTitle");
|
|
11
|
+
var emptyArray = [];
|
|
12
|
+
var InteractionActivity = function (_a) {
|
|
13
|
+
var _b, _c, _d;
|
|
14
|
+
var data = _a.data, type = _a.type;
|
|
15
|
+
var isMinimized = data.itemsTotal === 1 && !((_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.deltaCollection) === null || _d === void 0 ? void 0 : _d.delta);
|
|
16
|
+
return (react_1.default.createElement("div", { "data-reltio-id": "interaction-activity" },
|
|
17
|
+
react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "segment-activity-title" }),
|
|
18
|
+
!isMinimized && (react_1.default.createElement(CollapsibleActivityRecords_1.CollapsibleActivityRecords, { activityUri: data.uri, items: data.items || emptyArray, RecordComponent: InteractionRecord_1.InteractionRecord }))));
|
|
19
|
+
};
|
|
20
|
+
exports.InteractionActivity = InteractionActivity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InteractionActivity } from './InteractionActivity';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InteractionActivity = void 0;
|
|
4
|
+
var InteractionActivity_1 = require("./InteractionActivity");
|
|
5
|
+
Object.defineProperty(exports, "InteractionActivity", { enumerable: true, get: function () { return InteractionActivity_1.InteractionActivity; } });
|
|
@@ -41,6 +41,7 @@ var otherTypes = [
|
|
|
41
41
|
'SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE'
|
|
42
42
|
];
|
|
43
43
|
var segmentTypes = ['SEGMENT_CREATE', 'SEGMENT_DELETE', 'SEGMENT_UPDATE'];
|
|
44
|
+
var interactionTypes = ['INTERACTION_CREATE', 'INTERACTION_UPDATE'];
|
|
44
45
|
var profileTypes = [
|
|
45
46
|
'ENTITY_CREATED',
|
|
46
47
|
'ENTITY_CHANGED',
|
|
@@ -64,7 +65,7 @@ describe('helpers tests', function () {
|
|
|
64
65
|
var metadata = {
|
|
65
66
|
entityTypes: []
|
|
66
67
|
};
|
|
67
|
-
expect((0, helpers_1.getSelectorActivityTypes)(metadata)).toEqual(__spreadArray(__spreadArray([], otherTypes, true), segmentTypes, true));
|
|
68
|
+
expect((0, helpers_1.getSelectorActivityTypes)(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), segmentTypes, true), interactionTypes, true));
|
|
68
69
|
});
|
|
69
70
|
it('should return ActivityTypes with groupRelated when groupTypes is not empty', function () {
|
|
70
71
|
var metadata = {
|
|
@@ -88,7 +89,7 @@ describe('helpers tests', function () {
|
|
|
88
89
|
}
|
|
89
90
|
]
|
|
90
91
|
};
|
|
91
|
-
expect((0, helpers_1.getSelectorActivityTypes)(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), groupTypes, true), segmentTypes, true));
|
|
92
|
+
expect((0, helpers_1.getSelectorActivityTypes)(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), groupTypes, true), segmentTypes, true), interactionTypes, true));
|
|
92
93
|
});
|
|
93
94
|
it('should return profile related ActivityTypes when entityType passed', function () {
|
|
94
95
|
var metadata = {
|
|
@@ -25,7 +25,7 @@ var buildGroupedItem = function (_a) {
|
|
|
25
25
|
};
|
|
26
26
|
var getDay = function (_a) {
|
|
27
27
|
var timestamp = _a.timestamp;
|
|
28
|
-
return (0, moment_1.default)(timestamp).startOf('day');
|
|
28
|
+
return (0, moment_1.default)(timestamp).startOf('day').format('YYYY-MM-DD');
|
|
29
29
|
};
|
|
30
30
|
exports.buildGroupedItems = (0, ramda_1.pipe)((0, ramda_1.groupBy)(getDay), ramda_1.toPairs, (0, ramda_1.map)(buildGroupedItem));
|
|
31
31
|
var chainIndexed = (0, ramda_1.addIndex)(ramda_1.chain);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InteractionRecord = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var Record_1 = require("../Record");
|
|
9
|
+
var RecordUpdates_1 = require("../RecordUpdates");
|
|
10
|
+
var InteractionRecord = function (_a) {
|
|
11
|
+
var _b;
|
|
12
|
+
var item = _a.item;
|
|
13
|
+
var updates = (_b = item === null || item === void 0 ? void 0 : item.deltaCollection) === null || _b === void 0 ? void 0 : _b.delta;
|
|
14
|
+
return (updates === null || updates === void 0 ? void 0 : updates.length) > 0 ? (react_1.default.createElement(Record_1.Record, null,
|
|
15
|
+
react_1.default.createElement(RecordUpdates_1.RecordUpdates, { updates: updates, recordId: item.id }))) : null;
|
|
16
|
+
};
|
|
17
|
+
exports.InteractionRecord = InteractionRecord;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InteractionRecord } from './InteractionRecord';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InteractionRecord = void 0;
|
|
4
|
+
var InteractionRecord_1 = require("./InteractionRecord");
|
|
5
|
+
Object.defineProperty(exports, "InteractionRecord", { enumerable: true, get: function () { return InteractionRecord_1.InteractionRecord; } });
|
|
@@ -33,7 +33,9 @@ export declare enum ActivityTypes {
|
|
|
33
33
|
GROUP_CHANGED = "GROUP_CHANGED",
|
|
34
34
|
SEGMENT_CREATE = "SEGMENT_CREATE",
|
|
35
35
|
SEGMENT_DELETE = "SEGMENT_DELETE",
|
|
36
|
-
SEGMENT_UPDATE = "SEGMENT_UPDATE"
|
|
36
|
+
SEGMENT_UPDATE = "SEGMENT_UPDATE",
|
|
37
|
+
INTERACTION_CREATE = "INTERACTION_CREATE",
|
|
38
|
+
INTERACTION_UPDATE = "INTERACTION_UPDATE"
|
|
37
39
|
}
|
|
38
40
|
export type ActivitiesFilter = {
|
|
39
41
|
users: string[];
|
|
@@ -36,6 +36,8 @@ var ActivityTypes;
|
|
|
36
36
|
ActivityTypes["SEGMENT_CREATE"] = "SEGMENT_CREATE";
|
|
37
37
|
ActivityTypes["SEGMENT_DELETE"] = "SEGMENT_DELETE";
|
|
38
38
|
ActivityTypes["SEGMENT_UPDATE"] = "SEGMENT_UPDATE";
|
|
39
|
+
ActivityTypes["INTERACTION_CREATE"] = "INTERACTION_CREATE";
|
|
40
|
+
ActivityTypes["INTERACTION_UPDATE"] = "INTERACTION_UPDATE";
|
|
39
41
|
})(ActivityTypes || (exports.ActivityTypes = ActivityTypes = {}));
|
|
40
42
|
var DeltaTypes;
|
|
41
43
|
(function (DeltaTypes) {
|
|
@@ -101,6 +101,8 @@ var getActivityLabel = function (type) {
|
|
|
101
101
|
_a[types_1.ActivityTypes.SEGMENT_CREATE] = ui_i18n_1.default.text('Segment created'),
|
|
102
102
|
_a[types_1.ActivityTypes.SEGMENT_UPDATE] = ui_i18n_1.default.text('Segment updated'),
|
|
103
103
|
_a[types_1.ActivityTypes.SEGMENT_DELETE] = ui_i18n_1.default.text('Segment deleted'),
|
|
104
|
+
_a[types_1.ActivityTypes.INTERACTION_CREATE] = ui_i18n_1.default.text('Interaction created'),
|
|
105
|
+
_a[types_1.ActivityTypes.INTERACTION_UPDATE] = ui_i18n_1.default.text('Interaction updated'),
|
|
104
106
|
_a);
|
|
105
107
|
return labels[type] || '';
|
|
106
108
|
};
|
|
@@ -45,6 +45,8 @@ export declare const HistoryChangeTypes: {
|
|
|
45
45
|
SEGMENT_CREATE: ActivityTypes.SEGMENT_CREATE;
|
|
46
46
|
SEGMENT_DELETE: ActivityTypes.SEGMENT_DELETE;
|
|
47
47
|
SEGMENT_UPDATE: ActivityTypes.SEGMENT_UPDATE;
|
|
48
|
+
INTERACTION_CREATE: ActivityTypes.INTERACTION_CREATE;
|
|
49
|
+
INTERACTION_UPDATE: ActivityTypes.INTERACTION_UPDATE;
|
|
48
50
|
};
|
|
49
51
|
export type HistoryChangeTypes = typeof HistoryChangeTypes;
|
|
50
52
|
export declare enum HistoryActivityType {
|
package/cjs/index.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ export { QuickFiltersEntityTypeFacet } from './QuickFiltersEntityTypeFacet';
|
|
|
195
195
|
export { FacetGroupTitle } from './FacetGroupTitle';
|
|
196
196
|
export { FacetsSelector } from './FacetsSelector';
|
|
197
197
|
export { FacetContainer } from './FacetContainer';
|
|
198
|
+
export { RequestedData } from './RequestedData';
|
|
198
199
|
export { withTooltip } from './HOCs/withTooltip';
|
|
199
200
|
export { withAsyncMount } from './HOCs/withAsyncMount';
|
|
200
201
|
export { withDragHandle } from './HOCs/withDragHandle';
|
package/cjs/index.js
CHANGED
|
@@ -18,10 +18,10 @@ exports.NestedAttribute = exports.MoreAttributesButton = exports.InlineReference
|
|
|
18
18
|
exports.ReactSelectMenuList = exports.ReactSelectLoadMoreButton = exports.ReactSelectDropdownIndicatorWithIconButton = exports.ReactSelectDropdownIndicator = exports.Highlighter = exports.HierarchyNodeTitle = exports.HierarchicalAttributeTooltip = exports.HideOnShrink = exports.ExpandableSearchInput = exports.ErrorPopup = exports.ErrorBoundary = exports.SegmentIdLink = exports.EntityUriLink = exports.EntityTypesSelector = exports.EntityTypeIcon = exports.EntityTypeBadge = exports.EntityAvatar = exports.EMPTY_STATE_VARIANTS = exports.EMPTY_STATE_ICONS = exports.EmptyState = exports.Drawer = exports.DataTypeValue = exports.DataTenantBadge = exports.ConnectionRelationTypeSelector = exports.CollaborationItem = exports.ConfirmationDialog = exports.CommentsContainer = exports.ColoredSourceIcon = exports.CollapseButton = exports.TreeChart = exports.TableWithBars = exports.SourceIcon = exports.SmallIconButtonWithTooltip = exports.SmallIconButton = exports.SimpleAttributeEditor = exports.SimpleAttribute = exports.RowCellChips = exports.RowCellChipWithTooltip = exports.RowCellAutoSizer = exports.RelationTypeSelector = exports.ReferenceAttributeEditor = exports.ReferenceAttribute = exports.ImageAttributesLine = exports.ReadOnlyAttributesPager = exports.ReadOnlyAttributesList = exports.ReadOnlyAttribute = exports.ReadOnlyAttributeValuesBlock = exports.PieChart = exports.OvIcon = exports.NestedAttributeEditor = void 0;
|
|
19
19
|
exports.LoadingSpinner = exports.Link = exports.LinearLoadIndicator = exports.ImportButton = exports.ReadableSearchQueryBuilder = exports.ReadableSearchQuery = exports.LogicOperatorWithPlaceholder = exports.LogicOperator = exports.TableSkeleton = exports.StepNavigation = exports.TenantLabel = exports.RelevanceScoreBadge = exports.RequiredMark = exports.SettingsMenu = exports.TenantsDropDownSelector = exports.TenantIcon = exports.SourceSystemsSelector = exports.MatchRulesSelector = exports.MultiValueSelector = exports.ProfilesList = exports.NotMatchButton = exports.MergeButton = exports.ProfileMatchCard = exports.ImageGalleryDialog = exports.RelationTypesSelector = exports.ScreenProfileBand = exports.ProfileBandNavigation = exports.EmptyStub = exports.MaskingSwitcher = exports.FileTypeEditor = exports.EmptySearchResult = exports.DropDownEditor = exports.FilterValueEditor = exports.MultiValueChip = exports.TextEditor = exports.DateRangeEditor = exports.NumberEditor = exports.DataTypeValueEditor = exports.DateEditor = exports.ErrorWrapper = exports.ErrorMessage = exports.HIDE = exports.INSERT_RIGHT = exports.INSERT_LEFT = exports.ConfigColumnPopup = exports.ConfigureColumnsPopup = exports.ConnectionEditor = exports.DropDownSelector = exports.ReactSelectOptionWithCheckIcon = exports.ReactSelectMenuWithPopper = void 0;
|
|
20
20
|
exports.DefaultHeadCellRendererWithTooltip = exports.LazyRenderer = exports.MetadataTypesSelector = exports.DateRangeSelector = exports.UpSetChart = exports.GaugeChart = exports.RelationEditor = exports.ReltioMap = exports.Marginator = exports.LightArrowTooltip = exports.ScrollableTabs = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SimpleDropDownSelector = exports.SidePanelContentHeader = exports.SidePanel = exports.SidePanelEmptyState = exports.SideButtonsPanel = exports.SelectorWithOnlyOptionAutoSelect = exports.SelectionPopup = exports.WhiteSearchInput = exports.SearchInput = exports.ProfileResizablePanes = exports.ResizablePanes = exports.ReltioGridLayout = exports.RCTreeSwitchRenderer = exports.RCTreeLevelLines = exports.RCTree = exports.reactSortableTreeHelpers = exports.ReactSortableTree = exports.MultiSelect = exports.QueryBuilderRowsGroup = exports.QueryBuilderRow = exports.ProfileCard = exports.ProfileBand = exports.PotentialMatchReviewCard = exports.PopupWithArrow = exports.Popper = exports.MultipleInput = exports.ModeSwitcherSelect = exports.ModeSwitcher = exports.TransitiveMatchBlock = exports.SimpleMatchRulesBuilder = exports.SimpleMatchRulesBlock = exports.SimpleMatchRules = exports.MatchRulesBlock = void 0;
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.mockComputedStyles = exports.FakeMouseEvent = exports.rerenderWrapper = exports.mockElementSizes = exports.fixClicksOnResizablePanes = exports.mockBasicTableSizing = exports.getMuiIconsByName = exports.getMuiIconByName = exports.deepFreeze = exports.awaitMockPromises = exports.TestStylesProvider = void 0;
|
|
21
|
+
exports.RelationContext = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.useEntityLoadingIndication = exports.EntityLoadingIndicationProvider = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = exports.usePerspectivesSettings = exports.PerspectivesSettingsContext = exports.PivotingAttributeContext = exports.UsersContext = exports.InitialCollaborationContextValue = exports.CollaborationContextProvider = exports.CollaborationContext = exports.BlockNavigationContext = exports.BlockImageGalleryDialogContext = exports.PopupBoundariesContext = exports.HistoryDiffContext = exports.AsyncMountContext = exports.MdmModuleProvider = exports.withColumnConfigurator = exports.withBlockNavigation = exports.withCollapseButton = exports.withTableContext = exports.withFilterAtBottom = exports.withPercents = exports.withContext = exports.withDateRangeSelector = exports.withDragHandle = exports.withAsyncMount = exports.withTooltip = exports.RequestedData = exports.FacetContainer = exports.FacetsSelector = exports.FacetGroupTitle = exports.QuickFiltersEntityTypeFacet = exports.FacetGroup = exports.QuickFiltersFacetPanel = exports.AdvancedSearchFabButton = exports.QuickFiltersDrawer = void 0;
|
|
22
|
+
exports.useSavedState = exports.useSafePromise = exports.useRunOnceAfterValueInitialization = exports.useRelationsLoader = exports.useRelationTypeSelector = exports.usePrevious = exports.useDidUpdateEffect = exports.useCommentsEntitiesMap = exports.useCollaboration = exports.useAsyncMount = exports.useAPI = exports.useActions = exports.useMatchesColumnsData = exports.useScrollToAttributeError = exports.ThemeProvider = exports.ProfileTablesContext = exports.HiddenAttributesContext = exports.BasicTableContext = exports.BasicTableRowCollapseContext = exports.useDeleteUnmaskedAttributeForRelation = exports.useUnmaskedAttributeValue = exports.useUnmaskAttributeValue = exports.useMaskAttributeValue = exports.MaskedAttributesProvider = exports.useReloadData = exports.ReloadDataProvider = exports.useAttributeValueConfigPermissions = exports.ConfigPermissionsContextProvider = exports.ConfigPermissionsContext = exports.useActionsHook = exports.ActionsHookProvider = exports.PageRequestsAbortingContext = exports.DependentLookupAutopopulationContext = exports.FeaturesContext = exports.LabelsContext = exports.UrlGeneratorsContext = exports.isHighlightedAttributeType = exports.isHighlightedErrorType = exports.ScrollType = exports.ScrollToElementProvider = exports.ScrollToElementContext = exports.SearchValueContext = exports.InterceptHandlersContext = exports.HighlightedValuesContext = exports.SnackbarContext = exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.SandboxAPIContext = void 0;
|
|
23
|
+
exports.getAttrPathFromColumnId = exports.getAttributeHeight = exports.getNestedPathByColumnId = exports.applyCompactValuesCountConstraint = exports.getAttributeSelectorItems = exports.mergeClasses = exports.isControlOrCommandPressed = exports.getValue = exports.getChecked = exports.showErrorMessage = exports.showDefaultErrorMessage = exports.enrichDataWithPercents = exports.defaultRenderRowCell = exports.defaultGetRowCellHeight = exports.columnFilterToMdmFilter = exports.buildColumnsSizeById = exports.buildColumnsFilter = exports.useTableColumns = exports.useSegmentsLoader = exports.useDndBasicTableScrollModifier = exports.useDynamicYAxisWidth = exports.useFilterAutoFocus = exports.useSegmentationRequest = exports.resolveMarkers = exports.useMarkers = exports.useMaskedAttribute = exports.useKeyboardNavigation = exports.useDynamicRowCellHeight = exports.useClickableStyle = exports.BasicTableCellRenderer = exports.useBasicTableCellRenderer = exports.useHiddenAttributes = exports.useSavedSearchesRequest = exports.useRequestDCRReview = exports.useAutoFocus = exports.useExpandInvalidRelations = exports.useLayoutResetter = exports.useIsMountedRef = exports.useSnackbar = exports.useSavedStateForEntityType = exports.useReadableSearchState = exports.useEditableConnection = exports.useCustomScripts = exports.useMarkAsNotMatchRequest = exports.useMergeAllRequest = exports.usePagingSimulator = exports.useMatchesLoader = exports.useConfigPermissions = exports.useWhyDidYouUpdate = exports.useUsers = void 0;
|
|
24
|
+
exports.mockComputedStyles = exports.FakeMouseEvent = exports.rerenderWrapper = exports.mockElementSizes = exports.fixClicksOnResizablePanes = exports.mockBasicTableSizing = exports.getMuiIconsByName = exports.getMuiIconByName = exports.deepFreeze = exports.awaitMockPromises = exports.TestStylesProvider = exports.TestPerspectivesSettingsProvider = void 0;
|
|
25
25
|
// components
|
|
26
26
|
var ActionButton_1 = require("./ActionButton");
|
|
27
27
|
Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function () { return ActionButton_1.ActionButton; } });
|
|
@@ -427,6 +427,8 @@ var FacetsSelector_1 = require("./FacetsSelector");
|
|
|
427
427
|
Object.defineProperty(exports, "FacetsSelector", { enumerable: true, get: function () { return FacetsSelector_1.FacetsSelector; } });
|
|
428
428
|
var FacetContainer_1 = require("./FacetContainer");
|
|
429
429
|
Object.defineProperty(exports, "FacetContainer", { enumerable: true, get: function () { return FacetContainer_1.FacetContainer; } });
|
|
430
|
+
var RequestedData_1 = require("./RequestedData");
|
|
431
|
+
Object.defineProperty(exports, "RequestedData", { enumerable: true, get: function () { return RequestedData_1.RequestedData; } });
|
|
430
432
|
// HOCs
|
|
431
433
|
var withTooltip_1 = require("./HOCs/withTooltip");
|
|
432
434
|
Object.defineProperty(exports, "withTooltip", { enumerable: true, get: function () { return withTooltip_1.withTooltip; } });
|
|
@@ -10,6 +10,7 @@ import { SearchActivity } from './components/SearchActivity';
|
|
|
10
10
|
import { SimpleActivity } from './components/SimpleActivity';
|
|
11
11
|
import { SynchronizationIssuesActivity } from './components/SynchronizationIssuesActivity';
|
|
12
12
|
import { SegmentActivity } from './components/SegmentActivity';
|
|
13
|
+
import { InteractionActivity } from './components/InteractionActivity';
|
|
13
14
|
import AddIcon from '../../../icons/Add';
|
|
14
15
|
import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
|
|
15
16
|
import CommentIcon from '../../../icons/Comment';
|
|
@@ -63,6 +64,9 @@ var ActivitiesFactory = /** @class */ (function () {
|
|
|
63
64
|
case ActivityTypes.SEGMENT_DELETE:
|
|
64
65
|
case ActivityTypes.SEGMENT_UPDATE:
|
|
65
66
|
return React.createElement(SegmentActivity, { data: data, type: type });
|
|
67
|
+
case ActivityTypes.INTERACTION_CREATE:
|
|
68
|
+
case ActivityTypes.INTERACTION_UPDATE:
|
|
69
|
+
return React.createElement(InteractionActivity, { data: data, type: type });
|
|
66
70
|
case ActivityTypes.USER_LOGIN:
|
|
67
71
|
case ActivityTypes.USER_LOGOUT:
|
|
68
72
|
case ActivityTypes.MODEL_UPDATED:
|
|
@@ -99,6 +103,7 @@ var ActivitiesFactory = /** @class */ (function () {
|
|
|
99
103
|
case ActivityTypes.RELATIONSHIP_CREATED:
|
|
100
104
|
case ActivityTypes.GROUP_CREATED:
|
|
101
105
|
case ActivityTypes.SEGMENT_CREATE:
|
|
106
|
+
case ActivityTypes.INTERACTION_CREATE:
|
|
102
107
|
return React.createElement(AddIcon, null);
|
|
103
108
|
case ActivityTypes.ENTITY_REMOVED:
|
|
104
109
|
case ActivityTypes.RELATIONSHIP_REMOVED:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CollapsibleActivityRecords } from '../../../CollapsibleActivityRecords';
|
|
3
|
+
import { InteractionRecord } from '../../../InteractionRecord';
|
|
4
|
+
import { ActivityTitle } from '../../../ActivityTitle';
|
|
5
|
+
var emptyArray = [];
|
|
6
|
+
export var InteractionActivity = function (_a) {
|
|
7
|
+
var _b, _c, _d;
|
|
8
|
+
var data = _a.data, type = _a.type;
|
|
9
|
+
var isMinimized = data.itemsTotal === 1 && !((_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.deltaCollection) === null || _d === void 0 ? void 0 : _d.delta);
|
|
10
|
+
return (React.createElement("div", { "data-reltio-id": "interaction-activity" },
|
|
11
|
+
React.createElement(ActivityTitle, { type: type, "data-reltio-id": "segment-activity-title" }),
|
|
12
|
+
!isMinimized && (React.createElement(CollapsibleActivityRecords, { activityUri: data.uri, items: data.items || emptyArray, RecordComponent: InteractionRecord }))));
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InteractionActivity } from './InteractionActivity';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InteractionActivity } from './InteractionActivity';
|
|
@@ -39,6 +39,7 @@ var otherTypes = [
|
|
|
39
39
|
'SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE'
|
|
40
40
|
];
|
|
41
41
|
var segmentTypes = ['SEGMENT_CREATE', 'SEGMENT_DELETE', 'SEGMENT_UPDATE'];
|
|
42
|
+
var interactionTypes = ['INTERACTION_CREATE', 'INTERACTION_UPDATE'];
|
|
42
43
|
var profileTypes = [
|
|
43
44
|
'ENTITY_CREATED',
|
|
44
45
|
'ENTITY_CHANGED',
|
|
@@ -62,7 +63,7 @@ describe('helpers tests', function () {
|
|
|
62
63
|
var metadata = {
|
|
63
64
|
entityTypes: []
|
|
64
65
|
};
|
|
65
|
-
expect(getSelectorActivityTypes(metadata)).toEqual(__spreadArray(__spreadArray([], otherTypes, true), segmentTypes, true));
|
|
66
|
+
expect(getSelectorActivityTypes(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), segmentTypes, true), interactionTypes, true));
|
|
66
67
|
});
|
|
67
68
|
it('should return ActivityTypes with groupRelated when groupTypes is not empty', function () {
|
|
68
69
|
var metadata = {
|
|
@@ -86,7 +87,7 @@ describe('helpers tests', function () {
|
|
|
86
87
|
}
|
|
87
88
|
]
|
|
88
89
|
};
|
|
89
|
-
expect(getSelectorActivityTypes(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), groupTypes, true), segmentTypes, true));
|
|
90
|
+
expect(getSelectorActivityTypes(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), groupTypes, true), segmentTypes, true), interactionTypes, true));
|
|
90
91
|
});
|
|
91
92
|
it('should return profile related ActivityTypes when entityType passed', function () {
|
|
92
93
|
var metadata = {
|
|
@@ -19,7 +19,7 @@ var buildGroupedItem = function (_a) {
|
|
|
19
19
|
};
|
|
20
20
|
var getDay = function (_a) {
|
|
21
21
|
var timestamp = _a.timestamp;
|
|
22
|
-
return moment(timestamp).startOf('day');
|
|
22
|
+
return moment(timestamp).startOf('day').format('YYYY-MM-DD');
|
|
23
23
|
};
|
|
24
24
|
export var buildGroupedItems = pipe(groupBy(getDay), toPairs, map(buildGroupedItem));
|
|
25
25
|
var chainIndexed = addIndex(chain);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Record } from '../Record';
|
|
3
|
+
import { RecordUpdates } from '../RecordUpdates';
|
|
4
|
+
export var InteractionRecord = function (_a) {
|
|
5
|
+
var _b;
|
|
6
|
+
var item = _a.item;
|
|
7
|
+
var updates = (_b = item === null || item === void 0 ? void 0 : item.deltaCollection) === null || _b === void 0 ? void 0 : _b.delta;
|
|
8
|
+
return (updates === null || updates === void 0 ? void 0 : updates.length) > 0 ? (React.createElement(Record, null,
|
|
9
|
+
React.createElement(RecordUpdates, { updates: updates, recordId: item.id }))) : null;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InteractionRecord } from './InteractionRecord';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InteractionRecord } from './InteractionRecord';
|
|
@@ -33,7 +33,9 @@ export declare enum ActivityTypes {
|
|
|
33
33
|
GROUP_CHANGED = "GROUP_CHANGED",
|
|
34
34
|
SEGMENT_CREATE = "SEGMENT_CREATE",
|
|
35
35
|
SEGMENT_DELETE = "SEGMENT_DELETE",
|
|
36
|
-
SEGMENT_UPDATE = "SEGMENT_UPDATE"
|
|
36
|
+
SEGMENT_UPDATE = "SEGMENT_UPDATE",
|
|
37
|
+
INTERACTION_CREATE = "INTERACTION_CREATE",
|
|
38
|
+
INTERACTION_UPDATE = "INTERACTION_UPDATE"
|
|
37
39
|
}
|
|
38
40
|
export type ActivitiesFilter = {
|
|
39
41
|
users: string[];
|
|
@@ -33,6 +33,8 @@ export var ActivityTypes;
|
|
|
33
33
|
ActivityTypes["SEGMENT_CREATE"] = "SEGMENT_CREATE";
|
|
34
34
|
ActivityTypes["SEGMENT_DELETE"] = "SEGMENT_DELETE";
|
|
35
35
|
ActivityTypes["SEGMENT_UPDATE"] = "SEGMENT_UPDATE";
|
|
36
|
+
ActivityTypes["INTERACTION_CREATE"] = "INTERACTION_CREATE";
|
|
37
|
+
ActivityTypes["INTERACTION_UPDATE"] = "INTERACTION_UPDATE";
|
|
36
38
|
})(ActivityTypes || (ActivityTypes = {}));
|
|
37
39
|
export var DeltaTypes;
|
|
38
40
|
(function (DeltaTypes) {
|
|
@@ -90,6 +90,8 @@ export var getActivityLabel = function (type) {
|
|
|
90
90
|
_a[ActivityTypes.SEGMENT_CREATE] = i18n.text('Segment created'),
|
|
91
91
|
_a[ActivityTypes.SEGMENT_UPDATE] = i18n.text('Segment updated'),
|
|
92
92
|
_a[ActivityTypes.SEGMENT_DELETE] = i18n.text('Segment deleted'),
|
|
93
|
+
_a[ActivityTypes.INTERACTION_CREATE] = i18n.text('Interaction created'),
|
|
94
|
+
_a[ActivityTypes.INTERACTION_UPDATE] = i18n.text('Interaction updated'),
|
|
93
95
|
_a);
|
|
94
96
|
return labels[type] || '';
|
|
95
97
|
};
|
|
@@ -45,6 +45,8 @@ export declare const HistoryChangeTypes: {
|
|
|
45
45
|
SEGMENT_CREATE: ActivityTypes.SEGMENT_CREATE;
|
|
46
46
|
SEGMENT_DELETE: ActivityTypes.SEGMENT_DELETE;
|
|
47
47
|
SEGMENT_UPDATE: ActivityTypes.SEGMENT_UPDATE;
|
|
48
|
+
INTERACTION_CREATE: ActivityTypes.INTERACTION_CREATE;
|
|
49
|
+
INTERACTION_UPDATE: ActivityTypes.INTERACTION_UPDATE;
|
|
48
50
|
};
|
|
49
51
|
export type HistoryChangeTypes = typeof HistoryChangeTypes;
|
|
50
52
|
export declare enum HistoryActivityType {
|
package/index.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ export { QuickFiltersEntityTypeFacet } from './QuickFiltersEntityTypeFacet';
|
|
|
195
195
|
export { FacetGroupTitle } from './FacetGroupTitle';
|
|
196
196
|
export { FacetsSelector } from './FacetsSelector';
|
|
197
197
|
export { FacetContainer } from './FacetContainer';
|
|
198
|
+
export { RequestedData } from './RequestedData';
|
|
198
199
|
export { withTooltip } from './HOCs/withTooltip';
|
|
199
200
|
export { withAsyncMount } from './HOCs/withAsyncMount';
|
|
200
201
|
export { withDragHandle } from './HOCs/withDragHandle';
|
package/index.js
CHANGED
|
@@ -195,6 +195,7 @@ export { QuickFiltersEntityTypeFacet } from './QuickFiltersEntityTypeFacet';
|
|
|
195
195
|
export { FacetGroupTitle } from './FacetGroupTitle';
|
|
196
196
|
export { FacetsSelector } from './FacetsSelector';
|
|
197
197
|
export { FacetContainer } from './FacetContainer';
|
|
198
|
+
export { RequestedData } from './RequestedData';
|
|
198
199
|
// HOCs
|
|
199
200
|
export { withTooltip } from './HOCs/withTooltip';
|
|
200
201
|
export { withAsyncMount } from './HOCs/withAsyncMount';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2201",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.2004",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|