@equinor/echo-framework 0.20.12 → 0.20.13

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 (30) hide show
  1. package/index.cjs.js +1 -1
  2. package/package.json +1 -1
  3. package/src/index.d.ts +2 -3
  4. package/src/lib/components/prepview/Prepview.d.ts +7 -4
  5. package/src/lib/components/prepview/api/api.d.ts +2 -1
  6. package/src/lib/components/prepview/api/resources.d.ts +1 -0
  7. package/src/lib/components/prepview/common/details/extendedBorder/ExtendedTabsBorder.d.ts +1 -0
  8. package/src/lib/components/prepview/common/details/extendedBorder/index.d.ts +1 -0
  9. package/src/lib/components/prepview/common/details/index.d.ts +1 -0
  10. package/src/lib/components/prepview/context/PrepviewContext.d.ts +4 -1
  11. package/src/lib/components/prepview/types/workorder.d.ts +20 -0
  12. package/src/lib/components/prepview/utils/enums/tagHistoryItem.d.ts +2 -1
  13. package/src/lib/components/prepview/workorder/pm15/PM15WorkOrder.d.ts +6 -0
  14. package/src/lib/components/prepview/workorder/pm15/equipment/WOEquipment.d.ts +5 -0
  15. package/src/lib/components/prepview/workorder/pm15/equipment/WOEquipmentHorizontal.d.ts +6 -0
  16. package/src/lib/components/prepview/workorder/pm15/equipment/WOEquipmentVertical.d.ts +6 -0
  17. package/src/lib/components/prepview/workorder/pm15/equipment/index.d.ts +1 -0
  18. package/src/lib/components/prepview/workorder/pm15/index.d.ts +1 -0
  19. package/src/lib/feature/globalSelection/OpenGlobalSelectionIn3DButton.d.ts +2 -1
  20. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +3 -0
  21. package/src/lib/feature/legend/index.d.ts +1 -1
  22. package/src/lib/feature/legend/utils/legendUtils.d.ts +3 -0
  23. package/src/lib/feature/measuringPoint/components/measuringPointDetails/imageListItem.d.ts +9 -0
  24. package/src/lib/feature/measuringPoint/components/measuringPointDetails/labelledImageList.d.ts +3 -7
  25. package/src/lib/feature/measuringPoint/components/measuringPointDetails/type/attachment.d.ts +6 -0
  26. package/src/lib/feature/measuringPoint/hooks/useDocumentRelationships.d.ts +1 -1
  27. package/src/lib/feature/measuringPoint/index.d.ts +1 -0
  28. package/src/lib/feature/openItemsIn3d/SelectedItemsMenu.d.ts +1 -1
  29. package/src/lib/feature/openItemsIn3d/openIn3dMenu.d.ts +1 -1
  30. package/src/lib/theme/themeConst.d.ts +0 -58
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.20.12",
3
+ "version": "0.20.13",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
6
6
  "@equinor/echo-components": ">= 0.11.0 < 0.12.0",
package/src/index.d.ts CHANGED
@@ -3,9 +3,9 @@ import './lib/globalStyles.css';
3
3
  import { getPlantsInfo, getTagDetails } from './lib/services/api';
4
4
  export * from './lib/components';
5
5
  export { PrepviewButton } from './lib/components/prepviewButton/prepviewButton';
6
- export { useFetchPlantInfo } from './lib/components/requestAccess/hooks/fetchPlantInfo';
7
6
  export { RequestProCoSysAccess } from './lib/components/requestAccess/RequestProCoSysAccess';
8
7
  export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAccess';
8
+ export { useFetchPlantInfo } from './lib/components/requestAccess/hooks/fetchPlantInfo';
9
9
  export { WorkOrderListItem } from './lib/components/workOrderListItem';
10
10
  export * from './lib/coreApplication';
11
11
  export { fetchEquipmentFromApi } from './lib/feature/equipment/api/api-equipmentWithMeasuringPoints';
@@ -18,8 +18,8 @@ export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from '
18
18
  export * from './lib/feature/measuringPoint/index';
19
19
  export * from './lib/feature/measuringPoint/types/measuringPoint';
20
20
  export * from './lib/feature/openItemsIn3d';
21
- export { createEcho3dInternalLink } from './lib/feature/openItemsIn3d/logic/createEcho3dInternalLink';
22
21
  export { SelectedItemsMenu } from './lib/feature/openItemsIn3d/SelectedItemsMenu';
22
+ export { createEcho3dInternalLink } from './lib/feature/openItemsIn3d/logic/createEcho3dInternalLink';
23
23
  export { WorkOrderContent } from './lib/feature/workOrder/WorkOrderContent';
24
24
  export { RegisteredHookName } from './lib/hooks/hookLibrary';
25
25
  export { useIsCompactLayout } from './lib/hooks/useIsCompactLayout';
@@ -31,7 +31,6 @@ export { RegisteredComponentName } from './lib/services/componentRegistry/compon
31
31
  export * from './lib/services/dataLayerPanel';
32
32
  export * from './lib/services/eventHubActions';
33
33
  export * from './lib/services/leftPanelNavigation';
34
- export * from './lib/theme/themeConst';
35
34
  export * from './lib/types/api-echohub';
36
35
  export type { EchoHubPlant } from './lib/types/echoHubPlant';
37
36
  export * from './lib/types/eventTypes';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ColorMap, SideSheetOrientation, WorkOrderDateType } from '@equinor/echo-components';
3
- import { HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes } from './types';
3
+ import { Coordinates, HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes, WorkOrderEquipment } from './types';
4
4
  import { WorkItemType } from './utils';
5
5
  interface PrepviewProps {
6
6
  orientation: SideSheetOrientation;
@@ -9,14 +9,17 @@ interface PrepviewProps {
9
9
  workOrderOperationId?: string;
10
10
  notificationId?: string;
11
11
  punchId?: string;
12
+ headerAction?: React.ReactNode;
13
+ colorMap?: ColorMap;
14
+ workOrderDateType?: WorkOrderDateType;
12
15
  tagClicked: (tagId: string, instCode: string) => void;
13
16
  packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
14
17
  historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
15
18
  objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
16
19
  showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
17
- headerAction?: React.ReactNode;
18
- colorMap?: ColorMap;
19
- workOrderDateType?: WorkOrderDateType;
20
+ onEquipmentLocationClick?: (coordinates: Coordinates) => void;
21
+ equipmentColorMap?: ColorMap;
22
+ onEquipmentClick?: (equipment: WorkOrderEquipment) => void;
20
23
  }
21
24
  declare function Prepview(props: PrepviewProps): JSX.Element | null;
22
25
  export * from './types/shared';
@@ -1,4 +1,4 @@
1
- import { NotificationDetails, PrepviewAttachment, PrepviewDocumentGroup, PrepviewHistory, PrepviewObject, PrepviewOperation, PrepviewSafety, PrepviewTagInformation, PunchDetails, SubseaNotificationDetails, SubseaWorkOrderDetails, WorkOrderDetails } from '../types';
1
+ import { NotificationDetails, PrepviewAttachment, PrepviewDocumentGroup, PrepviewHistory, PrepviewObject, PrepviewOperation, PrepviewSafety, PrepviewTagInformation, PunchDetails, SubseaNotificationDetails, SubseaWorkOrderDetails, WorkOrderDetails, WorkOrderEquipment } from '../types';
2
2
  export declare function getWorkOrderDetails(workOrderId: string): Promise<WorkOrderDetails>;
3
3
  export declare function getSubseaWorkOrderDetails(workOrderId: string): Promise<SubseaWorkOrderDetails>;
4
4
  export declare function getWorkType(workOrderId: string): Promise<string[]>;
@@ -13,3 +13,4 @@ export declare function getHistory(itemId: string, isWorkOrder?: boolean): Promi
13
13
  export declare function getSafetyCards(itemId: string, isWorkOrder?: boolean): Promise<PrepviewSafety[]>;
14
14
  export declare function getOperations(workOrderId: string): Promise<PrepviewOperation[]>;
15
15
  export declare function getObjects(workOrderId: string): Promise<PrepviewObject[]>;
16
+ export declare function getEquipment(workOrderId: string): Promise<WorkOrderEquipment[]>;
@@ -13,3 +13,4 @@ export declare function getHistory(itemId: string, isWorkOrder?: boolean): strin
13
13
  export declare function getSafetyCards(itemId: string, isWorkOrder?: boolean): string;
14
14
  export declare function getOperations(workOrderId: string): string;
15
15
  export declare function getObjects(workOrderId: string): string;
16
+ export declare function getEquipment(workOrderId: string): string;
@@ -0,0 +1 @@
1
+ export declare function ExtendedTabsBorder(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './ExtendedTabsBorder';
@@ -1,3 +1,4 @@
1
1
  export * from './accordion';
2
2
  export * from './loader';
3
3
  export * from './panel';
4
+ export * from './extendedBorder';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ColorMap, SideSheetOrientation } from '@equinor/echo-components';
3
- import { HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes } from '../types';
3
+ import { Coordinates, HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes, WorkOrderEquipment } from '../types';
4
4
  import { WorkItemType } from '../utils';
5
5
  interface PrepviewContext {
6
6
  instCode: string;
@@ -13,6 +13,9 @@ interface PrepviewContext {
13
13
  historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
14
14
  objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
15
15
  showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
16
+ equipmentColorMap?: ColorMap;
17
+ onEquipmentClick?: (equipment: WorkOrderEquipment) => void;
18
+ onEquipmentLocationClick?: (coordinates: Coordinates) => void;
16
19
  }
17
20
  export declare const PrepviewContext: React.Context<PrepviewContext>;
18
21
  export declare const usePrepviewContext: () => PrepviewContext;
@@ -67,3 +67,23 @@ export type PrepviewObject = {
67
67
  equipment?: string;
68
68
  equipmentId?: string;
69
69
  };
70
+ export type WorkOrderEquipment = {
71
+ id: string;
72
+ functionalLocationId: string;
73
+ title: string;
74
+ materialId: string;
75
+ maintenancePlantId: string;
76
+ maintenancePlant: string;
77
+ subseaPoolEquipmentGroup: string;
78
+ equipmentOnboard: boolean;
79
+ mapLocation: MapLocationDto;
80
+ };
81
+ export type MapLocationDto = {
82
+ id?: string;
83
+ position: Coordinates;
84
+ };
85
+ export type Coordinates = {
86
+ altitude?: number;
87
+ latitude: number;
88
+ longitude: number;
89
+ };
@@ -2,5 +2,6 @@ export declare enum WorkItemType {
2
2
  Notifications = 0,
3
3
  WorkOrders = 1,
4
4
  Punches = 2,
5
- Operations = 3
5
+ Operations = 3,
6
+ Equipment = 4
6
7
  }
@@ -0,0 +1,6 @@
1
+ import { WorkOrderDetails } from '../../types';
2
+ export interface Props {
3
+ workOrderDetails: WorkOrderDetails;
4
+ }
5
+ declare function PM15WorkOrder({ workOrderDetails }: Props): JSX.Element;
6
+ export { PM15WorkOrder };
@@ -0,0 +1,5 @@
1
+ export interface WOEquipmentProps {
2
+ workOrderId: string;
3
+ }
4
+ declare function WOEquipment({ workOrderId }: WOEquipmentProps): JSX.Element;
5
+ export { WOEquipment };
@@ -0,0 +1,6 @@
1
+ import { WorkOrderEquipment } from '../../../types';
2
+ interface WOEquipmentHorizontalProps {
3
+ equipment: WorkOrderEquipment[];
4
+ }
5
+ declare function WOEquipmentHorizontal({ equipment }: WOEquipmentHorizontalProps): import("react/jsx-runtime").JSX.Element;
6
+ export { WOEquipmentHorizontal };
@@ -0,0 +1,6 @@
1
+ import { WorkOrderEquipment } from '../../../types';
2
+ interface WOEquipmentVerticalProps {
3
+ equipment: WorkOrderEquipment[];
4
+ }
5
+ declare function WOEquipmentVertical({ equipment }: WOEquipmentVerticalProps): import("react/jsx-runtime").JSX.Element;
6
+ export { WOEquipmentVertical };
@@ -0,0 +1 @@
1
+ export * from './WOEquipment';
@@ -0,0 +1 @@
1
+ export * from './PM15WorkOrder';
@@ -4,6 +4,7 @@ interface OpenGlobalSelectionIn3DButtonProps {
4
4
  error: Error | BaseError;
5
5
  errorMessage: string;
6
6
  }) => void;
7
+ disabled: boolean;
7
8
  }
8
- export declare const OpenGlobalSelectionIn3DButton: ({ onPlantLoadError }: OpenGlobalSelectionIn3DButtonProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const OpenGlobalSelectionIn3DButton: ({ onPlantLoadError, disabled }: OpenGlobalSelectionIn3DButtonProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -85,6 +85,9 @@ export interface GlobalSelectionStore {
85
85
  tags: Readonly<TagSummaryDto[]>;
86
86
  }) => void;
87
87
  removeItemFromSelection: (itemId: Readonly<GlobalSelectionTypes.ItemId>) => void;
88
+ removeItemsFromSelection: (args: {
89
+ itemIds: ReadonlyArray<GlobalSelectionTypes.ItemId>;
90
+ }) => void;
88
91
  setVisibilityList: (args: {
89
92
  listKey: string;
90
93
  isVisible: boolean;
@@ -1,5 +1,5 @@
1
1
  export { LegendStatus, LegendType } from './legend';
2
2
  export type { LegendItemStatus } from './legend';
3
3
  export { createChipStatusProps } from './utils/createChipStatusProps';
4
- export { getLegendStatusColor, legendTypeToLegendStatus, toLegendStatusOrString, valueToEnum } from './utils/legendUtils';
4
+ export { getLegendStatusColor, legendTypeToLegendStatus, stringToEnumOrUndefined, toLegendStatusOrString, valueToEnum } from './utils/legendUtils';
5
5
  export { statusHelper } from './utils/statusHelper';
@@ -15,4 +15,7 @@ export declare function legendTypeToLegendStatus(legendType: LegendType, status:
15
15
  * @returns {LegendStatus | string}
16
16
  */
17
17
  export declare function toLegendStatusOrString(status: string): LegendStatus | string;
18
+ export declare function stringToEnumOrUndefined<T>(enumType: {
19
+ [s: string]: T;
20
+ }, value: string): T | undefined;
18
21
  export declare function valueToEnum(value: string | undefined | null, enumType: typeof LegendStatus): LegendStatus;
@@ -0,0 +1,9 @@
1
+ import { Attachment } from './type/attachment';
2
+ interface ImageListItemProps {
3
+ index: number;
4
+ attachment: Attachment;
5
+ documentId: string;
6
+ openImageView: (index: number) => void;
7
+ }
8
+ export declare const ImageListItem: React.FC<ImageListItemProps>;
9
+ export {};
@@ -1,11 +1,7 @@
1
- import { DocumentRelationships } from '../../types/documentRelationships';
1
+ import { Attachment } from './type/attachment';
2
2
  interface LabelledImageListProps {
3
3
  documentId: string;
4
- createdDateTime: string;
5
- reportedCondition: string;
6
- imageSrc: string;
7
- documentRelationships: DocumentRelationships[];
8
- imageIndex: number;
4
+ attachments: Attachment[];
9
5
  }
10
- export declare const LabelledImageList: ({ documentId, createdDateTime, reportedCondition, imageSrc, documentRelationships, imageIndex }: LabelledImageListProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const LabelledImageList: ({ documentId, attachments }: LabelledImageListProps) => import("react/jsx-runtime").JSX.Element;
11
7
  export {};
@@ -0,0 +1,6 @@
1
+ export interface Attachment {
2
+ attachmentImageUri?: string;
3
+ createdDateTime?: string;
4
+ quantitativeReading: number;
5
+ quantitativeReadingUnitId: string;
6
+ }
@@ -1,6 +1,6 @@
1
1
  export declare function useDocumentRelationships(measuringPointId: string): {
2
2
  status: "error" | "success" | "pending";
3
- documentRelationships: import("../types/documentRelationships").DocumentRelationships[];
3
+ documentRelationships: import("..").DocumentRelationships[];
4
4
  error: Error | null;
5
5
  totalAttachments: string;
6
6
  };
@@ -1,3 +1,4 @@
1
1
  export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig } from './components';
2
2
  export { useOpenMeasuringPointDetails } from './hooks';
3
+ export type { DocumentRelationships } from './types/documentRelationships';
3
4
  export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { ObjectsToSendTo3dTypes } from '../../utils';
3
3
  interface SelectedItemsProps {
4
- numberOfSelectedItems: number;
5
4
  onOpenIn3dButtonClick: (ObjectsToSendTo3d: ObjectsToSendTo3dTypes) => void;
6
5
  children?: React.ReactNode;
6
+ disabled?: boolean;
7
7
  }
8
8
  export declare const SelectedItemsMenu: React.FC<SelectedItemsProps>;
9
9
  export declare function getIsGlobalSelectionEnabled(): boolean;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ObjectsToSendTo3dTypes } from '../../utils/openIn3d/tagLists';
3
3
  interface OpenIn3dMenuProps {
4
4
  onOpenIn3dButtonClick: (objectsToSendTo3d: ObjectsToSendTo3dTypes) => void;
5
- disabled?: boolean;
5
+ disabled: boolean;
6
6
  }
7
7
  export declare const OpenIn3dMenu: React.FC<OpenIn3dMenuProps>;
8
8
  export {};
@@ -1,58 +0,0 @@
1
- /**
2
- * @deprecated This is a duplicate: please use the one exported from echo-components.
3
- * We plan to remove this duplication soon.
4
- */
5
- export declare const themeConst: {
6
- black: string;
7
- white: string;
8
- equiBlue1: string;
9
- equiBlue2: string;
10
- equiBlue3: string;
11
- equiGray1: string;
12
- equiGray2: string;
13
- equiGray3: string;
14
- equiGray4: string;
15
- equiRed1: string;
16
- darkEquiRed: string;
17
- equiGreen1: string;
18
- equiGreen2: string;
19
- equiGreen3: string;
20
- echoText: string;
21
- strongGray: string;
22
- disabledBackgroundColor: string;
23
- disabledColor: string;
24
- onGoing: string;
25
- done: string;
26
- asBuilt: string;
27
- planned: string;
28
- future: string;
29
- historic: string;
30
- outOfService: string;
31
- reserved: string;
32
- voided: string;
33
- default: string;
34
- ok: string;
35
- os: string;
36
- pa: string;
37
- pb: string;
38
- unknown: string;
39
- priorityHigh: string;
40
- priorityMedium: string;
41
- systems: string;
42
- locations: string;
43
- warningText: string;
44
- warningIcon: string;
45
- warningBackground: string;
46
- dropDownButtonBackground: string;
47
- dropDownTextColor: string;
48
- searchBarBackground: string;
49
- highSeverity: string;
50
- mediumSeverity: string;
51
- lowSeverity: string;
52
- defaultSeverity: string;
53
- toggleActive: string;
54
- toggleInactive: string;
55
- dividerColor: string;
56
- tertiaryText: string;
57
- secondaryText: string;
58
- };