@reltio/components 1.4.2243 → 1.4.2245
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/ActivenessDateControl/ActivenessDateControl.d.ts +9 -0
- package/ActivenessDateControl/ActivenessDateControl.js +11 -0
- package/ActivenessDateControl/index.d.ts +1 -0
- package/ActivenessDateControl/index.js +1 -0
- package/EntitySelector/EntitySelector.d.ts +2 -1
- package/EntitySelector/EntitySelector.js +2 -2
- package/EntitySelector/index.d.ts +1 -0
- package/MoreAttributesButton/MoreAttributesButton.d.ts +3 -2
- package/MoreAttributesButton/MoreAttributesButton.js +8 -8
- package/MoreAttributesButton/useMoreAttributesItems.d.ts +4 -4
- package/cjs/ActivenessDateControl/ActivenessDateControl.d.ts +9 -0
- package/cjs/ActivenessDateControl/ActivenessDateControl.js +18 -0
- package/cjs/ActivenessDateControl/index.d.ts +1 -0
- package/cjs/ActivenessDateControl/index.js +5 -0
- package/cjs/EntitySelector/EntitySelector.d.ts +2 -1
- package/cjs/EntitySelector/EntitySelector.js +2 -2
- package/cjs/EntitySelector/index.d.ts +1 -0
- package/cjs/MoreAttributesButton/MoreAttributesButton.d.ts +3 -2
- package/cjs/MoreAttributesButton/MoreAttributesButton.js +8 -8
- package/cjs/MoreAttributesButton/useMoreAttributesItems.d.ts +4 -4
- package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +28 -0
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.js +22 -11
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.module.css.js +9 -0
- package/cjs/features/activity-log/ActivityLog/constants.d.ts +17 -0
- package/cjs/features/activity-log/ActivityLog/constants.js +20 -0
- package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.d.ts +1 -1
- package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +20 -9
- package/cjs/features/workflow/ChangeRequestEditor/components/AddSameAttributeButton/AddSameAttributeButton.d.ts +7 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/AddSameAttributeButton/AddSameAttributeButton.js +67 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/ChangeItemLabel.js +3 -1
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/ChangeItemLabel.module.css.js +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +31 -9
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.module.css.js +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/DCRImageEditor/DCRImageEditor.d.ts +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/DCRImageEditor/DCRImageEditor.js +79 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/DCRImageEditor/index.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/DCRImageEditor/index.js +5 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/DCRValueEditorFactory.d.ts +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/DCRValueEditorFactory.js +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.d.ts +11 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.js +41 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.module.css.js +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/EditorStatusChip/index.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/EditorStatusChip/index.js +6 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.d.ts +1 -1
- package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +134 -5
- package/cjs/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/SkeletonEntityChangesGroupLoader.js +2 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/ChangeItemEditor.d.ts +1 -1
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditor/ChangeItemEditor.js +110 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditor/ChangeItemEditor.module.css.js +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/SkeletonChangeItemEditorLoader.js +6 -5
- package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/index.d.ts +0 -1
- package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/index.js +1 -3
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/ChangeItemEditorRecentlyAdded.d.ts +8 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/ChangeItemEditorRecentlyAdded.js +89 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/index.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/index.js +5 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemOldValue}/ChangeItemOldValue.d.ts +1 -1
- package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemOldValue}/ChangeItemOldValue.js +12 -11
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemOldValue/ChangeItemOldValue.module.css.js +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemOldValue/index.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/ChangeItemOldValue/index.js +5 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/MoreAttributesEditor.d.ts +11 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/MoreAttributesEditor.js +34 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/MoreAttributesEditor.module.css.js +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/index.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/index.js +5 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/editors.module.css.js +9 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/index.d.ts +4 -0
- package/cjs/features/workflow/ChangeRequestEditor/components/editors/index.js +12 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/addedAttributes.d.ts +11 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/addedAttributes.js +74 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.d.ts +2 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.js +157 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/changesList.test.js +203 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +6 -3
- package/cjs/features/workflow/ChangeRequestEditor/helpers/helpers.js +22 -3
- package/cjs/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.d.ts +3 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.js +190 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.test.d.ts +1 -0
- package/cjs/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.test.js +768 -0
- package/cjs/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.d.ts +4 -3
- package/cjs/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.js +9 -1
- package/cjs/features/workflow/ChangeRequestEditor/hooks/useNewAttributesEditor.d.ts +18 -0
- package/cjs/features/workflow/ChangeRequestEditor/hooks/useNewAttributesEditor.js +65 -0
- package/cjs/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +7 -3
- package/cjs/features/workflow/contexts/AddedAttributesContext/index.d.ts +39 -0
- package/cjs/features/workflow/contexts/AddedAttributesContext/index.js +152 -0
- package/cjs/features/workflow/contexts/ChangeRequestEditorContext/index.d.ts +3 -2
- package/cjs/features/workflow/contexts/ChangeRequestEditorContext/index.js +47 -7
- package/cjs/features/workflow/contexts/ScrollToAddedAttributeContext/index.d.ts +11 -0
- package/cjs/features/workflow/contexts/ScrollToAddedAttributeContext/index.js +78 -0
- package/cjs/features/workflow/helpers/attributes.js +16 -13
- package/cjs/features/workflow/helpers/attributes.test.js +6 -3
- package/cjs/features/workflow/helpers/dcr.d.ts +6 -1
- package/cjs/features/workflow/helpers/dcr.js +123 -19
- package/cjs/features/workflow/helpers/dcr.test.js +171 -0
- package/cjs/features/workflow/helpers/merge.d.ts +3 -0
- package/cjs/features/workflow/helpers/merge.js +32 -20
- package/cjs/features/workflow/helpers/merge.test.js +2 -1
- package/cjs/features/workflow/helpers/moreAttributesScope.d.ts +4 -0
- package/cjs/features/workflow/helpers/moreAttributesScope.js +20 -0
- package/cjs/features/workflow/helpers/validation.js +31 -6
- package/cjs/features/workflow/hooks/useApplyDcrChanges.d.ts +2 -2
- package/cjs/features/workflow/hooks/useApplyDcrChanges.js +80 -63
- package/cjs/features/workflow/types.d.ts +12 -2
- package/features/activity-log/ActivityLog/ActivityLog.test.js +28 -0
- package/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.js +15 -4
- package/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.module.css.js +9 -0
- package/features/activity-log/ActivityLog/constants.d.ts +17 -0
- package/features/activity-log/ActivityLog/constants.js +17 -0
- package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.d.ts +1 -1
- package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +20 -9
- package/features/workflow/ChangeRequestEditor/components/AddSameAttributeButton/AddSameAttributeButton.d.ts +7 -0
- package/features/workflow/ChangeRequestEditor/components/AddSameAttributeButton/AddSameAttributeButton.js +37 -0
- package/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/ChangeItemLabel.js +3 -1
- package/features/workflow/ChangeRequestEditor/components/ChangeItemLabel/ChangeItemLabel.module.css.js +2 -2
- package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.d.ts +2 -2
- package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.js +32 -10
- package/features/workflow/ChangeRequestEditor/components/ChangeItemRow/ChangeItemRow.module.css.js +2 -2
- package/features/workflow/ChangeRequestEditor/components/DCRImageEditor/DCRImageEditor.d.ts +9 -0
- package/features/workflow/ChangeRequestEditor/components/DCRImageEditor/DCRImageEditor.js +49 -0
- package/features/workflow/ChangeRequestEditor/components/DCRImageEditor/index.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/components/DCRImageEditor/index.js +1 -0
- package/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/DCRValueEditorFactory.d.ts +2 -2
- package/features/workflow/ChangeRequestEditor/components/DCRValueEditorFactory/DCRValueEditorFactory.js +2 -2
- package/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.d.ts +11 -0
- package/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.js +34 -0
- package/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.module.css.js +9 -0
- package/features/workflow/ChangeRequestEditor/components/EditorStatusChip/index.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/components/EditorStatusChip/index.js +1 -0
- package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.d.ts +1 -1
- package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/EntityChangesGroup.js +112 -6
- package/features/workflow/ChangeRequestEditor/components/EntityChangesGroup/SkeletonEntityChangesGroupLoader.js +1 -1
- package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/ChangeItemEditor.d.ts +1 -1
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditor/ChangeItemEditor.js +80 -0
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditor/ChangeItemEditor.module.css.js +9 -0
- package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/SkeletonChangeItemEditorLoader.js +6 -5
- package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/index.d.ts +0 -1
- package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/index.js +0 -1
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/ChangeItemEditorRecentlyAdded.d.ts +8 -0
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/ChangeItemEditorRecentlyAdded.js +59 -0
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/index.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemEditorRecentlyAdded/index.js +1 -0
- package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemOldValue}/ChangeItemOldValue.d.ts +1 -1
- package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemOldValue}/ChangeItemOldValue.js +10 -9
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemOldValue/ChangeItemOldValue.module.css.js +9 -0
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemOldValue/index.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/components/editors/ChangeItemOldValue/index.js +1 -0
- package/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/MoreAttributesEditor.d.ts +11 -0
- package/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/MoreAttributesEditor.js +27 -0
- package/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/MoreAttributesEditor.module.css.js +9 -0
- package/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/index.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/components/editors/MoreAttributesEditor/index.js +1 -0
- package/features/workflow/ChangeRequestEditor/components/editors/editors.module.css.js +9 -0
- package/features/workflow/ChangeRequestEditor/components/editors/index.d.ts +4 -0
- package/features/workflow/ChangeRequestEditor/components/editors/index.js +4 -0
- package/features/workflow/ChangeRequestEditor/helpers/addedAttributes.d.ts +11 -0
- package/features/workflow/ChangeRequestEditor/helpers/addedAttributes.js +62 -0
- package/features/workflow/ChangeRequestEditor/helpers/changesList.d.ts +2 -0
- package/features/workflow/ChangeRequestEditor/helpers/changesList.js +153 -0
- package/features/workflow/ChangeRequestEditor/helpers/changesList.test.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/helpers/changesList.test.js +201 -0
- package/features/workflow/ChangeRequestEditor/helpers/helpers.d.ts +6 -3
- package/features/workflow/ChangeRequestEditor/helpers/helpers.js +19 -3
- package/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.d.ts +3 -0
- package/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.js +186 -0
- package/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.test.d.ts +1 -0
- package/features/workflow/ChangeRequestEditor/helpers/mergeAddedAttributesWithDCRChanges.test.js +766 -0
- package/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.d.ts +4 -3
- package/features/workflow/ChangeRequestEditor/hooks/useChangeRequestEditor.js +9 -1
- package/features/workflow/ChangeRequestEditor/hooks/useNewAttributesEditor.d.ts +18 -0
- package/features/workflow/ChangeRequestEditor/hooks/useNewAttributesEditor.js +61 -0
- package/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +7 -3
- package/features/workflow/contexts/AddedAttributesContext/index.d.ts +39 -0
- package/features/workflow/contexts/AddedAttributesContext/index.js +125 -0
- package/features/workflow/contexts/ChangeRequestEditorContext/index.d.ts +3 -2
- package/features/workflow/contexts/ChangeRequestEditorContext/index.js +47 -7
- package/features/workflow/contexts/ScrollToAddedAttributeContext/index.d.ts +11 -0
- package/features/workflow/contexts/ScrollToAddedAttributeContext/index.js +51 -0
- package/features/workflow/helpers/attributes.js +16 -13
- package/features/workflow/helpers/attributes.test.js +6 -3
- package/features/workflow/helpers/dcr.d.ts +6 -1
- package/features/workflow/helpers/dcr.js +122 -19
- package/features/workflow/helpers/dcr.test.js +172 -1
- package/features/workflow/helpers/merge.d.ts +3 -0
- package/features/workflow/helpers/merge.js +30 -19
- package/features/workflow/helpers/merge.test.js +2 -1
- package/features/workflow/helpers/moreAttributesScope.d.ts +4 -0
- package/features/workflow/helpers/moreAttributesScope.js +14 -0
- package/features/workflow/helpers/validation.js +31 -6
- package/features/workflow/hooks/useApplyDcrChanges.d.ts +2 -2
- package/features/workflow/hooks/useApplyDcrChanges.js +83 -66
- package/features/workflow/types.d.ts +12 -2
- package/package.json +2 -2
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/styles.d.ts +0 -1
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/styles.js +0 -57
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +0 -95
- package/cjs/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.module.css.js +0 -9
- package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.d.ts +0 -7
- package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.js +0 -21
- package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.module.css.js +0 -9
- package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/index.d.ts +0 -1
- package/cjs/features/workflow/ChangeRequestEditor/components/StatusChips/index.js +0 -5
- package/features/activity-log/ActivityLog/components/ActivityItem/styles.d.ts +0 -1
- package/features/activity-log/ActivityLog/components/ActivityItem/styles.js +0 -54
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.js +0 -65
- package/features/workflow/ChangeRequestEditor/components/ChangeItemEditor/ChangeItemEditor.module.css.js +0 -9
- package/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.d.ts +0 -7
- package/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.js +0 -14
- package/features/workflow/ChangeRequestEditor/components/StatusChips/StatusChips.module.css.js +0 -9
- package/features/workflow/ChangeRequestEditor/components/StatusChips/index.d.ts +0 -1
- package/features/workflow/ChangeRequestEditor/components/StatusChips/index.js +0 -1
- /package/cjs/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/SkeletonChangeItemEditorLoader.d.ts +0 -0
- /package/features/workflow/ChangeRequestEditor/components/{ChangeItemEditor → editors/ChangeItemEditor}/SkeletonChangeItemEditorLoader.d.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const ActivenessDateControl: ({ value, onChange, className, fullWidth }: Props) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import i18n from 'ui-i18n';
|
|
3
|
+
import { pipe } from 'ramda';
|
|
4
|
+
import { DateEditor } from '../DateEditor/DateEditor';
|
|
5
|
+
export var ActivenessDateControl = function (_a) {
|
|
6
|
+
var value = _a.value, onChange = _a.onChange, className = _a.className, fullWidth = _a.fullWidth;
|
|
7
|
+
var handleChange = pipe(function (date) { return date && date.getTime(); }, onChange);
|
|
8
|
+
return (React.createElement(DateEditor, { value: value, label: i18n.text('Effective date'), onChange: handleChange, slotProps: {
|
|
9
|
+
textField: { size: 'small', className: className, fullWidth: fullWidth }
|
|
10
|
+
} }));
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActivenessDateControl } from './ActivenessDateControl';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActivenessDateControl } from './ActivenessDateControl';
|
|
@@ -13,6 +13,7 @@ type Props = {
|
|
|
13
13
|
globalSearchRequestOptions: GlobalSearchRequestOptions;
|
|
14
14
|
attributeTypesSelectionStrategy?: (entityType: TEntityType) => AttributeType[];
|
|
15
15
|
disableLinkClick?: boolean;
|
|
16
|
+
label?: string;
|
|
16
17
|
TextFieldProps?: TextFieldProps;
|
|
17
18
|
className?: string;
|
|
18
19
|
height?: number;
|
|
@@ -20,5 +21,5 @@ type Props = {
|
|
|
20
21
|
isMasked?: boolean;
|
|
21
22
|
required?: boolean;
|
|
22
23
|
};
|
|
23
|
-
export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, isMasked, required, ...otherProps }: Props) => React.JSX.Element;
|
|
24
|
+
export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, label: customLabel, isMasked, required, ...otherProps }: Props) => React.JSX.Element;
|
|
24
25
|
export {};
|
|
@@ -35,7 +35,7 @@ import { buildEntityOptions } from './helpers';
|
|
|
35
35
|
import { useStyles } from './styles';
|
|
36
36
|
var DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION = 20;
|
|
37
37
|
export var EntitySelector = function (_a) {
|
|
38
|
-
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, required = _a.required, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "isMasked", "required"]);
|
|
38
|
+
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, customLabel = _a.label, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, required = _a.required, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "label", "isMasked", "required"]);
|
|
39
39
|
var styles = useStyles();
|
|
40
40
|
var _g = useState(''), inputValue = _g[0], setInputValue = _g[1];
|
|
41
41
|
var entityTypes = useMemo(function () { return entityTypesUris.map(function (type) { return getEntityType(metadata, type); }).filter(isAvailableEntityType); }, [entityTypesUris, metadata]);
|
|
@@ -82,7 +82,7 @@ export var EntitySelector = function (_a) {
|
|
|
82
82
|
entityTypeLabel: currentEntityType.label
|
|
83
83
|
})
|
|
84
84
|
: i18n.text('Create new ${entityTypeLabel}', { entityTypeLabel: currentEntityType.label }));
|
|
85
|
-
var label = i18n.text('Select ${entityTypeLabel}profile', {
|
|
85
|
+
var label = customLabel !== null && customLabel !== void 0 ? customLabel : i18n.text('Select ${entityTypeLabel}profile', {
|
|
86
86
|
entityTypeLabel: entityTypes.length === 1 ? "".concat(entityTypes[0].label, " ") : ''
|
|
87
87
|
});
|
|
88
88
|
var isTempEntity = !isEmpty(entity) && isTempUri(entity.entityUri);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AttributeType } from '@reltio/mdm-sdk';
|
|
2
|
+
import type { AttributeType } from '@reltio/mdm-sdk';
|
|
3
3
|
type Props = {
|
|
4
4
|
label: string;
|
|
5
5
|
popupTitle?: string;
|
|
@@ -7,6 +7,7 @@ type Props = {
|
|
|
7
7
|
parent?: AttributeType;
|
|
8
8
|
dense?: boolean;
|
|
9
9
|
onApply: (attributeTypes: AttributeType[]) => void;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const MoreAttributesButton: ({ label, popupTitle, data, parent, dense, onApply }: Props) => React.JSX.Element;
|
|
12
|
+
export declare const MoreAttributesButton: ({ label, popupTitle, data, parent, dense, onApply, disabled }: Props) => React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -16,17 +16,17 @@ import { ITEM_GROUP_TITLE_HEIGHT, CONTAINER_HEADER_HEIGHT, ITEM_HEIGHT, LIST_CON
|
|
|
16
16
|
import { useStyles } from './styles';
|
|
17
17
|
export var MoreAttributesButton = function (_a) {
|
|
18
18
|
var _b;
|
|
19
|
-
var label = _a.label, _c = _a.popupTitle, popupTitle = _c === void 0 ? label : _c, data = _a.data, parent = _a.parent, dense = _a.dense, onApply = _a.onApply;
|
|
19
|
+
var label = _a.label, _c = _a.popupTitle, popupTitle = _c === void 0 ? label : _c, data = _a.data, parent = _a.parent, dense = _a.dense, onApply = _a.onApply, _d = _a.disabled, disabled = _d === void 0 ? false : _d;
|
|
20
20
|
var styles = useStyles();
|
|
21
21
|
var inputRef = useRef();
|
|
22
|
-
var
|
|
22
|
+
var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
23
23
|
var togglePopupOpen = function () { return setIsOpen(!isOpen); };
|
|
24
24
|
var closePopup = function () { return setIsOpen(false); };
|
|
25
|
-
var
|
|
25
|
+
var _f = useState(''), filter = _f[0], setFilter = _f[1];
|
|
26
26
|
var clearFilter = function () { return setFilter(''); };
|
|
27
|
-
var
|
|
27
|
+
var _g = useState([]), selectedItems = _g[0], setSelectedItems = _g[1];
|
|
28
28
|
var clearSelectedItems = function () { return setSelectedItems([]); };
|
|
29
|
-
var
|
|
29
|
+
var _h = useMoreAttributesItems({ data: data, parent: parent, filter: filter }), items = _h.items, hasGroups = _h.hasGroups, parentGroupLength = _h.parentGroupLength, attributesGroupLength = _h.attributesGroupLength;
|
|
30
30
|
var addSelectedAttributes = function () {
|
|
31
31
|
if (selectedItems.length > 0) {
|
|
32
32
|
onApply(pluck('attrType', selectedItems));
|
|
@@ -40,12 +40,12 @@ export var MoreAttributesButton = function (_a) {
|
|
|
40
40
|
var item = _a.item;
|
|
41
41
|
handleListItemClick(item, not(any(propEq('id', item.id))(selectedItems)));
|
|
42
42
|
}, [handleListItemClick, selectedItems]);
|
|
43
|
-
var
|
|
43
|
+
var _j = useKeyboardNavigation({
|
|
44
44
|
items: items,
|
|
45
45
|
open: isOpen,
|
|
46
46
|
onSelectFocusedItem: handleSearchOnEnter,
|
|
47
47
|
selectedItems: selectedItems
|
|
48
|
-
}), focusIndex =
|
|
48
|
+
}), focusIndex = _j.focusIndex, handleKeyDown = _j.handleKeyDown;
|
|
49
49
|
var focusIndexRef = useRef(null);
|
|
50
50
|
focusIndexRef.current = focusIndex;
|
|
51
51
|
var groupsCount = hasGroups ? (parentGroupLength ? 1 : 0) + (attributesGroupLength ? 1 : 0) : 0;
|
|
@@ -61,7 +61,7 @@ export var MoreAttributesButton = function (_a) {
|
|
|
61
61
|
}, [filter, handleListItemClick, selectedItems]);
|
|
62
62
|
var renderGroupTitle = useCallback(function (style, item) { return (React.createElement(ListItem, { component: 'div', className: styles.subHeader, style: style, key: "group-".concat(item.item.id) }, item.item.label)); }, []);
|
|
63
63
|
return (React.createElement("div", { className: classnames(styles.moreAttributes, (_b = {}, _b[styles.dense] = dense, _b)) },
|
|
64
|
-
React.createElement(Button, { color: "primary", onClick: togglePopupOpen, ref: inputRef, className: styles.moreButton },
|
|
64
|
+
React.createElement(Button, { color: "primary", onClick: togglePopupOpen, ref: inputRef, className: styles.moreButton, disabled: disabled },
|
|
65
65
|
React.createElement(AddIcon, { classes: { root: styles.icon } }),
|
|
66
66
|
React.createElement("div", { className: styles.buttonLabel }, label)),
|
|
67
67
|
React.createElement(SelectionPopup, { open: isOpen, className: classnames(styles.moreAttributesPopup, styles.popupContainer), anchorEl: inputRef.current, onClose: pipe(addSelectedAttributes, closePopup, clearFilter, clearSelectedItems), onSearch: setFilter, containerHeight: containerHeight, title: popupTitle, containerWidth: LIST_CONTAINER_WIDTH, searchInputOnKeyDown: handleKeyDown },
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { AttributeType } from '@reltio/mdm-sdk';
|
|
1
|
+
import { type AttributeType } from '@reltio/mdm-sdk';
|
|
2
2
|
type Props = {
|
|
3
3
|
data: AttributeType[];
|
|
4
4
|
parent?: AttributeType;
|
|
5
5
|
filter?: string;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
7
|
+
export type MoreAttributesItem = {
|
|
8
8
|
id: string;
|
|
9
9
|
label: string;
|
|
10
10
|
attrType?: AttributeType;
|
|
11
11
|
};
|
|
12
12
|
export type GroupedItem = {
|
|
13
|
-
item:
|
|
13
|
+
item: MoreAttributesItem;
|
|
14
14
|
items?: GroupedItem[];
|
|
15
15
|
};
|
|
16
16
|
export declare const useMoreAttributesItems: ({ data, parent, filter }: Props) => {
|
|
17
|
-
items: import("../VirtualGroupedList").VirtualGroupedListMainItem<
|
|
17
|
+
items: import("../VirtualGroupedList").VirtualGroupedListMainItem<MoreAttributesItem>[];
|
|
18
18
|
hasGroups: boolean;
|
|
19
19
|
parentGroupLength: number;
|
|
20
20
|
attributesGroupLength: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const ActivenessDateControl: ({ value, onChange, className, fullWidth }: Props) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
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.ActivenessDateControl = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
9
|
+
var ramda_1 = require("ramda");
|
|
10
|
+
var DateEditor_1 = require("../DateEditor/DateEditor");
|
|
11
|
+
var ActivenessDateControl = function (_a) {
|
|
12
|
+
var value = _a.value, onChange = _a.onChange, className = _a.className, fullWidth = _a.fullWidth;
|
|
13
|
+
var handleChange = (0, ramda_1.pipe)(function (date) { return date && date.getTime(); }, onChange);
|
|
14
|
+
return (react_1.default.createElement(DateEditor_1.DateEditor, { value: value, label: ui_i18n_1.default.text('Effective date'), onChange: handleChange, slotProps: {
|
|
15
|
+
textField: { size: 'small', className: className, fullWidth: fullWidth }
|
|
16
|
+
} }));
|
|
17
|
+
};
|
|
18
|
+
exports.ActivenessDateControl = ActivenessDateControl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActivenessDateControl } from './ActivenessDateControl';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivenessDateControl = void 0;
|
|
4
|
+
var ActivenessDateControl_1 = require("./ActivenessDateControl");
|
|
5
|
+
Object.defineProperty(exports, "ActivenessDateControl", { enumerable: true, get: function () { return ActivenessDateControl_1.ActivenessDateControl; } });
|
|
@@ -13,6 +13,7 @@ type Props = {
|
|
|
13
13
|
globalSearchRequestOptions: GlobalSearchRequestOptions;
|
|
14
14
|
attributeTypesSelectionStrategy?: (entityType: TEntityType) => AttributeType[];
|
|
15
15
|
disableLinkClick?: boolean;
|
|
16
|
+
label?: string;
|
|
16
17
|
TextFieldProps?: TextFieldProps;
|
|
17
18
|
className?: string;
|
|
18
19
|
height?: number;
|
|
@@ -20,5 +21,5 @@ type Props = {
|
|
|
20
21
|
isMasked?: boolean;
|
|
21
22
|
required?: boolean;
|
|
22
23
|
};
|
|
23
|
-
export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, isMasked, required, ...otherProps }: Props) => React.JSX.Element;
|
|
24
|
+
export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, label: customLabel, isMasked, required, ...otherProps }: Props) => React.JSX.Element;
|
|
24
25
|
export {};
|
|
@@ -64,7 +64,7 @@ var helpers_1 = require("./helpers");
|
|
|
64
64
|
var styles_1 = require("./styles");
|
|
65
65
|
var DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION = 20;
|
|
66
66
|
var EntitySelector = function (_a) {
|
|
67
|
-
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, required = _a.required, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "isMasked", "required"]);
|
|
67
|
+
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, customLabel = _a.label, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, required = _a.required, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "label", "isMasked", "required"]);
|
|
68
68
|
var styles = (0, styles_1.useStyles)();
|
|
69
69
|
var _g = (0, react_1.useState)(''), inputValue = _g[0], setInputValue = _g[1];
|
|
70
70
|
var entityTypes = (0, react_1.useMemo)(function () { return entityTypesUris.map(function (type) { return (0, mdm_sdk_1.getEntityType)(metadata, type); }).filter(mdm_sdk_1.isAvailableEntityType); }, [entityTypesUris, metadata]);
|
|
@@ -111,7 +111,7 @@ var EntitySelector = function (_a) {
|
|
|
111
111
|
entityTypeLabel: currentEntityType.label
|
|
112
112
|
})
|
|
113
113
|
: ui_i18n_1.default.text('Create new ${entityTypeLabel}', { entityTypeLabel: currentEntityType.label }));
|
|
114
|
-
var label = ui_i18n_1.default.text('Select ${entityTypeLabel}profile', {
|
|
114
|
+
var label = customLabel !== null && customLabel !== void 0 ? customLabel : ui_i18n_1.default.text('Select ${entityTypeLabel}profile', {
|
|
115
115
|
entityTypeLabel: entityTypes.length === 1 ? "".concat(entityTypes[0].label, " ") : ''
|
|
116
116
|
});
|
|
117
117
|
var isTempEntity = !(0, ramda_1.isEmpty)(entity) && (0, mdm_sdk_1.isTempUri)(entity.entityUri);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AttributeType } from '@reltio/mdm-sdk';
|
|
2
|
+
import type { AttributeType } from '@reltio/mdm-sdk';
|
|
3
3
|
type Props = {
|
|
4
4
|
label: string;
|
|
5
5
|
popupTitle?: string;
|
|
@@ -7,6 +7,7 @@ type Props = {
|
|
|
7
7
|
parent?: AttributeType;
|
|
8
8
|
dense?: boolean;
|
|
9
9
|
onApply: (attributeTypes: AttributeType[]) => void;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const MoreAttributesButton: ({ label, popupTitle, data, parent, dense, onApply }: Props) => React.JSX.Element;
|
|
12
|
+
export declare const MoreAttributesButton: ({ label, popupTitle, data, parent, dense, onApply, disabled }: Props) => React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -45,17 +45,17 @@ var constants_1 = require("./constants");
|
|
|
45
45
|
var styles_1 = require("./styles");
|
|
46
46
|
var MoreAttributesButton = function (_a) {
|
|
47
47
|
var _b;
|
|
48
|
-
var label = _a.label, _c = _a.popupTitle, popupTitle = _c === void 0 ? label : _c, data = _a.data, parent = _a.parent, dense = _a.dense, onApply = _a.onApply;
|
|
48
|
+
var label = _a.label, _c = _a.popupTitle, popupTitle = _c === void 0 ? label : _c, data = _a.data, parent = _a.parent, dense = _a.dense, onApply = _a.onApply, _d = _a.disabled, disabled = _d === void 0 ? false : _d;
|
|
49
49
|
var styles = (0, styles_1.useStyles)();
|
|
50
50
|
var inputRef = (0, react_1.useRef)();
|
|
51
|
-
var
|
|
51
|
+
var _e = (0, react_1.useState)(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
52
52
|
var togglePopupOpen = function () { return setIsOpen(!isOpen); };
|
|
53
53
|
var closePopup = function () { return setIsOpen(false); };
|
|
54
|
-
var
|
|
54
|
+
var _f = (0, react_1.useState)(''), filter = _f[0], setFilter = _f[1];
|
|
55
55
|
var clearFilter = function () { return setFilter(''); };
|
|
56
|
-
var
|
|
56
|
+
var _g = (0, react_1.useState)([]), selectedItems = _g[0], setSelectedItems = _g[1];
|
|
57
57
|
var clearSelectedItems = function () { return setSelectedItems([]); };
|
|
58
|
-
var
|
|
58
|
+
var _h = (0, useMoreAttributesItems_1.useMoreAttributesItems)({ data: data, parent: parent, filter: filter }), items = _h.items, hasGroups = _h.hasGroups, parentGroupLength = _h.parentGroupLength, attributesGroupLength = _h.attributesGroupLength;
|
|
59
59
|
var addSelectedAttributes = function () {
|
|
60
60
|
if (selectedItems.length > 0) {
|
|
61
61
|
onApply((0, ramda_1.pluck)('attrType', selectedItems));
|
|
@@ -69,12 +69,12 @@ var MoreAttributesButton = function (_a) {
|
|
|
69
69
|
var item = _a.item;
|
|
70
70
|
handleListItemClick(item, (0, ramda_1.not)((0, ramda_1.any)((0, ramda_1.propEq)('id', item.id))(selectedItems)));
|
|
71
71
|
}, [handleListItemClick, selectedItems]);
|
|
72
|
-
var
|
|
72
|
+
var _j = (0, useKeyboardNavigation_1.useKeyboardNavigation)({
|
|
73
73
|
items: items,
|
|
74
74
|
open: isOpen,
|
|
75
75
|
onSelectFocusedItem: handleSearchOnEnter,
|
|
76
76
|
selectedItems: selectedItems
|
|
77
|
-
}), focusIndex =
|
|
77
|
+
}), focusIndex = _j.focusIndex, handleKeyDown = _j.handleKeyDown;
|
|
78
78
|
var focusIndexRef = (0, react_1.useRef)(null);
|
|
79
79
|
focusIndexRef.current = focusIndex;
|
|
80
80
|
var groupsCount = hasGroups ? (parentGroupLength ? 1 : 0) + (attributesGroupLength ? 1 : 0) : 0;
|
|
@@ -90,7 +90,7 @@ var MoreAttributesButton = function (_a) {
|
|
|
90
90
|
}, [filter, handleListItemClick, selectedItems]);
|
|
91
91
|
var renderGroupTitle = (0, react_1.useCallback)(function (style, item) { return (react_1.default.createElement(ListItem_1.default, { component: 'div', className: styles.subHeader, style: style, key: "group-".concat(item.item.id) }, item.item.label)); }, []);
|
|
92
92
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.moreAttributes, (_b = {}, _b[styles.dense] = dense, _b)) },
|
|
93
|
-
react_1.default.createElement(Button_1.default, { color: "primary", onClick: togglePopupOpen, ref: inputRef, className: styles.moreButton },
|
|
93
|
+
react_1.default.createElement(Button_1.default, { color: "primary", onClick: togglePopupOpen, ref: inputRef, className: styles.moreButton, disabled: disabled },
|
|
94
94
|
react_1.default.createElement(Add_1.default, { classes: { root: styles.icon } }),
|
|
95
95
|
react_1.default.createElement("div", { className: styles.buttonLabel }, label)),
|
|
96
96
|
react_1.default.createElement(SelectionPopup_1.SelectionPopup, { open: isOpen, className: (0, classnames_1.default)(styles.moreAttributesPopup, styles.popupContainer), anchorEl: inputRef.current, onClose: (0, ramda_1.pipe)(addSelectedAttributes, closePopup, clearFilter, clearSelectedItems), onSearch: setFilter, containerHeight: containerHeight, title: popupTitle, containerWidth: constants_1.LIST_CONTAINER_WIDTH, searchInputOnKeyDown: handleKeyDown },
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { AttributeType } from '@reltio/mdm-sdk';
|
|
1
|
+
import { type AttributeType } from '@reltio/mdm-sdk';
|
|
2
2
|
type Props = {
|
|
3
3
|
data: AttributeType[];
|
|
4
4
|
parent?: AttributeType;
|
|
5
5
|
filter?: string;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
7
|
+
export type MoreAttributesItem = {
|
|
8
8
|
id: string;
|
|
9
9
|
label: string;
|
|
10
10
|
attrType?: AttributeType;
|
|
11
11
|
};
|
|
12
12
|
export type GroupedItem = {
|
|
13
|
-
item:
|
|
13
|
+
item: MoreAttributesItem;
|
|
14
14
|
items?: GroupedItem[];
|
|
15
15
|
};
|
|
16
16
|
export declare const useMoreAttributesItems: ({ data, parent, filter }: Props) => {
|
|
17
|
-
items: import("../VirtualGroupedList").VirtualGroupedListMainItem<
|
|
17
|
+
items: import("../VirtualGroupedList").VirtualGroupedListMainItem<MoreAttributesItem>[];
|
|
18
18
|
hasGroups: boolean;
|
|
19
19
|
parentGroupLength: number;
|
|
20
20
|
attributesGroupLength: number;
|
|
@@ -57,6 +57,7 @@ var react_2 = require("@testing-library/react");
|
|
|
57
57
|
var user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
58
58
|
var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
|
|
59
59
|
var ActivityLog_1 = require("./ActivityLog");
|
|
60
|
+
var constants_1 = require("./constants");
|
|
60
61
|
describe('Activity log tests', function () {
|
|
61
62
|
(0, jsdom_testing_mocks_1.mockResizeObserver)();
|
|
62
63
|
var activities = [
|
|
@@ -450,6 +451,33 @@ describe('Activity log tests', function () {
|
|
|
450
451
|
}
|
|
451
452
|
});
|
|
452
453
|
}); });
|
|
454
|
+
it('displays client type label when clientType is in CLIENT_TYPES', function () {
|
|
455
|
+
var activityWithKnownClientType = [
|
|
456
|
+
{
|
|
457
|
+
uri: 'activities/client-type-known',
|
|
458
|
+
user: 'agent.user',
|
|
459
|
+
label: 'USER_LOGIN',
|
|
460
|
+
description: 'User agent.user was logged in',
|
|
461
|
+
timestamp: 1622625987531,
|
|
462
|
+
items: [
|
|
463
|
+
{
|
|
464
|
+
id: 'client-type-item',
|
|
465
|
+
user: 'agent.user',
|
|
466
|
+
method: 'POST',
|
|
467
|
+
url: '/reltio/api/test/activities',
|
|
468
|
+
clientType: 'Match_Resolution_Agent',
|
|
469
|
+
timestamp: 1622625987531
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
itemsTotal: 1
|
|
473
|
+
}
|
|
474
|
+
];
|
|
475
|
+
setUp({ activities: activityWithKnownClientType });
|
|
476
|
+
var activityItem = react_2.screen.getAllByTestId('activity-log-item')[0];
|
|
477
|
+
expect(activityItem).toHaveTextContent(constants_1.CLIENT_TYPES.Match_Resolution_Agent);
|
|
478
|
+
expect(activityItem).toHaveTextContent(ui_i18n_1.default.text('via'));
|
|
479
|
+
expect(activityItem).toHaveTextContent(ui_i18n_1.default.text('agent'));
|
|
480
|
+
});
|
|
453
481
|
it('should not fail for activities without items', function () {
|
|
454
482
|
var activitiesWithoutItems = [
|
|
455
483
|
{
|
|
@@ -5,26 +5,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ActivityItem = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
8
9
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
9
|
-
var activities_1 = require("../../../utils/activities");
|
|
10
|
-
var ActivitiesFactory_1 = require("../../../ActivitiesFactory");
|
|
11
10
|
var ErrorBoundary_1 = require("../../../../../ErrorBoundary");
|
|
11
|
+
var ActivitiesFactory_1 = require("../../../ActivitiesFactory");
|
|
12
12
|
var ActivityTitle_1 = require("../../../ActivityTitle");
|
|
13
|
-
var
|
|
13
|
+
var activities_1 = require("../../../utils/activities");
|
|
14
|
+
var constants_1 = require("../../constants");
|
|
15
|
+
var ActivityItem_module_css_1 = __importDefault(require("./ActivityItem.module.css"));
|
|
14
16
|
var ActivityItem = function (_a) {
|
|
17
|
+
var _b, _c;
|
|
15
18
|
var item = _a.item;
|
|
16
|
-
var styles = (0, styles_1.useStyles)();
|
|
17
19
|
var type = (0, activities_1.getActivityType)(item);
|
|
18
20
|
var activities = (0, activities_1.splitActivityByType)(item);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
react_1.default.createElement("div", { className:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
react_1.default.createElement("span", { className:
|
|
21
|
+
var clientTypeName = constants_1.CLIENT_TYPES[(_c = (_b = item.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.clientType];
|
|
22
|
+
return (react_1.default.createElement("div", { className: ActivityItem_module_css_1.default.activityItem, "data-reltio-id": "activity-log-item" },
|
|
23
|
+
react_1.default.createElement("div", { className: ActivityItem_module_css_1.default.activityIcon }, ActivitiesFactory_1.ActivitiesFactory.getIcon(type)),
|
|
24
|
+
react_1.default.createElement("div", { className: ActivityItem_module_css_1.default.activityInfo },
|
|
25
|
+
react_1.default.createElement("div", { className: ActivityItem_module_css_1.default.userContainer },
|
|
26
|
+
react_1.default.createElement("span", { className: ActivityItem_module_css_1.default.activityUser }, item.user),
|
|
27
|
+
clientTypeName ? (react_1.default.createElement("span", { className: (0, classnames_1.default)(ActivityItem_module_css_1.default.activityUser, ActivityItem_module_css_1.default.activityUserClient) },
|
|
28
|
+
"(",
|
|
29
|
+
ui_i18n_1.default.text('via'),
|
|
30
|
+
" ",
|
|
31
|
+
clientTypeName,
|
|
32
|
+
" ",
|
|
33
|
+
ui_i18n_1.default.text('agent'),
|
|
34
|
+
")")) : null,
|
|
35
|
+
react_1.default.createElement("span", { className: ActivityItem_module_css_1.default.date }, ui_i18n_1.default.date(item.timestamp, 'LT'))),
|
|
25
36
|
activities.map(function (activity, index) {
|
|
26
37
|
var activityType = (0, activities_1.getActivityType)(activity);
|
|
27
|
-
return (react_1.default.createElement("div", { key: index, className:
|
|
38
|
+
return (react_1.default.createElement("div", { key: index, className: ActivityItem_module_css_1.default.activityEvent },
|
|
28
39
|
react_1.default.createElement(ErrorBoundary_1.ErrorBoundary, { error: react_1.default.createElement(react_1.default.Fragment, null,
|
|
29
40
|
react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: activityType }),
|
|
30
41
|
ui_i18n_1.default.text("Can't render activity")) }, ActivitiesFactory_1.ActivitiesFactory.getComponent({
|
package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.module.css.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"activityItem":"ActivityItem-activityItem--c5xTq","activityIcon":"ActivityItem-activityIcon--rHySh","userContainer":"ActivityItem-userContainer--cEXoW","activityInfo":"ActivityItem-activityInfo--9s7Vx","activityUser":"ActivityItem-activityUser--NsEvM","activityUserClient":"ActivityItem-activityUserClient--Zirlu","activityEvent":"ActivityItem-activityEvent--6s1wq","date":"ActivityItem-date--fvRDG"};
|
|
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 = `.ActivityItem-activityItem--c5xTq{box-sizing:border-box;display:flex;min-height:40px;padding:10px 16px 5px 0}.ActivityItem-activityIcon--rHySh{align-items:center;background:var(--mui-palette-primary-main);border:1px solid #fff;border-radius:50%;display:flex;flex-shrink:0;height:24px;justify-content:center;margin-left:-13px;margin-right:15px;width:24px}.ActivityItem-activityIcon--rHySh svg{fill:#fff;font-size:14px}.ActivityItem-userContainer--cEXoW{display:flex}.ActivityItem-activityInfo--9s7Vx{flex:1;overflow:hidden;position:relative}.ActivityItem-activityUser--NsEvM{color:var(--mui-palette-text-secondary);font-size:13px;line-height:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ActivityItem-activityUserClient--Zirlu{margin-left:.25em}.ActivityItem-activityEvent--6s1wq{margin-top:5px}.ActivityItem-date--fvRDG{color:var(--mui-palette-text-primary);flex-shrink:0;font-size:12px;line-height:16px;margin-left:auto;padding-left:8px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const CLIENT_TYPES: {
|
|
2
|
+
Match_Resolution_Agent: string;
|
|
3
|
+
Unmerge_Remediation_Agent: string;
|
|
4
|
+
Data_Exploration_Agent: string;
|
|
5
|
+
Intelligent_Workflow_Assignment_Agent: string;
|
|
6
|
+
Global_Menu_Item_Assignment_Agent: string;
|
|
7
|
+
Menu_Item_Characteristics_Enrichment_Agent: string;
|
|
8
|
+
Address_Enrichment_Agent: string;
|
|
9
|
+
Product_Recommendation_Agent: string;
|
|
10
|
+
Hierarchy_Management_Agent: string;
|
|
11
|
+
Data_Quality_Service_Agent: string;
|
|
12
|
+
Agent_Dev_Template: string;
|
|
13
|
+
Match_Explanation_Analyzer: string;
|
|
14
|
+
Reltio_On_Reltio_Agent: string;
|
|
15
|
+
External_Party_Resolution_Agent: string;
|
|
16
|
+
Segmentation_Agent: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLIENT_TYPES = void 0;
|
|
4
|
+
exports.CLIENT_TYPES = {
|
|
5
|
+
Match_Resolution_Agent: 'MRA',
|
|
6
|
+
Unmerge_Remediation_Agent: 'URA',
|
|
7
|
+
Data_Exploration_Agent: 'DEA',
|
|
8
|
+
Intelligent_Workflow_Assignment_Agent: 'IAWA',
|
|
9
|
+
Global_Menu_Item_Assignment_Agent: 'GMIAA',
|
|
10
|
+
Menu_Item_Characteristics_Enrichment_Agent: 'MICEA',
|
|
11
|
+
Address_Enrichment_Agent: 'AEA',
|
|
12
|
+
Product_Recommendation_Agent: 'PRA',
|
|
13
|
+
Hierarchy_Management_Agent: 'EHRA',
|
|
14
|
+
Data_Quality_Service_Agent: 'DQSA',
|
|
15
|
+
Agent_Dev_Template: 'DEV',
|
|
16
|
+
Match_Explanation_Analyzer: 'MEA',
|
|
17
|
+
Reltio_On_Reltio_Agent: 'RORA',
|
|
18
|
+
External_Party_Resolution_Agent: 'EPRA',
|
|
19
|
+
Segmentation_Agent: 'SA'
|
|
20
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChangeRequest, WorkflowTaskData, GroupedObjectsInfo } from '@reltio/mdm-sdk';
|
|
2
|
+
import type { ChangeRequest, WorkflowTaskData, GroupedObjectsInfo } from '@reltio/mdm-sdk';
|
|
3
3
|
type Props = {
|
|
4
4
|
dcr: ChangeRequest;
|
|
5
5
|
task: WorkflowTaskData;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -28,23 +39,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
40
|
exports.ChangeRequestEditor = void 0;
|
|
30
41
|
var react_1 = __importStar(require("react"));
|
|
31
|
-
var ramda_1 = require("ramda");
|
|
32
42
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
33
43
|
var Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
34
|
-
var
|
|
44
|
+
var react_context_selector_1 = require("@fluentui/react-context-selector");
|
|
35
45
|
var SuggestedChanges_1 = __importDefault(require("../../../icons/SuggestedChanges"));
|
|
36
46
|
var EntityChangesGroup_1 = require("./components/EntityChangesGroup");
|
|
47
|
+
var mergeAddedAttributesWithDCRChanges_1 = require("./helpers/mergeAddedAttributesWithDCRChanges");
|
|
48
|
+
var AddedAttributesContext_1 = require("../contexts/AddedAttributesContext");
|
|
37
49
|
var ChangeRequestEditor_module_css_1 = __importDefault(require("./ChangeRequestEditor.module.css"));
|
|
38
50
|
var ChangeRequestEditor = function (_a) {
|
|
39
51
|
var dcr = _a.dcr, task = _a.task, groupedObjects = _a.groupedObjects;
|
|
52
|
+
var addedAttributes = (0, react_context_selector_1.useContextSelector)(AddedAttributesContext_1.AddedAttributesContext, function (ctx) { return ctx.getAddedAttributes(); });
|
|
40
53
|
var enrichedDCR = (0, react_1.useMemo)(function () {
|
|
41
|
-
if (dcr === null || dcr === void 0 ? void 0 : dcr.changes)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return null;
|
|
47
|
-
}, [dcr]);
|
|
54
|
+
if (!(dcr === null || dcr === void 0 ? void 0 : dcr.changes))
|
|
55
|
+
return null;
|
|
56
|
+
var enrichedChanges = (0, mergeAddedAttributesWithDCRChanges_1.mergeAddedAttributesWithDCRChanges)(dcr.changes, addedAttributes);
|
|
57
|
+
return __assign(__assign({}, dcr), { changes: enrichedChanges });
|
|
58
|
+
}, [dcr, addedAttributes]);
|
|
48
59
|
var dcrLoaded = !!enrichedDCR && groupedObjects.length > 0;
|
|
49
60
|
return (react_1.default.createElement("div", { className: ChangeRequestEditor_module_css_1.default.container },
|
|
50
61
|
react_1.default.createElement("div", { className: ChangeRequestEditor_module_css_1.default.header },
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.AddSameAttributeButton = void 0;
|
|
30
|
+
var react_1 = __importStar(require("react"));
|
|
31
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
32
|
+
var react_context_selector_1 = require("@fluentui/react-context-selector");
|
|
33
|
+
var Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
34
|
+
var AddedAttributesContext_1 = require("../../../contexts/AddedAttributesContext");
|
|
35
|
+
var SmallIconButton_1 = require("../../../../../SmallIconButton");
|
|
36
|
+
var merge_1 = require("../../../helpers/merge");
|
|
37
|
+
var addedAttributes_1 = require("../../helpers/addedAttributes");
|
|
38
|
+
var AddSameAttributeButton = function (_a) {
|
|
39
|
+
var _b, _c;
|
|
40
|
+
var change = _a.change;
|
|
41
|
+
var attributeType = change.attributeType, lineIds = change.lineIds;
|
|
42
|
+
var lineId = (_b = lineIds === null || lineIds === void 0 ? void 0 : lineIds[0]) !== null && _b !== void 0 ? _b : (_c = (0, merge_1.extractLineIds)(change === null || change === void 0 ? void 0 : change.newValue)) === null || _c === void 0 ? void 0 : _c[0];
|
|
43
|
+
var addedId = (0, addedAttributes_1.getAddedId)(change);
|
|
44
|
+
var addAddedAttributes = (0, react_context_selector_1.useContextSelector)(AddedAttributesContext_1.AddedAttributesContext, function (ctx) { return ctx.addAddedAttributes; });
|
|
45
|
+
var handleAdd = (0, react_1.useCallback)(function () {
|
|
46
|
+
if (!attributeType || !lineId)
|
|
47
|
+
return;
|
|
48
|
+
var changeOverrides = (0, addedAttributes_1.getParentChangeOverrides)(change);
|
|
49
|
+
if ((0, addedAttributes_1.isRootAddedAttribute)(lineId)) {
|
|
50
|
+
addAddedAttributes({
|
|
51
|
+
attributeTypes: [attributeType],
|
|
52
|
+
objectUri: (0, addedAttributes_1.getObjectIdFromLineId)(lineId),
|
|
53
|
+
changeOverrides: changeOverrides
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
addAddedAttributes({
|
|
58
|
+
attributeTypes: [attributeType],
|
|
59
|
+
parentLineId: (0, addedAttributes_1.getParentLineId)(lineId),
|
|
60
|
+
parentId: addedId ? (0, addedAttributes_1.getParentAddedId)(addedId) : undefined,
|
|
61
|
+
changeOverrides: changeOverrides
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}, [attributeType, lineId, addedId, change, addAddedAttributes]);
|
|
65
|
+
return react_1.default.createElement(SmallIconButton_1.SmallIconButton, { icon: Add_1.default, onClick: handleAdd, title: ui_i18n_1.default.text('Add'), size: "S" });
|
|
66
|
+
};
|
|
67
|
+
exports.AddSameAttributeButton = AddSameAttributeButton;
|