@equinor/echo-framework 0.25.0 → 0.25.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.
Files changed (37) hide show
  1. package/index.cjs.js +8 -8
  2. package/package.json +2 -2
  3. package/src/index.d.ts +5 -4
  4. package/src/lib/components/contextualAppLinks/hooks/useContextualAppLinksContext.d.ts +1 -1
  5. package/src/lib/components/notificationListItem/types/types.d.ts +1 -0
  6. package/src/lib/feature/globalSelection/OpenGlobalSelectionIn3DButton.utils.d.ts +14 -0
  7. package/src/lib/feature/globalSelection/globalSelection.api.d.ts +6 -6
  8. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStoreHelpers.d.ts +0 -14
  9. package/src/lib/feature/globalSelection/index.d.ts +0 -2
  10. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/actions/selectionTree.action.types.d.ts +6 -3
  11. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types.d.ts +1 -1
  12. package/src/lib/feature/legend/legendFacade.d.ts +53 -0
  13. package/src/lib/feature/legend/legendStore.d.ts +12 -3
  14. package/src/lib/feature/legend/legendVisibleDataAsTagsStore.d.ts +41 -0
  15. package/src/lib/feature/legend/legendVisibleDataAsTagsStore.logic.d.ts +3 -0
  16. package/src/lib/feature/legend/legendVisibleDataAsTagsStore.type.d.ts +7 -0
  17. package/src/lib/feature/legend/legendVisibleDataStore.d.ts +15 -1
  18. package/src/lib/feature/legend/logic/isLegendDataIdEqualWithTag.d.ts +12 -0
  19. package/src/lib/feature/legend/types/legendStrategy.type.d.ts +0 -5
  20. package/src/lib/feature/measuringPoint/index.d.ts +1 -0
  21. package/src/lib/feature/workOrder/api/api-prepview-workOrder.d.ts +7 -0
  22. package/src/lib/feature/workOrder/components/PanelTagInfo/PanelTagInfo.d.ts +5 -0
  23. package/src/lib/feature/workOrder/components/PanelTagInfo/api/api-prepview-workOrder-tagInfo.d.ts +6 -0
  24. package/src/lib/feature/workOrder/components/PanelTagInfo/hooks/usePrepviewWorkOrderTagInfo.d.ts +6 -0
  25. package/src/lib/feature/workOrder/components/PanelTagInfo/types/tagInfo.d.ts +32 -0
  26. package/src/lib/feature/workOrder/components/WorkOrderItemDetails.d.ts +2 -2
  27. package/src/lib/feature/workOrder/components/WorkOrderItemHeader.d.ts +2 -6
  28. package/src/lib/feature/workOrder/components/WorkOrderItemHeader.types.d.ts +2 -0
  29. package/src/lib/feature/workOrder/components/WorkOrderItemTabInfo/WorkOrderItemTabInfo.d.ts +7 -0
  30. package/src/lib/feature/workOrder/hooks/usePrepviewWorkOrder.d.ts +2 -2
  31. package/src/lib/feature/workOrder/types/workOrder.d.ts +80 -43
  32. package/src/lib/feature/workOrder/utils/workOrderUtils.d.ts +2 -2
  33. package/src/lib/hooks/index.d.ts +1 -1
  34. package/src/lib/utils/handleErrors.d.ts +2 -1
  35. package/src/lib/feature/legend/legendUpdater.d.ts +0 -3
  36. package/src/lib/feature/workOrder/api/api-preview-workOrder.d.ts +0 -6
  37. /package/{index.cjs.d.ts → index.d.ts} +0 -0
@@ -1,48 +1,85 @@
1
- export type FetchStatus = {
2
- statusCode?: 'Forbidden' | number;
3
- };
4
- export type PlantReference = {
5
- label: string;
6
- typeLabel: string;
7
- };
8
- export type WorkOrderDetails = FetchStatus & {
1
+ /**
2
+ * TODO: This should be a common type/enum,
3
+ * See endDateStatus.ts in echo-components.
4
+ * They are the same but with different case
5
+ */
6
+ type ExpirationStatus = 'Completed' | 'Expired' | 'WithinSevenDays' | 'EightDaysToOneMonth' | 'OneToThreeMonths' | 'ThreeToSixMonths' | 'SixToTwelveMonths' | 'InMoreThanOneYear' | 'Unknown';
7
+ type WorkOrderUserStatus = 'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'RDOP' | 'Other';
8
+ interface ContentReferencesDto {
9
+ label?: string | null;
10
+ typeLabel?: string | null;
11
+ }
12
+ export interface PrepViewWorkOrderDto {
9
13
  id: string;
10
- plantId: string;
11
- tagId: string;
12
- tagPlantId: string;
13
- tagCategory: string;
14
- tagCategoryId: string;
14
+ plantId?: string | null;
15
+ tagId?: string | null;
16
+ tagPlantId?: string | null;
17
+ tagCategory?: string | null;
18
+ tagCategoryId?: string | null;
15
19
  orderType: string;
16
20
  activeStatusIds: string;
17
- userStatus: string;
18
- isActive: true;
19
- personResponsible: string;
20
- plannerGroupId: string;
21
- workCenterId: string;
22
- locationId: string;
23
- changedDateTime: string;
24
- createdDateTime: string;
25
- requiredEndDateTime: string;
26
- requiredEndDateStatus: string;
21
+ userStatus: WorkOrderUserStatus;
22
+ isActive: boolean;
23
+ personResponsible?: string | null;
24
+ plannerGroupId?: string | null;
25
+ workCenterId?: string | null;
26
+ locationId?: string | null;
27
+ changedDateTime?: string | null;
28
+ createdDateTime?: string | null;
29
+ requiredEndDateTime?: string | null;
30
+ requiredEndDateStatus: ExpirationStatus;
27
31
  requiredEndDateStatusDescription: string;
28
- basicStartDateTime: string;
29
- basicFinishDateTime: string;
30
- basicFinishDateStatus: string;
31
- basicFinishDateStatusDescription: string;
32
- maintenancePlanDate: string;
33
- maintenancePlant: string;
34
- planningPlantId: string;
35
- planningPlant: string;
36
- priorityId: string;
37
- priority: string;
38
- revisionId: string;
39
- equipmentId: string;
40
- systemId: string;
41
- system: string;
32
+ basicStartDateTime?: string | null;
33
+ basicFinishDateTime?: string | null;
34
+ basicFinishDateStatus?: ExpirationStatus;
35
+ basicFinishDateStatusDescription?: string | null;
36
+ maintenancePlanDate?: string | null;
37
+ maintenancePlantId?: string | null;
38
+ maintenancePlant?: string | null;
39
+ planningPlantId?: string | null;
40
+ planningPlant?: string | null;
41
+ priorityId?: string | null;
42
+ priority?: string | null;
43
+ revisionId?: string | null;
44
+ equipmentId?: string | null;
45
+ systemId?: string | null;
46
+ system?: string | null;
47
+ description?: string | null;
48
+ longText?: string | null;
49
+ instCode?: string | null;
50
+ sortField?: string | null;
51
+ maintenancePlantReference?: ContentReferencesDto;
52
+ planningPlantReference?: ContentReferencesDto;
53
+ }
54
+ export interface PrepViewWorkOrder {
55
+ id: string;
42
56
  description: string;
43
- longText: string;
44
- instCode: string;
45
- sortField: string;
46
- maintenancePlantReference: PlantReference;
47
- planningPlantReference: PlantReference;
48
- };
57
+ orderType: string;
58
+ isActive: boolean;
59
+ workCenterId: string;
60
+ basicFinishDateStatus?: ExpirationStatus;
61
+ requiredEndDateTime?: string;
62
+ requiredEndDateStatus?: ExpirationStatus;
63
+ maintenancePlanDate?: string;
64
+ basicFinishDateTime?: string;
65
+ basicStartDateTime?: string;
66
+ planningPlant?: string;
67
+ maintenancePlant?: string;
68
+ plantId?: string;
69
+ instCode?: string;
70
+ tagId?: string;
71
+ tagCategory?: string;
72
+ activeStatusIds?: string;
73
+ personResponsible?: string;
74
+ locationId?: string;
75
+ plannerGroupId?: string;
76
+ system?: string;
77
+ systemId?: string;
78
+ createdDateTime?: string;
79
+ changedDateTime?: string;
80
+ priority?: string;
81
+ revisionId?: string;
82
+ equipmentId?: string;
83
+ longText?: string;
84
+ }
85
+ export {};
@@ -1,3 +1,3 @@
1
1
  import { WorkOrderListItemData } from '../../../components/workOrderListItem/types/types';
2
- import { WorkOrderDetails } from '../types/workOrder';
3
- export declare function mapWorkOrderDetailsToWorkOrderItem(details: WorkOrderDetails): WorkOrderListItemData;
2
+ import { WorkOrderItemHeaderData } from '../components/WorkOrderItemHeader.types';
3
+ export declare function mapHeaderDataToListItemData(headerData: WorkOrderItemHeaderData): WorkOrderListItemData;
@@ -1,4 +1,4 @@
1
- export * from './useClosePanelByKey';
1
+ export { useClosePanelByKey } from './useClosePanelByKey';
2
2
  export * from './useEchoHistory';
3
3
  export * from './useFetchInstCodeBySapPlantId';
4
4
  export { useInstCodeSafe } from './useInstCodeSafe';
@@ -1,3 +1,4 @@
1
- export default function handleErrors(exception: Error | unknown, options?: {
1
+ export declare function handleErrors(exception: Error | unknown, options?: {
2
2
  userFriendlyErrorMessage: string;
3
3
  }): void;
4
+ export default handleErrors;
@@ -1,3 +0,0 @@
1
- export declare function unsubscribeToLegendDataChanged(): void;
2
- export declare function subscribeToLegendDataChanged(): void;
3
- export declare const sleep: (ms: number) => Promise<unknown>;
@@ -1,6 +0,0 @@
1
- import { WorkOrderDetails } from '../types/workOrder';
2
- interface WorkOrderRequest {
3
- readonly workOrderId: string;
4
- }
5
- export declare function getPrepviewWorkOrderDetails(args: WorkOrderRequest): Promise<WorkOrderDetails>;
6
- export {};
File without changes