@equinor/echo-framework 0.8.6 → 0.9.0
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/_virtual/_tslib.js +1 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts +46 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts +1 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.d.ts +14 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.d.ts +3 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.d.ts +1 -2
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.d.ts +3 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.d.ts +4 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.d.ts +2 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +18 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/index.d.ts +1 -0
- package/dist/components/externalLinkButton/externalLinkButton.d.ts +16 -7
- package/dist/components/panel/corePanelLeft.d.ts +1 -4
- package/dist/components/panel/corePanelRight.d.ts +1 -4
- package/dist/components/realTimeData/components/contextButton/RealTimeContextButton.d.ts +1 -0
- package/dist/components/realTimeData/components/contextPopover/Popover.d.ts +4 -1
- package/dist/components/realTimeData/hooks/useSignalR.d.ts +3 -2
- package/dist/coreApplication/EchoContent.d.ts +0 -1
- package/dist/coreApplication/index.d.ts +0 -1
- package/dist/hooks/hookLibrary.d.ts +3 -9
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useSemi.d.ts +11 -7
- package/dist/hooks/useTagDetails.d.ts +10 -3
- package/dist/index.d.ts +12 -7
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +2 -2
- package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +3 -3
- package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +6 -4
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +16 -14
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +14 -10
- package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +14 -10
- package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +8 -5
- package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +5 -3
- package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +6 -5
- package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +2 -2
- package/dist/services/api/api-manager.d.ts +1 -1
- package/dist/services/api/api-tag-details.d.ts +17 -0
- package/dist/services/api/api-tag-details.test.d.ts +1 -0
- package/dist/services/api/api-tags.d.ts +17 -0
- package/dist/services/api/api-tags.test.d.ts +1 -0
- package/dist/services/api/index.d.ts +1 -0
- package/dist/services/echopediaAnalyticsModule/echopediaAnalyticsModule.d.ts +1 -0
- package/dist/services/eventCallbacks/plantChanged.d.ts +1 -1
- package/dist/src/components/containers/layout.module.css.js +1 -4
- package/dist/src/components/containers/layouts.js +10 -122
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +4 -4
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +66 -11
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +169 -0
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +95 -0
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +62 -5
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +45 -11
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +60 -11
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +16 -5
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +67 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +44 -0
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +15 -0
- package/dist/src/components/errorBoundary/errorBoundary.js +2 -2
- package/dist/src/components/externalLinkButton/externalLinkButton.js +99 -36
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +5 -2
- package/dist/src/components/footer/footer.module.css.js +1 -1
- package/dist/src/components/pageMenu/version/version.js +4 -2
- package/dist/src/components/panel/corePanelLeft.js +2 -5
- package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
- package/dist/src/components/panel/corePanelRight.js +2 -5
- package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
- package/dist/src/components/plantSelector/plantSelector.js +4 -2
- package/dist/src/components/projectSelector/ProcosysProjectSelector.js +4 -2
- package/dist/src/components/realTimeData/RealTimePopoverButton.js +18 -2
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +3 -2
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +46 -7
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +4 -4
- package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +4 -2
- package/dist/src/components/realTimeData/hooks/useSignalR.js +24 -8
- package/dist/src/coreApplication/EchoContent.js +2 -11
- package/dist/src/globalStyles.css.js +1 -1
- package/dist/src/hooks/hookLibrary.js +0 -9
- package/dist/src/hooks/index.js +0 -3
- package/dist/src/hooks/useSemi.js +40 -14
- package/dist/src/hooks/useTagDetails.js +118 -45
- package/dist/src/icons/common/CommissionApp-icon.png.js +7 -0
- package/dist/src/icons/common/Evision.svg.js +4 -4
- package/dist/src/icons/common/Fusion.svg.js +31 -27
- package/dist/src/icons/common/McApp.svg.js +11 -8
- package/dist/src/icons/common/Notification.svg.js +81 -0
- package/dist/src/icons/common/ProCoSysIcon.svg.js +4 -4
- package/dist/src/icons/common/Robim.svg.js +66 -0
- package/dist/src/icons/common/SapLogo.svg.js +6 -6
- package/dist/src/icons/common/SemiIcon.svg.js +12 -13
- package/dist/src/icons/common/Stid.svg.js +4 -4
- package/dist/src/icons/common/TR2000.svg.js +9 -8
- package/dist/src/icons/common/WorkOrder.svg.js +71 -0
- package/dist/src/icons/common/Yammer.svg.js +3 -3
- package/dist/src/icons/common/satos-logo.png.js +7 -0
- package/dist/src/index.js +38 -73
- package/dist/src/index2.js +201 -0
- package/dist/src/services/api/api-manager.js +6 -4
- package/dist/src/services/api/api-plantinfo.js +10 -6
- package/dist/src/services/api/api-plants.js +6 -2
- package/dist/src/services/api/api-realtimedata.js +9 -3
- package/dist/src/services/api/api-tag-details.js +69 -0
- package/dist/src/services/api/api-tags.js +29 -0
- package/dist/src/services/api/api-version.js +8 -4
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +10 -0
- package/dist/src/services/eventCallbacks/plantChanged.js +6 -2
- package/dist/src/types/pingableSources.js +1 -0
- package/dist/src/utils/copyText.js +6 -2
- package/dist/src/utils/navigationUtils.js +28 -0
- package/dist/src/utils/plantInfo.js +25 -20
- package/dist/src/utils/startup.js +6 -4
- package/dist/types/api-proCoSysTagResponse.d.ts +8 -0
- package/dist/types/hookLibrary.d.ts +0 -4
- package/dist/types/pingableSources.d.ts +2 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/navigationUtils.d.ts +7 -0
- package/dist/utils/navigationUtils.test.d.ts +1 -0
- package/dist/utils/plantInfo.d.ts +6 -0
- package/dist/utils/plantInfo.test.d.ts +1 -0
- package/package.json +34 -33
- package/dist/coreApplication/EchoBarComponent.d.ts +0 -6
- package/dist/hooks/useScreenOrientation.d.ts +0 -1
- package/dist/src/coreApplication/EchoBarComponent.js +0 -190
- package/dist/src/coreApplication/EchoContent.module.css.js +0 -21
- package/dist/src/hooks/useScreenOrientation.js +0 -50
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
3
15
|
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
16
|
|
|
5
17
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -8,8 +20,12 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
8
20
|
|
|
9
21
|
var EchoCore = require('@equinor/echo-core');
|
|
10
22
|
|
|
23
|
+
var EchoUtils = require('@equinor/echo-utils');
|
|
24
|
+
|
|
11
25
|
var React = require('react');
|
|
12
26
|
|
|
27
|
+
require('react-router-dom');
|
|
28
|
+
|
|
13
29
|
var useTagDetails = require('../../../hooks/useTagDetails.js');
|
|
14
30
|
|
|
15
31
|
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
@@ -20,6 +36,8 @@ function _interopDefaultLegacy(e) {
|
|
|
20
36
|
};
|
|
21
37
|
}
|
|
22
38
|
|
|
39
|
+
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
40
|
+
|
|
23
41
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
42
|
/**
|
|
25
43
|
* External link button to TR2000.
|
|
@@ -27,35 +45,68 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
27
45
|
*
|
|
28
46
|
* @param {string} tagNo The tag's number to open in TR2000.
|
|
29
47
|
* @param {string} instCode Plant installation code.
|
|
48
|
+
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual API call state for checking TR2000 availability.
|
|
30
49
|
* @returns {React.FC<ExternalLinkToTr2000Props>} React component.
|
|
31
50
|
*/
|
|
32
51
|
|
|
33
52
|
|
|
34
53
|
var ExternalLinkToTr2000 = function ExternalLinkToTr2000(_ref) {
|
|
35
54
|
var tagNo = _ref.tagNo,
|
|
36
|
-
instCode = _ref.instCode
|
|
37
|
-
|
|
55
|
+
instCode = _ref.instCode,
|
|
56
|
+
loadingStatusCallback = _ref.loadingStatusCallback;
|
|
57
|
+
var useStateSafe = EchoUtils__default["default"].Hooks.useStateSafe;
|
|
58
|
+
var selectedPlant = EchoCore.EchoSettings.plant.getSelectedPlant();
|
|
59
|
+
|
|
60
|
+
var _useStateSafe = useStateSafe(''),
|
|
61
|
+
_useStateSafe2 = _slicedToArray(_useStateSafe, 2),
|
|
62
|
+
url = _useStateSafe2[0],
|
|
63
|
+
setUrl = _useStateSafe2[1];
|
|
64
|
+
|
|
65
|
+
var _useStateSafe3 = useStateSafe(false),
|
|
66
|
+
_useStateSafe4 = _slicedToArray(_useStateSafe3, 2),
|
|
67
|
+
hasTr2000 = _useStateSafe4[0],
|
|
68
|
+
setHasTr2000 = _useStateSafe4[1];
|
|
69
|
+
|
|
70
|
+
var _useTagDetails$useTag = useTagDetails.useTagDetails({
|
|
38
71
|
tagNo: tagNo,
|
|
39
72
|
instCode: instCode
|
|
40
|
-
})
|
|
41
|
-
|
|
73
|
+
}),
|
|
74
|
+
tagDetails = _useTagDetails$useTag.tagDetails,
|
|
75
|
+
hasError = _useTagDetails$useTag.hasError,
|
|
76
|
+
isTagDetailsLoading = _useTagDetails$useTag.isTagDetailsLoading;
|
|
42
77
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
78
|
+
React.useEffect(function () {
|
|
79
|
+
function evaluateTr2000Status(tagDetails) {
|
|
80
|
+
var valveOk = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 9 && !!tagDetails.valveDatash;
|
|
81
|
+
var pipeOk = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 6 && !!tagDetails.pipingClass && !!tagDetails.nomDiam;
|
|
82
|
+
return (valveOk || pipeOk) && !!(selectedPlant === null || selectedPlant === void 0 ? void 0 : selectedPlant.hasTr2000);
|
|
83
|
+
}
|
|
48
84
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
85
|
+
if (!!loadingStatusCallback) {
|
|
86
|
+
loadingStatusCallback(isTagDetailsLoading);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (hasError) {
|
|
90
|
+
setHasTr2000(false);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
setHasTr2000(evaluateTr2000Status(tagDetails));
|
|
95
|
+
|
|
96
|
+
if (hasTr2000) {
|
|
97
|
+
var ds = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 6 ? 'PCS' : 'VDS';
|
|
98
|
+
var id = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 6 ? tagDetails.pipingClass : tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.valveDatash;
|
|
99
|
+
setUrl("https://tr2000.equinor.com/TR2000/integration/get_datasheet.jsp?SYS=STID&DS=".concat(ds, "&ID=").concat(id, "&PLANT=").concat(instCode));
|
|
100
|
+
}
|
|
54
101
|
|
|
55
|
-
|
|
102
|
+
if (!!loadingStatusCallback) {
|
|
103
|
+
loadingStatusCallback(isTagDetailsLoading);
|
|
104
|
+
}
|
|
105
|
+
}, [tagNo, instCode, loadingStatusCallback, setUrl, setHasTr2000, isTagDetailsLoading, tagDetails, hasError, hasTr2000, selectedPlant]);
|
|
106
|
+
return hasTr2000 && !hasError ? /*#__PURE__*/React__default["default"].createElement(externalLinkButton.ExternalLinkButton, {
|
|
56
107
|
buttonName: "TR2000",
|
|
57
108
|
buttonIcon: "TR2000",
|
|
58
|
-
linkTo:
|
|
109
|
+
linkTo: url,
|
|
59
110
|
buttonStyle: externalLinkButton.ExternalLinkButtonStyle.Rounded
|
|
60
111
|
}) : null;
|
|
61
112
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
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 edsCoreReact = require('@equinor/eds-core-react');
|
|
10
|
+
|
|
11
|
+
var React = require('react');
|
|
12
|
+
|
|
13
|
+
var iconButtonSpinner_module = require('./iconButtonSpinner.module.css.js');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultLegacy(e) {
|
|
16
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
|
+
'default': e
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
+
/**
|
|
23
|
+
* Local component for external link buttons. Provides a spinner overlay for any icon buttons, which might have any async calls.
|
|
24
|
+
* @param {Object} param
|
|
25
|
+
* @param {number} param.size The size of the spinner. Default value is 24.
|
|
26
|
+
* @param {Object} param.customClassNames Optional custom class names to customize the component's parts.
|
|
27
|
+
* @param {string} param.customClassNames.spinner Class name applied on the spinner.
|
|
28
|
+
* @param {string} param.customClassNames.container Class name applied on the container element.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var IconButtonSpinner = function IconButtonSpinner(_ref) {
|
|
33
|
+
var customClassNames = _ref.customClassNames,
|
|
34
|
+
size = _ref.size;
|
|
35
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
36
|
+
className: "".concat((customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.container) || '', " ").concat(iconButtonSpinner_module["default"].container)
|
|
37
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
38
|
+
className: "".concat((customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.spinner) || '', " ").concat(iconButtonSpinner_module["default"].spinner)
|
|
39
|
+
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Progress.Circular, {
|
|
40
|
+
size: size || 24
|
|
41
|
+
})));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.IconButtonSpinner = IconButtonSpinner;
|
package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var styleInject_es = require('../../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
|
+
|
|
9
|
+
var css_248z = ".iconButtonSpinner-module_container__56QXT{height:48px;position:relative;width:48px}.iconButtonSpinner-module_spinner__Rym9p{position:relative;text-align:center;top:50%;transform:translateY(-50%)}";
|
|
10
|
+
var styles = {
|
|
11
|
+
"container": "iconButtonSpinner-module_container__56QXT",
|
|
12
|
+
"spinner": "iconButtonSpinner-module_spinner__Rym9p"
|
|
13
|
+
};
|
|
14
|
+
styleInject_es["default"](css_248z);
|
|
15
|
+
exports["default"] = styles;
|
|
@@ -8,7 +8,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
8
8
|
|
|
9
9
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
10
|
|
|
11
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
12
|
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
18
18
|
|
|
19
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
20
|
|
|
21
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
22
|
|
|
23
23
|
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); }
|
|
24
24
|
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
+
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
+
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
+
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
|
|
3
17
|
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
18
|
|
|
5
19
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -10,22 +24,30 @@ var _tslib = require('../../../_virtual/_tslib.js');
|
|
|
10
24
|
|
|
11
25
|
var echoComponents = require('@equinor/echo-components');
|
|
12
26
|
|
|
13
|
-
var
|
|
27
|
+
var EchoUtils = require('@equinor/echo-utils');
|
|
14
28
|
|
|
15
29
|
var edsCoreReact = require('@equinor/eds-core-react');
|
|
16
30
|
|
|
17
31
|
var React = require('react');
|
|
18
32
|
|
|
33
|
+
var CommissionAppIcon = require('../../icons/common/CommissionApp-icon.png.js');
|
|
34
|
+
|
|
19
35
|
var Evision = require('../../icons/common/Evision.svg.js');
|
|
20
36
|
|
|
21
37
|
var Fusion = require('../../icons/common/Fusion.svg.js');
|
|
22
38
|
|
|
23
39
|
var McApp = require('../../icons/common/McApp.svg.js');
|
|
24
40
|
|
|
41
|
+
var Notification = require('../../icons/common/Notification.svg.js');
|
|
42
|
+
|
|
25
43
|
var ProCoSysIcon = require('../../icons/common/ProCoSysIcon.svg.js');
|
|
26
44
|
|
|
45
|
+
var Robim = require('../../icons/common/Robim.svg.js');
|
|
46
|
+
|
|
27
47
|
var SapLogo = require('../../icons/common/SapLogo.svg.js');
|
|
28
48
|
|
|
49
|
+
var satosLogo = require('../../icons/common/satos-logo.png.js');
|
|
50
|
+
|
|
29
51
|
var SemiIcon = require('../../icons/common/SemiIcon.svg.js');
|
|
30
52
|
|
|
31
53
|
var Stid = require('../../icons/common/Stid.svg.js');
|
|
@@ -34,8 +56,14 @@ var SXLogo = require('../../icons/common/SX-logo.png.js');
|
|
|
34
56
|
|
|
35
57
|
var TR2000 = require('../../icons/common/TR2000.svg.js');
|
|
36
58
|
|
|
59
|
+
var WorkOrder = require('../../icons/common/WorkOrder.svg.js');
|
|
60
|
+
|
|
37
61
|
var Yammer = require('../../icons/common/Yammer.svg.js');
|
|
38
62
|
|
|
63
|
+
var navigationUtils = require('../../utils/navigationUtils.js');
|
|
64
|
+
|
|
65
|
+
var iconButtonSpinner = require('../contextualAppLinks/externalLinkButtons/iconButtonSpinner.js');
|
|
66
|
+
|
|
39
67
|
var externalLinkButton_module = require('./externalLinkButton.module.css.js');
|
|
40
68
|
|
|
41
69
|
function _interopDefaultLegacy(e) {
|
|
@@ -44,13 +72,15 @@ function _interopDefaultLegacy(e) {
|
|
|
44
72
|
};
|
|
45
73
|
}
|
|
46
74
|
|
|
75
|
+
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
76
|
+
|
|
47
77
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
48
78
|
|
|
49
|
-
var echopediaAnalyticsModule = EchoCore.analytics.createAnalyticsModule('ep');
|
|
50
79
|
exports.ExternalLinkButtonStyle = void 0;
|
|
51
80
|
|
|
52
81
|
(function (ExternalLinkButtonStyle) {
|
|
53
82
|
ExternalLinkButtonStyle["Rounded"] = "Rounded";
|
|
83
|
+
ExternalLinkButtonStyle["Large"] = "Large";
|
|
54
84
|
})(exports.ExternalLinkButtonStyle || (exports.ExternalLinkButtonStyle = {}));
|
|
55
85
|
/**
|
|
56
86
|
*
|
|
@@ -61,7 +91,8 @@ exports.ExternalLinkButtonStyle = void 0;
|
|
|
61
91
|
* @param {boolean} props.hideText Optional. If set to `true`, will hide `buttonName`.
|
|
62
92
|
* @param {boolean} props.redirect Optional. If set to `true`, the app will not open in a new tab / window, but in the current one.
|
|
63
93
|
* @param {ExternalLinkButtonStyle} props.buttonStyle Optional.
|
|
64
|
-
* @param {() => Promise<string>} props.getUrlToOpen Optional.
|
|
94
|
+
* @param {(...args) => Promise<string | undefined>} props.getUrlToOpen Optional. Pass this custom async function to create a URL based on async data.
|
|
95
|
+
* Return with 'undefined' to prevent any navigation. (Useful when the API call fails)
|
|
65
96
|
* @param {boolean} props.disabledColor Optional. If set to `true`, the button will show disabled color. (If not Rounded button style is used)
|
|
66
97
|
* @param {boolean} props.disabledButton Optional.
|
|
67
98
|
* @param {string} props.hoverText Optional. Applies only if Rounded button style is applied.
|
|
@@ -80,40 +111,50 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
80
111
|
disabledColor = _ref.disabledColor,
|
|
81
112
|
disabledButton = _ref.disabledButton,
|
|
82
113
|
hoverText = _ref.hoverText;
|
|
114
|
+
|
|
115
|
+
var _EchoUtils__default$d = EchoUtils__default["default"].Hooks.useStateSafe(false),
|
|
116
|
+
_EchoUtils__default$d2 = _slicedToArray(_EchoUtils__default$d, 2),
|
|
117
|
+
isLoading = _EchoUtils__default$d2[0],
|
|
118
|
+
setIsLoading = _EchoUtils__default$d2[1];
|
|
119
|
+
|
|
83
120
|
var icon = null;
|
|
121
|
+
var isAsyncButton = !!getUrlToOpen;
|
|
122
|
+
var isRoundedButtonStyle = buttonStyle === exports.ExternalLinkButtonStyle.Rounded;
|
|
123
|
+
var imageBasedIconStyle = isRoundedButtonStyle ? externalLinkButton_module["default"].roundedButtonIconAsImage : externalLinkButton_module["default"].largeButtonIconAsImage;
|
|
84
124
|
|
|
85
125
|
function goToLink(event) {
|
|
86
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/
|
|
126
|
+
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
87
127
|
var link;
|
|
88
|
-
return
|
|
128
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
89
129
|
while (1) {
|
|
90
130
|
switch (_context.prev = _context.next) {
|
|
91
131
|
case 0:
|
|
92
132
|
event.persist();
|
|
93
133
|
event.preventDefault();
|
|
94
134
|
|
|
95
|
-
if (!
|
|
96
|
-
_context.next =
|
|
135
|
+
if (!isAsyncButton) {
|
|
136
|
+
_context.next = 10;
|
|
97
137
|
break;
|
|
98
138
|
}
|
|
99
139
|
|
|
100
|
-
|
|
140
|
+
setIsLoading(true);
|
|
141
|
+
_context.next = 6;
|
|
101
142
|
return getUrlToOpen();
|
|
102
143
|
|
|
103
|
-
case
|
|
104
|
-
|
|
105
|
-
|
|
144
|
+
case 6:
|
|
145
|
+
link = _context.sent;
|
|
146
|
+
setIsLoading(false);
|
|
147
|
+
_context.next = 11;
|
|
106
148
|
break;
|
|
107
149
|
|
|
108
|
-
case
|
|
109
|
-
|
|
150
|
+
case 10:
|
|
151
|
+
link = linkTo;
|
|
110
152
|
|
|
111
|
-
case
|
|
112
|
-
link
|
|
113
|
-
goToExternalLink(link, redirect);
|
|
153
|
+
case 11:
|
|
154
|
+
link && navigationUtils.goToExternalLink(link, redirect);
|
|
114
155
|
event.stopPropagation();
|
|
115
156
|
|
|
116
|
-
case
|
|
157
|
+
case 13:
|
|
117
158
|
case "end":
|
|
118
159
|
return _context.stop();
|
|
119
160
|
}
|
|
@@ -122,18 +163,6 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
122
163
|
}));
|
|
123
164
|
}
|
|
124
165
|
|
|
125
|
-
function goToExternalLink(link, redirect) {
|
|
126
|
-
echopediaAnalyticsModule.trackEventBy('ExternalLink', 'Opened', {
|
|
127
|
-
linkTo: link
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
if (redirect) {
|
|
131
|
-
window.location.href = link;
|
|
132
|
-
} else {
|
|
133
|
-
window.open(link, '_blank');
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
166
|
switch (buttonIcon) {
|
|
138
167
|
case 'Fusion':
|
|
139
168
|
icon = /*#__PURE__*/React__default["default"].createElement(Fusion.ReactComponent, null);
|
|
@@ -194,12 +223,18 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
194
223
|
icon = /*#__PURE__*/React__default["default"].createElement(McApp.ReactComponent, null);
|
|
195
224
|
break;
|
|
196
225
|
|
|
197
|
-
case '
|
|
198
|
-
icon = /*#__PURE__*/React__default["default"].createElement(
|
|
199
|
-
|
|
226
|
+
case 'CommApp':
|
|
227
|
+
icon = /*#__PURE__*/React__default["default"].createElement("img", {
|
|
228
|
+
src: CommissionAppIcon["default"],
|
|
229
|
+
className: imageBasedIconStyle,
|
|
230
|
+
alt: "CommissionAppIcon"
|
|
200
231
|
});
|
|
201
232
|
break;
|
|
202
233
|
|
|
234
|
+
case 'Sap':
|
|
235
|
+
icon = /*#__PURE__*/React__default["default"].createElement(SapLogo.ReactComponent, null);
|
|
236
|
+
break;
|
|
237
|
+
|
|
203
238
|
case 'Semi':
|
|
204
239
|
icon = /*#__PURE__*/React__default["default"].createElement(SemiIcon.ReactComponent, null);
|
|
205
240
|
break;
|
|
@@ -207,8 +242,16 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
207
242
|
case 'SafeX':
|
|
208
243
|
icon = /*#__PURE__*/React__default["default"].createElement("img", {
|
|
209
244
|
src: SXLogo["default"],
|
|
210
|
-
className:
|
|
211
|
-
alt: "
|
|
245
|
+
className: imageBasedIconStyle,
|
|
246
|
+
alt: "SafeXIcon"
|
|
247
|
+
});
|
|
248
|
+
break;
|
|
249
|
+
|
|
250
|
+
case 'Satos':
|
|
251
|
+
icon = /*#__PURE__*/React__default["default"].createElement("img", {
|
|
252
|
+
src: satosLogo["default"],
|
|
253
|
+
className: imageBasedIconStyle,
|
|
254
|
+
alt: "SatosIcon"
|
|
212
255
|
});
|
|
213
256
|
break;
|
|
214
257
|
|
|
@@ -222,9 +265,28 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
222
265
|
case 'Tr2000':
|
|
223
266
|
icon = /*#__PURE__*/React__default["default"].createElement(TR2000.ReactComponent, null);
|
|
224
267
|
break;
|
|
268
|
+
|
|
269
|
+
case 'Notification':
|
|
270
|
+
icon = /*#__PURE__*/React__default["default"].createElement(Notification.ReactComponent, null);
|
|
271
|
+
break;
|
|
272
|
+
|
|
273
|
+
case 'WorkOrder':
|
|
274
|
+
icon = /*#__PURE__*/React__default["default"].createElement(WorkOrder.ReactComponent, null);
|
|
275
|
+
break;
|
|
276
|
+
|
|
277
|
+
case 'Robim':
|
|
278
|
+
icon = /*#__PURE__*/React__default["default"].createElement(Robim.ReactComponent, null);
|
|
279
|
+
break;
|
|
225
280
|
}
|
|
226
281
|
|
|
227
|
-
return
|
|
282
|
+
return isRoundedButtonStyle ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
283
|
+
className: externalLinkButton_module["default"].roundedButtonWrapper
|
|
284
|
+
}, isAsyncButton && isLoading && /*#__PURE__*/React__default["default"].createElement(iconButtonSpinner.IconButtonSpinner, {
|
|
285
|
+
size: 24,
|
|
286
|
+
customClassNames: {
|
|
287
|
+
container: externalLinkButton_module["default"].asyncButtonSpinner
|
|
288
|
+
}
|
|
289
|
+
}), /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Tooltip, {
|
|
228
290
|
placement: "bottom",
|
|
229
291
|
title: hoverText !== null && hoverText !== void 0 ? hoverText : buttonName
|
|
230
292
|
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Button, {
|
|
@@ -234,7 +296,7 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
234
296
|
goToLink(event);
|
|
235
297
|
},
|
|
236
298
|
disabled: disabledButton
|
|
237
|
-
}, icon)) : /*#__PURE__*/React__default["default"].createElement("button", {
|
|
299
|
+
}, icon))) : /*#__PURE__*/React__default["default"].createElement("button", {
|
|
238
300
|
className: "".concat(externalLinkButton_module["default"].echoButton, " ").concat(disabledColor ? externalLinkButton_module["default"].echoButtonDisabled : ''),
|
|
239
301
|
onClick: function onClick(event) {
|
|
240
302
|
goToLink(event);
|
|
@@ -244,4 +306,5 @@ var ExternalLinkButton = function ExternalLinkButton(_ref) {
|
|
|
244
306
|
}, icon, !hideText && /*#__PURE__*/React__default["default"].createElement("span", null, buttonName));
|
|
245
307
|
};
|
|
246
308
|
|
|
309
|
+
exports.ExternalLinkButton = ExternalLinkButton;
|
|
247
310
|
exports["default"] = ExternalLinkButton;
|
|
@@ -6,12 +6,15 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
|
|
7
7
|
var styleInject_es = require('../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
8
|
|
|
9
|
-
var css_248z = ".externalLinkButton-module_echoButton__J9As0{display:inline-block;padding:16px;position:relative;width:90px}.externalLinkButton-module_echoButtonDisabled__6kYFw{padding-bottom:0}.externalLinkButton-module_echoButtonRounded__moamZ{display:inline-block;position:relative}@media screen and (min-width:420px){.externalLinkButton-module_echoButtonDisabled__6kYFw,.externalLinkButton-module_echoButton__J9As0{width:96px}}.externalLinkButton-module_echoButton__J9As0 svg{display:inline-block;height:48px;margin:0 8px 8px;width:48px}.externalLinkButton-module_echoButtonRounded__moamZ svg{display:inline-block;height:24px;margin:0 8px;width:24px}.externalLinkButton-module_echoButton__J9As0 span{color:#007079;display:inline-block;font-size:14px;font-weight:500;line-height:16px;width:64px}.externalLinkButton-module_echoButton__J9As0:hover svg{fill:#004f55}.externalLinkButton-module_echoButton__J9As0:hover span{color:#004f55}.externalLinkButton-module_echoButtonDisabled__6kYFw span{color:var(--disabledColor)}.externalLinkButton-module_echoButtonDisabled__6kYFw:hover svg{fill:var(--disabledColor)}.externalLinkButton-module_echoButtonDisabled__6kYFw:hover span{color:var(--disabledColor)}.externalLinkButton-
|
|
9
|
+
var css_248z = ".externalLinkButton-module_echoButton__J9As0{display:inline-block;padding:16px;position:relative;width:90px}.externalLinkButton-module_echoButtonDisabled__6kYFw{padding-bottom:0}.externalLinkButton-module_echoButtonRounded__moamZ,.externalLinkButton-module_roundedButtonWrapper__x5h3U{display:inline-block;position:relative}.externalLinkButton-module_asyncButtonSpinner__-oNeC{opacity:.75;position:absolute;z-index:10}@media screen and (min-width:420px){.externalLinkButton-module_echoButtonDisabled__6kYFw,.externalLinkButton-module_echoButton__J9As0{width:96px}}.externalLinkButton-module_echoButton__J9As0 svg{display:inline-block;height:48px;margin:0 8px 8px;width:48px}.externalLinkButton-module_echoButtonRounded__moamZ svg{display:inline-block;height:24px;margin:0 8px;width:24px}.externalLinkButton-module_echoButton__J9As0 span{color:#007079;display:inline-block;font-size:14px;font-weight:500;line-height:16px;width:64px}.externalLinkButton-module_echoButton__J9As0:hover svg{fill:#004f55}.externalLinkButton-module_echoButton__J9As0:hover span{color:#004f55}.externalLinkButton-module_echoButtonDisabled__6kYFw span{color:var(--disabledColor)}.externalLinkButton-module_echoButtonDisabled__6kYFw:hover svg{fill:var(--disabledColor)}.externalLinkButton-module_echoButtonDisabled__6kYFw:hover span{color:var(--disabledColor)}.externalLinkButton-module_roundedButtonIconAsImage__ZBmFg{height:30px;justify-self:center;width:30px}.externalLinkButton-module_largeButtonIconAsImage__PF38e{height:auto;justify-self:center;width:100%}.externalLinkButton-module_toolTip__ywPoc{background-color:#233746;border-radius:8px;box-shadow:0 0 4px rgba(0,0,0,.05),0 4px 4px rgba(0,0,0,.05);color:#fff;display:block;padding:8px 16px;position:absolute;z-index:1}.externalLinkButton-module_toolTipContainer__n1YIl{display:inline-flex;justify-content:center}.externalLinkButton-module_stidIcon__XoFaL{height:auto!important}";
|
|
10
10
|
var style = {
|
|
11
11
|
"echoButton": "externalLinkButton-module_echoButton__J9As0",
|
|
12
12
|
"echoButtonDisabled": "externalLinkButton-module_echoButtonDisabled__6kYFw",
|
|
13
13
|
"echoButtonRounded": "externalLinkButton-module_echoButtonRounded__moamZ",
|
|
14
|
-
"
|
|
14
|
+
"roundedButtonWrapper": "externalLinkButton-module_roundedButtonWrapper__x5h3U",
|
|
15
|
+
"asyncButtonSpinner": "externalLinkButton-module_asyncButtonSpinner__-oNeC",
|
|
16
|
+
"roundedButtonIconAsImage": "externalLinkButton-module_roundedButtonIconAsImage__ZBmFg",
|
|
17
|
+
"largeButtonIconAsImage": "externalLinkButton-module_largeButtonIconAsImage__PF38e",
|
|
15
18
|
"toolTip": "externalLinkButton-module_toolTip__ywPoc",
|
|
16
19
|
"toolTipContainer": "externalLinkButton-module_toolTipContainer__n1YIl",
|
|
17
20
|
"stidIcon": "externalLinkButton-module_stidIcon__XoFaL"
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
|
|
7
7
|
var styleInject_es = require('../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
8
|
|
|
9
|
-
var css_248z = ".footer-module_echoFooter__6xy2c{background:#fff;bottom:0;display:flex;left:0;position:fixed}@media screen and (
|
|
9
|
+
var css_248z = ".footer-module_echoFooter__6xy2c{background:#fff;bottom:0;display:flex;left:0;position:fixed}@media screen and (min-width:360px){.footer-module_echoFooter__6xy2c{height:33px}}@media screen and (min-width:640px){.footer-module_echoFooter__6xy2c{height:56px;width:100%}}p.footer-module_footerDisclaimer__sJJ5f{font-size:10px;width:100%}.footer-module_footerLogo__ttZmv{display:none;float:right;margin:0 0 12px;max-height:2.5rem;padding:12px 16px;width:74px}.footer-module_tosFooter__9mGDz{background:#fff;bottom:0;height:33px;left:0;position:fixed;width:100%}@media screen and (min-width:640px){p.footer-module_footerDisclaimer__sJJ5f{line-height:32px;margin:0;padding:12px 16px}.footer-module_footerLogo__ttZmv{display:block}.footer-module_tosFooter__9mGDz{height:56px}}";
|
|
10
10
|
var style = {
|
|
11
11
|
"echoFooter": "footer-module_echoFooter__6xy2c",
|
|
12
12
|
"footerDisclaimer": "footer-module_footerDisclaimer__sJJ5f",
|
|
@@ -12,6 +12,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
12
12
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
|
|
15
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
16
|
+
|
|
15
17
|
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); }
|
|
16
18
|
|
|
17
19
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -37,9 +39,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
37
39
|
var Version = function Version() {
|
|
38
40
|
React.useEffect(function () {
|
|
39
41
|
function getVersions() {
|
|
40
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/
|
|
42
|
+
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
41
43
|
var apiVersionResult, appVersionResult;
|
|
42
|
-
return
|
|
44
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43
45
|
while (1) {
|
|
44
46
|
switch (_context.prev = _context.next) {
|
|
45
47
|
case 0:
|
|
@@ -40,9 +40,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
40
40
|
|
|
41
41
|
edsIons.edsIcons();
|
|
42
42
|
|
|
43
|
-
var CorePanelLeft = function CorePanelLeft(
|
|
44
|
-
var isToggleButtonVisible = _ref.isToggleButtonVisible;
|
|
45
|
-
|
|
43
|
+
var CorePanelLeft = function CorePanelLeft() {
|
|
46
44
|
var _a;
|
|
47
45
|
|
|
48
46
|
var _EchoCore$usePanels = EchoCore.usePanels(),
|
|
@@ -74,8 +72,7 @@ var CorePanelLeft = function CorePanelLeft(_ref) {
|
|
|
74
72
|
style: panelUI.panelButton
|
|
75
73
|
}, panels.map(function (panel, i) {
|
|
76
74
|
var Icon = panel.icon;
|
|
77
|
-
|
|
78
|
-
return showPanel && /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
|
|
75
|
+
return /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
|
|
79
76
|
key: i,
|
|
80
77
|
onClick: function onClick(e) {
|
|
81
78
|
e.stopPropagation();
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
|
|
7
7
|
var styleInject_es = require('../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
8
|
|
|
9
|
-
var css_248z = ".corePanelLeft-module_wrapper__d2Omx{height:100%;left:-550px;max-width:550px;position:fixed;top:0;transition:
|
|
9
|
+
var css_248z = ".corePanelLeft-module_wrapper__d2Omx{height:100%;left:-550px;max-width:550px;position:fixed;top:0;transition:left .4s ease-in-out,width .4s ease-in-out;width:550px;z-index:2}@media screen and (max-width:550px){.corePanelLeft-module_wrapperClosed__Zd1CL{left:-75vw;max-width:75vw;width:75vw}.corePanelLeft-module_active__-A3TW{width:100%}}.corePanelLeft-module_active__-A3TW{left:0;z-index:var(--echo-framework-z-level-panel)}.corePanelLeft-module_drawer__Wdb3G{background-color:#fff;border-left:2px solid #f7f7f7;box-shadow:0 6px 4px #00000040;display:flex;flex-direction:column;height:100%;opacity:0;overflow-y:hidden;position:relative;transition:opacity .4s ease-in-out;width:auto}.corePanelLeft-module_active__-A3TW .corePanelLeft-module_drawer__Wdb3G{opacity:1}.corePanelLeft-module_buttonContainer__bs-Uu{display:flex;flex-direction:column;position:absolute;right:-70px;top:0}.corePanelLeft-module_button__SqyKk{margin-left:var(--medium);margin-top:var(--small)}";
|
|
10
10
|
var style = {
|
|
11
11
|
"wrapper": "corePanelLeft-module_wrapper__d2Omx",
|
|
12
12
|
"wrapperClosed": "corePanelLeft-module_wrapperClosed__Zd1CL",
|