@equinor/echo-framework 0.9.22 → 0.10.0-r18-beta-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 (178) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +11 -6
  3. package/dist/{47deeba42768c5d1.svg → 063009f06499d102.svg} +8 -8
  4. package/dist/__tests__/prepviewUtils.test.d.ts +1 -0
  5. package/dist/components/containers/layouts.d.ts +3 -5
  6. package/dist/components/contextualAppLinks/contextualAppLinks.context.d.ts +1 -1
  7. package/dist/components/contextualAppLinks/contextualAppLinks.d.ts +1 -1
  8. package/dist/components/contextualAppLinks/externalAppsMenu.d.ts +1 -1
  9. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts +16 -2
  10. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.d.ts +1 -1
  11. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToConditionAdviser.d.ts +15 -0
  12. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.d.ts +1 -1
  13. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.d.ts +1 -1
  14. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.d.ts +1 -1
  15. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.d.ts +1 -1
  16. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.d.ts +1 -1
  17. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.d.ts +1 -1
  18. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.d.ts +1 -1
  19. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTrendingApp.d.ts +15 -0
  20. package/dist/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +1 -1
  21. package/dist/components/contextualAppLinks/externalLinkButtons/index.d.ts +2 -0
  22. package/dist/components/contextualAppLinks/hooks/useContextualAppLinks.d.ts +1 -1
  23. package/dist/components/contextualAppLinks/index.d.ts +1 -1
  24. package/dist/components/contextualAppLinks/internalAppLinks.d.ts +1 -1
  25. package/dist/components/contextualAppLinks/linkButton.d.ts +2 -2
  26. package/dist/components/externalLinkButton/externalLinkButton.d.ts +6 -5
  27. package/dist/components/homePage/HomePage.d.ts +2 -2
  28. package/dist/components/index.d.ts +1 -0
  29. package/dist/components/pageMenu/defaultAccordionItem.d.ts +1 -1
  30. package/dist/components/panel/corePanelLeft.d.ts +4 -1
  31. package/dist/components/panel/corePanelRight.d.ts +4 -1
  32. package/dist/components/prepview/Prepview.d.ts +14 -0
  33. package/dist/components/prepview/api/api.d.ts +7 -0
  34. package/dist/components/prepview/api/attachment.d.ts +2 -0
  35. package/dist/components/prepview/api/index.d.ts +1 -0
  36. package/dist/components/prepview/api/resources.d.ts +6 -0
  37. package/dist/components/prepview/common/access/handler/StatusHandler.d.ts +8 -0
  38. package/dist/components/prepview/common/access/handler/index.d.ts +1 -0
  39. package/dist/components/prepview/common/access/index.d.ts +2 -0
  40. package/dist/components/prepview/common/access/request/RequestAccess.d.ts +6 -0
  41. package/dist/components/prepview/common/access/request/index.d.ts +1 -0
  42. package/dist/components/prepview/common/additionalInformation/AdditionalDetails.d.ts +11 -0
  43. package/dist/components/prepview/common/additionalInformation/tabsPanels/TabsPanels.d.ts +15 -0
  44. package/dist/components/prepview/common/additionalInformation/tabsPanels/index.d.ts +1 -0
  45. package/dist/components/prepview/common/contentPicker/ContentPicker.d.ts +8 -0
  46. package/dist/components/prepview/common/contentPicker/index.d.ts +1 -0
  47. package/dist/components/prepview/common/details/accordion/DetailsAccordion.d.ts +8 -0
  48. package/dist/components/prepview/common/details/accordion/index.d.ts +1 -0
  49. package/dist/components/prepview/common/details/index.d.ts +3 -0
  50. package/dist/components/prepview/common/details/loader/DetailsLoader.d.ts +3 -0
  51. package/dist/components/prepview/common/details/loader/index.d.ts +1 -0
  52. package/dist/components/prepview/common/details/panel/EmptyDetailsPanel.d.ts +6 -0
  53. package/dist/components/prepview/common/details/panel/index.d.ts +1 -0
  54. package/dist/components/prepview/common/fileSizeDisplay/FileSizeDisplay.d.ts +11 -0
  55. package/dist/components/prepview/common/fileSizeDisplay/index.d.ts +1 -0
  56. package/dist/components/prepview/common/index.d.ts +5 -0
  57. package/dist/components/prepview/common/info/block/InfoBlock.d.ts +9 -0
  58. package/dist/components/prepview/common/info/block/index.d.ts +1 -0
  59. package/dist/components/prepview/common/info/index.d.ts +3 -0
  60. package/dist/components/prepview/common/info/list/InfoBlockList.d.ts +6 -0
  61. package/dist/components/prepview/common/info/list/index.d.ts +1 -0
  62. package/dist/components/prepview/common/info/section/InfoSection.d.ts +6 -0
  63. package/dist/components/prepview/common/info/section/index.d.ts +2 -0
  64. package/dist/components/prepview/common/info/section/longText/LongTextSection.d.ts +8 -0
  65. package/dist/components/prepview/common/info/section/longText/index.d.ts +1 -0
  66. package/dist/components/prepview/context/PrepviewContext.d.ts +9 -0
  67. package/dist/components/prepview/hooks/index.d.ts +4 -0
  68. package/dist/components/prepview/hooks/useFetch.d.ts +4 -0
  69. package/dist/components/prepview/hooks/useIsMobile.d.ts +5 -0
  70. package/dist/components/prepview/hooks/useOnClickDownload.d.ts +9 -0
  71. package/dist/components/prepview/hooks/useSetActiveSearchItem.d.ts +10 -0
  72. package/dist/components/prepview/index.d.ts +1 -0
  73. package/dist/components/prepview/notification/details/DetailsNotification.d.ts +10 -0
  74. package/dist/components/prepview/notification/details/index.d.ts +1 -0
  75. package/dist/components/prepview/notification/header/Header.d.ts +8 -0
  76. package/dist/components/prepview/notification/header/index.d.ts +1 -0
  77. package/dist/components/prepview/notification/index.d.ts +9 -0
  78. package/dist/components/prepview/panels/attachments/Attachments.d.ts +9 -0
  79. package/dist/components/prepview/panels/attachments/index.d.ts +1 -0
  80. package/dist/components/prepview/panels/history/TagHistory.d.ts +9 -0
  81. package/dist/components/prepview/panels/history/group/TagHistoryGroup.d.ts +10 -0
  82. package/dist/components/prepview/panels/history/group/index.d.ts +1 -0
  83. package/dist/components/prepview/panels/history/horizontalView/HorizontalTagHistory.d.ts +9 -0
  84. package/dist/components/prepview/panels/history/horizontalView/index.d.ts +1 -0
  85. package/dist/components/prepview/panels/history/index.d.ts +1 -0
  86. package/dist/components/prepview/panels/history/items/Items.d.ts +11 -0
  87. package/dist/components/prepview/panels/history/items/NotificationItem.d.ts +7 -0
  88. package/dist/components/prepview/panels/history/items/PunchItem.d.ts +7 -0
  89. package/dist/components/prepview/panels/history/items/WorkOrderItem.d.ts +7 -0
  90. package/dist/components/prepview/panels/history/items/index.d.ts +1 -0
  91. package/dist/components/prepview/panels/index.d.ts +7 -0
  92. package/dist/components/prepview/panels/objects/Objects.d.ts +7 -0
  93. package/dist/components/prepview/panels/objects/index.d.ts +1 -0
  94. package/dist/components/prepview/panels/operations/Operations.d.ts +7 -0
  95. package/dist/components/prepview/panels/operations/index.d.ts +1 -0
  96. package/dist/components/prepview/panels/risk/Risk.d.ts +7 -0
  97. package/dist/components/prepview/panels/risk/index.d.ts +1 -0
  98. package/dist/components/prepview/panels/risk/trafficLight/TrafficLight.d.ts +7 -0
  99. package/dist/components/prepview/panels/risk/trafficLight/index.d.ts +1 -0
  100. package/dist/components/prepview/panels/tagDocumentRefs/HorizontalDocumentGroups.d.ts +9 -0
  101. package/dist/components/prepview/panels/tagDocumentRefs/TagDocumentGroup.d.ts +10 -0
  102. package/dist/components/prepview/panels/tagDocumentRefs/TagDocumentItem.d.ts +9 -0
  103. package/dist/components/prepview/panels/tagDocumentRefs/TagDocumentRefs.d.ts +9 -0
  104. package/dist/components/prepview/panels/tagDocumentRefs/index.d.ts +1 -0
  105. package/dist/components/prepview/panels/tagInformation/TagInformation.d.ts +11 -0
  106. package/dist/components/prepview/panels/tagInformation/index.d.ts +1 -0
  107. package/dist/components/prepview/punch/details/Details.d.ts +10 -0
  108. package/dist/components/prepview/punch/details/index.d.ts +1 -0
  109. package/dist/components/prepview/punch/header/Header.d.ts +8 -0
  110. package/dist/components/prepview/punch/header/index.d.ts +1 -0
  111. package/dist/components/prepview/punch/index.d.ts +9 -0
  112. package/dist/components/prepview/types/attachment.d.ts +7 -0
  113. package/dist/components/prepview/types/common.d.ts +50 -0
  114. package/dist/components/prepview/types/document.d.ts +13 -0
  115. package/dist/components/prepview/types/index.d.ts +9 -0
  116. package/dist/components/prepview/types/notification.d.ts +68 -0
  117. package/dist/components/prepview/types/operation.d.ts +13 -0
  118. package/dist/components/prepview/types/punch.d.ts +27 -0
  119. package/dist/components/prepview/types/safety.d.ts +21 -0
  120. package/dist/components/prepview/types/tag.d.ts +24 -0
  121. package/dist/components/prepview/types/workorder.d.ts +82 -0
  122. package/dist/components/prepview/utils/date.d.ts +5 -0
  123. package/dist/components/prepview/utils/documents.d.ts +1 -0
  124. package/dist/components/prepview/utils/dom.d.ts +1 -0
  125. package/dist/components/prepview/utils/enums/documents.d.ts +14 -0
  126. package/dist/components/prepview/utils/enums/index.d.ts +2 -0
  127. package/dist/components/prepview/utils/enums/tagHistoryItem.d.ts +5 -0
  128. package/dist/components/prepview/utils/index.d.ts +10 -0
  129. package/dist/components/prepview/utils/logger.d.ts +71 -0
  130. package/dist/components/prepview/utils/notification.d.ts +3 -0
  131. package/dist/components/prepview/utils/object.d.ts +1 -0
  132. package/dist/components/prepview/utils/punch.d.ts +1 -0
  133. package/dist/components/prepview/utils/string.d.ts +1 -0
  134. package/dist/components/prepview/utils/url.d.ts +9 -0
  135. package/dist/components/prepview/utils/workorder.d.ts +2 -0
  136. package/dist/components/prepview/workorder/details/DetailsWorkOrder.d.ts +10 -0
  137. package/dist/components/prepview/workorder/details/index.d.ts +1 -0
  138. package/dist/components/prepview/workorder/header/Header.d.ts +9 -0
  139. package/dist/components/prepview/workorder/header/index.d.ts +1 -0
  140. package/dist/components/prepview/workorder/index.d.ts +10 -0
  141. package/dist/components/realTimeData/hooks/useRealTimeHub.d.ts +1 -1
  142. package/dist/components/realTimeData/hooks/useSignalRListener.d.ts +1 -1
  143. package/dist/components/router/echoRoute.d.ts +1 -2
  144. package/dist/components/router/index.d.ts +0 -1
  145. package/dist/components/tagNumber/tagNumber.d.ts +3 -2
  146. package/dist/coreApplication/EchoBarComponent.d.ts +17 -0
  147. package/dist/coreApplication/EchoContent.d.ts +0 -1
  148. package/dist/coreApplication/EchoSetup.d.ts +1 -1
  149. package/dist/coreApplication/EchoUserInterfaceContextProvider.d.ts +13 -0
  150. package/dist/coreApplication/index.d.ts +2 -0
  151. package/dist/f4c85313e79b1662.svg +850 -0
  152. package/dist/hooks/index.d.ts +2 -0
  153. package/dist/hooks/useEchoHistory.d.ts +2 -2
  154. package/dist/hooks/useIsCompactLayout.d.ts +5 -0
  155. package/dist/hooks/useScreenOrientation.d.ts +5 -0
  156. package/dist/hooks/useScreenValues.d.ts +13 -0
  157. package/dist/hooks/useSemi.d.ts +1 -1
  158. package/dist/hooks/useWindowSize.d.ts +9 -0
  159. package/dist/index.d.ts +30 -1
  160. package/dist/index.js +42 -3
  161. package/dist/services/api/api-manager.d.ts +10 -2
  162. package/dist/services/componentRegistry/componentRegistry.d.ts +27 -7
  163. package/dist/services/deviceInformation/deepDeviceInfo.d.ts +41 -0
  164. package/dist/services/deviceInformation/deviceInfo.d.ts +45 -0
  165. package/dist/services/searchItemDetails/searchItemDetails.store.d.ts +26 -0
  166. package/dist/services/searchItemDetails/searchItemDetails.store.test.d.ts +1 -0
  167. package/dist/services/searchItemDetails/searchItemDetailsContainer.d.ts +6 -0
  168. package/dist/types/api-proCoSysTagResponse.d.ts +1 -1
  169. package/dist/types/device.d.ts +53 -0
  170. package/dist/types/eventTypes/index.d.ts +1 -0
  171. package/dist/types/eventTypes/searchDetailsContainerEvents.d.ts +3 -0
  172. package/dist/types/hookLibrary.d.ts +20 -4
  173. package/dist/types/legend.d.ts +1 -0
  174. package/dist/utils/index.d.ts +1 -0
  175. package/dist/utils/legendUtils.d.ts +7 -4
  176. package/dist/utils/searchUtil.d.ts +1 -0
  177. package/package.json +126 -122
  178. package/dist/components/router/useLayout.d.ts +0 -3
@@ -0,0 +1,13 @@
1
+ import { FileDto } from '@equinor/echo-search';
2
+ export type PrepviewDocumentGroup = {
3
+ type: string;
4
+ documents: Array<PrepviewDocument>;
5
+ };
6
+ export type PrepviewDocument = {
7
+ docNo: string;
8
+ docTitle: string;
9
+ files: Array<FileDto>;
10
+ revDate: Date;
11
+ revNo: string;
12
+ revStatus: string;
13
+ };
@@ -0,0 +1,9 @@
1
+ export * from './attachment';
2
+ export * from './common';
3
+ export * from './document';
4
+ export * from './notification';
5
+ export * from './operation';
6
+ export * from './punch';
7
+ export * from './safety';
8
+ export * from './tag';
9
+ export * from './workorder';
@@ -0,0 +1,68 @@
1
+ import { PrepviewAttachment } from './attachment';
2
+ import { FetchStatus } from './common';
3
+ import { PrepviewDocumentGroup } from './document';
4
+ import { PrepviewPunch } from './punch';
5
+ import { PrepviewSafety } from './safety';
6
+ import { PrepviewTagInformation } from './tag';
7
+ import { PrepviewTagHistoryGroup, PrepviewWorkOrder } from './workorder';
8
+ export type PrepviewNotificationDto = {
9
+ details: NotificationDetails;
10
+ additionalDetails?: NotificationAdditionalDetails;
11
+ };
12
+ export type NotificationDetails = FetchStatus & {
13
+ id: string;
14
+ type: string;
15
+ title: string;
16
+ tagPlantId: string;
17
+ tagId: string;
18
+ plantId: string;
19
+ createdDateTime: Date;
20
+ requiredEndDateTime: Date;
21
+ maintenancePlant: string;
22
+ planningPlant: string;
23
+ activeStatusIds: string;
24
+ unsafeFailureMode: string;
25
+ plannerGroup: string;
26
+ mainWorkCenter: string;
27
+ failureImpact: string;
28
+ priorityId: string;
29
+ priority: string;
30
+ failureMode: string;
31
+ detectionMethodId: string;
32
+ failureMechanism: string;
33
+ longText: string;
34
+ };
35
+ export type NotificationAdditionalDetails = {
36
+ attachments: FetchStatus & {
37
+ attachments: Array<PrepviewAttachment>;
38
+ };
39
+ documents: FetchStatus & {
40
+ documentGroups: Array<PrepviewDocumentGroup>;
41
+ };
42
+ history: FetchStatus & {
43
+ notificationGroups: FetchStatus & {
44
+ groups: PrepviewTagHistoryGroup<PrepviewNotification>[];
45
+ };
46
+ punchGroups: FetchStatus & {
47
+ groups: PrepviewTagHistoryGroup<PrepviewPunch>[];
48
+ };
49
+ workOrderGroups: FetchStatus & {
50
+ groups: PrepviewTagHistoryGroup<PrepviewWorkOrder>[];
51
+ };
52
+ };
53
+ safetyCards: FetchStatus & {
54
+ safetyCards: Array<PrepviewSafety>;
55
+ };
56
+ tagInformation: FetchStatus & PrepviewTagInformation;
57
+ };
58
+ export type PrepviewNotification = {
59
+ id: string;
60
+ activeStatusIds: string;
61
+ changedDateTime?: Date;
62
+ createdDateTime: Date;
63
+ planningPlant: string;
64
+ mainWorkCenterId: string;
65
+ requiredEndDateTime: Date;
66
+ title: string;
67
+ type: string;
68
+ };
@@ -0,0 +1,13 @@
1
+ export type PrepviewOperation = {
2
+ actualPercentageComplete: number;
3
+ actualWorkHours: string;
4
+ capacityCount: number;
5
+ activeStatusIds: string;
6
+ earliestFinishDateTime: Date;
7
+ earliestStartDateTime: Date;
8
+ operationNumber: string;
9
+ plannedDuration: string;
10
+ plannedWorkHours: string;
11
+ title: string;
12
+ workCenterId: string;
13
+ };
@@ -0,0 +1,27 @@
1
+ import { FetchStatus } from './common';
2
+ export type PunchDetails = FetchStatus & {
3
+ id: string;
4
+ tagNo: string;
5
+ tagDescription: string;
6
+ tagArea: string;
7
+ description: string;
8
+ statusId: string;
9
+ mcPkgNo: string;
10
+ commPkgNo: string;
11
+ systemId: number;
12
+ clearedByOrg: string;
13
+ raisedByOrg: string;
14
+ typeDescription: string;
15
+ priorityId: string;
16
+ projectName: string;
17
+ statusCode: number;
18
+ };
19
+ export type PrepviewPunch = {
20
+ id: string;
21
+ type: string;
22
+ statusId: string;
23
+ tagNo: string;
24
+ tagArea: string;
25
+ description: string;
26
+ updatedAt?: Date;
27
+ };
@@ -0,0 +1,21 @@
1
+ export type PrepviewSafety = {
2
+ title: string;
3
+ description: string;
4
+ caseDate: string;
5
+ country: string;
6
+ url: string;
7
+ severity: number;
8
+ };
9
+ export interface SafetyDataParams {
10
+ dateFrom: string;
11
+ dateTo: string;
12
+ filters: SafetyDataFilter[];
13
+ query: string;
14
+ sortByDate: boolean;
15
+ top: number;
16
+ }
17
+ interface SafetyDataFilter {
18
+ fieldName: string;
19
+ values: string[];
20
+ }
21
+ export {};
@@ -0,0 +1,24 @@
1
+ export type PrepviewTagInformation = {
2
+ abcIndicator: string;
3
+ area: string;
4
+ consequenceCost: string;
5
+ consequenceFail: string;
6
+ consequenceHse: string;
7
+ consequenceProd: string;
8
+ criticalSparepartDemandTime?: Date;
9
+ functionalLocation: string;
10
+ id: string;
11
+ location: string;
12
+ overallCriticality: string;
13
+ redundancy: string;
14
+ repairStrategy: string;
15
+ unsafeFailure: string[];
16
+ };
17
+ export type PrepviewRelatedTag = {
18
+ tagId: string;
19
+ tagPlantId: string;
20
+ tag: string;
21
+ notification?: string;
22
+ equipment?: string;
23
+ description?: string;
24
+ };
@@ -0,0 +1,82 @@
1
+ import { PrepviewAttachment } from './attachment';
2
+ import { FetchStatus } from './common';
3
+ import { PrepviewDocumentGroup } from './document';
4
+ import { PrepviewNotification } from './notification';
5
+ import { PrepviewOperation } from './operation';
6
+ import { PrepviewPunch } from './punch';
7
+ import { PrepviewSafety } from './safety';
8
+ import { PrepviewRelatedTag, PrepviewTagInformation } from './tag';
9
+ export type PrepviewWorkOrderDto = {
10
+ details: WorkOrderDetails;
11
+ additionalDetails?: WorkOrderAdditionalDetails;
12
+ };
13
+ export type WorkOrderDetails = FetchStatus & {
14
+ basicFinishDateTime: Date;
15
+ basicStartDateTime: Date;
16
+ changedDateTime: Date;
17
+ createdDateTime: Date;
18
+ requiredEndDateTime: Date;
19
+ maintenancePlanDate: Date;
20
+ maintenancePlant: string;
21
+ planningPlant: string;
22
+ activeStatusIds: string;
23
+ description: string;
24
+ equipmentId: string;
25
+ id: string;
26
+ locationId: string;
27
+ longText: string;
28
+ tagId: string;
29
+ workCenterId: string;
30
+ personResponsible?: string;
31
+ revisionId?: string;
32
+ orderType: string;
33
+ plannerGroupId: string;
34
+ systemId: string;
35
+ system: string;
36
+ priority: string;
37
+ priorityId: string;
38
+ plantId: string;
39
+ };
40
+ export type WorkOrderAdditionalDetails = {
41
+ attachments: FetchStatus & {
42
+ attachments: Array<PrepviewAttachment>;
43
+ };
44
+ documents: FetchStatus & {
45
+ documentGroups: Array<PrepviewDocumentGroup>;
46
+ };
47
+ history: FetchStatus & {
48
+ notificationGroups: FetchStatus & {
49
+ groups: PrepviewTagHistoryGroup<PrepviewNotification>[];
50
+ };
51
+ punchGroups: FetchStatus & {
52
+ groups: PrepviewTagHistoryGroup<PrepviewPunch>[];
53
+ };
54
+ workOrderGroups: FetchStatus & {
55
+ groups: PrepviewTagHistoryGroup<PrepviewWorkOrder>[];
56
+ };
57
+ };
58
+ objects: FetchStatus & {
59
+ objects: Array<PrepviewRelatedTag>;
60
+ };
61
+ operations: FetchStatus & {
62
+ operations: Array<PrepviewOperation>;
63
+ };
64
+ safetyCards: FetchStatus & {
65
+ safetyCards: Array<PrepviewSafety>;
66
+ };
67
+ tagInformation: FetchStatus & PrepviewTagInformation;
68
+ };
69
+ export type PrepviewTagHistoryGroup<T = PrepviewNotification | PrepviewWorkOrder | PrepviewPunch> = {
70
+ type: string;
71
+ items: Array<T>;
72
+ };
73
+ export type PrepviewWorkOrder = {
74
+ type: string;
75
+ title: string;
76
+ mainWorkCenterId?: string;
77
+ id: string;
78
+ createdDateTime: Date;
79
+ changedDateTime: Date;
80
+ activeStatusIds: string;
81
+ tagNo: string;
82
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Returns a date as a friendly readable string. If the date is undefined, it returns empty string.
3
+ * @param date The date to convert to friendly string format.
4
+ */
5
+ export declare function dateToStringOrEmpty(date: Date | string | undefined): string;
@@ -0,0 +1 @@
1
+ export declare function setFileIcon(fileExtension: string | undefined): string;
@@ -0,0 +1 @@
1
+ export declare function escapeSpecialCharacters(text: string): string[];
@@ -0,0 +1,14 @@
1
+ export declare enum DocType {
2
+ pid = "pid",
3
+ iso = "iso",
4
+ did = "did",
5
+ scd = "scd",
6
+ causeEffect = "causeEffect",
7
+ fpds = "fpds",
8
+ layout = "layout",
9
+ loop = "loop",
10
+ blockDiagram = "blockDiagram",
11
+ wire = "wire",
12
+ detail = "detail",
13
+ other = "other"
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from './documents';
2
+ export * from './tagHistoryItem';
@@ -0,0 +1,5 @@
1
+ export declare enum WorkItemType {
2
+ Notifications = 0,
3
+ WorkOrders = 1,
4
+ Punches = 2
5
+ }
@@ -0,0 +1,10 @@
1
+ export * from './date';
2
+ export * from './documents';
3
+ export * from './dom';
4
+ export * from './enums';
5
+ export * from './logger';
6
+ export * from './object';
7
+ export * from './string';
8
+ export * from './url';
9
+ export * from './workorder';
10
+ export * from './notification';
@@ -0,0 +1,71 @@
1
+ import { AnalyticsEvent, AnalyticsModule } from '@equinor/echo-core';
2
+ export declare enum ObjectName {
3
+ Module = "Module",
4
+ Synergi = "Synergi",
5
+ SafeX = "SafeX"
6
+ }
7
+ type ActionNames = {
8
+ [ObjectName.Module]: ModuleActions;
9
+ [ObjectName.Synergi]: SynergiActions;
10
+ [ObjectName.SafeX]: SafeXActions;
11
+ };
12
+ type ActionProperties = {
13
+ [ObjectName.Module]: ModuleActionProperties;
14
+ [ObjectName.Synergi]: SynergiActionProperties;
15
+ [ObjectName.SafeX]: SafeXActionProperties;
16
+ };
17
+ type ModuleActions = 'Started';
18
+ type ModuleActionProperties = {
19
+ message?: string;
20
+ };
21
+ type SynergiActions = 'Application opened';
22
+ type SynergiActionProperties = {
23
+ synergiUrl: string;
24
+ };
25
+ type SafeXActions = 'Application opened';
26
+ type SafeXActionProperties = {
27
+ searchValue?: string;
28
+ };
29
+ declare enum LogLevel {
30
+ Invalid = 0,
31
+ LocalDevelopment = 1,
32
+ EchoDevelopment = 2,
33
+ QA = 3,
34
+ Prod = 4
35
+ }
36
+ type LogLevelKeys = keyof typeof LogLevel;
37
+ interface BaseLoggerProps {
38
+ moduleName: string;
39
+ analytics: AnalyticsModule;
40
+ /**
41
+ * LogLevelOverride can be set in localstorage as "[moduleShortName].logOverride"
42
+ * and should be a number between 0 and 5.
43
+ */
44
+ logLevelOverride?: LogLevel;
45
+ }
46
+ declare class BaseLogger {
47
+ protected _moduleName: string;
48
+ protected _logLevel: LogLevel;
49
+ protected _logLevelOverride?: LogLevel;
50
+ protected _analytics: AnalyticsModule;
51
+ constructor({ moduleName, analytics, logLevelOverride }: BaseLoggerProps);
52
+ set overrideLogLevel(override: LogLevelKeys);
53
+ getLogLevelOverride(): number;
54
+ track(event: AnalyticsEvent): void;
55
+ trackError(error: Error): void;
56
+ log(level: LogLevelKeys, callback: () => void): void;
57
+ /**
58
+ * @returns LogLevel for current hosting environment.
59
+ */
60
+ protected setInitialLogLevel(): LogLevel;
61
+ }
62
+ type PrepviewLoggerProps = BaseLoggerProps;
63
+ declare class PrepviewLogger extends BaseLogger {
64
+ constructor({ ...baseProps }: PrepviewLoggerProps);
65
+ trackEvent<Name extends ObjectName = ObjectName, Action extends ActionNames[Name] = ActionNames[Name], Properties extends ActionProperties[Name] = ActionProperties[Name]>(objectName: Name, actionName: Action, properties: Properties): void;
66
+ moduleStarted(): void;
67
+ synergiOpened(props: SynergiActionProperties): void;
68
+ openSafeX(props: SafeXActionProperties): void;
69
+ }
70
+ declare const logger: PrepviewLogger;
71
+ export { logger };
@@ -0,0 +1,3 @@
1
+ export declare function setNotificationIconName(type: string): "notifications_m1" | "notifications_m2" | "notifications_m3" | "notifications_m4" | "notifications_m5" | "notifications_m6" | "notifications_m9" | "notifications_main_group";
2
+ export declare function getStatusColor(statusIds: string): "#4bb748" | "#fbca36";
3
+ export declare function getStatusText(statusIds: string): "Completed" | "Active";
@@ -0,0 +1 @@
1
+ export declare const toStringOrDefault: <T, K extends keyof T>(target: T, key: K, defaultValue?: string) => string;
@@ -0,0 +1 @@
1
+ export declare function setPunchIconName(type: string): "punches_pa" | "punches_pb" | "punches_main_group";
@@ -0,0 +1 @@
1
+ export declare function trimToLength(inputString: string, stringLength: number): string;
@@ -0,0 +1,9 @@
1
+ export declare function combineUrls(base: string, ...parts: string[]): string;
2
+ export type Params = Record<string, string | number | boolean>;
3
+ /**
4
+ * Takes a url as input and adds the specified parameters to it.
5
+ * @param url The url to extend.
6
+ * @param params The params to add.
7
+ */
8
+ export declare const addParams: (url: string, params: Params) => string;
9
+ export declare function openUrl(url: string): void;
@@ -0,0 +1,2 @@
1
+ export declare const MaintenanceApiNameForWorkOrders: Record<string, string>;
2
+ export declare function setWorkOrderIconName(type: string): "workorders_pm01" | "workorders_pm02" | "workorders_pm03" | "workorders_pm04" | "workorders_pm05" | "workorders_pm06" | "workorders_pm10" | "workorders_pm15" | "workorders_pm20" | "workorders_main_group";
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { WorkOrderDetails } from '../../types';
3
+ export interface Props {
4
+ details: WorkOrderDetails;
5
+ instCode: string;
6
+ isLoading?: boolean;
7
+ closePanel: () => void;
8
+ }
9
+ declare function DetailsWorkOrder({ details, instCode, closePanel }: Props): JSX.Element;
10
+ export { DetailsWorkOrder };
@@ -0,0 +1 @@
1
+ export * from './DetailsWorkOrder';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { WorkOrderDetails } from '../../types';
3
+ interface HeaderProps {
4
+ instCode: string;
5
+ workOrder: WorkOrderDetails;
6
+ workOrderHeaderAction?: React.ReactNode;
7
+ }
8
+ declare function Header(props: HeaderProps): JSX.Element | null;
9
+ export { Header };
@@ -0,0 +1 @@
1
+ export * from './Header';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PrepviewWorkOrderDto } from '../types';
3
+ interface WorkOrderProps {
4
+ instCode: string;
5
+ workOrder: PrepviewWorkOrderDto;
6
+ closePanel: () => void;
7
+ workOrderHeaderAction?: React.ReactNode;
8
+ }
9
+ declare function WorkOrder(props: WorkOrderProps): JSX.Element | null;
10
+ export { WorkOrder };
@@ -4,7 +4,7 @@ interface RealTimeData extends SignalRState {
4
4
  metadata?: IMSByName;
5
5
  present?: SignalRData;
6
6
  }
7
- declare type SignalRData = {
7
+ type SignalRData = {
8
8
  time: Date;
9
9
  value: number;
10
10
  status: number;
@@ -1,4 +1,4 @@
1
1
  import { HubConnection } from '@microsoft/signalr';
2
- declare type HubMethod = (...args: any[]) => void;
2
+ type HubMethod = (...args: any[]) => void;
3
3
  export declare function useSignalRListener(hubConnection: HubConnection | undefined, target: string, method: HubMethod): void;
4
4
  export {};
@@ -1,9 +1,8 @@
1
1
  import { AppComponentProps, WrappedComponent } from '@equinor/echo-core';
2
2
  import React, { ErrorInfo } from 'react';
3
- import { LayoutProps } from '../containers/layouts';
4
3
  interface EchoRouteProps {
5
4
  component: WrappedComponent<AppComponentProps>;
6
- layout: React.FC<LayoutProps>;
5
+ layoutKey?: string;
7
6
  path: string;
8
7
  errorHandler?: (error: Error, errorInfo: ErrorInfo) => void;
9
8
  exactPath?: boolean;
@@ -1,4 +1,3 @@
1
1
  export * from './echoRoute';
2
2
  export * from './echoRouter';
3
3
  export * from './routes';
4
- export * from './useLayout';
@@ -2,6 +2,7 @@
2
2
  interface TagNoProps {
3
3
  tagNo: string;
4
4
  className?: string;
5
+ replaceLastNavigationItem?: boolean;
5
6
  }
6
- export declare const TagNumber: ({ tagNo, className }: TagNoProps) => JSX.Element;
7
- export default TagNumber;
7
+ export declare const TagNumber: ({ tagNo, className, replaceLastNavigationItem }: TagNoProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface EchoBottomBarProps {
3
+ isBottomBarVisible: boolean;
4
+ activeAppMenuItem: string;
5
+ updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
6
+ }
7
+ interface EchoBottomBarButtonProps {
8
+ name: string;
9
+ isActive: boolean;
10
+ onButtonClick: (name: string) => void;
11
+ label?: string;
12
+ iconClassName?: string;
13
+ }
14
+ export declare const EchoBottomBarButton: React.FC<EchoBottomBarButtonProps>;
15
+ export declare const EchoBarComponent: React.FC<EchoBottomBarProps>;
16
+ declare const _default: React.NamedExoticComponent<EchoBottomBarProps>;
17
+ export default _default;
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  interface CorePanelsProps {
3
3
  children: React.ReactNode;
4
- isLeftAndRightPanelHidden?: boolean;
5
4
  Legend?: React.FC;
6
5
  }
7
6
  export declare const EchoContent: React.FC<CorePanelsProps>;
@@ -1,6 +1,6 @@
1
1
  import { Panel } from '@equinor/echo-core';
2
2
  import React, { ComponentType } from 'react';
3
- export declare type AnyComponent<T> = ComponentType<T>;
3
+ export type AnyComponent<T> = ComponentType<T>;
4
4
  export interface EchoApp {
5
5
  authenticated: boolean;
6
6
  }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface EchoUiContextState {
3
+ activeAppMenuItem: string;
4
+ isLegendActive: boolean | undefined;
5
+ updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
6
+ updateIsLegendActive: (isLegendActive: boolean) => void;
7
+ }
8
+ export declare const useEchoUiContext: () => EchoUiContextState;
9
+ interface EchoUiContextProviderProps {
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const EchoUiContextProvider: React.FC<EchoUiContextProviderProps>;
13
+ export {};
@@ -1,3 +1,5 @@
1
+ export * from './EchoBarComponent';
1
2
  export * from './EchoContent';
2
3
  export * from './EchoContentPanels';
3
4
  export * from './EchoEventHandler';
5
+ export * from './EchoUserInterfaceContextProvider';