@equinor/echo-framework 0.20.5-beta9 → 0.20.5
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/index.cjs.js +1 -1
- package/package.json +2 -2
- package/src/index.d.ts +7 -0
- package/src/lib/components/fullScreenButtons/FullScreenChip.d.ts +0 -1
- package/src/lib/components/fullScreenButtons/FullScreenModeButton.d.ts +0 -1
- package/src/lib/components/fullScreenButtons/FullScreenModeChip.d.ts +5 -0
- package/src/lib/components/fullScreenButtons/index.d.ts +1 -1
- package/src/lib/components/index.d.ts +1 -1
- package/src/lib/components/prepview/Prepview.d.ts +2 -0
- package/src/lib/components/prepview/common/index.d.ts +1 -0
- package/src/lib/components/prepview/common/info/description/DescriptionBlock.d.ts +10 -0
- package/src/lib/components/prepview/common/info/description/index.d.ts +1 -0
- package/src/lib/components/prepview/common/info/index.d.ts +1 -0
- package/src/lib/components/prepview/common/showMore/ShowMoreButton.d.ts +6 -0
- package/src/lib/components/prepview/common/showMore/index.d.ts +1 -0
- package/src/lib/components/prepview/context/PrepviewContext.d.ts +2 -0
- package/src/lib/components/prepview/panels/history/items/Items.d.ts +1 -1
- package/src/lib/components/prepview/types/shared.d.ts +1 -0
- package/src/lib/components/prepview/types/workorder.d.ts +1 -0
- package/src/lib/components/prepview/utils/enums/tagHistoryItem.d.ts +2 -1
- package/src/lib/components/tagSearchDropDown/index.d.ts +1 -0
- package/src/lib/components/tagSearchDropDown/tagSearchDropDown.d.ts +9 -0
- package/src/lib/feature/equipment/components/equipmentItemHeader/showEquipmentIn3dButton.d.ts +1 -2
- package/src/lib/feature/equipment/types/equipment.d.ts +2 -2
- package/src/lib/feature/equipment/utils/equipmentUtils.d.ts +1 -2
- package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +15 -4
- package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +3 -3
- package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStoreHelpers.d.ts +10 -0
- package/src/lib/feature/globalSelection/panToEcho3d/panTo3DButton.d.ts +7 -0
- package/src/lib/feature/globalSelection/panToEcho3d/usePanTo3DWeb.d.ts +4 -0
- package/src/lib/feature/measuringPoint/components/index.d.ts +0 -1
- package/src/lib/feature/measuringPoint/index.d.ts +1 -1
- package/src/lib/feature/openItemsIn3d/index.d.ts +2 -1
- package/src/lib/feature/openItemsIn3d/logic/convertToPlantTagPairs.d.ts +10 -0
- package/src/lib/feature/openItemsIn3d/logic/createEcho3dInternalLink.d.ts +11 -0
- package/src/lib/feature/openItemsIn3d/{openItemsIn3d.utils.d.ts → logic/openItemsIn3d.utils.d.ts} +17 -10
- package/src/lib/feature/openItemsIn3d/openItemsIn3dDialog.d.ts +4 -11
- package/src/lib/feature/openItemsIn3d/plantNoSelectionDialog.d.ts +5 -4
- package/src/lib/hooks/index.d.ts +1 -0
- package/src/lib/hooks/useFetchInstCodeBySapPlantId.d.ts +3 -0
- package/src/lib/services/dataLayerPanel/dataLayerPanel.store.d.ts +43 -0
- package/src/lib/services/dataLayerPanel/index.d.ts +1 -0
- package/src/lib/types/echoHubPlant.d.ts +1 -1
- package/src/lib/utils/getPdmsPlantCodeForTag.d.ts +6 -0
- package/src/lib/utils/index.d.ts +1 -1
- package/src/lib/utils/openIn3d/tagLists.d.ts +10 -4
- package/src/lib/utils/plantInfo.d.ts +9 -20
- package/src/lib/utils/workOrderUtils.d.ts +1 -0
- package/src/lib/components/echo3DButton/3dButtonUtils.d.ts +0 -12
- package/src/lib/components/echo3DButton/OpenIn3dDropdown.d.ts +0 -11
- package/src/lib/components/echo3DButton/echo3DButton.d.ts +0 -18
- package/src/lib/components/echo3DButton/echo3DIconButton.d.ts +0 -26
- package/src/lib/components/echo3DButton/icons/E3DWebBetaIcon.d.ts +0 -6
- package/src/lib/components/echo3DButton/index.d.ts +0 -2
- package/src/lib/components/echo3DButton/missingEcho3dAccessDialog.d.ts +0 -8
- package/src/lib/components/echo3DButton/plantNotAvailableInfo.d.ts +0 -6
- package/src/lib/components/echo3DButton/useGetOpenIn3d.d.ts +0 -5
- package/src/lib/components/echo3DButton/useGoToEcho3DWebLink.d.ts +0 -1
- package/src/lib/components/fullScreenButtons/FullScreenButton.d.ts +0 -7
- package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointDetails.logic.d.ts +0 -2
- package/src/lib/utils/tagUtils.d.ts +0 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "0.20.5
|
|
3
|
+
"version": "0.20.5",
|
|
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",
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
},
|
|
23
23
|
"main": "./index.cjs.js",
|
|
24
24
|
"type": "commonjs"
|
|
25
|
-
}
|
|
25
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -11,11 +11,13 @@ export * from './lib/coreApplication';
|
|
|
11
11
|
export * from './lib/feature/equipment/index';
|
|
12
12
|
export * from './lib/feature/globalSelection';
|
|
13
13
|
export type { GlobalSelectionItem, OptimizedWorkOrderDto } from './lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types';
|
|
14
|
+
export { PanTo3DButton } from './lib/feature/globalSelection/panToEcho3d/panTo3DButton';
|
|
14
15
|
export * from './lib/feature/legend/index';
|
|
15
16
|
export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from './lib/feature/measuringPoint/components/measuringPoints.utils';
|
|
16
17
|
export * from './lib/feature/measuringPoint/index';
|
|
17
18
|
export * from './lib/feature/measuringPoint/types/measuringPoint';
|
|
18
19
|
export * from './lib/feature/openItemsIn3d';
|
|
20
|
+
export { createEcho3dInternalLink } from './lib/feature/openItemsIn3d/logic/createEcho3dInternalLink';
|
|
19
21
|
export { SelectedItemsMenu } from './lib/feature/openItemsIn3d/SelectedItemsMenu';
|
|
20
22
|
export { RegisteredHookName } from './lib/hooks/hookLibrary';
|
|
21
23
|
export { useIsCompactLayout } from './lib/hooks/useIsCompactLayout';
|
|
@@ -24,6 +26,7 @@ export { useScreenOrientation } from './lib/hooks/useScreenOrientation';
|
|
|
24
26
|
export { useScreenValues } from './lib/hooks/useScreenValues';
|
|
25
27
|
export { getPlantsCachedOrApi, getPlantsFromApi } from './lib/services/api/api-plants';
|
|
26
28
|
export { RegisteredComponentName } from './lib/services/componentRegistry/componentRegistry';
|
|
29
|
+
export * from './lib/services/dataLayerPanel';
|
|
27
30
|
export * from './lib/services/eventHubActions';
|
|
28
31
|
export * from './lib/services/leftPanelNavigation';
|
|
29
32
|
export * from './lib/theme/themeConst';
|
|
@@ -38,6 +41,7 @@ export { InternalApplicationLinks } from './lib/types/navigation/internalApplica
|
|
|
38
41
|
export { PingableSources } from './lib/types/pingableSources';
|
|
39
42
|
export { SearchItemDetailsType as searchItemDetailsType } from './lib/types/searchItemDetailsType';
|
|
40
43
|
export * from './lib/utils';
|
|
44
|
+
export { getPdmsPlantCodeForTag } from './lib/utils/getPdmsPlantCodeForTag';
|
|
41
45
|
export { convertPathNameToReadableString } from './lib/utils/moduleNameUtils';
|
|
42
46
|
export * from './lib/utils/startup';
|
|
43
47
|
export declare const registerEchopediaComponent: ({ name, component }: {
|
|
@@ -65,6 +69,9 @@ declare const EchoFramework: Readonly<{
|
|
|
65
69
|
useEchoHistory(): (path: string, params?: {
|
|
66
70
|
[key: string]: string;
|
|
67
71
|
} | undefined, state?: any) => void;
|
|
72
|
+
useFetchInstCodeBySapPlantId: (args: {
|
|
73
|
+
sapPlantId: string | undefined;
|
|
74
|
+
}) => string | undefined;
|
|
68
75
|
useHas3dAccess(plantCode?: string): boolean;
|
|
69
76
|
useIsFullScreenModeEnabled(): boolean;
|
|
70
77
|
useOpenPdfFile(): (args: {
|
|
@@ -2,7 +2,6 @@ export * from './appLinks';
|
|
|
2
2
|
export * from './containers';
|
|
3
3
|
export * from './contextualAppLinks/externalLinkButtons/index';
|
|
4
4
|
export { ContextualAppLinks } from './contextualAppLinks/index';
|
|
5
|
-
export * from './echo3DButton';
|
|
6
5
|
export * from './echoLogo';
|
|
7
6
|
export * from './errorBoundary';
|
|
8
7
|
export * from './externalLinkButton/externalLinkButton';
|
|
@@ -24,5 +23,6 @@ export * from './router';
|
|
|
24
23
|
export * from './searchMenu';
|
|
25
24
|
export * from './spinner/spinner';
|
|
26
25
|
export * from './tagNumber';
|
|
26
|
+
export * from './tagSearchDropDown';
|
|
27
27
|
export * from './toaster';
|
|
28
28
|
export { WorkOrderListItem } from './workOrderListItem';
|
|
@@ -12,6 +12,8 @@ interface PrepviewProps {
|
|
|
12
12
|
tagClicked: (tagId: string, instCode: string) => void;
|
|
13
13
|
packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
|
|
14
14
|
historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
|
|
15
|
+
objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
|
|
16
|
+
showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
|
|
15
17
|
headerAction?: React.ReactNode;
|
|
16
18
|
colorMap?: ColorMap;
|
|
17
19
|
workOrderDateType?: WorkOrderDateType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WorkItemType } from '../../../utils';
|
|
2
|
+
export interface Props {
|
|
3
|
+
itemId: string;
|
|
4
|
+
itemType: WorkItemType;
|
|
5
|
+
shortText: string;
|
|
6
|
+
longText?: string;
|
|
7
|
+
contentClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function DescriptionBlock({ itemId, itemType, shortText, longText, contentClassName, }: Props): JSX.Element;
|
|
10
|
+
export { DescriptionBlock };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DescriptionBlock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ShowMoreButton';
|
|
@@ -11,6 +11,8 @@ interface PrepviewContext {
|
|
|
11
11
|
tagClicked: (tagId: string, instCode: string) => void;
|
|
12
12
|
packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
|
|
13
13
|
historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
|
|
14
|
+
objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
|
|
15
|
+
showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
|
|
14
16
|
}
|
|
15
17
|
export declare const PrepviewContext: React.Context<PrepviewContext>;
|
|
16
18
|
export declare const usePrepviewContext: () => PrepviewContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HistoricNotificationItem,
|
|
1
|
+
import { HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem } from '../../../types';
|
|
2
2
|
import { WorkItemType } from '../../../utils';
|
|
3
3
|
type Items = Array<HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem>;
|
|
4
4
|
export interface ItemProps {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tagSearchDropDown';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TagSummaryDto } from '@equinor/echo-search';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface TagsDropdownProps {
|
|
4
|
+
tags: TagSummaryDto[];
|
|
5
|
+
onTagSelected: (tag: TagSummaryDto) => void;
|
|
6
|
+
loadingTags?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TagsDropdown: React.FC<TagsDropdownProps>;
|
|
9
|
+
export {};
|
package/src/lib/feature/equipment/components/equipmentItemHeader/showEquipmentIn3dButton.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Equipment } from '../../types/equipment';
|
|
|
2
2
|
interface ShowEquipmentIn3DButtonArgs {
|
|
3
3
|
equipment: Equipment;
|
|
4
4
|
tagNo: string;
|
|
5
|
-
plantNo: string;
|
|
6
5
|
}
|
|
7
|
-
export declare const ShowEquipmentIn3DButton: ({ equipment, tagNo
|
|
6
|
+
export declare const ShowEquipmentIn3DButton: ({ equipment, tagNo }: ShowEquipmentIn3DButtonArgs) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -25,8 +25,8 @@ export interface Equipment {
|
|
|
25
25
|
readonly serialNo: string;
|
|
26
26
|
readonly surfaceItems?: string;
|
|
27
27
|
readonly systemStatusIds: string[];
|
|
28
|
-
readonly tagId
|
|
29
|
-
readonly tagPlantId
|
|
28
|
+
readonly tagId: string | undefined;
|
|
29
|
+
readonly tagPlantId: string | undefined;
|
|
30
30
|
readonly userStatusIds: string[];
|
|
31
31
|
}
|
|
32
32
|
export declare enum EquipmentCategoryId {
|
|
@@ -8,9 +8,8 @@ interface OpenMeasuringPointsArgs {
|
|
|
8
8
|
pathname: string;
|
|
9
9
|
instCode: string;
|
|
10
10
|
tagNo: string;
|
|
11
|
-
plantNo: string;
|
|
12
11
|
}
|
|
13
|
-
export declare const openEquipmentIn3dWeb: ({ equipmentId, e3dRef, goToLink, pathname, instCode, tagNo
|
|
12
|
+
export declare const openEquipmentIn3dWeb: ({ equipmentId, e3dRef, goToLink, pathname, instCode, tagNo }: OpenMeasuringPointsArgs) => Promise<void>;
|
|
14
13
|
export declare const is3DEquipment: (equipment: Equipment) => boolean;
|
|
15
14
|
export declare const sortMeasurementsInMeasuringPointsByNewestFirst: (measuringPoints: MeasuringPointDto[]) => {
|
|
16
15
|
measuringPointId: string;
|
package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export type TagGlobalSelectionList = GlobalSelectionList<GlobalSelectionItemType
|
|
|
37
37
|
export type GlobalSelectionListUnion = WorkOrderGlobalSelectionList | TagGlobalSelectionList | EquipmentGlobalSelectionList;
|
|
38
38
|
export declare enum GlobalSelectionItemErrorStatuses {
|
|
39
39
|
NotFoundInActiveEchoModule = "NotFoundInActiveEchoModule",
|
|
40
|
-
|
|
40
|
+
NotShownInActiveEchoModule = "NotShownInActiveEchoModule"
|
|
41
41
|
}
|
|
42
42
|
export interface GlobalSelectionStore {
|
|
43
43
|
lists: GlobalSelectionListUnion[];
|
|
@@ -50,8 +50,9 @@ export interface GlobalSelectionStore {
|
|
|
50
50
|
removeItemFromSelection: (args: {
|
|
51
51
|
itemId: string;
|
|
52
52
|
}) => void;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
setVisibilityList: (args: {
|
|
54
|
+
listKey: string;
|
|
55
|
+
isVisible: boolean;
|
|
55
56
|
}) => void;
|
|
56
57
|
setVisibility: (args: {
|
|
57
58
|
itemId: string;
|
|
@@ -59,10 +60,20 @@ export interface GlobalSelectionStore {
|
|
|
59
60
|
}) => void;
|
|
60
61
|
resetItemNotFoundStates: () => void;
|
|
61
62
|
resetState: () => void;
|
|
63
|
+
setStatusForItems: (args: {
|
|
64
|
+
itemIds: string[];
|
|
65
|
+
status: GlobalSelectionItemErrorStatuses;
|
|
66
|
+
}) => void;
|
|
67
|
+
/**
|
|
68
|
+
*@deprecated This method is deprecated. Use `setStatusForItems` instead, with `GlobalSelectionItemErrorStatuses.NotFoundInActiveEchoModule`.
|
|
69
|
+
*/
|
|
70
|
+
setNotFoundItems: (args: {
|
|
71
|
+
itemIds: string[];
|
|
72
|
+
}) => void;
|
|
62
73
|
}
|
|
63
74
|
export type OptimizedWorkOrderDto = {
|
|
64
75
|
workOrderId: string;
|
|
65
|
-
tagId
|
|
76
|
+
tagId: string | undefined;
|
|
66
77
|
tagPlantId: string;
|
|
67
78
|
workCenterId?: string;
|
|
68
79
|
workCenterPlantId: string;
|
package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GlobalSelectionGenericItem,
|
|
1
|
+
import { PlantAndTagForOpenIn3d } from '../../openItemsIn3d/logic/openItemsIn3d.utils';
|
|
2
|
+
import { GlobalSelectionGenericItem, GlobalSelectionItemErrorStatuses, GlobalSelectionItemType, GlobalSelectionItemTypeToDataMap, GlobalSelectionListUnion, GlobalSelectionStore } from './globalSelectionStore.types';
|
|
3
3
|
export declare function toGlobalSelectionItem<T extends GlobalSelectionItemTypeToDataMap[K], K extends GlobalSelectionItemType>(item: T, type: K, idSelector: (item: T) => string): GlobalSelectionGenericItem<K>;
|
|
4
4
|
export declare function toGlobalSelectionItems<T extends GlobalSelectionItemTypeToDataMap[K], K extends GlobalSelectionItemType>(items: T[], type: K, idSelector: (item: T) => string): GlobalSelectionGenericItem<K>[];
|
|
5
5
|
export declare function findGlobalSelectionListByKey(state: GlobalSelectionStore, key: string): GlobalSelectionListUnion | undefined;
|
|
6
6
|
export declare function hasGlobalSelectionItemErrorStatus<T extends GlobalSelectionItemType>(item: GlobalSelectionGenericItem<T>, status: GlobalSelectionItemErrorStatuses): boolean;
|
|
7
|
-
export declare
|
|
7
|
+
export declare function convertGlobalSelectionItemsToPlantTagPairs(): Promise<PlantAndTagForOpenIn3d[]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare function allWorkOrders(): import("./globalSelectionStore.types").OptimizedWorkOrderDto[];
|
|
2
|
+
declare function allTags(): import("dist/libs/echo-search/src").TagSummaryDto[];
|
|
3
|
+
declare function allEquipments(): import("../../equipment").Equipment[];
|
|
4
|
+
export declare const globalSelectionStoreHelpers: {
|
|
5
|
+
allTags: typeof allTags;
|
|
6
|
+
allEquipments: typeof allEquipments;
|
|
7
|
+
allWorkOrders: typeof allWorkOrders;
|
|
8
|
+
snapshot: () => import("./globalSelectionStore.types").GlobalSelectionStore;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { failureMechanismConfig } from './failureMechanism.config';
|
|
2
2
|
export { MeasuringPointDetails } from './measuringPointDetails/measuringPointDetails';
|
|
3
|
-
export { getInstCodeForSapPlantId } from './measuringPointDetails/measuringPointDetails.logic';
|
|
4
3
|
export { MeasuringPointHeader } from './measuringPointHeader/measuringPointHeader';
|
|
5
4
|
export { MeasuringPointItem } from './measuringPointItem';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig
|
|
1
|
+
export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig } from './components';
|
|
2
2
|
export { useOpenMeasuringPointDetails } from './hooks';
|
|
3
3
|
export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { workOrdersToPlantTagPairs } from './logic/convertToPlantTagPairs';
|
|
2
|
+
export type { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
|
|
2
3
|
export { OpenItemsIn3dDialog } from './openItemsIn3dDialog';
|
|
3
4
|
export { SelectedItemsMenu } from './SelectedItemsMenu';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PlantAndTagForOpenIn3d } from './openItemsIn3d.utils';
|
|
2
|
+
export interface WorkOrderTag {
|
|
3
|
+
tagPlantId: string | undefined;
|
|
4
|
+
tagId: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare function tagToPlantTagPairs(selectedWorkOrders: {
|
|
7
|
+
tagNo: string;
|
|
8
|
+
instCode: string;
|
|
9
|
+
}[]): Promise<PlantAndTagForOpenIn3d[]>;
|
|
10
|
+
export declare function workOrdersToPlantTagPairs(selectedWorkOrders: WorkOrderTag[]): Promise<PlantAndTagForOpenIn3d[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function createEcho3dInternalLink(instCode: string, params: {
|
|
2
|
+
tagNo?: string;
|
|
3
|
+
pdmsPlantCode?: string;
|
|
4
|
+
equipmentId?: string;
|
|
5
|
+
e3dRef?: string;
|
|
6
|
+
tagArea?: string;
|
|
7
|
+
measuringPointIds?: ReadonlyArray<string>;
|
|
8
|
+
}): {
|
|
9
|
+
echo3d: string;
|
|
10
|
+
params: string;
|
|
11
|
+
};
|
package/src/lib/feature/openItemsIn3d/{openItemsIn3d.utils.d.ts → logic/openItemsIn3d.utils.d.ts}
RENAMED
|
@@ -5,12 +5,9 @@
|
|
|
5
5
|
* @param args.items - The array of PlantTagPair objects.
|
|
6
6
|
* @returns An object containing unique plant numbers and item number counts.
|
|
7
7
|
*/
|
|
8
|
-
export declare function
|
|
9
|
-
items:
|
|
10
|
-
}):
|
|
11
|
-
uniquePlantNos: string[];
|
|
12
|
-
itemCountsByPlantNo: Record<string, number>;
|
|
13
|
-
};
|
|
8
|
+
export declare function getUniquePlantsWithItemCount(args: {
|
|
9
|
+
items: PlantAndTagForOpenIn3d[];
|
|
10
|
+
}): Plant3dInfoCount[];
|
|
14
11
|
/**
|
|
15
12
|
* Retrieves the items from the given array that have the same plant number as the selected plant number.
|
|
16
13
|
*
|
|
@@ -18,21 +15,31 @@ export declare function getUniquePlantNosAndItemNoCounts(args: {
|
|
|
18
15
|
* @param selectedPlantNo - The selected plant number.
|
|
19
16
|
* @returns An array of PlantTagPair objects that have the same plant number as the selected plant number.
|
|
20
17
|
*/
|
|
21
|
-
export declare function getItemsForSelectedPlantNo(selectedItems:
|
|
18
|
+
export declare function getItemsForSelectedPlantNo(selectedItems: PlantAndTagForOpenIn3d[], selectedPlantNo: string): PlantAndTagForOpenIn3d[];
|
|
22
19
|
/**
|
|
23
20
|
* Checks if there are more then one unique plant numbers in the passed PlantTagPair[].
|
|
24
21
|
*
|
|
25
22
|
* @param items - The array of PlantTagPair objects to check.
|
|
26
23
|
* @returns A boolean indicating whether multiple, unique plant numbers are present in the passed array.
|
|
27
24
|
*/
|
|
28
|
-
export declare function isMultiplePlantNoSelected(items:
|
|
25
|
+
export declare function isMultiplePlantNoSelected(items: PlantAndTagForOpenIn3d[]): boolean;
|
|
29
26
|
/**
|
|
30
27
|
* Retrieves the plant SAP ID from an array of PlantTagPair. It will return with the first, non empty plant SAP ID found.
|
|
31
28
|
* @param items - The array of PlantTagPair items.
|
|
32
29
|
* @returns The plant SAP ID if found, otherwise undefined.
|
|
33
30
|
*/
|
|
34
|
-
export declare function
|
|
35
|
-
export interface
|
|
31
|
+
export declare function getFirstPlantSapIdFromItems(items: PlantAndTagForOpenIn3d[]): string | undefined;
|
|
32
|
+
export interface Plant3dInfo {
|
|
33
|
+
instCode: string;
|
|
34
|
+
sapId: string | undefined;
|
|
35
|
+
pdmsPlantCode: string | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface Plant3dInfoCount extends Plant3dInfo {
|
|
38
|
+
count: number;
|
|
39
|
+
}
|
|
40
|
+
export interface PlantAndTagForOpenIn3d {
|
|
41
|
+
instCode: string;
|
|
42
|
+
pdmsPlantCode: string | undefined;
|
|
36
43
|
plantNo: string | undefined;
|
|
37
44
|
tagNo: string | undefined;
|
|
38
45
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PlantTagPair } from './openItemsIn3d.utils';
|
|
1
|
+
import { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
|
|
3
2
|
/**
|
|
4
3
|
* This component is designed to facilitate the opening of items in a 3D view within the application.
|
|
5
4
|
* It manages user interactions for selecting a plant number when multiple options are available,
|
|
@@ -10,7 +9,6 @@ import { PlantTagPair } from './openItemsIn3d.utils';
|
|
|
10
9
|
* @param {Object} props - The properties passed to the component.
|
|
11
10
|
* @param {Array} props.items - Array of items that the user intends to open in 3D. Each item should contain necessary information for the 3D view to be rendered.
|
|
12
11
|
* @param {boolean} props.open - Boolean indicating whether the dialog should be open or closed.
|
|
13
|
-
* @param {Function} props.onPlantLoadError - Function to be called when there is an error loading the plant information. Only needed when props.disableDefault3dOpener=false.
|
|
14
12
|
* @param {Function} props.onPlantSelectionCompleted - Function to be called when the plant selection process has been completed by the user.
|
|
15
13
|
* @param {Function} props.onCancelButtonClicked - Function to be called when the user clicks the cancel button.
|
|
16
14
|
* @param {Object} props.plantNotAvailableDialogProps - Object containing properties for the dialog shown when a plant is not available. Only needed when props.disableDefault3dOpener=true.
|
|
@@ -19,22 +17,17 @@ import { PlantTagPair } from './openItemsIn3d.utils';
|
|
|
19
17
|
* @returns {React.ReactElement} A React Element representing the OpenItemsIn3dDialog.
|
|
20
18
|
*
|
|
21
19
|
*/
|
|
22
|
-
export declare const OpenItemsIn3dDialog: ({
|
|
20
|
+
export declare const OpenItemsIn3dDialog: ({ getItems, open, onPlantSelectionCompleted, onCancelButtonClicked, plantNotAvailableDialogProps, disableDefault3dOpener }: OpenItemsIn3dDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
21
|
interface BaseOpenItemsIn3dDialogProps {
|
|
24
|
-
|
|
22
|
+
getItems: () => Promise<PlantAndTagForOpenIn3d[]>;
|
|
25
23
|
onPlantSelectionCompleted: (args: {
|
|
26
|
-
|
|
27
|
-
itemsForSelectedPlant: PlantTagPair[];
|
|
24
|
+
selectedPlant: Plant3dInfo;
|
|
28
25
|
}) => void;
|
|
29
26
|
onCancelButtonClicked: () => void;
|
|
30
27
|
open: boolean;
|
|
31
28
|
}
|
|
32
29
|
interface WithDefault3dOpener extends BaseOpenItemsIn3dDialogProps {
|
|
33
30
|
disableDefault3dOpener?: false;
|
|
34
|
-
onPlantLoadError: (args: {
|
|
35
|
-
error: Error | BaseError;
|
|
36
|
-
errorMessage: string;
|
|
37
|
-
}) => void;
|
|
38
31
|
plantNotAvailableDialogProps?: never;
|
|
39
32
|
}
|
|
40
33
|
interface WithDefault3dOpenerDisabled extends BaseOpenItemsIn3dDialogProps {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
|
|
2
2
|
interface PlantNoSelectionDialogProps {
|
|
3
|
-
|
|
4
|
-
onPlantSelectionConfirmed: (
|
|
3
|
+
getItems: () => Promise<PlantAndTagForOpenIn3d[]>;
|
|
4
|
+
onPlantSelectionConfirmed: (selectedPlantNo: Plant3dInfo) => void;
|
|
5
5
|
onCancelButtonClicked: () => void;
|
|
6
|
+
onSetIsWarningDialogOpen: () => void;
|
|
6
7
|
open: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const PlantNoSelectionDialog: ({
|
|
9
|
+
export declare const PlantNoSelectionDialog: ({ getItems, onPlantSelectionConfirmed, onCancelButtonClicked, onSetIsWarningDialogOpen, open }: PlantNoSelectionDialogProps) => JSX.Element | null;
|
|
9
10
|
export {};
|
package/src/lib/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
interface PanelUserSettings {
|
|
2
|
+
readonly isTagsVisible: boolean;
|
|
3
|
+
readonly isWorkOrdersVisible: boolean;
|
|
4
|
+
}
|
|
5
|
+
interface DataLayerPanelState {
|
|
6
|
+
readonly isOpen: boolean;
|
|
7
|
+
readonly userSettings: PanelUserSettings;
|
|
8
|
+
}
|
|
9
|
+
interface DataLayerPanelActions {
|
|
10
|
+
togglePanel: () => void;
|
|
11
|
+
toggleWorkOrders: () => void;
|
|
12
|
+
toggleTags: () => void;
|
|
13
|
+
}
|
|
14
|
+
type DataLayerPanelStore = DataLayerPanelState & DataLayerPanelActions;
|
|
15
|
+
export declare const useDataLayerPanelStore: import("zustand").UseBoundStore<Omit<Omit<Omit<Omit<import("zustand").StoreApi<DataLayerPanelStore>, "setState"> & {
|
|
16
|
+
setState<A extends string | {
|
|
17
|
+
type: string;
|
|
18
|
+
}>(partial: DataLayerPanelStore | Partial<DataLayerPanelStore> | ((state: DataLayerPanelStore) => DataLayerPanelStore | Partial<DataLayerPanelStore>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
19
|
+
}, "subscribe"> & {
|
|
20
|
+
subscribe: {
|
|
21
|
+
(listener: (selectedState: DataLayerPanelStore, previousSelectedState: DataLayerPanelStore) => void): () => void;
|
|
22
|
+
<U>(selector: (state: DataLayerPanelStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
23
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
24
|
+
fireImmediately?: boolean;
|
|
25
|
+
} | undefined): () => void;
|
|
26
|
+
};
|
|
27
|
+
}, "persist"> & {
|
|
28
|
+
persist: {
|
|
29
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<DataLayerPanelStore, unknown>>) => void;
|
|
30
|
+
clearStorage: () => void;
|
|
31
|
+
rehydrate: () => Promise<void> | void;
|
|
32
|
+
hasHydrated: () => boolean;
|
|
33
|
+
onHydrate: (fn: (state: DataLayerPanelStore) => void) => () => void;
|
|
34
|
+
onFinishHydration: (fn: (state: DataLayerPanelStore) => void) => () => void;
|
|
35
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<DataLayerPanelStore, unknown>>;
|
|
36
|
+
};
|
|
37
|
+
}, "setState"> & {
|
|
38
|
+
setState(nextStateOrUpdater: DataLayerPanelStore | Partial<DataLayerPanelStore> | ((state: import("immer").WritableDraft<DataLayerPanelStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
39
|
+
type: string;
|
|
40
|
+
} | undefined): void;
|
|
41
|
+
}>;
|
|
42
|
+
export declare function dataLayerStoreSnapshot(): DataLayerPanelStore;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dataLayerPanel.store';
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TemporaryEchoHubListDto, TemporaryHubResultsList } from '../../types/api-echohub';
|
|
2
|
-
import { EchoHubPlant } from '../../types/echoHubPlant';
|
|
3
2
|
export declare const getTemporarilyEchoHubListFor3d: (instCode: string, request: TemporaryEchoHubListDto, abortSignal?: AbortSignal | undefined, withoutBaseUrl?: boolean) => Promise<{
|
|
4
3
|
app3dUrl: string;
|
|
5
4
|
web3dUrl: string;
|
|
@@ -17,12 +16,19 @@ export type HubListReturnType = {
|
|
|
17
16
|
* @export
|
|
18
17
|
* @param {string} sourceModuleName name of the source module name
|
|
19
18
|
* @param {string} createdBy created by (e.g: user email)
|
|
20
|
-
* @param {
|
|
19
|
+
* @param {string} plantCode pdmsPlantCode from stid tag
|
|
21
20
|
* @param {TemporaryHubResultsList[]} tagList tag list
|
|
22
21
|
* @param {string} source source (e.g: Echo)
|
|
23
|
-
* @param {number} timeToLiveSeconds time to live (in seconds) for the temporary list
|
|
24
22
|
|
|
25
23
|
* @return {*} {TemporaryEchoHubListDto} temporary tag list object
|
|
26
24
|
*/
|
|
27
|
-
export declare const generateTemporaryTagListObject: (
|
|
25
|
+
export declare const generateTemporaryTagListObject: (args: {
|
|
26
|
+
ObjectsToSendTo3d: ObjectsToSendTo3dTypes;
|
|
27
|
+
sourceModuleName: string;
|
|
28
|
+
createdBy: string;
|
|
29
|
+
plantCode: string;
|
|
30
|
+
tagList: TemporaryHubResultsList[];
|
|
31
|
+
source: string;
|
|
32
|
+
section?: string;
|
|
33
|
+
}) => TemporaryEchoHubListDto;
|
|
28
34
|
export declare function getRandomColor(): string;
|