@equinor/echo-framework 0.18.8 → 0.18.10

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 (38) hide show
  1. package/index.cjs.js +1 -1
  2. package/package.json +1 -1
  3. package/src/index.d.ts +1 -0
  4. package/src/lib/components/index.d.ts +1 -1
  5. package/src/lib/components/prepview/Prepview.d.ts +7 -4
  6. package/src/lib/components/prepview/api/api.d.ts +3 -1
  7. package/src/lib/components/prepview/api/resources.d.ts +2 -0
  8. package/src/lib/components/prepview/common/additionalInformation/AdditionalDetails.d.ts +1 -2
  9. package/src/lib/components/prepview/common/additionalInformation/tabsPanels/NotificationPanels.d.ts +1 -2
  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 +1 -2
  12. package/src/lib/components/prepview/common/contentPicker/ContentPicker.d.ts +2 -1
  13. package/src/lib/components/prepview/common/info/index.d.ts +1 -0
  14. package/src/lib/components/prepview/common/info/label/InfoLabel.d.ts +5 -0
  15. package/src/lib/components/prepview/common/info/label/index.d.ts +1 -0
  16. package/src/lib/components/prepview/context/PrepviewContext.d.ts +4 -4
  17. package/src/lib/components/prepview/hooks/index.d.ts +0 -1
  18. package/src/lib/components/prepview/notification/Notification.d.ts +0 -1
  19. package/src/lib/components/prepview/notification/details/DetailsNotification.d.ts +1 -2
  20. package/src/lib/components/prepview/panels/history/items/Items.d.ts +1 -1
  21. package/src/lib/components/prepview/panels/history/items/PunchItem.d.ts +1 -1
  22. package/src/lib/components/prepview/panels/tagDocumentRefs/HorizontalDocumentGroups.d.ts +1 -1
  23. package/src/lib/components/prepview/punch/Punch.d.ts +0 -1
  24. package/src/lib/components/prepview/punch/details/Details.d.ts +2 -3
  25. package/src/lib/components/prepview/types/notification.d.ts +5 -0
  26. package/src/lib/components/prepview/types/shared.d.ts +7 -11
  27. package/src/lib/components/prepview/types/workorder.d.ts +5 -0
  28. package/src/lib/components/prepview/workorder/WorkOrder.d.ts +0 -1
  29. package/src/lib/components/prepview/workorder/details/DetailsWorkOrder.d.ts +1 -2
  30. package/src/lib/components/prepviewButton/index.d.ts +1 -0
  31. package/src/lib/components/prepviewButton/prepviewButton.d.ts +7 -0
  32. package/src/lib/types/eventTypes/index.d.ts +2 -0
  33. package/src/lib/types/eventTypes/onClickTagsTrigger.d.ts +3 -0
  34. package/src/lib/types/eventTypes/onMainSearchTriggerEvent.d.ts +3 -0
  35. package/src/lib/types/eventTypes/prepviewEvent.d.ts +5 -0
  36. package/src/lib/types/navigation/internalApplicationLinks.d.ts +1 -2
  37. package/src/lib/components/listItem/listItem.d.ts +0 -14
  38. package/src/lib/components/prepview/hooks/useSetActiveSearchItem.d.ts +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.18.8",
3
+ "version": "0.18.10",
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
@@ -4,6 +4,7 @@ import { getLegendStatusColor } from './lib/feature/legend/utils/legendUtils';
4
4
  import './lib/globalStyles.css';
5
5
  import { getPlantsInfo, getTagDetails } from './lib/services/api';
6
6
  export * from './lib/components';
7
+ export { PrepviewButton } from './lib/components/prepviewButton/prepviewButton';
7
8
  export { RequestProCoSysAccess } from './lib/components/requestAccess/RequestProCoSysAccess';
8
9
  export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAccess';
9
10
  export * from './lib/coreApplication';
@@ -10,7 +10,6 @@ export * from './footer';
10
10
  export * from './fullScreenButtons';
11
11
  export * from './labelledValueGrid';
12
12
  export * from './lazyLoading';
13
- export { ListItem } from './listItem/listItem';
14
13
  export * from './listItemAdditionalInfoRow/listItemAdditionalInfoRow';
15
14
  export * from './mediator';
16
15
  export { OpenIn3dWarningDialog } from './openIn3d/OpenIn3dWarningDialog';
@@ -21,6 +20,7 @@ export * from './panel';
21
20
  export * from './panelButton';
22
21
  export * from './plantSelector';
23
22
  export * from './prepview';
23
+ export * from './prepviewButton';
24
24
  export * from './projectSelector';
25
25
  export * from './realTimeData';
26
26
  export * from './router';
@@ -1,6 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ColorMap, SideSheetOrientation, WorkOrderDateType } from '@equinor/echo-components';
3
- import { PrepviewEvents } from './context/PrepviewContext';
3
+ import { WorkItemType } from './utils';
4
+ import { HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes } from './types';
4
5
  interface PrepviewProps {
5
6
  orientation: SideSheetOrientation;
6
7
  instCode?: string;
@@ -8,12 +9,14 @@ interface PrepviewProps {
8
9
  workOrderOperationId?: string;
9
10
  notificationId?: string;
10
11
  punchId?: string;
11
- closePanel: () => void;
12
+ tagClicked: (tagId: string, instCode: string) => void;
13
+ packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
14
+ historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
12
15
  headerAction?: React.ReactNode;
13
- events?: PrepviewEvents;
14
16
  colorMap?: ColorMap;
15
17
  workOrderDateType?: WorkOrderDateType;
16
18
  }
17
19
  declare function Prepview(props: PrepviewProps): JSX.Element | null;
18
20
  export { MaintenanceApiNameForWorkOrders, WorkItemType } from './utils';
21
+ export * from './types/shared';
19
22
  export { Prepview };
@@ -1,7 +1,9 @@
1
- import { NotificationDetails, PrepviewAttachment, PrepviewDocumentGroup, PrepviewHistory, PrepviewObject, PrepviewOperation, PrepviewSafety, PrepviewTagInformation, PunchDetails, WorkOrderDetails } from '../types';
1
+ import { NotificationDetails, PrepviewAttachment, PrepviewDocumentGroup, PrepviewHistory, PrepviewObject, PrepviewOperation, PrepviewSafety, PrepviewTagInformation, PunchDetails, SubseaNotificationDetails, SubseaWorkOrderDetails, WorkOrderDetails } from '../types';
2
2
  export declare function getWorkOrderDetails(workOrderId: string): Promise<WorkOrderDetails>;
3
+ export declare function getSubseaWorkOrderDetails(workOrderId: string): Promise<SubseaWorkOrderDetails>;
3
4
  export declare function getWorkType(workOrderId: string): Promise<string[]>;
4
5
  export declare function getNotificationDetails(notificationId: string): Promise<NotificationDetails>;
6
+ export declare function getSubseaNotificationDetails(notificationId: string): Promise<SubseaNotificationDetails>;
5
7
  export declare function getPunchDetails(instCode: string, punchId: string): Promise<PunchDetails>;
6
8
  export declare function getTagInformation(itemId: string, isWorkOrder?: boolean): Promise<PrepviewTagInformation>;
7
9
  export declare function getAttachments(itemId: string, isWorkOrder?: boolean): Promise<PrepviewAttachment[]>;
@@ -1,6 +1,8 @@
1
1
  export declare function getWorkOrder(workOrderId: string): string;
2
+ export declare function getSubseaWorkOrder(workOrderId: string): string;
2
3
  export declare function getWorkTypeUrl(workOrderId: string): string;
3
4
  export declare function getNotification(maintenanceRecordId: string): string;
5
+ export declare function getSubseaNotification(maintenanceRecordId: string): string;
4
6
  export declare function getPunch(instCode: string, punchId: string): string;
5
7
  export declare function getTagInformation(itemId: string, isWorkOrder?: boolean): string;
6
8
  export declare function getAttachments(itemId: string, isWorkOrder?: boolean): string;
@@ -2,7 +2,6 @@ import type { NotificationDetails, WorkOrderDetails } from '../../types';
2
2
  interface Props {
3
3
  workOrderDetails?: WorkOrderDetails;
4
4
  notificationDetails?: NotificationDetails;
5
- closePanel: () => void;
6
5
  }
7
- declare function AdditionalDetails({ workOrderDetails, notificationDetails, closePanel, }: Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function AdditionalDetails({ workOrderDetails, notificationDetails, }: Props): import("react/jsx-runtime").JSX.Element;
8
7
  export { AdditionalDetails };
@@ -1,7 +1,6 @@
1
1
  import { NotificationDetails } from '../../../types';
2
2
  interface NotificationPanelsProps {
3
3
  details: NotificationDetails;
4
- closePanel: () => void;
5
4
  }
6
- declare function NotificationPanels({ details, closePanel }: NotificationPanelsProps): import("react/jsx-runtime").JSX.Element;
5
+ declare function NotificationPanels({ details }: NotificationPanelsProps): import("react/jsx-runtime").JSX.Element;
7
6
  export { NotificationPanels };
@@ -1,11 +1,10 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { NotificationDetails, WorkOrderDetails } from '../../../types';
3
3
  interface Props {
4
4
  workOrderDetails?: WorkOrderDetails;
5
5
  notificationDetails?: NotificationDetails;
6
- closePanel: () => void;
7
6
  }
8
- declare function TabsPanels({ workOrderDetails, notificationDetails, closePanel, }: Props): import("react/jsx-runtime").JSX.Element | null;
7
+ declare function TabsPanels({ workOrderDetails, notificationDetails }: Props): import("react/jsx-runtime").JSX.Element | null;
9
8
  interface TabsListProps {
10
9
  tabListRef: React.RefObject<HTMLDivElement>;
11
10
  }
@@ -1,7 +1,6 @@
1
1
  import { WorkOrderDetails } from '../../../types';
2
2
  interface WorkOrderPanelsProps {
3
3
  details: WorkOrderDetails;
4
- closePanel: () => void;
5
4
  }
6
- declare function WorkOrderPanels({ details, closePanel }: WorkOrderPanelsProps): import("react/jsx-runtime").JSX.Element;
5
+ declare function WorkOrderPanels({ details }: WorkOrderPanelsProps): import("react/jsx-runtime").JSX.Element;
7
6
  export { WorkOrderPanels };
@@ -3,6 +3,7 @@ import type { ContentPickerGroup } from '../../types';
3
3
  interface ContentPickerProps {
4
4
  groups: ContentPickerGroup[];
5
5
  listItemStyle?: CSSProperties;
6
+ infoLabelText?: string;
6
7
  }
7
- declare function ContentPicker({ groups, listItemStyle }: ContentPickerProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function ContentPicker({ groups, listItemStyle, infoLabelText, }: ContentPickerProps): import("react/jsx-runtime").JSX.Element;
8
9
  export { ContentPicker };
@@ -1,3 +1,4 @@
1
1
  export * from './block';
2
2
  export * from './section';
3
3
  export * from './list';
4
+ export * from './label';
@@ -0,0 +1,5 @@
1
+ interface InfoLabelProps {
2
+ text: string;
3
+ }
4
+ declare function InfoLabel({ text }: InfoLabelProps): import("react/jsx-runtime").JSX.Element;
5
+ export { InfoLabel };
@@ -0,0 +1 @@
1
+ export * from './InfoLabel';
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import { ColorMap, SideSheetOrientation } from '@equinor/echo-components';
3
+ import { HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem, ItemTypes } from '../types';
3
4
  import { WorkItemType } from '../utils';
4
- export interface PrepviewEvents {
5
- onClickHistoricItem?: (instCode: string, id: string, type: WorkItemType) => void;
6
- }
7
5
  interface PrepviewContext {
8
6
  instCode: string;
9
7
  orientation: SideSheetOrientation;
10
8
  isWorkOrder: boolean;
11
9
  workOrderOperationId?: string;
12
- events: PrepviewEvents;
13
10
  colorMap?: ColorMap;
11
+ tagClicked: (tagId: string, instCode: string) => void;
12
+ packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
13
+ historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
14
14
  }
15
15
  export declare const PrepviewContext: React.Context<PrepviewContext>;
16
16
  export declare const usePrepviewContext: () => PrepviewContext;
@@ -1,4 +1,3 @@
1
1
  export * from './useFetch';
2
2
  export * from './useOnClickDownload';
3
3
  export * from './useIsMobile';
4
- export * from './useSetActiveSearchItem';
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  interface NotificationProps {
3
3
  notificationId: string;
4
- closePanel: () => void;
5
4
  headerAction?: React.ReactNode;
6
5
  }
7
6
  declare function Notification(props: NotificationProps): JSX.Element | null;
@@ -3,7 +3,6 @@ import type { NotificationDetails } from '../../types';
3
3
  export interface Props {
4
4
  details: NotificationDetails;
5
5
  isLoading?: boolean;
6
- closePanel: () => void;
7
6
  }
8
- declare function DetailsNotification({ details, closePanel }: Props): JSX.Element;
7
+ declare function DetailsNotification({ details }: Props): JSX.Element;
9
8
  export { DetailsNotification };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { HistoricNotificationItem, HistoricWorkOrderItem, HistoricPunchItem } from '../../../types';
3
3
  import { WorkItemType } from '../../../utils';
4
4
  type Items = Array<HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem>;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { HistoricPunchItem } from '../../../types';
3
3
  interface PunchProps {
4
4
  punch: HistoricPunchItem;
@@ -3,5 +3,5 @@ interface HorizontalDocumentGroupsProps {
3
3
  documentGroups: Array<PrepviewDocumentGroup>;
4
4
  tagNo: string;
5
5
  }
6
- declare function HorizontalDocumentGroups({ documentGroups, tagNo }: HorizontalDocumentGroupsProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function HorizontalDocumentGroups({ documentGroups, tagNo, }: HorizontalDocumentGroupsProps): import("react/jsx-runtime").JSX.Element;
7
7
  export { HorizontalDocumentGroups };
@@ -2,7 +2,6 @@
2
2
  interface PunchProps {
3
3
  punchId: string;
4
4
  instCode: string;
5
- closePanel: () => void;
6
5
  }
7
6
  declare function Punch(props: PunchProps): JSX.Element | null;
8
7
  export { Punch };
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { PunchDetails } from '../../types';
2
+ import { PunchDetails } from '../../types';
3
3
  export interface Props {
4
4
  details: PunchDetails;
5
5
  isLoading?: boolean;
6
- closePanel: () => void;
7
6
  }
8
- declare function Details({ details, closePanel }: Props): JSX.Element;
7
+ declare function Details({ details }: Props): JSX.Element;
9
8
  export { Details };
@@ -28,3 +28,8 @@ export type NotificationDetails = FetchStatus & {
28
28
  longText: string;
29
29
  instCode: string;
30
30
  };
31
+ export type SubseaNotificationDetails = FetchStatus & {
32
+ hasAttachment: boolean;
33
+ hasB30Document: boolean;
34
+ hasActivityLongText: boolean;
35
+ };
@@ -1,5 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { FileDto } from "@equinor/echo-search";
3
+ export declare enum ItemTypes {
4
+ tag = "tag",
5
+ mcPack = "mcPack",
6
+ commPack = "commPack"
7
+ }
3
8
  export type FetchStatus = {
4
9
  statusCode?: 'Forbidden' | number;
5
10
  };
@@ -107,17 +112,7 @@ export type HistoricWorkOrderItem = {
107
112
  };
108
113
  export type PunchGroup = {
109
114
  type: string;
110
- items: [
111
- {
112
- id: string;
113
- type: string;
114
- statusId: string;
115
- tagNo: string;
116
- tagArea: string;
117
- description: string;
118
- updatedAt: Date;
119
- }
120
- ];
115
+ items: HistoricPunchItem[];
121
116
  };
122
117
  export type HistoricPunchItem = {
123
118
  id: string;
@@ -127,4 +122,5 @@ export type HistoricPunchItem = {
127
122
  tagArea: string;
128
123
  description: string;
129
124
  updatedAt: Date;
125
+ instCode: string;
130
126
  };
@@ -34,6 +34,11 @@ export type WorkOrderDetails = FetchStatus & {
34
34
  longText: string;
35
35
  instCode: string;
36
36
  };
37
+ export type SubseaWorkOrderDetails = FetchStatus & {
38
+ hasPrts: boolean;
39
+ hasB30Document: boolean;
40
+ recordTypeIds?: string[];
41
+ };
37
42
  export type PrepviewOperation = {
38
43
  operationNumber: string;
39
44
  title: string;
@@ -2,7 +2,6 @@
2
2
  import { ColorMap, WorkOrderDateType } from '@equinor/echo-components';
3
3
  interface WorkOrderProps {
4
4
  workOrderId: string;
5
- closePanel: () => void;
6
5
  headerAction?: React.ReactNode;
7
6
  colorMap?: ColorMap;
8
7
  workOrderDateType?: WorkOrderDateType;
@@ -3,7 +3,6 @@ import type { WorkOrderDetails } from '../../types';
3
3
  export interface Props {
4
4
  workOrderDetails: WorkOrderDetails;
5
5
  isLoading?: boolean;
6
- closePanel: () => void;
7
6
  }
8
- declare function DetailsWorkOrder({ workOrderDetails, closePanel }: Props): JSX.Element;
7
+ declare function DetailsWorkOrder({ workOrderDetails }: Props): JSX.Element;
9
8
  export { DetailsWorkOrder };
@@ -0,0 +1 @@
1
+ export * from './prepviewButton';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface PrepviewButtonProps {
3
+ workOrderId?: string | undefined;
4
+ notificationId?: string | undefined;
5
+ punchId?: string | undefined;
6
+ }
7
+ export declare const PrepviewButton: React.FC<PrepviewButtonProps>;
@@ -1,7 +1,9 @@
1
1
  export type { FullScreenModeEvent } from './fullScreenModeEvent';
2
2
  export type { LeftPanelNavigationUpdateEvent } from './leftPanelNavigationUpdateEvent';
3
3
  export type { LegendChangedEvent, LegendStatusesChangedEvent } from './legendEvent';
4
+ export type { OnMainSearchTriggerEvent } from './onMainSearchTriggerEvent';
4
5
  export type { PlantEvent } from './plantEvent';
6
+ export type { PrepviewEvent } from './prepviewEvent';
5
7
  export type { SearchItemDetailsClosedEvent } from './searchDetailsContainerEvents';
6
8
  export type { SetMainSearchTextEvent } from './setMainSearchTextEvent';
7
9
  export type { ToasterEvent } from './toasterEvent';
@@ -0,0 +1,3 @@
1
+ export interface OnClickTagsTriggerEvent {
2
+ tagId: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface OnMainSearchTriggerEvent {
2
+ searchText: string;
3
+ }
@@ -0,0 +1,5 @@
1
+ export interface PrepviewEvent {
2
+ notificationId?: string;
3
+ workOrderId?: string;
4
+ punchId?: string;
5
+ }
@@ -1,8 +1,7 @@
1
1
  export declare enum InternalApplicationLinks {
2
2
  Ayelix = "/ayelix",
3
3
  Events = "/events",
4
- OfflineCamera = "/camera",
5
- OnlineCamera = "/newcamera",
4
+ TagScanner = "/tagscanner",
6
5
  MyTasks = "/MyTasks",
7
6
  Media = "/media",
8
7
  MissionPlanner = "/missionplanner",
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- interface ListItemProps {
3
- title: string;
4
- showIcon?: boolean;
5
- iconName?: string;
6
- iconColor?: string;
7
- iconBackgroundColor?: string;
8
- visualText?: string;
9
- description?: string;
10
- additionalInfo?: JSX.Element;
11
- label?: JSX.Element;
12
- }
13
- export declare const ListItem: React.FC<ListItemProps>;
14
- export {};
@@ -1,10 +0,0 @@
1
- export declare enum ItemTypes {
2
- tag = "tag",
3
- mcPack = "mcPack",
4
- commPack = "commPack"
5
- }
6
- type ActiveSearchFunction = (type: ItemTypes, itemNumber: string, instCode: string) => void;
7
- type ActivePackageSearchFunction = (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
8
- export declare function useSetActiveSearchItem(): ActiveSearchFunction;
9
- export declare function useSetActivePackageItemInState(): ActivePackageSearchFunction;
10
- export {};