@equinor/echo-framework 0.25.0 → 0.25.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.25.0",
3
+ "version": "0.25.1",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.5 < 0.8.0",
6
6
  "@equinor/echo-components": ">= 0.12.4 < 0.13.0",
@@ -8,4 +8,5 @@ export interface NotificationListItemProps {
8
8
  isHeader?: boolean;
9
9
  colorMap?: ColorMap;
10
10
  className?: string;
11
+ isHighlightable?: boolean;
11
12
  }
@@ -199,7 +199,7 @@ export declare const globalSelectionApi: Readonly<{
199
199
  */
200
200
  clearSelection: () => void;
201
201
  createGroup: (args: {
202
- groupId: string;
202
+ groupId?: string;
203
203
  label: string;
204
204
  subLabel: string;
205
205
  }) => import("dist/libs/echo-utils/src").Guid;
@@ -1,8 +1,11 @@
1
1
  import { ResultArray } from '@equinor/echo-search';
2
2
  import { GlobalSelectionItemType, GlobalSelectionItemTypeToDataMap, GlobalSelectionTypes, SelectionItemTypeToItemIdMap } from '../../../globalSelectionStore/globalSelectionStore.types';
3
- import { SelectionBase } from '../selectionTree.store.types';
4
- export type AddByGroupIdAndLabel = SelectionBase | {
5
- groupId?: undefined;
3
+ export type AddByGroupIdAndLabel = {
4
+ groupId?: string;
5
+ label: string;
6
+ subLabel: string;
7
+ } | {
8
+ groupId?: string;
6
9
  label?: undefined;
7
10
  subLabel?: undefined;
8
11
  };
@@ -46,7 +46,7 @@ export interface SelectionTreeStore {
46
46
  addEquipments: (args: AddItemArgs<GlobalSelectionTypes.EquipmentId>) => AddEquipmentsReturnType;
47
47
  addMeasuringPoints: (args: AddItemArgs<GlobalSelectionTypes.MeasuringPointId>) => AddMeasuringPointsReturnType;
48
48
  createGroup: (args: {
49
- groupId: string;
49
+ groupId?: string;
50
50
  label: string;
51
51
  subLabel: string;
52
52
  }) => Guid;
@@ -0,0 +1,7 @@
1
+ import { PrepViewWorkOrder, PrepViewWorkOrderDto } from '../types/workOrder';
2
+ interface WorkOrderRequest {
3
+ readonly workOrderId: string;
4
+ }
5
+ export declare const getPrepviewWorkOrderDetails: (args: WorkOrderRequest) => Promise<PrepViewWorkOrder>;
6
+ export declare const cleanupPrepviewWorkOrder: (workOrder: PrepViewWorkOrderDto) => PrepViewWorkOrder;
7
+ export {};
@@ -1,6 +1,6 @@
1
- import { WorkOrderDetails } from '../types/workOrder';
1
+ import { PrepViewWorkOrder } from '../types/workOrder';
2
2
  interface WorkOrderItemDetailsProps {
3
- readonly data: WorkOrderDetails;
3
+ readonly data: PrepViewWorkOrder;
4
4
  }
5
5
  export declare const WorkOrderItemDetails: (props: WorkOrderItemDetailsProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,10 +1,6 @@
1
- import { WorkOrderDetails } from '../types/workOrder';
1
+ import { PrepViewWorkOrder } from '../types/workOrder';
2
2
  interface WorkOrderHeaderProps {
3
- /**
4
- * TODO: We need to improve types on WorkOrderListItem before we Pick the actual properties we need for this component.
5
- * Until then we will continue with the original mapWorkOrderDetailsToWorkOrderItem.
6
- */
7
- readonly data: WorkOrderDetails;
3
+ readonly data: PrepViewWorkOrder;
8
4
  }
9
5
  export declare const WorkOrderItemHeader: (props: WorkOrderHeaderProps) => import("react/jsx-runtime").JSX.Element;
10
6
  export {};
@@ -1,6 +1,6 @@
1
- import { WorkOrderDetails } from '../types/workOrder';
1
+ import { PrepViewWorkOrder } from '../types/workOrder';
2
2
  export declare function usePrepviewWorkOrder(workOrderId: string): {
3
3
  isLoading: boolean;
4
4
  error: Error | null;
5
- workOrder?: WorkOrderDetails;
5
+ workOrder?: PrepViewWorkOrder;
6
6
  };
@@ -1,48 +1,70 @@
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
+ }
70
+ 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 { PrepViewWorkOrder } from '../types/workOrder';
3
+ export declare function mapWorkOrderDetailsToWorkOrderItem(details: PrepViewWorkOrder): WorkOrderListItemData;
@@ -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 {};