@equinor/echo-framework 0.9.7 → 0.9.10

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.
@@ -6,9 +6,10 @@ 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_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%}@media screen and (max-width:1078px) and (orientation:landscape){.layout-module_echoContentContainer__0debO{display:flex;flex-direction:row}.layout-module_deviceOrientation__DY1-L{width:calc(100% - 48px)!important}}@media screen and (max-width:892px) and (orientation:portrait){.layout-module_deviceOrientation__DY1-L{height:calc(100% - 48px)!important}}.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}";
10
10
  var style = {
11
11
  "echoContentContainer": "layout-module_echoContentContainer__0debO",
12
+ "deviceOrientation": "layout-module_deviceOrientation__DY1-L",
12
13
  "applicationWrapper": "layout-module_applicationWrapper__adzds",
13
14
  "fadeIn": "layout-module_fadeIn__-OF4H",
14
15
  "mainLayoutWrapper": "layout-module_mainLayoutWrapper__4kuIT",
@@ -22,8 +23,7 @@ var style = {
22
23
  "cameraLayout": "layout-module_cameraLayout__iVPug",
23
24
  "defaultLayout": "layout-module_defaultLayout__3MIwa",
24
25
  "noPadding": "layout-module_noPadding__7amV4",
25
- "noMargin": "layout-module_noMargin__1eUBf",
26
- "deviceOrientation": "layout-module_deviceOrientation__DY1-L"
26
+ "noMargin": "layout-module_noMargin__1eUBf"
27
27
  };
28
28
  styleInject_es["default"](css_248z);
29
29
  exports["default"] = style;
@@ -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 (max-width:892px) and (orientation:portrait){.footer-module_echoFooter__6xy2c{bottom:48px}}@media screen and (max-width:1078px) 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",
@@ -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: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:892px) and (orientation:portrait){.corePanelLeft-module_wrapper__d2Omx{height:calc(100% - 48px)}}@media screen and (max-width:1078px) 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:1078px) 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",
@@ -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: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:892px) and (orientation:portrait){.corePanelRight-module_wrapper__YN3Zr{height:calc(100% - 48px)}}@media screen and (max-width:1078px) 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",
@@ -27,6 +27,7 @@ var Toaster = function Toaster(_ref) {
27
27
  onClose = _ref.onClose;
28
28
  var Action = edsCoreReact.Snackbar.Action;
29
29
  return /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Snackbar, {
30
+ className: toaster_module["default"].toaster,
30
31
  placement: 'bottom-left',
31
32
  open: true,
32
33
  onClose: onClose
@@ -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 = ".toaster-module_chip__eNPoH{padding:5px!important;position:absolute;right:-5px;top:-5px}.toaster-module_toastersSection__q-orZ{grid-gap:24px;align-items:start;bottom:8px;display:grid;grid-auto-rows:32px;height:auto;left:8px;position:absolute}.toaster-module_toastersSection__q-orZ>div{height:32px;position:relative;width:fit-content}";
9
+ var css_248z = "@media screen and (max-width:1078px) and (orientation:landscape){.toaster-module_toaster__6C9aR{left:64px!important}}@media screen and (max-width:892px) and (orientation:portrait){.toaster-module_toaster__6C9aR{bottom:64px!important}}.toaster-module_chip__eNPoH{padding:5px!important;position:absolute;right:-5px;top:-5px}.toaster-module_toastersSection__q-orZ{grid-gap:24px;align-items:start;bottom:8px;display:grid;grid-auto-rows:32px;height:auto;left:8px;position:absolute}.toaster-module_toastersSection__q-orZ>div{height:32px;position:relative;width:fit-content}";
10
10
  var style = {
11
+ "toaster": "toaster-module_toaster__6C9aR",
11
12
  "chip": "toaster-module_chip__eNPoH",
12
13
  "toastersSection": "toaster-module_toastersSection__q-orZ"
13
14
  };
@@ -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 = ".EchoContent-module_barButtons__F8xrV{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.EchoContent-module_activeBottomBarButton__MQAdf{background-color:var(--equiGreen3);border-top:2px solid var(--equiGreen1)}@media screen and (max-width:927px) and (orientation:landscape){.EchoContent-module_activeBottomBarButton__MQAdf{border-right:2px solid var(--equiGreen1);border-top:0}}@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}";
9
+ var css_248z = ".EchoContent-module_barButtons__F8xrV{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.EchoContent-module_activeBottomBarButton__MQAdf{background-color:var(--equiGreen3);border-top:2px solid var(--equiGreen1)}@media screen and (max-width:1078px) and (orientation:landscape){.EchoContent-module_activeBottomBarButton__MQAdf{border-right:2px solid var(--equiGreen1);border-top:0}}@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
10
  var style = {
11
11
  "barButtons": "EchoContent-module_barButtons__F8xrV",
12
12
  "activeBottomBarButton": "EchoContent-module_activeBottomBarButton__MQAdf",
@@ -31,10 +31,13 @@ function useIsCompactLayout(isLandscape) {
31
31
  var _React$useState = React.useState(false),
32
32
  _React$useState2 = _slicedToArray(_React$useState, 2),
33
33
  isMobileWidth = _React$useState2[0],
34
- setIsMobileWidth = _React$useState2[1];
34
+ setIsMobileWidth = _React$useState2[1]; //This calculation is connected to the viewport metatag in index.html
35
35
 
36
- var smallScreenPortrait = !!windowSize.width && windowSize.width < 768 && !isLandscape;
37
- var smallScreenLandscape = !!windowSize.width && windowSize.width < 928 && isLandscape;
36
+
37
+ var scaledClientWidth = !!windowSize.width && windowSize.width * 0.86;
38
+ var roundedClientWidth = Math.ceil(scaledClientWidth);
39
+ var smallScreenPortrait = roundedClientWidth < 768 && !isLandscape;
40
+ var smallScreenLandscape = roundedClientWidth < 928 && isLandscape;
38
41
  var isCurrentSizeSmall = smallScreenLandscape || smallScreenPortrait;
39
42
 
40
43
  if (isMobileWidth !== isCurrentSizeSmall) {
@@ -43,7 +43,7 @@ function useScreenOrientation() {
43
43
  setOrientation = _useStateSafe2[1];
44
44
 
45
45
  var updateOrientation = React.useCallback(function () {
46
- if (window.innerWidth > window.innerHeight) {
46
+ if (document.documentElement.clientWidth > document.documentElement.clientHeight) {
47
47
  setOrientation('landscape');
48
48
  } else {
49
49
  setOrientation('portrait');
@@ -41,8 +41,8 @@ function useWindowSize() {
41
41
  function handleResize() {
42
42
  // Set window width/height to state
43
43
  setWindowSize({
44
- width: window.innerWidth,
45
- height: window.innerHeight
44
+ width: document.documentElement.clientWidth,
45
+ height: document.documentElement.clientHeight
46
46
  });
47
47
  } // Add event listener
48
48
 
@@ -54,4 +54,5 @@ exports.LegendType = void 0;
54
54
  LegendType["WorkOrders"] = "WorkOrders";
55
55
  LegendType["ValvePosition"] = "ValvePosition";
56
56
  LegendType["MeasuringPosition"] = "MeasuringPosition";
57
+ LegendType["WorkPermit"] = "WorkPermit";
57
58
  })(exports.LegendType || (exports.LegendType = {}));
@@ -139,7 +139,7 @@ function getLegendStatusColor() {
139
139
  function legendTypeToLegendStatus(legendType, status) {
140
140
  if (!status) return legend.LegendStatus.Unknown;
141
141
 
142
- if (legendType === legend.LegendType.CommPk || legendType === legend.LegendType.CommPkStatus || legendType === legend.LegendType.Notifications || legendType === legend.LegendType.WorkOrders || legendType === legend.LegendType.ValvePosition || legendType === legend.LegendType.MeasuringPosition) {
142
+ if (legendType === legend.LegendType.CommPk || legendType === legend.LegendType.CommPkStatus || legendType === legend.LegendType.Notifications || legendType === legend.LegendType.WorkOrders || legendType === legend.LegendType.ValvePosition || legendType === legend.LegendType.MeasuringPosition || legendType === legend.LegendType.WorkPermit) {
143
143
  return status;
144
144
  } else {
145
145
  return valueToEnum(status, legend.LegendStatus);
@@ -39,5 +39,6 @@ export declare enum LegendType {
39
39
  Notifications = "Notifications",
40
40
  WorkOrders = "WorkOrders",
41
41
  ValvePosition = "ValvePosition",
42
- MeasuringPosition = "MeasuringPosition"
42
+ MeasuringPosition = "MeasuringPosition",
43
+ WorkPermit = "WorkPermit"
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.9.7",
3
+ "version": "0.9.10",
4
4
  "description": "Modules and components for EchoWeb, utilizing EchoCore",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/index.d.ts",