@equinor/echo-framework 0.20.13 → 0.20.15-beta-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.
- package/{47deeba42768c5d1.svg → 063009f06499d102.svg} +8 -8
- package/README.md +28 -28
- package/{1bd97dd2170d0f64.svg → f4c85313e79b1662.svg} +850 -850
- package/index.cjs.d.ts +2 -2
- package/index.cjs.js +1 -1
- package/package.json +8 -7
- package/src/lib/components/prepview/Prepview.d.ts +13 -11
- package/src/lib/components/prepview/colors/ColorMapping.d.ts +37 -0
- package/src/lib/components/prepview/colors/Styles.d.ts +22 -0
- package/src/lib/components/prepview/colors/index.d.ts +1 -0
- package/src/lib/components/prepview/common/index.d.ts +0 -1
- package/src/lib/components/prepview/context/PrepviewContext.d.ts +10 -8
- package/src/lib/components/prepview/notification/header/NotificationHeader.d.ts +1 -1
- package/src/lib/components/prepview/types/shared.d.ts +17 -1
- package/src/lib/components/prepview/types/workorder.d.ts +9 -0
- package/src/lib/components/prepview/workorder/WorkOrder.d.ts +1 -2
- package/src/lib/components/prepview/workorder/header/WorkOrderHeader.d.ts +1 -2
- package/src/lib/components/verticalTabsSplitView/VerticalTabsSplitView.d.ts +1 -0
- package/src/lib/services/dataLayerPanel/dataLayerPanel.store.d.ts +4 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.15-beta-0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@equinor/echo-base": "
|
|
6
|
-
"@equinor/echo-components": "
|
|
7
|
-
"@equinor/echo-core": "
|
|
8
|
-
"@equinor/echo-search": "
|
|
9
|
-
"@equinor/echo-utils": "
|
|
5
|
+
"@equinor/echo-base": "0.7.4-beta-0",
|
|
6
|
+
"@equinor/echo-components": "0.11.18-beta-0",
|
|
7
|
+
"@equinor/echo-core": "0.9.13-beta-0",
|
|
8
|
+
"@equinor/echo-search": "0.15.9-beta-0",
|
|
9
|
+
"@equinor/echo-utils": "0.4.7-beta-0",
|
|
10
10
|
"@equinor/eds-core-react": "0.34.0",
|
|
11
11
|
"@equinor/eds-icons": "0.19.3",
|
|
12
12
|
"react": ">= 17.0.2",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"lodash": "4.17.21",
|
|
19
19
|
"react-router-dom": "5.3.4",
|
|
20
20
|
"zustand": ">= 4.4.7 < 5",
|
|
21
|
-
"react-swipeable": "7.0.
|
|
21
|
+
"react-swipeable": "7.0.2",
|
|
22
|
+
"immer": "10.1.1"
|
|
22
23
|
},
|
|
23
24
|
"main": "./index.cjs.js",
|
|
24
25
|
"type": "commonjs",
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SideSheetOrientation, WorkOrderDateType } from '@equinor/echo-components';
|
|
3
3
|
import { Coordinates, HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes, WorkOrderEquipment } from './types';
|
|
4
4
|
import { WorkItemType } from './utils';
|
|
5
|
+
import { SEBadgeType, SNBadgeType, WoBadgeType } from './colors';
|
|
5
6
|
interface PrepviewProps {
|
|
6
7
|
orientation: SideSheetOrientation;
|
|
7
|
-
instCode?: string;
|
|
8
|
-
workOrderId?: string;
|
|
9
|
-
workOrderOperationId?: string;
|
|
10
|
-
notificationId?: string;
|
|
11
|
-
punchId?: string;
|
|
12
8
|
headerAction?: React.ReactNode;
|
|
13
|
-
colorMap?: ColorMap;
|
|
14
|
-
workOrderDateType?: WorkOrderDateType;
|
|
15
9
|
tagClicked: (tagId: string, instCode: string) => void;
|
|
16
|
-
packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
|
|
17
10
|
historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
|
|
18
|
-
objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
|
|
19
11
|
showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
|
|
12
|
+
notificationId?: string;
|
|
13
|
+
currentNotificationLegendOption?: SNBadgeType;
|
|
14
|
+
workOrderId?: string;
|
|
15
|
+
currentWorkOrderLegendOption?: WoBadgeType;
|
|
16
|
+
workOrderOperationId?: string;
|
|
17
|
+
workOrderDateType?: WorkOrderDateType;
|
|
18
|
+
objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
|
|
19
|
+
punchId?: string;
|
|
20
|
+
instCode?: string;
|
|
21
|
+
packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
|
|
22
|
+
currentEquipmentLegendOption?: SEBadgeType;
|
|
20
23
|
onEquipmentLocationClick?: (coordinates: Coordinates) => void;
|
|
21
|
-
equipmentColorMap?: ColorMap;
|
|
22
24
|
onEquipmentClick?: (equipment: WorkOrderEquipment) => void;
|
|
23
25
|
}
|
|
24
26
|
declare function Prepview(props: PrepviewProps): JSX.Element | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ColorMap } from '@equinor/echo-components';
|
|
2
|
+
import { WorkOrderDetails } from '../types';
|
|
3
|
+
export declare enum SNBadgeType {
|
|
4
|
+
Status = "Status",
|
|
5
|
+
FailureImpact = "FailureImpact",
|
|
6
|
+
RequiredEndDateStatus = "RequiredEndDateStatus",
|
|
7
|
+
Count = "Count"
|
|
8
|
+
}
|
|
9
|
+
export declare enum WoBadgeType {
|
|
10
|
+
Status = "Status",
|
|
11
|
+
RequiredEndDateStatus = "RequiredEndDateStatus",
|
|
12
|
+
WorkOrderCount = "Count",
|
|
13
|
+
Operations = "Operations",
|
|
14
|
+
UserStatus = "UserStatus",
|
|
15
|
+
BasicFinishDateStatus = "BasicFinishDateStatus"
|
|
16
|
+
}
|
|
17
|
+
export declare enum SEBadgeType {
|
|
18
|
+
EquipmentGroup = "EquipmentGroup",
|
|
19
|
+
Count = "Count"
|
|
20
|
+
}
|
|
21
|
+
export type WorkOrderColorMapConfig = Pick<WorkOrderDetails, 'isActive' | 'requiredEndDateStatus' | 'basicFinishDateStatus' | 'activeStatusIds'>;
|
|
22
|
+
/**
|
|
23
|
+
* Used to set colorMap on Notification visuals such as ListItems and CompactIconLinks
|
|
24
|
+
*/
|
|
25
|
+
export declare function getNotificationColorMap(currentBadgeOption: SNBadgeType | undefined, isActive?: boolean, requiredEndDateStatus?: string | undefined, failureImpact?: string | undefined): ColorMap;
|
|
26
|
+
/**
|
|
27
|
+
* Converts failureImpact into failureImpactId
|
|
28
|
+
*/
|
|
29
|
+
export declare function convertToFailureImpactId(failureImpact: string): "X" | "S" | "D" | "U" | "";
|
|
30
|
+
/**
|
|
31
|
+
* Used to set colorMap on Work order visuals such as ListItems
|
|
32
|
+
*/
|
|
33
|
+
export declare function getWorkOrderColorMap(currentBadgeOption: WoBadgeType | undefined, isActive: boolean, requiredEndDateStatus?: string, basicFinishDateStatus?: string): ColorMap | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Used to set colorMap on Equipment visuals such as ListItems
|
|
36
|
+
*/
|
|
37
|
+
export declare function getEquipmentColorMap(currentBadgeOption: SEBadgeType | undefined, equipmentGroup?: string): ColorMap;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ColorMap } from '@equinor/echo-components';
|
|
2
|
+
export declare const StatusStyle: {
|
|
3
|
+
[key: string]: ColorMap;
|
|
4
|
+
};
|
|
5
|
+
export declare const CountStyle: {
|
|
6
|
+
[key: string]: ColorMap;
|
|
7
|
+
};
|
|
8
|
+
export declare const ReqEndDateStyle: {
|
|
9
|
+
[key: string]: ColorMap;
|
|
10
|
+
};
|
|
11
|
+
export declare const UserStatusStyle: {
|
|
12
|
+
[key: string]: ColorMap;
|
|
13
|
+
};
|
|
14
|
+
export declare const BasicFinishStyle: {
|
|
15
|
+
[key: string]: ColorMap;
|
|
16
|
+
};
|
|
17
|
+
export declare const FailureImpactStyle: {
|
|
18
|
+
[key: string]: ColorMap;
|
|
19
|
+
};
|
|
20
|
+
export declare const EquipmentGroupStyle: {
|
|
21
|
+
[key: string]: ColorMap;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ColorMapping';
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SideSheetOrientation } from '@equinor/echo-components';
|
|
3
3
|
import { Coordinates, HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes, WorkOrderEquipment } from '../types';
|
|
4
4
|
import { WorkItemType } from '../utils';
|
|
5
|
+
import { SEBadgeType, SNBadgeType, WoBadgeType } from '../colors';
|
|
5
6
|
interface PrepviewContext {
|
|
6
|
-
instCode: string;
|
|
7
7
|
orientation: SideSheetOrientation;
|
|
8
|
-
isWorkOrder: boolean;
|
|
9
|
-
workOrderOperationId?: string;
|
|
10
|
-
colorMap?: ColorMap;
|
|
11
8
|
tagClicked: (tagId: string, instCode: string) => void;
|
|
12
|
-
packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
|
|
13
9
|
historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
|
|
14
|
-
objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
|
|
15
10
|
showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
|
|
16
|
-
|
|
11
|
+
currentNotificationLegendOption?: SNBadgeType;
|
|
12
|
+
isWorkOrder: boolean;
|
|
13
|
+
workOrderOperationId?: string;
|
|
14
|
+
objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
|
|
15
|
+
currentWorkOrderLegendOption?: WoBadgeType;
|
|
16
|
+
instCode?: string;
|
|
17
|
+
packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
|
|
17
18
|
onEquipmentClick?: (equipment: WorkOrderEquipment) => void;
|
|
18
19
|
onEquipmentLocationClick?: (coordinates: Coordinates) => void;
|
|
20
|
+
currentEquipmentLegendOption?: SEBadgeType;
|
|
19
21
|
}
|
|
20
22
|
export declare const PrepviewContext: React.Context<PrepviewContext>;
|
|
21
23
|
export declare const usePrepviewContext: () => PrepviewContext;
|
|
@@ -3,5 +3,5 @@ interface NotificationHeaderProps {
|
|
|
3
3
|
notificationDetails: NotificationDetails;
|
|
4
4
|
headerAction?: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare function NotificationHeader({ notificationDetails, headerAction }: NotificationHeaderProps): JSX.Element | null;
|
|
6
|
+
declare function NotificationHeader({ notificationDetails, headerAction, }: NotificationHeaderProps): JSX.Element | null;
|
|
7
7
|
export { NotificationHeader };
|
|
@@ -80,6 +80,11 @@ export type HistoricNotificationItem = {
|
|
|
80
80
|
activeStatusIds: string;
|
|
81
81
|
createdDateTime: Date;
|
|
82
82
|
changedDateTime: Date;
|
|
83
|
+
requiredEndDateStatusDescription?: string;
|
|
84
|
+
failureImpact?: string;
|
|
85
|
+
hasActivityLongText?: boolean;
|
|
86
|
+
hasAttachment?: boolean;
|
|
87
|
+
hasB30Document?: boolean;
|
|
83
88
|
};
|
|
84
89
|
export type WorkOrderGroup = {
|
|
85
90
|
type: string;
|
|
@@ -88,7 +93,9 @@ export type WorkOrderGroup = {
|
|
|
88
93
|
export type HistoricWorkOrderItem = {
|
|
89
94
|
id: string;
|
|
90
95
|
orderType: string;
|
|
91
|
-
isActive:
|
|
96
|
+
isActive: boolean;
|
|
97
|
+
requiredEndDateTime?: Date;
|
|
98
|
+
requiredEndDateStatus?: string;
|
|
92
99
|
maintenancePlanDate: Date;
|
|
93
100
|
planningPlant: string;
|
|
94
101
|
description: string;
|
|
@@ -96,9 +103,18 @@ export type HistoricWorkOrderItem = {
|
|
|
96
103
|
type: string;
|
|
97
104
|
activeStatusIds: string;
|
|
98
105
|
title: string;
|
|
106
|
+
operationId?: string;
|
|
99
107
|
mainWorkCenterId: string;
|
|
100
108
|
createdDateTime: Date;
|
|
101
109
|
changedDateTime: Date;
|
|
110
|
+
earlyStartDate?: Date;
|
|
111
|
+
earlyFinishDate?: Date;
|
|
112
|
+
basicFinishDateStatus?: string;
|
|
113
|
+
basicFinishDateTime?: Date;
|
|
114
|
+
sortField?: string;
|
|
115
|
+
hasPrts?: boolean;
|
|
116
|
+
recordTypeIds?: string[];
|
|
117
|
+
hasB30Document?: boolean;
|
|
102
118
|
};
|
|
103
119
|
export type PunchGroup = {
|
|
104
120
|
type: string;
|
|
@@ -20,6 +20,8 @@ export type WorkOrderDetails = FetchStatus & {
|
|
|
20
20
|
requiredEndDateStatusDescription: string;
|
|
21
21
|
basicStartDateTime: string;
|
|
22
22
|
basicFinishDateTime: string;
|
|
23
|
+
basicFinishDateStatus: string;
|
|
24
|
+
basicFinishDateStatusDescription: string;
|
|
23
25
|
maintenancePlanDate: string;
|
|
24
26
|
maintenancePlant: string;
|
|
25
27
|
planningPlantId: string;
|
|
@@ -33,6 +35,13 @@ export type WorkOrderDetails = FetchStatus & {
|
|
|
33
35
|
description: string;
|
|
34
36
|
longText: string;
|
|
35
37
|
instCode: string;
|
|
38
|
+
sortField: string;
|
|
39
|
+
maintenancePlantReference: PlantReference;
|
|
40
|
+
planningPlantReference: PlantReference;
|
|
41
|
+
};
|
|
42
|
+
export type PlantReference = {
|
|
43
|
+
label: string;
|
|
44
|
+
typeLabel: string;
|
|
36
45
|
};
|
|
37
46
|
export type SubseaWorkOrderDetails = FetchStatus & {
|
|
38
47
|
hasPrts: boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorkOrderDateType } from '@equinor/echo-components';
|
|
2
2
|
interface WorkOrderProps {
|
|
3
3
|
workOrderId: string;
|
|
4
4
|
headerAction?: React.ReactNode;
|
|
5
|
-
colorMap?: ColorMap;
|
|
6
5
|
workOrderDateType?: WorkOrderDateType;
|
|
7
6
|
}
|
|
8
7
|
declare function WorkOrder(props: WorkOrderProps): JSX.Element | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorkOrderDateType } from '@equinor/echo-components';
|
|
2
2
|
import { WorkOrderDetails } from '../../types';
|
|
3
3
|
interface WorkOrderHeaderProps {
|
|
4
4
|
workOrderDetails: WorkOrderDetails;
|
|
5
5
|
headerAction?: React.ReactNode;
|
|
6
|
-
colorMap?: ColorMap;
|
|
7
6
|
workOrderDateType?: WorkOrderDateType;
|
|
8
7
|
}
|
|
9
8
|
declare function WorkOrderHeader(props: WorkOrderHeaderProps): JSX.Element | null;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { WritableDraft } from 'immer';
|
|
1
2
|
interface PanelUserSettings {
|
|
2
3
|
readonly isTagsVisible: boolean;
|
|
3
4
|
readonly isWorkOrdersVisible: boolean;
|
|
4
5
|
readonly isEquipmentsVisible: boolean;
|
|
6
|
+
readonly isAnnotationsVisible: boolean;
|
|
5
7
|
}
|
|
6
8
|
interface DataLayerPanelState {
|
|
7
9
|
readonly isOpen: boolean;
|
|
@@ -12,6 +14,7 @@ interface DataLayerPanelActions {
|
|
|
12
14
|
toggleWorkOrders: () => void;
|
|
13
15
|
toggleEquipments: () => void;
|
|
14
16
|
toggleTags: () => void;
|
|
17
|
+
toggleAnnotations: () => void;
|
|
15
18
|
}
|
|
16
19
|
type DataLayerPanelStore = DataLayerPanelState & DataLayerPanelActions;
|
|
17
20
|
export declare const useDataLayerPanelStore: import("zustand").UseBoundStore<Omit<Omit<Omit<Omit<import("zustand").StoreApi<DataLayerPanelStore>, "setState"> & {
|
|
@@ -37,7 +40,7 @@ export declare const useDataLayerPanelStore: import("zustand").UseBoundStore<Omi
|
|
|
37
40
|
getOptions: () => Partial<import("zustand/middleware").PersistOptions<DataLayerPanelStore, unknown>>;
|
|
38
41
|
};
|
|
39
42
|
}, "setState"> & {
|
|
40
|
-
setState(nextStateOrUpdater: DataLayerPanelStore | Partial<DataLayerPanelStore> | ((state:
|
|
43
|
+
setState(nextStateOrUpdater: DataLayerPanelStore | Partial<DataLayerPanelStore> | ((state: WritableDraft<DataLayerPanelStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
41
44
|
type: string;
|
|
42
45
|
} | undefined): void;
|
|
43
46
|
}>;
|