@equinor/echo-framework 0.18.6 → 0.18.7

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 (62) hide show
  1. package/index.cjs.js +1 -1
  2. package/package.json +1 -1
  3. package/src/lib/components/index.d.ts +1 -0
  4. package/src/lib/components/listItem/listItem.d.ts +2 -0
  5. package/src/lib/components/listItemAdditionalInfoRow/listItemAdditionalInfoRow.d.ts +7 -0
  6. package/src/lib/components/prepview/api/api.d.ts +13 -7
  7. package/src/lib/components/prepview/api/resources.d.ts +9 -2
  8. package/src/lib/components/prepview/common/additionalInformation/AdditionalDetails.d.ts +2 -3
  9. package/src/lib/components/prepview/common/additionalInformation/tabsPanels/NotificationPanels.d.ts +7 -0
  10. package/src/lib/components/prepview/common/additionalInformation/tabsPanels/TabsPanels.d.ts +2 -3
  11. package/src/lib/components/prepview/common/additionalInformation/tabsPanels/WorkOrderPanels.d.ts +7 -0
  12. package/src/lib/components/prepview/notification/{index.d.ts → Notification.d.ts} +1 -2
  13. package/src/lib/components/prepview/notification/header/NotificationHeader.d.ts +2 -2
  14. package/src/lib/components/prepview/panels/attachments/AttachmentItem.d.ts +8 -0
  15. package/src/lib/components/prepview/panels/attachments/AttachmentTable.d.ts +8 -0
  16. package/src/lib/components/prepview/panels/attachments/Attachments.d.ts +7 -4
  17. package/src/lib/components/prepview/panels/history/TagHistory.d.ts +3 -5
  18. package/src/lib/components/prepview/panels/history/TagHistoryGroup.d.ts +11 -0
  19. package/src/lib/components/prepview/panels/history/horizontalView/HorizontalTagHistory.d.ts +4 -4
  20. package/src/lib/components/prepview/panels/history/items/Items.d.ts +2 -2
  21. package/src/lib/components/prepview/panels/history/items/PunchItem.d.ts +2 -2
  22. package/src/lib/components/prepview/panels/objects/HorizontalObjects.d.ts +6 -0
  23. package/src/lib/components/prepview/panels/objects/Objects.d.ts +2 -3
  24. package/src/lib/components/prepview/panels/objects/VerticalObject.d.ts +6 -0
  25. package/src/lib/components/prepview/panels/operations/OperationItem.d.ts +6 -0
  26. package/src/lib/components/prepview/panels/operations/OperationTable.d.ts +6 -0
  27. package/src/lib/components/prepview/panels/operations/Operations.d.ts +1 -3
  28. package/src/lib/components/prepview/panels/risk/Risk.d.ts +3 -3
  29. package/src/lib/components/prepview/panels/risk/RiskItems.d.ts +6 -0
  30. package/src/lib/components/prepview/panels/risk/RiskTable.d.ts +6 -0
  31. package/src/lib/components/prepview/panels/tagDocumentRefs/TagDocumentRefs.d.ts +3 -3
  32. package/src/lib/components/prepview/panels/tagInformation/TagInformation.d.ts +3 -4
  33. package/src/lib/components/prepview/punch/{index.d.ts → Punch.d.ts} +2 -2
  34. package/src/lib/components/prepview/types/index.d.ts +2 -7
  35. package/src/lib/components/prepview/types/notification.d.ts +4 -51
  36. package/src/lib/components/prepview/types/punch.d.ts +2 -12
  37. package/src/lib/components/prepview/types/shared.d.ts +130 -0
  38. package/src/lib/components/prepview/types/workorder.d.ts +49 -81
  39. package/src/lib/components/prepview/utils/documents.d.ts +1 -0
  40. package/src/lib/components/prepview/utils/workorder.d.ts +0 -3
  41. package/src/lib/components/prepview/workorder/{index.d.ts → WorkOrder.d.ts} +1 -2
  42. package/src/lib/components/prepview/workorder/details/DetailsWorkOrder.d.ts +2 -2
  43. package/src/lib/components/prepview/workorder/header/WorkOrderHeader.d.ts +2 -2
  44. package/src/lib/components/searchMenu/searchMenu.d.ts +1 -2
  45. package/src/lib/feature/equipment/components/equipmentItemDetails/equipmentItemDetails.d.ts +2 -2
  46. package/src/lib/feature/equipment/utils/equipmentUtils.d.ts +17 -4
  47. package/src/lib/feature/measuringPoint/components/index.d.ts +1 -0
  48. package/src/lib/feature/measuringPoint/components/measuringPointDetails/lastReportedFields.d.ts +6 -0
  49. package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointHistoryList.d.ts +7 -0
  50. package/src/lib/feature/measuringPoint/components/measuringPointItem.d.ts +1 -2
  51. package/src/lib/feature/measuringPoint/index.d.ts +1 -1
  52. package/src/lib/types/searchItemDetailsType.d.ts +2 -1
  53. package/src/lib/utils/index.d.ts +1 -0
  54. package/src/lib/components/prepview/api/attachment.d.ts +0 -2
  55. package/src/lib/components/prepview/panels/history/group/TagHistoryGroup.d.ts +0 -10
  56. package/src/lib/components/prepview/panels/history/group/index.d.ts +0 -1
  57. package/src/lib/components/prepview/types/attachment.d.ts +0 -7
  58. package/src/lib/components/prepview/types/common.d.ts +0 -50
  59. package/src/lib/components/prepview/types/document.d.ts +0 -13
  60. package/src/lib/components/prepview/types/operation.d.ts +0 -15
  61. package/src/lib/components/prepview/types/safety.d.ts +0 -21
  62. package/src/lib/components/prepview/types/tag.d.ts +0 -28
@@ -1,95 +1,63 @@
1
- import { PrepviewAttachment } from './attachment';
2
- import { FetchStatus } from './common';
3
- import { PrepviewDocumentGroup } from './document';
4
- import { PrepviewNotification } from './notification';
5
- import { PrepviewOperation } from './operation';
6
- import { PrepviewPunch } from './punch';
7
- import { PrepviewSafety } from './safety';
8
- import { ObjectDto, PrepviewTagInformation } from './tag';
9
- export type PrepviewWorkOrderDto = {
10
- details: WorkOrderDetails;
11
- additionalDetails?: WorkOrderAdditionalDetails;
12
- };
1
+ import { FetchStatus } from './shared';
13
2
  export type WorkOrderDetails = FetchStatus & {
14
- basicFinishDateTime: Date;
15
- basicFinishDateStatus: string;
16
- basicFinishDateStatusDescription: string;
17
- basicStartDateTime: Date;
18
- changedDateTime: Date;
19
- createdDateTime: Date;
20
- requiredEndDateTime: Date;
21
- requiredEndDateStatus: string;
22
- requiredEndDateStatusDescription: string;
23
- maintenancePlanDate: Date;
24
- maintenancePlant: string;
25
- planningPlant: string;
26
- activeStatusIds: string;
27
- description: string;
28
- equipmentId: string;
29
3
  id: string;
30
- isActive: boolean;
31
- locationId: string;
32
- longText: string;
4
+ plantId: string;
33
5
  tagId: string;
6
+ tagPlantId: string;
34
7
  tagCategory: string;
35
8
  tagCategoryId: string;
36
- workCenterId: string;
37
- personResponsible?: string;
38
- revisionId?: string;
39
9
  orderType: string;
10
+ activeStatusIds: string;
11
+ isActive: true;
12
+ personResponsible: string;
40
13
  plannerGroupId: string;
14
+ workCenterId: string;
15
+ locationId: string;
16
+ changedDateTime: string;
17
+ createdDateTime: string;
18
+ requiredEndDateTime: string;
19
+ requiredEndDateStatus: string;
20
+ requiredEndDateStatusDescription: string;
21
+ basicStartDateTime: string;
22
+ basicFinishDateTime: string;
23
+ maintenancePlanDate: string;
24
+ maintenancePlant: string;
25
+ planningPlantId: string;
26
+ planningPlant: string;
27
+ priorityId: string;
28
+ priority: string;
29
+ revisionId: string;
30
+ equipmentId: string;
41
31
  systemId: string;
42
32
  system: string;
43
- priority: string;
44
- priorityId: string;
33
+ description: string;
34
+ longText: string;
45
35
  instCode: string;
46
- plantId: string;
47
- };
48
- export type WorkOrderAdditionalDetails = {
49
- attachments: FetchStatus & {
50
- attachments: Array<PrepviewAttachment>;
51
- };
52
- documents: FetchStatus & {
53
- documentGroups: Array<PrepviewDocumentGroup>;
54
- };
55
- history: FetchStatus & {
56
- notificationGroups: FetchStatus & {
57
- groups: PrepviewTagHistoryGroup<PrepviewNotification>[];
58
- };
59
- punchGroups: FetchStatus & {
60
- groups: PrepviewTagHistoryGroup<PrepviewPunch>[];
61
- };
62
- workOrderGroups: FetchStatus & {
63
- groups: PrepviewTagHistoryGroup<PrepviewWorkOrder>[];
64
- };
65
- };
66
- objects: FetchStatus & {
67
- objects: Array<ObjectDto>;
68
- };
69
- operations: FetchStatus & {
70
- operations: Array<PrepviewOperation>;
71
- };
72
- safetyCards: FetchStatus & {
73
- safetyCards: Array<PrepviewSafety>;
74
- };
75
- tagInformation: FetchStatus & PrepviewTagInformation;
76
- };
77
- export type PrepviewTagHistoryGroup<T = PrepviewNotification | PrepviewWorkOrder | PrepviewPunch> = {
78
- type: string;
79
- items: Array<T>;
80
36
  };
81
- export type PrepviewWorkOrder = {
82
- id: string;
83
- orderType?: string;
84
- description?: string;
85
- isActive?: boolean;
86
- planningPlant?: string;
87
- maintenancePlanDate?: Date;
88
- workCenterId?: string;
89
- type: string;
37
+ export type PrepviewOperation = {
38
+ operationNumber: string;
90
39
  title: string;
40
+ workCenterId: string;
91
41
  activeStatusIds: string;
92
- mainWorkCenterId: string;
93
- createdDateTime: Date;
94
- changedDateTime: Date;
42
+ earliestStartDateTime: Date;
43
+ earliestFinishDateTime: Date;
44
+ plannedDuration: string;
45
+ plannedWorkHours: string;
46
+ actualWorkHours: string;
47
+ actualPercentageComplete: number;
48
+ capacityCount: number;
49
+ plantId: string;
50
+ plantName: string;
51
+ };
52
+ export type PrepviewObject = {
53
+ functionalLocationId?: string;
54
+ tagId?: string;
55
+ tag?: string;
56
+ tagPlantId?: string;
57
+ notificationId?: string;
58
+ notificationTypeId?: string;
59
+ notificationIsActive?: boolean;
60
+ notificationDescription?: string;
61
+ equipment?: string;
62
+ equipmentId?: string;
95
63
  };
@@ -1 +1,2 @@
1
1
  export declare function setFileIcon(fileExtension: string | undefined): string;
2
+ export declare function getExtension(filename: string): string | undefined;
@@ -1,4 +1 @@
1
- import { WorkOrderItem } from '@equinor/echo-components';
2
- import { PrepviewWorkOrder } from '../types';
3
1
  export declare const MaintenanceApiNameForWorkOrders: Record<string, string>;
4
- export declare function mapWorkOrder(prepviewWorkOrder: PrepviewWorkOrder): WorkOrderItem;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { PrepviewWorkOrderDto } from '../types';
3
2
  interface WorkOrderProps {
4
- workOrder: PrepviewWorkOrderDto;
3
+ workOrderId: string;
5
4
  closePanel: () => void;
6
5
  headerAction?: React.ReactNode;
7
6
  }
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { WorkOrderDetails } from '../../types';
3
3
  export interface Props {
4
- details: WorkOrderDetails;
4
+ workOrderDetails: WorkOrderDetails;
5
5
  isLoading?: boolean;
6
6
  closePanel: () => void;
7
7
  }
8
- declare function DetailsWorkOrder({ details, closePanel }: Props): JSX.Element;
8
+ declare function DetailsWorkOrder({ workOrderDetails, closePanel }: Props): JSX.Element;
9
9
  export { DetailsWorkOrder };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { WorkOrderDetails } from '../../types';
3
3
  interface WorkOrderHeaderProps {
4
- workOrder: WorkOrderDetails;
4
+ workOrderDetails: WorkOrderDetails;
5
5
  headerAction?: React.ReactNode;
6
6
  }
7
- declare function WorkOrderHeader(props: WorkOrderHeaderProps): JSX.Element | null;
7
+ declare function WorkOrderHeader({ workOrderDetails, headerAction, }: WorkOrderHeaderProps): JSX.Element | null;
8
8
  export { WorkOrderHeader };
@@ -1,3 +1,2 @@
1
1
  import React from 'react';
2
- declare const SearchMenu: React.FC;
3
- export default SearchMenu;
2
+ export declare const SearchMenu: React.FC;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { EquipmentWithMeasuringPoints } from '../../types/equipmentWithMeasuringPoints';
2
+ import { Equipment } from '../../types/equipment';
3
3
  interface EquipmentAccordionContentProps {
4
- equipmentWithMeasuringPoints: EquipmentWithMeasuringPoints[];
4
+ equipment: Equipment;
5
5
  tagNo: string;
6
6
  plantNo: string;
7
7
  showAdditionalInfo?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Link } from '@equinor/echo-core';
2
+ import { MeasuringPointDto } from '../../measuringPoint';
2
3
  import { Equipment } from '../types/equipment';
3
- import { EquipmentWithMeasuringPoints } from '../types/equipmentWithMeasuringPoints';
4
4
  interface OpenMeasuringPointsArgs {
5
5
  equipmentId: string;
6
6
  e3dRef: string;
@@ -12,8 +12,21 @@ interface OpenMeasuringPointsArgs {
12
12
  }
13
13
  export declare const openEquipmentIn3dWeb: ({ equipmentId, e3dRef, goToLink, pathname, instCode, tagNo, plantNo }: OpenMeasuringPointsArgs) => Promise<void>;
14
14
  export declare const is3DEquipment: (equipment: Equipment) => boolean;
15
- export declare const sortMeasurementsInEquipmentWithMeasuringPointsByNewestFirst: (equipmentWithMeasuringPoints: EquipmentWithMeasuringPoints[]) => {
16
- equipment: Equipment;
17
- measuringPoints: import("../../measuringPoint").MeasuringPointDto[];
15
+ export declare const sortMeasurementsInMeasuringPointsByNewestFirst: (measuringPoints: MeasuringPointDto[]) => {
16
+ measuringPointId: string;
17
+ measuringPosition?: string | undefined;
18
+ measuringPoint?: string | undefined;
19
+ functionalLocationId?: string | undefined;
20
+ tagPlantId?: string | undefined;
21
+ tagId?: string | undefined;
22
+ equipmentId?: string | undefined;
23
+ quantitativeCharacteristicId?: string | undefined;
24
+ quantitativeCharacteristicUnit?: string | undefined;
25
+ positionDetails_CoordinateSystemName?: string | undefined;
26
+ positionDetails_E3DReferenceNumber?: string | undefined;
27
+ positionDetails_CoordinateEast?: string | undefined;
28
+ positionDetails_CoordinateNorth?: string | undefined;
29
+ positionDetails_CoordinateUp?: string | undefined;
30
+ measurements: import("../../measuringPoint").MeasurementDto[];
18
31
  }[];
19
32
  export {};
@@ -1,4 +1,5 @@
1
1
  export { failureMechanismConfig } from './failureMechanism.config';
2
2
  export { MeasuringPointDetails } from './measuringPointDetails/measuringPointDetails';
3
+ export { getInstCodeForSapPlantId } from './measuringPointDetails/measuringPointDetails.logic';
3
4
  export { MeasuringPointHeader } from './measuringPointHeader/measuringPointHeader';
4
5
  export { MeasuringPointItem } from './measuringPointItem';
@@ -0,0 +1,6 @@
1
+ import { MeasuringPointDto } from '../../types/measuringPoint';
2
+ type LastReportedFieldsProps = {
3
+ measuringPoint: MeasuringPointDto;
4
+ };
5
+ export declare const LastReportedFields: ({ measuringPoint }: LastReportedFieldsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { MeasuringPointDto } from '../../types/measuringPoint';
3
+ type MeasuringPointHistoryListProps = {
4
+ measuringPoint: MeasuringPointDto;
5
+ };
6
+ export declare const MeasuringPointHistoryList: React.FC<MeasuringPointHistoryListProps>;
7
+ export {};
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import { MeasuringPointDto } from '../types/measuringPoint';
3
3
  interface MeasuringPointItemProps {
4
+ children?: React.ReactNode;
4
5
  measuringPoint: MeasuringPointDto;
5
- asHeader?: boolean;
6
- isActive: boolean;
7
6
  onClick: () => void;
8
7
  }
9
8
  /**
@@ -1,3 +1,3 @@
1
- export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig } from './components';
1
+ export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig, getInstCodeForSapPlantId } from './components';
2
2
  export { useOpenMeasuringPointDetails } from './hooks';
3
3
  export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
@@ -8,5 +8,6 @@ export declare enum searchItemDetailsType {
8
8
  Notification = "Notification",
9
9
  WorkOrder = "WorkOrder",
10
10
  MeasuringPoint = "MeasuringPoint",
11
- Equipment = "Equipment"
11
+ Equipment = "Equipment",
12
+ Annotation = "Annotation"
12
13
  }
@@ -5,3 +5,4 @@ export * from './plantInfo';
5
5
  export * from './previousUtils';
6
6
  export * from './searchUtil';
7
7
  export * from './stringUtils';
8
+ export * from './tagUtils';
@@ -1,2 +0,0 @@
1
- import { PrepviewAttachment } from '../types';
2
- export declare function getAttachmentFile(type: string, id: string, attachment: PrepviewAttachment, isWorkOrder: boolean): Promise<Blob>;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { PrepviewNotification, PrepviewPunch, PrepviewTagHistoryGroup, PrepviewWorkOrder } from '../../../types';
3
- import { WorkItemType } from '../../../utils';
4
- interface Props {
5
- emptyText: string;
6
- workItemType: WorkItemType;
7
- groups: PrepviewTagHistoryGroup<PrepviewNotification | PrepviewWorkOrder | PrepviewPunch>[];
8
- }
9
- declare function TagHistoryGroup({ groups, emptyText, workItemType }: Props): JSX.Element;
10
- export { TagHistoryGroup };
@@ -1 +0,0 @@
1
- export * from './TagHistoryGroup';
@@ -1,7 +0,0 @@
1
- export type PrepviewAttachment = {
2
- createdDateTime: Date;
3
- fileName: string;
4
- fileSize: number;
5
- id: string;
6
- statusCode?: number;
7
- };
@@ -1,50 +0,0 @@
1
- /// <reference types="react" />
2
- import { PrepviewAttachment } from './attachment';
3
- import { PrepviewDocumentGroup } from './document';
4
- import { PrepviewNotification } from './notification';
5
- import { PrepviewOperation } from './operation';
6
- import { PrepviewPunch } from './punch';
7
- import { PrepviewSafety } from './safety';
8
- import { ObjectDto, PrepviewTagInformation } from './tag';
9
- import { PrepviewTagHistoryGroup, PrepviewWorkOrder } from './workorder';
10
- export type FetchStatus = {
11
- statusCode?: 'Forbidden' | number;
12
- };
13
- export type ContentPickerGroup = {
14
- title?: string;
15
- items: ContentPickerItem[];
16
- };
17
- export type ContentPickerItem = {
18
- id: string;
19
- title: string;
20
- content: React.ReactNode;
21
- };
22
- export type AdditionalDetailsDto = {
23
- attachments: FetchStatus & {
24
- attachments: Array<PrepviewAttachment>;
25
- };
26
- documents: FetchStatus & {
27
- documentGroups: Array<PrepviewDocumentGroup>;
28
- };
29
- history: FetchStatus & {
30
- notificationGroups: FetchStatus & {
31
- groups: PrepviewTagHistoryGroup<PrepviewNotification>[];
32
- };
33
- punchGroups: FetchStatus & {
34
- groups: PrepviewTagHistoryGroup<PrepviewPunch>[];
35
- };
36
- workOrderGroups: FetchStatus & {
37
- groups: PrepviewTagHistoryGroup<PrepviewWorkOrder>[];
38
- };
39
- };
40
- objects: FetchStatus & {
41
- objects: Array<ObjectDto>;
42
- };
43
- operations: FetchStatus & {
44
- operations: Array<PrepviewOperation>;
45
- };
46
- safetyCards: FetchStatus & {
47
- safetyCards: Array<PrepviewSafety>;
48
- };
49
- tagInformation: FetchStatus & PrepviewTagInformation;
50
- };
@@ -1,13 +0,0 @@
1
- import { FileDto } from '@equinor/echo-search';
2
- export type PrepviewDocumentGroup = {
3
- type: string;
4
- documents: Array<PrepviewDocument>;
5
- };
6
- export type PrepviewDocument = {
7
- docNo: string;
8
- docTitle: string;
9
- files: Array<FileDto>;
10
- revDate: Date;
11
- revNo: string;
12
- revStatus: string;
13
- };
@@ -1,15 +0,0 @@
1
- export type PrepviewOperation = {
2
- operationNumber: string;
3
- title: string;
4
- workCenterId: string;
5
- plantId: string;
6
- plantName: string;
7
- activeStatusIds: string;
8
- earliestStartDateTime: Date;
9
- earliestFinishDateTime: Date;
10
- plannedDuration: string;
11
- plannedWorkHours: string;
12
- actualWorkHours: string;
13
- actualPercentageComplete: number;
14
- capacityCount: number;
15
- };
@@ -1,21 +0,0 @@
1
- export type PrepviewSafety = {
2
- title: string;
3
- description: string;
4
- caseDate: string;
5
- country: string;
6
- url: string;
7
- severity: number;
8
- };
9
- export interface SafetyDataParams {
10
- dateFrom: string;
11
- dateTo: string;
12
- filters: SafetyDataFilter[];
13
- query: string;
14
- sortByDate: boolean;
15
- top: number;
16
- }
17
- interface SafetyDataFilter {
18
- fieldName: string;
19
- values: string[];
20
- }
21
- export {};
@@ -1,28 +0,0 @@
1
- export type PrepviewTagInformation = {
2
- abcIndicator: string;
3
- area: string;
4
- consequenceCost: string;
5
- consequenceFail: string;
6
- consequenceHse: string;
7
- consequenceProd: string;
8
- criticalSparepartDemandTime?: Date;
9
- functionalLocation: string;
10
- id: string;
11
- location: string;
12
- overallCriticality: string;
13
- redundancy: string;
14
- repairStrategy: string;
15
- unsafeFailure: string[];
16
- };
17
- export type ObjectDto = {
18
- functionalLocationId?: string;
19
- tagId?: string;
20
- tag?: string;
21
- tagPlantId?: string;
22
- notificationId?: string;
23
- notificationTypeId?: string;
24
- notificationIsActive?: boolean;
25
- notificationDescription?: string;
26
- equipment?: string;
27
- equipmentId?: string;
28
- };