@orchestrator-ui/orchestrator-ui-components 2.11.1 → 2.13.0

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 (39) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/.turbo/turbo-test.log +9 -9
  4. package/CHANGELOG.md +26 -0
  5. package/dist/index.d.ts +90 -61
  6. package/dist/index.js +1769 -1717
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +46 -23
  10. package/src/components/WfoBadges/WfoFailedTasksBadge/styles.ts +10 -0
  11. package/src/components/WfoForms/UserInputForm.tsx +6 -2
  12. package/src/components/WfoForms/formFields/BoolFieldStyling.ts +0 -4
  13. package/src/components/WfoInlineNoteEdit/WfoInlineNoteEdit.tsx +5 -6
  14. package/src/components/WfoSubscription/WfoInUseByRelations.tsx +1 -0
  15. package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx +1 -1
  16. package/src/components/WfoSubscription/styles.ts +16 -11
  17. package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +14 -3
  18. package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +22 -16
  19. package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +10 -4
  20. package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/WfoSortDirectionIcon.tsx +5 -11
  21. package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/styles.ts +1 -0
  22. package/src/components/WfoTable/WfoTable/styles.ts +6 -0
  23. package/src/configuration/version.ts +1 -1
  24. package/src/contexts/WfoErrorMonitoringProvider.tsx +37 -0
  25. package/src/contexts/index.ts +1 -0
  26. package/src/hooks/index.ts +1 -0
  27. package/src/hooks/useWfoErrorMonitoring.ts +6 -0
  28. package/src/icons/heroicons/WfoArrowDown.tsx +27 -0
  29. package/src/icons/heroicons/WfoArrowUp.tsx +27 -0
  30. package/src/icons/heroicons/WfoArrowsUpDown.tsx +2 -2
  31. package/src/icons/heroicons/WfoHeroIconsWrapper.tsx +12 -19
  32. package/src/icons/heroicons/index.ts +2 -0
  33. package/src/icons/index.ts +0 -2
  34. package/src/rtk/endpoints/streamMessages.ts +1 -1
  35. package/src/utils/getDefaultTableConfig.ts +1 -0
  36. package/src/icons/WfoArrowNarrowDown.stories.tsx +0 -13
  37. package/src/icons/WfoArrowNarrowDown.tsx +0 -35
  38. package/src/icons/WfoArrowNarrowUp.stories.tsx +0 -13
  39. package/src/icons/WfoArrowNarrowUp.tsx +0 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "2.11.1",
3
+ "version": "2.13.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -1,18 +1,20 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
 
3
3
  import { useTranslations } from 'next-intl';
4
+ import Link from 'next/link';
4
5
 
5
6
  import { EuiToolTip } from '@elastic/eui';
6
7
 
7
- import { WfoHeaderBadge } from '@/components';
8
- import { useOrchestratorTheme } from '@/hooks';
9
- import { WfoCheckmarkCircleFill } from '@/icons';
10
- import { WfoXCircleFill } from '@/icons';
8
+ import { PATH_TASKS, WfoHeaderBadge } from '@/components';
9
+ import { useOrchestratorTheme, useWithOrchestratorTheme } from '@/hooks';
10
+ import { WfoCheckmarkCircleFill, WfoXCircleFill } from '@/icons';
11
11
  import {
12
12
  ProcessStatusCounts,
13
13
  useProcessStatusCountsQuery,
14
14
  } from '@/rtk/endpoints/processStatusCounts';
15
15
 
16
+ import { getTasksBadgeStyles } from './styles';
17
+
16
18
  type TaskCountsSummary = {
17
19
  failed: number;
18
20
  inconsistentData: number;
@@ -36,9 +38,22 @@ const getTaskCountsSummary = (
36
38
  };
37
39
  };
38
40
 
41
+ const WfoTasksLink = ({ children }: { children: ReactNode }) => (
42
+ <Link
43
+ href={`${PATH_TASKS}`}
44
+ onClick={(e) => {
45
+ e.currentTarget.blur();
46
+ }}
47
+ >
48
+ {children}
49
+ </Link>
50
+ );
51
+
39
52
  export const WfoFailedTasksBadge = () => {
40
53
  const t = useTranslations('common');
41
54
  const { theme } = useOrchestratorTheme();
55
+ const { failedTaskBadgeStyle } =
56
+ useWithOrchestratorTheme(getTasksBadgeStyles);
42
57
  const { data: processStatusCounts } = useProcessStatusCountsQuery();
43
58
 
44
59
  const taskCountsSummary = getTaskCountsSummary(processStatusCounts);
@@ -60,15 +75,18 @@ export const WfoFailedTasksBadge = () => {
60
75
  </>
61
76
  }
62
77
  >
63
- <WfoHeaderBadge
64
- color={theme.colors.ghost}
65
- textColor={theme.colors.shadow}
66
- iconType={() => (
67
- <WfoXCircleFill color={theme.colors.danger} />
68
- )}
69
- >
70
- {taskCountsSummary.total}
71
- </WfoHeaderBadge>
78
+ <WfoTasksLink>
79
+ <WfoHeaderBadge
80
+ css={failedTaskBadgeStyle}
81
+ color={theme.colors.ghost}
82
+ textColor={theme.colors.shadow}
83
+ iconType={() => (
84
+ <WfoXCircleFill color={theme.colors.danger} />
85
+ )}
86
+ >
87
+ {taskCountsSummary.total}
88
+ </WfoHeaderBadge>
89
+ </WfoTasksLink>
72
90
  </EuiToolTip>
73
91
  );
74
92
  } else {
@@ -81,15 +99,20 @@ export const WfoFailedTasksBadge = () => {
81
99
  </>
82
100
  }
83
101
  >
84
- <WfoHeaderBadge
85
- color={theme.colors.ghost}
86
- textColor={theme.colors.shadow}
87
- iconType={() => (
88
- <WfoCheckmarkCircleFill color={theme.colors.success} />
89
- )}
90
- >
91
- 0
92
- </WfoHeaderBadge>
102
+ <WfoTasksLink>
103
+ <WfoHeaderBadge
104
+ css={failedTaskBadgeStyle}
105
+ color={theme.colors.ghost}
106
+ textColor={theme.colors.shadow}
107
+ iconType={() => (
108
+ <WfoCheckmarkCircleFill
109
+ color={theme.colors.success}
110
+ />
111
+ )}
112
+ >
113
+ 0
114
+ </WfoHeaderBadge>
115
+ </WfoTasksLink>
93
116
  </EuiToolTip>
94
117
  );
95
118
  }
@@ -0,0 +1,10 @@
1
+ import { css } from '@emotion/react';
2
+
3
+ export const getTasksBadgeStyles = () => {
4
+ const failedTaskBadgeStyle = css({
5
+ cursor: 'pointer',
6
+ '&:hover': { textDecoration: 'underline' },
7
+ });
8
+
9
+ return { failedTaskBadgeStyle };
10
+ };
@@ -34,7 +34,7 @@ import {
34
34
  } from '@elastic/eui';
35
35
 
36
36
  import { ConfirmDialogHandler, ConfirmationDialogContext } from '@/contexts';
37
- import { useOrchestratorTheme } from '@/hooks';
37
+ import { useOrchestratorTheme, useWfoErrorMonitoring } from '@/hooks';
38
38
  import { WfoPlayFill } from '@/icons';
39
39
  import { FormValidationError, ValidationError } from '@/types/forms';
40
40
 
@@ -429,6 +429,7 @@ export function WfoUserInputForm({
429
429
  const [processing, setProcessing] = useState<boolean>(false);
430
430
  const [nrOfValidationErrors, setNrOfValidationErrors] = useState<number>(0);
431
431
  const [rootErrors, setRootErrors] = useState<string[]>([]);
432
+ const { reportError } = useWfoErrorMonitoring();
432
433
 
433
434
  const openLeavePageDialog = (
434
435
  leaveAction: ConfirmDialogHandler,
@@ -457,7 +458,7 @@ export function WfoUserInputForm({
457
458
  await validSubmit(userInput);
458
459
  setProcessing(false);
459
460
  return null;
460
- } catch (error: unknown) {
461
+ } catch (error) {
461
462
  setProcessing(false);
462
463
  if (typeof error === 'object' && error !== null) {
463
464
  const validationError = error as FormValidationError;
@@ -485,6 +486,9 @@ export function WfoUserInputForm({
485
486
  }
486
487
  // Let the error escape, so it can be caught by our own onerror handler instead of being silenced by uniforms
487
488
  setTimeout(() => {
489
+ reportError(
490
+ new Error(`Forms error: ${JSON.stringify({ error })}`),
491
+ );
488
492
  throw error;
489
493
  }, 0);
490
494
 
@@ -12,10 +12,6 @@ export const boolFieldStyling = css`
12
12
  z-index: unset;
13
13
  }
14
14
 
15
- input[type="checkbox"] {
16
- display: none;
17
- }
18
-
19
15
  label {
20
16
  display: inline-block;
21
17
  margin: 3px 0;
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import type { ChangeEvent, FC } from 'react';
3
3
 
4
4
  import { EuiInlineEditText } from '@elastic/eui';
@@ -20,8 +20,7 @@ export const WfoInlineNoteEdit: FC<WfoInlineNoteEditProps> = ({
20
20
  onlyShowOnHover = false,
21
21
  }) => {
22
22
  const { theme } = useOrchestratorTheme();
23
- const initialNote = useMemo(() => value || '', [value]);
24
- const [note, setNote] = useState<string>(initialNote);
23
+ const [note, setNote] = useState<string>(value ?? '');
25
24
  const [isTooltipVisible, setIsTooltipVisible] = useState<boolean>(true);
26
25
 
27
26
  const [startProcess] = useStartProcessMutation();
@@ -42,15 +41,15 @@ export const WfoInlineNoteEdit: FC<WfoInlineNoteEditProps> = ({
42
41
  };
43
42
 
44
43
  const handleCancel = () => {
45
- setNote(initialNote);
44
+ setNote(value ?? '');
46
45
  setIsTooltipVisible(true);
47
46
  };
48
47
 
49
48
  // This useEffect makes sure the note is updated when a new value property is passed in
50
49
  // for example by a parent component that is update through a websocket event
51
50
  useEffect(() => {
52
- setNote(initialNote);
53
- }, [initialNote]);
51
+ setNote(value ?? '');
52
+ }, [value]);
54
53
 
55
54
  return (
56
55
  <div
@@ -52,6 +52,7 @@ export const WfoInUseByRelations = ({
52
52
  value: (
53
53
  <WfoFirstPartUUID
54
54
  UUID={inUseByRelationDetails.subscriptionId}
55
+ showCopyIcon={false}
55
56
  />
56
57
  ),
57
58
  textToCopy: inUseByRelationDetails.subscriptionId,
@@ -34,7 +34,7 @@ interface WfoSubscriptionProductBlockProps {
34
34
  subscriptionId: Subscription['subscriptionId'];
35
35
  }
36
36
 
37
- export const HIDDEN_KEYS = ['title', 'name', 'label'];
37
+ export const HIDDEN_KEYS = ['title', 'name', 'label', 'inUseByIds'];
38
38
 
39
39
  export const WfoSubscriptionProductBlock = ({
40
40
  productBlock,
@@ -34,18 +34,23 @@ export const getSubscriptionDetailStyles = ({ theme }: WfoTheme) => {
34
34
  });
35
35
  const workflowTargetStyle = css({ fontWeight: theme.font.weight.bold });
36
36
 
37
- const lastContentCellStyle = css({
38
- ...contentCellStyle,
39
- border: 0,
40
- });
37
+ const lastContentCellStyle = css([
38
+ {
39
+ ...contentCellStyle,
40
+ },
41
+ {
42
+ borderBottom: 0,
43
+ },
44
+ ]);
41
45
 
42
- const lastHeaderCellStyle = css({
43
- padding: theme.base,
44
- paddingLeft: 0,
45
- width: 250,
46
- fontWeight: theme.font.weight.medium,
47
- border: 0,
48
- });
46
+ const lastHeaderCellStyle = css([
47
+ {
48
+ ...headerCellStyle,
49
+ },
50
+ {
51
+ borderBottomWidth: 0,
52
+ },
53
+ ]);
49
54
 
50
55
  const inUseByRelationDetailsStyle = css({
51
56
  borderColor: theme.colors.lightShade,
@@ -10,6 +10,7 @@ import {
10
10
  Pagination,
11
11
  WfoDateTime,
12
12
  WfoInlineJson,
13
+ WfoInlineNoteEdit,
13
14
  WfoInsyncIcon,
14
15
  WfoJsonCodeBlock,
15
16
  WfoSubscriptionStatusBadge,
@@ -80,6 +81,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
80
81
  subscriptionId: {
81
82
  columnType: ColumnType.DATA,
82
83
  label: t('id'),
84
+ width: '100px',
83
85
  renderData: (value) => <WfoFirstPartUUID UUID={value} />,
84
86
  renderDetails: (value) => value,
85
87
  renderTooltip: (value) => value,
@@ -87,7 +89,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
87
89
  description: {
88
90
  columnType: ColumnType.DATA,
89
91
  label: t('description'),
90
- width: '400px',
92
+ width: '500px',
91
93
  renderData: (value, record) => (
92
94
  <Link href={`/subscriptions/${record.subscriptionId}`}>
93
95
  {value}
@@ -98,6 +100,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
98
100
  status: {
99
101
  columnType: ColumnType.DATA,
100
102
  label: t('status'),
103
+ width: '120px',
101
104
  renderData: (value) => (
102
105
  <WfoSubscriptionStatusBadge status={value} />
103
106
  ),
@@ -105,6 +108,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
105
108
  insync: {
106
109
  columnType: ColumnType.DATA,
107
110
  label: t('insync'),
111
+ width: '80px',
108
112
  renderData: (value) => <WfoInsyncIcon inSync={value} />,
109
113
  },
110
114
  productName: {
@@ -119,7 +123,6 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
119
123
  customerFullname: {
120
124
  columnType: ColumnType.DATA,
121
125
  label: t('customerFullname'),
122
- width: '150px',
123
126
  },
124
127
  customerShortcode: {
125
128
  columnType: ColumnType.DATA,
@@ -129,6 +132,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
129
132
  startDate: {
130
133
  columnType: ColumnType.DATA,
131
134
  label: t('startDate'),
135
+ width: '120px',
132
136
  renderData: (value) => <WfoDateTime dateOrIsoString={value} />,
133
137
  renderDetails: parseDateToLocaleDateTimeString,
134
138
  clipboardText: parseDateToLocaleDateTimeString,
@@ -137,6 +141,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
137
141
  endDate: {
138
142
  columnType: ColumnType.DATA,
139
143
  label: t('endDate'),
144
+ width: '120px',
140
145
  renderData: (value) => <WfoDateTime dateOrIsoString={value} />,
141
146
  renderDetails: parseDateToLocaleDateTimeString,
142
147
  clipboardText: parseDateToLocaleDateTimeString,
@@ -145,7 +150,13 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
145
150
  note: {
146
151
  columnType: ColumnType.DATA,
147
152
  label: t('note'),
148
- width: '100px',
153
+ renderData: (cellValue, row) => (
154
+ <WfoInlineNoteEdit
155
+ subscriptionId={row.subscriptionId}
156
+ value={cellValue}
157
+ onlyShowOnHover={true}
158
+ />
159
+ ),
149
160
  },
150
161
  metadata: {
151
162
  columnType: ColumnType.DATA,
@@ -10,30 +10,36 @@ import { COPY_ICON_CLASS, getStyles } from './styles';
10
10
 
11
11
  export type WfoFirstUUIDPartProps = {
12
12
  UUID: string;
13
+ showCopyIcon?: boolean;
13
14
  };
14
15
 
15
- export const WfoFirstPartUUID: FC<WfoFirstUUIDPartProps> = ({ UUID }) => {
16
+ export const WfoFirstPartUUID: FC<WfoFirstUUIDPartProps> = ({
17
+ UUID,
18
+ showCopyIcon = true,
19
+ }) => {
16
20
  const { uuidFieldStyle, clickable } = useWithOrchestratorTheme(getStyles);
17
21
  const { theme } = useOrchestratorTheme();
18
22
 
19
23
  return (
20
24
  <span css={uuidFieldStyle}>
21
25
  {getFirstUuidPart(UUID)}
22
- <EuiCopy textToCopy={UUID}>
23
- {(copy) => (
24
- <div
25
- className={COPY_ICON_CLASS}
26
- onClick={copy}
27
- css={clickable}
28
- >
29
- <WfoClipboardCopy
30
- width={16}
31
- height={16}
32
- color={theme.colors.mediumShade}
33
- />
34
- </div>
35
- )}
36
- </EuiCopy>
26
+ {showCopyIcon && (
27
+ <EuiCopy textToCopy={UUID}>
28
+ {(copy) => (
29
+ <div
30
+ className={COPY_ICON_CLASS}
31
+ onClick={copy}
32
+ css={clickable}
33
+ >
34
+ <WfoClipboardCopy
35
+ width={16}
36
+ height={16}
37
+ color={theme.colors.mediumShade}
38
+ />
39
+ </div>
40
+ )}
41
+ </EuiCopy>
42
+ )}
37
43
  </span>
38
44
  );
39
45
  };
@@ -29,8 +29,14 @@ export const WfoTableDataRows = <T extends object>({
29
29
  onRowClick,
30
30
  className,
31
31
  }: WfoTableDataRowsProps<T>) => {
32
- const { cellStyle, rowStyle, dataRowStyle, clickableStyle, setWidth } =
33
- useWithOrchestratorTheme(getWfoTableStyles);
32
+ const {
33
+ cellStyle,
34
+ cellContentStyle,
35
+ rowStyle,
36
+ dataRowStyle,
37
+ clickableStyle,
38
+ setWidth,
39
+ } = useWithOrchestratorTheme(getWfoTableStyles);
34
40
 
35
41
  const sortedVisibleColumns = getSortedVisibleColumns(
36
42
  columnConfig,
@@ -70,7 +76,7 @@ export const WfoTableDataRows = <T extends object>({
70
76
  setWidth(columnConfig.width),
71
77
  ]}
72
78
  >
73
- <div>
79
+ <div css={cellContentStyle}>
74
80
  {columnConfig.renderControl(row)}
75
81
  </div>
76
82
  </td>
@@ -91,7 +97,7 @@ export const WfoTableDataRows = <T extends object>({
91
97
  setWidth(columnConfig.width),
92
98
  ]}
93
99
  >
94
- <div>
100
+ <div css={cellContentStyle}>
95
101
  <WfoDataCell
96
102
  customTooltip={columnConfig.renderTooltip?.(
97
103
  result,
@@ -1,7 +1,7 @@
1
1
  import React, { FC } from 'react';
2
2
 
3
3
  import { useOrchestratorTheme } from '@/hooks';
4
- import { WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsUpDown } from '@/icons';
4
+ import { WfoArrowDown, WfoArrowUp, WfoArrowsUpDown } from '@/icons';
5
5
  import { SortOrder } from '@/types';
6
6
 
7
7
  import { SORTABLE_ICON_CLASS } from './styles';
@@ -18,6 +18,8 @@ export const WfoSortDirectionIcon: FC<WfoSortDirectionIconProps> = ({
18
18
  if (!sortDirection) {
19
19
  return (
20
20
  <WfoArrowsUpDown
21
+ height={16}
22
+ width={16}
21
23
  className={SORTABLE_ICON_CLASS}
22
24
  css={{ visibility: 'hidden' }}
23
25
  color={theme.colors.subduedText}
@@ -26,16 +28,8 @@ export const WfoSortDirectionIcon: FC<WfoSortDirectionIconProps> = ({
26
28
  }
27
29
 
28
30
  return sortDirection === SortOrder.ASC ? (
29
- <WfoArrowNarrowUp
30
- color={theme.colors.subduedText}
31
- height={24}
32
- width={24}
33
- />
31
+ <WfoArrowUp color={theme.colors.subduedText} />
34
32
  ) : (
35
- <WfoArrowNarrowDown
36
- color={theme.colors.subduedText}
37
- height={24}
38
- width={24}
39
- />
33
+ <WfoArrowDown color={theme.colors.subduedText} />
40
34
  );
41
35
  };
@@ -116,6 +116,7 @@ export const getWfoBasicTableStyles = ({ theme }: WfoTheme) => {
116
116
  });
117
117
 
118
118
  const sortButtonStyle = css({
119
+ paddingLeft: theme.size.xxs,
119
120
  display: 'flex',
120
121
  flex: '0 0 auto',
121
122
  alignItems: 'center',
@@ -83,6 +83,7 @@ export const getWfoTableStyles = ({ theme }: WfoTheme) => {
83
83
  });
84
84
 
85
85
  const headerCellStyle = css({
86
+ paddingRight: 0,
86
87
  [`&:hover`]: {
87
88
  [`.${SORTABLE_ICON_CLASS}`]: {
88
89
  visibility: 'visible',
@@ -100,6 +101,10 @@ export const getWfoTableStyles = ({ theme }: WfoTheme) => {
100
101
  verticalAlign: 'middle',
101
102
  });
102
103
 
104
+ const cellContentStyle = css({
105
+ display: 'inline-block',
106
+ });
107
+
103
108
  const emptyTableMessageStyle = css({
104
109
  textAlign: 'center',
105
110
  });
@@ -127,6 +132,7 @@ export const getWfoTableStyles = ({ theme }: WfoTheme) => {
127
132
  expandedRowStyle,
128
133
  headerCellStyle,
129
134
  cellStyle,
135
+ cellContentStyle,
130
136
  emptyTableMessageStyle,
131
137
  clickableStyle,
132
138
  setWidth,
@@ -1 +1 @@
1
- export const ORCHESTRATOR_UI_LIBRARY_VERSION = '2.11.1';
1
+ export const ORCHESTRATOR_UI_LIBRARY_VERSION = '2.13.0';
@@ -0,0 +1,37 @@
1
+ import React, { FC, ReactNode, createContext } from 'react';
2
+
3
+ export type WfoErrorMonitoring = {
4
+ reportError: (error: Error | string) => void;
5
+ reportMessage: (message: string) => void;
6
+ };
7
+
8
+ export const emptyWfoErrorMonitoring: WfoErrorMonitoring = {
9
+ reportError: () => {},
10
+ reportMessage: () => {},
11
+ };
12
+
13
+ export const WfoErrorMonitoringContext = createContext<WfoErrorMonitoring>(
14
+ emptyWfoErrorMonitoring,
15
+ );
16
+
17
+ export type WfoErrorMonitoringProviderProps = {
18
+ errorMonitoringHandler?: WfoErrorMonitoring;
19
+ children: ReactNode;
20
+ };
21
+
22
+ /**
23
+ *
24
+ * @param errorMonitoringHandler for implementing the error monitoring. When not provided, all report calls are no-ops.
25
+ * @param children
26
+ */
27
+ export const WfoErrorMonitoringProvider: FC<
28
+ WfoErrorMonitoringProviderProps
29
+ > = ({ errorMonitoringHandler, children }) => {
30
+ return (
31
+ <WfoErrorMonitoringContext.Provider
32
+ value={errorMonitoringHandler ?? emptyWfoErrorMonitoring}
33
+ >
34
+ {children}
35
+ </WfoErrorMonitoringContext.Provider>
36
+ );
37
+ };
@@ -2,3 +2,4 @@ export * from './ConfirmationDialogProvider';
2
2
  export * from './OrchestratorConfigContext';
3
3
  export * from './PolicyContext';
4
4
  export * from './TreeContext';
5
+ export * from './WfoErrorMonitoringProvider';
@@ -6,5 +6,6 @@ export * from './useDataDisplayParams';
6
6
  export * from './useShowToastMessage';
7
7
  export * from './useStoredTableConfig';
8
8
  export * from './useWithOrchestratorTheme';
9
+ export * from './useWfoErrorMonitoring';
9
10
  export * from './useWfoSession';
10
11
  export * from './useGetOrchestratorConfig';
@@ -0,0 +1,6 @@
1
+ import { useContext } from 'react';
2
+
3
+ import { WfoErrorMonitoringContext } from '@/contexts';
4
+
5
+ export const useWfoErrorMonitoring = () =>
6
+ useContext(WfoErrorMonitoringContext);
@@ -0,0 +1,27 @@
1
+ import React, { FC } from 'react';
2
+
3
+ import { WfoIconProps } from '@/icons/WfoIconProps';
4
+
5
+ import { withWfoHeroIconsWrapper } from './WfoHeroIconsWrapper';
6
+
7
+ export const WfoArrowDownSvg: FC<WfoIconProps> = ({
8
+ width = 12,
9
+ height = 14,
10
+ color = 'currentColor',
11
+ }) => (
12
+ <svg
13
+ width={width}
14
+ height={height}
15
+ viewBox="4 3 12 14"
16
+ fill={color}
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ >
19
+ <path
20
+ fillRule="evenodd"
21
+ d="M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z"
22
+ clipRule="evenodd"
23
+ />
24
+ </svg>
25
+ );
26
+
27
+ export const WfoArrowDown = withWfoHeroIconsWrapper(WfoArrowDownSvg);
@@ -0,0 +1,27 @@
1
+ import React, { FC } from 'react';
2
+
3
+ import { WfoIconProps } from '@/icons/WfoIconProps';
4
+
5
+ import { withWfoHeroIconsWrapper } from './WfoHeroIconsWrapper';
6
+
7
+ export const WfoArrowUpSvg: FC<WfoIconProps> = ({
8
+ width = 12,
9
+ height = 14,
10
+ color = 'currentColor',
11
+ }) => (
12
+ <svg
13
+ width={width}
14
+ height={height}
15
+ viewBox="4 3 12 14"
16
+ fill={color}
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ >
19
+ <path
20
+ fillRule="evenodd"
21
+ d="M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z"
22
+ clipRule="evenodd"
23
+ />
24
+ </svg>
25
+ );
26
+
27
+ export const WfoArrowUp = withWfoHeroIconsWrapper(WfoArrowUpSvg);
@@ -7,12 +7,12 @@ import { withWfoHeroIconsWrapper } from './WfoHeroIconsWrapper';
7
7
  const WfoArrowsUpDownSvg: FC<WfoIconProps> = ({
8
8
  width = 20,
9
9
  height = 20,
10
- color = '#000000',
10
+ color = 'currentColor',
11
11
  }) => (
12
12
  <svg
13
13
  width={width}
14
14
  height={height}
15
- viewBox="0 0 24 24"
15
+ viewBox="2 2 20 20"
16
16
  fill={color}
17
17
  xmlns="http://www.w3.org/2000/svg"
18
18
  >