@equinor/echo-framework 0.15.1 → 0.15.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.6.12 < 0.7.0",
6
6
  "@equinor/echo-components": ">= 0.8.0 < 0.9.0",
package/src/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { getPlantsInfo, getTagDetails } from './lib/services/api';
4
4
  import './lib/theme/theme.css';
5
5
  import { getLegendStatusColor } from './lib/utils/legendUtils';
6
6
  export * from './lib/components';
7
+ export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAccess';
7
8
  export * from './lib/coreApplication';
8
9
  export { RegisteredHookName } from './lib/hooks/hookLibrary';
9
10
  export { useIsCompactLayout } from './lib/hooks/useIsCompactLayout';
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  import { SideSheetOrientation } from '@equinor/echo-components';
3
3
  import { PrepviewEvents } from './context/PrepviewContext';
4
4
  interface PrepviewProps {
5
- instCode: string;
6
5
  orientation: SideSheetOrientation;
6
+ instCode?: string;
7
7
  workOrderId?: string;
8
+ workOrderOperationId?: string;
8
9
  notificationId?: string;
9
10
  punchId?: string;
10
11
  closePanel: () => void;
@@ -1,7 +1,7 @@
1
1
  import { PrepviewNotificationDto, PrepviewWorkOrderDto, PunchDetails } from '../types';
2
2
  import * as workOrderApi from './attachment';
3
3
  export { workOrderApi };
4
- export declare function getWorkOrder(instCode: string, workOrderId: string): Promise<PrepviewWorkOrderDto>;
4
+ export declare function getWorkOrder(workOrderId: string): Promise<PrepviewWorkOrderDto>;
5
5
  export declare function getNotification(instCode: string, notificationId: string): Promise<PrepviewNotificationDto>;
6
6
  export declare function getPunch(instCode: string, punchId: string): Promise<PunchDetails>;
7
7
  export declare function getWorkType(instCode: string, workOrderId: string): Promise<string[]>;
@@ -1,4 +1,4 @@
1
- export declare function getWorkOrder(instCode: string, workOrderId: string): string;
1
+ export declare function getWorkOrder(workOrderId: string): string;
2
2
  export declare function getNotification(instCode: string, notificationId: string): string;
3
3
  export declare function getPunch(instCode: string, punchId: string): string;
4
4
  export declare function getWorkTypeUrl(instCode: string, workOrderId: string): string;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  type RequestAccessProps = {
3
3
  padding?: boolean;
4
4
  };
5
- declare const RequestAccess: React.FC<RequestAccessProps>;
6
- export { RequestAccess };
5
+ export declare const RequestAccess: React.FC<RequestAccessProps>;
6
+ export {};
@@ -5,5 +5,5 @@ interface Props {
5
5
  additionalDetails: AdditionalDetailsDto;
6
6
  closePanel: () => void;
7
7
  }
8
- declare function AdditionalDetails({ workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): import("react/jsx-runtime").JSX.Element;
8
+ declare function AdditionalDetails({ workOrderDetails, notificationDetails, additionalDetails, closePanel, }: Props): import("react/jsx-runtime").JSX.Element;
9
9
  export { AdditionalDetails };
@@ -6,7 +6,7 @@ interface Props {
6
6
  additionalDetails: AdditionalDetailsDto;
7
7
  closePanel: () => void;
8
8
  }
9
- declare function TabsPanels({ workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): import("react/jsx-runtime").JSX.Element | null;
9
+ declare function TabsPanels({ workOrderDetails, notificationDetails, additionalDetails, closePanel, }: Props): import("react/jsx-runtime").JSX.Element | null;
10
10
  interface TabsListProps {
11
11
  tabListRef: React.RefObject<HTMLDivElement>;
12
12
  }
@@ -8,6 +8,7 @@ interface PrepviewContext {
8
8
  instCode: string;
9
9
  orientation: SideSheetOrientation;
10
10
  isWorkOrder: boolean;
11
+ workOrderOperationId?: string;
11
12
  events: PrepviewEvents;
12
13
  }
13
14
  export declare const PrepviewContext: React.Context<PrepviewContext>;
@@ -1,6 +1,7 @@
1
1
  import { PrepviewOperation } from '../../types';
2
2
  interface Props {
3
3
  operations: PrepviewOperation[];
4
+ workOrderId: string;
4
5
  }
5
- declare function OperationsPanel({ operations }: Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function OperationsPanel({ operations, workOrderId }: Props): import("react/jsx-runtime").JSX.Element;
6
7
  export { OperationsPanel };
@@ -38,6 +38,7 @@ export type WorkOrderDetails = FetchStatus & {
38
38
  system: string;
39
39
  priority: string;
40
40
  priorityId: string;
41
+ instCode: string;
41
42
  plantId: string;
42
43
  };
43
44
  export type WorkOrderAdditionalDetails = {
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ applyForAccessUrl: string;
4
+ buttonLabel?: string;
5
+ className?: string;
6
+ onClicked?: () => void;
7
+ }
8
+ export declare const RequestAccessButton: React.FC<React.PropsWithChildren<Props>>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type RequestSapAccessProps = {
3
+ padding?: boolean;
4
+ onClicked?: () => void;
5
+ };
6
+ export declare const RequestSapAccess: React.FC<RequestSapAccessProps>;
7
+ export {};