@reltio/profile 1.4.1585 → 1.4.1586-mui5
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/.DS_Store +0 -0
- package/index.ts +4 -0
- package/package.json +40 -23
- package/public/bundle.js +205 -0
- package/{bundle.js.LICENSE.txt → public/bundle.js.LICENSE.txt} +44 -16
- package/public/package.json +24 -0
- package/scripts/build/index.js +20 -0
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/BackgroundProcessIndicator/BackgroundProcessIndicator.tsx +101 -0
- package/src/components/BackgroundProcessIndicator/styles.ts +50 -0
- package/src/components/DCRReviewPerspectiveView/DCRReviewPerspectiveView.tsx +77 -0
- package/src/components/DCRReviewPerspectiveView/__tests__/DCRReviewPerspectiveView.test.tsx +156 -0
- package/src/components/DCRReviewPerspectiveView/components/DCRProfileBand/DCRProfileBand.tsx +22 -0
- package/src/components/DCRReviewPerspectiveView/components/DCRProfileBand/__tests__/DCRProfileBand.test.tsx +92 -0
- package/src/components/DCRReviewPerspectiveView/components/DCRProfileBand/styles.ts +11 -0
- package/src/components/DCRReviewPerspectiveView/hooks/useWorkflowTasks.ts +31 -0
- package/src/components/DCRReviewPerspectiveView/index.ts +1 -0
- package/src/components/DCRReviewPerspectiveView/styles.ts +33 -0
- package/src/components/EntityMapView/EntityMapView.tsx +64 -0
- package/src/components/EntityMapView/__tests__/EntityMapView.spec.js +121 -0
- package/src/components/EntityMapView/styles.ts +20 -0
- package/src/components/EntityMapView/useMarkers.ts +27 -0
- package/src/components/HierarchyPathsView/ConfigContext.ts +4 -0
- package/src/components/HierarchyPathsView/HierarchyPathsHeader.tsx +32 -0
- package/src/components/HierarchyPathsView/HierarchyPathsView.tsx +90 -0
- package/src/components/HierarchyPathsView/Node.tsx +62 -0
- package/src/components/HierarchyPathsView/__tests__/HierarchyPathsView.test.tsx +547 -0
- package/src/components/HierarchyPathsView/__tests__/IntegrationHierarchyPathsView.test.tsx +47 -0
- package/src/components/HierarchyPathsView/__tests__/Node.test.tsx +152 -0
- package/src/components/HierarchyPathsView/__tests__/data/metadata.data.ts +33 -0
- package/src/components/HierarchyPathsView/__tests__/data/store.data.ts +37 -0
- package/src/components/HierarchyPathsView/__tests__/data/treePaths.data.ts +63 -0
- package/src/components/HierarchyPathsView/defaultTypeIcon.png +0 -0
- package/src/components/HierarchyPathsView/helpers.ts +3 -0
- package/src/components/HierarchyPathsView/hooks/useDynamicNodesHeights.ts +33 -0
- package/src/components/HierarchyPathsView/hooks/useLoadPaths.ts +76 -0
- package/src/components/HierarchyPathsView/icons/ShowGraph.svg +10 -0
- package/src/components/HierarchyPathsView/index.ts +1 -0
- package/src/components/HierarchyPathsView/styles.ts +60 -0
- package/src/components/HierarchyPathsView/theme/__tests__/node-content-renderer.test.tsx +78 -0
- package/src/components/HierarchyPathsView/theme/__tests__/tree-node-data-renderer.test.tsx +72 -0
- package/src/components/HierarchyPathsView/theme/index.ts +8 -0
- package/src/components/HierarchyPathsView/theme/node-content-renderer.tsx +84 -0
- package/src/components/HierarchyPathsView/theme/styles.ts +102 -0
- package/src/components/HierarchyPathsView/theme/tree-node-data-renderer.tsx +70 -0
- package/src/components/HierarchyPathsView/types.ts +17 -0
- package/src/components/ImageAttributeView/ImageAttributeView.tsx +87 -0
- package/src/components/ImageAttributeView/ImageAttributeViewEditableContent/ImageAttributeViewEditableContent.tsx +52 -0
- package/src/components/ImageAttributeView/ImageAttributeViewEditableContent/__tests__/ImageAttributeViewEditableContent.test.tsx +136 -0
- package/src/components/ImageAttributeView/ImageLineCaption/ImageLineCaption.tsx +18 -0
- package/src/components/ImageAttributeView/ImageLineCaption/__tests__/ImageLineCaption.test.tsx +15 -0
- package/src/components/ImageAttributeView/ImageLineCaption/styles.ts +10 -0
- package/src/components/ImageAttributeView/__tests__/ImageAttributeView.test.tsx +151 -0
- package/src/components/ImageAttributeView/__tests__/IntegrationImageAttributeView.test.tsx +36 -0
- package/src/components/ImageAttributeView/__tests__/data/store.data.ts +22 -0
- package/src/components/ImageAttributeView/styles.ts +13 -0
- package/src/components/Notifications/Notification.tsx +98 -0
- package/src/components/Notifications/Notifications.tsx +17 -0
- package/src/components/Notifications/__tests__/Notification.spec.tsx +230 -0
- package/src/components/Notifications/__tests__/Notifications.spec.tsx +37 -0
- package/src/components/Notifications/index.ts +1 -0
- package/src/components/Notifications/styles.ts +17 -0
- package/src/components/Notifications/types.ts +21 -0
- package/src/components/PerspectiveProfileBand/PerspectiveProfileBand.tsx +304 -0
- package/src/components/PerspectiveProfileBand/__tests__/PerspectiveProfileBand.specs.tsx +526 -0
- package/src/components/PerspectiveProfileBand/__tests__/data/collaboration.data.ts +23 -0
- package/src/components/PerspectiveProfileBand/__tests__/data/store.data.ts +162 -0
- package/src/components/PerspectiveProfileBand/copy.svg +14 -0
- package/src/components/PerspectiveProfileBand/hooks/useCloneAction.ts +94 -0
- package/src/components/PerspectiveProfileBand/index.ts +1 -0
- package/src/components/PerspectiveProfileBand/styles.ts +27 -0
- package/src/components/PerspectiveProfileBand/suggest.svg +16 -0
- package/src/components/ProfileAttributesView/ProfileAttributesView.tsx +21 -0
- package/src/components/ProfileAttributesView/__tests__/ProfileAttributesView.test.tsx +70 -0
- package/src/components/ProfileErrorsPanel/ProfileErrorsPanel.tsx +70 -0
- package/src/components/ProfileErrorsPanel/__tests__/ProfileErrorsPanel.specs.tsx +140 -0
- package/src/components/ProfileErrorsPanel/components/Error.tsx +50 -0
- package/src/components/ProfileErrorsPanel/components/ErrorsPanel.tsx +65 -0
- package/src/components/ProfileErrorsPanel/components/__tests__/Error.specs.tsx +264 -0
- package/src/components/ProfileErrorsPanel/components/__tests__/ErrorsPanel.specs.tsx +93 -0
- package/src/components/ProfileErrorsPanel/helpers.ts +45 -0
- package/src/components/ProfileErrorsPanel/icons/hyperlink.svg +4 -0
- package/src/components/ProfileErrorsPanel/index.ts +1 -0
- package/src/components/ProfileErrorsPanel/styles.ts +100 -0
- package/src/components/ProfileErrorsPanel/useCachedErrors.ts +11 -0
- package/src/components/ProfileLayout/ProfileLayout.tsx +56 -0
- package/src/components/ProfileLayout/__tests__/ProfileLayout.specs.tsx +56 -0
- package/src/components/ProfileLayout/index.ts +1 -0
- package/src/components/ProfileLayout/styles.ts +19 -0
- package/src/components/ProfileLayoutItem/ProfileLayoutItem.tsx +89 -0
- package/src/components/ProfileLayoutItem/__tests__/ProfileLayoutItem.test.tsx +165 -0
- package/src/components/ProfileLayoutItem/__tests__/data/store.data.ts +29 -0
- package/src/components/ProfileLayoutItem/index.ts +1 -0
- package/src/components/ProfileLayoutItem/styles.ts +13 -0
- package/src/components/ProfilePerspectiveResizablePanes/ProfilePerspectiveResizablePanes.tsx +34 -0
- package/src/components/ProfilePerspectiveResizablePanes/styles.ts +9 -0
- package/src/components/ProfilePerspectiveView/ProfilePerspectiveView.tsx +193 -0
- package/src/components/ProfilePerspectiveView/__tests__/IntegrationProfilePerspective.test.tsx +417 -0
- package/src/components/ProfilePerspectiveView/__tests__/ProfilePerspectiveView.specs.tsx +1503 -0
- package/src/components/ProfilePerspectiveView/__tests__/data/entities.data.ts +19 -0
- package/src/components/ProfilePerspectiveView/__tests__/data/entity.data.ts +25 -0
- package/src/components/ProfilePerspectiveView/__tests__/data/metadata.data.ts +33 -0
- package/src/components/ProfilePerspectiveView/__tests__/data/profile.data.ts +22 -0
- package/src/components/ProfilePerspectiveView/__tests__/data/store.data.ts +51 -0
- package/src/components/ProfilePerspectiveView/hooks/data/backgroundUpdateDalay.ts +2 -0
- package/src/components/ProfilePerspectiveView/hooks/useBackgroundProcessIndicator.ts +121 -0
- package/src/components/ProfilePerspectiveView/hooks/useProfileLayout.ts +101 -0
- package/src/components/ProfilePerspectiveView/hooks/useProfileRightSidePanelElements.tsx +167 -0
- package/src/components/ProfilePerspectiveView/hooks/useWorkflowTasks.ts +15 -0
- package/src/components/ProfilePerspectiveView/index.ts +1 -0
- package/src/components/ProfilePerspectiveView/styles.ts +38 -0
- package/src/components/ProfilePotentialMatchesView/ActionButtons.tsx +39 -0
- package/src/components/ProfilePotentialMatchesView/MatchCard.tsx +53 -0
- package/src/components/ProfilePotentialMatchesView/ProfilePotentialMatchesView.tsx +137 -0
- package/src/components/ProfilePotentialMatchesView/__tests__/ActionButtons.specs.tsx +89 -0
- package/src/components/ProfilePotentialMatchesView/__tests__/MatchCard.specs.tsx +62 -0
- package/src/components/ProfilePotentialMatchesView/__tests__/ProfilePotentialMatchesView.specs.tsx +267 -0
- package/src/components/ProfilePotentialMatchesView/__tests__/commonData.ts +91 -0
- package/src/components/ProfilePotentialMatchesView/styles.ts +30 -0
- package/src/components/ProfileRelationsView/ProfileRelationsView.tsx +24 -0
- package/src/components/ProfileRelationsView/__tests__/ProfileRelationsView.test.tsx +112 -0
- package/src/components/ProfileRelationsView/components/EditableRelationItem/EditableRelationItem.tsx +133 -0
- package/src/components/ProfileRelationsView/components/EditableRelationItem/__tests__/EditableRelationItem.specs.tsx +222 -0
- package/src/components/ProfileRelationsView/components/EditableRelationItem/styles.ts +59 -0
- package/src/components/ProfileRelationsView/components/RelationArrowButton/RelationArrowButton.tsx +29 -0
- package/src/components/ProfileRelationsView/components/RelationArrowButton/__tests__/RelationArrowButton.specs.tsx +99 -0
- package/src/components/ProfileRelationsView/components/RelationArrowButton/styles.ts +8 -0
- package/src/components/ProfileRelationsView/components/RelationTooltip/RelationTooltip.tsx +83 -0
- package/src/components/ProfileRelationsView/components/RelationTooltip/__tests__/RelationTooltip.test.tsx +155 -0
- package/src/components/ProfileRelationsView/components/RelationTooltip/styles.ts +27 -0
- package/src/components/ProfileRelationsView/components/RelationsContent/RelationsContent.tsx +62 -0
- package/src/components/ProfileRelationsView/components/RelationsContent/__tests__/RelationsContent.specs.tsx +148 -0
- package/src/components/ProfileRelationsView/components/RelationsContent/styles.ts +15 -0
- package/src/components/ProfileRelationsView/components/RelationsEditableContent/RelationsEditableContent.tsx +153 -0
- package/src/components/ProfileRelationsView/components/RelationsEditableContent/__tests__/RelationsEditableContent.specs.tsx +367 -0
- package/src/components/ProfileRelationsView/components/RelationsEditableContent/styles.ts +28 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/FilterButton/FilterButton.tsx +113 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/FilterButton/styles.ts +43 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/ImportFromDT/ImportFromDT.tsx +65 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/ImportFromDT/MultipleImportIcon.tsx +23 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/ImportFromDT/__tests__/ImportFromDT.test.tsx +500 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/ImportFromDT/__tests__/MultipleImportIcon.test.tsx +20 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/ImportFromDT/hooks/useImportFromDTLoader.ts +84 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/ImportFromDT/styles.ts +37 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/RelationsHeader.tsx +39 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/__tests__/RelationsHeader.test.tsx +82 -0
- package/src/components/ProfileRelationsView/components/RelationsHeader/styles.ts +18 -0
- package/src/components/ProfileRelationsView/components/RelationsList/Ratings/Ratings.tsx +60 -0
- package/src/components/ProfileRelationsView/components/RelationsList/Ratings/__tests__/Ratings.test.tsx +64 -0
- package/src/components/ProfileRelationsView/components/RelationsList/Ratings/styles.ts +48 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RatingsButtons/RatingsButtons.tsx +74 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RatingsButtons/__tests__/RatingsButtons.test.tsx +72 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RatingsButtons/styles.ts +20 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RatingsPopup/RatingsPopup.tsx +109 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RatingsPopup/__tests__/RatingsPopup.test.tsx +106 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RatingsPopup/styles.ts +133 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationAttributes/RelationAttributes.tsx +81 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationAttributes/__tests__/RelationAttributes.test.tsx +218 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationAttributes/styles.ts +12 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationCompexItem/RelationComplexItem.tsx +129 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationCompexItem/__tests__/RelationComplexItem.test.tsx +303 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationCompexItem/styles.ts +51 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationItem/RelationItem.tsx +103 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationItem/__tests__/RelationItem.test.tsx +222 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationItem/styles.ts +72 -0
- package/src/components/ProfileRelationsView/components/RelationsList/RelationsList.tsx +69 -0
- package/src/components/ProfileRelationsView/components/RelationsList/ShowDetailsButton/ShowDetailsButton.tsx +28 -0
- package/src/components/ProfileRelationsView/components/RelationsList/ShowDetailsButton/__tests__/ShowDetailsButton.test.tsx +33 -0
- package/src/components/ProfileRelationsView/components/RelationsList/__tests__/RelationsList.test.tsx +143 -0
- package/src/components/ProfileRelationsView/components/RelationsView/RelationsView.tsx +108 -0
- package/src/components/ProfileRelationsView/components/RelationsView/__tests__/RelationsView.test.tsx +183 -0
- package/src/components/ProfileRelationsView/components/RelationsView/index.ts +1 -0
- package/src/components/ProfileRelationsView/components/RelationsView/styles.ts +22 -0
- package/src/components/ProfileRelationsView/components/SecondLevelWrapper/SecondLevelWrapper.tsx +66 -0
- package/src/components/ProfileRelationsView/components/SecondLevelWrapper/__tests__/SecondLevelWrapper.test.tsx +234 -0
- package/src/components/ProfileRelationsView/components/SecondLevelWrapper/styles.ts +12 -0
- package/src/components/ProfileRelationsView/components/SuggestedButtons/SuggestedButtons.tsx +23 -0
- package/src/components/ProfileRelationsView/components/SuggestedButtons/__tests__/SuggestedButtons.test.tsx +33 -0
- package/src/components/ProfileRelationsView/components/SuggestedButtons/styles.ts +7 -0
- package/src/components/ProfileRelationsView/contexts/ImportDTContext.ts +7 -0
- package/src/components/ProfileRelationsView/contexts/RelationsViewStateContext.ts +6 -0
- package/src/components/ProfileRelationsView/helpers/__tests__/filters.test.tsx +10 -0
- package/src/components/ProfileRelationsView/helpers/__tests__/ratings.test.ts +92 -0
- package/src/components/ProfileRelationsView/helpers/__tests__/relation.test.tsx +27 -0
- package/src/components/ProfileRelationsView/helpers/filters.ts +17 -0
- package/src/components/ProfileRelationsView/helpers/permissions.ts +17 -0
- package/src/components/ProfileRelationsView/helpers/ratings.ts +35 -0
- package/src/components/ProfileRelationsView/helpers/relation.ts +15 -0
- package/src/components/ProfileRelationsView/hooks/useRelationInfo.ts +25 -0
- package/src/components/ProfileRelationsView/hooks/useRelationsState.ts +92 -0
- package/src/components/ProfileRelationsView/hooks/useSecondLevelConnections.ts +76 -0
- package/src/components/ProfileRelationsView/hooks/useSuggestedRelations.ts +54 -0
- package/src/components/ProfileSingleAttributeView/ProfileSingleAttributeView.tsx +20 -0
- package/src/components/ProfileSingleAttributeView/__tests__/IntegrationProfileSingleAttribute.test.tsx +368 -0
- package/src/components/ProfileSingleAttributeView/__tests__/ProfileSingleAttributeView.test.tsx +933 -0
- package/src/components/ProfileSingleAttributeView/__tests__/data/metadata.data.ts +103 -0
- package/src/components/ProfileSingleAttributeView/__tests__/data/store.data.ts +42 -0
- package/src/components/ProfileSingleAttributeView/components/FilterButton/FilterButton.tsx +63 -0
- package/src/components/ProfileSingleAttributeView/components/FilterButton/__tests__/FilterButton.spec.tsx +93 -0
- package/src/components/ProfileSingleAttributeView/components/FilterButton/styles.ts +27 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeEditableContent/SingleAttributeEditableContent.tsx +204 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeEditableContent/__tests__/SingleAttributeEditableContent.specs.tsx +559 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeEditableContent/styles.ts +28 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeHeader/SingleAttributeHeader.tsx +58 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeHeader/__tests__/SingleAttributeHeader.test.tsx +188 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeHeader/styles.ts +21 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeReadableContent/SingleAttributeReadableContent.tsx +31 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeReadableContent/__tests__/SingleAttributeReadableContent.spec.tsx +42 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeReadableContent/styles.ts +9 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeView/SingleAttributeView.tsx +90 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeView/__tests__/SingleAttributeView.test.tsx +346 -0
- package/src/components/ProfileSingleAttributeView/components/SingleAttributeView/styles.ts +22 -0
- package/src/components/ProfileSingleAttributeView/contexts/SingleAttributeContext.ts +20 -0
- package/src/components/ProfileSingleAttributeView/hooks/useSingleAttribute.ts +25 -0
- package/src/components/ProfileSingleAttributeView/styles.ts +26 -0
- package/src/components/ProfileTableAttributeView/ProfileTableAttributeView.tsx +20 -0
- package/src/components/ProfileTableAttributeView/__tests__/IntegrationProfileTableAttributeView.test.tsx +278 -0
- package/src/components/ProfileTableAttributeView/__tests__/ProfileTableAttributeView.test.tsx +744 -0
- package/src/components/ProfileTableAttributeView/__tests__/data/metadata.data.ts +141 -0
- package/src/components/ProfileTableAttributeView/__tests__/data/store.data.ts +48 -0
- package/src/components/ProfileTableAttributeView/components/AttributeEditing/AttributeEditing.tsx +97 -0
- package/src/components/ProfileTableAttributeView/components/AttributeEditing/__tests__/AttributeEditing.test.tsx +409 -0
- package/src/components/ProfileTableAttributeView/components/AttributeEditing/styles.ts +17 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/AttributeTable.tsx +171 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/EditButtons.tsx +28 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/__tests__/AttributeTable.test.tsx +431 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/__tests__/EditButtons.test.tsx +54 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/BlobRenderer.tsx +20 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/DefaultCellValueRenderer.tsx +43 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/HeadCellRenderer.tsx +19 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/RowCellRenderer.tsx +33 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/__tests__/BlobRenderer.test.tsx +29 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/__tests__/DefaultCellValueRenderer.test.tsx +149 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/cell-renderers/styles.ts +61 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTable/styles.ts +21 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTableHeader/AttributeTableHeader.tsx +53 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTableHeader/__tests__/AttributeTableHeader.test.tsx +96 -0
- package/src/components/ProfileTableAttributeView/components/AttributeTableHeader/styles.ts +7 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeContent/TableAttributeContent.tsx +123 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeContent/__tests__/TableAttributeContent.test.tsx +600 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeContent/hooks/useEditableAttribute.ts +212 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeEditableContent/TableAttributeEditableContent.tsx +96 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeEditableContent/__tests__/TableAttributeEditableContent.test.tsx +450 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeEditableContent/hooks/__tests__/useExpandAttributes.test.tsx +92 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeEditableContent/hooks/useExpandAttributes.ts +88 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeEditableContent/styles.ts +21 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeView/TableAttributeView.tsx +64 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeView/__tests__/TableAttributeView.test.tsx +139 -0
- package/src/components/ProfileTableAttributeView/components/TableAttributeView/styles.ts +20 -0
- package/src/components/ProfileTableAttributeView/components/types.ts +16 -0
- package/src/components/ProfileTableAttributeView/contexts/TableAttributeContext.tsx +34 -0
- package/src/components/ProfileTableAttributeView/helpers/tableAttributeHelpers.ts +72 -0
- package/src/components/ProfileTableAttributeView/hooks/__tests__/helpers.test.ts +97 -0
- package/src/components/ProfileTableAttributeView/hooks/helpers.ts +13 -0
- package/src/components/ProfileTableAttributeView/hooks/reducer.ts +19 -0
- package/src/components/ProfileTableAttributeView/hooks/useTableAttribute.ts +77 -0
- package/src/components/RightSidePanel/RightSidePanel.tsx +43 -0
- package/src/components/RightSidePanel/__tests__/RightSidePanel.spec.tsx +149 -0
- package/src/components/RightSidePanel/components/CollaborationButton/CollaborationButton.tsx +22 -0
- package/src/components/RightSidePanel/components/CollaborationButton/__tests__/CollaborationButton.spec.tsx +24 -0
- package/src/components/RightSidePanel/components/CollaborationList/CollaborationList.tsx +56 -0
- package/src/components/RightSidePanel/components/CollaborationList/__tests__/CollaborationList.spec.tsx +104 -0
- package/src/components/RightSidePanel/components/CollaborationList/styles.ts +15 -0
- package/src/components/RightSidePanel/components/CollaborationPanelEmptyState/CollaborationPanelEmptyState.tsx +14 -0
- package/src/components/RightSidePanel/components/CollaborationPanelEmptyState/__tests__/CollaborationPanelEmptyState.specs.tsx +16 -0
- package/src/components/RightSidePanel/components/DBConnectorsList/DBConnectorsList.tsx +19 -0
- package/src/components/RightSidePanel/components/DBConnectorsList/__tests__/DBConnectorsList.spec.tsx +42 -0
- package/src/components/RightSidePanel/components/DBConnectorsList/styles.ts +12 -0
- package/src/components/RightSidePanel/components/WorkflowButton/WorkflowButton.tsx +21 -0
- package/src/components/RightSidePanel/components/WorkflowButton/__tests__/WorkflowButton.spec.tsx +23 -0
- package/src/components/RightSidePanel/components/WorkflowList/WorkflowList.tsx +18 -0
- package/src/components/RightSidePanel/components/WorkflowList/__tests__/WorkflowList.spec.tsx +46 -0
- package/src/components/RightSidePanel/components/WorkflowList/styles.ts +9 -0
- package/src/components/RightSidePanel/components/WorkflowPanelEmptyState/WorkflowPanelEmptyState.tsx +14 -0
- package/src/components/RightSidePanel/components/WorkflowPanelEmptyState/__tests__/WorkflowPanelEmptyState.specs.tsx +17 -0
- package/src/components/RightSidePanel/icons/CollaborationIcon.svg +18 -0
- package/src/components/RightSidePanel/icons/ConnectorsIcon.svg +3 -0
- package/src/components/RightSidePanel/styles.ts +21 -0
- package/src/components/Sandbox/CustomView.tsx +59 -0
- package/src/components/Sandbox/__tests__/CustomView.test.tsx +294 -0
- package/src/components/Sandbox/styles.ts +10 -0
- package/src/components/TagPerspectiveView/TagPerspectiveView.tsx +79 -0
- package/src/components/TagPerspectiveView/__tests__/TagPerspectiveView.test.tsx +146 -0
- package/src/components/TagPerspectiveView/components/TagListHeader/TagListHeader.tsx +48 -0
- package/src/components/TagPerspectiveView/components/TagListHeader/__tests__/TagListHeader.test.tsx +60 -0
- package/src/components/TagPerspectiveView/components/TagListHeader/index.ts +1 -0
- package/src/components/TagPerspectiveView/components/TagListHeader/styles.ts +36 -0
- package/src/components/TagPerspectiveView/components/TagProfileBand/TagProfileBand.tsx +21 -0
- package/src/components/TagPerspectiveView/components/TagProfileBand/__tests__/TagProfileBand.test.tsx +14 -0
- package/src/components/TagPerspectiveView/components/TagProfileBand/index.ts +1 -0
- package/src/components/TagPerspectiveView/components/TagProfileBand/styles.ts +24 -0
- package/src/components/TagPerspectiveView/hooks/__tests__/useTag.test.tsx +166 -0
- package/src/components/TagPerspectiveView/hooks/__tests__/useTagsProvider.test.tsx +208 -0
- package/src/components/TagPerspectiveView/hooks/useTag.ts +48 -0
- package/src/components/TagPerspectiveView/hooks/useTagsProvider.ts +83 -0
- package/src/components/TagPerspectiveView/index.ts +1 -0
- package/src/components/TagPerspectiveView/styles.ts +43 -0
- package/src/components/hooks/helpers/__tests__/helpers.test.ts +688 -0
- package/src/components/hooks/helpers/index.ts +77 -0
- package/src/components/hooks/useProfileValidation.ts +30 -0
- package/src/components/hooks/useSingleAttributeLoader.ts +164 -0
- package/src/components/views/HOCs/styles.ts +37 -0
- package/src/components/views/HOCs/withDragHandle.tsx +26 -0
- package/src/components/views/HOCs/withErrorBoundary.tsx +27 -0
- package/src/components/views/StubView.tsx +18 -0
- package/src/components/views/ViewComponent.tsx +25 -0
- package/src/components/views/ViewsFactory.tsx +143 -0
- package/src/components/views/__tests__/ViewComponent.specs.tsx +47 -0
- package/src/components/views/__tests__/ViewsFactory.specs.tsx +256 -0
- package/src/components/views/styles.ts +16 -0
- package/src/perspectives/DCRReviewPerspective.tsx +51 -0
- package/src/perspectives/ProfilePerspective.tsx +104 -0
- package/src/perspectives/TagPerspective.tsx +42 -0
- package/src/perspectives/__tests__/DCRReviewPerspective.spec.tsx +54 -0
- package/src/perspectives/__tests__/ProfilePerspective.spec.tsx +76 -0
- package/src/perspectives/__tests__/helpers.spec.ts +131 -0
- package/src/perspectives/helpers.ts +29 -0
- package/src/types/index.ts +9 -0
- package/stories/Profile.stories.tsx +35 -0
- package/stories/utils/entity.ts +80 -0
- package/stories/utils/hierarchyTree/config.ts +13 -0
- package/stories/utils/hierarchyTree/hopsResponse.ts +182 -0
- package/stories/utils/hierarchyTree/treeResponse.ts +412 -0
- package/stories/utils/mdmStore.ts +64 -0
- package/stories/utils/metadata.ts +701 -0
- package/stories/utils/profilePerspectiveConfig.ts +95 -0
- package/stories/utils/relationsTableView/config.ts +18 -0
- package/stories/utils/relationsTableView/connections.ts +647 -0
- package/stories/utils/responses.ts +62 -0
- package/tsconfig.json +4 -0
- package/webpack.config.js +10 -0
- package/bundle.js +0 -2
- /package/{5271a9e7b6651c852e93.png → public/5271a9e7b6651c852e93.png} +0 -0
- /package/{main.css → public/main.css} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import {History, HistoryMode} from '@reltio/mdm-module';
|
|
2
|
+
import {MetadataPermissions, Mode, Operation} from '@reltio/mdm-sdk';
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
mode?: Mode;
|
|
6
|
+
access?: MetadataPermissions[];
|
|
7
|
+
hasNavigationData?: boolean;
|
|
8
|
+
hasWorkflowPath?: boolean;
|
|
9
|
+
workflowConfigEnabled?: boolean;
|
|
10
|
+
isTempUri?: boolean;
|
|
11
|
+
dataTenant?: boolean;
|
|
12
|
+
operation?: Operation;
|
|
13
|
+
history?: History;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const createInitialState = ({
|
|
17
|
+
mode = Mode.Viewing,
|
|
18
|
+
access,
|
|
19
|
+
hasNavigationData,
|
|
20
|
+
hasWorkflowPath = true,
|
|
21
|
+
workflowConfigEnabled = true,
|
|
22
|
+
isTempUri,
|
|
23
|
+
dataTenant,
|
|
24
|
+
operation,
|
|
25
|
+
history = {mode: HistoryMode.Previous}
|
|
26
|
+
}: Props = {}) => {
|
|
27
|
+
const entityUri = `entities/${isTempUri ? 'uri$$' : ''}HMcnV19`;
|
|
28
|
+
const searchNavigationData = {
|
|
29
|
+
uri: entityUri,
|
|
30
|
+
index: 1,
|
|
31
|
+
total: 3,
|
|
32
|
+
tenant: 'alenat',
|
|
33
|
+
cache: ['entities/1', entityUri, 'entities/3']
|
|
34
|
+
};
|
|
35
|
+
const user = {
|
|
36
|
+
userPermissions: {
|
|
37
|
+
permissions: {
|
|
38
|
+
'workflow:data.process': {
|
|
39
|
+
CREATE: ['alenat']
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
profile: {
|
|
47
|
+
mode,
|
|
48
|
+
entity: {
|
|
49
|
+
attributes: {
|
|
50
|
+
FirstName: [
|
|
51
|
+
{
|
|
52
|
+
ov: true,
|
|
53
|
+
value: 'Test First Name',
|
|
54
|
+
uri: `${entityUri}/attributes/FirstName/adfRGFDS`,
|
|
55
|
+
type: 'configuration/entityTypes/Employee/attributes/FirstName'
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
dataTenant,
|
|
60
|
+
analyticsAttributes: {},
|
|
61
|
+
label: 'Test',
|
|
62
|
+
secondaryLabel: '',
|
|
63
|
+
type: 'configuration/entityTypes/Employee',
|
|
64
|
+
uri: entityUri
|
|
65
|
+
},
|
|
66
|
+
modifiedEntities: {
|
|
67
|
+
[entityUri]: {
|
|
68
|
+
attributes: {},
|
|
69
|
+
dataTenant,
|
|
70
|
+
analyticsAttributes: {},
|
|
71
|
+
label: 'Modified entity',
|
|
72
|
+
secondaryLabel: '',
|
|
73
|
+
type: 'configuration/entityTypes/Employee',
|
|
74
|
+
uri: entityUri
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
operation,
|
|
78
|
+
history
|
|
79
|
+
},
|
|
80
|
+
metadata: {
|
|
81
|
+
alenat: {
|
|
82
|
+
entityTypes: [
|
|
83
|
+
{
|
|
84
|
+
uri: `${isTempUri ? 'uri$$/' : ''}configuration/entityTypes/Employee`,
|
|
85
|
+
attributes: [
|
|
86
|
+
{
|
|
87
|
+
name: 'FirstName',
|
|
88
|
+
uri: 'configuration/entityTypes/Employee/attributes/FirstName'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Address',
|
|
92
|
+
type: 'Reference',
|
|
93
|
+
uri: 'configuration/entityTypes/Employee/attributes/Address',
|
|
94
|
+
relationshipTypeURI: 'configuration/relationTypes/HasAddress'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'Affiliations',
|
|
98
|
+
type: 'Reference',
|
|
99
|
+
uri: 'configuration/entityTypes/Employee/attributes/Affiliations',
|
|
100
|
+
relationshipTypeURI: 'configuration/relationTypes/EmployeetoHCA'
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
access
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
relationTypes: [
|
|
107
|
+
{
|
|
108
|
+
uri: 'configuration/relationTypes/uri1',
|
|
109
|
+
startObject: {
|
|
110
|
+
uri: 'configuration/relationTypes/uri1/startObject',
|
|
111
|
+
objectTypeURI: 'configuration/entityTypes/HCP'
|
|
112
|
+
},
|
|
113
|
+
endObject: {
|
|
114
|
+
uri: 'configuration/relationTypes/uri1/endObject',
|
|
115
|
+
objectTypeURI: 'configuration/entityTypes/Employee'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
uri: 'configuration/relationTypes/uri2',
|
|
120
|
+
startObject: {
|
|
121
|
+
uri: 'configuration/relationTypes/uri2/startObject',
|
|
122
|
+
objectTypeURI: 'configuration/entityTypes/HCP'
|
|
123
|
+
},
|
|
124
|
+
endObject: {
|
|
125
|
+
uri: 'configuration/relationTypes/uri2/endObject',
|
|
126
|
+
objectTypeURI: 'configuration/entityTypes/HCA'
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
uri: 'configuration/relationTypes/OMGToREGISTRY',
|
|
131
|
+
startObject: {
|
|
132
|
+
uri: 'configuration/relationTypes/OMGToREGISTRY/startObject',
|
|
133
|
+
objectTypeURI: 'configuration/entityTypes/Employee'
|
|
134
|
+
},
|
|
135
|
+
endObject: {
|
|
136
|
+
uri: 'configuration/relationTypes/OMGToREGISTRY/endObject',
|
|
137
|
+
objectTypeURI: 'configuration/entityTypes/HCA'
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
tenant: {
|
|
144
|
+
id: 'alenat'
|
|
145
|
+
},
|
|
146
|
+
ui: {
|
|
147
|
+
paths: {
|
|
148
|
+
workflowPath: hasWorkflowPath ? 'https://tst-01-workflow.reltio.com/workflow-adapter' : undefined
|
|
149
|
+
},
|
|
150
|
+
config: {
|
|
151
|
+
'com.reltio.plugins.workflow.configuration': {
|
|
152
|
+
enabled: workflowConfigEnabled
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
search: {
|
|
157
|
+
keyword: null,
|
|
158
|
+
searchNavigationData: hasNavigationData ? searchNavigationData : undefined
|
|
159
|
+
},
|
|
160
|
+
user: hasWorkflowPath ? user : {}
|
|
161
|
+
};
|
|
162
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Icon / Copy</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<path d="M20.2222222,6 C21.2088889,6 22,6.8 22,7.77777778 L22,20.2222222 C22,21.2 21.2088889,22 20.2222222,22 L7.77777778,22 C6.79111111,22 6,21.2 6,20.2222222 L6,7.77777778 C6,6.8 6.79111111,6 7.77777778,6 L20.2222222,6 Z M20,8 L8,8 L8,20 L20,20 L20,8 Z M4,18 L2,18 L2,4 C2,2.9 2.9,2 4,2 L18,2 L18,4 L4,4 L4,18 Z" id="path-1"></path>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="Icon-/-Copy" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
8
|
+
<mask id="mask-2" fill="white">
|
|
9
|
+
<use xlink:href="#path-1"></use>
|
|
10
|
+
</mask>
|
|
11
|
+
<g id="Shape" fill-rule="nonzero"></g>
|
|
12
|
+
<rect id="↳-Icon-Color" fill-opacity="0.54" fill="#000000" mask="url(#mask-2)" x="0" y="0" width="24" height="24"></rect>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {useCallback, useMemo} from 'react';
|
|
2
|
+
import {
|
|
3
|
+
includes,
|
|
4
|
+
pipe,
|
|
5
|
+
isNil,
|
|
6
|
+
propOr,
|
|
7
|
+
filter,
|
|
8
|
+
map,
|
|
9
|
+
prop,
|
|
10
|
+
cond,
|
|
11
|
+
identity,
|
|
12
|
+
omit,
|
|
13
|
+
find,
|
|
14
|
+
complement,
|
|
15
|
+
when,
|
|
16
|
+
either,
|
|
17
|
+
pick,
|
|
18
|
+
always,
|
|
19
|
+
T
|
|
20
|
+
} from 'ramda';
|
|
21
|
+
import {
|
|
22
|
+
BaseCloneAction,
|
|
23
|
+
CloneAction,
|
|
24
|
+
Entity,
|
|
25
|
+
getEntityType,
|
|
26
|
+
isReference,
|
|
27
|
+
isRelationWithEntityType,
|
|
28
|
+
getRelationTypeUriFromAttrType
|
|
29
|
+
} from '@reltio/mdm-sdk';
|
|
30
|
+
import mdm, {profile} from '@reltio/mdm-module';
|
|
31
|
+
import {useDispatch, useSelector} from 'react-redux';
|
|
32
|
+
|
|
33
|
+
type Props = {
|
|
34
|
+
cloneAction?: CloneAction[];
|
|
35
|
+
onCloneDiscard: () => void;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const useCloneAction = ({cloneAction: cloneActionProp, onCloneDiscard}: Props) => {
|
|
39
|
+
const entity: Entity = useSelector(mdm.selectors.getEntityWithoutDiff);
|
|
40
|
+
const metadata = useSelector(mdm.selectors.getMetadata);
|
|
41
|
+
const dispatch = useDispatch();
|
|
42
|
+
const entityTypeUri = entity?.type;
|
|
43
|
+
const relationTypes = metadata.relationTypes;
|
|
44
|
+
const isRelationSuitableForEntityType = useCallback(isRelationWithEntityType(metadata, entityTypeUri), [
|
|
45
|
+
metadata,
|
|
46
|
+
entityTypeUri
|
|
47
|
+
]);
|
|
48
|
+
const entityType = getEntityType(metadata, entityTypeUri);
|
|
49
|
+
const cloneAction = useMemo<BaseCloneAction>(
|
|
50
|
+
() =>
|
|
51
|
+
when(
|
|
52
|
+
complement(isNil),
|
|
53
|
+
pipe(
|
|
54
|
+
find(pipe(propOr([], 'entityTypeUris'), either(includes(entityTypeUri), includes('*')))),
|
|
55
|
+
when(complement(isNil), omit(['entityTypeUris']))
|
|
56
|
+
)
|
|
57
|
+
)(cloneActionProp),
|
|
58
|
+
[cloneActionProp, entityTypeUri]
|
|
59
|
+
);
|
|
60
|
+
const onClone = useCallback(() => {
|
|
61
|
+
if (cloneAction) {
|
|
62
|
+
const modifiedRelationTypes: string[] = pipe(
|
|
63
|
+
prop('relationshipTypesToCopy'),
|
|
64
|
+
cond([
|
|
65
|
+
[
|
|
66
|
+
isNil,
|
|
67
|
+
pipe(
|
|
68
|
+
always(entityType),
|
|
69
|
+
propOr([], 'attributes'),
|
|
70
|
+
filter(isReference),
|
|
71
|
+
map(getRelationTypeUriFromAttrType)
|
|
72
|
+
)
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
includes('*'),
|
|
76
|
+
pipe(always(relationTypes || []), map(prop('uri')), filter(isRelationSuitableForEntityType))
|
|
77
|
+
],
|
|
78
|
+
[T, identity]
|
|
79
|
+
])
|
|
80
|
+
)(cloneAction);
|
|
81
|
+
dispatch(
|
|
82
|
+
profile.entity.actions.entityCloneRequested({
|
|
83
|
+
data: {
|
|
84
|
+
...pick(['attributeReplacementMapping'], cloneAction),
|
|
85
|
+
relationshipTypesToCopy: modifiedRelationTypes
|
|
86
|
+
},
|
|
87
|
+
entityUri: entity.uri
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
onCloneDiscard();
|
|
92
|
+
}, [cloneAction, onCloneDiscard, entityType, relationTypes, entity.uri, isRelationSuitableForEntityType]);
|
|
93
|
+
return cloneAction ? onClone : undefined;
|
|
94
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {PerspectiveProfileBand} from './PerspectiveProfileBand';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {makeStyles} from '@mui/styles';
|
|
2
|
+
|
|
3
|
+
export const useStyles = makeStyles({
|
|
4
|
+
editingButtons: {
|
|
5
|
+
display: 'flex',
|
|
6
|
+
'& button + button': {
|
|
7
|
+
minWidth: '88px',
|
|
8
|
+
marginLeft: '8px'
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
searchResults: {
|
|
12
|
+
width: '150px',
|
|
13
|
+
height: '25px',
|
|
14
|
+
backgroundColor: '#ccc'
|
|
15
|
+
},
|
|
16
|
+
comments: {
|
|
17
|
+
display: 'flex',
|
|
18
|
+
justifyContent: 'flex-end',
|
|
19
|
+
marginTop: '10px'
|
|
20
|
+
},
|
|
21
|
+
menuButton: {
|
|
22
|
+
marginLeft: 8
|
|
23
|
+
},
|
|
24
|
+
cancelButton: {
|
|
25
|
+
border: '1px solid rgba(0, 0, 0, 0.23)'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="19px" height="17px" viewBox="0 0 19 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Icon / Suggest</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<path d="M14,17 L14,19 L4,19 L4,17 L14,17 Z M20,13 L20,15 L4,15 L4,13 L16.8838736,13.0010281 C16.9225317,13.0015543 16.9612411,13.0018182 17,13.0018182 L17.116,12.9994951 L20,13 Z M11.5428099,11.0000694 L4,11 L4,9 L9.81972777,9.0006627 C10.2895736,9.75897853 10.8727488,10.432214 11.5428099,11.0000694 Z M9.13927083,6.17763769 L8.8503051,6.91090909 L8.885,6.99949507 L4,7 L4,5 L9.71283163,4.99849507 C9.49349031,5.37266404 9.30129724,5.76648396 9.13927083,6.17763769 Z M17,2.82 C14.2727273,2.82 11.9436364,4.51636364 11,6.91090909 C11.9436364,9.30545455 14.2727273,11.0018182 17,11.0018182 C19.7272727,11.0018182 22.0563636,9.30545455 23,6.91090909 C22.0563636,4.51636364 19.7272727,2.82 17,2.82 Z M17,9.63454545 C15.4945455,9.63454545 14.2727273,8.41272727 14.2727273,6.90727273 C14.2727273,5.40181818 15.4945455,4.18 17,4.18 C18.5054545,4.18 19.7272727,5.40181818 19.7272727,6.90727273 C19.7272727,8.41272727 18.5054545,9.63454545 17,9.63454545 Z M17,5.27 C16.0945455,5.27 15.3636364,6.00090909 15.3636364,6.90636364 C15.3636364,7.81181818 16.0945455,8.54272727 17,8.54272727 C17.9054545,8.54272727 18.6363636,7.81181818 18.6363636,6.90636364 C18.6363636,6.00090909 17.9054545,5.27 17,5.27 Z" id="path-1"></path>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
8
|
+
<g id="Group" transform="translate(-4.000000, -2.500000)">
|
|
9
|
+
<mask id="mask-2" fill="white">
|
|
10
|
+
<use xlink:href="#path-1"></use>
|
|
11
|
+
</mask>
|
|
12
|
+
<g id="Shape" fill-rule="nonzero"></g>
|
|
13
|
+
<rect id="↳-Icon-Color" fill-opacity="0.54" fill="#000000" mask="url(#mask-2)" x="0" y="0" width="24" height="24"></rect>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {AttributesView} from '@reltio/components';
|
|
3
|
+
import {AttributeViewConfig} from '@reltio/mdm-sdk';
|
|
4
|
+
|
|
5
|
+
type ProfileAttributesViewProps = {
|
|
6
|
+
config: AttributeViewConfig;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const ProfileAttributesView = ({className, config}: ProfileAttributesViewProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<AttributesView
|
|
13
|
+
className={className}
|
|
14
|
+
caption={config.caption}
|
|
15
|
+
excludeUris={config.excludeUris}
|
|
16
|
+
includeUris={config.includeUris}
|
|
17
|
+
attributesCount={config.attributesCount}
|
|
18
|
+
pinnedAttributes={config.pinnedAttributes}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {AttributesView} from '@reltio/components';
|
|
3
|
+
import {shallow} from 'enzyme';
|
|
4
|
+
import * as reactRedux from 'react-redux';
|
|
5
|
+
import {AttributeViewConfig, ProfileViewTypes} from '@reltio/mdm-sdk';
|
|
6
|
+
import {ProfileAttributesView} from '../ProfileAttributesView';
|
|
7
|
+
|
|
8
|
+
const config: AttributeViewConfig = {
|
|
9
|
+
point: 'com.reltio.plugins.ui.view',
|
|
10
|
+
id: 'id',
|
|
11
|
+
class: ProfileViewTypes.Attributes,
|
|
12
|
+
excludeUris: ['configuration/entityTypes/HCP/analyticsAttributes/AnalyticsAttributesName'],
|
|
13
|
+
includeUris: ['configuration/entityTypes/HCP/attributes/Name'],
|
|
14
|
+
caption: 'Attributes View(Test123)',
|
|
15
|
+
attributesCount: 10,
|
|
16
|
+
pinnedAttributes: [
|
|
17
|
+
{
|
|
18
|
+
roles: ['ROLE_ADMIN'],
|
|
19
|
+
attributes: [
|
|
20
|
+
'configuration/entityTypes/HCA/attributes/SubTypeCode',
|
|
21
|
+
'configuration/entityTypes/HCA/attributes/Department'
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const appearance = {
|
|
28
|
+
entityUri1: 'UNDO_IGNORE_ATTRIBUTE'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const attributes = {
|
|
32
|
+
entityUri1: [
|
|
33
|
+
{
|
|
34
|
+
value: '123',
|
|
35
|
+
type: 'superType',
|
|
36
|
+
uri: 'entityUri1'
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
describe('ProfileAttributesView tests', () => {
|
|
42
|
+
beforeEach(() => {
|
|
43
|
+
const store = {
|
|
44
|
+
profile: {
|
|
45
|
+
history: {
|
|
46
|
+
diff: {
|
|
47
|
+
appearance,
|
|
48
|
+
attributes
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
jest.spyOn(reactRedux, 'useSelector').mockImplementation((selector) => selector(store));
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
afterEach(() => {
|
|
57
|
+
jest.clearAllMocks();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should render ProfileAttributesView', () => {
|
|
61
|
+
const component = shallow(<ProfileAttributesView config={config} />);
|
|
62
|
+
const attributesView = component.find(AttributesView);
|
|
63
|
+
expect(attributesView.length).toBe(1);
|
|
64
|
+
expect(attributesView.prop('caption')).toBe(config.caption);
|
|
65
|
+
expect(attributesView.prop('excludeUris')).toBe(config.excludeUris);
|
|
66
|
+
expect(attributesView.prop('includeUris')).toBe(config.includeUris);
|
|
67
|
+
expect(attributesView.prop('attributesCount')).toBe(config.attributesCount);
|
|
68
|
+
expect(attributesView.prop('pinnedAttributes')).toBe(config.pinnedAttributes);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React, {useCallback, useEffect, useMemo, useState} from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import {useSelector} from 'react-redux';
|
|
4
|
+
import i18n from 'ui-i18n';
|
|
5
|
+
import {partition} from 'ramda';
|
|
6
|
+
import ErrorIcon from '@mui/icons-material/Warning';
|
|
7
|
+
import WarningIcon from '@mui/icons-material/Error';
|
|
8
|
+
import mdmModule from '@reltio/mdm-module';
|
|
9
|
+
import {AttributeError, isCriticalError} from '@reltio/mdm-sdk';
|
|
10
|
+
|
|
11
|
+
import useStyles from './styles';
|
|
12
|
+
|
|
13
|
+
import {ErrorsPanel} from './components/ErrorsPanel';
|
|
14
|
+
import {Error} from './components/Error';
|
|
15
|
+
import {useCachedErrors} from './useCachedErrors';
|
|
16
|
+
|
|
17
|
+
export const ProfileErrorsPanel = () => {
|
|
18
|
+
const styles = useStyles();
|
|
19
|
+
const allErrors = useSelector(mdmModule.selectors.getProfileErrors);
|
|
20
|
+
const cachedAllErrors = useCachedErrors(allErrors);
|
|
21
|
+
|
|
22
|
+
const [errors, warnings]: [AttributeError[], AttributeError[]] = useMemo(
|
|
23
|
+
() => partition(isCriticalError, cachedAllErrors),
|
|
24
|
+
[cachedAllErrors]
|
|
25
|
+
);
|
|
26
|
+
const [expandedPanelId, setExpandedPanelId] = useState(null);
|
|
27
|
+
const panels = useMemo(
|
|
28
|
+
() =>
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
id: 'errors',
|
|
32
|
+
title: i18n.text('${number} ${errors}', {
|
|
33
|
+
number: errors.length,
|
|
34
|
+
errors: errors.length === 1 ? i18n.text('error') : i18n.text('errors')
|
|
35
|
+
}),
|
|
36
|
+
icon: <ErrorIcon className={classnames(styles.icon, styles.errorIcon)} />,
|
|
37
|
+
items: errors,
|
|
38
|
+
accordionClassName: styles.errorsAccordion,
|
|
39
|
+
accordionDetailsClassName: styles.errorsAccordionDetails
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'warnings',
|
|
43
|
+
title: i18n.text('${number} ${warnings}', {
|
|
44
|
+
number: warnings.length,
|
|
45
|
+
warnings: warnings.length === 1 ? i18n.text('warning') : i18n.text('warnings')
|
|
46
|
+
}),
|
|
47
|
+
icon: <WarningIcon className={classnames(styles.icon, styles.warningIcon)} />,
|
|
48
|
+
items: warnings,
|
|
49
|
+
accordionClassName: styles.warningsAccordion,
|
|
50
|
+
accordionDetailsClassName: styles.warningsAccordionDetails
|
|
51
|
+
}
|
|
52
|
+
].filter(({items}) => items.length > 0),
|
|
53
|
+
[errors, warnings, styles]
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
setExpandedPanelId('errors');
|
|
58
|
+
}, [errors]);
|
|
59
|
+
|
|
60
|
+
const handleChange = useCallback(
|
|
61
|
+
(panelId: string) => (event, isExpanded: boolean) => {
|
|
62
|
+
setExpandedPanelId(isExpanded ? panelId : null);
|
|
63
|
+
},
|
|
64
|
+
[]
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return panels.length > 0 ? (
|
|
68
|
+
<ErrorsPanel panels={panels} expandedPanelId={expandedPanelId} onToggle={handleChange} ErrorComponent={Error} />
|
|
69
|
+
) : null;
|
|
70
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {shallow, mount} from 'enzyme';
|
|
3
|
+
import * as reactReduxImports from 'react-redux';
|
|
4
|
+
import {ErrorSeverity, ErrorSource, ErrorType} from '@reltio/mdm-sdk';
|
|
5
|
+
|
|
6
|
+
import {ProfileErrorsPanel} from '../ProfileErrorsPanel';
|
|
7
|
+
import {ErrorsPanel} from '../components/ErrorsPanel';
|
|
8
|
+
import {Error} from '../components/Error';
|
|
9
|
+
|
|
10
|
+
describe('ProfileErrorsPanel tests', () => {
|
|
11
|
+
let store;
|
|
12
|
+
|
|
13
|
+
const error = {
|
|
14
|
+
type: ErrorType.invalid,
|
|
15
|
+
uri: null,
|
|
16
|
+
attributeTypeUri: 'configuration/entityTypes/HCP/attributes/Name',
|
|
17
|
+
parentUri: 'entities/123',
|
|
18
|
+
message: 'Error 1',
|
|
19
|
+
severity: ErrorSeverity.ERROR,
|
|
20
|
+
source: ErrorSource.validationService,
|
|
21
|
+
path: []
|
|
22
|
+
};
|
|
23
|
+
const warning = {
|
|
24
|
+
type: ErrorType.invalid,
|
|
25
|
+
uri: null,
|
|
26
|
+
attributeTypeUri: 'configuration/entityTypes/HCP/attributes/RDMLookup',
|
|
27
|
+
parentUri: 'entities/123',
|
|
28
|
+
message: 'Warning 1',
|
|
29
|
+
severity: ErrorSeverity.WARNING,
|
|
30
|
+
source: ErrorSource.validationService,
|
|
31
|
+
path: []
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
store = {
|
|
36
|
+
profile: {
|
|
37
|
+
errors: []
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
jest.spyOn(reactReduxImports, 'useSelector').mockImplementation((selector) => selector(store));
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const setErrors = (component, errors) => {
|
|
44
|
+
store.profile.errors = errors;
|
|
45
|
+
component.setProps({});
|
|
46
|
+
component.update();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
afterEach(() => {
|
|
50
|
+
jest.clearAllMocks();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('should render nothing if there are no errors', () => {
|
|
54
|
+
const component = shallow(<ProfileErrorsPanel />);
|
|
55
|
+
expect(component.isEmptyRender()).toBe(true);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('should render ErrorsPanel with 2 panels when there are both errors and warnings', () => {
|
|
59
|
+
store.profile.errors = [error, error, warning];
|
|
60
|
+
const component = shallow(<ProfileErrorsPanel />);
|
|
61
|
+
expect(component.isEmptyRender()).toBe(false);
|
|
62
|
+
const errorsPanel = component.find(ErrorsPanel);
|
|
63
|
+
expect(errorsPanel.length).toBe(1);
|
|
64
|
+
const panels = errorsPanel.prop('panels');
|
|
65
|
+
expect(panels.length).toBe(2);
|
|
66
|
+
expect(panels[0].title).toBe('2 errors');
|
|
67
|
+
expect(panels[0].items).toEqual([error, error]);
|
|
68
|
+
expect(panels[1].title).toBe('1 warning');
|
|
69
|
+
expect(panels[1].items).toEqual([warning]);
|
|
70
|
+
expect(errorsPanel.prop('ErrorComponent')).toBe(Error);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('should render ErrorsPanel with only error panel when there are only error(s)', () => {
|
|
74
|
+
store.profile.errors = [error];
|
|
75
|
+
const component = shallow(<ProfileErrorsPanel />);
|
|
76
|
+
const errorsPanel = component.find(ErrorsPanel);
|
|
77
|
+
expect(errorsPanel.length).toBe(1);
|
|
78
|
+
const panels = errorsPanel.prop('panels');
|
|
79
|
+
expect(panels.length).toBe(1);
|
|
80
|
+
expect(panels[0].title).toBe('1 error');
|
|
81
|
+
expect(panels[0].items).toEqual([error]);
|
|
82
|
+
expect(errorsPanel.prop('ErrorComponent')).toBe(Error);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('should render ErrorsPanel with only warning panel when there are only warning(s)', () => {
|
|
86
|
+
store.profile.errors = [warning, warning];
|
|
87
|
+
const component = shallow(<ProfileErrorsPanel />);
|
|
88
|
+
const errorsPanel = component.find(ErrorsPanel);
|
|
89
|
+
expect(errorsPanel.length).toBe(1);
|
|
90
|
+
const panels = errorsPanel.prop('panels');
|
|
91
|
+
expect(panels.length).toBe(1);
|
|
92
|
+
expect(panels[0].title).toBe('2 warnings');
|
|
93
|
+
expect(panels[0].items).toEqual([warning, warning]);
|
|
94
|
+
expect(errorsPanel.prop('ErrorComponent')).toBe(Error);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('should toggle panels', () => {
|
|
98
|
+
store.profile.errors = [error, warning];
|
|
99
|
+
const component = shallow(<ProfileErrorsPanel />);
|
|
100
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe(null);
|
|
101
|
+
component.find(ErrorsPanel).prop('onToggle')('error')({}, true);
|
|
102
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe('error');
|
|
103
|
+
component.find(ErrorsPanel).prop('onToggle')('warning')({}, true);
|
|
104
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe('warning');
|
|
105
|
+
component.find(ErrorsPanel).prop('onToggle')('warning')({}, false);
|
|
106
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe(null);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('should expand error panel on new errors appearing', () => {
|
|
110
|
+
store.profile.errors = [];
|
|
111
|
+
const component = mount(<ProfileErrorsPanel />);
|
|
112
|
+
expect(component.find(ErrorsPanel).length).toBe(0);
|
|
113
|
+
|
|
114
|
+
setErrors(component, [error, warning]);
|
|
115
|
+
expect(component.find(ErrorsPanel).length).toBe(1);
|
|
116
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe('errors');
|
|
117
|
+
component.find(ErrorsPanel).prop('onToggle')('error')({}, false);
|
|
118
|
+
component.update();
|
|
119
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe(null);
|
|
120
|
+
|
|
121
|
+
setErrors(component, [{...error, message: 'new message'}, warning]);
|
|
122
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe('errors');
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('should not expand error panel after error deactivating', () => {
|
|
126
|
+
store.profile.errors = [];
|
|
127
|
+
const component = mount(<ProfileErrorsPanel />);
|
|
128
|
+
expect(component.find(ErrorsPanel).length).toBe(0);
|
|
129
|
+
|
|
130
|
+
setErrors(component, [error, warning]);
|
|
131
|
+
expect(component.find(ErrorsPanel).length).toBe(1);
|
|
132
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe('errors');
|
|
133
|
+
component.find(ErrorsPanel).prop('onToggle')('error')({}, false);
|
|
134
|
+
component.update();
|
|
135
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe(null);
|
|
136
|
+
|
|
137
|
+
setErrors(component, [{...error, deactivated: true}, warning]);
|
|
138
|
+
expect(component.find(ErrorsPanel).prop('expandedPanelId')).toBe(null);
|
|
139
|
+
});
|
|
140
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, {memo, useContext} from 'react';
|
|
2
|
+
import i18n from 'ui-i18n';
|
|
3
|
+
import {useSelector} from 'react-redux';
|
|
4
|
+
import mdmModule from '@reltio/mdm-module';
|
|
5
|
+
import {AttributeError, Metadata} from '@reltio/mdm-sdk';
|
|
6
|
+
import HyperlinkIcon from '../icons/hyperlink.svg';
|
|
7
|
+
import {SmallIconButtonWithTooltip, ScrollToElementContext} from '@reltio/components';
|
|
8
|
+
import {getDisplayedAttributeTypesPath, getDisplayedErrorMessage, getDisplayedErrorPath} from '../helpers';
|
|
9
|
+
|
|
10
|
+
import useStyles from '../styles';
|
|
11
|
+
|
|
12
|
+
type Props = {
|
|
13
|
+
error: AttributeError;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Error = memo(({error}: Props) => {
|
|
17
|
+
const styles = useStyles();
|
|
18
|
+
const metadata: Metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
19
|
+
const isEditableMode: boolean = useSelector(mdmModule.selectors.getIsEditableMode);
|
|
20
|
+
const displayedMessage = getDisplayedErrorMessage(metadata, error);
|
|
21
|
+
const displayedErrorPath = getDisplayedErrorPath(error);
|
|
22
|
+
const displayedAttributeTypesPath = getDisplayedAttributeTypesPath(error);
|
|
23
|
+
const {highlightError} = useContext(ScrollToElementContext);
|
|
24
|
+
const showLink = error.uri || (error.parentUri && error.attributeTypeUri);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<li>
|
|
28
|
+
<div className={styles.errorWrapper}>
|
|
29
|
+
{displayedAttributeTypesPath && (
|
|
30
|
+
<span className={styles.attributeTypesPath}>{displayedAttributeTypesPath}</span>
|
|
31
|
+
)}
|
|
32
|
+
<span className={styles.errorTitle}>
|
|
33
|
+
{displayedMessage}
|
|
34
|
+
{showLink && isEditableMode && (
|
|
35
|
+
<SmallIconButtonWithTooltip
|
|
36
|
+
icon={HyperlinkIcon}
|
|
37
|
+
size="XXS"
|
|
38
|
+
onClick={() => highlightError(error)}
|
|
39
|
+
tooltipTitle={i18n.text('Go to error')}
|
|
40
|
+
className={styles.goToIcon}
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
</span>
|
|
44
|
+
{displayedErrorPath && <span className={styles.parents}>{displayedErrorPath}</span>}
|
|
45
|
+
</div>
|
|
46
|
+
</li>
|
|
47
|
+
);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
Error.displayName = 'Error';
|