@equinor/echo-framework 0.9.5 → 0.9.8
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/containers/layouts.d.ts +5 -3
- package/dist/components/panel/corePanelLeft.d.ts +1 -4
- package/dist/components/panel/corePanelRight.d.ts +1 -4
- package/dist/components/router/echoRoute.d.ts +2 -2
- package/dist/components/router/index.d.ts +1 -0
- package/dist/components/router/useLayout.d.ts +3 -0
- package/dist/coreApplication/index.d.ts +0 -1
- package/dist/hooks/hookLibrary.d.ts +2 -13
- package/dist/hooks/index.d.ts +0 -2
- package/dist/index.d.ts +1 -14
- package/dist/src/components/containers/layout.module.css.js +2 -6
- package/dist/src/components/containers/layouts.js +36 -67
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -2
- package/dist/src/components/footer/footer.module.css.js +1 -1
- 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/router/echoRoute.js +3 -9
- package/dist/src/components/router/routes.js +4 -1
- package/dist/src/components/router/useLayout.js +32 -0
- package/dist/src/coreApplication/EchoContent.js +1 -21
- package/dist/src/globalStyles.css.js +1 -1
- package/dist/src/hooks/hookLibrary.js +0 -17
- package/dist/src/hooks/index.js +0 -6
- package/dist/src/index.js +8 -19
- package/dist/src/index2.js +26 -37
- package/dist/src/types/legend.js +1 -0
- package/dist/src/utils/legendUtils.js +1 -1
- package/dist/types/hookLibrary.d.ts +0 -5
- package/dist/types/legend.d.ts +2 -1
- package/package.json +3 -3
- package/dist/_virtual/index.js +0 -9
- package/dist/coreApplication/EchoBarComponent.d.ts +0 -12
- package/dist/hooks/useIsCompactLayout.d.ts +0 -5
- package/dist/hooks/useScreenOrientation.d.ts +0 -5
- package/dist/hooks/useScreenValues.d.ts +0 -17
- package/dist/hooks/useWindowSize.d.ts +0 -9
- package/dist/node_modules/classnames/index.js +0 -67
- package/dist/src/coreApplication/EchoBarComponent.js +0 -182
- package/dist/src/coreApplication/EchoContent.module.css.js +0 -17
- package/dist/src/hooks/useIsCompactLayout.js +0 -47
- package/dist/src/hooks/useScreenOrientation.js +0 -62
- package/dist/src/hooks/useScreenValues.js +0 -48
- package/dist/src/hooks/useWindowSize.js +0 -62
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare type LayoutKey = 'main' | 'camera' | 'nativePdf' | 'colorLayout' | undefined;
|
|
3
2
|
export interface LayoutProps {
|
|
4
|
-
layoutKey?: string;
|
|
5
3
|
children: React.ReactNode;
|
|
6
4
|
}
|
|
7
|
-
export declare const
|
|
5
|
+
export declare const MainLayout: React.FC<LayoutProps>;
|
|
6
|
+
export declare const ColorLayout: React.FC<LayoutProps>;
|
|
7
|
+
export declare const PdfViewerNative: React.FC<LayoutProps>;
|
|
8
|
+
export declare const CameraLayout: React.FC<LayoutProps>;
|
|
9
|
+
export declare const DefaultLayout: React.FC<LayoutProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AppComponentProps, WrappedComponent } from '@equinor/echo-core';
|
|
2
2
|
import React, { ErrorInfo } from 'react';
|
|
3
|
+
import { LayoutProps } from '../containers/layouts';
|
|
3
4
|
interface EchoRouteProps {
|
|
4
|
-
key: string;
|
|
5
5
|
component: WrappedComponent<AppComponentProps>;
|
|
6
|
-
|
|
6
|
+
layout: React.FC<LayoutProps>;
|
|
7
7
|
path: string;
|
|
8
8
|
errorHandler?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
9
9
|
exactPath?: boolean;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { DataInformation } from '@equinor/echo-components';
|
|
2
|
-
import {
|
|
2
|
+
import { SetActiveCommPackNo, SetActiveMcPackNo, SetActiveTagNo, TagData } from './../types/hookLibrary';
|
|
3
3
|
export declare enum RegisteredHookName {
|
|
4
4
|
useSetActiveTagNo = "useSetActiveTagNo",
|
|
5
5
|
useContextMenuDataInfo = "useContextMenuDataInfo",
|
|
6
6
|
useTagData = "useTagData",
|
|
7
7
|
useIsContextMenuInfoLoading = "useIsContextMenuInfoLoading",
|
|
8
8
|
useSetActiveCommPackNo = "useSetActiveCommPackNo",
|
|
9
|
-
useSetActiveMcPackNo = "useSetActiveMcPackNo"
|
|
10
|
-
useDeviceOrientation = "useDeviceOrientation",
|
|
11
|
-
useInternalLinkToScan = "useInternalLinkToScan"
|
|
9
|
+
useSetActiveMcPackNo = "useSetActiveMcPackNo"
|
|
12
10
|
}
|
|
13
11
|
export declare const HookLibrary: Readonly<{
|
|
14
12
|
/**
|
|
@@ -48,13 +46,4 @@ export declare const HookLibrary: Readonly<{
|
|
|
48
46
|
* @returns {SetActiveMcPackNo}
|
|
49
47
|
*/
|
|
50
48
|
useSetActiveMcPackNo: () => SetActiveMcPackNo;
|
|
51
|
-
/**
|
|
52
|
-
* Hook for detecting device orientation from native devices.
|
|
53
|
-
* @returns {DeviceOrientation}
|
|
54
|
-
*/
|
|
55
|
-
useDeviceOrientation: () => DeviceOrientation;
|
|
56
|
-
/**
|
|
57
|
-
* Hook for opening camera.
|
|
58
|
-
*/
|
|
59
|
-
useInternalLinkToScan: () => (params?: string) => void;
|
|
60
49
|
}>;
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,13 @@ import { getLegendStatusColor } from './utils/legendUtils';
|
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './coreApplication';
|
|
8
8
|
export { RegisteredHookName } from './hooks/hookLibrary';
|
|
9
|
-
export { useIsCompactLayout } from './hooks/useIsCompactLayout';
|
|
10
|
-
export { useScreenOrientation } from './hooks/useScreenOrientation';
|
|
11
|
-
export { useScreenValues } from './hooks/useScreenValues';
|
|
12
9
|
export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
|
|
13
10
|
export * from './services/eventHubActions';
|
|
14
11
|
export * from './theme/themeConst';
|
|
15
12
|
export type { EchoHubPlant } from './types/echoHubPlant';
|
|
16
13
|
export * from './types/eventTypes';
|
|
17
14
|
export * from './types/extensions';
|
|
18
|
-
export type {
|
|
15
|
+
export type { SetActiveTagNo, TagData } from './types/hookLibrary';
|
|
19
16
|
export { LegendStatus, LegendType } from './types/legend';
|
|
20
17
|
export type { ModelPermissions } from './types/modelPermissions';
|
|
21
18
|
export { PingableSources } from './types/pingableSources';
|
|
@@ -39,14 +36,6 @@ declare const EchoFramework: Readonly<{
|
|
|
39
36
|
useEchoHistory(): (path: string, params?: {
|
|
40
37
|
[key: string]: string;
|
|
41
38
|
} | undefined, state?: any) => void;
|
|
42
|
-
useIsCompactLayout(isLandscape: boolean): boolean;
|
|
43
|
-
useScreenOrientation(): import("./types/hookLibrary").ScreenOrientation;
|
|
44
|
-
useScreenValues(): {
|
|
45
|
-
isWeb: boolean;
|
|
46
|
-
isMobileWidth: boolean;
|
|
47
|
-
screenOrientationDevice: import("./types/hookLibrary").DeviceOrientation;
|
|
48
|
-
screenOrientationWeb: import("./types/hookLibrary").ScreenOrientation;
|
|
49
|
-
};
|
|
50
39
|
useTagDetails({ instCode, tagNo }: {
|
|
51
40
|
tagNo: string;
|
|
52
41
|
instCode: string;
|
|
@@ -61,8 +50,6 @@ declare const EchoFramework: Readonly<{
|
|
|
61
50
|
useIsContextMenuInfoLoading: () => boolean;
|
|
62
51
|
useSetActiveCommPackNo: () => import("./types/hookLibrary").SetActiveCommPackNo;
|
|
63
52
|
useSetActiveMcPackNo: () => import("./types/hookLibrary").SetActiveMcPackNo;
|
|
64
|
-
useDeviceOrientation: () => import("./types/hookLibrary").DeviceOrientation;
|
|
65
|
-
useInternalLinkToScan: () => (params?: string | undefined) => void;
|
|
66
53
|
}>;
|
|
67
54
|
EchopediaComponentLibrary: Readonly<{
|
|
68
55
|
getTagItem: () => import("react").FunctionComponent<any>;
|
|
@@ -6,9 +6,8 @@ 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 = ".layout-
|
|
9
|
+
var css_248z = ".layout-module_applicationWrapper__adzds{animation:layout-module_fadeIn__-OF4H 2s;background-color:#fff;background-image:url(../../images/frontpage-brand-placeholder-vert.jpg);background-size:cover;height:100%;overflow:auto;width:100%}@keyframes layout-module_fadeIn__-OF4H{0%{opacity:0}to{opacity:1}}@media screen and (min-width:640px){.layout-module_applicationWrapper__adzds{background-image:none}}.layout-module_mainLayoutWrapper__4kuIT{height:100%;overflow:hidden;width:100%}.layout-module_bgTransparent__bBfb-{background-color:transparent}.layout-module_footerDisclaimer__-F6dv{font-size:.7rem}.layout-module_footerLogo__CBb-F{max-height:2.5rem}.layout-module_fullBodyHeight__hQfe5{min-height:calc(100vh - 75px)!important;padding-bottom:16px}.layout-module_navbarBrand__2IOPY{color:red}::selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}.layout-module_colorLayout__VHJcU{background-color:#eaf4f9;height:100%;overflow:hidden;position:relative;width:100%}.layout-module_pdfViewerNative__hnAgy{background-color:#323639;height:100%;overflow:hidden;padding-top:6.5rem;position:relative;width:100%}.layout-module_noPadding__7amV4{padding:0}.layout-module_noMargin__1eUBf{margin:0}";
|
|
10
10
|
var style = {
|
|
11
|
-
"echoContentContainer": "layout-module_echoContentContainer__0debO",
|
|
12
11
|
"applicationWrapper": "layout-module_applicationWrapper__adzds",
|
|
13
12
|
"fadeIn": "layout-module_fadeIn__-OF4H",
|
|
14
13
|
"mainLayoutWrapper": "layout-module_mainLayoutWrapper__4kuIT",
|
|
@@ -19,11 +18,8 @@ var style = {
|
|
|
19
18
|
"navbarBrand": "layout-module_navbarBrand__2IOPY",
|
|
20
19
|
"colorLayout": "layout-module_colorLayout__VHJcU",
|
|
21
20
|
"pdfViewerNative": "layout-module_pdfViewerNative__hnAgy",
|
|
22
|
-
"cameraLayout": "layout-module_cameraLayout__iVPug",
|
|
23
|
-
"defaultLayout": "layout-module_defaultLayout__3MIwa",
|
|
24
21
|
"noPadding": "layout-module_noPadding__7amV4",
|
|
25
|
-
"noMargin": "layout-module_noMargin__1eUBf"
|
|
26
|
-
"deviceOrientation": "layout-module_deviceOrientation__DY1-L"
|
|
22
|
+
"noMargin": "layout-module_noMargin__1eUBf"
|
|
27
23
|
};
|
|
28
24
|
styleInject_es["default"](css_248z);
|
|
29
25
|
exports["default"] = style;
|
|
@@ -1,61 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
|
|
5
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); }
|
|
6
4
|
|
|
7
5
|
Object.defineProperty(exports, '__esModule', {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
|
|
11
|
-
var index = require('../../../node_modules/classnames/index.js');
|
|
12
|
-
|
|
13
9
|
var React = require('react');
|
|
14
10
|
|
|
15
|
-
var EchoBarComponent = require('../../coreApplication/EchoBarComponent.js');
|
|
16
|
-
|
|
17
|
-
require('@equinor/echo-core');
|
|
18
|
-
|
|
19
|
-
require('../panel/corePanelLeft.js');
|
|
20
|
-
|
|
21
|
-
require('../panel/corePanelRight.js');
|
|
22
|
-
|
|
23
|
-
require('react-router-dom');
|
|
24
|
-
|
|
25
|
-
require('@equinor/echo-utils');
|
|
26
|
-
|
|
27
|
-
var useScreenValues = require('../../hooks/useScreenValues.js');
|
|
28
|
-
|
|
29
|
-
require('@equinor/echo-base');
|
|
30
|
-
|
|
31
|
-
require('@equinor/echo-search');
|
|
32
|
-
|
|
33
|
-
require('../../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
|
|
34
|
-
|
|
35
|
-
require('@equinor/echo-components');
|
|
36
|
-
|
|
37
|
-
require('@equinor/eds-core-react');
|
|
38
|
-
|
|
39
|
-
require('../pageMenu/accordionItem.module.css.js');
|
|
40
|
-
|
|
41
|
-
require('../appLinks/AppLinks.module.css.js');
|
|
42
|
-
|
|
43
|
-
require('../pageMenu/Navigation/applicationList.module.css.js');
|
|
44
|
-
|
|
45
|
-
require('../pageMenu/pageMenu.module.css.js');
|
|
46
|
-
|
|
47
|
-
require('../pageMenu/pageMenuDrawerItem.module.css.js');
|
|
48
|
-
|
|
49
|
-
require('../pageMenu/settings/settings.module.css.js');
|
|
50
|
-
|
|
51
|
-
require('../../services/api/api-manager.js');
|
|
52
|
-
|
|
53
|
-
require('../pageMenu/version/version.module.css.js');
|
|
54
|
-
|
|
55
|
-
require('../searchMenu/searchMenu.module.css.js');
|
|
56
|
-
|
|
57
|
-
require('../../coreApplication/EchoEventHandler.module.css.js');
|
|
58
|
-
|
|
59
11
|
var layout_module = require('./layout.module.css.js');
|
|
60
12
|
|
|
61
13
|
function _interopDefaultLegacy(e) {
|
|
@@ -66,28 +18,45 @@ function _interopDefaultLegacy(e) {
|
|
|
66
18
|
|
|
67
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
68
20
|
|
|
69
|
-
var
|
|
70
|
-
var
|
|
21
|
+
var MainLayout = function MainLayout(_ref) {
|
|
22
|
+
var children = _ref.children;
|
|
23
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24
|
+
className: layout_module["default"].applicationWrapper
|
|
25
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26
|
+
className: layout_module["default"].mainLayoutWrapper
|
|
27
|
+
}, children));
|
|
28
|
+
};
|
|
71
29
|
|
|
72
|
-
|
|
73
|
-
|
|
30
|
+
var ColorLayout = function ColorLayout(_ref2) {
|
|
31
|
+
var children = _ref2.children;
|
|
32
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
33
|
+
className: layout_module["default"].colorLayout
|
|
34
|
+
}, children);
|
|
35
|
+
};
|
|
74
36
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
37
|
+
var PdfViewerNative = function PdfViewerNative(_ref3) {
|
|
38
|
+
var children = _ref3.children;
|
|
39
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40
|
+
className: layout_module["default"].pdfViewerNative
|
|
41
|
+
}, children);
|
|
42
|
+
};
|
|
80
43
|
|
|
81
|
-
|
|
44
|
+
var CameraLayout = function CameraLayout(_ref4) {
|
|
45
|
+
var children = _ref4.children;
|
|
82
46
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
47
|
+
style: {
|
|
48
|
+
backgroundColor: 'transparent'
|
|
49
|
+
}
|
|
50
|
+
}, children);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var DefaultLayout = function DefaultLayout(_ref5) {
|
|
54
|
+
var children = _ref5.children;
|
|
55
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
91
56
|
};
|
|
92
57
|
|
|
93
|
-
exports.
|
|
58
|
+
exports.CameraLayout = CameraLayout;
|
|
59
|
+
exports.ColorLayout = ColorLayout;
|
|
60
|
+
exports.DefaultLayout = DefaultLayout;
|
|
61
|
+
exports.MainLayout = MainLayout;
|
|
62
|
+
exports.PdfViewerNative = PdfViewerNative;
|
|
@@ -26,8 +26,6 @@ var React = require('react');
|
|
|
26
26
|
|
|
27
27
|
require('react-router-dom');
|
|
28
28
|
|
|
29
|
-
require('../../../hooks/hookLibrary.js');
|
|
30
|
-
|
|
31
29
|
var useTagDetails = require('../../../hooks/useTagDetails.js');
|
|
32
30
|
|
|
33
31
|
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
@@ -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",
|
|
@@ -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",
|
|
@@ -42,9 +42,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
42
42
|
|
|
43
43
|
edsIons.edsIcons();
|
|
44
44
|
|
|
45
|
-
var CorePanelRight = function CorePanelRight(
|
|
46
|
-
var isToggleButtonVisible = _ref.isToggleButtonVisible;
|
|
47
|
-
|
|
45
|
+
var CorePanelRight = function CorePanelRight() {
|
|
48
46
|
var _a;
|
|
49
47
|
|
|
50
48
|
var _EchoCore$usePanels = EchoCore.usePanels('right'),
|
|
@@ -76,8 +74,7 @@ var CorePanelRight = function CorePanelRight(_ref) {
|
|
|
76
74
|
style: panelUI.panelButton
|
|
77
75
|
}, panels.map(function (panel, i) {
|
|
78
76
|
var PanelIcon = panel.icon;
|
|
79
|
-
|
|
80
|
-
return showPanel && /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
|
|
77
|
+
return /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
|
|
81
78
|
key: i,
|
|
82
79
|
label: panel.label,
|
|
83
80
|
variant: panel.key === EchoCore.ECHO_CORE_MAIN ? panelButton.Variants.NotificationButton : panelButton.Variants.OpenCloseButton,
|
|
@@ -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 = ".corePanelRight-module_wrapper__YN3Zr{height:100%;max-width:
|
|
9
|
+
var css_248z = ".corePanelRight-module_wrapper__YN3Zr{height:100%;max-width:352px;position:fixed;right:-352px;top:0;transition:right .4s ease-in-out,width .4s ease-in-out;width:352px;z-index:2}@media screen and (max-width:500px){.corePanelRight-module_wrapper__YN3Zr{max-width:75vw;right:-75vw;width:75vw}}.corePanelRight-module_active__RIMQt{right:0;z-index:var(--echo-framework-z-level-panel)}.corePanelRight-module_drawer__1-ucH{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:auto;position:relative;transition:opacity .4s ease-in-out;width:auto}.corePanelRight-module_active__RIMQt .corePanelRight-module_drawer__1-ucH{opacity:1}.corePanelRight-module_buttonContainer__62imJ{display:flex;flex-direction:column;left:-90px;position:absolute;top:0}.corePanelRight-module_button__WBdfZ{margin-left:var(--medium);margin-top:var(--small)}";
|
|
10
10
|
var style = {
|
|
11
11
|
"wrapper": "corePanelRight-module_wrapper__YN3Zr",
|
|
12
12
|
"active": "corePanelRight-module_active__RIMQt",
|
|
@@ -12,8 +12,6 @@ var reactRouterDom = require('react-router-dom');
|
|
|
12
12
|
|
|
13
13
|
var errorBoundary = require('../errorBoundary/errorBoundary.js');
|
|
14
14
|
|
|
15
|
-
var layouts = require('../containers/layouts.js');
|
|
16
|
-
|
|
17
15
|
var echoWrapper = require('./echoWrapper.js');
|
|
18
16
|
|
|
19
17
|
function _interopDefaultLegacy(e) {
|
|
@@ -25,21 +23,17 @@ function _interopDefaultLegacy(e) {
|
|
|
25
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
24
|
|
|
27
25
|
var EchoRoute = function EchoRoute(_ref) {
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
layoutKey = _ref.layoutKey,
|
|
26
|
+
var Component = _ref.component,
|
|
27
|
+
Layout = _ref.layout,
|
|
31
28
|
path = _ref.path,
|
|
32
29
|
errorHandler = _ref.errorHandler,
|
|
33
30
|
_ref$exactPath = _ref.exactPath,
|
|
34
31
|
exactPath = _ref$exactPath === void 0 ? true : _ref$exactPath;
|
|
35
32
|
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Route, {
|
|
36
|
-
key: key,
|
|
37
33
|
exact: exactPath,
|
|
38
34
|
path: path,
|
|
39
35
|
render: function render(props) {
|
|
40
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
41
|
-
layoutKey: layoutKey
|
|
42
|
-
}, /*#__PURE__*/React__default["default"].createElement(echoWrapper.EchoWrapper, {
|
|
36
|
+
return /*#__PURE__*/React__default["default"].createElement(Layout, null, /*#__PURE__*/React__default["default"].createElement(echoWrapper.EchoWrapper, {
|
|
43
37
|
path: path
|
|
44
38
|
}, /*#__PURE__*/React__default["default"].createElement(errorBoundary.ErrorBoundary, {
|
|
45
39
|
onComponentDidCatch: errorHandler
|
|
@@ -12,6 +12,8 @@ var React = require('react');
|
|
|
12
12
|
|
|
13
13
|
var echoRoute = require('./echoRoute.js');
|
|
14
14
|
|
|
15
|
+
var useLayout = require('./useLayout.js');
|
|
16
|
+
|
|
15
17
|
function _interopDefaultLegacy(e) {
|
|
16
18
|
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
19
|
'default': e
|
|
@@ -23,6 +25,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
23
25
|
var EchoRoutes = function EchoRoutes(_ref) {
|
|
24
26
|
var routeErrorHandler = _ref.routeErrorHandler;
|
|
25
27
|
var routes = EchoCore.useRoutes();
|
|
28
|
+
var getLayout = useLayout.useLayout();
|
|
26
29
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, routes.map(function (_ref2) {
|
|
27
30
|
var path = _ref2.path,
|
|
28
31
|
component = _ref2.component,
|
|
@@ -33,7 +36,7 @@ var EchoRoutes = function EchoRoutes(_ref) {
|
|
|
33
36
|
key: key,
|
|
34
37
|
path: path,
|
|
35
38
|
component: component,
|
|
36
|
-
|
|
39
|
+
layout: getLayout(layoutKey),
|
|
37
40
|
errorHandler: routeErrorHandler,
|
|
38
41
|
exactPath: exactPath
|
|
39
42
|
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var React = require('react');
|
|
8
|
+
|
|
9
|
+
var layouts$1 = require('../containers/layouts.js');
|
|
10
|
+
|
|
11
|
+
var layouts = {
|
|
12
|
+
main: layouts$1.MainLayout,
|
|
13
|
+
app: layouts$1.MainLayout,
|
|
14
|
+
camera: layouts$1.CameraLayout,
|
|
15
|
+
nativePdf: layouts$1.PdfViewerNative,
|
|
16
|
+
colorLayout: layouts$1.ColorLayout
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function useLayout() {
|
|
20
|
+
var getLayout = React.useCallback(function (layoutKey) {
|
|
21
|
+
var Layout = layoutKey && layouts["".concat(layoutKey)];
|
|
22
|
+
|
|
23
|
+
if (Layout) {
|
|
24
|
+
return Layout;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return layouts$1.DefaultLayout;
|
|
28
|
+
}, []);
|
|
29
|
+
return getLayout;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.useLayout = useLayout;
|
|
@@ -14,18 +14,6 @@ var corePanelLeft = require('../components/panel/corePanelLeft.js');
|
|
|
14
14
|
|
|
15
15
|
var corePanelRight = require('../components/panel/corePanelRight.js');
|
|
16
16
|
|
|
17
|
-
require('react-router-dom');
|
|
18
|
-
|
|
19
|
-
require('@equinor/echo-utils');
|
|
20
|
-
|
|
21
|
-
var useScreenValues = require('../hooks/useScreenValues.js');
|
|
22
|
-
|
|
23
|
-
require('@equinor/echo-base');
|
|
24
|
-
|
|
25
|
-
require('@equinor/echo-search');
|
|
26
|
-
|
|
27
|
-
require('../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
|
|
28
|
-
|
|
29
17
|
function _interopDefaultLegacy(e) {
|
|
30
18
|
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
31
19
|
'default': e
|
|
@@ -37,15 +25,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
37
25
|
var EchoContent = function EchoContent(_ref) {
|
|
38
26
|
var children = _ref.children,
|
|
39
27
|
Legend = _ref.Legend;
|
|
40
|
-
|
|
41
|
-
var _useScreenValues$useS = useScreenValues.useScreenValues(),
|
|
42
|
-
isScreenMobileSize = _useScreenValues$useS.isScreenMobileSize;
|
|
43
|
-
|
|
44
|
-
return /*#__PURE__*/React__default["default"].createElement(EchoCore.ModuleContextProvider, null, /*#__PURE__*/React__default["default"].createElement(corePanelLeft["default"], {
|
|
45
|
-
isToggleButtonVisible: !isScreenMobileSize
|
|
46
|
-
}), /*#__PURE__*/React__default["default"].createElement(corePanelRight["default"], {
|
|
47
|
-
isToggleButtonVisible: !isScreenMobileSize
|
|
48
|
-
}), children, Legend && /*#__PURE__*/React__default["default"].createElement(Legend, null));
|
|
28
|
+
return /*#__PURE__*/React__default["default"].createElement(EchoCore.ModuleContextProvider, null, /*#__PURE__*/React__default["default"].createElement(corePanelLeft["default"], null), /*#__PURE__*/React__default["default"].createElement(corePanelRight["default"], null), children, Legend && /*#__PURE__*/React__default["default"].createElement(Legend, null));
|
|
49
29
|
};
|
|
50
30
|
|
|
51
31
|
exports.EchoContent = EchoContent;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
|
|
4
4
|
|
|
5
|
-
var css_248z = ":root{--echo-framework-z-level-panel
|
|
5
|
+
var css_248z = ":root{--echo-framework-z-level-panel:500;--echo-framework-z-level-scrim:1450}[class^=Scrim__StyledScrim]{z-index:var(--echo-framework-z-level-scrim)!important}";
|
|
6
6
|
styleInject_es["default"](css_248z);
|
|
@@ -25,8 +25,6 @@ exports.RegisteredHookName = void 0;
|
|
|
25
25
|
RegisteredHookName["useIsContextMenuInfoLoading"] = "useIsContextMenuInfoLoading";
|
|
26
26
|
RegisteredHookName["useSetActiveCommPackNo"] = "useSetActiveCommPackNo";
|
|
27
27
|
RegisteredHookName["useSetActiveMcPackNo"] = "useSetActiveMcPackNo";
|
|
28
|
-
RegisteredHookName["useDeviceOrientation"] = "useDeviceOrientation";
|
|
29
|
-
RegisteredHookName["useInternalLinkToScan"] = "useInternalLinkToScan";
|
|
30
28
|
})(exports.RegisteredHookName || (exports.RegisteredHookName = {}));
|
|
31
29
|
|
|
32
30
|
var HookLibrary = Object.freeze({
|
|
@@ -83,21 +81,6 @@ var HookLibrary = Object.freeze({
|
|
|
83
81
|
*/
|
|
84
82
|
useSetActiveMcPackNo: function useSetActiveMcPackNo() {
|
|
85
83
|
return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveMcPackNo)();
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Hook for detecting device orientation from native devices.
|
|
90
|
-
* @returns {DeviceOrientation}
|
|
91
|
-
*/
|
|
92
|
-
useDeviceOrientation: function useDeviceOrientation() {
|
|
93
|
-
return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useDeviceOrientation)();
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Hook for opening camera.
|
|
98
|
-
*/
|
|
99
|
-
useInternalLinkToScan: function useInternalLinkToScan() {
|
|
100
|
-
return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useInternalLinkToScan)();
|
|
101
84
|
}
|
|
102
85
|
});
|
|
103
86
|
exports.HookLibrary = HookLibrary;
|
package/dist/src/hooks/index.js
CHANGED
|
@@ -6,13 +6,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
|
|
7
7
|
var useEchoHistory = require('./useEchoHistory.js');
|
|
8
8
|
|
|
9
|
-
var useScreenOrientation = require('./useScreenOrientation.js');
|
|
10
|
-
|
|
11
|
-
var useScreenValues = require('./useScreenValues.js');
|
|
12
|
-
|
|
13
9
|
var useTagDetails = require('./useTagDetails.js');
|
|
14
10
|
|
|
15
11
|
exports.useEchoHistory = useEchoHistory.useEchoHistory;
|
|
16
|
-
exports.useScreenOrientation = useScreenOrientation.useScreenOrientation;
|
|
17
|
-
exports.useScreenValues = useScreenValues.useScreenValues;
|
|
18
12
|
exports.useTagDetails = useTagDetails.useTagDetails;
|