@equinor/echo-components 0.8.3 → 0.8.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.
- package/README.md +4 -4
- package/index.cjs.js +1 -1
- package/package.json +1 -1
- package/src/__mocks__/notificationItem.d.ts +4 -0
- package/src/components/contextMenu/ContextMenu.d.ts +3 -0
- package/src/components/index.d.ts +2 -0
- package/src/components/notificationListItem/NotificationListItem.d.ts +10 -0
- package/src/components/subseaStatusLabel/SubseaStatusLabel.d.ts +5 -0
- package/src/elements/index.d.ts +2 -0
- package/src/elements/tagIcon/TagIcon.d.ts +1 -1
- package/src/elements/tagIcon/TagIconWithChips.d.ts +14 -0
- package/src/types/colorMap.d.ts +4 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/notificationItem.d.ts +12 -0
- package/src/types/workOrderItem.d.ts +0 -4
- package/src/utils/colors.d.ts +4 -0
- package/src/utils/index.d.ts +2 -0
- package/src/utils/notification.d.ts +2 -0
- package/src/utils/workorder.d.ts +1 -3
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { TagIconChipsProps } from '../../elements/tagIcon/TagIconWithChips';
|
|
3
|
+
export type StatusChipsProps = Omit<TagIconChipsProps, 'icon' | 'legendColor'>;
|
|
2
4
|
interface ContextMenuProps {
|
|
3
5
|
icon: JSX.Element;
|
|
4
6
|
legendColor: string;
|
|
@@ -11,6 +13,7 @@ interface ContextMenuProps {
|
|
|
11
13
|
selectedClassName?: string;
|
|
12
14
|
selected: boolean;
|
|
13
15
|
children?: React.ReactNode;
|
|
16
|
+
statusChips?: StatusChipsProps;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* Component that renders full context menu functionality, meant for displaying tag context menu.
|
|
@@ -22,7 +22,9 @@ export * from './searchBar';
|
|
|
22
22
|
export * from './sidebarButton/SidebarButton';
|
|
23
23
|
export * from './sidesheet';
|
|
24
24
|
export * from './splitView';
|
|
25
|
+
export * from './subseaStatusLabel/SubseaStatusLabel';
|
|
25
26
|
export * from './tagContextMenu/TagContextMenu';
|
|
26
27
|
export * from './timePicker/TimePicker';
|
|
27
28
|
export * from './workOrderListItem/WorkOrderListItem';
|
|
28
29
|
export * from './workOrderListItem/WorkOrderStatusLabel';
|
|
30
|
+
export * from './notificationListItem/NotificationListItem';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NotificationItem } from '../../types';
|
|
3
|
+
export interface NotificationListItemProps {
|
|
4
|
+
notification: NotificationItem;
|
|
5
|
+
onCardClick?: () => void;
|
|
6
|
+
itemAction?: React.ReactNode;
|
|
7
|
+
isHeader?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function NotificationListItem(props: NotificationListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { NotificationListItem };
|
package/src/elements/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export * from './roundIconButton/RoundIconButton';
|
|
|
5
5
|
export { SliderField } from './sliderField/SliderField';
|
|
6
6
|
export { TagIcon } from './tagIcon/TagIcon';
|
|
7
7
|
export { TagIconShadowWrapper } from './tagIcon/TagIconShadow';
|
|
8
|
+
export { TagIconWithChips } from './tagIcon/TagIconWithChips';
|
|
9
|
+
export type { ChipProps, TagIconChipsProps } from './tagIcon/TagIconWithChips';
|
|
8
10
|
export * from './textIconButton/TextIconButton';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChipsProps {
|
|
3
|
+
icon: JSX.Element;
|
|
4
|
+
legendColor: string;
|
|
5
|
+
chips: ChipProps[];
|
|
6
|
+
}
|
|
7
|
+
export interface TagIconChipsProps extends ChipsProps {
|
|
8
|
+
isChipsEnabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ChipProps {
|
|
11
|
+
title: string;
|
|
12
|
+
color: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TagIconWithChips: React.FC<TagIconChipsProps>;
|
package/src/types/index.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface NotificationItem {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
planningPlant?: string;
|
|
7
|
+
mainWorkCenter?: string;
|
|
8
|
+
requiredEndDateTime?: Date;
|
|
9
|
+
requiredEndDateStatus?: string;
|
|
10
|
+
requiredEndDateStatusDescription?: string;
|
|
11
|
+
failureImpact?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ColorMap } from "../types/colorMap";
|
|
2
|
+
declare function setRequiredEndDateColor(requiredEndDateStatus: string | undefined): ColorMap;
|
|
3
|
+
declare function setfailureImpactColor(failureImpactStatus: string | undefined): ColorMap;
|
|
4
|
+
export { setRequiredEndDateColor, setfailureImpactColor };
|
package/src/utils/index.d.ts
CHANGED
package/src/utils/workorder.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { RequiredEndDateColor } from '../types';
|
|
2
1
|
declare function setWorkOrderIconName(type: string): "workorders_pm01" | "workorders_pm02" | "workorders_pm03" | "workorders_pm04" | "workorders_pm05" | "workorders_pm06" | "workorders_pm10" | "workorders_pm15" | "workorders_pm20" | "workorders_main_group";
|
|
3
|
-
|
|
4
|
-
export { setRequiredEndDateColor, setWorkOrderIconName };
|
|
2
|
+
export { setWorkOrderIconName };
|