@equinor/echo-framework 0.8.0 → 0.8.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.
- package/dist/components/panel/corePanelLeft.d.ts +4 -1
- package/dist/components/panel/corePanelRight.d.ts +4 -1
- package/dist/coreApplication/EchoBarComponent.d.ts +6 -0
- package/dist/coreApplication/EchoContent.d.ts +1 -0
- package/dist/coreApplication/index.d.ts +1 -0
- package/dist/hooks/hookLibrary.d.ts +8 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useScreenOrientation.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/src/components/containers/layout.module.css.js +4 -1
- package/dist/src/components/containers/layouts.js +127 -10
- package/dist/src/components/footer/footer.module.css.js +1 -1
- package/dist/src/components/panel/corePanelLeft.js +5 -2
- package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
- package/dist/src/components/panel/corePanelRight.js +5 -2
- package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
- package/dist/src/coreApplication/EchoBarComponent.js +190 -0
- package/dist/src/coreApplication/EchoContent.js +11 -2
- package/dist/src/coreApplication/EchoContent.module.css.js +21 -0
- package/dist/src/globalStyles.css.js +1 -1
- package/dist/src/hooks/hookLibrary.js +9 -0
- package/dist/src/hooks/index.js +3 -0
- package/dist/src/hooks/useScreenOrientation.js +50 -0
- package/dist/src/index.js +6 -0
- package/dist/types/hookLibrary.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
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"
|
|
10
11
|
}
|
|
11
12
|
export declare const HookLibrary: Readonly<{
|
|
12
13
|
/**
|
|
@@ -46,4 +47,9 @@ export declare const HookLibrary: Readonly<{
|
|
|
46
47
|
* @returns {SetActiveMcPackNo}
|
|
47
48
|
*/
|
|
48
49
|
useSetActiveMcPackNo: () => SetActiveMcPackNo;
|
|
50
|
+
/**
|
|
51
|
+
* Hook for detecting device orientation from native devices.
|
|
52
|
+
* @returns {DeviceOrientation}
|
|
53
|
+
*/
|
|
54
|
+
useDeviceOrientation: () => DeviceOrientation;
|
|
49
55
|
}>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useScreenOrientation(): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,13 +6,14 @@ import { getLegendStatusColor } from './utils/legendUtils';
|
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './coreApplication';
|
|
8
8
|
export { RegisteredHookName } from './hooks/hookLibrary';
|
|
9
|
+
export { useScreenOrientation } from './hooks/useScreenOrientation';
|
|
9
10
|
export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
|
|
10
11
|
export * from './services/eventHubActions';
|
|
11
12
|
export * from './theme/themeConst';
|
|
12
13
|
export type { EchoHubPlant } from './types/echoHubPlant';
|
|
13
14
|
export * from './types/eventTypes';
|
|
14
15
|
export * from './types/extensions';
|
|
15
|
-
export type { SetActiveTagNo, TagData } from './types/hookLibrary';
|
|
16
|
+
export type { DeviceOrientation, SetActiveTagNo, TagData } from './types/hookLibrary';
|
|
16
17
|
export { LegendStatus, LegendType } from './types/legend';
|
|
17
18
|
export type { ModelPermissions } from './types/modelPermissions';
|
|
18
19
|
export { PingableSources } from './types/pingableSources';
|
|
@@ -33,6 +34,7 @@ declare const EchoFramework: Readonly<{
|
|
|
33
34
|
useEchoHistory(): (path: string, params?: {
|
|
34
35
|
[key: string]: string;
|
|
35
36
|
} | undefined, state?: any) => void;
|
|
37
|
+
useScreenOrientation(): string;
|
|
36
38
|
useTagDetails({ tagNo, instCode }: {
|
|
37
39
|
tagNo: string;
|
|
38
40
|
instCode: string;
|
|
@@ -43,6 +45,7 @@ declare const EchoFramework: Readonly<{
|
|
|
43
45
|
useIsContextMenuInfoLoading: () => boolean;
|
|
44
46
|
useSetActiveCommPackNo: () => import("./types/hookLibrary").SetActiveCommPackNo;
|
|
45
47
|
useSetActiveMcPackNo: () => import("./types/hookLibrary").SetActiveMcPackNo;
|
|
48
|
+
useDeviceOrientation: () => import("./types/hookLibrary").DeviceOrientation;
|
|
46
49
|
}>;
|
|
47
50
|
EchopediaComponentLibrary: Readonly<{
|
|
48
51
|
getTagItem: () => import("react").FunctionComponent<any>;
|
|
@@ -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%}.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_applicationWrapper__adzds,.layout-module_cameraLayout__iVPug,.layout-module_colorLayout__VHJcU,.layout-module_defaultLayout__3MIwa,.layout-module_pdfViewerNative__hnAgy{width:calc(100% - 48px)}}@media screen and (orientation:portrait) and (max-width:767px){.layout-module_applicationWrapper__adzds,.layout-module_cameraLayout__iVPug,.layout-module_colorLayout__VHJcU,.layout-module_defaultLayout__3MIwa,.layout-module_pdfViewerNative__hnAgy{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,6 +19,8 @@ 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
25
|
"noMargin": "layout-module_noMargin__1eUBf"
|
|
23
26
|
};
|
|
@@ -8,6 +8,50 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
8
8
|
|
|
9
9
|
var React = require('react');
|
|
10
10
|
|
|
11
|
+
var EchoBarComponent = require('../../coreApplication/EchoBarComponent.js');
|
|
12
|
+
|
|
13
|
+
require('@equinor/echo-core');
|
|
14
|
+
|
|
15
|
+
require('../panel/corePanelLeft.js');
|
|
16
|
+
|
|
17
|
+
require('../panel/corePanelRight.js');
|
|
18
|
+
|
|
19
|
+
require('../../coreApplication/EchoContent.module.css.js');
|
|
20
|
+
|
|
21
|
+
require('react-router-dom');
|
|
22
|
+
|
|
23
|
+
require('@equinor/echo-components');
|
|
24
|
+
|
|
25
|
+
require('@equinor/eds-core-react');
|
|
26
|
+
|
|
27
|
+
require('../pageMenu/accordionItem.module.css.js');
|
|
28
|
+
|
|
29
|
+
require('../appLinks/AppLinks.module.css.js');
|
|
30
|
+
|
|
31
|
+
require('../pageMenu/Navigation/applicationList.module.css.js');
|
|
32
|
+
|
|
33
|
+
require('../pageMenu/pageMenu.module.css.js');
|
|
34
|
+
|
|
35
|
+
require('../pageMenu/pageMenuDrawerItem.module.css.js');
|
|
36
|
+
|
|
37
|
+
require('@equinor/echo-base');
|
|
38
|
+
|
|
39
|
+
require('../pageMenu/settings/settings.module.css.js');
|
|
40
|
+
|
|
41
|
+
require('../../services/api/api-manager.js');
|
|
42
|
+
|
|
43
|
+
require('../pageMenu/version/version.module.css.js');
|
|
44
|
+
|
|
45
|
+
require('../searchMenu/searchMenu.module.css.js');
|
|
46
|
+
|
|
47
|
+
require('../../coreApplication/EchoEventHandler.module.css.js');
|
|
48
|
+
|
|
49
|
+
var useScreenOrientation = require('../../hooks/useScreenOrientation.js');
|
|
50
|
+
|
|
51
|
+
require('@equinor/echo-search');
|
|
52
|
+
|
|
53
|
+
var hookLibrary = require('../../hooks/hookLibrary.js');
|
|
54
|
+
|
|
11
55
|
var layout_module = require('./layout.module.css.js');
|
|
12
56
|
|
|
13
57
|
function _interopDefaultLegacy(e) {
|
|
@@ -20,39 +64,112 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
20
64
|
|
|
21
65
|
var MainLayout = function MainLayout(_ref) {
|
|
22
66
|
var children = _ref.children;
|
|
67
|
+
var deviceOrientation = hookLibrary.HookLibrary.useDeviceOrientation();
|
|
68
|
+
var isLandscapeDevice = deviceOrientation.landscape;
|
|
69
|
+
var screenOrientation = useScreenOrientation.useScreenOrientation();
|
|
70
|
+
var isWeb = !deviceOrientation.landscape && !deviceOrientation.portrait;
|
|
71
|
+
var isLandscapeWeb = screenOrientation === 'landscape';
|
|
23
72
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24
|
-
className: layout_module["default"].
|
|
25
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
73
|
+
className: layout_module["default"].echoContentContainer
|
|
74
|
+
}, isWeb ? screenOrientation === 'landscape' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
75
|
+
isLandscape: isLandscapeWeb
|
|
76
|
+
}) : deviceOrientation.landscape && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
77
|
+
isLandscape: isLandscapeDevice
|
|
78
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26
79
|
className: layout_module["default"].mainLayoutWrapper
|
|
27
|
-
}, children)
|
|
80
|
+
}, children), ' ', isWeb ? screenOrientation === 'portrait' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
81
|
+
isLandscape: isLandscapeWeb
|
|
82
|
+
}) : deviceOrientation.portrait && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
83
|
+
isLandscape: isLandscapeDevice
|
|
84
|
+
}));
|
|
28
85
|
};
|
|
29
86
|
|
|
30
87
|
var ColorLayout = function ColorLayout(_ref2) {
|
|
31
88
|
var children = _ref2.children;
|
|
89
|
+
var deviceOrientation = hookLibrary.HookLibrary.useDeviceOrientation();
|
|
90
|
+
var isLandscapeDevice = deviceOrientation.landscape;
|
|
91
|
+
var screenOrientation = useScreenOrientation.useScreenOrientation();
|
|
92
|
+
var isWeb = !deviceOrientation.landscape && !deviceOrientation.portrait;
|
|
93
|
+
var isLandscapeWeb = screenOrientation === 'landscape';
|
|
32
94
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
95
|
+
className: layout_module["default"].echoContentContainer
|
|
96
|
+
}, ' ', isWeb ? screenOrientation === 'landscape' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
97
|
+
isLandscape: isLandscapeWeb
|
|
98
|
+
}) : deviceOrientation.landscape && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
99
|
+
isLandscape: isLandscapeDevice
|
|
100
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
33
101
|
className: layout_module["default"].colorLayout
|
|
34
|
-
}, children)
|
|
102
|
+
}, children), isWeb ? screenOrientation === 'portrait' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
103
|
+
isLandscape: isLandscapeWeb
|
|
104
|
+
}) : deviceOrientation.portrait && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
105
|
+
isLandscape: isLandscapeDevice
|
|
106
|
+
}));
|
|
35
107
|
};
|
|
36
108
|
|
|
37
109
|
var PdfViewerNative = function PdfViewerNative(_ref3) {
|
|
38
110
|
var children = _ref3.children;
|
|
111
|
+
var deviceOrientation = hookLibrary.HookLibrary.useDeviceOrientation();
|
|
112
|
+
var isLandscapeDevice = deviceOrientation.landscape;
|
|
113
|
+
var screenOrientation = useScreenOrientation.useScreenOrientation();
|
|
114
|
+
var isWeb = !deviceOrientation.landscape && !deviceOrientation.portrait;
|
|
115
|
+
var isLandscapeWeb = screenOrientation === 'landscape';
|
|
39
116
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
117
|
+
className: layout_module["default"].echoContentContainer
|
|
118
|
+
}, ' ', isWeb ? screenOrientation === 'landscape' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
119
|
+
isLandscape: isLandscapeWeb
|
|
120
|
+
}) : deviceOrientation.landscape && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
121
|
+
isLandscape: isLandscapeDevice
|
|
122
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40
123
|
className: layout_module["default"].pdfViewerNative
|
|
41
|
-
}, children)
|
|
124
|
+
}, children), ' ', isWeb ? screenOrientation === 'portrait' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
125
|
+
isLandscape: isLandscapeWeb
|
|
126
|
+
}) : deviceOrientation.portrait && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
127
|
+
isLandscape: isLandscapeDevice
|
|
128
|
+
}));
|
|
42
129
|
};
|
|
43
130
|
|
|
44
131
|
var CameraLayout = function CameraLayout(_ref4) {
|
|
45
132
|
var children = _ref4.children;
|
|
133
|
+
var deviceOrientation = hookLibrary.HookLibrary.useDeviceOrientation();
|
|
134
|
+
var isLandscapeDevice = deviceOrientation.landscape;
|
|
135
|
+
var screenOrientation = useScreenOrientation.useScreenOrientation();
|
|
136
|
+
var isWeb = !deviceOrientation.landscape && !deviceOrientation.portrait;
|
|
137
|
+
var isLandscapeWeb = screenOrientation === 'landscape';
|
|
46
138
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
139
|
+
className: layout_module["default"].echoContentContainer
|
|
140
|
+
}, isWeb ? screenOrientation === 'landscape' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
141
|
+
isLandscape: isLandscapeWeb
|
|
142
|
+
}) : deviceOrientation.landscape && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
143
|
+
isLandscape: isLandscapeDevice
|
|
144
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
145
|
+
className: layout_module["default"].cameraLayout
|
|
146
|
+
}, children), ' ', isWeb ? screenOrientation === 'portrait' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
147
|
+
isLandscape: isLandscapeWeb
|
|
148
|
+
}) : deviceOrientation.portrait && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
149
|
+
isLandscape: isLandscapeDevice
|
|
150
|
+
}), ' ');
|
|
51
151
|
};
|
|
52
152
|
|
|
53
153
|
var DefaultLayout = function DefaultLayout(_ref5) {
|
|
54
154
|
var children = _ref5.children;
|
|
55
|
-
|
|
155
|
+
var deviceOrientation = hookLibrary.HookLibrary.useDeviceOrientation();
|
|
156
|
+
var isLandscapeDevice = deviceOrientation.landscape;
|
|
157
|
+
var screenOrientation = useScreenOrientation.useScreenOrientation();
|
|
158
|
+
var isWeb = !deviceOrientation.landscape && !deviceOrientation.portrait;
|
|
159
|
+
var isLandscapeWeb = screenOrientation === 'landscape';
|
|
160
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
161
|
+
className: layout_module["default"].echoContentContainer
|
|
162
|
+
}, isWeb ? screenOrientation === 'landscape' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
163
|
+
isLandscape: isLandscapeWeb
|
|
164
|
+
}) : deviceOrientation.landscape && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
165
|
+
isLandscape: isLandscapeDevice
|
|
166
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
167
|
+
className: layout_module["default"].defaultLayout
|
|
168
|
+
}, children), isWeb ? screenOrientation === 'portrait' && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
169
|
+
isLandscape: isLandscapeWeb
|
|
170
|
+
}) : deviceOrientation.portrait && /*#__PURE__*/React__default["default"].createElement(EchoBarComponent.EchoBarComponent, {
|
|
171
|
+
isLandscape: isLandscapeDevice
|
|
172
|
+
}));
|
|
56
173
|
};
|
|
57
174
|
|
|
58
175
|
exports.CameraLayout = CameraLayout;
|
|
@@ -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
|
-
|
|
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:
|
|
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)}@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
|
-
|
|
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:
|
|
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}@media screen and (max-width:550px){.corePanelRight-module_active__RIMQt{width:100%}}.corePanelRight-module_active__RIMQt{right:0;z-index:var(--echo-framework-z-level-panel)}@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)}}.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",
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
15
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, '__esModule', {
|
|
18
|
+
value: true
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
var echoBase = require('@equinor/echo-base');
|
|
22
|
+
|
|
23
|
+
var echoComponents = require('@equinor/echo-components');
|
|
24
|
+
|
|
25
|
+
var EchoCore = require('@equinor/echo-core');
|
|
26
|
+
|
|
27
|
+
var edsCoreReact = require('@equinor/eds-core-react');
|
|
28
|
+
|
|
29
|
+
var React = require('react');
|
|
30
|
+
|
|
31
|
+
var reactRouterDom = require('react-router-dom');
|
|
32
|
+
|
|
33
|
+
var logo_ee = require('../icons/logo_ee.js');
|
|
34
|
+
|
|
35
|
+
var EchoContent_module = require('./EchoContent.module.css.js');
|
|
36
|
+
|
|
37
|
+
function _interopDefaultLegacy(e) {
|
|
38
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
39
|
+
'default': e
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
44
|
+
|
|
45
|
+
var EchoBarComponent = function EchoBarComponent(_ref) {
|
|
46
|
+
var isLandscape = _ref.isLandscape;
|
|
47
|
+
|
|
48
|
+
var _React$useState = React.useState(false),
|
|
49
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
50
|
+
shouldRenderBar = _React$useState2[0],
|
|
51
|
+
setShouldRenderBar = _React$useState2[1];
|
|
52
|
+
|
|
53
|
+
var _React$useState3 = React.useState(''),
|
|
54
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
55
|
+
activeKey = _React$useState4[0],
|
|
56
|
+
setActiveKey = _React$useState4[1];
|
|
57
|
+
|
|
58
|
+
var _React$useState5 = React.useState(false),
|
|
59
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
60
|
+
isSyncing = _React$useState6[0],
|
|
61
|
+
setIsSyncing = _React$useState6[1];
|
|
62
|
+
|
|
63
|
+
var _EchoCore$usePanels = EchoCore.usePanels(),
|
|
64
|
+
setActivePanel = _EchoCore$usePanels.setActivePanel;
|
|
65
|
+
|
|
66
|
+
var goToInternalLink = EchoCore.useInternalLink();
|
|
67
|
+
|
|
68
|
+
var _EchoCore$usePlantSet = EchoCore.usePlantSettings(),
|
|
69
|
+
selectedInstCode = _EchoCore$usePlantSet.instCode;
|
|
70
|
+
|
|
71
|
+
var history = reactRouterDom.useHistory();
|
|
72
|
+
var shouldRenderBottomBar = React.useCallback(function () {
|
|
73
|
+
var isMounted = true;
|
|
74
|
+
|
|
75
|
+
if (window.innerWidth < 768 && !isLandscape || window.innerWidth < 927 && isLandscape && isMounted) {
|
|
76
|
+
setShouldRenderBar(true);
|
|
77
|
+
} else {
|
|
78
|
+
setShouldRenderBar(false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return function () {
|
|
82
|
+
isMounted = false;
|
|
83
|
+
};
|
|
84
|
+
}, [isLandscape]);
|
|
85
|
+
React.useEffect(function () {
|
|
86
|
+
var isMounted = true;
|
|
87
|
+
var unSubscribeSyncing = echoBase.eventHub.subscribe('isSyncing', function (active) {
|
|
88
|
+
if (isMounted) {
|
|
89
|
+
setIsSyncing(active);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return function () {
|
|
93
|
+
isMounted = false;
|
|
94
|
+
unSubscribeSyncing();
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
var onClickButton = function onClickButton(key) {
|
|
99
|
+
setActivePanel('');
|
|
100
|
+
|
|
101
|
+
if (key === activeKey) {
|
|
102
|
+
if (key === 'menu' || key === 'search') {
|
|
103
|
+
setActivePanel('');
|
|
104
|
+
} else {
|
|
105
|
+
history.go(-1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
setActiveKey('');
|
|
109
|
+
} else {
|
|
110
|
+
setActiveKey(key);
|
|
111
|
+
|
|
112
|
+
switch (key) {
|
|
113
|
+
case 'home':
|
|
114
|
+
return history.push("/?instCode=".concat(selectedInstCode));
|
|
115
|
+
|
|
116
|
+
case 'search':
|
|
117
|
+
return setActivePanel(EchoCore.ECHO_CORE_SEARCH);
|
|
118
|
+
|
|
119
|
+
case 'camera':
|
|
120
|
+
return goToInternalLink('/camera');
|
|
121
|
+
|
|
122
|
+
case 'menu':
|
|
123
|
+
return setActivePanel(EchoCore.ECHO_CORE_MAIN);
|
|
124
|
+
|
|
125
|
+
default:
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
setActiveKey('');
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
React.useEffect(function () {
|
|
134
|
+
shouldRenderBottomBar();
|
|
135
|
+
window.addEventListener('resize', shouldRenderBottomBar);
|
|
136
|
+
return function () {
|
|
137
|
+
window.removeEventListener('resize', shouldRenderBottomBar);
|
|
138
|
+
};
|
|
139
|
+
}, [shouldRenderBottomBar, shouldRenderBar]);
|
|
140
|
+
var EchoIcon = logo_ee.icon;
|
|
141
|
+
return shouldRenderBar ? /*#__PURE__*/React__default["default"].createElement(echoComponents.EchoBottomBar, {
|
|
142
|
+
style: {
|
|
143
|
+
zIndex: 'var( --echo-framework-z-level-bottom-bar)'
|
|
144
|
+
}
|
|
145
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
146
|
+
className: "".concat(EchoContent_module["default"].barButtons, " ").concat(activeKey === 'home' ? EchoContent_module["default"].activeButton : '')
|
|
147
|
+
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Button, {
|
|
148
|
+
variant: "ghost_icon",
|
|
149
|
+
onClick: function onClick() {
|
|
150
|
+
return onClickButton('home');
|
|
151
|
+
}
|
|
152
|
+
}, /*#__PURE__*/React__default["default"].createElement(EchoIcon, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
153
|
+
className: "".concat(EchoContent_module["default"].barButtons, " ").concat(activeKey === 'search' ? EchoContent_module["default"].activeButton : '')
|
|
154
|
+
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Button, {
|
|
155
|
+
variant: "ghost_icon",
|
|
156
|
+
onClick: function onClick() {
|
|
157
|
+
return onClickButton('search');
|
|
158
|
+
}
|
|
159
|
+
}, /*#__PURE__*/React__default["default"].createElement(echoComponents.Icon, {
|
|
160
|
+
name: 'search',
|
|
161
|
+
color: echoComponents.themeConst.echoText
|
|
162
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
163
|
+
className: "".concat(EchoContent_module["default"].barButtons, " ").concat(activeKey === 'camera' ? EchoContent_module["default"].activeButton : '')
|
|
164
|
+
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Button, {
|
|
165
|
+
variant: "ghost_icon",
|
|
166
|
+
onClick: function onClick() {
|
|
167
|
+
return onClickButton('camera');
|
|
168
|
+
}
|
|
169
|
+
}, /*#__PURE__*/React__default["default"].createElement(echoComponents.Icon, {
|
|
170
|
+
name: 'camera',
|
|
171
|
+
color: echoComponents.themeConst.echoText
|
|
172
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
173
|
+
className: "".concat(EchoContent_module["default"].barButtons, " ").concat(activeKey === 'menu' ? EchoContent_module["default"].activeButton : '')
|
|
174
|
+
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Button, {
|
|
175
|
+
variant: "ghost_icon",
|
|
176
|
+
onClick: function onClick() {
|
|
177
|
+
return onClickButton('menu');
|
|
178
|
+
}
|
|
179
|
+
}, isSyncing ? /*#__PURE__*/React__default["default"].createElement(echoComponents.Icon, {
|
|
180
|
+
className: EchoContent_module["default"].spinningIcon,
|
|
181
|
+
color: echoComponents.themeConst.echoText,
|
|
182
|
+
name: 'sync'
|
|
183
|
+
}) : /*#__PURE__*/React__default["default"].createElement(echoComponents.Icon, {
|
|
184
|
+
name: 'menu',
|
|
185
|
+
color: echoComponents.themeConst.echoText
|
|
186
|
+
})))) : null;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
exports.EchoBarComponent = EchoBarComponent;
|
|
190
|
+
exports["default"] = EchoBarComponent;
|
|
@@ -14,6 +14,8 @@ var corePanelLeft = require('../components/panel/corePanelLeft.js');
|
|
|
14
14
|
|
|
15
15
|
var corePanelRight = require('../components/panel/corePanelRight.js');
|
|
16
16
|
|
|
17
|
+
var EchoContent_module = require('./EchoContent.module.css.js');
|
|
18
|
+
|
|
17
19
|
function _interopDefaultLegacy(e) {
|
|
18
20
|
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
19
21
|
'default': e
|
|
@@ -24,8 +26,15 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
24
26
|
|
|
25
27
|
var EchoContent = function EchoContent(_ref) {
|
|
26
28
|
var children = _ref.children,
|
|
27
|
-
Legend = _ref.Legend
|
|
28
|
-
|
|
29
|
+
Legend = _ref.Legend,
|
|
30
|
+
isToggleButtonVisible = _ref.isToggleButtonVisible;
|
|
31
|
+
return /*#__PURE__*/React__default["default"].createElement(EchoCore.ModuleContextProvider, null, /*#__PURE__*/React__default["default"].createElement(corePanelLeft["default"], {
|
|
32
|
+
isToggleButtonVisible: isToggleButtonVisible
|
|
33
|
+
}), /*#__PURE__*/React__default["default"].createElement(corePanelRight["default"], {
|
|
34
|
+
isToggleButtonVisible: isToggleButtonVisible
|
|
35
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
36
|
+
className: EchoContent_module["default"].echoContentContainer
|
|
37
|
+
}, children, Legend && /*#__PURE__*/React__default["default"].createElement(Legend, null)));
|
|
29
38
|
};
|
|
30
39
|
|
|
31
40
|
exports.EchoContent = EchoContent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var styleInject_es = require('../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
|
+
|
|
9
|
+
var css_248z = ".EchoContent-module_echoContent__DgKg-{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%}.EchoContent-module_mobileWrapper__I1UNf{height:calc(100% - 60px);position:relative}.EchoContent-module_echoContentContainer__-yhpr{height:100%}.EchoContent-module_echoModuleContainer__NsbOv{width:100%}.EchoContent-module_barButtons__F8xrV{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.EchoContent-module_activeButton__5xhQu{background-color:var(--equiGreen3);border-top:2px solid var(--equiGreen1)}@media screen and (max-width:927px) and (orientation:landscape){.EchoContent-module_activeButton__5xhQu{border-right:2px solid var(--equiGreen1);border-top:0}}@media screen and (orientation:landscape){.EchoContent-module_echoContentContainer__-yhpr{display:flex;flex-direction:row}}@media screen and (orientation:portrait){.EchoContent-module_echoModuleContainer__NsbOv{height:calc(100% - 48px);overflow:hidden}}@keyframes EchoContent-module_spinAnimation__gNXNq{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.EchoContent-module_spinningIcon__am10d{animation:EchoContent-module_spinAnimation__gNXNq 1.5s linear infinite reverse}";
|
|
10
|
+
var style = {
|
|
11
|
+
"echoContent": "EchoContent-module_echoContent__DgKg-",
|
|
12
|
+
"mobileWrapper": "EchoContent-module_mobileWrapper__I1UNf",
|
|
13
|
+
"echoContentContainer": "EchoContent-module_echoContentContainer__-yhpr",
|
|
14
|
+
"echoModuleContainer": "EchoContent-module_echoModuleContainer__NsbOv",
|
|
15
|
+
"barButtons": "EchoContent-module_barButtons__F8xrV",
|
|
16
|
+
"activeButton": "EchoContent-module_activeButton__5xhQu",
|
|
17
|
+
"spinningIcon": "EchoContent-module_spinningIcon__am10d",
|
|
18
|
+
"spinAnimation": "EchoContent-module_spinAnimation__gNXNq"
|
|
19
|
+
};
|
|
20
|
+
styleInject_es["default"](css_248z);
|
|
21
|
+
exports["default"] = style;
|
|
@@ -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:500;--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-bottom-bar:1000;--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,6 +25,7 @@ exports.RegisteredHookName = void 0;
|
|
|
25
25
|
RegisteredHookName["useIsContextMenuInfoLoading"] = "useIsContextMenuInfoLoading";
|
|
26
26
|
RegisteredHookName["useSetActiveCommPackNo"] = "useSetActiveCommPackNo";
|
|
27
27
|
RegisteredHookName["useSetActiveMcPackNo"] = "useSetActiveMcPackNo";
|
|
28
|
+
RegisteredHookName["useDeviceOrientation"] = "useDeviceOrientation";
|
|
28
29
|
})(exports.RegisteredHookName || (exports.RegisteredHookName = {}));
|
|
29
30
|
|
|
30
31
|
var HookLibrary = Object.freeze({
|
|
@@ -81,6 +82,14 @@ var HookLibrary = Object.freeze({
|
|
|
81
82
|
*/
|
|
82
83
|
useSetActiveMcPackNo: function useSetActiveMcPackNo() {
|
|
83
84
|
return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveMcPackNo)();
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Hook for detecting device orientation from native devices.
|
|
89
|
+
* @returns {DeviceOrientation}
|
|
90
|
+
*/
|
|
91
|
+
useDeviceOrientation: function useDeviceOrientation() {
|
|
92
|
+
return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useDeviceOrientation)();
|
|
84
93
|
}
|
|
85
94
|
});
|
|
86
95
|
exports.HookLibrary = HookLibrary;
|
package/dist/src/hooks/index.js
CHANGED
|
@@ -6,7 +6,10 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
|
|
7
7
|
var useEchoHistory = require('./useEchoHistory.js');
|
|
8
8
|
|
|
9
|
+
var useScreenOrientation = require('./useScreenOrientation.js');
|
|
10
|
+
|
|
9
11
|
var useTagDetails = require('./useTagDetails.js');
|
|
10
12
|
|
|
11
13
|
exports.useEchoHistory = useEchoHistory.useEchoHistory;
|
|
14
|
+
exports.useScreenOrientation = useScreenOrientation.useScreenOrientation;
|
|
12
15
|
exports.useTagDetails = useTagDetails.useTagDetails;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
15
|
+
Object.defineProperty(exports, '__esModule', {
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var React = require('react');
|
|
20
|
+
|
|
21
|
+
function useScreenOrientation() {
|
|
22
|
+
var _React$useState = React.useState(''),
|
|
23
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24
|
+
orientation = _React$useState2[0],
|
|
25
|
+
setOrientation = _React$useState2[1];
|
|
26
|
+
|
|
27
|
+
var updateOrientation = React.useCallback(function () {
|
|
28
|
+
var isMounted = true;
|
|
29
|
+
|
|
30
|
+
if (window.innerWidth > window.innerHeight && isMounted) {
|
|
31
|
+
setOrientation('landscape');
|
|
32
|
+
} else {
|
|
33
|
+
setOrientation('portrait');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return function () {
|
|
37
|
+
isMounted = false;
|
|
38
|
+
};
|
|
39
|
+
}, []);
|
|
40
|
+
React.useEffect(function () {
|
|
41
|
+
updateOrientation();
|
|
42
|
+
window.addEventListener('resize', updateOrientation);
|
|
43
|
+
return function () {
|
|
44
|
+
window.removeEventListener('resize', updateOrientation);
|
|
45
|
+
};
|
|
46
|
+
}, [updateOrientation]);
|
|
47
|
+
return orientation;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
exports.useScreenOrientation = useScreenOrientation;
|
package/dist/src/index.js
CHANGED
|
@@ -94,12 +94,16 @@ var toaster = require('./components/toaster/toaster.js');
|
|
|
94
94
|
|
|
95
95
|
var toasters = require('./components/toaster/toasters.js');
|
|
96
96
|
|
|
97
|
+
var EchoBarComponent = require('./coreApplication/EchoBarComponent.js');
|
|
98
|
+
|
|
97
99
|
var EchoContent = require('./coreApplication/EchoContent.js');
|
|
98
100
|
|
|
99
101
|
var EchoContentPanels = require('./coreApplication/EchoContentPanels.js');
|
|
100
102
|
|
|
101
103
|
var EchoEventHandler = require('./coreApplication/EchoEventHandler.js');
|
|
102
104
|
|
|
105
|
+
var useScreenOrientation = require('./hooks/useScreenOrientation.js');
|
|
106
|
+
|
|
103
107
|
var toastActions = require('./services/eventHubActions/toastActions.js');
|
|
104
108
|
|
|
105
109
|
var extensions = require('./types/extensions.js');
|
|
@@ -193,10 +197,12 @@ exports.useLayout = useLayout.useLayout;
|
|
|
193
197
|
exports.TagNumber = tagNumber.TagNumber;
|
|
194
198
|
exports.Toaster = toaster.Toaster;
|
|
195
199
|
exports.Toasters = toasters.Toasters;
|
|
200
|
+
exports.EchoBarComponent = EchoBarComponent.EchoBarComponent;
|
|
196
201
|
exports.EchoContent = EchoContent.EchoContent;
|
|
197
202
|
exports.mainMenu = EchoContentPanels.mainMenu;
|
|
198
203
|
exports.searchPanel = EchoContentPanels.searchPanel;
|
|
199
204
|
exports.EchoEventHandler = EchoEventHandler.EchoEventHandler;
|
|
205
|
+
exports.useScreenOrientation = useScreenOrientation.useScreenOrientation;
|
|
200
206
|
exports.displayToast = toastActions.displayToast;
|
|
201
207
|
Object.defineProperty(exports, 'ExtendableComponentName', {
|
|
202
208
|
enumerable: true,
|
|
@@ -2,3 +2,7 @@ export declare type SetActiveTagNo = (tagNo: string, activeTagTab?: string, acti
|
|
|
2
2
|
export declare type TagData = [(tagNo: string, instCode: string) => void];
|
|
3
3
|
export declare type SetActiveCommPackNo = (commPackNo: string, activeCommPackProject: string, activeCommPackTab?: string, activeCommPackSubTab?: string) => void;
|
|
4
4
|
export declare type SetActiveMcPackNo = (mcPackNo: string, activeMcPackProject: string, activeMcPackTab?: string, activeMcPackSubTab?: string) => void;
|
|
5
|
+
export interface DeviceOrientation {
|
|
6
|
+
portrait: boolean;
|
|
7
|
+
landscape: boolean;
|
|
8
|
+
}
|