@equinor/echo-framework 0.8.1 → 0.8.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.
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.d.ts +1 -3
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.d.ts +2 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.d.ts +0 -3
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.d.ts +0 -4
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.d.ts +0 -2
- package/dist/components/contextualAppLinks/externalLinkButtons/index.d.ts +0 -1
- package/dist/components/externalLinkButton/externalLinkButton.d.ts +7 -16
- package/dist/components/panel/corePanelLeft.d.ts +4 -1
- package/dist/components/panel/corePanelRight.d.ts +4 -1
- package/dist/components/realTimeData/hooks/useSignalR.d.ts +2 -3
- package/dist/coreApplication/EchoBarComponent.d.ts +6 -0
- package/dist/coreApplication/EchoContent.d.ts +1 -0
- package/dist/coreApplication/index.d.ts +1 -0
- package/dist/hooks/hookLibrary.d.ts +8 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useScreenOrientation.d.ts +1 -0
- package/dist/hooks/useSemi.d.ts +7 -11
- package/dist/hooks/useTagDetails.d.ts +3 -10
- package/dist/index.d.ts +7 -12
- package/dist/services/api/api-manager.d.ts +1 -1
- package/dist/services/api/index.d.ts +0 -1
- package/dist/src/components/containers/layout.module.css.js +3 -1
- package/dist/src/components/containers/layouts.js +5 -7
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +4 -4
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +11 -66
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +5 -60
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +11 -43
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +11 -58
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +5 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +16 -67
- package/dist/src/components/externalLinkButton/externalLinkButton.js +34 -89
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +2 -5
- package/dist/src/components/footer/footer.module.css.js +1 -1
- package/dist/src/components/panel/corePanelLeft.js +5 -2
- package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
- package/dist/src/components/panel/corePanelRight.js +5 -2
- package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +2 -3
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +7 -32
- package/dist/src/components/realTimeData/hooks/useSignalR.js +2 -4
- package/dist/src/coreApplication/EchoBarComponent.js +190 -0
- package/dist/src/coreApplication/EchoContent.js +36 -2
- package/dist/src/coreApplication/EchoContent.module.css.js +21 -0
- package/dist/src/globalStyles.css.js +1 -1
- package/dist/src/hooks/hookLibrary.js +9 -0
- package/dist/src/hooks/index.js +3 -0
- package/dist/src/hooks/useScreenOrientation.js +50 -0
- package/dist/src/hooks/useSemi.js +14 -40
- package/dist/src/hooks/useTagDetails.js +45 -116
- package/dist/src/icons/common/Evision.svg.js +2 -3
- package/dist/src/icons/common/Fusion.svg.js +25 -30
- package/dist/src/icons/common/McApp.svg.js +6 -10
- package/dist/src/icons/common/ProCoSysIcon.svg.js +2 -3
- package/dist/src/icons/common/SapLogo.svg.js +4 -5
- package/dist/src/icons/common/SemiIcon.svg.js +11 -11
- package/dist/src/icons/common/Stid.svg.js +2 -3
- package/dist/src/icons/common/TR2000.svg.js +6 -8
- package/dist/src/icons/common/Yammer.svg.js +1 -2
- package/dist/src/index.js +13 -15
- package/dist/src/services/api/api-manager.js +2 -2
- package/dist/src/services/api/api-realtimedata.js +1 -3
- package/dist/src/types/pingableSources.js +0 -1
- package/dist/src/utils/plantInfo.js +0 -1
- package/dist/types/hookLibrary.d.ts +4 -0
- package/dist/types/pingableSources.d.ts +1 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/plantInfo.d.ts +0 -6
- package/package.json +2 -2
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts +0 -47
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts +0 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.d.ts +0 -14
- package/dist/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +0 -18
- package/dist/services/api/api-tag-details.d.ts +0 -18
- package/dist/services/api/api-tag-details.test.d.ts +0 -1
- package/dist/services/api/api-tags.d.ts +0 -17
- package/dist/services/api/api-tags.test.d.ts +0 -1
- package/dist/services/echopediaAnalyticsModule/echopediaAnalyticsModule.d.ts +0 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -93
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
- package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
- package/dist/src/icons/common/Notification.svg.js +0 -82
- package/dist/src/icons/common/WorkOrder.svg.js +0 -72
- package/dist/src/icons/common/satos-logo.png.js +0 -7
- package/dist/src/services/api/api-tag-details.js +0 -66
- package/dist/src/services/api/api-tags.js +0 -29
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
- package/dist/src/utils/navigationUtils.js +0 -28
- package/dist/types/api-proCoSysTagResponse.d.ts +0 -8
- package/dist/utils/navigationUtils.d.ts +0 -7
- package/dist/utils/navigationUtils.test.d.ts +0 -1
- package/dist/utils/plantInfo.test.d.ts +0 -1
|
@@ -54,12 +54,11 @@ var SvgStid = function SvgStid(props) {
|
|
|
54
54
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
55
55
|
width: 24,
|
|
56
56
|
height: 9,
|
|
57
|
-
viewBox: "0 0 24 9",
|
|
58
57
|
fill: "none",
|
|
59
58
|
xmlns: "http://www.w3.org/2000/svg"
|
|
60
59
|
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
61
|
-
d: "M1.
|
|
62
|
-
fill: "
|
|
60
|
+
d: "M1.434 8.41a3.481 3.481 0 0 1-1.372-.917A.261.261 0 0 1 0 7.316a.233.233 0 0 1 .05-.157l.611-.785a.208.208 0 0 1 .162-.095.222.222 0 0 1 .161.072c.329.29.699.53 1.098.71.385.168.802.252 1.222.248.364.023.725-.08 1.023-.29a.906.906 0 0 0 .355-.735.888.888 0 0 0-.169-.561c-.139-.17-.318-.3-.522-.38a6.926 6.926 0 0 0-1.028-.327 7.87 7.87 0 0 1-1.39-.489 2.419 2.419 0 0 1-.924-.76 2.097 2.097 0 0 1-.356-1.26 2.188 2.188 0 0 1 .405-1.304c.28-.39.659-.696 1.098-.888A3.65 3.65 0 0 1 3.323 0c1.04 0 1.888.296 2.544.888a.23.23 0 0 1 .087.158.307.307 0 0 1-.063.157l-.573.795a.177.177 0 0 1-.15.098.314.314 0 0 1-.177-.073 2.389 2.389 0 0 0-1.659-.591 1.643 1.643 0 0 0-1.028.284.869.869 0 0 0-.368.71c-.009.202.063.4.2.55.146.15.325.265.523.337.293.108.593.2.897.271a8.88 8.88 0 0 1 1.51.533c.365.17.679.436.909.767.242.388.36.84.337 1.297.004.45-.114.891-.342 1.279-.245.4-.6.721-1.023.923a3.598 3.598 0 0 1-1.64.345 5.099 5.099 0 0 1-1.873-.318Zm7.58.124v-7.05H6.993a.236.236 0 0 1-.178-.063.226.226 0 0 1-.062-.163V.236a.226.226 0 0 1 .062-.163.236.236 0 0 1 .178-.062h5.635a.241.241 0 0 1 .178.062.225.225 0 0 1 .062.163v1.016a.226.226 0 0 1-.063.164.24.24 0 0 1-.177.062h-2.02v7.056c0 .151-.074.226-.223.211H9.237c-.149.016-.223-.058-.223-.21Zm4.7.148a.215.215 0 0 1-.061-.162V.72a.254.254 0 0 1 .186-.262s.863-.333 1.158-.424a1.02 1.02 0 0 1 .1-.025c.106-.012.163.068.163.2v8.307c0 .15-.075.212-.224.224H13.89a.304.304 0 0 1-.174-.058Zm3.205.005a.218.218 0 0 1-.062-.164V.236a.217.217 0 0 1 .062-.163.235.235 0 0 1 .177-.062h2.869a4.122 4.122 0 0 1 2.072.531 3.702 3.702 0 0 1 1.439 1.518 5.451 5.451 0 0 1 0 4.664 3.684 3.684 0 0 1-1.439 1.508 4.122 4.122 0 0 1-2.076.524h-2.868a.236.236 0 0 1-.174-.07Zm2.93-1.41a2.41 2.41 0 0 0 1.819-.723c.466-.482.7-1.205.7-2.169 0-.963-.233-1.687-.7-2.17a2.416 2.416 0 0 0-1.819-.723h-1.385v5.785h1.385Z",
|
|
61
|
+
fill: "red"
|
|
63
62
|
})));
|
|
64
63
|
};
|
|
65
64
|
|
|
@@ -54,20 +54,18 @@ var SvgTr2000 = function SvgTr2000(props) {
|
|
|
54
54
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
55
55
|
width: 25,
|
|
56
56
|
height: 25,
|
|
57
|
-
viewBox: "0 0 25 25",
|
|
58
57
|
fill: "none",
|
|
59
58
|
xmlns: "http://www.w3.org/2000/svg"
|
|
60
59
|
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
61
|
-
clipPath: "url(#
|
|
60
|
+
clipPath: "url(#TR2000_svg__a)"
|
|
62
61
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
63
|
-
d: "M11.
|
|
62
|
+
d: "M11.618 1.646v3.958H8.564V21.42H3.423V5.604H.38V1.646h11.237Zm1.172 0h3.64c2.426 0 4.067.094 4.922.281.863.188 1.563.668 2.1 1.442.546.765.82 1.99.82 3.676 0 1.539-.192 2.573-.575 3.102-.383.53-1.136.847-2.26.953 1.018.252 1.702.59 2.052 1.014.35.423.566.814.648 1.172.09.35.134 1.323.134 2.919v5.215h-4.775v-6.57c0-1.06-.086-1.715-.257-1.967-.163-.252-.598-.379-1.307-.379v8.916H12.79V1.646Zm5.142 3.384v4.396c.578 0 .981-.077 1.21-.232.236-.162.354-.68.354-1.55V6.555c0-.627-.114-1.038-.342-1.233-.22-.196-.627-.293-1.222-.293Z",
|
|
64
63
|
fill: "#285684"
|
|
65
64
|
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
66
|
-
id: "
|
|
67
|
-
}, /*#__PURE__*/React__namespace.createElement("
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
fill: "white"
|
|
65
|
+
id: "TR2000_svg__a"
|
|
66
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
67
|
+
fill: "#fff",
|
|
68
|
+
d: "M0 0h25v25H0z"
|
|
71
69
|
})))));
|
|
72
70
|
};
|
|
73
71
|
|
|
@@ -54,11 +54,10 @@ var SvgYammer = function SvgYammer(props) {
|
|
|
54
54
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
55
55
|
width: 25,
|
|
56
56
|
height: 25,
|
|
57
|
-
viewBox: "0 0 25 25",
|
|
58
57
|
fill: "none",
|
|
59
58
|
xmlns: "http://www.w3.org/2000/svg"
|
|
60
59
|
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
61
|
-
d: "M24 11.
|
|
60
|
+
d: "M24 11.5h-.2c-1 0-7.9.8-7.5 1.5.3.7 4.6 1 7.6 1 .6-.1 1.1-.7 1.1-1.3 0-.6-.5-1-1-1.2Zm-2.3 7.3c-2.7-1.5-6.6-3.2-7.2-2.8-.6.4 5.1 4.4 5.9 4.9.1 0 .1.1.1.1.5.2 1.1 0 1.4-.5.4-.5.3-1.3-.2-1.7Zm0-12c.5-.4.6-1.1.3-1.7-.3-.5-.9-.7-1.4-.5 0 0-.1 0-.1.1-.8.5-6.5 4.5-5.9 4.9.5.5 4.4-1.3 7.1-2.8Zm-16 10.7c-.8 2.2-1.5 3.3-3.2 3.3h-.8c-.5 0-1.1.3-1.2.9-.2.6.2 1.3.8 1.4.4.1.9.1 1.3.1 3.1 0 4.1-1.8 5.2-4.4l6.1-15.1c.2-.7-.2-1.4-.9-1.6-.7-.2-1.4.1-1.6.8L7.2 14.1h-.1L2.6 2.8c-.3-.6-1.1-1-1.7-.7-.7.3-1 1-.8 1.7l5.6 13.7Z",
|
|
62
61
|
fill: "#265495"
|
|
63
62
|
})));
|
|
64
63
|
};
|
package/dist/src/index.js
CHANGED
|
@@ -12,22 +12,16 @@ var hookLibrary = require('./hooks/hookLibrary.js');
|
|
|
12
12
|
|
|
13
13
|
var apiPlantinfo = require('./services/api/api-plantinfo.js');
|
|
14
14
|
|
|
15
|
-
var apiTagDetails = require('./services/api/api-tag-details.js');
|
|
16
|
-
|
|
17
15
|
var componentRegistry = require('./services/componentRegistry/componentRegistry.js');
|
|
18
16
|
|
|
19
17
|
var legendUtils = require('./utils/legendUtils.js');
|
|
20
18
|
|
|
21
|
-
var navigationUtils = require('./utils/navigationUtils.js');
|
|
22
|
-
|
|
23
19
|
var AppLinks = require('./components/appLinks/AppLinks.js');
|
|
24
20
|
|
|
25
21
|
var linkButton = require('./components/appLinks/linkButton/linkButton.js');
|
|
26
22
|
|
|
27
23
|
var layouts = require('./components/containers/layouts.js');
|
|
28
24
|
|
|
29
|
-
var externalLinkToCommApp = require('./components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js');
|
|
30
|
-
|
|
31
25
|
var externalLinkToMcApp = require('./components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js');
|
|
32
26
|
|
|
33
27
|
var externalLinkToProCoSys = require('./components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js');
|
|
@@ -100,6 +94,8 @@ var toaster = require('./components/toaster/toaster.js');
|
|
|
100
94
|
|
|
101
95
|
var toasters = require('./components/toaster/toasters.js');
|
|
102
96
|
|
|
97
|
+
var EchoBarComponent = require('./coreApplication/EchoBarComponent.js');
|
|
98
|
+
|
|
103
99
|
var EchoContent = require('./coreApplication/EchoContent.js');
|
|
104
100
|
|
|
105
101
|
var EchoContentPanels = require('./coreApplication/EchoContentPanels.js');
|
|
@@ -118,12 +114,15 @@ var plantInfo = require('./utils/plantInfo.js');
|
|
|
118
114
|
|
|
119
115
|
var startup = require('./utils/startup.js');
|
|
120
116
|
|
|
117
|
+
var useEchoHistory = require('./hooks/useEchoHistory.js');
|
|
118
|
+
|
|
119
|
+
var useScreenOrientation = require('./hooks/useScreenOrientation.js');
|
|
120
|
+
|
|
121
|
+
var useTagDetails = require('./hooks/useTagDetails.js');
|
|
122
|
+
|
|
121
123
|
var registerEchopediaComponent = componentRegistry.componentRegistry.registerComponent;
|
|
122
124
|
var EchoFramework = Object.freeze({
|
|
123
125
|
Utils: Object.freeze({
|
|
124
|
-
Navigation: Object.freeze({
|
|
125
|
-
goToExternalLink: navigationUtils.goToExternalLink
|
|
126
|
-
}),
|
|
127
126
|
Color: Object.freeze({
|
|
128
127
|
getLegendStatusColor: legendUtils.getLegendStatusColor
|
|
129
128
|
})
|
|
@@ -133,8 +132,7 @@ var EchoFramework = Object.freeze({
|
|
|
133
132
|
getTagItem: componentRegistry.componentRegistry.getTagItem
|
|
134
133
|
}),
|
|
135
134
|
APIs: Object.freeze({
|
|
136
|
-
getPlantsInfo: apiPlantinfo.getPlantsInfo
|
|
137
|
-
getTagDetails: apiTagDetails.getTagDetails
|
|
135
|
+
getPlantsInfo: apiPlantinfo.getPlantsInfo
|
|
138
136
|
})
|
|
139
137
|
});
|
|
140
138
|
Object.defineProperty(exports, 'RegisteredHookName', {
|
|
@@ -152,7 +150,6 @@ Object.defineProperty(exports, 'RegisteredComponentName', {
|
|
|
152
150
|
exports.getLegendStatusColor = legendUtils.getLegendStatusColor;
|
|
153
151
|
exports.legendTypeToLegendStatus = legendUtils.legendTypeToLegendStatus;
|
|
154
152
|
exports.valueToEnum = legendUtils.valueToEnum;
|
|
155
|
-
exports.goToExternalLink = navigationUtils.goToExternalLink;
|
|
156
153
|
exports.AppLinks = AppLinks.AppLinks;
|
|
157
154
|
exports.LinkButton = linkButton.LinkButton;
|
|
158
155
|
exports.CameraLayout = layouts.CameraLayout;
|
|
@@ -160,7 +157,6 @@ exports.ColorLayout = layouts.ColorLayout;
|
|
|
160
157
|
exports.DefaultLayout = layouts.DefaultLayout;
|
|
161
158
|
exports.MainLayout = layouts.MainLayout;
|
|
162
159
|
exports.PdfViewerNative = layouts.PdfViewerNative;
|
|
163
|
-
exports.ExternalLinkToCommApp = externalLinkToCommApp.ExternalLinkToCommApp;
|
|
164
160
|
exports.ExternalLinkToMcApp = externalLinkToMcApp.ExternalLinkToMcApp;
|
|
165
161
|
exports.ExternalLinkToProCoSys = externalLinkToProCoSys.ExternalLinkToProCoSys;
|
|
166
162
|
exports.ExternalLinkToSafeX = externalLinkToSafeX.ExternalLinkToSafeX;
|
|
@@ -171,7 +167,6 @@ exports.ExternalLinkToTr2000 = externalLinkToTr2000.ExternalLinkToTr2000;
|
|
|
171
167
|
exports.ContextualAppLinks = index.ContextualAppLinks;
|
|
172
168
|
exports.EchoLogo = echoLogo.EchoLogo;
|
|
173
169
|
exports.ErrorBoundary = errorBoundary.ErrorBoundary;
|
|
174
|
-
exports.ExternalLinkButton = externalLinkButton.ExternalLinkButton;
|
|
175
170
|
Object.defineProperty(exports, 'ExternalLinkButtonStyle', {
|
|
176
171
|
enumerable: true,
|
|
177
172
|
get: function get() {
|
|
@@ -206,6 +201,7 @@ exports.useLayout = useLayout.useLayout;
|
|
|
206
201
|
exports.TagNumber = tagNumber.TagNumber;
|
|
207
202
|
exports.Toaster = toaster.Toaster;
|
|
208
203
|
exports.Toasters = toasters.Toasters;
|
|
204
|
+
exports.EchoBarComponent = EchoBarComponent.EchoBarComponent;
|
|
209
205
|
exports.EchoContent = EchoContent.EchoContent;
|
|
210
206
|
exports.mainMenu = EchoContentPanels.mainMenu;
|
|
211
207
|
exports.searchPanel = EchoContentPanels.searchPanel;
|
|
@@ -246,7 +242,9 @@ exports.getPlant = plantInfo.getPlant;
|
|
|
246
242
|
exports.getPlantBySapId = plantInfo.getPlantBySapId;
|
|
247
243
|
exports.getPlantCodesOnInstallation = plantInfo.getPlantCodesOnInstallation;
|
|
248
244
|
exports.getPlantsOnInstallation = plantInfo.getPlantsOnInstallation;
|
|
249
|
-
exports.setPlantInfo = plantInfo.setPlantInfo;
|
|
250
245
|
exports.startup = startup.startup;
|
|
246
|
+
exports.useEchoHistory = useEchoHistory.useEchoHistory;
|
|
247
|
+
exports.useScreenOrientation = useScreenOrientation.useScreenOrientation;
|
|
248
|
+
exports.useTagDetails = useTagDetails.useTagDetails;
|
|
251
249
|
exports["default"] = EchoFramework;
|
|
252
250
|
exports.registerEchopediaComponent = registerEchopediaComponent;
|
|
@@ -22,7 +22,7 @@ var EchoCore__default = /*#__PURE__*/_interopDefaultLegacy(EchoCore);
|
|
|
22
22
|
|
|
23
23
|
var baseApiUrl = EchoCore.EchoEnv.env().REACT_APP_API_URL;
|
|
24
24
|
|
|
25
|
-
function request(url, requestType
|
|
25
|
+
function request(url, requestType) {
|
|
26
26
|
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
27
27
|
var response, contentType, text;
|
|
28
28
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -30,7 +30,7 @@ function request(url, requestType, abortSignal) {
|
|
|
30
30
|
switch (_context.prev = _context.next) {
|
|
31
31
|
case 0:
|
|
32
32
|
_context.next = 2;
|
|
33
|
-
return EchoCore__default["default"].EchoClient.fetch(url
|
|
33
|
+
return EchoCore__default["default"].EchoClient.fetch(url);
|
|
34
34
|
|
|
35
35
|
case 2:
|
|
36
36
|
response = _context.sent;
|
|
@@ -22,9 +22,7 @@ function getTimeseriesByName(name, instCode) {
|
|
|
22
22
|
|
|
23
23
|
case 4:
|
|
24
24
|
response = _context.sent;
|
|
25
|
-
timeseries = response.data.items
|
|
26
|
-
return item.name === name;
|
|
27
|
-
});
|
|
25
|
+
timeseries = response.data.items[0];
|
|
28
26
|
return _context.abrupt("return", timeseries);
|
|
29
27
|
|
|
30
28
|
case 9:
|
|
@@ -7,5 +7,4 @@ exports.PingableSources = void 0;
|
|
|
7
7
|
|
|
8
8
|
(function (PingableSources) {
|
|
9
9
|
PingableSources["Sap"] = "https://p03web.statoil.no/sap/public/icmandir/its/lsgui/images/img/splashscreen_corbu.png";
|
|
10
|
-
PingableSources["Statos"] = "https://satos.equinor.com/files/4/bilder/johan_svedrup.png";
|
|
11
10
|
})(exports.PingableSources || (exports.PingableSources = {}));
|
|
@@ -2,3 +2,7 @@ export declare type SetActiveTagNo = (tagNo: string, activeTagTab?: string, acti
|
|
|
2
2
|
export declare type TagData = [(tagNo: string, instCode: string) => void];
|
|
3
3
|
export declare type SetActiveCommPackNo = (commPackNo: string, activeCommPackProject: string, activeCommPackTab?: string, activeCommPackSubTab?: string) => void;
|
|
4
4
|
export declare type SetActiveMcPackNo = (mcPackNo: string, activeMcPackProject: string, activeMcPackTab?: string, activeMcPackSubTab?: string) => void;
|
|
5
|
+
export interface DeviceOrientation {
|
|
6
|
+
portrait: boolean;
|
|
7
|
+
landscape: boolean;
|
|
8
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare enum PingableSources {
|
|
2
|
-
Sap = "https://p03web.statoil.no/sap/public/icmandir/its/lsgui/images/img/splashscreen_corbu.png"
|
|
3
|
-
Statos = "https://satos.equinor.com/files/4/bilder/johan_svedrup.png"
|
|
2
|
+
Sap = "https://p03web.statoil.no/sap/public/icmandir/its/lsgui/images/img/splashscreen_corbu.png"
|
|
4
3
|
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { EchoHubPlant } from '../types/echoHubPlant';
|
|
2
|
-
/**
|
|
3
|
-
* Method for setting echo hub plant information in local storage under the key echoHubPlantInfo
|
|
4
|
-
*
|
|
5
|
-
* @param {EchoHubPlant[]} plants list of plant information to add to local storage
|
|
6
|
-
*/
|
|
7
|
-
export declare function setPlantInfo(plants: EchoHubPlant[]): void;
|
|
8
2
|
/**
|
|
9
3
|
* Method for getting echo hub plant information from local storage.
|
|
10
4
|
* If plant information is not in local storage, then this method will try to fetch the information
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Modules and components for EchoWeb, utilizing EchoCore",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@equinor/echo-scripts": "^0.1.5",
|
|
56
56
|
"@equinor/echo-search": "^0.12.1",
|
|
57
57
|
"@equinor/echo-update": "^1.3.0",
|
|
58
|
-
"@equinor/echo-utils": "^0.2.
|
|
58
|
+
"@equinor/echo-utils": "^0.2.9",
|
|
59
59
|
"@equinor/eds-core-react": "^0.19.0",
|
|
60
60
|
"@modular-css/rollup": "^28.0.0",
|
|
61
61
|
"@rollup/plugin-babel": "^5.3.1",
|
package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { TagDetailsDto } from '@equinor/echo-search';
|
|
2
|
-
import { ProCoSysApiTag } from '../../../types/api-proCoSysTagResponse';
|
|
3
|
-
declare type GetTagDetailsAndProCoSysDataResult = {
|
|
4
|
-
tagDetails: TagDetailsDto | undefined;
|
|
5
|
-
proCoSysTag: ProCoSysApiTag | undefined;
|
|
6
|
-
hasError: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Specific tool for external link buttons to help build URLS for deep linking into ProCoSys web app.
|
|
10
|
-
* Fetches both tag details and tag information from ProCoSys.
|
|
11
|
-
*
|
|
12
|
-
* @param {Object} params
|
|
13
|
-
* @param {string} params.tagNo The tag number to query.
|
|
14
|
-
* @param {string} params.instCode Plant installation code for the given tag.
|
|
15
|
-
* @returns {GetTagDetailsAndProCoSysDataResult} response - The returned promise will resolve once both API calls are resolved. (with Promise.all)
|
|
16
|
-
* @returns {TagDetailsDto} response.tagDetails - Result of tag details API call.
|
|
17
|
-
* @returns {ProCoSysApiTag} response.proCoSysTag - Tag related information from the ProCoSys system.
|
|
18
|
-
* @returns {hasError} response.hasError - indicates if there were any errors during the API calls. The exception is handled under the hood.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getTagDetailsAndProCoSysData({ tagNo, instCode }: {
|
|
21
|
-
tagNo: any;
|
|
22
|
-
instCode: any;
|
|
23
|
-
}): Promise<GetTagDetailsAndProCoSysDataResult>;
|
|
24
|
-
declare type getTagDetailsWithErrorHandlingResponse = {
|
|
25
|
-
tagDetails: TagDetailsDto | undefined;
|
|
26
|
-
hasError: boolean;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Wraps the 'getTagDetails' function. Handles and logs any Error thrown by it whi;e displaying an error message toast.
|
|
30
|
-
* Use 'getTagDetails' if you want complete freedom on how you handle any exceptions.
|
|
31
|
-
*
|
|
32
|
-
* If there were any errors during the API call, the returned value will have a 'hasError' flag set to 'true'.
|
|
33
|
-
*
|
|
34
|
-
* @param {Object} params
|
|
35
|
-
* @param {string} params.tagNo The tag number to query.
|
|
36
|
-
* @param {string} params.instCode Plant installation code for the given tag.
|
|
37
|
-
* @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.
|
|
38
|
-
* @returns {getTagDetailsWithErrorHandlingResponse} response
|
|
39
|
-
* @returns {TagDetailsDto} response.tagDetails - Result of tag details API call.
|
|
40
|
-
* @returns {hasError} response.hasError - indicates if there were any errors during the API call.
|
|
41
|
-
*/
|
|
42
|
-
export declare function getTagDetailsWithErrorHandling({ tagNo, instCode, abortSignal }: {
|
|
43
|
-
tagNo: string;
|
|
44
|
-
instCode?: string;
|
|
45
|
-
abortSignal?: AbortSignal;
|
|
46
|
-
}): Promise<getTagDetailsWithErrorHandlingResponse>;
|
|
47
|
-
export {};
|
package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type ExternalLinkToCommAppProps = {
|
|
3
|
-
tagNo: string;
|
|
4
|
-
instCode: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* External link button to Commissioning web app.
|
|
8
|
-
*
|
|
9
|
-
* @param {string} tagNo The tag's number to open in the Comm app.
|
|
10
|
-
* @param {string} instCode Plant installation code.
|
|
11
|
-
* @returns {React.FC<ExternalLinkToMcAppProps>} React component.
|
|
12
|
-
*/
|
|
13
|
-
export declare const ExternalLinkToCommApp: React.FC<ExternalLinkToCommAppProps>;
|
|
14
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type SpinnerProps = {
|
|
3
|
-
size?: 16 | 24 | 32 | 40 | 48;
|
|
4
|
-
customClassNames?: {
|
|
5
|
-
spinner?: string;
|
|
6
|
-
container?: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Local component for external link buttons. Provides a spinner overlay for any icon buttons, which might have any async calls.
|
|
11
|
-
* @param {Object} param
|
|
12
|
-
* @param {number} param.size The size of the spinner. Default value is 24.
|
|
13
|
-
* @param {Object} param.customClassNames Optional custom class names to customize the component's parts.
|
|
14
|
-
* @param {string} param.customClassNames.spinner Class name applied on the spinner.
|
|
15
|
-
* @param {string} param.customClassNames.container Class name applied on the container element.
|
|
16
|
-
*/
|
|
17
|
-
export declare const IconButtonSpinner: ({ customClassNames, size }: SpinnerProps) => JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TagDetailsDto } from '@equinor/echo-search';
|
|
2
|
-
/**
|
|
3
|
-
* Wraps Search.Tags.getTagDetailsAsync(), and throws proper NotFoundError if search was unable to find the given tag.
|
|
4
|
-
* It also converts Search's result.error responses to proper errors and throws them.
|
|
5
|
-
*
|
|
6
|
-
* @param {Object} param
|
|
7
|
-
* @param {string} params.tagNo The tag number to query.
|
|
8
|
-
* @param {string} params.instCode Plant installation code for the given tag.
|
|
9
|
-
* @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.
|
|
10
|
-
* @throws {NotFoundError} NotFoundError when there are no matches for the tagNo instCode pair.
|
|
11
|
-
* @throws {BaseError} In any other failed API call.
|
|
12
|
-
* @returns {Promise<TagDetailsDto>} Promise resolving in tag details DTO.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getTagDetails({ tagNo, instCode, abortSignal }: {
|
|
15
|
-
tagNo: string;
|
|
16
|
-
instCode?: string;
|
|
17
|
-
abortSignal?: AbortSignal;
|
|
18
|
-
}): Promise<TagDetailsDto>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ProCoSysApiTag } from '../../types/api-proCoSysTagResponse';
|
|
2
|
-
/**
|
|
3
|
-
* Fetches tag information from ProCoSys.
|
|
4
|
-
*
|
|
5
|
-
* @param {Object} param
|
|
6
|
-
* @param {string} params.tagNo The tag number to query.
|
|
7
|
-
* @param {string} params.instCode Plant installation code for the given tag.
|
|
8
|
-
* @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.
|
|
9
|
-
* @throws {BaseError} If the response can't be parsed to JSON.
|
|
10
|
-
* @throws {Error} In any other API call issues.
|
|
11
|
-
* @returns {Promise<TProCoSysApiTag[]>} Promise resolving in array of tags.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getTagFromProCoSys({ instCode, tagNo, abortSignal }: {
|
|
14
|
-
instCode: string;
|
|
15
|
-
tagNo: string;
|
|
16
|
-
abortSignal?: AbortSignal;
|
|
17
|
-
}): Promise<ProCoSysApiTag[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const echopediaAnalyticsModule: import("@equinor/echo-core").AnalyticsModule;
|
package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
10
|
-
|
|
11
|
-
var EchoCore = require('@equinor/echo-core');
|
|
12
|
-
|
|
13
|
-
var apiTagDetails = require('../../../services/api/api-tag-details.js');
|
|
14
|
-
|
|
15
|
-
var apiTags = require('../../../services/api/api-tags.js');
|
|
16
|
-
|
|
17
|
-
var echopediaAnalyticsModule = require('../../../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
|
|
18
|
-
|
|
19
|
-
var toastActions = require('../../../services/eventHubActions/toastActions.js');
|
|
20
|
-
|
|
21
|
-
function _interopDefaultLegacy(e) {
|
|
22
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
23
|
-
'default': e
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var EchoCore__default = /*#__PURE__*/_interopDefaultLegacy(EchoCore);
|
|
28
|
-
/**
|
|
29
|
-
* Specific tool for external link buttons to help build URLS for deep linking into ProCoSys web app.
|
|
30
|
-
* Fetches both tag details and tag information from ProCoSys.
|
|
31
|
-
*
|
|
32
|
-
* @param {Object} params
|
|
33
|
-
* @param {string} params.tagNo The tag number to query.
|
|
34
|
-
* @param {string} params.instCode Plant installation code for the given tag.
|
|
35
|
-
* @returns {GetTagDetailsAndProCoSysDataResult} response - The returned promise will resolve once both API calls are resolved. (with Promise.all)
|
|
36
|
-
* @returns {TagDetailsDto} response.tagDetails - Result of tag details API call.
|
|
37
|
-
* @returns {ProCoSysApiTag} response.proCoSysTag - Tag related information from the ProCoSys system.
|
|
38
|
-
* @returns {hasError} response.hasError - indicates if there were any errors during the API calls. The exception is handled under the hood.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
function getTagDetailsAndProCoSysData(_ref) {
|
|
43
|
-
var tagNo = _ref.tagNo,
|
|
44
|
-
instCode = _ref.instCode;
|
|
45
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
46
|
-
var tagDetailsPromise, proCoSysTagPromise, response;
|
|
47
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
48
|
-
while (1) {
|
|
49
|
-
switch (_context.prev = _context.next) {
|
|
50
|
-
case 0:
|
|
51
|
-
tagDetailsPromise = apiTagDetails.getTagDetails({
|
|
52
|
-
tagNo: tagNo,
|
|
53
|
-
instCode: instCode
|
|
54
|
-
});
|
|
55
|
-
proCoSysTagPromise = apiTags.getTagFromProCoSys({
|
|
56
|
-
tagNo: tagNo,
|
|
57
|
-
instCode: instCode
|
|
58
|
-
});
|
|
59
|
-
response = {
|
|
60
|
-
tagDetails: undefined,
|
|
61
|
-
proCoSysTag: undefined,
|
|
62
|
-
hasError: false
|
|
63
|
-
};
|
|
64
|
-
_context.next = 5;
|
|
65
|
-
return Promise.all([tagDetailsPromise, proCoSysTagPromise].map(function (actualPromise, i) {
|
|
66
|
-
return actualPromise["catch"](function (error) {
|
|
67
|
-
error.index = i;
|
|
68
|
-
throw error;
|
|
69
|
-
});
|
|
70
|
-
})).then(function (responses) {
|
|
71
|
-
response.tagDetails = responses[0];
|
|
72
|
-
response.proCoSysTag = responses[1].find(function (item) {
|
|
73
|
-
return item.isMaster;
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
if (!response.proCoSysTag) {
|
|
77
|
-
toastActions.displayToast({
|
|
78
|
-
message: "Tag with number ".concat(response.tagDetails.tagNo, " does not exists in ProCoSys.")
|
|
79
|
-
});
|
|
80
|
-
response.hasError = true;
|
|
81
|
-
}
|
|
82
|
-
}, function (error) {
|
|
83
|
-
var errorSource = error.index === 0 ? 'tag details' : 'ProCoSys tag data';
|
|
84
|
-
var errorMessage = "Failed to fetch ".concat(errorSource, " for tagNo: ").concat(tagNo, " with instCode: ").concat(instCode, ". Please try again later.");
|
|
85
|
-
delete error.index;
|
|
86
|
-
EchoCore__default["default"].handleErrors && EchoCore__default["default"].handleErrors(error, echopediaAnalyticsModule.echopediaAnalyticsModule);
|
|
87
|
-
toastActions.displayToast({
|
|
88
|
-
message: errorMessage
|
|
89
|
-
});
|
|
90
|
-
response.hasError = true;
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
case 5:
|
|
94
|
-
return _context.abrupt("return", response);
|
|
95
|
-
|
|
96
|
-
case 6:
|
|
97
|
-
case "end":
|
|
98
|
-
return _context.stop();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}, _callee);
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Wraps the 'getTagDetails' function. Handles and logs any Error thrown by it whi;e displaying an error message toast.
|
|
106
|
-
* Use 'getTagDetails' if you want complete freedom on how you handle any exceptions.
|
|
107
|
-
*
|
|
108
|
-
* If there were any errors during the API call, the returned value will have a 'hasError' flag set to 'true'.
|
|
109
|
-
*
|
|
110
|
-
* @param {Object} params
|
|
111
|
-
* @param {string} params.tagNo The tag number to query.
|
|
112
|
-
* @param {string} params.instCode Plant installation code for the given tag.
|
|
113
|
-
* @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.
|
|
114
|
-
* @returns {getTagDetailsWithErrorHandlingResponse} response
|
|
115
|
-
* @returns {TagDetailsDto} response.tagDetails - Result of tag details API call.
|
|
116
|
-
* @returns {hasError} response.hasError - indicates if there were any errors during the API call.
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
function getTagDetailsWithErrorHandling(_ref2) {
|
|
121
|
-
var tagNo = _ref2.tagNo,
|
|
122
|
-
instCode = _ref2.instCode,
|
|
123
|
-
abortSignal = _ref2.abortSignal;
|
|
124
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
125
|
-
var result;
|
|
126
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
127
|
-
while (1) {
|
|
128
|
-
switch (_context2.prev = _context2.next) {
|
|
129
|
-
case 0:
|
|
130
|
-
result = {
|
|
131
|
-
tagDetails: undefined,
|
|
132
|
-
hasError: false
|
|
133
|
-
};
|
|
134
|
-
_context2.prev = 1;
|
|
135
|
-
_context2.next = 4;
|
|
136
|
-
return apiTagDetails.getTagDetails({
|
|
137
|
-
tagNo: tagNo,
|
|
138
|
-
instCode: instCode,
|
|
139
|
-
abortSignal: abortSignal
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
case 4:
|
|
143
|
-
result.tagDetails = _context2.sent;
|
|
144
|
-
_context2.next = 12;
|
|
145
|
-
break;
|
|
146
|
-
|
|
147
|
-
case 7:
|
|
148
|
-
_context2.prev = 7;
|
|
149
|
-
_context2.t0 = _context2["catch"](1);
|
|
150
|
-
EchoCore__default["default"].handleErrors && EchoCore__default["default"].handleErrors(_context2.t0, echopediaAnalyticsModule.echopediaAnalyticsModule);
|
|
151
|
-
toastActions.displayToast({
|
|
152
|
-
message: "Failed to fetch tag details for tagNo: ".concat(tagNo, " with instCode: ").concat(instCode, ". Please try again alter.")
|
|
153
|
-
});
|
|
154
|
-
result.hasError = true;
|
|
155
|
-
|
|
156
|
-
case 12:
|
|
157
|
-
return _context2.abrupt("return", result);
|
|
158
|
-
|
|
159
|
-
case 13:
|
|
160
|
-
case "end":
|
|
161
|
-
return _context2.stop();
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}, _callee2, null, [[1, 7]]);
|
|
165
|
-
}));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
exports.getTagDetailsAndProCoSysData = getTagDetailsAndProCoSysData;
|
|
169
|
-
exports.getTagDetailsWithErrorHandling = getTagDetailsWithErrorHandling;
|