@equinor/echo-framework 0.11.6 → 0.11.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.
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SideSheetOrientation } from '@equinor/echo-components';
3
+ import { PrepviewEvents } from './context/PrepviewContext';
3
4
  interface PrepviewProps {
4
5
  instCode: string;
5
6
  orientation: SideSheetOrientation;
@@ -8,7 +9,8 @@ interface PrepviewProps {
8
9
  punchId?: string;
9
10
  closePanel: () => void;
10
11
  workOrderHeaderAction?: React.ReactNode;
12
+ events?: PrepviewEvents;
11
13
  }
12
14
  declare function Prepview(props: PrepviewProps): JSX.Element | null;
13
- export { MaintenanceApiNameForWorkOrders } from './utils';
15
+ export { MaintenanceApiNameForWorkOrders, WorkItemType } from './utils';
14
16
  export { Prepview };
@@ -1,11 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import type { AdditionalDetailsDto, NotificationDetails, WorkOrderDetails } from '../../types';
3
3
  interface Props {
4
- instCode: string;
5
4
  workOrderDetails?: WorkOrderDetails;
6
5
  notificationDetails?: NotificationDetails;
7
6
  additionalDetails: AdditionalDetailsDto;
8
7
  closePanel: () => void;
9
8
  }
10
- declare function AdditionalDetails({ instCode, workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): JSX.Element;
9
+ declare function AdditionalDetails({ workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): JSX.Element;
11
10
  export { AdditionalDetails };
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
2
  import { AdditionalDetailsDto, NotificationDetails, WorkOrderDetails } from '../../../types';
3
3
  interface Props {
4
- instCode: string;
5
4
  workOrderDetails?: WorkOrderDetails;
6
5
  notificationDetails?: NotificationDetails;
7
6
  additionalDetails: AdditionalDetailsDto;
8
7
  closePanel: () => void;
9
8
  }
10
- declare function TabsPanels({ instCode, workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): JSX.Element | null;
9
+ declare function TabsPanels({ workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): JSX.Element | null;
11
10
  interface TabsListProps {
12
11
  tabListRef: React.RefObject<HTMLDivElement>;
13
12
  }
@@ -1,8 +1,14 @@
1
1
  import React from 'react';
2
2
  import { SideSheetOrientation } from '@equinor/echo-components';
3
+ import { WorkItemType } from '../utils';
4
+ export interface PrepviewEvents {
5
+ onClickHistoricItem?: (instCode: string, id: string, type: WorkItemType) => void;
6
+ }
3
7
  interface PrepviewContext {
8
+ instCode: string;
4
9
  orientation: SideSheetOrientation;
5
10
  isWorkOrder: boolean;
11
+ events: PrepviewEvents;
6
12
  }
7
13
  export declare const PrepviewContext: React.Context<PrepviewContext>;
8
14
  export declare const usePrepviewContext: () => PrepviewContext;
@@ -2,9 +2,8 @@
2
2
  import type { NotificationDetails } from '../../types';
3
3
  export interface Props {
4
4
  details: NotificationDetails;
5
- instCode: string;
6
5
  isLoading?: boolean;
7
6
  closePanel: () => void;
8
7
  }
9
- declare function DetailsNotification({ details, instCode, closePanel }: Props): JSX.Element;
8
+ declare function DetailsNotification({ details, closePanel }: Props): JSX.Element;
10
9
  export { DetailsNotification };
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { NotificationDetails } from '../../types';
3
3
  interface HeaderProps {
4
- instCode: string;
5
4
  notification: NotificationDetails;
6
5
  }
7
6
  declare function Header(props: HeaderProps): JSX.Element | null;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { PrepviewNotificationDto } from '../types';
3
3
  interface NotificationProps {
4
- instCode: string;
5
4
  notification: PrepviewNotificationDto;
6
5
  closePanel: () => void;
7
6
  }
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { PrepviewDocumentGroup } from '../../types';
3
3
  interface HorizontalDocumentGroupsProps {
4
- instCode: string;
5
4
  documentGroups: Array<PrepviewDocumentGroup>;
6
5
  tagNo: string;
7
6
  }
8
- declare function HorizontalDocumentGroups({ instCode, documentGroups, tagNo }: HorizontalDocumentGroupsProps): JSX.Element;
7
+ declare function HorizontalDocumentGroups({ documentGroups, tagNo }: HorizontalDocumentGroupsProps): JSX.Element;
9
8
  export { HorizontalDocumentGroups };
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { PrepviewDocument } from '../../types';
3
3
  interface TagDocumentGroupProps {
4
- instCode: string;
5
4
  docType: string;
6
5
  documents: PrepviewDocument[];
7
6
  tagNo: string;
8
7
  }
9
- declare function TagDocumentGroup({ instCode, docType, documents, tagNo }: TagDocumentGroupProps): JSX.Element;
8
+ declare function TagDocumentGroup({ docType, documents, tagNo }: TagDocumentGroupProps): JSX.Element;
10
9
  export { TagDocumentGroup };
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { PrepviewDocument } from '../../types';
3
3
  interface TagDocumentItemProps {
4
- instCode: string;
5
4
  document: PrepviewDocument;
6
5
  tagNo: string;
7
6
  }
8
- declare function TagDocumentItem({ instCode, document, tagNo }: TagDocumentItemProps): JSX.Element;
7
+ declare function TagDocumentItem({ document, tagNo }: TagDocumentItemProps): JSX.Element;
9
8
  export { TagDocumentItem };
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { PrepviewDocumentGroup } from '../../types';
3
3
  interface Props {
4
- instCode: string;
5
4
  documentGroups: Array<PrepviewDocumentGroup>;
6
5
  tagNo: string;
7
6
  }
8
- declare function TagDocumentRefsPanel({ documentGroups, instCode, tagNo }: Props): JSX.Element;
7
+ declare function TagDocumentRefsPanel({ documentGroups, tagNo }: Props): JSX.Element;
9
8
  export { TagDocumentRefsPanel };
@@ -2,9 +2,8 @@
2
2
  import type { PunchDetails } from '../../types';
3
3
  export interface Props {
4
4
  details: PunchDetails;
5
- instCode: string;
6
5
  isLoading?: boolean;
7
6
  closePanel: () => void;
8
7
  }
9
- declare function Details({ details, instCode, closePanel }: Props): JSX.Element;
8
+ declare function Details({ details, closePanel }: Props): JSX.Element;
10
9
  export { Details };
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { PunchDetails } from '../../types';
3
3
  interface HeaderProps {
4
- instCode: string;
5
4
  punch: PunchDetails;
6
5
  }
7
6
  declare function Header(props: HeaderProps): JSX.Element | null;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { PunchDetails } from '../types';
3
3
  interface PunchProps {
4
- instCode: string;
5
4
  punch: PunchDetails;
6
5
  closePanel: () => void;
7
6
  }
@@ -23,6 +23,7 @@ export type WorkOrderDetails = FetchStatus & {
23
23
  description: string;
24
24
  equipmentId: string;
25
25
  id: string;
26
+ isActive: boolean;
26
27
  locationId: string;
27
28
  longText: string;
28
29
  tagId: string;
@@ -2,9 +2,8 @@
2
2
  import type { WorkOrderDetails } from '../../types';
3
3
  export interface Props {
4
4
  details: WorkOrderDetails;
5
- instCode: string;
6
5
  isLoading?: boolean;
7
6
  closePanel: () => void;
8
7
  }
9
- declare function DetailsWorkOrder({ details, instCode, closePanel }: Props): JSX.Element;
8
+ declare function DetailsWorkOrder({ details, closePanel }: Props): JSX.Element;
10
9
  export { DetailsWorkOrder };
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { WorkOrderDetails } from '../../types';
3
3
  interface WorkOrderHeaderProps {
4
- instCode: string;
5
4
  workOrder: WorkOrderDetails;
6
5
  workOrderHeaderAction?: React.ReactNode;
7
6
  }
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PrepviewWorkOrderDto } from '../types';
3
3
  interface WorkOrderProps {
4
- instCode: string;
5
4
  workOrder: PrepviewWorkOrderDto;
6
5
  closePanel: () => void;
7
6
  workOrderHeaderAction?: React.ReactNode;