@equinor/echo-framework 0.9.0 → 0.9.3

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 (47) hide show
  1. package/dist/_virtual/index.js +9 -0
  2. package/dist/components/containers/layouts.d.ts +3 -5
  3. package/dist/components/panel/corePanelLeft.d.ts +4 -1
  4. package/dist/components/panel/corePanelRight.d.ts +4 -1
  5. package/dist/components/router/echoRoute.d.ts +2 -2
  6. package/dist/components/router/index.d.ts +0 -1
  7. package/dist/coreApplication/EchoBarComponent.d.ts +12 -0
  8. package/dist/coreApplication/EchoContent.d.ts +1 -0
  9. package/dist/coreApplication/index.d.ts +1 -0
  10. package/dist/hooks/hookLibrary.d.ts +13 -2
  11. package/dist/hooks/index.d.ts +1 -0
  12. package/dist/hooks/useScreenOrientation.d.ts +2 -0
  13. package/dist/index.d.ts +6 -1
  14. package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +1 -1
  15. package/dist/node_modules/classnames/index.js +67 -0
  16. package/dist/services/api/api-manager.d.ts +10 -1
  17. package/dist/src/components/containers/layout.module.css.js +6 -2
  18. package/dist/src/components/containers/layouts.js +72 -36
  19. package/dist/src/components/footer/footer.module.css.js +1 -1
  20. package/dist/src/components/panel/corePanelLeft.js +5 -2
  21. package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
  22. package/dist/src/components/panel/corePanelRight.js +5 -2
  23. package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
  24. package/dist/src/components/router/echoRoute.js +9 -3
  25. package/dist/src/components/router/routes.js +2 -4
  26. package/dist/src/coreApplication/EchoBarComponent.js +201 -0
  27. package/dist/src/coreApplication/EchoContent.js +7 -2
  28. package/dist/src/coreApplication/EchoContent.module.css.js +17 -0
  29. package/dist/src/globalStyles.css.js +1 -1
  30. package/dist/src/hooks/hookLibrary.js +17 -0
  31. package/dist/src/hooks/index.js +3 -0
  32. package/dist/src/hooks/useScreenOrientation.js +58 -0
  33. package/dist/src/index.js +13 -8
  34. package/dist/src/index2.js +37 -26
  35. package/dist/src/services/api/api-manager.js +107 -47
  36. package/dist/src/services/api/api-plantinfo.js +125 -8
  37. package/dist/src/services/api/api-plants.js +34 -3
  38. package/dist/src/services/api/api-realtimedata.js +9 -2
  39. package/dist/src/services/api/api-tags.js +61 -2
  40. package/dist/src/services/api/api-version.js +68 -6
  41. package/dist/src/utils/taskCache.js +89 -0
  42. package/dist/types/hookLibrary.d.ts +4 -0
  43. package/dist/utils/taskCache.d.ts +23 -0
  44. package/dist/utils/taskCache.test.d.ts +1 -0
  45. package/package.json +25 -25
  46. package/dist/components/router/useLayout.d.ts +0 -3
  47. package/dist/src/components/router/useLayout.js +0 -32
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ });
6
+ var classnames = {
7
+ exports: {}
8
+ };
9
+ exports.classnames = classnames;
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
+ export declare type LayoutKey = 'main' | 'camera' | 'nativePdf' | 'colorLayout' | undefined;
2
3
  export interface LayoutProps {
4
+ layoutKey?: string;
3
5
  children: React.ReactNode;
4
6
  }
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>;
7
+ export declare const Layout: React.FC<LayoutProps>;
@@ -1,3 +1,6 @@
1
1
  import React from 'react';
2
- declare const CorePanelLeft: React.FC;
2
+ interface CorePanelLeftProps {
3
+ isToggleButtonVisible?: boolean;
4
+ }
5
+ declare const CorePanelLeft: React.FC<CorePanelLeftProps>;
3
6
  export default CorePanelLeft;
@@ -1,3 +1,6 @@
1
1
  import React from 'react';
2
- declare const _default: React.NamedExoticComponent<{}>;
2
+ interface CorePanelRightProps {
3
+ isToggleButtonVisible?: boolean;
4
+ }
5
+ declare const _default: React.NamedExoticComponent<CorePanelRightProps>;
3
6
  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';
4
3
  interface EchoRouteProps {
4
+ key: string;
5
5
  component: WrappedComponent<AppComponentProps>;
6
- layout: React.FC<LayoutProps>;
6
+ layoutKey?: string;
7
7
  path: string;
8
8
  errorHandler?: (error: Error, errorInfo: ErrorInfo) => void;
9
9
  exactPath?: boolean;
@@ -1,4 +1,3 @@
1
1
  export * from './echoRoute';
2
2
  export * from './echoRouter';
3
3
  export * from './routes';
4
- export * from './useLayout';
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare enum BarButtonVariants {
3
+ Home = "home",
4
+ Search = "search",
5
+ Camera = "camera",
6
+ Menu = "menu"
7
+ }
8
+ interface EchoBottomBarProps {
9
+ isLandscape: boolean;
10
+ }
11
+ export declare const EchoBarComponent: React.FC<EchoBottomBarProps>;
12
+ export default EchoBarComponent;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface CorePanelsProps {
3
3
  children: React.ReactNode;
4
4
  Legend?: React.FC;
5
+ isToggleButtonVisible?: boolean;
5
6
  }
6
7
  export declare const EchoContent: React.FC<CorePanelsProps>;
7
8
  export {};
@@ -1,3 +1,4 @@
1
+ export * from './EchoBarComponent';
1
2
  export * from './EchoContent';
2
3
  export * from './EchoContentPanels';
3
4
  export * from './EchoEventHandler';
@@ -1,12 +1,14 @@
1
1
  import { DataInformation } from '@equinor/echo-components';
2
- import { SetActiveCommPackNo, SetActiveMcPackNo, SetActiveTagNo, TagData } from './../types/hookLibrary';
2
+ import { DeviceOrientation, 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"
9
+ useSetActiveMcPackNo = "useSetActiveMcPackNo",
10
+ useDeviceOrientation = "useDeviceOrientation",
11
+ useInternalLinkToScan = "useInternalLinkToScan"
10
12
  }
11
13
  export declare const HookLibrary: Readonly<{
12
14
  /**
@@ -46,4 +48,13 @@ export declare const HookLibrary: Readonly<{
46
48
  * @returns {SetActiveMcPackNo}
47
49
  */
48
50
  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;
49
60
  }>;
@@ -1,2 +1,3 @@
1
1
  export * from './useEchoHistory';
2
+ export * from './useScreenOrientation';
2
3
  export * from './useTagDetails';
@@ -0,0 +1,2 @@
1
+ export declare type ScreenOrientation = 'landscape' | 'portrait' | undefined;
2
+ export declare function useScreenOrientation(): ScreenOrientation;
package/dist/index.d.ts CHANGED
@@ -1,18 +1,20 @@
1
1
  /// <reference types="react" />
2
2
  import './globalStyles.css';
3
+ import * as hooks from './hooks';
3
4
  import { getPlantsInfo, getTagDetails } from './services/api';
4
5
  import './theme/theme.css';
5
6
  import { getLegendStatusColor } from './utils/legendUtils';
6
7
  export * from './components';
7
8
  export * from './coreApplication';
8
9
  export { RegisteredHookName } from './hooks/hookLibrary';
10
+ export { useScreenOrientation } from './hooks/useScreenOrientation';
9
11
  export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
10
12
  export * from './services/eventHubActions';
11
13
  export * from './theme/themeConst';
12
14
  export type { EchoHubPlant } from './types/echoHubPlant';
13
15
  export * from './types/eventTypes';
14
16
  export * from './types/extensions';
15
- export type { SetActiveTagNo, TagData } from './types/hookLibrary';
17
+ export type { DeviceOrientation, SetActiveTagNo, TagData } from './types/hookLibrary';
16
18
  export { LegendStatus, LegendType } from './types/legend';
17
19
  export type { ModelPermissions } from './types/modelPermissions';
18
20
  export { PingableSources } from './types/pingableSources';
@@ -36,6 +38,7 @@ declare const EchoFramework: Readonly<{
36
38
  useEchoHistory(): (path: string, params?: {
37
39
  [key: string]: string;
38
40
  } | undefined, state?: any) => void;
41
+ useScreenOrientation(): hooks.ScreenOrientation;
39
42
  useTagDetails({ instCode, tagNo }: {
40
43
  tagNo: string;
41
44
  instCode: string;
@@ -50,6 +53,8 @@ declare const EchoFramework: Readonly<{
50
53
  useIsContextMenuInfoLoading: () => boolean;
51
54
  useSetActiveCommPackNo: () => import("./types/hookLibrary").SetActiveCommPackNo;
52
55
  useSetActiveMcPackNo: () => import("./types/hookLibrary").SetActiveMcPackNo;
56
+ useDeviceOrientation: () => import("./types/hookLibrary").DeviceOrientation;
57
+ useInternalLinkToScan: () => (params?: string | undefined) => void;
53
58
  }>;
54
59
  EchopediaComponentLibrary: Readonly<{
55
60
  getTagItem: () => import("react").FunctionComponent<any>;
@@ -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.5";
47
+ var VERSION = "6.0.6";
48
48
  /** @private */
49
49
 
50
50
  var Arg = /*#__PURE__*/function () {
@@ -0,0 +1,67 @@
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 index = require('../../_virtual/index.js');
10
+ /*!
11
+ Copyright (c) 2018 Jed Watson.
12
+ Licensed under the MIT License (MIT), see
13
+ http://jedwatson.github.io/classnames
14
+ */
15
+
16
+
17
+ (function (module) {
18
+ /* global define */
19
+ (function () {
20
+ var hasOwn = {}.hasOwnProperty;
21
+
22
+ function classNames() {
23
+ var classes = [];
24
+
25
+ for (var i = 0; i < arguments.length; i++) {
26
+ var arg = arguments[i];
27
+ if (!arg) continue;
28
+
29
+ var argType = _typeof(arg);
30
+
31
+ if (argType === 'string' || argType === 'number') {
32
+ classes.push(arg);
33
+ } else if (Array.isArray(arg)) {
34
+ if (arg.length) {
35
+ var inner = classNames.apply(null, arg);
36
+
37
+ if (inner) {
38
+ classes.push(inner);
39
+ }
40
+ }
41
+ } else if (argType === 'object') {
42
+ if (arg.toString === Object.prototype.toString) {
43
+ for (var key in arg) {
44
+ if (hasOwn.call(arg, key) && arg[key]) {
45
+ classes.push(key);
46
+ }
47
+ }
48
+ } else {
49
+ classes.push(arg.toString());
50
+ }
51
+ }
52
+ }
53
+
54
+ return classes.join(' ');
55
+ }
56
+
57
+ if (module.exports) {
58
+ classNames["default"] = classNames;
59
+ module.exports = classNames;
60
+ } else {
61
+ window.classNames = classNames;
62
+ }
63
+ })();
64
+ })(index.classnames);
65
+
66
+ var classNames = index.classnames.exports;
67
+ exports["default"] = classNames;
@@ -1,2 +1,11 @@
1
1
  export declare const baseApiUrl: string;
2
- export declare function request<T>(url: string, requestType: T, abortSignal?: AbortSignal): Promise<T>;
2
+ interface Request {
3
+ url: string;
4
+ abortSignal?: AbortSignal;
5
+ cache: {
6
+ isEnabled: boolean;
7
+ timeToLiveMilliseconds?: number;
8
+ };
9
+ }
10
+ export declare function request<T>({ cache, url, abortSignal }: Request): Promise<T | undefined>;
11
+ export {};
@@ -6,8 +6,9 @@ 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_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}";
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)}}";
10
10
  var style = {
11
+ "echoContentContainer": "layout-module_echoContentContainer__0debO",
11
12
  "applicationWrapper": "layout-module_applicationWrapper__adzds",
12
13
  "fadeIn": "layout-module_fadeIn__-OF4H",
13
14
  "mainLayoutWrapper": "layout-module_mainLayoutWrapper__4kuIT",
@@ -18,8 +19,11 @@ var style = {
18
19
  "navbarBrand": "layout-module_navbarBrand__2IOPY",
19
20
  "colorLayout": "layout-module_colorLayout__VHJcU",
20
21
  "pdfViewerNative": "layout-module_pdfViewerNative__hnAgy",
22
+ "cameraLayout": "layout-module_cameraLayout__iVPug",
23
+ "defaultLayout": "layout-module_defaultLayout__3MIwa",
21
24
  "noPadding": "layout-module_noPadding__7amV4",
22
- "noMargin": "layout-module_noMargin__1eUBf"
25
+ "noMargin": "layout-module_noMargin__1eUBf",
26
+ "deviceOrientation": "layout-module_deviceOrientation__DY1-L"
23
27
  };
24
28
  styleInject_es["default"](css_248z);
25
29
  exports["default"] = style;
@@ -1,13 +1,63 @@
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
+
3
5
  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
6
 
5
7
  Object.defineProperty(exports, '__esModule', {
6
8
  value: true
7
9
  });
8
10
 
11
+ var index = require('../../../node_modules/classnames/index.js');
12
+
9
13
  var React = require('react');
10
14
 
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-components');
26
+
27
+ require('@equinor/eds-core-react');
28
+
29
+ require('../pageMenu/accordionItem.module.css.js');
30
+
31
+ require('../appLinks/AppLinks.module.css.js');
32
+
33
+ require('../pageMenu/Navigation/applicationList.module.css.js');
34
+
35
+ require('../pageMenu/pageMenu.module.css.js');
36
+
37
+ require('../pageMenu/pageMenuDrawerItem.module.css.js');
38
+
39
+ require('@equinor/echo-base');
40
+
41
+ require('../pageMenu/settings/settings.module.css.js');
42
+
43
+ require('../../services/api/api-manager.js');
44
+
45
+ require('../pageMenu/version/version.module.css.js');
46
+
47
+ require('../searchMenu/searchMenu.module.css.js');
48
+
49
+ require('../../coreApplication/EchoEventHandler.module.css.js');
50
+
51
+ var useScreenOrientation = require('../../hooks/useScreenOrientation.js');
52
+
53
+ require('@equinor/echo-utils');
54
+
55
+ require('@equinor/echo-search');
56
+
57
+ require('../../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
58
+
59
+ var hookLibrary = require('../../hooks/hookLibrary.js');
60
+
11
61
  var layout_module = require('./layout.module.css.js');
12
62
 
13
63
  function _interopDefaultLegacy(e) {
@@ -18,45 +68,31 @@ function _interopDefaultLegacy(e) {
18
68
 
19
69
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
70
 
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
+ var Layout = function Layout(_ref) {
72
+ var _index$default;
29
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
+ var layoutKey = _ref.layoutKey,
75
+ children = _ref.children;
36
76
 
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
- };
77
+ var _hookLibrary$HookLibr = hookLibrary.HookLibrary.useDeviceOrientation(),
78
+ landscape = _hookLibrary$HookLibr.landscape,
79
+ portrait = _hookLibrary$HookLibr.portrait; // as any
43
80
 
44
- var CameraLayout = function CameraLayout(_ref4) {
45
- var children = _ref4.children;
46
- return /*#__PURE__*/React__default["default"].createElement("div", {
47
- style: {
48
- backgroundColor: 'transparent'
49
- }
50
- }, children);
51
- };
52
81
 
53
- var DefaultLayout = function DefaultLayout(_ref5) {
54
- var children = _ref5.children;
55
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, children);
82
+ var screenOrientation = useScreenOrientation.useScreenOrientation();
83
+ var isWeb = !landscape && !portrait;
84
+ var isLandscapeWeb = screenOrientation === 'landscape';
85
+ 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));
86
+ console.log('-- layoutKey', layoutKey);
87
+ return /*#__PURE__*/React__default["default"].createElement("div", {
88
+ className: layout_module["default"].echoContentContainer
89
+ }, (isWeb && screenOrientation === 'landscape' || !isWeb && landscape) && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
90
+ isLandscape: isWeb ? isLandscapeWeb : landscape
91
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
92
+ className: ModuleLayoutClassNames
93
+ }, children), (isWeb && screenOrientation === 'portrait' || !isWeb && portrait) && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
94
+ isLandscape: isWeb ? isLandscapeWeb : landscape
95
+ }));
56
96
  };
57
97
 
58
- exports.CameraLayout = CameraLayout;
59
- exports.ColorLayout = ColorLayout;
60
- exports.DefaultLayout = DefaultLayout;
61
- exports.MainLayout = MainLayout;
62
- exports.PdfViewerNative = PdfViewerNative;
98
+ exports.Layout = Layout;
@@ -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 (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 (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}}";
10
10
  var style = {
11
11
  "echoFooter": "footer-module_echoFooter__6xy2c",
12
12
  "footerDisclaimer": "footer-module_footerDisclaimer__sJJ5f",
@@ -40,7 +40,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
40
40
 
41
41
  edsIons.edsIcons();
42
42
 
43
- var CorePanelLeft = function CorePanelLeft() {
43
+ var CorePanelLeft = function CorePanelLeft(_ref) {
44
+ var isToggleButtonVisible = _ref.isToggleButtonVisible;
45
+
44
46
  var _a;
45
47
 
46
48
  var _EchoCore$usePanels = EchoCore.usePanels(),
@@ -72,7 +74,8 @@ var CorePanelLeft = function CorePanelLeft() {
72
74
  style: panelUI.panelButton
73
75
  }, panels.map(function (panel, i) {
74
76
  var Icon = panel.icon;
75
- return /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
77
+ var showPanel = isToggleButtonVisible || panel.key !== EchoCore.ECHO_CORE_SEARCH;
78
+ return showPanel && /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
76
79
  key: i,
77
80
  onClick: function onClick(e) {
78
81
  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: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)}";
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)}";
10
10
  var style = {
11
11
  "wrapper": "corePanelLeft-module_wrapper__d2Omx",
12
12
  "wrapperClosed": "corePanelLeft-module_wrapperClosed__Zd1CL",
@@ -42,7 +42,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
42
42
 
43
43
  edsIons.edsIcons();
44
44
 
45
- var CorePanelRight = function CorePanelRight() {
45
+ var CorePanelRight = function CorePanelRight(_ref) {
46
+ var isToggleButtonVisible = _ref.isToggleButtonVisible;
47
+
46
48
  var _a;
47
49
 
48
50
  var _EchoCore$usePanels = EchoCore.usePanels('right'),
@@ -74,7 +76,8 @@ var CorePanelRight = function CorePanelRight() {
74
76
  style: panelUI.panelButton
75
77
  }, panels.map(function (panel, i) {
76
78
  var PanelIcon = panel.icon;
77
- return /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
79
+ var showPanel = isToggleButtonVisible || panel.key !== EchoCore.ECHO_CORE_MAIN;
80
+ return showPanel && /*#__PURE__*/React__default["default"].createElement(panelButton["default"], {
78
81
  key: i,
79
82
  label: panel.label,
80
83
  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: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)}";
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)}";
10
10
  var style = {
11
11
  "wrapper": "corePanelRight-module_wrapper__YN3Zr",
12
12
  "active": "corePanelRight-module_active__RIMQt",
@@ -12,6 +12,8 @@ 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
+
15
17
  var echoWrapper = require('./echoWrapper.js');
16
18
 
17
19
  function _interopDefaultLegacy(e) {
@@ -23,17 +25,21 @@ function _interopDefaultLegacy(e) {
23
25
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
26
 
25
27
  var EchoRoute = function EchoRoute(_ref) {
26
- var Component = _ref.component,
27
- Layout = _ref.layout,
28
+ var key = _ref.key,
29
+ Component = _ref.component,
30
+ layoutKey = _ref.layoutKey,
28
31
  path = _ref.path,
29
32
  errorHandler = _ref.errorHandler,
30
33
  _ref$exactPath = _ref.exactPath,
31
34
  exactPath = _ref$exactPath === void 0 ? true : _ref$exactPath;
32
35
  return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Route, {
36
+ key: key,
33
37
  exact: exactPath,
34
38
  path: path,
35
39
  render: function render(props) {
36
- return /*#__PURE__*/React__default["default"].createElement(Layout, null, /*#__PURE__*/React__default["default"].createElement(echoWrapper.EchoWrapper, {
40
+ return /*#__PURE__*/React__default["default"].createElement(layouts.Layout, {
41
+ layoutKey: layoutKey
42
+ }, /*#__PURE__*/React__default["default"].createElement(echoWrapper.EchoWrapper, {
37
43
  path: path
38
44
  }, /*#__PURE__*/React__default["default"].createElement(errorBoundary.ErrorBoundary, {
39
45
  onComponentDidCatch: errorHandler
@@ -12,8 +12,6 @@ var React = require('react');
12
12
 
13
13
  var echoRoute = require('./echoRoute.js');
14
14
 
15
- var useLayout = require('./useLayout.js');
16
-
17
15
  function _interopDefaultLegacy(e) {
18
16
  return e && _typeof(e) === 'object' && 'default' in e ? e : {
19
17
  'default': e
@@ -25,18 +23,18 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
25
23
  var EchoRoutes = function EchoRoutes(_ref) {
26
24
  var routeErrorHandler = _ref.routeErrorHandler;
27
25
  var routes = EchoCore.useRoutes();
28
- var getLayout = useLayout.useLayout();
29
26
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, routes.map(function (_ref2) {
30
27
  var path = _ref2.path,
31
28
  component = _ref2.component,
32
29
  layoutKey = _ref2.layoutKey,
33
30
  key = _ref2.key,
34
31
  exactPath = _ref2.exactPath;
32
+ console.log('-- Key, routes', layoutKey);
35
33
  return /*#__PURE__*/React__default["default"].createElement(echoRoute.EchoRoute, {
36
34
  key: key,
37
35
  path: path,
38
36
  component: component,
39
- layout: getLayout(layoutKey),
37
+ layoutKey: layoutKey,
40
38
  errorHandler: routeErrorHandler,
41
39
  exactPath: exactPath
42
40
  });