@equinor/echo-framework 0.9.9 → 0.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/components/appLinks/applinkUtils.d.ts +2 -0
  2. package/dist/components/appLinks/applinkUtils.test.d.ts +1 -0
  3. package/dist/components/containers/layouts.d.ts +5 -3
  4. package/dist/components/panel/corePanelLeft.d.ts +1 -4
  5. package/dist/components/panel/corePanelRight.d.ts +1 -4
  6. package/dist/components/router/echoRoute.d.ts +2 -2
  7. package/dist/components/router/index.d.ts +1 -0
  8. package/dist/components/router/useLayout.d.ts +3 -0
  9. package/dist/coreApplication/EchoContent.d.ts +1 -0
  10. package/dist/coreApplication/index.d.ts +0 -1
  11. package/dist/hooks/hookLibrary.d.ts +2 -13
  12. package/dist/hooks/index.d.ts +0 -2
  13. package/dist/index.d.ts +1 -14
  14. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +1 -2
  15. package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +1 -1
  16. package/dist/src/components/appLinks/AppLinks.js +4 -1
  17. package/dist/src/components/appLinks/applinkUtils.js +19 -0
  18. package/dist/src/components/containers/layout.module.css.js +2 -6
  19. package/dist/src/components/containers/layouts.js +36 -67
  20. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -2
  21. package/dist/src/components/footer/footer.module.css.js +1 -1
  22. package/dist/src/components/panel/corePanelLeft.js +2 -5
  23. package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
  24. package/dist/src/components/panel/corePanelRight.js +2 -5
  25. package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
  26. package/dist/src/components/router/echoRoute.js +3 -9
  27. package/dist/src/components/router/routes.js +4 -1
  28. package/dist/src/components/router/useLayout.js +32 -0
  29. package/dist/src/coreApplication/EchoContent.js +2 -21
  30. package/dist/src/globalStyles.css.js +1 -1
  31. package/dist/src/hooks/hookLibrary.js +0 -17
  32. package/dist/src/hooks/index.js +0 -6
  33. package/dist/src/index.js +81 -49
  34. package/dist/src/types/legend.js +1 -0
  35. package/dist/src/utils/legendUtils.js +1 -1
  36. package/dist/types/hookLibrary.d.ts +0 -5
  37. package/dist/types/legend.d.ts +2 -1
  38. package/package.json +37 -37
  39. package/dist/_virtual/index.js +0 -9
  40. package/dist/coreApplication/EchoBarComponent.d.ts +0 -12
  41. package/dist/hooks/useIsCompactLayout.d.ts +0 -5
  42. package/dist/hooks/useScreenOrientation.d.ts +0 -5
  43. package/dist/hooks/useScreenValues.d.ts +0 -17
  44. package/dist/hooks/useWindowSize.d.ts +0 -9
  45. package/dist/node_modules/classnames/index.js +0 -67
  46. package/dist/src/coreApplication/EchoBarComponent.js +0 -182
  47. package/dist/src/coreApplication/EchoContent.module.css.js +0 -17
  48. package/dist/src/hooks/useIsCompactLayout.js +0 -50
  49. package/dist/src/hooks/useScreenOrientation.js +0 -62
  50. package/dist/src/hooks/useScreenValues.js +0 -48
  51. package/dist/src/hooks/useWindowSize.js +0 -62
  52. package/dist/src/index2.js +0 -212
@@ -0,0 +1,2 @@
1
+ import { AppLink } from '@equinor/echo-core';
2
+ export declare const addInstCodeParamToAppLink: (appLink: AppLink, instCode: string) => AppLink;
@@ -0,0 +1 @@
1
+ export {};
@@ -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 Layout: React.FC<LayoutProps>;
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,6 +1,3 @@
1
1
  import React from 'react';
2
- interface CorePanelLeftProps {
3
- isToggleButtonVisible?: boolean;
4
- }
5
- declare const CorePanelLeft: React.FC<CorePanelLeftProps>;
2
+ declare const CorePanelLeft: React.FC;
6
3
  export default CorePanelLeft;
@@ -1,6 +1,3 @@
1
1
  import React from 'react';
2
- interface CorePanelRightProps {
3
- isToggleButtonVisible?: boolean;
4
- }
5
- declare const _default: React.NamedExoticComponent<CorePanelRightProps>;
2
+ declare const _default: React.NamedExoticComponent<{}>;
6
3
  export default _default;
@@ -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
- layoutKey?: string;
6
+ layout: React.FC<LayoutProps>;
7
7
  path: string;
8
8
  errorHandler?: (error: Error, errorInfo: ErrorInfo) => void;
9
9
  exactPath?: boolean;
@@ -1,3 +1,4 @@
1
1
  export * from './echoRoute';
2
2
  export * from './echoRouter';
3
3
  export * from './routes';
4
+ export * from './useLayout';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { LayoutProps } from '../containers/layouts';
3
+ export declare function useLayout(): (layoutKey?: string) => React.FC<LayoutProps>;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  interface CorePanelsProps {
3
3
  children: React.ReactNode;
4
+ isLeftAndRightPanelHidden?: boolean;
4
5
  Legend?: React.FC;
5
6
  }
6
7
  export declare const EchoContent: React.FC<CorePanelsProps>;
@@ -1,4 +1,3 @@
1
- export * from './EchoBarComponent';
2
1
  export * from './EchoContent';
3
2
  export * from './EchoContentPanels';
4
3
  export * from './EchoEventHandler';
@@ -1,14 +1,12 @@
1
1
  import { DataInformation } from '@equinor/echo-components';
2
- import { DeviceOrientation, SetActiveCommPackNo, SetActiveMcPackNo, SetActiveTagNo, TagData } from './../types/hookLibrary';
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
  }>;
@@ -1,4 +1,2 @@
1
1
  export * from './useEchoHistory';
2
- export * from './useScreenOrientation';
3
- export * from './useScreenValues';
4
2
  export * from './useTagDetails';
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 { DeviceOrientation, SetActiveTagNo, TagData } from './types/hookLibrary';
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>;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', {
5
5
  });
6
6
 
7
7
  function _extends() {
8
- _extends = Object.assign || function (target) {
8
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
9
9
  for (var i = 1; i < arguments.length; i++) {
10
10
  var source = arguments[i];
11
11
 
@@ -18,7 +18,6 @@ function _extends() {
18
18
 
19
19
  return target;
20
20
  };
21
-
22
21
  return _extends.apply(this, arguments);
23
22
  }
24
23
 
@@ -44,7 +44,7 @@ var Loggers = require('./Loggers.js'); // Licensed to the .NET Foundation under
44
44
  /** The version of the SignalR client. */
45
45
 
46
46
 
47
- var VERSION = "6.0.6";
47
+ var VERSION = "6.0.8";
48
48
  /** @private */
49
49
 
50
50
  var Arg = /*#__PURE__*/function () {
@@ -12,6 +12,8 @@ var React = require('react');
12
12
 
13
13
  var AppLinks_module = require('./AppLinks.module.css.js');
14
14
 
15
+ var applinkUtils = require('./applinkUtils.js');
16
+
15
17
  var linkButton = require('./linkButton/linkButton.js');
16
18
 
17
19
  function _interopDefaultLegacy(e) {
@@ -25,12 +27,13 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
25
27
  var AppLinks = function AppLinks(_ref) {
26
28
  var isHome = _ref.isHome;
27
29
  var appLinks = EchoCore.useAppLinks(isHome);
30
+ var instCode = EchoCore.useInstCode();
28
31
  return /*#__PURE__*/React__default["default"].createElement("div", {
29
32
  className: AppLinks_module["default"].AppBar
30
33
  }, appLinks.map(function (appLink, index) {
31
34
  return /*#__PURE__*/React__default["default"].createElement(linkButton.LinkButton, {
32
35
  key: appLink.name + index,
33
- appLink: appLink
36
+ appLink: applinkUtils.addInstCodeParamToAppLink(appLink, instCode)
34
37
  });
35
38
  }));
36
39
  };
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ });
6
+
7
+ var addInstCodeParamToAppLink = function addInstCodeParamToAppLink(appLink, instCode) {
8
+ var existingParams = appLink.params;
9
+
10
+ if (existingParams === null || existingParams === void 0 ? void 0 : existingParams.includes('instCode')) {
11
+ return appLink;
12
+ }
13
+
14
+ return Object.assign(Object.assign({}, appLink), {
15
+ params: existingParams && existingParams.length > 0 ? existingParams + "&instCode=".concat(instCode) : "?instCode=".concat(instCode)
16
+ });
17
+ };
18
+
19
+ exports.addInstCodeParamToAppLink = addInstCodeParamToAppLink;
@@ -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-module_echoContentContainer__0debO{height:100%;padding:env(safe-area-inset-top,20px) env(safe-area-inset-right,20px) env(safe-area-inset-bottom,20px) env(safe-area-inset-left,20px);width:100%}.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;position:relative;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_cameraLayout__iVPug{background-color:\"transparent\"}.layout-module_cameraLayout__iVPug,.layout-module_defaultLayout__3MIwa{height:100%;position:relative;width:100%}.layout-module_noPadding__7amV4{padding:0}.layout-module_noMargin__1eUBf{margin:0}@media screen and (orientation:landscape) and (max-width:927px){.layout-module_echoContentContainer__0debO{display:flex;flex-direction:row}.layout-module_deviceOrientation__DY1-L{width:calc(100% - 48px)}}@media screen and (orientation:portrait) and (max-width:767px){.layout-module_deviceOrientation__DY1-L{height:calc(100% - 48px)}}";
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 Layout = function Layout(_ref) {
70
- var _index$default;
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
- var layoutKey = _ref.layoutKey,
73
- children = _ref.children;
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
- var _useScreenValues$useS = useScreenValues.useScreenValues(),
76
- isWeb = _useScreenValues$useS.isWeb,
77
- isScreenMobileSize = _useScreenValues$useS.isScreenMobileSize,
78
- screenOrientationDevice = _useScreenValues$useS.screenOrientationDevice,
79
- screenOrientationWeb = _useScreenValues$useS.screenOrientationWeb;
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
- var ModuleLayoutClassNames = index["default"](layout_module["default"].deviceOrientation, (_index$default = {}, _defineProperty(_index$default, layout_module["default"].mainLayoutWrapper, layoutKey === 'main'), _defineProperty(_index$default, layout_module["default"].colorLayout, layoutKey === 'colorLayout'), _defineProperty(_index$default, layout_module["default"].pdfViewerNative, layoutKey === 'nativePdf'), _defineProperty(_index$default, layout_module["default"].cameraLayout, layoutKey === 'camera'), _defineProperty(_index$default, layout_module["default"].defaultLayout, layoutKey === undefined), _index$default));
44
+ var CameraLayout = function CameraLayout(_ref4) {
45
+ var children = _ref4.children;
82
46
  return /*#__PURE__*/React__default["default"].createElement("div", {
83
- className: layout_module["default"].echoContentContainer
84
- }, (isWeb && screenOrientationWeb === 'landscape' || screenOrientationDevice.landscape) && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
85
- isBottomBarVisible: isScreenMobileSize
86
- }), /*#__PURE__*/React__default["default"].createElement("div", {
87
- className: ModuleLayoutClassNames
88
- }, children), (isWeb && screenOrientationWeb === 'portrait' || screenOrientationDevice.portrait) && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
89
- isBottomBarVisible: isScreenMobileSize
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.Layout = Layout;
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 (max-width:767px) and (orientation:portrait){.footer-module_echoFooter__6xy2c{bottom:48px}}@media screen and (max-width:927px) and (orientation:landscape){.footer-module_echoFooter__6xy2c{left:48px}}@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}}";
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(_ref) {
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
- var showPanel = isToggleButtonVisible || panel.key !== EchoCore.ECHO_CORE_SEARCH;
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:all .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-left)}@media screen and (max-width:767px) and (orientation:portrait){.corePanelLeft-module_wrapper__d2Omx{height:calc(100% - 48px)}}@media screen and (max-width:927px) and (orientation:landscape){.corePanelLeft-module_active__-A3TW{left:48px}}.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}@media screen and (max-width:927px) and (orientation:landscape){.corePanelLeft-module_buttonContainer__bs-Uu{right:-118px}}.corePanelLeft-module_button__SqyKk{margin-left:var(--medium);margin-top:var(--small)}";
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(_ref) {
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
- var showPanel = isToggleButtonVisible || panel.key !== EchoCore.ECHO_CORE_MAIN;
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:550px;position:fixed;right:-352px;top:0;transition:all .4s ease-in-out;width:352px;z-index:2}.corePanelRight-module_active__RIMQt{right:0;z-index:var(--echo-framework-z-level-panel-main)}@media screen and (max-width:550px){.corePanelRight-module_active__RIMQt{width:100%}}@media screen and (max-width:767px) and (orientation:portrait){.corePanelRight-module_wrapper__YN3Zr{height:calc(100% - 48px)}}@media screen and (max-width:927px) and (orientation:landscape){.corePanelRight-module_wrapper__YN3Zr{left:-352px}.corePanelRight-module_active__RIMQt{left:48px;z-index:var(--echo-framework-z-level-panel-main)}}.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)}";
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 key = _ref.key,
29
- Component = _ref.component,
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(layouts.Layout, {
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
- layoutKey: layoutKey,
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
@@ -36,16 +24,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
36
24
 
37
25
  var EchoContent = function EchoContent(_ref) {
38
26
  var children = _ref.children,
27
+ isLeftAndRightPanelHidden = _ref.isLeftAndRightPanelHidden,
39
28
  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));
29
+ return /*#__PURE__*/React__default["default"].createElement(EchoCore.ModuleContextProvider, null, !isLeftAndRightPanelHidden && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, 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
30
  };
50
31
 
51
32
  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-left:500;--echo-framework-z-level-panel-main:550;--echo-framework-z-level-bottom-bar:1500;--echo-framework-z-level-scrim:1450}[class^=Scrim__StyledScrim]{z-index:var(--echo-framework-z-level-scrim)!important}";
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);