@equinor/echo-framework 0.8.1 → 0.8.4

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 (95) hide show
  1. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.d.ts +1 -3
  2. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.d.ts +2 -1
  3. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.d.ts +0 -3
  4. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.d.ts +0 -4
  5. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.d.ts +0 -2
  6. package/dist/components/contextualAppLinks/externalLinkButtons/index.d.ts +0 -1
  7. package/dist/components/externalLinkButton/externalLinkButton.d.ts +7 -16
  8. package/dist/components/panel/corePanelLeft.d.ts +4 -1
  9. package/dist/components/panel/corePanelRight.d.ts +4 -1
  10. package/dist/components/realTimeData/hooks/useSignalR.d.ts +2 -3
  11. package/dist/coreApplication/EchoBarComponent.d.ts +6 -0
  12. package/dist/coreApplication/EchoContent.d.ts +1 -0
  13. package/dist/coreApplication/index.d.ts +1 -0
  14. package/dist/hooks/hookLibrary.d.ts +8 -2
  15. package/dist/hooks/index.d.ts +1 -0
  16. package/dist/hooks/useScreenOrientation.d.ts +1 -0
  17. package/dist/hooks/useSemi.d.ts +7 -11
  18. package/dist/hooks/useTagDetails.d.ts +3 -10
  19. package/dist/index.d.ts +7 -12
  20. package/dist/services/api/api-manager.d.ts +1 -1
  21. package/dist/services/api/index.d.ts +0 -1
  22. package/dist/src/components/containers/layout.module.css.js +4 -1
  23. package/dist/src/components/containers/layouts.js +127 -10
  24. package/dist/src/components/contextualAppLinks/externalAppsMenu.js +4 -4
  25. package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +11 -66
  26. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +5 -60
  27. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +11 -43
  28. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +1 -1
  29. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +11 -58
  30. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +5 -16
  31. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +1 -1
  32. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +16 -67
  33. package/dist/src/components/externalLinkButton/externalLinkButton.js +34 -89
  34. package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +2 -5
  35. package/dist/src/components/footer/footer.module.css.js +1 -1
  36. package/dist/src/components/panel/corePanelLeft.js +5 -2
  37. package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
  38. package/dist/src/components/panel/corePanelRight.js +5 -2
  39. package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
  40. package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +2 -3
  41. package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +7 -32
  42. package/dist/src/components/realTimeData/hooks/useSignalR.js +2 -4
  43. package/dist/src/coreApplication/EchoBarComponent.js +190 -0
  44. package/dist/src/coreApplication/EchoContent.js +11 -2
  45. package/dist/src/coreApplication/EchoContent.module.css.js +21 -0
  46. package/dist/src/globalStyles.css.js +1 -1
  47. package/dist/src/hooks/hookLibrary.js +9 -0
  48. package/dist/src/hooks/index.js +3 -0
  49. package/dist/src/hooks/useScreenOrientation.js +50 -0
  50. package/dist/src/hooks/useSemi.js +14 -40
  51. package/dist/src/hooks/useTagDetails.js +45 -116
  52. package/dist/src/icons/common/Evision.svg.js +2 -3
  53. package/dist/src/icons/common/Fusion.svg.js +25 -30
  54. package/dist/src/icons/common/McApp.svg.js +6 -10
  55. package/dist/src/icons/common/ProCoSysIcon.svg.js +2 -3
  56. package/dist/src/icons/common/SapLogo.svg.js +4 -5
  57. package/dist/src/icons/common/SemiIcon.svg.js +11 -11
  58. package/dist/src/icons/common/Stid.svg.js +2 -3
  59. package/dist/src/icons/common/TR2000.svg.js +6 -8
  60. package/dist/src/icons/common/Yammer.svg.js +1 -2
  61. package/dist/src/index.js +7 -15
  62. package/dist/src/services/api/api-manager.js +2 -2
  63. package/dist/src/services/api/api-realtimedata.js +1 -3
  64. package/dist/src/types/pingableSources.js +0 -1
  65. package/dist/src/utils/plantInfo.js +0 -1
  66. package/dist/types/hookLibrary.d.ts +4 -0
  67. package/dist/types/pingableSources.d.ts +1 -2
  68. package/dist/utils/index.d.ts +0 -1
  69. package/dist/utils/plantInfo.d.ts +0 -6
  70. package/package.json +2 -2
  71. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts +0 -47
  72. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts +0 -1
  73. package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.d.ts +0 -14
  74. package/dist/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +0 -18
  75. package/dist/services/api/api-tag-details.d.ts +0 -18
  76. package/dist/services/api/api-tag-details.test.d.ts +0 -1
  77. package/dist/services/api/api-tags.d.ts +0 -17
  78. package/dist/services/api/api-tags.test.d.ts +0 -1
  79. package/dist/services/echopediaAnalyticsModule/echopediaAnalyticsModule.d.ts +0 -1
  80. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
  81. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -93
  82. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
  83. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
  84. package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
  85. package/dist/src/icons/common/Notification.svg.js +0 -82
  86. package/dist/src/icons/common/WorkOrder.svg.js +0 -72
  87. package/dist/src/icons/common/satos-logo.png.js +0 -7
  88. package/dist/src/services/api/api-tag-details.js +0 -66
  89. package/dist/src/services/api/api-tags.js +0 -29
  90. package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
  91. package/dist/src/utils/navigationUtils.js +0 -28
  92. package/dist/types/api-proCoSysTagResponse.d.ts +0 -8
  93. package/dist/utils/navigationUtils.d.ts +0 -7
  94. package/dist/utils/navigationUtils.test.d.ts +0 -1
  95. package/dist/utils/plantInfo.test.d.ts +0 -1
@@ -1,66 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var _tslib = require('../../../_virtual/_tslib.js');
8
-
9
- var echoBase = require('@equinor/echo-base');
10
-
11
- var echoSearch = require('@equinor/echo-search');
12
- /**
13
- * Wraps Search.Tags.getTagDetailsAsync(), and throws proper NotFoundError if search was unable to find the given tag.
14
- * It also converts Search's result.error responses to proper errors and throws them.
15
- *
16
- * @param {Object} param
17
- * @param {string} params.tagNo The tag number to query.
18
- * @param {string} params.instCode Plant installation code for the given tag.
19
- * @param {AbortSignal} params.abortSignal A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
20
- * @throws {NotFoundError} NotFoundError when there are no matches for the tagNo instCode pair.
21
- * @throws {BaseError} In any other failed API call.
22
- * @returns {Promise<TagDetailsDto>} Promise resolving in tag details DTO.
23
- */
24
-
25
-
26
- function getTagDetails(_ref) {
27
- var tagNo = _ref.tagNo,
28
- instCode = _ref.instCode,
29
- abortSignal = _ref.abortSignal;
30
- return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
31
- var result;
32
- return regeneratorRuntime.wrap(function _callee$(_context) {
33
- while (1) {
34
- switch (_context.prev = _context.next) {
35
- case 0:
36
- _context.next = 2;
37
- return echoSearch.Search.Tags.getTagDetailsAsync(tagNo, instCode, abortSignal);
38
-
39
- case 2:
40
- result = _context.sent;
41
- echoSearch.resultHelper.throwIfError(result);
42
-
43
- if (result.value) {
44
- _context.next = 6;
45
- break;
46
- }
47
-
48
- throw new echoBase.NotFoundError({
49
- message: "Could not find ".concat(instCode, " ").concat(tagNo),
50
- httpStatusCode: 404,
51
- url: 'getTagDetails'
52
- });
53
-
54
- case 6:
55
- return _context.abrupt("return", result.value);
56
-
57
- case 7:
58
- case "end":
59
- return _context.stop();
60
- }
61
- }
62
- }, _callee);
63
- }));
64
- }
65
-
66
- exports.getTagDetails = getTagDetails;
@@ -1,29 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var apiManager = require('./api-manager.js');
8
- /**
9
- * Fetches tag information from ProCoSys.
10
- *
11
- * @param {Object} param
12
- * @param {string} params.tagNo The tag number to query.
13
- * @param {string} params.instCode Plant installation code for the given tag.
14
- * @param {AbortSignal} params.abortSignal A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
15
- * @throws {BaseError} If the response can't be parsed to JSON.
16
- * @throws {Error} In any other API call issues.
17
- * @returns {Promise<TProCoSysApiTag[]>} Promise resolving in array of tags.
18
- */
19
-
20
-
21
- function getTagFromProCoSys(_ref) {
22
- var instCode = _ref.instCode,
23
- tagNo = _ref.tagNo,
24
- abortSignal = _ref.abortSignal;
25
- var url = "".concat(apiManager.baseApiUrl, "/").concat(instCode, "/tags/procosys?tagNo=").concat(tagNo);
26
- return apiManager.request(url, [], abortSignal);
27
- }
28
-
29
- exports.getTagFromProCoSys = getTagFromProCoSys;
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var EchoCore = require('@equinor/echo-core');
8
-
9
- var echopediaAnalyticsModule = EchoCore.analytics.createAnalyticsModule('ep');
10
- exports.echopediaAnalyticsModule = echopediaAnalyticsModule;
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var echopediaAnalyticsModule = require('../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
8
- /**
9
- * Helper function to execute a redirection to an outer source.
10
- *
11
- * @param {string} link Link to navigate to.
12
- * @param {boolean} redirect Set this to 'true' to load the given url to navigate to in the current tab / window.
13
- */
14
-
15
-
16
- var goToExternalLink = function goToExternalLink(link, redirect) {
17
- echopediaAnalyticsModule.echopediaAnalyticsModule.trackEventBy('ExternalLink', 'Opened', {
18
- linkTo: link
19
- });
20
-
21
- if (redirect) {
22
- window.location.href = link;
23
- } else {
24
- window.open(link, '_blank');
25
- }
26
- };
27
-
28
- exports.goToExternalLink = goToExternalLink;
@@ -1,8 +0,0 @@
1
- export declare type ProCoSysApiTag = {
2
- id: number;
3
- tagNo: string;
4
- description: string;
5
- isMaster: boolean;
6
- projectName: string;
7
- registerId: string;
8
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Helper function to execute a redirection to an outer source.
3
- *
4
- * @param {string} link Link to navigate to.
5
- * @param {boolean} redirect Set this to 'true' to load the given url to navigate to in the current tab / window.
6
- */
7
- export declare const goToExternalLink: (link: string, redirect?: boolean | undefined) => void;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};