@reltio/components 1.4.2190 → 1.4.2191

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.
Files changed (125) hide show
  1. package/ProfileBand/ProfileBand.d.ts +5 -4
  2. package/ProfileBand/ProfileBand.js +4 -5
  3. package/ProfileBand/ProfileBand.module.css.js +9 -0
  4. package/cjs/ProfileBand/ProfileBand.d.ts +5 -4
  5. package/cjs/ProfileBand/ProfileBand.js +14 -15
  6. package/cjs/ProfileBand/ProfileBand.module.css.js +9 -0
  7. package/cjs/contexts/MdmModuleContext/context.d.ts +2 -0
  8. package/cjs/contexts/MdmModuleContext/hooks.d.ts +1 -0
  9. package/cjs/contexts/MdmModuleContext/hooks.js +3 -1
  10. package/cjs/contexts/MdmModuleContext/index.d.ts +1 -1
  11. package/cjs/contexts/MdmModuleContext/index.js +2 -1
  12. package/cjs/features/history/HistoryRow/styles.d.ts +1 -1
  13. package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.d.ts +8 -0
  14. package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +18 -0
  15. package/cjs/features/workflow/ChangeRequestEditor/ChangeRequestEditor.module.css.js +9 -0
  16. package/cjs/features/workflow/ChangeRequestEditor/index.d.ts +1 -0
  17. package/cjs/features/workflow/ChangeRequestEditor/index.js +5 -0
  18. package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.d.ts +6 -0
  19. package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.js +19 -0
  20. package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.module.css.js +9 -0
  21. package/cjs/features/workflow/ReviewDCRButton/index.d.ts +1 -0
  22. package/cjs/features/workflow/ReviewDCRButton/index.js +5 -0
  23. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +11 -0
  24. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +63 -0
  25. package/cjs/features/workflow/ReviewDCRDialog/ReviewDCRDialog.module.css.js +9 -0
  26. package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.d.ts +8 -0
  27. package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.js +73 -0
  28. package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.module.css.js +9 -0
  29. package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.d.ts +1 -0
  30. package/cjs/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.js +5 -0
  31. package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.d.ts +9 -0
  32. package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.js +40 -0
  33. package/cjs/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js +9 -0
  34. package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.d.ts +3 -0
  35. package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.js +19 -0
  36. package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.d.ts +1 -0
  37. package/cjs/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.js +124 -0
  38. package/cjs/features/workflow/ReviewDCRDialog/helpers/index.d.ts +1 -0
  39. package/cjs/features/workflow/ReviewDCRDialog/helpers/index.js +5 -0
  40. package/cjs/features/workflow/ReviewDCRDialog/index.d.ts +1 -0
  41. package/cjs/features/workflow/ReviewDCRDialog/index.js +5 -0
  42. package/cjs/features/workflow/WorkflowActionButtons/WorkflowActionButtons.d.ts +12 -0
  43. package/cjs/features/workflow/WorkflowActionButtons/WorkflowActionButtons.js +57 -0
  44. package/cjs/features/workflow/WorkflowActionButtons/index.d.ts +1 -0
  45. package/cjs/features/workflow/WorkflowActionButtons/index.js +5 -0
  46. package/cjs/features/workflow/WorkflowComments/WorkflowComments.d.ts +7 -1
  47. package/cjs/features/workflow/WorkflowComments/WorkflowComments.js +15 -31
  48. package/cjs/features/workflow/WorkflowComments/WorkflowComments.module.css.js +9 -0
  49. package/cjs/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +46 -6
  50. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.d.ts +2 -1
  51. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.js +30 -29
  52. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.module.css.js +9 -0
  53. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +20 -2
  54. package/cjs/features/workflow/index.d.ts +2 -0
  55. package/cjs/features/workflow/index.js +5 -1
  56. package/cjs/icons/RequestSummary.d.ts +3 -0
  57. package/cjs/icons/RequestSummary.js +24 -0
  58. package/cjs/icons/ReviewDCR.d.ts +3 -0
  59. package/cjs/icons/ReviewDCR.js +22 -0
  60. package/contexts/MdmModuleContext/context.d.ts +2 -0
  61. package/contexts/MdmModuleContext/hooks.d.ts +1 -0
  62. package/contexts/MdmModuleContext/hooks.js +1 -0
  63. package/contexts/MdmModuleContext/index.d.ts +1 -1
  64. package/contexts/MdmModuleContext/index.js +1 -1
  65. package/features/history/HistoryRow/styles.d.ts +1 -1
  66. package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.d.ts +8 -0
  67. package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.js +11 -0
  68. package/features/workflow/ChangeRequestEditor/ChangeRequestEditor.module.css.js +9 -0
  69. package/features/workflow/ChangeRequestEditor/index.d.ts +1 -0
  70. package/features/workflow/ChangeRequestEditor/index.js +1 -0
  71. package/features/workflow/ReviewDCRButton/ReviewDCRButton.d.ts +6 -0
  72. package/features/workflow/ReviewDCRButton/ReviewDCRButton.js +12 -0
  73. package/features/workflow/ReviewDCRButton/ReviewDCRButton.module.css.js +9 -0
  74. package/features/workflow/ReviewDCRButton/index.d.ts +1 -0
  75. package/features/workflow/ReviewDCRButton/index.js +1 -0
  76. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.d.ts +11 -0
  77. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.js +56 -0
  78. package/features/workflow/ReviewDCRDialog/ReviewDCRDialog.module.css.js +9 -0
  79. package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.d.ts +8 -0
  80. package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.js +43 -0
  81. package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/DCRChangesSummary.module.css.js +9 -0
  82. package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.d.ts +1 -0
  83. package/features/workflow/ReviewDCRDialog/components/DCRChangesSummary/index.js +1 -0
  84. package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.d.ts +9 -0
  85. package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.js +33 -0
  86. package/features/workflow/ReviewDCRDialog/components/DCRSummaryInfo/DCRSummaryInfo.module.css.js +9 -0
  87. package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.d.ts +3 -0
  88. package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.js +15 -0
  89. package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.d.ts +1 -0
  90. package/features/workflow/ReviewDCRDialog/helpers/calculateDCRChanges.test.js +122 -0
  91. package/features/workflow/ReviewDCRDialog/helpers/index.d.ts +1 -0
  92. package/features/workflow/ReviewDCRDialog/helpers/index.js +1 -0
  93. package/features/workflow/ReviewDCRDialog/index.d.ts +1 -0
  94. package/features/workflow/ReviewDCRDialog/index.js +1 -0
  95. package/features/workflow/WorkflowActionButtons/WorkflowActionButtons.d.ts +12 -0
  96. package/features/workflow/WorkflowActionButtons/WorkflowActionButtons.js +27 -0
  97. package/features/workflow/WorkflowActionButtons/index.d.ts +1 -0
  98. package/features/workflow/WorkflowActionButtons/index.js +1 -0
  99. package/features/workflow/WorkflowComments/WorkflowComments.d.ts +7 -1
  100. package/features/workflow/WorkflowComments/WorkflowComments.js +13 -29
  101. package/features/workflow/WorkflowComments/WorkflowComments.module.css.js +9 -0
  102. package/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +23 -6
  103. package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.d.ts +2 -1
  104. package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.js +8 -7
  105. package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.module.css.js +9 -0
  106. package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +20 -2
  107. package/features/workflow/index.d.ts +2 -0
  108. package/features/workflow/index.js +2 -0
  109. package/icons/RequestSummary.d.ts +3 -0
  110. package/icons/RequestSummary.js +19 -0
  111. package/icons/ReviewDCR.d.ts +3 -0
  112. package/icons/ReviewDCR.js +17 -0
  113. package/package.json +2 -2
  114. package/ProfileBand/styles.d.ts +0 -1
  115. package/ProfileBand/styles.js +0 -87
  116. package/cjs/ProfileBand/styles.d.ts +0 -1
  117. package/cjs/ProfileBand/styles.js +0 -90
  118. package/cjs/features/workflow/WorkflowComments/styles.d.ts +0 -1
  119. package/cjs/features/workflow/WorkflowComments/styles.js +0 -42
  120. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.d.ts +0 -3
  121. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.js +0 -113
  122. package/features/workflow/WorkflowComments/styles.d.ts +0 -1
  123. package/features/workflow/WorkflowComments/styles.js +0 -39
  124. package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.d.ts +0 -3
  125. package/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/styles.js +0 -110
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { TaskAction } from '../types';
3
+ type Props = {
4
+ workflowActions: TaskAction[];
5
+ actionRequestIsInProgress?: boolean;
6
+ preferredAction?: {
7
+ label: string;
8
+ };
9
+ comment?: string;
10
+ };
11
+ export declare const WorkflowActionButtons: ({ workflowActions: actions, actionRequestIsInProgress, preferredAction, comment }: Props) => React.JSX.Element;
12
+ export {};
@@ -0,0 +1,27 @@
1
+ import React, { useMemo, useState } from 'react';
2
+ import Button from '@mui/material/Button';
3
+ import { ModeSwitcherSelect } from '../../../ModeSwitcherSelect';
4
+ export var WorkflowActionButtons = function (_a) {
5
+ var actions = _a.workflowActions, actionRequestIsInProgress = _a.actionRequestIsInProgress, preferredAction = _a.preferredAction, _b = _a.comment, comment = _b === void 0 ? '' : _b;
6
+ var _c = useState(function () { var _a; return (preferredAction === null || preferredAction === void 0 ? void 0 : preferredAction.label) || ((_a = actions[0]) === null || _a === void 0 ? void 0 : _a.text); }), currentAction = _c[0], setCurrentAction = _c[1];
7
+ var buttonsGroup = useMemo(function () {
8
+ return actions.map(function (_a) {
9
+ var text = _a.text, onClick = _a.onClick;
10
+ return ({
11
+ label: text,
12
+ onClick: function () {
13
+ setCurrentAction(text);
14
+ onClick(comment);
15
+ },
16
+ value: text
17
+ });
18
+ });
19
+ }, [actions, comment]);
20
+ if (buttonsGroup.length === 0) {
21
+ return null;
22
+ }
23
+ if (buttonsGroup.length === 1) {
24
+ return (React.createElement(Button, { variant: "outlined", onClick: buttonsGroup[0].onClick, disabled: actionRequestIsInProgress, size: "small" }, buttonsGroup[0].label));
25
+ }
26
+ return (React.createElement(ModeSwitcherSelect, { buttonsGroup: buttonsGroup, value: currentAction, loading: actionRequestIsInProgress, disabled: actionRequestIsInProgress }));
27
+ };
@@ -0,0 +1 @@
1
+ export { WorkflowActionButtons } from './WorkflowActionButtons';
@@ -0,0 +1 @@
1
+ export { WorkflowActionButtons } from './WorkflowActionButtons';
@@ -8,6 +8,12 @@ type Props = {
8
8
  taskId: string;
9
9
  isTaskOpen: boolean;
10
10
  preferredAction?: WorkflowAction;
11
+ showActionButtons?: boolean;
12
+ alwaysExpanded?: boolean;
13
+ classes?: {
14
+ container?: string;
15
+ commentsContainer?: string;
16
+ };
11
17
  };
12
- export declare const WorkflowComments: ({ workflowActions: actions, actionRequestIsInProgress, processInstanceComments, taskId, isTaskOpen, preferredAction }: Props) => React.JSX.Element;
18
+ export declare const WorkflowComments: ({ workflowActions: actions, actionRequestIsInProgress, processInstanceComments, taskId, isTaskOpen, preferredAction, showActionButtons, alwaysExpanded, classes }: Props) => React.JSX.Element;
13
19
  export {};
@@ -1,26 +1,24 @@
1
- import React, { useCallback, useState, useMemo } from 'react';
1
+ import React, { useCallback, useState } from 'react';
2
+ import classnames from 'classnames';
2
3
  import i18n from 'ui-i18n';
3
4
  import Input from '@mui/material/Input';
4
5
  import InputAdornment from '@mui/material/InputAdornment';
5
6
  import SendIcon from '@mui/icons-material/Send';
6
- import Button from '@mui/material/Button';
7
7
  import { CollapsedComments } from './components/CollapsedComments';
8
8
  import { ExpandedComments } from './components/ExpandedComments';
9
9
  import { useWorkflowComments } from '../hooks/useWorkflowComments';
10
10
  import { SmallIconButton } from '../../../SmallIconButton';
11
- import { ModeSwitcherSelect } from '../../../ModeSwitcherSelect';
12
- import { useStyles } from './styles';
11
+ import { WorkflowActionButtons } from '../WorkflowActionButtons';
12
+ import styles from './WorkflowComments.module.css';
13
13
  export var WorkflowComments = function (_a) {
14
- var actions = _a.workflowActions, actionRequestIsInProgress = _a.actionRequestIsInProgress, processInstanceComments = _a.processInstanceComments, taskId = _a.taskId, isTaskOpen = _a.isTaskOpen, preferredAction = _a.preferredAction;
15
- var styles = useStyles();
16
- var _b = useState(false), expanded = _b[0], setExpanded = _b[1];
17
- var _c = useState(''), comment = _c[0], setComment = _c[1];
18
- var _d = useState(function () { var _a; return (preferredAction === null || preferredAction === void 0 ? void 0 : preferredAction.label) || ((_a = actions[0]) === null || _a === void 0 ? void 0 : _a.text); }), currentAction = _d[0], setCurrentAction = _d[1];
19
- var _e = useWorkflowComments({
14
+ var actions = _a.workflowActions, actionRequestIsInProgress = _a.actionRequestIsInProgress, processInstanceComments = _a.processInstanceComments, taskId = _a.taskId, isTaskOpen = _a.isTaskOpen, preferredAction = _a.preferredAction, _b = _a.showActionButtons, showActionButtons = _b === void 0 ? true : _b, _c = _a.alwaysExpanded, alwaysExpanded = _c === void 0 ? false : _c, classes = _a.classes;
15
+ var _d = useState(false), expanded = _d[0], setExpanded = _d[1];
16
+ var _e = useState(''), comment = _e[0], setComment = _e[1];
17
+ var _f = useWorkflowComments({
20
18
  processInstanceComments: processInstanceComments,
21
19
  taskId: taskId,
22
20
  isOpen: isTaskOpen
23
- }), comments = _e.comments, writeComment = _e.writeComment, readOnly = _e.readOnly;
21
+ }), comments = _f.comments, writeComment = _f.writeComment, readOnly = _f.readOnly;
24
22
  var sendComment = useCallback(function () {
25
23
  writeComment(comment);
26
24
  setComment('');
@@ -40,28 +38,14 @@ export var WorkflowComments = function (_a) {
40
38
  e.preventDefault();
41
39
  }
42
40
  }, [comment, sendComment]);
43
- var buttonsGroup = useMemo(function () {
44
- return actions.map(function (_a) {
45
- var text = _a.text, onClick = _a.onClick;
46
- return ({
47
- label: text,
48
- onClick: function () {
49
- setCurrentAction(text);
50
- onClick(comment);
51
- },
52
- value: text
53
- });
54
- });
55
- }, [actions, comment]);
56
- return (React.createElement("div", { className: styles.container },
41
+ return (React.createElement("div", { className: classnames(styles.container, classes === null || classes === void 0 ? void 0 : classes.container) },
57
42
  React.createElement("div", { className: styles.title },
58
43
  " ",
59
44
  i18n.text('Comments'),
60
45
  " "),
61
- React.createElement("div", { className: styles.commentsContainer }, expanded || comments.length < 3 ? (React.createElement(ExpandedComments, { comments: comments })) : (React.createElement(CollapsedComments, { onClick: function () { return setExpanded(true); }, comments: comments }))),
46
+ React.createElement("div", { className: classnames(styles.commentsContainer, classes === null || classes === void 0 ? void 0 : classes.commentsContainer) }, expanded || alwaysExpanded || comments.length < 3 ? (React.createElement(ExpandedComments, { comments: comments })) : (React.createElement(CollapsedComments, { onClick: function () { return setExpanded(true); }, comments: comments }))),
62
47
  !readOnly && (React.createElement(Input, { endAdornment: React.createElement(InputAdornment, { position: "end", className: styles.sendButton },
63
48
  React.createElement(SmallIconButton, { icon: SendIcon, disabled: comment.length === 0, onClick: sendComment, "data-reltio-id": "send-button" })), classes: { root: styles.filledInputRoot }, placeholder: i18n.text('Write a comment'), value: comment, onKeyPress: handleKeyPress, onChange: handleChange, disableUnderline: true, multiline: true })),
64
- React.createElement("div", { className: styles.modeSwitcherWrapper },
65
- buttonsGroup.length === 1 && (React.createElement(Button, { variant: "outlined", onClick: buttonsGroup[0].onClick, disabled: actionRequestIsInProgress }, buttonsGroup[0].label)),
66
- buttonsGroup.length > 1 && (React.createElement(ModeSwitcherSelect, { buttonsGroup: buttonsGroup, value: currentAction, loading: actionRequestIsInProgress, disabled: actionRequestIsInProgress })))));
49
+ showActionButtons && (React.createElement("div", { className: styles.modeSwitcherWrapper },
50
+ React.createElement(WorkflowActionButtons, { workflowActions: actions, actionRequestIsInProgress: actionRequestIsInProgress, preferredAction: preferredAction, comment: comment })))));
67
51
  };
@@ -0,0 +1,9 @@
1
+ const styles = {"container":"WorkflowComments-container--zu4Un","commentsContainer":"WorkflowComments-commentsContainer--CHV0q","title":"WorkflowComments-title--a0FTZ","filledInputRoot":"WorkflowComments-filledInputRoot--q5WAu","focused":"WorkflowComments-focused--s-NQa","modeSwitcherWrapper":"WorkflowComments-modeSwitcherWrapper--b585U","sendButton":"WorkflowComments-sendButton--NjNcl"};
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 = `.WorkflowComments-container--zu4Un{display:flex;flex-direction:column;padding:5px 0}.WorkflowComments-commentsContainer--CHV0q{max-height:300px;overflow-y:auto}.WorkflowComments-title--a0FTZ{color:rgba(0,0,0,.87);font-size:14px;margin:0 0 8px 5px}.WorkflowComments-filledInputRoot--q5WAu{background-color:rgba(0,0,0,.03);font-size:14px;margin:10px 17px 0 6px;min-height:40px;padding:10px 6px}.WorkflowComments-filledInputRoot--q5WAu.WorkflowComments-focused--s-NQa,.WorkflowComments-filledInputRoot--q5WAu:hover{background-color:rgba(0,0,0,.03)}.WorkflowComments-modeSwitcherWrapper--b585U{margin-left:auto;margin-right:16px;margin-top:8px}.WorkflowComments-sendButton--NjNcl{align-self:end;margin-bottom:10px}`;
7
+ head.appendChild(style);
8
+ }
9
+ export default styles;
@@ -1,16 +1,33 @@
1
- import React from 'react';
1
+ import React, { useCallback, useMemo, useState } from 'react';
2
2
  import DcrTaskIcon from '../../../../../icons/DcrTaskIcon';
3
+ import { useMdmReviewDCREnabled, useMdmUsername } from '../../../../../contexts/MdmModuleContext';
3
4
  import { GenericWorkflowTaskCard } from '../GenericWorkflowTaskCard';
4
5
  import { AttributesChanges } from '../../../AttributesChanges';
5
6
  import { LineDecorator } from '../../../LineDecorator';
6
7
  import { useChangeRequest } from '../../../hooks/useChangeRequest';
7
8
  import { getDCRUri } from '../../../helpers/common';
9
+ import { ReviewDCRDialog } from '../../../ReviewDCRDialog';
10
+ import { ReviewDCRButton } from '../../../ReviewDCRButton';
8
11
  export var DataChangeRequestTaskCard = function (_a) {
9
12
  var task = _a.task;
10
- var objectURIs = task.objectURIs;
13
+ var reviewDCREnabled = useMdmReviewDCREnabled();
14
+ var username = useMdmUsername();
15
+ var _b = useState(false), isReviewDCRDialogOpen = _b[0], setIsReviewDCRDialogOpen = _b[1];
16
+ var objectURIs = task.objectURIs, assignee = task.assignee;
11
17
  var dcrUri = getDCRUri(objectURIs);
12
- var _b = useChangeRequest(dcrUri), dcr = _b.dcr, groupedObjects = _b.groupedObjects;
13
- return (React.createElement(GenericWorkflowTaskCard, { task: task, Icon: DcrTaskIcon }, dcr &&
14
- groupedObjects.map(function (object, index) { return (React.createElement(LineDecorator, { key: index, last: index === groupedObjects.length - 1, divider: true },
15
- React.createElement(AttributesChanges, { entityInfo: object.entity, relationsInfo: object.relations, changes: dcr.changes, objectsInfo: dcr.objectsInfo, dcrUri: dcrUri }))); })));
18
+ var _c = useChangeRequest(dcrUri), dcr = _c.dcr, groupedObjects = _c.groupedObjects;
19
+ var handleReviewDCR = useCallback(function () {
20
+ setIsReviewDCRDialogOpen(true);
21
+ }, []);
22
+ var handleCloseReviewDCRDialog = useCallback(function () {
23
+ setIsReviewDCRDialogOpen(false);
24
+ }, []);
25
+ var showReviewDCRButton = reviewDCREnabled && assignee == username;
26
+ var showReviewDialog = isReviewDCRDialogOpen && (showReviewDCRButton || reviewDCREnabled);
27
+ var customActionsSlot = useMemo(function () { return showReviewDCRButton && React.createElement(ReviewDCRButton, { onClick: handleReviewDCR }); }, [showReviewDCRButton, handleReviewDCR]);
28
+ return (React.createElement(React.Fragment, null,
29
+ React.createElement(GenericWorkflowTaskCard, { task: task, Icon: DcrTaskIcon, customActionsSlot: customActionsSlot }, dcr &&
30
+ groupedObjects.map(function (object, index) { return (React.createElement(LineDecorator, { key: index, last: index === groupedObjects.length - 1, divider: true },
31
+ React.createElement(AttributesChanges, { entityInfo: object.entity, relationsInfo: object.relations, changes: dcr.changes, objectsInfo: dcr.objectsInfo, dcrUri: dcrUri }))); })),
32
+ showReviewDialog && (React.createElement(ReviewDCRDialog, { open: isReviewDCRDialogOpen, onClose: handleCloseReviewDCRDialog, dcr: dcr, groupedObjects: groupedObjects, task: task }))));
16
33
  };
@@ -5,6 +5,7 @@ type Props = {
5
5
  children?: React.ReactNode;
6
6
  actions?: React.ReactNode;
7
7
  Icon?: React.ElementType;
8
+ customActionsSlot?: React.ReactNode;
8
9
  };
9
- export declare const GenericWorkflowTaskCard: ({ task, children, actions, Icon }: Props) => React.JSX.Element;
10
+ export declare const GenericWorkflowTaskCard: ({ task, children, actions, Icon, customActionsSlot }: Props) => React.JSX.Element;
10
11
  export {};
@@ -15,14 +15,13 @@ import { useWorkflowCheckPermission } from '../../../hooks/useWorkflowCheckPermi
15
15
  import CollaborationIcon from '../../../../../icons/CollaborationIcon';
16
16
  import { useWorkflowActions } from '../../../hooks/useWorkflowActions';
17
17
  import { getDCRId } from '../../../helpers/common';
18
- import { useStyles } from './styles';
18
+ import styles from './GenericWorkflowTaskCard.module.css';
19
19
  export var GenericWorkflowTaskCard = function (_a) {
20
20
  var _b;
21
- var task = _a.task, children = _a.children, actions = _a.actions, Icon = _a.Icon;
21
+ var task = _a.task, children = _a.children, actions = _a.actions, Icon = _a.Icon, customActionsSlot = _a.customActionsSlot;
22
22
  var taskId = task.taskId, dueDate = task.dueDate, priority = task.priority, assignee = task.assignee, createdBy = task.createdBy, createTime = task.createTime, step = task.displayName, processDefinitionDisplayName = task.processDefinitionDisplayName, objectURIs = task.objectURIs, processInstanceComments = task.processInstanceComments, possibleActions = task.possibleActions, isTaskOpen = task.isOpen, preferredAction = task.preferredAction;
23
23
  var dcrId = getDCRId(objectURIs);
24
24
  var color = useWorkflowColor({ processDefinitionDisplayName: processDefinitionDisplayName });
25
- var styles = useStyles({ color: color });
26
25
  var _c = useState(false), isExpanded = _c[0], setExpanded = _c[1];
27
26
  var checkWorkflowPermission = useWorkflowCheckPermission();
28
27
  var canViewComments = checkWorkflowPermission('VIEW_PROCESS_INSTANCE_COMMENTS');
@@ -34,7 +33,7 @@ export var GenericWorkflowTaskCard = function (_a) {
34
33
  }), workflowActions = _d.actions, actionRequestIsInProgress = _d.actionRequestIsInProgress;
35
34
  return (React.createElement("div", { className: styles.card },
36
35
  React.createElement("div", { className: classnames((_b = {}, _b[styles.withBackground] = isExpanded, _b)) },
37
- React.createElement("div", { className: styles.lineWrapper },
36
+ React.createElement("div", { className: styles.lineWrapper, style: { '--workflow-color': color } },
38
37
  React.createElement("div", { className: styles.line }),
39
38
  Icon && React.createElement(Icon, { className: styles.icon }),
40
39
  React.createElement(LineDecorator, { plain: true, first: true, transparent: !isExpanded },
@@ -65,9 +64,11 @@ export var GenericWorkflowTaskCard = function (_a) {
65
64
  i18n.text('Step'),
66
65
  ': ',
67
66
  React.createElement("span", { className: styles.infoValue }, step)),
68
- canViewComments && (processInstanceComments === null || processInstanceComments === void 0 ? void 0 : processInstanceComments.length) > 0 && (React.createElement("div", { className: styles.commentsInfo },
69
- React.createElement(CollaborationIcon, { className: styles.commentsIcon }),
70
- React.createElement("div", { className: styles.infoValue }, processInstanceComments.length)))),
67
+ React.createElement("div", { className: styles.bottomInfo },
68
+ canViewComments && (processInstanceComments === null || processInstanceComments === void 0 ? void 0 : processInstanceComments.length) > 0 && (React.createElement("div", { className: styles.commentsInfo },
69
+ React.createElement(CollaborationIcon, { className: styles.commentsIcon }),
70
+ React.createElement("div", { className: styles.infoValue }, processInstanceComments.length))),
71
+ customActionsSlot && (React.createElement("div", { className: styles.customActionsSlot }, customActionsSlot)))),
71
72
  actions || (React.createElement(TaskActions, { actions: workflowActions, isInProgress: actionRequestIsInProgress })))))),
72
73
  isExpanded && (React.createElement(LineDecorator, { plain: true },
73
74
  React.createElement("div", { className: styles.controlsBox },
@@ -0,0 +1,9 @@
1
+ const styles = {"card":"GenericWorkflowTaskCard-card--EMo-i","withBackground":"GenericWorkflowTaskCard-withBackground--Y--db","lineWrapper":"GenericWorkflowTaskCard-lineWrapper--15MN6","icon":"GenericWorkflowTaskCard-icon--eoHOp","line":"GenericWorkflowTaskCard-line--Z1Emv","info":"GenericWorkflowTaskCard-info--2OyKu","bottomInfo":"GenericWorkflowTaskCard-bottomInfo--4bsc4","commentsInfo":"GenericWorkflowTaskCard-commentsInfo--Q6M07","commentsIcon":"GenericWorkflowTaskCard-commentsIcon--crUiN","infoValue":"GenericWorkflowTaskCard-infoValue---gkaX","infoBlock":"GenericWorkflowTaskCard-infoBlock--VyI2O","header":"GenericWorkflowTaskCard-header--bN0nh","flex":"GenericWorkflowTaskCard-flex--5oWde","caption":"GenericWorkflowTaskCard-caption--vxnNJ","title":"GenericWorkflowTaskCard-title--zyCft","flag":"GenericWorkflowTaskCard-flag--dfydb","date":"GenericWorkflowTaskCard-date--MHd-G","mainInfo":"GenericWorkflowTaskCard-mainInfo--l5b9R","controlsBox":"GenericWorkflowTaskCard-controlsBox--ZHDhQ","controlsInRow":"GenericWorkflowTaskCard-controlsInRow--c48Nv","priority":"GenericWorkflowTaskCard-priority--xnnl9","comments":"GenericWorkflowTaskCard-comments--OG-db","customActionsSlot":"GenericWorkflowTaskCard-customActionsSlot--J-mXk"};
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 = `.GenericWorkflowTaskCard-card--EMo-i{border-bottom:1px solid rgba(0,0,0,.06)}.GenericWorkflowTaskCard-withBackground--Y--db{background-color:rgba(0,0,0,.03)}.GenericWorkflowTaskCard-lineWrapper--15MN6{position:relative}.GenericWorkflowTaskCard-icon--eoHOp{height:32px;left:16px;position:absolute;top:8px;width:32px;z-index:1}.GenericWorkflowTaskCard-line--Z1Emv{border-left:3px solid var(--workflow-color);bottom:0;left:0;position:absolute;top:0}.GenericWorkflowTaskCard-info--2OyKu{color:rgba(0,0,0,.54);font-size:13px;word-wrap:break-word;line-height:15px}.GenericWorkflowTaskCard-bottomInfo--4bsc4{align-items:flex-start;display:flex}.GenericWorkflowTaskCard-commentsInfo--Q6M07{align-items:center;display:flex;margin-bottom:-4px;margin-top:7px}.GenericWorkflowTaskCard-commentsIcon--crUiN{height:11px;margin-left:2px;margin-right:6px;margin-top:-2px;width:11px}.GenericWorkflowTaskCard-infoValue---gkaX{color:rgba(0,0,0,.87)}.GenericWorkflowTaskCard-infoBlock--VyI2O{display:flex;flex-direction:row;margin-bottom:5px}.GenericWorkflowTaskCard-header--bN0nh{display:flex;flex-direction:row;padding-bottom:12px}.GenericWorkflowTaskCard-flex--5oWde{flex:1}.GenericWorkflowTaskCard-caption--vxnNJ{color:rgba(0,0,0,.87);font-size:16px}.GenericWorkflowTaskCard-title--zyCft{align-items:center;display:flex;flex-direction:row;margin-bottom:-4px}.GenericWorkflowTaskCard-flag--dfydb{height:13px;width:13px;stroke:#000;fill:none;margin:2px 5px 0}.GenericWorkflowTaskCard-date--MHd-G{color:rgba(0,0,0,.87);font-size:13px}.GenericWorkflowTaskCard-mainInfo--l5b9R{display:flex;flex:1;flex-direction:column}.GenericWorkflowTaskCard-controlsBox--ZHDhQ{margin-bottom:12px;margin-right:16px;margin-top:13px}.GenericWorkflowTaskCard-controlsInRow--c48Nv{align-items:center;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:20px}.GenericWorkflowTaskCard-priority--xnnl9{width:162px}.GenericWorkflowTaskCard-comments--OG-db{margin-left:11px}.GenericWorkflowTaskCard-customActionsSlot--J-mXk{display:flex;flex-grow:1;justify-content:flex-end;margin-right:-30px}`;
7
+ head.appendChild(style);
8
+ }
9
+ export default styles;
@@ -71,6 +71,7 @@ import { CommentDialogProvider } from '../../../../../contexts/CommentDialogCont
71
71
  import { ErrorPopup } from '../../../../../ErrorPopup';
72
72
  import { getDefaultTask } from './task.test-data';
73
73
  import { GenericWorkflowTaskCard } from './GenericWorkflowTaskCard';
74
+ import { ReviewDCRButton } from '../../../ReviewDCRButton';
74
75
  jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { runTaskAction: jest.fn().mockReturnValue(Promise.resolve()), getAssigneeForTask: jest.fn().mockResolvedValue({ data: ['assignee1', 'assignee2'] }), addCommentForTask: jest.fn().mockResolvedValue({ status: 'success' }), getTaskById: jest.fn() })); });
75
76
  var onActionSuccess = jest.fn();
76
77
  var workflowTaskContextValue = { onActionSuccess: onActionSuccess };
@@ -102,14 +103,14 @@ var defaultMdmValues = {
102
103
  var errorSet = jest.fn();
103
104
  var defaultTask = getDefaultTask();
104
105
  var setUp = function (_a) {
105
- var _b = _a === void 0 ? {} : _a, _c = _b.mdmValues, mdmValues = _c === void 0 ? defaultMdmValues : _c, _d = _b.task, task = _d === void 0 ? defaultTask : _d;
106
+ var _b = _a === void 0 ? {} : _a, _c = _b.mdmValues, mdmValues = _c === void 0 ? defaultMdmValues : _c, _d = _b.task, task = _d === void 0 ? defaultTask : _d, customActionsSlot = _b.customActionsSlot;
106
107
  var user = userEvent.setup();
107
108
  return __assign(__assign({}, render(React.createElement(MdmModuleProvider, { values: mdmValues, actions: { errorSet: errorSet } },
108
109
  React.createElement(ThemeProvider, { theme: createTheme(theme) },
109
110
  React.createElement(LocalizationProvider, { dateAdapter: AdapterMoment },
110
111
  React.createElement(CommentDialogProvider, null,
111
112
  React.createElement(WorkflowTasksContext.Provider, { value: workflowTaskContextValue },
112
- React.createElement(GenericWorkflowTaskCard, { task: task },
113
+ React.createElement(GenericWorkflowTaskCard, { task: task, customActionsSlot: customActionsSlot },
113
114
  React.createElement("div", { className: "someChildren" }, "some children")),
114
115
  React.createElement(ErrorPopup, { showErrorFromStore: true })))))))), { user: user });
115
116
  };
@@ -451,6 +452,23 @@ describe('GenericWorkflowTaskCard tests', function () {
451
452
  }
452
453
  });
453
454
  }); });
455
+ it('should render custom actions slot if it is provided', function () { return __awaiter(void 0, void 0, void 0, function () {
456
+ var openReviewDialog, user, reviewDCRButton;
457
+ return __generator(this, function (_a) {
458
+ switch (_a.label) {
459
+ case 0:
460
+ openReviewDialog = jest.fn();
461
+ user = setUp({ customActionsSlot: React.createElement(ReviewDCRButton, { onClick: openReviewDialog }) }).user;
462
+ reviewDCRButton = screen.getByRole('button', { name: 'Review DCR' });
463
+ expect(reviewDCRButton).toBeInTheDocument();
464
+ return [4 /*yield*/, user.click(reviewDCRButton)];
465
+ case 1:
466
+ _a.sent();
467
+ expect(openReviewDialog).toHaveBeenCalled();
468
+ return [2 /*return*/];
469
+ }
470
+ });
471
+ }); });
454
472
  describe('Required comments', function () {
455
473
  it('should show comment dialog when user runs action and comment is required', function () { return __awaiter(void 0, void 0, void 0, function () {
456
474
  var task, user, dialog, comment, commentInput;
@@ -5,6 +5,8 @@ export { AssigneeSelector } from './AssigneeSelector';
5
5
  export { ReassignButton } from './ReassignButton';
6
6
  export { WorkflowComments } from './WorkflowComments';
7
7
  export { TaskActionButtons } from './TaskActionButtons';
8
+ export { ReviewDCRButton } from './ReviewDCRButton';
9
+ export { ReviewDCRDialog } from './ReviewDCRDialog';
8
10
  export { useWorkflowAssignee } from './hooks/useWorkflowAssignee';
9
11
  export { useWorkflowComments } from './hooks/useWorkflowComments';
10
12
  export { useWorkflowActions } from './hooks/useWorkflowActions';
@@ -6,6 +6,8 @@ export { AssigneeSelector } from './AssigneeSelector';
6
6
  export { ReassignButton } from './ReassignButton';
7
7
  export { WorkflowComments } from './WorkflowComments';
8
8
  export { TaskActionButtons } from './TaskActionButtons';
9
+ export { ReviewDCRButton } from './ReviewDCRButton';
10
+ export { ReviewDCRDialog } from './ReviewDCRDialog';
9
11
  // hooks
10
12
  export { useWorkflowAssignee } from './hooks/useWorkflowAssignee';
11
13
  export { useWorkflowComments } from './hooks/useWorkflowComments';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SvgRequestSummary: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ export default SvgRequestSummary;
@@ -0,0 +1,19 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ var SvgRequestSummary = function (props) {
14
+ return (React.createElement("svg", __assign({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-reltio-id": "SvgRequestSummary" }, props),
15
+ React.createElement("ellipse", { cx: "15.972", cy: "16", rx: "15.972", ry: "16", fill: "#1D4E99" }),
16
+ React.createElement("path", { opacity: "0.54", d: "M24.4771 14.7002C23.972 14.3772 23.4183 14.1244 22.8286 13.9561V8.42871H8.50342V19.415H14.8589C14.8411 19.6077 14.8316 19.8027 14.8315 20C14.8315 20.3358 14.8581 20.6657 14.9087 20.9873H6.84521V6.85742H24.4771V14.7002ZM11.8091 17.8428H10.1519V16.2803H11.8091V17.8428ZM16.0483 16.2803C15.7 16.7547 15.4168 17.2799 15.2114 17.8428H13.4575V16.2803H16.0483ZM11.8091 14.708H10.1519V13.1357H11.8091V14.708ZM21.1714 13.7158C21.1496 13.7156 21.1278 13.7148 21.106 13.7148C19.8597 13.7148 18.6995 14.0804 17.7231 14.708H13.4575V13.1357H21.1714V13.7158ZM11.8091 11.5645H10.1519V10.001H11.8091V11.5645ZM21.1714 11.5645H13.4575V10.001H21.1714V11.5645Z", fill: "white" }),
17
+ React.createElement("path", { opacity: "0.87", d: "M21.106 14.8574C22.2479 14.8575 23.3031 15.2315 24.1558 15.8633L23.2349 16.7861C22.6252 16.3801 21.8929 16.1426 21.106 16.1426C18.9797 16.1428 17.2565 17.87 17.2563 20C17.2563 22.1301 18.9796 23.8572 21.106 23.8574C23.0435 23.8572 24.6461 22.4229 24.9155 20.5566L26.189 19.2822C26.2217 19.5168 26.2407 19.7564 26.2407 20C26.2407 22.8402 23.9412 25.1424 21.106 25.1426C18.2708 25.1423 15.9722 22.8402 15.9722 20C15.9723 17.16 18.2709 14.8577 21.106 14.8574ZM26.7075 17.208L21.2622 22.6631L20.354 21.7539V21.7529L18.5396 19.9355L19.4468 19.0264L21.2612 20.8438L25.7993 16.2988L26.7075 17.208Z", fill: "white" })));
18
+ };
19
+ export default SvgRequestSummary;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SvgReviewDCR: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ export default SvgReviewDCR;
@@ -0,0 +1,17 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ var SvgReviewDCR = function (props) {
14
+ return (React.createElement("svg", __assign({ width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
15
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.5 9H5.51415C5.53356 8.74392 5.57268 8.49341 5.63 8.25H2.5V6.75H6.26449C6.43659 6.48075 6.63444 6.2296 6.85458 6H2.5V4.5H10V4.51415C10.1238 4.50477 10.2488 4.5 10.375 4.5C11.0397 4.5 11.673 4.63248 12.25 4.87252V1.5C12.25 0.675 11.575 0 10.75 0H1.75C0.925 0 0.25 0.675 0.25 1.5V11.25C0.25 12.075 0.925 12.75 1.75 12.75H6.85373C6.26293 12.1331 5.8327 11.3608 5.63001 10.5H2.5V9ZM10 3.75H2.5V2.25H10V3.75ZM13.225 11.1675L15.565 13.5L14.5 14.565L12.16 12.225C11.6425 12.555 11.0275 12.75 10.3675 12.75C8.5075 12.75 7 11.2425 7 9.375C7 7.5075 8.5075 6 10.375 6C12.2425 6 13.75 7.5075 13.75 9.375C13.75 10.035 13.555 10.6425 13.225 11.1675ZM10.375 11.25C11.41 11.25 12.25 10.41 12.25 9.375C12.25 8.34 11.41 7.5 10.375 7.5C9.34 7.5 8.5 8.34 8.5 9.375C8.5 10.41 9.34 11.25 10.375 11.25Z", fill: "#0072CE" })));
16
+ };
17
+ export default SvgReviewDCR;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2190",
3
+ "version": "1.4.2191",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",
@@ -11,7 +11,7 @@
11
11
  "@fluentui/react-context-selector": "^9.1.26",
12
12
  "@googlemaps/markerclusterer": "^2.5.3",
13
13
  "@react-sigma/core": "3.4.0",
14
- "@reltio/mdm-sdk": "^1.4.1995",
14
+ "@reltio/mdm-sdk": "^1.4.1996",
15
15
  "@vis.gl/react-google-maps": "^1.3.0",
16
16
  "d3-cloud": "^1.2.5",
17
17
  "d3-geo": "^2.0.1",
@@ -1 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"inactive" | "label" | "secondaryLabel" | "profileBand" | "entityType" | "entityId" | "profileIcon" | "profileBandWrapper" | "imageProfileIcon" | "profileInfo" | "badge" | "businessCard" | "specialInfo">;
@@ -1,87 +0,0 @@
1
- import { makeStyles } from '@mui/styles';
2
- export var useStyles = makeStyles(function (theme) { return ({
3
- profileBandWrapper: {
4
- // especially for IE (overflow fix)
5
- flexShrink: 0
6
- },
7
- profileBand: {
8
- display: 'flex',
9
- padding: '16px 12px 16px 16px',
10
- alignItems: 'flex-start',
11
- backgroundColor: '#fff',
12
- boxShadow: '0px 1px 0px rgba(0, 0, 0, 0.12)',
13
- marginBottom: '1px',
14
- '&:after': {
15
- // IE workaround for minHeight and centering items
16
- content: '""',
17
- minHeight: 'inherit',
18
- fontSize: 0
19
- }
20
- },
21
- inactive: {
22
- background: theme.inactiveBackground
23
- },
24
- profileIcon: {
25
- marginRight: '12px'
26
- },
27
- imageProfileIcon: {
28
- width: '48px',
29
- height: '48px'
30
- },
31
- profileInfo: {
32
- display: 'flex',
33
- flexDirection: 'column',
34
- flex: '1 1 50%'
35
- },
36
- badge: {},
37
- label: {
38
- lineHeight: '1.2',
39
- letterSpacing: '0.25px',
40
- color: theme.palette.text.primary,
41
- wordBreak: 'break-word',
42
- whiteSpace: 'break-spaces',
43
- '&+ $specialInfo': {
44
- marginTop: '4px'
45
- }
46
- },
47
- secondaryLabel: {
48
- display: 'inline-flex',
49
- color: theme.palette.text.primary,
50
- marginTop: '2px',
51
- lineHeight: '16px',
52
- fontSize: '14px',
53
- fontWeight: 400,
54
- whiteSpace: 'break-spaces',
55
- '&+ $businessCard': {
56
- marginLeft: '12px'
57
- }
58
- },
59
- businessCard: {
60
- color: theme.palette.text.secondary,
61
- display: 'inline-flex',
62
- fontSize: '14px',
63
- marginTop: '4px',
64
- lineHeight: '1.2',
65
- whiteSpace: 'break-spaces'
66
- },
67
- specialInfo: {
68
- display: 'flex',
69
- justifyContent: 'space-between',
70
- flexWrap: 'wrap',
71
- width: '100%',
72
- marginTop: '8px'
73
- },
74
- entityType: {
75
- display: 'flex',
76
- flexWrap: 'wrap'
77
- },
78
- entityId: {
79
- fontSize: '13px',
80
- color: theme.palette.text.secondary,
81
- whiteSpace: 'nowrap',
82
- cursor: 'pointer',
83
- '&:hover': {
84
- textDecoration: 'underline'
85
- }
86
- }
87
- }); });
@@ -1 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"inactive" | "label" | "secondaryLabel" | "profileBand" | "entityType" | "entityId" | "profileIcon" | "profileBandWrapper" | "imageProfileIcon" | "profileInfo" | "badge" | "businessCard" | "specialInfo">;
@@ -1,90 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useStyles = void 0;
4
- var styles_1 = require("@mui/styles");
5
- exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
6
- profileBandWrapper: {
7
- // especially for IE (overflow fix)
8
- flexShrink: 0
9
- },
10
- profileBand: {
11
- display: 'flex',
12
- padding: '16px 12px 16px 16px',
13
- alignItems: 'flex-start',
14
- backgroundColor: '#fff',
15
- boxShadow: '0px 1px 0px rgba(0, 0, 0, 0.12)',
16
- marginBottom: '1px',
17
- '&:after': {
18
- // IE workaround for minHeight and centering items
19
- content: '""',
20
- minHeight: 'inherit',
21
- fontSize: 0
22
- }
23
- },
24
- inactive: {
25
- background: theme.inactiveBackground
26
- },
27
- profileIcon: {
28
- marginRight: '12px'
29
- },
30
- imageProfileIcon: {
31
- width: '48px',
32
- height: '48px'
33
- },
34
- profileInfo: {
35
- display: 'flex',
36
- flexDirection: 'column',
37
- flex: '1 1 50%'
38
- },
39
- badge: {},
40
- label: {
41
- lineHeight: '1.2',
42
- letterSpacing: '0.25px',
43
- color: theme.palette.text.primary,
44
- wordBreak: 'break-word',
45
- whiteSpace: 'break-spaces',
46
- '&+ $specialInfo': {
47
- marginTop: '4px'
48
- }
49
- },
50
- secondaryLabel: {
51
- display: 'inline-flex',
52
- color: theme.palette.text.primary,
53
- marginTop: '2px',
54
- lineHeight: '16px',
55
- fontSize: '14px',
56
- fontWeight: 400,
57
- whiteSpace: 'break-spaces',
58
- '&+ $businessCard': {
59
- marginLeft: '12px'
60
- }
61
- },
62
- businessCard: {
63
- color: theme.palette.text.secondary,
64
- display: 'inline-flex',
65
- fontSize: '14px',
66
- marginTop: '4px',
67
- lineHeight: '1.2',
68
- whiteSpace: 'break-spaces'
69
- },
70
- specialInfo: {
71
- display: 'flex',
72
- justifyContent: 'space-between',
73
- flexWrap: 'wrap',
74
- width: '100%',
75
- marginTop: '8px'
76
- },
77
- entityType: {
78
- display: 'flex',
79
- flexWrap: 'wrap'
80
- },
81
- entityId: {
82
- fontSize: '13px',
83
- color: theme.palette.text.secondary,
84
- whiteSpace: 'nowrap',
85
- cursor: 'pointer',
86
- '&:hover': {
87
- textDecoration: 'underline'
88
- }
89
- }
90
- }); });
@@ -1 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "filledInputRoot" | "commentsContainer" | "modeSwitcherWrapper" | "sendButton">;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useStyles = void 0;
4
- var styles_1 = require("@mui/styles");
5
- exports.useStyles = (0, styles_1.makeStyles)(function (_theme) { return ({
6
- container: {
7
- padding: '5px 0',
8
- display: 'flex',
9
- flexDirection: 'column'
10
- },
11
- commentsContainer: {
12
- maxHeight: '300px',
13
- overflowY: 'auto'
14
- },
15
- title: {
16
- margin: '0 0 8px 5px',
17
- fontSize: '14px',
18
- color: 'rgba(0, 0, 0, 0.87)'
19
- },
20
- filledInputRoot: {
21
- backgroundColor: 'rgba(0, 0, 0, 0.03)',
22
- padding: '10px 6px',
23
- minHeight: '40px',
24
- margin: '10px 17px 0 6px',
25
- fontSize: '14px',
26
- '&:hover': {
27
- backgroundColor: 'rgba(0, 0, 0, 0.03)'
28
- },
29
- '&.focused': {
30
- backgroundColor: 'rgba(0, 0, 0, 0.03)'
31
- }
32
- },
33
- modeSwitcherWrapper: {
34
- marginLeft: 'auto',
35
- marginRight: '16px',
36
- marginTop: '8px'
37
- },
38
- sendButton: {
39
- alignSelf: 'end',
40
- marginBottom: '10px'
41
- }
42
- }); });