@equinor/echo-framework 0.18.0 → 0.18.1

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.18.0",
3
+ "version": "0.18.1",
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",
@@ -11,13 +11,13 @@
11
11
  "@equinor/eds-icons": "0.19.3",
12
12
  "react": ">= 17.0.2",
13
13
  "react-dom": ">= 17.0.2",
14
- "@tanstack/react-query": "5.8.1",
14
+ "@tanstack/react-query": ">= 5.14.2 < 6",
15
15
  "@microsoft/signalr": "7.0.12",
16
16
  "classnames": "2.3.2",
17
17
  "history": "5.3.0",
18
18
  "lodash": "4.17.21",
19
19
  "react-router-dom": "5.3.4",
20
- "zustand": "4.4.6"
20
+ "zustand": ">= 4.4.7 < 5"
21
21
  },
22
22
  "main": "./index.cjs.js",
23
23
  "type": "commonjs"
@@ -8,8 +8,13 @@ export * from './errorBoundary';
8
8
  export * from './externalLinkButton/externalLinkButton';
9
9
  export * from './footer';
10
10
  export * from './fullScreenButtons';
11
+ export * from './labelledValueGrid';
11
12
  export * from './lazyLoading';
13
+ export { ListItem } from './listItem/listItem';
12
14
  export * from './mediator';
15
+ export { OpenIn3dWarningDialog } from './openIn3d/OpenIn3dWarningDialog';
16
+ export { PlantNoSelectionDialog } from './openIn3d/PlantNoSelectionDialog';
17
+ export { SelectedItemsMenu } from './openIn3d/SelectedItemsMenu';
13
18
  export * from './pageMenu';
14
19
  export * from './panel';
15
20
  export * from './panelButton';
@@ -19,8 +24,6 @@ export * from './projectSelector';
19
24
  export * from './realTimeData';
20
25
  export * from './router';
21
26
  export * from './searchMenu';
27
+ export * from './spinner/spinner';
22
28
  export * from './tagNumber';
23
29
  export * from './toaster';
24
- export * from './labelledValueGrid';
25
- export * from './spinner/spinner';
26
- export { ListItem } from './listItem/listItem';
@@ -0,0 +1,7 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ interface OpenIn3dWarningDialogProps {
3
+ open: boolean;
4
+ setIsOpenIn3dWarningDialogOpen: Dispatch<SetStateAction<boolean>>;
5
+ }
6
+ export declare const OpenIn3dWarningDialog: React.FC<OpenIn3dWarningDialogProps>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ interface PlantNoSelectionDialogProps {
3
+ onOKButtonClicked: () => void;
4
+ open: boolean;
5
+ uniquePlantNos: string[];
6
+ selectedPlantNo: string | undefined;
7
+ setSelectedPlantNo: Dispatch<SetStateAction<string | undefined>>;
8
+ isSelectPlantNoDialogOpen: boolean;
9
+ setIsSelectPlantNoDialogOpen: Dispatch<SetStateAction<boolean>>;
10
+ tagNoCounts: Record<string, number>;
11
+ }
12
+ export declare const PlantNoSelectionDialog: React.FC<PlantNoSelectionDialogProps>;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ObjectsToSendTo3dTypes } from '../../utils';
3
+ interface SelectedItemsProps {
4
+ numberOfSelectedRows: number;
5
+ onOpenIn3dButtonClick: (ObjectsToSendTo3d: ObjectsToSendTo3dTypes) => void;
6
+ }
7
+ export declare const SelectedItemsMenu: React.FC<SelectedItemsProps>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ export { OpenIn3dWarningDialog } from './OpenIn3dWarningDialog';
2
+ export { PlantNoSelectionDialog } from './PlantNoSelectionDialog';
3
+ export { SelectedItemsMenu } from './SelectedItemsMenu';
4
+ export { OpenIn3dMenu } from './openIn3dMenu';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ObjectsToSendTo3dTypes } from '../../utils/openIn3d/tagLists';
3
+ interface OpenIn3dMenuProps {
4
+ onOpenIn3dButtonClick: (objectsToSendTo3d: ObjectsToSendTo3dTypes) => void;
5
+ }
6
+ export declare const OpenIn3dMenu: React.FC<OpenIn3dMenuProps>;
7
+ export {};
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  interface EquipmentItemHeaderProps {
3
3
  equipmentId: string;
4
+ tagNo: string;
5
+ plantNo: string;
4
6
  }
5
7
  export declare const EquipmentItemHeader: React.FC<EquipmentItemHeaderProps>;
6
8
  export {};
@@ -0,0 +1,8 @@
1
+ import { Equipment } from '../../types/equipment';
2
+ interface ShowEquipmentIn3DButtonArgs {
3
+ equipment: Equipment;
4
+ tagNo: string;
5
+ plantNo: string;
6
+ }
7
+ export declare const ShowEquipmentIn3DButton: ({ equipment, tagNo, plantNo }: ShowEquipmentIn3DButtonArgs) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -21,3 +21,7 @@ export interface Equipment {
21
21
  readonly createdDate?: string;
22
22
  readonly e3DRef?: string;
23
23
  }
24
+ export declare enum EquipmentCategoryId {
25
+ L = "L",
26
+ M = "M"
27
+ }
@@ -0,0 +1,19 @@
1
+ import { Link } from '@equinor/echo-core';
2
+ import { Equipment } from '../types/equipment';
3
+ import { EquipmentWithMeasuringPoints } from '../types/equipmentWithMeasuringPoints';
4
+ interface OpenMeasuringPointsArgs {
5
+ equipmentId: string;
6
+ e3dRef: string;
7
+ goToLink: Link;
8
+ pathname: string;
9
+ instCode: string;
10
+ tagNo: string;
11
+ plantNo: string;
12
+ }
13
+ export declare const openEquipmentIn3dWeb: ({ equipmentId, e3dRef, goToLink, pathname, instCode, tagNo, plantNo }: OpenMeasuringPointsArgs) => Promise<void>;
14
+ export declare const is3DEquipment: (equipment: Equipment) => boolean;
15
+ export declare const sortMeasurementsInEquipmentWithMeasuringPointsByNewestFirst: (equipmentWithMeasuringPoints: EquipmentWithMeasuringPoints[]) => {
16
+ equipment: Equipment;
17
+ measuringPoints: import("../../measuringPoint").MeasuringPointDto[];
18
+ }[];
19
+ export {};
@@ -1,7 +1,7 @@
1
1
  export type LegendItemStatus = LegendStatus | string;
2
2
  export declare enum LegendStatus {
3
3
  Unknown = "Unknown",
4
- Multiple = "Multiple",
4
+ Multiple = "Multiple",//if status contains plus, eg: PM01+PM02
5
5
  ApiError = "Api Error: Failed to get data for legend",
6
6
  AsBuilt = "AsBuilt",
7
7
  Planned = "Planned",
@@ -5,7 +5,9 @@ export type SetActiveTagNo = (argsORtagNo: string | {
5
5
  instCode?: string;
6
6
  activePanelKey?: string;
7
7
  keepLastNavigationItem?: boolean;
8
- }, activeTagTab?: string, activeTagSubTab?: string, instCode?: string) => void;
8
+ openInPanel?: boolean;
9
+ displayMessageOnItemNotFound?: boolean;
10
+ }, activeTagTab?: string, activeTagSubTab?: string, instCode?: string, openInPanel?: boolean, displayMessageOnItemNotFound?: boolean) => void;
9
11
  export type TagData = [(tagNo: string, instCode: string) => void];
10
12
  export type SetActiveCommPackNo = (argsORcommPackNo: string | {
11
13
  commPackNo: string;
@@ -1,6 +1,7 @@
1
+ export * from './formatTimeHelpers';
1
2
  export * from './navigationUtils';
3
+ export * from './openIn3d';
2
4
  export * from './plantInfo';
3
5
  export * from './previousUtils';
4
6
  export * from './searchUtil';
5
7
  export * from './stringUtils';
6
- export * from './formatTimeHelpers';
@@ -0,0 +1,2 @@
1
+ export { ObjectsToSendTo3dTypes, generateTemporaryTagListObject, getRandomColor, getTemporarilyEchoHubListFor3d } from './tagLists';
2
+ export type { HubListReturnType } from './tagLists';
@@ -0,0 +1,28 @@
1
+ import { TemporaryEchoHubListDto, TemporaryHubResultsList } from '../../types/api-echohub';
2
+ import { EchoHubPlant } from '../../types/echoHubPlant';
3
+ export declare const getTemporarilyEchoHubListFor3d: (instCode: string, request: TemporaryEchoHubListDto, abortSignal?: AbortSignal | undefined, withoutBaseUrl?: boolean | undefined) => Promise<{
4
+ app3dUrl: string;
5
+ web3dUrl: string;
6
+ }>;
7
+ export declare enum ObjectsToSendTo3dTypes {
8
+ workOrders = "workOrders",
9
+ tags = "tags"
10
+ }
11
+ export type HubListReturnType = {
12
+ app3dUrl: string;
13
+ web3dUrl: string;
14
+ };
15
+ /**
16
+ * Function for generating a temporary tag list object, used to open tags in Echo3D
17
+ * @export
18
+ * @param {string} sourceModuleName name of the source module name
19
+ * @param {string} createdBy created by (e.g: user email)
20
+ * @param {EchoHubPlant} plant plant
21
+ * @param {TemporaryHubResultsList[]} tagList tag list
22
+ * @param {string} source source (e.g: Echo)
23
+ * @param {number} timeToLiveSeconds time to live (in seconds) for the temporary list
24
+
25
+ * @return {*} {TemporaryEchoHubListDto} temporary tag list object
26
+ */
27
+ export declare const generateTemporaryTagListObject: (ObjectsToSendTo3d: ObjectsToSendTo3dTypes, sourceModuleName: string, createdBy: string, plant: EchoHubPlant, tagList: TemporaryHubResultsList[], source: string, section?: string | undefined, timeToLiveSeconds?: number) => TemporaryEchoHubListDto;
28
+ export declare function getRandomColor(): string;
@@ -13,7 +13,10 @@ export declare function getEcho3DAppUrlForTag(tagDetails: TagDetailsDto | undefi
13
13
  * @param {TagDetailsDto} tagDetails
14
14
  * @returns {*} {string}
15
15
  */
16
- export declare function getPlantCodeForTag(tagDetails: TagDetailsDto): Promise<string>;
16
+ export declare function getPlantCodeForTag(args: {
17
+ plantNo: string;
18
+ instCode: string;
19
+ }): Promise<string>;
17
20
  /**
18
21
  * Function for getting plant project description based on Tag Details
19
22
  * Returns the plant project description if found, otherwise, return empty string.