@equinor/echo-framework 0.9.20 → 0.10.0-rc1

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.
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
+ export declare type LayoutKey = 'main' | '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,8 @@
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 {
5
4
  component: WrappedComponent<AppComponentProps>;
6
- layout: React.FC<LayoutProps>;
5
+ layoutKey?: string;
7
6
  path: string;
8
7
  errorHandler?: (error: Error, errorInfo: ErrorInfo) => void;
9
8
  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,17 @@
1
+ import React from 'react';
2
+ interface EchoBottomBarProps {
3
+ isBottomBarVisible: boolean;
4
+ activeAppMenuItem: string;
5
+ updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
6
+ }
7
+ interface EchoBottomBarButtonProps {
8
+ name: string;
9
+ isActive: boolean;
10
+ onButtonClick: (name: string) => void;
11
+ label?: string;
12
+ iconClassName?: string;
13
+ }
14
+ export declare const EchoBottomBarButton: React.FC<EchoBottomBarButtonProps>;
15
+ export declare const EchoBarComponent: React.FC<EchoBottomBarProps>;
16
+ declare const _default: React.NamedExoticComponent<EchoBottomBarProps>;
17
+ export default _default;
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  interface CorePanelsProps {
3
3
  children: React.ReactNode;
4
- isLeftAndRightPanelHidden?: boolean;
5
4
  Legend?: React.FC;
6
5
  }
7
6
  export declare const EchoContent: React.FC<CorePanelsProps>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface EchoUiContextState {
3
+ activeAppMenuItem: string;
4
+ isLegendActive: boolean | undefined;
5
+ updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
6
+ updateIsLegendActive: (isLegendActive: boolean) => void;
7
+ }
8
+ export declare const useEchoUiContext: () => EchoUiContextState;
9
+ interface EchoUiContextProviderProps {
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const EchoUiContextProvider: React.FC<EchoUiContextProviderProps>;
13
+ export {};
@@ -1,3 +1,5 @@
1
+ export * from './EchoBarComponent';
1
2
  export * from './EchoContent';
2
3
  export * from './EchoContentPanels';
3
4
  export * from './EchoEventHandler';
5
+ export * from './EchoUserInterfaceContextProvider';
@@ -1,2 +1,4 @@
1
1
  export * from './useEchoHistory';
2
+ export * from './useScreenOrientation';
3
+ export * from './useScreenValues';
2
4
  export * from './useTagDetails';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Hook for checking if the current size of the browser window is mobile size.
3
+ * @returns {boolean} If the current screen is below threshold or not.
4
+ */
5
+ export declare function useIsCompactLayout(isLandscape: boolean): boolean;
@@ -0,0 +1,5 @@
1
+ import { ScreenOrientation } from '../types/hookLibrary';
2
+ /**
3
+ * @returns {ScreenOrientation}
4
+ */
5
+ export declare function useScreenOrientation(): ScreenOrientation;
@@ -0,0 +1,13 @@
1
+ import { ScreenOrientation } from '../types/hookLibrary';
2
+ /**
3
+ * Provides screen values for current screen.
4
+ *
5
+ * @returns {boolean} response.isScreenMobileSize If the device screen is small or not
6
+ * @returns {ScreenOrientation} response.screenOrientation
7
+ */
8
+ declare type DeviceValues = {
9
+ isScreenMobileSize: boolean;
10
+ screenOrientation: ScreenOrientation;
11
+ };
12
+ export declare function useScreenValues(): DeviceValues;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Get the current size of the browser window.
3
+ * @returns {width?: number; height?: number} Width and height of the current browser size.
4
+
5
+ */
6
+ export declare function useWindowSize(): {
7
+ width: number;
8
+ height: number;
9
+ };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,9 @@ 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';
9
12
  export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
10
13
  export * from './services/eventHubActions';
11
14
  export * from './theme/themeConst';
@@ -36,6 +39,11 @@ declare const EchoFramework: Readonly<{
36
39
  useEchoHistory(): (path: string, params?: {
37
40
  [key: string]: string;
38
41
  } | undefined, state?: any) => void;
42
+ useScreenOrientation(): import("./types/hookLibrary").ScreenOrientation;
43
+ useScreenValues(): {
44
+ isScreenMobileSize: boolean;
45
+ screenOrientation: import("./types/hookLibrary").ScreenOrientation;
46
+ };
39
47
  useTagDetails({ instCode, tagNo }: {
40
48
  tagNo: string;
41
49
  instCode: string;