@pega/react-sdk-components 0.25.4 → 0.25.6

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 (133) hide show
  1. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  2. package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
  3. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  4. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +1 -1
  5. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  6. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  7. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +5 -1
  8. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  9. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +6 -13
  10. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  11. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +11 -1
  12. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  13. package/lib/components/field/Group/Group.d.ts.map +1 -1
  14. package/lib/components/field/Group/Group.js +2 -1
  15. package/lib/components/field/Group/Group.js.map +1 -1
  16. package/lib/components/field/Location/Location.css +4 -0
  17. package/lib/components/field/Location/Location.d.ts +1 -0
  18. package/lib/components/field/Location/Location.d.ts.map +1 -1
  19. package/lib/components/field/Location/Location.js +1 -0
  20. package/lib/components/field/Location/Location.js.map +1 -1
  21. package/lib/components/field/RadioButtons/RadioButtons.js +1 -1
  22. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  23. package/lib/components/field/RichText/RichText.css +79 -0
  24. package/lib/components/field/RichText/RichText.d.ts +1 -0
  25. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  26. package/lib/components/field/RichText/RichText.js +1 -0
  27. package/lib/components/field/RichText/RichText.js.map +1 -1
  28. package/lib/components/field/SelectableCard/SelectableCard.js +2 -2
  29. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -1
  30. package/lib/components/field/SelectableCard/utils.d.ts +0 -1
  31. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -1
  32. package/lib/components/field/SelectableCard/utils.js +0 -3
  33. package/lib/components/field/SelectableCard/utils.js.map +1 -1
  34. package/lib/components/field/SemanticLink/SemanticLink.js +1 -1
  35. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  36. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  37. package/lib/components/field/UserReference/UserReference.js +1 -1
  38. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  39. package/lib/components/helpers/attachmentShared.d.ts +2 -0
  40. package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
  41. package/lib/components/helpers/attachmentShared.js +6 -0
  42. package/lib/components/helpers/attachmentShared.js.map +1 -0
  43. package/lib/components/helpers/formatters/Currency.d.ts +1 -0
  44. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  45. package/lib/components/helpers/formatters/Currency.js +8 -4
  46. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  47. package/lib/components/helpers/formatters/index.d.ts +1 -0
  48. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  49. package/lib/components/helpers/object-utils.d.ts +9 -0
  50. package/lib/components/helpers/object-utils.d.ts.map +1 -0
  51. package/lib/components/helpers/object-utils.js +11 -0
  52. package/lib/components/helpers/object-utils.js.map +1 -0
  53. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  54. package/lib/components/infra/Assignment/Assignment.js +29 -24
  55. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  56. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  57. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +2 -1
  58. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  59. package/lib/components/infra/MultiStep/MultiStep.css +44 -66
  60. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  61. package/lib/components/infra/MultiStep/MultiStep.js +18 -36
  62. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  63. package/lib/components/infra/View/View.d.ts.map +1 -1
  64. package/lib/components/infra/View/View.js +2 -1
  65. package/lib/components/infra/View/View.js.map +1 -1
  66. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  67. package/lib/components/template/AppShell/AppShell.js +6 -4
  68. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  69. package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -0
  70. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  71. package/lib/components/template/CaseSummary/CaseSummary.js +24 -36
  72. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  73. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  74. package/lib/components/template/CaseView/CaseView.js +16 -12
  75. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  76. package/lib/components/template/DefaultPage/DefaultPage.d.ts +1 -1
  77. package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -1
  78. package/lib/components/template/DefaultPage/DefaultPage.js +10 -1
  79. package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -1
  80. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  81. package/lib/components/template/ListView/ListView.js +26 -31
  82. package/lib/components/template/ListView/ListView.js.map +1 -1
  83. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +1 -1
  84. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -1
  85. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +70 -1
  86. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -1
  87. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  88. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
  89. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  90. package/lib/components/template/WssNavBar/WssNavBar.js +3 -3
  91. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  92. package/lib/components/template/utils.d.ts +7 -0
  93. package/lib/components/template/utils.d.ts.map +1 -0
  94. package/lib/components/template/utils.js +52 -0
  95. package/lib/components/template/utils.js.map +1 -0
  96. package/lib/components/widget/Attachment/Attachment.d.ts +3 -1
  97. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  98. package/lib/components/widget/Attachment/Attachment.js +241 -189
  99. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  100. package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
  101. package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
  102. package/lib/components/widget/Attachment/Attachment.types.js +2 -0
  103. package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
  104. package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
  105. package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
  106. package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
  107. package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
  108. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -0
  109. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  110. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +21 -8
  111. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  112. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  113. package/lib/components/widget/ToDo/ToDo.js +2 -6
  114. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  115. package/lib/mediaco/ToDo/ToDo.css +81 -0
  116. package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
  117. package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
  118. package/lib/mediaco/ToDo/ToDo.js +187 -0
  119. package/lib/mediaco/ToDo/ToDo.js.map +1 -0
  120. package/lib/mediaco/ToDo/index.d.ts +2 -0
  121. package/lib/mediaco/ToDo/index.d.ts.map +1 -0
  122. package/lib/mediaco/ToDo/index.js +2 -0
  123. package/lib/mediaco/ToDo/index.js.map +1 -0
  124. package/lib/samples/Embedded/styles.css +26 -0
  125. package/lib/theme.d.ts +6 -0
  126. package/lib/theme.d.ts.map +1 -1
  127. package/lib/theme.js +34 -12
  128. package/lib/theme.js.map +1 -1
  129. package/package.json +1 -1
  130. package/lib/components/helpers/attachmentHelpers.d.ts +0 -16
  131. package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
  132. package/lib/components/helpers/attachmentHelpers.js +0 -94
  133. package/lib/components/helpers/attachmentHelpers.js.map +0 -1
@@ -0,0 +1,187 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ import { Button, Card, CardContent, CardHeader, Avatar, Typography, Badge, List, ListItem, ListItemText } from '@mui/material';
4
+ import IconButton from '@mui/material/IconButton';
5
+ import ArrowForwardIosOutlinedIcon from '@mui/icons-material/ArrowForwardIosOutlined';
6
+ import { useTheme } from '@mui/material/styles';
7
+ import makeStyles from '@mui/styles/makeStyles';
8
+ import useMediaQuery from '@mui/material/useMediaQuery';
9
+ import { Utils } from '../../components/helpers/utils';
10
+ import './ToDo.css';
11
+ const fetchMyWorkList = (datapage, fields, numberOfRecords, includeTotalCount, context) => {
12
+ return PCore.getDataPageUtils()
13
+ .getDataAsync(datapage, context, {}, {
14
+ pageNumber: 1,
15
+ pageSize: numberOfRecords
16
+ }, {
17
+ select: Object.keys(fields).map(key => ({ field: PCore.getAnnotationUtils().getPropertyName(fields[key]) }))
18
+ }, {
19
+ invalidateCache: true,
20
+ additionalApiParams: {
21
+ includeTotalCount
22
+ }
23
+ })
24
+ .then(response => {
25
+ return {
26
+ ...response,
27
+ data: (Array.isArray(response?.data) ? response.data : []).map(row => Object.keys(fields).reduce((obj, key) => {
28
+ obj[key] = row[PCore.getAnnotationUtils().getPropertyName(fields[key])];
29
+ return obj;
30
+ }, {}))
31
+ };
32
+ });
33
+ };
34
+ const isChildCase = assignment => {
35
+ return assignment.isChild;
36
+ };
37
+ function topThreeAssignments(assignmentsSource) {
38
+ return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];
39
+ }
40
+ function getID(assignment) {
41
+ if (assignment.value) {
42
+ const refKey = assignment.value;
43
+ return refKey.substring(refKey.lastIndexOf(' ') + 1);
44
+ }
45
+ const refKey = assignment.ID;
46
+ const arKeys = refKey.split('!')[0].split(' ');
47
+ return arKeys[2];
48
+ }
49
+ const useStyles = makeStyles(theme => ({
50
+ root: {
51
+ marginBottom: theme.spacing(2),
52
+ paddingBottom: theme.spacing(1),
53
+ borderRadius: '8px'
54
+ },
55
+ avatar: {
56
+ backgroundColor: theme.palette.primary.light,
57
+ color: theme.palette.getContrastText(theme.palette.primary.light)
58
+ },
59
+ todoWrapper: {
60
+ borderLeft: '6px solid',
61
+ borderLeftColor: theme.palette.primary.light,
62
+ padding: theme.spacing(1),
63
+ margin: theme.spacing(1)
64
+ },
65
+ psdkTodoAssignmentStatus: {
66
+ backgroundColor: 'var(--app-neutral-light-color)',
67
+ borderRadius: '0.125rem',
68
+ color: theme.embedded.resolutionTextColor,
69
+ fontSize: '0.75rem',
70
+ fontWeight: 'bold',
71
+ lineHeight: 'calc(0.5rem * 2.5)',
72
+ height: 'calc(0.5rem * 2.5)',
73
+ padding: '0 0.5rem',
74
+ textTransform: 'uppercase'
75
+ },
76
+ getStartedButton: {
77
+ borderRadius: '18px',
78
+ textTransform: 'none',
79
+ width: '120px',
80
+ backgroundColor: theme.actionButtons.primary.backgroundColor
81
+ },
82
+ primaryButton: {
83
+ backgroundColor: theme.actionButtons.primary.backgroundColor,
84
+ color: theme.actionButtons.primary.color
85
+ }
86
+ }));
87
+ export default function ToDo(props) {
88
+ const { getPConnect, context, datasource = [], headerText = 'To do', showTodoList = true, myWorkList = {}, type = 'worklist', isConfirm = false } = props;
89
+ const CONSTS = PCore.getConstants();
90
+ const bLogging = true;
91
+ const currentUser = PCore.getEnvironmentInfo().getOperatorName() ?? '';
92
+ const currentUserInitials = Utils.getInitials(currentUser);
93
+ const assignmentsSource = datasource?.source || myWorkList?.source;
94
+ const [assignments, setAssignments] = useState(initAssignments());
95
+ const thePConn = getPConnect();
96
+ const classes = useStyles();
97
+ const theme = useTheme();
98
+ const isDesktop = useMediaQuery(theme.breakpoints.up('md'));
99
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
100
+ const localeCategory = 'Todo';
101
+ const canPerform = assignments?.[0]?.canPerform === 'true' || assignments?.[0]?.canPerform === true;
102
+ const [count, setCount] = useState(0);
103
+ const { WORK_BASKET: { MY_WORK_LIST } } = PCore.getConstants();
104
+ function initAssignments() {
105
+ if (assignmentsSource) {
106
+ return topThreeAssignments(assignmentsSource);
107
+ }
108
+ // turn off todolist
109
+ return [];
110
+ }
111
+ const deferLoadWorklistItems = useCallback(responseData => {
112
+ setCount(responseData.totalCount);
113
+ setAssignments(responseData.data);
114
+ }, [MY_WORK_LIST]);
115
+ useEffect(() => {
116
+ if (Object.keys(myWorkList).length && myWorkList.datapage) {
117
+ fetchMyWorkList(myWorkList.datapage, getPConnect().getComponentConfig()?.myWorkList.fields, 3, true, context).then(responseData => {
118
+ deferLoadWorklistItems(responseData);
119
+ });
120
+ }
121
+ }, []);
122
+ const getAssignmentId = assignment => {
123
+ return type === CONSTS.TODO ? assignment.ID : assignment.id;
124
+ };
125
+ const getPriority = assignment => {
126
+ return type === CONSTS.TODO ? assignment.urgency : assignment.priority;
127
+ };
128
+ const getAssignmentName = assignment => {
129
+ return type === CONSTS.TODO ? assignment.name : assignment.stepName;
130
+ };
131
+ function showToast(message) {
132
+ const theMessage = `Assignment: ${message}`;
133
+ console.error(theMessage);
134
+ }
135
+ function clickGo(assignment) {
136
+ const id = getAssignmentId(assignment);
137
+ let { classname = '' } = assignment;
138
+ const sTarget = thePConn.getContainerName();
139
+ const sTargetContainerName = sTarget;
140
+ const options = {
141
+ containerName: sTargetContainerName,
142
+ channelName: ''
143
+ };
144
+ if (classname === null || classname === '') {
145
+ classname = thePConn.getCaseInfo().getClassName();
146
+ }
147
+ if (sTarget === 'workarea') {
148
+ options.isActionFromToDoList = true;
149
+ options.target = '';
150
+ options.context = null;
151
+ options.isChild = isChildCase(assignment);
152
+ }
153
+ else {
154
+ options.isActionFromToDoList = false;
155
+ options.target = sTarget;
156
+ }
157
+ thePConn
158
+ .getActionsApi()
159
+ .openAssignment(id, classname, options)
160
+ .then(() => {
161
+ if (bLogging) {
162
+ console.log(`openAssignment completed`);
163
+ }
164
+ })
165
+ .catch(() => {
166
+ showToast(`Submit failed!`);
167
+ });
168
+ }
169
+ const renderTaskId = (type, getPConnect, showTodoList, assignment) => {
170
+ const displayID = getID(assignment);
171
+ if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {
172
+ /* Supress link for todo inside flow step */
173
+ return _jsx(Button, { size: 'small', color: 'primary', children: `${assignment.name} ${getID(assignment)}` });
174
+ }
175
+ return displayID;
176
+ };
177
+ const getListItemComponent = assignment => {
178
+ if (isDesktop) {
179
+ return (_jsxs(_Fragment, { children: [localizedVal('Task in', localeCategory), renderTaskId(type, getPConnect, showTodoList, assignment), type === CONSTS.WORKLIST && assignment.status ? `\u2022 ` : undefined, type === CONSTS.WORKLIST && assignment.status ? _jsx("span", { className: 'psdk-todo-assignment-status', children: assignment.status }) : undefined, ` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`] }));
180
+ }
181
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { size: 'small', color: 'primary', children: `${assignment.name} ${getID(assignment)}` }), ` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`] }));
182
+ };
183
+ const getCount = () => (assignmentsSource ? assignmentsSource.length : type === CONSTS.WORKLIST ? count : 0);
184
+ const toDoContent = (_jsxs(_Fragment, { children: [showTodoList && (_jsx(CardHeader, { title: _jsx(Badge, { badgeContent: getCount(), overlap: 'rectangular', color: 'primary', children: _jsxs(Typography, { variant: 'h6', children: [headerText, "\u00A0\u00A0\u00A0"] }) }) })), _jsx(List, { children: assignments.map(assignment => (_jsxs("div", { className: 'psdk-todo-avatar-header', children: [_jsx(Avatar, { className: classes.avatar, style: { marginRight: '16px' }, children: currentUserInitials }), _jsxs("div", { style: { display: 'block' }, children: [_jsx(Typography, { variant: 'h6', children: assignment?.name }), `${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`] }), (!isConfirm || canPerform) && (_jsx("div", { style: { marginLeft: 'auto' }, children: _jsx(IconButton, { id: 'go-btn', onClick: () => clickGo(assignment), size: 'large', children: _jsx(ArrowForwardIosOutlinedIcon, {}) }) }))] }, getAssignmentId(assignment)))) })] }));
185
+ return (_jsxs(_Fragment, { children: [type === CONSTS.WORKLIST && assignments?.length > 0 && (_jsxs(Card, { className: classes.root, children: [showTodoList && _jsx(CardHeader, { title: _jsxs(Typography, { variant: 'h6', children: [headerText, "\u00A0\u00A0\u00A0"] }) }), _jsx(CardContent, { style: { padding: 0 }, children: _jsx(List, { children: assignments.map(assignment => (_jsx(ListItem, { dense: true, onClick: () => clickGo(assignment), secondaryAction: _jsx(Button, { className: classes.getStartedButton, color: 'primary', variant: 'contained', onClick: () => clickGo(assignment), children: "Get started" }), children: _jsx(ListItemText, { primary: getAssignmentName(assignment), secondary: getListItemComponent(assignment) }) }, getAssignmentId(assignment)))) }) })] })), type === CONSTS.TODO && !isConfirm && _jsx(Card, { className: classes.todoWrapper, children: toDoContent }), type === CONSTS.TODO && isConfirm && _jsx(_Fragment, { children: toDoContent })] }));
186
+ }
187
+ //# sourceMappingURL=ToDo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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AAI,IAThG,eAAe,CAAC,UAAU,CAAC,CAUvB,CACZ,CAAC,GACG,GACK,IACT,CACR,EAEA,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,IAAI,KAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,WAAW,YAAG,WAAW,GAAQ,EAChG,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,SAAS,IAAI,4BAAG,WAAW,GAAI,IACvD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { Button, Card, CardContent, CardHeader, Avatar, Typography, Badge, List, ListItem, ListItemText } from '@mui/material';\nimport IconButton from '@mui/material/IconButton';\nimport ArrowForwardIosOutlinedIcon from '@mui/icons-material/ArrowForwardIosOutlined';\nimport { useTheme } from '@mui/material/styles';\nimport makeStyles from '@mui/styles/makeStyles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport { Utils } from '../../components/helpers/utils';\nimport type { PConnProps } from '../../types/PConnProps';\n\nimport './ToDo.css';\n\nconst fetchMyWorkList = (datapage, fields, numberOfRecords, includeTotalCount, context) => {\n return PCore.getDataPageUtils()\n .getDataAsync(\n datapage,\n context,\n {},\n {\n pageNumber: 1,\n pageSize: numberOfRecords\n },\n {\n select: Object.keys(fields).map(key => ({ field: PCore.getAnnotationUtils().getPropertyName(fields[key]) }))\n },\n {\n invalidateCache: true,\n additionalApiParams: {\n includeTotalCount\n }\n }\n )\n .then(response => {\n return {\n ...response,\n data: (Array.isArray(response?.data) ? response.data : []).map(row =>\n Object.keys(fields).reduce((obj, key) => {\n obj[key] = row[PCore.getAnnotationUtils().getPropertyName(fields[key])];\n return obj;\n }, {})\n )\n };\n });\n};\n\ninterface ToDoProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n datasource?: any;\n myWorkList?: any;\n\n caseInfoID?: string;\n headerText?: string;\n\n itemKey?: string;\n showTodoList?: boolean;\n type?: string;\n\n context?: string;\n isConfirm?: boolean;\n}\n\nconst isChildCase = assignment => {\n return assignment.isChild;\n};\n\nfunction topThreeAssignments(assignmentsSource: any[]): any[] {\n return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];\n}\n\nfunction getID(assignment: any) {\n if (assignment.value) {\n const refKey = assignment.value;\n return refKey.substring(refKey.lastIndexOf(' ') + 1);\n }\n const refKey = assignment.ID;\n const arKeys = refKey.split('!')[0].split(' ');\n return arKeys[2];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginBottom: theme.spacing(2),\n paddingBottom: theme.spacing(1),\n borderRadius: '8px'\n },\n avatar: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n todoWrapper: {\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light,\n padding: theme.spacing(1),\n margin: theme.spacing(1)\n },\n psdkTodoAssignmentStatus: {\n backgroundColor: 'var(--app-neutral-light-color)',\n borderRadius: '0.125rem',\n color: theme.embedded.resolutionTextColor,\n fontSize: '0.75rem',\n fontWeight: 'bold',\n lineHeight: 'calc(0.5rem * 2.5)',\n height: 'calc(0.5rem * 2.5)',\n padding: '0 0.5rem',\n textTransform: 'uppercase'\n },\n getStartedButton: {\n borderRadius: '18px',\n textTransform: 'none',\n width: '120px',\n backgroundColor: theme.actionButtons.primary.backgroundColor\n },\n primaryButton: {\n backgroundColor: theme.actionButtons.primary.backgroundColor,\n color: theme.actionButtons.primary.color\n }\n}));\n\nexport default function ToDo(props: ToDoProps) {\n const {\n getPConnect,\n context,\n datasource = [],\n headerText = 'To do',\n showTodoList = true,\n myWorkList = {},\n type = 'worklist',\n isConfirm = false\n } = props;\n\n const CONSTS = PCore.getConstants();\n\n const bLogging = true;\n const currentUser = PCore.getEnvironmentInfo().getOperatorName() ?? '';\n const currentUserInitials = Utils.getInitials(currentUser);\n const assignmentsSource = datasource?.source || myWorkList?.source;\n\n const [assignments, setAssignments] = useState<any[]>(initAssignments());\n\n const thePConn = getPConnect();\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Todo';\n const canPerform = assignments?.[0]?.canPerform === 'true' || assignments?.[0]?.canPerform === true;\n const [count, setCount] = useState(0);\n\n const {\n WORK_BASKET: { MY_WORK_LIST }\n } = PCore.getConstants();\n\n function initAssignments(): any[] {\n if (assignmentsSource) {\n return topThreeAssignments(assignmentsSource);\n }\n // turn off todolist\n return [];\n }\n\n const deferLoadWorklistItems = useCallback(\n responseData => {\n setCount(responseData.totalCount);\n setAssignments(responseData.data);\n },\n [MY_WORK_LIST]\n );\n\n useEffect(() => {\n if (Object.keys(myWorkList).length && myWorkList.datapage) {\n fetchMyWorkList(myWorkList.datapage, getPConnect().getComponentConfig()?.myWorkList.fields, 3, true, context).then(responseData => {\n deferLoadWorklistItems(responseData);\n });\n }\n }, []);\n\n const getAssignmentId = assignment => {\n return type === CONSTS.TODO ? assignment.ID : assignment.id;\n };\n\n const getPriority = assignment => {\n return type === CONSTS.TODO ? assignment.urgency : assignment.priority;\n };\n\n const getAssignmentName = assignment => {\n return type === CONSTS.TODO ? assignment.name : assignment.stepName;\n };\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n console.error(theMessage);\n }\n\n function clickGo(assignment) {\n const id = getAssignmentId(assignment);\n let { classname = '' } = assignment;\n const sTarget = thePConn.getContainerName();\n const sTargetContainerName = sTarget;\n\n const options: any = {\n containerName: sTargetContainerName,\n channelName: ''\n };\n\n if (classname === null || classname === '') {\n classname = thePConn.getCaseInfo().getClassName();\n }\n\n if (sTarget === 'workarea') {\n options.isActionFromToDoList = true;\n options.target = '';\n options.context = null;\n options.isChild = isChildCase(assignment);\n } else {\n options.isActionFromToDoList = false;\n options.target = sTarget;\n }\n\n thePConn\n .getActionsApi()\n .openAssignment(id, classname, options)\n .then(() => {\n if (bLogging) {\n console.log(`openAssignment completed`);\n }\n })\n .catch(() => {\n showToast(`Submit failed!`);\n });\n }\n\n const renderTaskId = (type, getPConnect, showTodoList, assignment) => {\n const displayID = getID(assignment);\n\n if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {\n /* Supress link for todo inside flow step */\n return <Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>;\n }\n return displayID;\n };\n\n const getListItemComponent = assignment => {\n if (isDesktop) {\n return (\n <>\n {localizedVal('Task in', localeCategory)}\n {renderTaskId(type, getPConnect, showTodoList, assignment)}\n {type === CONSTS.WORKLIST && assignment.status ? `\\u2022 ` : undefined}\n {type === CONSTS.WORKLIST && assignment.status ? <span className='psdk-todo-assignment-status'>{assignment.status}</span> : undefined}\n {` \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </>\n );\n }\n return (\n <>\n <Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>\n {` \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </>\n );\n };\n\n const getCount = () => (assignmentsSource ? assignmentsSource.length : type === CONSTS.WORKLIST ? count : 0);\n\n const toDoContent = (\n <>\n {showTodoList && (\n <CardHeader\n title={\n <Badge badgeContent={getCount()} overlap='rectangular' color='primary'>\n <Typography variant='h6'>{headerText}&nbsp;&nbsp;&nbsp;</Typography>\n </Badge>\n }\n />\n )}\n <List>\n {assignments.map(assignment => (\n <div className='psdk-todo-avatar-header' key={getAssignmentId(assignment)}>\n <Avatar className={classes.avatar} style={{ marginRight: '16px' }}>\n {currentUserInitials}\n </Avatar>\n <div style={{ display: 'block' }}>\n <Typography variant='h6'>{assignment?.name}</Typography>\n {`${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \\u2022 ${localizedVal(\n 'Urgency',\n localeCategory\n )} ${getPriority(assignment)}`}\n </div>\n {(!isConfirm || canPerform) && (\n <div style={{ marginLeft: 'auto' }}>\n <IconButton id='go-btn' onClick={() => clickGo(assignment)} size='large'>\n <ArrowForwardIosOutlinedIcon />\n </IconButton>\n </div>\n )}\n </div>\n ))}\n </List>\n </>\n );\n\n return (\n <>\n {type === CONSTS.WORKLIST && assignments?.length > 0 && (\n <Card className={classes.root}>\n {showTodoList && <CardHeader title={<Typography variant='h6'>{headerText}&nbsp;&nbsp;&nbsp;</Typography>} />}\n <CardContent style={{ padding: 0 }}>\n <List>\n {assignments.map(assignment => (\n <ListItem\n key={getAssignmentId(assignment)}\n dense\n onClick={() => clickGo(assignment)}\n secondaryAction={\n <Button className={classes.getStartedButton} color='primary' variant='contained' onClick={() => clickGo(assignment)}>\n Get started\n </Button>\n }\n >\n <ListItemText primary={getAssignmentName(assignment)} secondary={getListItemComponent(assignment)} />\n </ListItem>\n ))}\n </List>\n </CardContent>\n </Card>\n )}\n\n {type === CONSTS.TODO && !isConfirm && <Card className={classes.todoWrapper}>{toDoContent}</Card>}\n {type === CONSTS.TODO && isConfirm && <>{toDoContent}</>}\n </>\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { default } from './ToDo';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mediaco/ToDo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './ToDo';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mediaco/ToDo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC","sourcesContent":["export { default } from './ToDo';\n"]}
@@ -0,0 +1,26 @@
1
+ /* global styles*/
2
+ #pega-part-of-page .psdk-flow-container-top {
3
+ max-width: 1400px;
4
+ width: 50%;
5
+ margin-left: auto;
6
+ margin-right: auto;
7
+ margin-bottom: 5%;
8
+ padding: 16px;
9
+ }
10
+
11
+ #pega-part-of-page .psdk-horizontal-stepper-header-container {
12
+ display: none;
13
+ margin-bottom: 2rem;
14
+ }
15
+
16
+ #pega-part-of-page .MuiCard-root {
17
+ padding: 16px;
18
+ }
19
+
20
+ #pega-part-of-page .MuiCardContent-root:first-child {
21
+ padding-top: 0px !important;
22
+ }
23
+
24
+ #pega-part-of-page .MuiCardContent-root:last-child {
25
+ padding-bottom: 0px !important;
26
+ }
package/lib/theme.d.ts CHANGED
@@ -15,6 +15,12 @@ declare module '@mui/styles/defaultTheme' {
15
15
  backgroundColor: string;
16
16
  topColor: string;
17
17
  };
18
+ headerNav: {
19
+ backgroundColor: string;
20
+ navLinkColor: string;
21
+ navLinkHoverColor: string;
22
+ menuToggleColor: string;
23
+ };
18
24
  embedded: {
19
25
  resolutionTextColor: string;
20
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;GAGG;AACH,OAAO,QAAQ,0BAA0B,CAAC;IACxC,UAAU,YAAa,SAAQ,KAAK;QAClC,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE;YACJ,eAAe,EAAE,MAAM,CAAC;YACxB,UAAU,EAAE,MAAM,CAAC;YACnB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,KAAK,EAAE;YACL,eAAe,EAAE,MAAM,CAAC;YACxB,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;QACF,QAAQ,EAAE;YACR,mBAAmB,EAAE,MAAM,CAAC;SAC7B,CAAC;QACF,aAAa,EAAE;YACb,OAAO,EAAE;gBACP,eAAe,EAAE,MAAM,CAAC;gBACxB,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;YACF,SAAS,EAAE;gBACT,eAAe,EAAE,MAAM,CAAC;gBACxB,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;SACH,CAAC;KACH;CACF;AA+ND,eAAO,MAAM,KAAK,OAAsD,CAAC"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;GAGG;AACH,OAAO,QAAQ,0BAA0B,CAAC;IACxC,UAAU,YAAa,SAAQ,KAAK;QAClC,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE;YACJ,eAAe,EAAE,MAAM,CAAC;YACxB,UAAU,EAAE,MAAM,CAAC;YACnB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,KAAK,EAAE;YACL,eAAe,EAAE,MAAM,CAAC;YACxB,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;QACF,SAAS,EAAE;YACT,eAAe,EAAE,MAAM,CAAC;YACxB,YAAY,EAAE,MAAM,CAAC;YACrB,iBAAiB,EAAE,MAAM,CAAC;YAC1B,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,QAAQ,EAAE;YACR,mBAAmB,EAAE,MAAM,CAAC;SAC7B,CAAC;QACF,aAAa,EAAE;YACb,OAAO,EAAE;gBACP,eAAe,EAAE,MAAM,CAAC;gBACxB,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;YACF,SAAS,EAAE;gBACT,eAAe,EAAE,MAAM,CAAC;gBACxB,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;SACH,CAAC;KACH;CACF;AAwPD,eAAO,MAAM,KAAK,OAAsD,CAAC"}
package/lib/theme.js CHANGED
@@ -17,7 +17,7 @@ const lightThemeColours = {
17
17
  '--app-warning-color-light': '#ffb74d',
18
18
  '--app-warning-color-dark': '#f57c00',
19
19
  '--app-background-color': 'whitesmoke',
20
- '--app-form-color': 'white',
20
+ '--app-form-bg-color': 'white',
21
21
  /* App Navigation */
22
22
  '--app-nav-bg': '#262626' /*! default */,
23
23
  '--app-nav-color': '#d9d9d9' /* invert( var(--app-nav-bg)) !default */,
@@ -37,12 +37,15 @@ const lightThemeColours = {
37
37
  '--selected-step-label-color': 'rgba(0, 0, 0, 0.87)',
38
38
  '--step-label-color': 'rgba(0, 0, 0, 0.54)',
39
39
  '--svg-color': 'invert(0%)',
40
- '--secondary-button-text-color': '#ffffff'
40
+ '--secondary-button-text-color': '#ffffff',
41
+ '--text-primary-color': '#000',
42
+ '--text-secondary-color': '#c0c0c0',
43
+ '--stepper-completed-bg-color': '#218721'
41
44
  }
42
45
  };
43
46
  const darkThemeColours = {
44
47
  ':root': {
45
- '--app-primary-color': '#f72585' /* accent pink */,
48
+ '--app-primary-color': '#C70BB5' /* accent pink */,
46
49
  '--app-primary-dark-color': '#c2185b' /* darker pink */,
47
50
  '--app-primary-light-color': '#ff5ca2' /* lighter pink */,
48
51
  '--app-secondary-color': '#c0c0c0' /* accent silver */,
@@ -56,7 +59,7 @@ const darkThemeColours = {
56
59
  '--app-warning-color-light': '#ffe082' /* light amber */,
57
60
  '--app-warning-color-dark': '#c68400' /* dark amber */,
58
61
  '--app-background-color': '#060326' /* main dark background */,
59
- '--app-form-color': '#18132c' /* slightly lighter for forms */,
62
+ '--app-form-bg-color': '#23273f' /* slightly lighter for forms */,
60
63
  /* App Navigation */
61
64
  '--app-nav-bg': '#18132c' /* navigation background */,
62
65
  '--app-nav-color': '#c0c0c0',
@@ -75,7 +78,10 @@ const darkThemeColours = {
75
78
  '--selected-step-label-color': 'rgba(0, 0, 0, 0.87)',
76
79
  '--step-label-color': 'rgba(0, 0, 0, 0.54)',
77
80
  '--svg-color': 'invert(100%)',
78
- '--secondary-button-text-color': '#1a103c'
81
+ '--secondary-button-text-color': '#1a103c',
82
+ '--text-primary-color': '#e0e0e0',
83
+ '--text-secondary-color': '#c0c0c0',
84
+ '--stepper-completed-bg-color': '#158715'
79
85
  }
80
86
  };
81
87
  const lightTheme = createTheme({
@@ -96,6 +102,12 @@ const lightTheme = createTheme({
96
102
  }
97
103
  }
98
104
  },
105
+ headerNav: {
106
+ backgroundColor: '#ffffff',
107
+ navLinkColor: 'rgba(0, 0, 0, 0.87)',
108
+ navLinkHoverColor: '#3f51b5',
109
+ menuToggleColor: 'rgba(0, 0, 0, 0.87)'
110
+ },
99
111
  actionButtons: {
100
112
  primary: {
101
113
  backgroundColor: '#cc0f60',
@@ -143,7 +155,12 @@ const darkTheme = createTheme({
143
155
  background: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',
144
156
  backgroundAttachment: 'fixed'
145
157
  },
146
- ...darkThemeColours
158
+ ...darkThemeColours,
159
+ // scrollbar styling
160
+ '*': {
161
+ scrollbarWidth: 'thin', // Options: auto | thin | none
162
+ scrollbarColor: '#555 #2c2c2c' // thumb color, track color
163
+ }
147
164
  }
148
165
  },
149
166
  MuiPaper: {
@@ -162,6 +179,12 @@ const darkTheme = createTheme({
162
179
  }
163
180
  }
164
181
  },
182
+ headerNav: {
183
+ backgroundColor: 'var(--app-nav-bg)',
184
+ navLinkColor: 'var(--app-nav-color)',
185
+ navLinkHoverColor: '#ffffff',
186
+ menuToggleColor: '#ffffff'
187
+ },
165
188
  actionButtons: {
166
189
  primary: {
167
190
  backgroundColor: '#C70BB5',
@@ -184,8 +207,8 @@ const darkTheme = createTheme({
184
207
  palette: {
185
208
  mode: 'dark',
186
209
  primary: {
187
- main: '#f72585', // accent pink
188
- light: '#ff5ca2', // lighter shade of pink
210
+ main: '#C70BB5', // pink
211
+ light: '#C70BB5', // pink
189
212
  dark: '#c2185b', // darker shade
190
213
  contrastText: '#ffffff' // white text on pink buttons
191
214
  },
@@ -197,13 +220,12 @@ const darkTheme = createTheme({
197
220
  },
198
221
  info: {
199
222
  main: '#e91e63', // Pink
200
- dark: '#ad1457', // Darker pink
201
- light: '#f8bbd0', // Light pink for backgrounds
223
+ dark: '#E885D2', // Light pink
224
+ light: '#C70BB5', // Lighter pink for backgrounds
202
225
  contrastText: '#fff'
203
226
  },
204
227
  background: {
205
- // default: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',
206
- paper: 'rgba(255, 255, 255, 0.1)' // card-bg
228
+ paper: '#191b2c' // card-bg
207
229
  },
208
230
  text: {
209
231
  primary: '#e0e0e0', // text-light
package/lib/theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAkCjD,MAAM,iBAAiB,GAAG;IACxB,OAAO,EAAE;QACP,qBAAqB,EAAE,SAAS,CAAC,kBAAkB;QACnD,0BAA0B,EAAE,SAAS,CAAC,kBAAkB;QACxD,2BAA2B,EAAE,SAAS,CAAC,kBAAkB;QACzD,uBAAuB,EAAE,SAAS;QAClC,qBAAqB,EAAE,MAAM;QAC7B,2BAA2B,EAAE,WAAW;QACxC,0BAA0B,EAAE,SAAS;QACrC,mBAAmB,EAAE,SAAS;QAC9B,yBAAyB,EAAE,SAAS;QACpC,wBAAwB,EAAE,SAAS;QACnC,qBAAqB,EAAE,SAAS;QAChC,2BAA2B,EAAE,SAAS;QACtC,0BAA0B,EAAE,SAAS;QAErC,wBAAwB,EAAE,YAAY;QACtC,kBAAkB,EAAE,OAAO;QAE3B,oBAAoB;QACpB,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,iBAAiB,EAAE,SAAS,CAAC,yCAAyC;QAEtE,uBAAuB;QACvB,0BAA0B,EAAE,0BAA0B;QACtD,mBAAmB,EAAE,OAAO;QAC5B,sBAAsB,EAAE,OAAO;QAC/B,0BAA0B,EAAE,MAAM;QAClC,kCAAkC,EAAE,SAAS;QAC7C,6BAA6B,EAAE,SAAS;QACxC,qBAAqB,EAAE,SAAS;QAChC,qBAAqB,EAAE,cAAc;QACrC,kBAAkB,EAAE,OAAO;QAC3B,4BAA4B,EAAE,OAAO;QACrC,2BAA2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,EAAE,0BAA0B,CAAC,UAAU;SAC7C;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,SAAS,EAAE,aAAa;YACjC,SAAS,EAAE,SAAS,CAAC,wBAAwB;SAC9C;QACD,OAAO,EAAE,0BAA0B,CAAC,eAAe;KACpD;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC","sourcesContent":["// @ts-nocheck\nimport { createTheme } from '@mui/material';\nimport type { Theme } from '@mui/material/styles';\n\nimport sdkConfig from '../../../sdk-config.json';\n\n/**\n * Since makeStyles is now exported from @mui/styles package which does not know about Theme in the core package.\n * you need to augment the DefaultTheme (empty object) in @mui/styles with Theme from the core.\n */\ndeclare module '@mui/styles/defaultTheme' {\n interface DefaultTheme extends Theme {\n backgroundColor: string;\n card: {\n backgroundColor: string;\n borderLeft: string;\n borderLeftColor: string;\n };\n modal: {\n backgroundColor: string;\n topColor: string;\n };\n embedded: {\n resolutionTextColor: string;\n };\n actionButtons: {\n primary: {\n backgroundColor: string;\n color: string;\n };\n secondary: {\n backgroundColor: string;\n color: string;\n };\n };\n }\n}\n\nconst lightThemeColours = {\n ':root': {\n '--app-primary-color': '#007bff' /* was #673ab7; */,\n '--app-primary-dark-color': '#0048cc' /* was #4527A0; */,\n '--app-primary-light-color': '#33aeff' /* was #B499FC; */,\n '--app-secondary-color': '#FFC400',\n '--app-neutral-color': 'grey',\n '--app-neutral-light-color': 'lightgrey',\n '--app-neutral-dark-color': '#262626',\n '--app-error-color': '#f44336',\n '--app-error-light-color': '#e57373',\n '--app-error-dark-color': '#d32f2f',\n '--app-warning-color': '#ff9800',\n '--app-warning-color-light': '#ffb74d',\n '--app-warning-color-dark': '#f57c00',\n\n '--app-background-color': 'whitesmoke',\n '--app-form-color': 'white',\n\n /* App Navigation */\n '--app-nav-bg': '#262626' /*! default */,\n '--app-nav-color': '#d9d9d9' /* invert( var(--app-nav-bg)) !default */,\n\n /* Few custom colors */\n '--modal-background-color': 'rgba(100, 100, 100, 0.4)',\n '--modal-top-color': 'white',\n '--modal-border-color': 'black',\n '--modal-box-shadow-color': '#777',\n '--utility-count-background-color': '#65b5f5',\n '--utility-card-border-color': '#f5f5f5',\n '--link-button-color': '#3f51b5',\n '--banner-text-color': 'rgb(0, 0, 0)',\n '--app-text-color': 'white',\n '--utility-background-color': 'white',\n '--table-header-background': '#f5f5f5',\n '--step-line-color': 'rgba(0, 0, 0, 0.12)',\n '--selected-step-label-color': 'rgba(0, 0, 0, 0.87)',\n '--step-label-color': 'rgba(0, 0, 0, 0.54)',\n '--svg-color': 'invert(0%)',\n '--secondary-button-text-color': '#ffffff'\n }\n};\nconst darkThemeColours = {\n ':root': {\n '--app-primary-color': '#f72585' /* accent pink */,\n '--app-primary-dark-color': '#c2185b' /* darker pink */,\n '--app-primary-light-color': '#ff5ca2' /* lighter pink */,\n '--app-secondary-color': '#c0c0c0' /* accent silver */,\n '--app-neutral-color': '#b0b0b0' /* light gray for text/icons */,\n '--app-neutral-light-color': '#e0e0e0' /* lighter gray for highlights */,\n '--app-neutral-dark-color': '#262626' /* dark gray for backgrounds */,\n '--app-error-color': '#ff5370' /* vibrant error red */,\n '--app-error-light-color': '#ffb4b4' /* soft error red */,\n '--app-error-dark-color': '#b71c1c' /* deep error red */,\n '--app-warning-color': '#ffb300' /* amber warning */,\n '--app-warning-color-light': '#ffe082' /* light amber */,\n '--app-warning-color-dark': '#c68400' /* dark amber */,\n\n '--app-background-color': '#060326' /* main dark background */,\n '--app-form-color': '#18132c' /* slightly lighter for forms */,\n\n /* App Navigation */\n '--app-nav-bg': '#18132c' /* navigation background */,\n '--app-nav-color': '#c0c0c0',\n\n '--modal-background-color': 'rgba(40, 30, 90, 0.85)' /* nearly matches #060326, slightly lighter and more opaque */,\n '--modal-top-color': '#2a1f54' /* light pink accent for modal top */,\n '--modal-border-color': '#2a1f54' /* matches card background */,\n '--modal-box-shadow-color': '#777',\n\n '--utility-count-background-color': '#f8aaf0',\n '--utility-card-border-color': '#2a1f54',\n '--link-button-color': '#f72585',\n '--banner-text-color': '#e0e0e0',\n '--app-text-color': '#e0e0e0',\n '--utility-background-color': '#2a1f54',\n '--table-header-background': '#18132c',\n '--step-line-color': 'rgba(0, 0, 0, 0.12)',\n '--selected-step-label-color': 'rgba(0, 0, 0, 0.87)',\n '--step-label-color': 'rgba(0, 0, 0, 0.54)',\n '--svg-color': 'invert(100%)',\n '--secondary-button-text-color': '#1a103c'\n }\n};\n\nconst lightTheme = createTheme({\n components: {\n MuiCssBaseline: {\n styleOverrides: {\n ...lightThemeColours\n }\n },\n MuiTextField: {\n defaultProps: {\n size: 'small'\n },\n styleOverrides: {\n root: {\n width: '100%'\n }\n }\n }\n },\n actionButtons: {\n primary: {\n backgroundColor: '#cc0f60',\n color: '#FFFFFF'\n },\n secondary: {\n backgroundColor: '#3F51B5',\n color: '#FFFFFF'\n }\n },\n modal: {\n backgroundColor: 'rgba(100, 100, 100, 0.4)',\n topColor: 'white'\n },\n embedded: {\n resolutionTextColor: 'darkslategray'\n },\n backgroundColor: '#fff',\n card: {\n backgroundColor: '#fff',\n borderLeft: '6px solid',\n borderLeftColor: '#C70BB5'\n },\n palette: {\n primary: {\n contrastText: '#fff',\n dark: '#303f9f',\n light: '#7986cb',\n main: '#3f51b5'\n },\n secondary: {\n contrastText: '#fff',\n dark: '#c51162',\n light: '#ff4081',\n main: '#f50057'\n },\n backgroundColor: '#fff'\n }\n});\n\nconst darkTheme = createTheme({\n components: {\n MuiCssBaseline: {\n styleOverrides: {\n body: {\n background: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',\n backgroundAttachment: 'fixed'\n },\n ...darkThemeColours\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {}\n }\n },\n MuiTextField: {\n defaultProps: {\n size: 'small'\n },\n styleOverrides: {\n root: {\n width: '100%'\n }\n }\n }\n },\n actionButtons: {\n primary: {\n backgroundColor: '#C70BB5',\n color: '#FFFFFF'\n },\n secondary: {\n backgroundColor: '#FFFFFF',\n color: '#C70BB5'\n }\n },\n embedded: {\n resolutionTextColor: 'darkslategray'\n },\n backgroundColor: '#060326',\n card: {\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderLeft: '',\n borderLeftColor: ''\n },\n palette: {\n mode: 'dark',\n primary: {\n main: '#f72585', // accent pink\n light: '#ff5ca2', // lighter shade of pink\n dark: '#c2185b', // darker shade\n contrastText: '#ffffff' // white text on pink buttons\n },\n secondary: {\n main: '#c0c0c0', // accent silver\n light: '#d9d9d9',\n dark: '#8c8c8c',\n contrastText: '#1a103c' // dark text on silver background\n },\n info: {\n main: '#e91e63', // Pink\n dark: '#ad1457', // Darker pink\n light: '#f8bbd0', // Light pink for backgrounds\n contrastText: '#fff'\n },\n background: {\n // default: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',\n paper: 'rgba(255, 255, 255, 0.1)' // card-bg\n },\n text: {\n primary: '#e0e0e0', // text-light\n secondary: '#c0c0c0' // silver for muted text\n },\n divider: 'rgba(255, 255, 255, 0.1)' // border-color\n }\n});\n\nexport const theme = sdkConfig.theme === 'dark' ? darkTheme : lightTheme;\n"]}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAwCjD,MAAM,iBAAiB,GAAG;IACxB,OAAO,EAAE;QACP,qBAAqB,EAAE,SAAS,CAAC,kBAAkB;QACnD,0BAA0B,EAAE,SAAS,CAAC,kBAAkB;QACxD,2BAA2B,EAAE,SAAS,CAAC,kBAAkB;QACzD,uBAAuB,EAAE,SAAS;QAClC,qBAAqB,EAAE,MAAM;QAC7B,2BAA2B,EAAE,WAAW;QACxC,0BAA0B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S,EAAE,SAAS,CAAC,wBAAwB;SAC9C;QACD,OAAO,EAAE,0BAA0B,CAAC,eAAe;KACpD;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC","sourcesContent":["// @ts-nocheck\nimport { createTheme } from '@mui/material';\nimport type { Theme } from '@mui/material/styles';\n\nimport sdkConfig from '../../../sdk-config.json';\n\n/**\n * Since makeStyles is now exported from @mui/styles package which does not know about Theme in the core package.\n * you need to augment the DefaultTheme (empty object) in @mui/styles with Theme from the core.\n */\ndeclare module '@mui/styles/defaultTheme' {\n interface DefaultTheme extends Theme {\n backgroundColor: string;\n card: {\n backgroundColor: string;\n borderLeft: string;\n borderLeftColor: string;\n };\n modal: {\n backgroundColor: string;\n topColor: string;\n };\n headerNav: {\n backgroundColor: string;\n navLinkColor: string;\n navLinkHoverColor: string;\n menuToggleColor: string;\n };\n embedded: {\n resolutionTextColor: string;\n };\n actionButtons: {\n primary: {\n backgroundColor: string;\n color: string;\n };\n secondary: {\n backgroundColor: string;\n color: string;\n };\n };\n }\n}\n\nconst lightThemeColours = {\n ':root': {\n '--app-primary-color': '#007bff' /* was #673ab7; */,\n '--app-primary-dark-color': '#0048cc' /* was #4527A0; */,\n '--app-primary-light-color': '#33aeff' /* was #B499FC; */,\n '--app-secondary-color': '#FFC400',\n '--app-neutral-color': 'grey',\n '--app-neutral-light-color': 'lightgrey',\n '--app-neutral-dark-color': '#262626',\n '--app-error-color': '#f44336',\n '--app-error-light-color': '#e57373',\n '--app-error-dark-color': '#d32f2f',\n '--app-warning-color': '#ff9800',\n '--app-warning-color-light': '#ffb74d',\n '--app-warning-color-dark': '#f57c00',\n\n '--app-background-color': 'whitesmoke',\n '--app-form-bg-color': 'white',\n\n /* App Navigation */\n '--app-nav-bg': '#262626' /*! default */,\n '--app-nav-color': '#d9d9d9' /* invert( var(--app-nav-bg)) !default */,\n\n /* Few custom colors */\n '--modal-background-color': 'rgba(100, 100, 100, 0.4)',\n '--modal-top-color': 'white',\n '--modal-border-color': 'black',\n '--modal-box-shadow-color': '#777',\n '--utility-count-background-color': '#65b5f5',\n '--utility-card-border-color': '#f5f5f5',\n '--link-button-color': '#3f51b5',\n '--banner-text-color': 'rgb(0, 0, 0)',\n '--app-text-color': 'white',\n '--utility-background-color': 'white',\n '--table-header-background': '#f5f5f5',\n '--step-line-color': 'rgba(0, 0, 0, 0.12)',\n '--selected-step-label-color': 'rgba(0, 0, 0, 0.87)',\n '--step-label-color': 'rgba(0, 0, 0, 0.54)',\n '--svg-color': 'invert(0%)',\n '--secondary-button-text-color': '#ffffff',\n\n '--text-primary-color': '#000',\n '--text-secondary-color': '#c0c0c0',\n '--stepper-completed-bg-color': '#218721'\n }\n};\nconst darkThemeColours = {\n ':root': {\n '--app-primary-color': '#C70BB5' /* accent pink */,\n '--app-primary-dark-color': '#c2185b' /* darker pink */,\n '--app-primary-light-color': '#ff5ca2' /* lighter pink */,\n '--app-secondary-color': '#c0c0c0' /* accent silver */,\n '--app-neutral-color': '#b0b0b0' /* light gray for text/icons */,\n '--app-neutral-light-color': '#e0e0e0' /* lighter gray for highlights */,\n '--app-neutral-dark-color': '#262626' /* dark gray for backgrounds */,\n '--app-error-color': '#ff5370' /* vibrant error red */,\n '--app-error-light-color': '#ffb4b4' /* soft error red */,\n '--app-error-dark-color': '#b71c1c' /* deep error red */,\n '--app-warning-color': '#ffb300' /* amber warning */,\n '--app-warning-color-light': '#ffe082' /* light amber */,\n '--app-warning-color-dark': '#c68400' /* dark amber */,\n\n '--app-background-color': '#060326' /* main dark background */,\n '--app-form-bg-color': '#23273f' /* slightly lighter for forms */,\n\n /* App Navigation */\n '--app-nav-bg': '#18132c' /* navigation background */,\n '--app-nav-color': '#c0c0c0',\n\n '--modal-background-color': 'rgba(40, 30, 90, 0.85)' /* nearly matches #060326, slightly lighter and more opaque */,\n '--modal-top-color': '#2a1f54' /* light pink accent for modal top */,\n '--modal-border-color': '#2a1f54' /* matches card background */,\n '--modal-box-shadow-color': '#777',\n\n '--utility-count-background-color': '#f8aaf0',\n '--utility-card-border-color': '#2a1f54',\n '--link-button-color': '#f72585',\n '--banner-text-color': '#e0e0e0',\n '--app-text-color': '#e0e0e0',\n '--utility-background-color': '#2a1f54',\n '--table-header-background': '#18132c',\n '--step-line-color': 'rgba(0, 0, 0, 0.12)',\n '--selected-step-label-color': 'rgba(0, 0, 0, 0.87)',\n '--step-label-color': 'rgba(0, 0, 0, 0.54)',\n '--svg-color': 'invert(100%)',\n '--secondary-button-text-color': '#1a103c',\n\n '--text-primary-color': '#e0e0e0',\n '--text-secondary-color': '#c0c0c0',\n '--stepper-completed-bg-color': '#158715'\n }\n};\n\nconst lightTheme = createTheme({\n components: {\n MuiCssBaseline: {\n styleOverrides: {\n ...lightThemeColours\n }\n },\n MuiTextField: {\n defaultProps: {\n size: 'small'\n },\n styleOverrides: {\n root: {\n width: '100%'\n }\n }\n }\n },\n headerNav: {\n backgroundColor: '#ffffff',\n navLinkColor: 'rgba(0, 0, 0, 0.87)',\n navLinkHoverColor: '#3f51b5',\n menuToggleColor: 'rgba(0, 0, 0, 0.87)'\n },\n actionButtons: {\n primary: {\n backgroundColor: '#cc0f60',\n color: '#FFFFFF'\n },\n secondary: {\n backgroundColor: '#3F51B5',\n color: '#FFFFFF'\n }\n },\n modal: {\n backgroundColor: 'rgba(100, 100, 100, 0.4)',\n topColor: 'white'\n },\n embedded: {\n resolutionTextColor: 'darkslategray'\n },\n backgroundColor: '#fff',\n card: {\n backgroundColor: '#fff',\n borderLeft: '6px solid',\n borderLeftColor: '#C70BB5'\n },\n palette: {\n primary: {\n contrastText: '#fff',\n dark: '#303f9f',\n light: '#7986cb',\n main: '#3f51b5'\n },\n secondary: {\n contrastText: '#fff',\n dark: '#c51162',\n light: '#ff4081',\n main: '#f50057'\n },\n backgroundColor: '#fff'\n }\n});\n\nconst darkTheme = createTheme({\n components: {\n MuiCssBaseline: {\n styleOverrides: {\n body: {\n background: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',\n backgroundAttachment: 'fixed'\n },\n ...darkThemeColours,\n\n // scrollbar styling\n '*': {\n scrollbarWidth: 'thin', // Options: auto | thin | none\n scrollbarColor: '#555 #2c2c2c' // thumb color, track color\n }\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {}\n }\n },\n MuiTextField: {\n defaultProps: {\n size: 'small'\n },\n styleOverrides: {\n root: {\n width: '100%'\n }\n }\n }\n },\n headerNav: {\n backgroundColor: 'var(--app-nav-bg)',\n navLinkColor: 'var(--app-nav-color)',\n navLinkHoverColor: '#ffffff',\n menuToggleColor: '#ffffff'\n },\n actionButtons: {\n primary: {\n backgroundColor: '#C70BB5',\n color: '#FFFFFF'\n },\n secondary: {\n backgroundColor: '#FFFFFF',\n color: '#C70BB5'\n }\n },\n embedded: {\n resolutionTextColor: 'darkslategray'\n },\n backgroundColor: '#060326',\n card: {\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderLeft: '',\n borderLeftColor: ''\n },\n palette: {\n mode: 'dark',\n primary: {\n main: '#C70BB5', // pink\n light: '#C70BB5', // pink\n dark: '#c2185b', // darker shade\n contrastText: '#ffffff' // white text on pink buttons\n },\n secondary: {\n main: '#c0c0c0', // accent silver\n light: '#d9d9d9',\n dark: '#8c8c8c',\n contrastText: '#1a103c' // dark text on silver background\n },\n info: {\n main: '#e91e63', // Pink\n dark: '#E885D2', // Light pink\n light: '#C70BB5', // Lighter pink for backgrounds\n contrastText: '#fff'\n },\n background: {\n paper: '#191b2c' // card-bg\n },\n text: {\n primary: '#e0e0e0', // text-light\n secondary: '#c0c0c0' // silver for muted text\n },\n divider: 'rgba(255, 255, 255, 0.1)' // border-color\n }\n});\n\nexport const theme = sdkConfig.theme === 'dark' ? darkTheme : lightTheme;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/react-sdk-components",
3
- "version": "0.25.4",
3
+ "version": "0.25.6",
4
4
  "description": "React SDK Infrastructure: bridge and components",
5
5
  "_filesComment": "During packing, npm ignores everything NOT in the files list",
6
6
  "files": [
@@ -1,16 +0,0 @@
1
- export declare const isContentBinary: (headers: any) => any;
2
- export declare const isContentBase64: (headers: any) => any;
3
- export declare const fileDownload: (data: any, fileName: any, ext: any, headers: any) => void;
4
- export declare const fileDownloadVar: (content: any, type: any, name: any, extension: any) => void;
5
- export declare const useFileDownload: (context: any) => ({ ID, name, extension, type, category, responseType }: {
6
- ID: any;
7
- name: any;
8
- extension: any;
9
- type: any;
10
- category: any;
11
- responseType: any;
12
- }) => void;
13
- export declare const getIconFromFileType: (fileType: any) => string;
14
- export declare const validateMaxSize: (fileObj: any, maxSizeInMB: string) => boolean;
15
- export declare const isFileUploadedToServer: (file: any) => any;
16
- //# sourceMappingURL=attachmentHelpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachmentHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/attachmentHelpers.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAG,YAAO,QAErC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAG,YAAO,QAErC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAI,EAAE,aAAQ,EAAE,QAAG,EAAE,YAAO,SAUxD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAO,EAAE,SAAI,EAAE,SAAI,EAAE,cAAS,SAa7D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAG,YAAO;;;;;;;UAwBrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAQ,KAAG,MAyB9C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,GAAG,EAAE,aAAa,MAAM,KAAG,OAGnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAG,SAAI,QAAkE,CAAC"}
@@ -1,94 +0,0 @@
1
- import { useCallback } from 'react';
2
- import download from 'downloadjs';
3
- export const isContentBinary = headers => {
4
- return headers && headers['content-transfer-encoding'] === 'binary';
5
- };
6
- export const isContentBase64 = headers => {
7
- return headers && headers['content-transfer-encoding'] === 'base64';
8
- };
9
- export const fileDownload = (data, fileName, ext, headers) => {
10
- const name = ext ? `${fileName}.${ext}` : fileName;
11
- // Temp fix: downloading EMAIl type attachment as html file
12
- if (ext === 'html') {
13
- download(isContentBase64(headers) ? atob(data) : data, name, 'text/html');
14
- }
15
- else if (isContentBinary(headers)) {
16
- download(data, name);
17
- }
18
- else {
19
- download(atob(data), name);
20
- }
21
- };
22
- export const fileDownloadVar = (content, type, name, extension) => {
23
- if (type === 'FILE' || type === undefined) {
24
- fileDownload(content.data, name, extension, content.headers);
25
- }
26
- else if (type === 'URL') {
27
- let { data } = content;
28
- if (!/^(http|https):\/\//.test(data)) {
29
- data = `//${data}`;
30
- }
31
- window.open(content.data, '_blank');
32
- }
33
- else if (type === 'EMAIL') {
34
- // Temp Fix: for EMAIL type attachment
35
- fileDownload(content.data, name, 'html', content.headers);
36
- }
37
- };
38
- export const useFileDownload = context => {
39
- return useCallback(({ ID, name, extension, type, category, responseType }) => {
40
- if (category !== 'pxDocument') {
41
- PCore.getAttachmentUtils()
42
- .downloadAttachment(ID, context, responseType)
43
- .then(content => {
44
- fileDownloadVar(content, type, name, extension);
45
- })
46
- .catch(console.error);
47
- }
48
- else {
49
- PCore.getAttachmentUtils()
50
- // @ts-expect-error
51
- .downloadDocument(ID, context, responseType)
52
- .then(content => {
53
- fileDownloadVar(content, type, name, extension);
54
- })
55
- .catch(console.error);
56
- }
57
- }, [context]);
58
- };
59
- export const getIconFromFileType = (fileType) => {
60
- let icon = 'document-doc';
61
- if (!fileType)
62
- return icon;
63
- if (fileType.startsWith('audio')) {
64
- icon = 'audio';
65
- }
66
- else if (fileType.startsWith('video')) {
67
- icon = 'video';
68
- }
69
- else if (fileType.startsWith('image')) {
70
- icon = 'picture';
71
- }
72
- else if (fileType.includes('pdf')) {
73
- icon = 'document-pdf';
74
- }
75
- else {
76
- const [, subtype] = fileType.split('/');
77
- const foundMatch = sources => {
78
- return sources.some(key => subtype.includes(key));
79
- };
80
- if (foundMatch(['excel', 'spreadsheet'])) {
81
- icon = 'document-xls';
82
- }
83
- else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {
84
- icon = 'document-compress';
85
- }
86
- }
87
- return icon;
88
- };
89
- export const validateMaxSize = (fileObj, maxSizeInMB) => {
90
- const fileSize = (fileObj.size / 1048576).toFixed(2);
91
- return parseFloat(fileSize) < parseFloat(maxSizeInMB);
92
- };
93
- export const isFileUploadedToServer = file => file.responseProps && !file.responseProps.ID?.includes('temp');
94
- //# sourceMappingURL=attachmentHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachmentHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/attachmentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,EAAE;IACvC,OAAO,OAAO,IAAI,OAAO,CAAC,2BAA2B,CAAC,KAAK,QAAQ,CAAC;AACtE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,EAAE;IACvC,OAAO,OAAO,IAAI,OAAO,CAAC,2BAA2B,CAAC,KAAK,QAAQ,CAAC;AACtE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAC3D,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IACnD,2DAA2D;IAC3D,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QACnB,QAAQ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QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,IAAI,GAAG,cAAc,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,UAAU,GAAG,OAAO,CAAC,EAAE;YAC3B,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,CAAC,CAAC;QAEF,IAAI,UAAU,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC;YACzC,IAAI,GAAG,cAAc,CAAC;QACxB,CAAC;aAAM,IAAI,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;YACnE,IAAI,GAAG,mBAAmB,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAY,EAAE,WAAmB,EAAW,EAAE;IAC5E,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport download from 'downloadjs';\n\nexport const isContentBinary = headers => {\n return headers && headers['content-transfer-encoding'] === 'binary';\n};\n\nexport const isContentBase64 = headers => {\n return headers && headers['content-transfer-encoding'] === 'base64';\n};\n\nexport const fileDownload = (data, fileName, ext, headers) => {\n const name = ext ? `${fileName}.${ext}` : fileName;\n // Temp fix: downloading EMAIl type attachment as html file\n if (ext === 'html') {\n download(isContentBase64(headers) ? atob(data) : data, name, 'text/html');\n } else if (isContentBinary(headers)) {\n download(data, name);\n } else {\n download(atob(data), name);\n }\n};\n\nexport const fileDownloadVar = (content, type, name, extension) => {\n if (type === 'FILE' || type === undefined) {\n fileDownload(content.data, name, extension, content.headers);\n } else if (type === 'URL') {\n let { data } = content;\n if (!/^(http|https):\\/\\//.test(data)) {\n data = `//${data}`;\n }\n window.open(content.data, '_blank');\n } else if (type === 'EMAIL') {\n // Temp Fix: for EMAIL type attachment\n fileDownload(content.data, name, 'html', content.headers);\n }\n};\n\nexport const useFileDownload = context => {\n return useCallback(\n ({ ID, name, extension, type, category, responseType }) => {\n if (category !== 'pxDocument') {\n PCore.getAttachmentUtils()\n .downloadAttachment(ID, context, responseType)\n .then(content => {\n fileDownloadVar(content, type, name, extension);\n })\n\n .catch(console.error);\n } else {\n PCore.getAttachmentUtils()\n // @ts-expect-error\n .downloadDocument(ID, context, responseType)\n .then(content => {\n fileDownloadVar(content, type, name, extension);\n })\n\n .catch(console.error);\n }\n },\n [context]\n );\n};\n\nexport const getIconFromFileType = (fileType): string => {\n let icon = 'document-doc';\n if (!fileType) return icon;\n if (fileType.startsWith('audio')) {\n icon = 'audio';\n } else if (fileType.startsWith('video')) {\n icon = 'video';\n } else if (fileType.startsWith('image')) {\n icon = 'picture';\n } else if (fileType.includes('pdf')) {\n icon = 'document-pdf';\n } else {\n const [, subtype] = fileType.split('/');\n const foundMatch = sources => {\n return sources.some(key => subtype.includes(key));\n };\n\n if (foundMatch(['excel', 'spreadsheet'])) {\n icon = 'document-xls';\n } else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {\n icon = 'document-compress';\n }\n }\n\n return icon;\n};\n\nexport const validateMaxSize = (fileObj: any, maxSizeInMB: string): boolean => {\n const fileSize = (fileObj.size / 1048576).toFixed(2);\n return parseFloat(fileSize) < parseFloat(maxSizeInMB);\n};\n\nexport const isFileUploadedToServer = file => file.responseProps && !file.responseProps.ID?.includes('temp');\n"]}