andoncloud-sdk 1.2.1 → 1.2.4

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.
@@ -2,16 +2,16 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
2
2
 
3
3
  var React = require('react');
4
4
  var React__default = _interopDefault(React);
5
+ var mobx = require('mobx');
5
6
  var reactRouterDom = require('react-router-dom');
6
7
  var propTypes = require('prop-types');
7
8
  var CssBaseline = _interopDefault(require('@mui/material/CssBaseline'));
8
9
  var styles = require('@mui/material/styles');
9
10
  var useModalHook = require('use-modal-hook');
10
- var mobx = require('mobx');
11
+ var material = require('@mui/material');
11
12
  var mobxReactLite = require('mobx-react-lite');
12
13
  var Dialog = _interopDefault(require('@mui/material/Dialog'));
13
14
  var DialogContent = _interopDefault(require('@mui/material/DialogContent'));
14
- var material = require('@mui/material');
15
15
  var lab = require('@mui/lab');
16
16
  var Box = _interopDefault(require('@mui/material/Box'));
17
17
  var Card = _interopDefault(require('@mui/material/Card'));
@@ -28,7 +28,7 @@ var Menu = _interopDefault(require('@mui/material/Menu'));
28
28
  var AccessTimeIcon = _interopDefault(require('@mui/icons-material/AccessTime'));
29
29
  var styles$1 = require('@mui/styles');
30
30
 
31
- let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r="",l="",a="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":l+="f"==o[1]?n(s,o):o+"{"+n(s,"k"==o[1]?"":t)+"}":"object"==typeof s?l+=n(s,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=s&&(o=o.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=n.p?n.p(o,s):o+":"+s+";");}return r+(t&&a?t+"{"+a+"}":a)+l},o={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},c=(e,t,r,c,i)=>{let u=s(e),p=o[u]||(o[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!o[p]){let t=u!==e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?r.shift():t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):r[0][t[1]]=t[2];return r[0]})(e);o[p]=n(i?{["@keyframes "+p]:t}:t,r?"":"."+p);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[p],t,c),p},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):!1===e?"":e;}return e+l+(null==o?"":o)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return c(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let p,d,f,g=u.bind({g:1}),b=u.bind({k:1});function h(e,t,r,l){n.p=t,p=e,d=r,f=l;}function m(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let s=Object.assign({},n),c=s.className||a.className;r.p=Object.assign({theme:d&&d()},s),r.o=/ *go\d+/.test(c),s.className=u.apply(r,l)+(c?" "+c:""),t&&(s.ref=o);let i=e;return e[0]&&(i=s.as||e,delete s.as),f&&i[0]&&f(s),p(i,s)}return t?t(a):a}}
31
+ let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r="",l="",a="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":l+="f"==o[1]?n(s,o):o+"{"+n(s,"k"==o[1]?"":t)+"}":"object"==typeof s?l+=n(s,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=n.p?n.p(o,s):o+":"+s+";");}return r+(t&&a?t+"{"+a+"}":a)+l},o={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},c=(e,t,r,c,i)=>{let u=s(e),p=o[u]||(o[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!o[p]){let t=u!==e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?r.shift():t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):r[0][t[1]]=t[2];return r[0]})(e);o[p]=n(i?{["@keyframes "+p]:t}:t,r?"":"."+p);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[p],t,c),p},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):!1===e?"":e;}return e+l+(null==o?"":o)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return c(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let p,d,f,g=u.bind({g:1}),b=u.bind({k:1});function h(e,t,r,l){n.p=t,p=e,d=r,f=l;}function m(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let s=Object.assign({},n),c=s.className||a.className;r.p=Object.assign({theme:d&&d()},s),r.o=/ *go\d+/.test(c),s.className=u.apply(r,l)+(c?" "+c:""),t&&(s.ref=o);let i=e;return e[0]&&(i=s.as||e,delete s.as),f&&i[0]&&f(s),p(i,s)}return t?t(a):a}}
32
32
 
33
33
  function _extends() {
34
34
  _extends = Object.assign || function (target) {
@@ -934,8 +934,8 @@ var acFetch = function acFetch(url, options) {
934
934
 
935
935
  return response;
936
936
  });
937
- }, function () {
938
- sessionStore.setNetworkError(true);
937
+ }, function (e) {
938
+ sessionStore.setNetworkError(e.message);
939
939
  }));
940
940
  } catch (e) {
941
941
  return Promise.reject(e);
@@ -1347,15 +1347,31 @@ var SessionAPI = /*#__PURE__*/function () {
1347
1347
  var SessionStore = /*#__PURE__*/function () {
1348
1348
  function SessionStore() {
1349
1349
  this.loading = false;
1350
+ this.loginStatus = {
1351
+ status: "not_authorized"
1352
+ };
1350
1353
  this.api = new SessionAPI();
1351
- this.networkError = false;
1354
+ this.networkError = null;
1352
1355
  mobx.makeObservable(this, {
1353
- loading: mobx.observable
1356
+ loading: mobx.observable,
1357
+ loginStatus: mobx.observable.deep
1354
1358
  });
1355
1359
  }
1356
1360
 
1357
1361
  var _proto2 = SessionStore.prototype;
1358
1362
 
1363
+ _proto2.updateLoginStatus = function updateLoginStatus() {
1364
+ this.loginStatus = {
1365
+ status: "connected",
1366
+ authResponse: {
1367
+ user: this.session.user,
1368
+ accessToken: this.session.accessToken,
1369
+ tokenType: this.session.tokenType,
1370
+ expiresIn: this.session.expiresIn
1371
+ }
1372
+ };
1373
+ };
1374
+
1359
1375
  _proto2.setAuthConfig = function setAuthConfig(config) {
1360
1376
  this.api.setAuthConfig(config);
1361
1377
  };
@@ -1381,24 +1397,6 @@ var SessionStore = /*#__PURE__*/function () {
1381
1397
  };
1382
1398
  };
1383
1399
 
1384
- _proto2.getLoginStatus = function getLoginStatus() {
1385
- if (this.isLoggedIn()) {
1386
- return {
1387
- status: "connected",
1388
- authResponse: {
1389
- user: this.session.user,
1390
- accessToken: this.session.accessToken,
1391
- tokenType: this.session.tokenType,
1392
- expiresIn: this.session.expiresIn
1393
- }
1394
- };
1395
- }
1396
-
1397
- return {
1398
- status: "not_authorized"
1399
- };
1400
- };
1401
-
1402
1400
  _proto2.authorize = function authorize(credentials, storeSession) {
1403
1401
  if (storeSession === void 0) {
1404
1402
  storeSession = true;
@@ -1421,6 +1419,8 @@ var SessionStore = /*#__PURE__*/function () {
1421
1419
  _this8.storeSession();
1422
1420
 
1423
1421
  _this8.setCurrentUser(session.user);
1422
+
1423
+ _this8.updateLoginStatus();
1424
1424
  }
1425
1425
 
1426
1426
  return session;
@@ -1443,6 +1443,8 @@ var SessionStore = /*#__PURE__*/function () {
1443
1443
  if (_this10.session) {
1444
1444
  return Promise.resolve(_this10.api.getUserData()).then(function (user) {
1445
1445
  _this10.setCurrentUser(user);
1446
+
1447
+ _this10.updateLoginStatus();
1446
1448
  });
1447
1449
  }
1448
1450
  }();
@@ -1464,6 +1466,10 @@ var SessionStore = /*#__PURE__*/function () {
1464
1466
  _this12.removeSession();
1465
1467
 
1466
1468
  _this12.removeCurrentUser();
1469
+
1470
+ _this12.loginStatus = {
1471
+ status: "not_authorized"
1472
+ };
1467
1473
  });
1468
1474
  }
1469
1475
  }();
@@ -2227,16 +2233,37 @@ var LoginForm = function LoginForm(_ref) {
2227
2233
  setPassword = _useState2[1];
2228
2234
 
2229
2235
  var navigate = reactRouterDom.useNavigate();
2236
+
2237
+ var authorizeUser = function authorizeUser(credentials) {
2238
+ try {
2239
+ return Promise.resolve(sessionStore.authorize(_extends$1({
2240
+ scope: scope
2241
+ }, credentials), storeSession)).then(function (session) {
2242
+ if (session) {
2243
+ if (onSuccess && typeof onSuccess === "function") {
2244
+ onSuccess(session);
2245
+ }
2246
+
2247
+ setPassword("");
2248
+ navigate(redirectPath);
2249
+ } else if (onFailure && typeof onFailure === "function") {
2250
+ onFailure();
2251
+ }
2252
+ });
2253
+ } catch (e) {
2254
+ return Promise.reject(e);
2255
+ }
2256
+ };
2257
+
2230
2258
  React.useEffect(function () {
2231
2259
  onscan.attachTo(document, {
2232
2260
  suffixKeyCodes: [13],
2233
2261
  reactToPaste: true,
2234
2262
  onScan: function onScan(sCode, _) {
2235
- console.log("logging in with code: " + sCode);
2236
- sessionStore.authorize({
2263
+ void authorizeUser({
2237
2264
  username: "code",
2238
2265
  password: sCode
2239
- }, storeSession);
2266
+ });
2240
2267
  }
2241
2268
  });
2242
2269
  return function () {
@@ -2255,22 +2282,11 @@ var LoginForm = function LoginForm(_ref) {
2255
2282
  var handleSubmit = function handleSubmit(event) {
2256
2283
  try {
2257
2284
  event.preventDefault();
2258
- return Promise.resolve(sessionStore.authorize({
2259
- scope: scope,
2285
+ void authorizeUser({
2260
2286
  username: username,
2261
2287
  password: password
2262
- }, storeSession)).then(function (session) {
2263
- if (session) {
2264
- if (onSuccess && typeof onSuccess === "function") {
2265
- onSuccess(session);
2266
- }
2267
-
2268
- setPassword("");
2269
- navigate(redirectPath);
2270
- } else if (onFailure && typeof onFailure === "function") {
2271
- onFailure();
2272
- }
2273
2288
  });
2289
+ return Promise.resolve();
2274
2290
  } catch (e) {
2275
2291
  return Promise.reject(e);
2276
2292
  }
@@ -3104,10 +3120,12 @@ var Header$1 = mobxReactLite.observer(Header);
3104
3120
  var Container = function Container(_ref) {
3105
3121
  var children = _ref.children,
3106
3122
  headerProps = _ref.headerProps,
3123
+ styles = _ref.styles,
3107
3124
  dataTestID = _ref["data-testid"];
3108
3125
  return /*#__PURE__*/React__default.createElement(Box, {
3109
3126
  display: "flex",
3110
3127
  flexDirection: "column",
3128
+ sx: styles,
3111
3129
  "data-testid": dataTestID || "ac-sdk-container"
3112
3130
  }, /*#__PURE__*/React__default.createElement(Header$1, headerProps), children);
3113
3131
  };
@@ -3133,12 +3151,15 @@ Container.propTypes = {
3133
3151
  styles: propTypes.PropTypes.any
3134
3152
  }),
3135
3153
  styles: propTypes.PropTypes.any
3136
- })
3154
+ }),
3155
+ styles: propTypes.PropTypes.any
3137
3156
  };
3138
3157
  Container.defaultProps = {
3139
3158
  headerProps: {}
3140
3159
  };
3141
3160
 
3161
+ var backdropPattern = "backdropPattern~bkGGEBvj.svg";
3162
+
3142
3163
  var FullscreenBackdrop = function FullscreenBackdrop() {
3143
3164
  return /*#__PURE__*/React__default.createElement("div", {
3144
3165
  style: {
@@ -3150,423 +3171,12 @@ var FullscreenBackdrop = function FullscreenBackdrop() {
3150
3171
  left: "0",
3151
3172
  width: "100%",
3152
3173
  height: "100%",
3153
- overflow: "hidden"
3174
+ overflow: "hidden",
3175
+ backgroundImage: "url(" + backdropPattern + ")",
3176
+ backgroundRepeat: "no-repeat",
3177
+ backgroundSize: "cover"
3154
3178
  }
3155
- }, /*#__PURE__*/React__default.createElement("svg", {
3156
- width: "1920",
3157
- height: "1080",
3158
- viewBox: "0 0 1920 1080",
3159
- fill: "none",
3160
- xmlns: "http://www.w3.org/2000/svg"
3161
- }, /*#__PURE__*/React__default.createElement("g", {
3162
- filter: "url(#filter0_d_2183_34073)"
3163
- }, /*#__PURE__*/React__default.createElement("path", {
3164
- d: "M0 0H1920V1080H0V0Z",
3165
- fill: "#1E1E1E"
3166
- })), /*#__PURE__*/React__default.createElement("mask", {
3167
- id: "mask0_2183_34073",
3168
- style: {
3169
- maskType: "alpha"
3170
- },
3171
- maskUnits: "userSpaceOnUse",
3172
- x: "0",
3173
- y: "0",
3174
- width: "1920",
3175
- height: "1080"
3176
- }, /*#__PURE__*/React__default.createElement("rect", {
3177
- width: "1920",
3178
- height: "1080",
3179
- fill: "#1E1E1E"
3180
- })), /*#__PURE__*/React__default.createElement("g", {
3181
- mask: "url(#mask0_2183_34073)"
3182
- }, /*#__PURE__*/React__default.createElement("path", {
3183
- d: "M948.46 -0.00012207L931.49 -0.00012207L0 931.49L0 948.46L948.46 -0.00012207Z",
3184
- fill: "black",
3185
- fillOpacity: "0.1"
3186
- }), /*#__PURE__*/React__default.createElement("path", {
3187
- d: "M914.52 -0.00012207L897.54 -0.00012207L0 897.54L0 914.52L914.52 -0.00012207Z",
3188
- fill: "black",
3189
- fillOpacity: "0.1"
3190
- }), /*#__PURE__*/React__default.createElement("path", {
3191
- d: "M880.58 -0.00012207L863.6 -0.00012207L0 863.6L0 880.58L880.58 -0.00012207Z",
3192
- fill: "black",
3193
- fillOpacity: "0.1"
3194
- }), /*#__PURE__*/React__default.createElement("path", {
3195
- d: "M1016.34 -0.00012207L999.37 -0.00012207L0 999.37L0 1016.34L1016.34 -0.00012207Z",
3196
- fill: "black",
3197
- fillOpacity: "0.1"
3198
- }), /*#__PURE__*/React__default.createElement("path", {
3199
- d: "M982.4 -0.00012207L965.43 -0.00012207L0 965.43L0 982.4L982.4 -0.00012207Z",
3200
- fill: "black",
3201
- fillOpacity: "0.1"
3202
- }), /*#__PURE__*/React__default.createElement("path", {
3203
- d: "M846.63 -0.00012207L829.66 -0.00012207L0 829.66L0 846.63L846.63 -0.00012207Z",
3204
- fill: "black",
3205
- fillOpacity: "0.1"
3206
- }), /*#__PURE__*/React__default.createElement("path", {
3207
- d: "M778.75 -0.00012207L761.78 -0.00012207L0 761.78L0 778.75L778.75 -0.00012207Z",
3208
- fill: "black",
3209
- fillOpacity: "0.1"
3210
- }), /*#__PURE__*/React__default.createElement("path", {
3211
- d: "M1050.28 -0.00012207L1033.31 -0.00012207L0 1033.31L0 1050.28L1050.28 -0.00012207Z",
3212
- fill: "black",
3213
- fillOpacity: "0.1"
3214
- }), /*#__PURE__*/React__default.createElement("path", {
3215
- d: "M812.69 -0.00012207L795.72 -0.00012207L0 795.72L0 812.69L812.69 -0.00012207Z",
3216
- fill: "black",
3217
- fillOpacity: "0.1"
3218
- }), /*#__PURE__*/React__default.createElement("path", {
3219
- d: "M744.81 -0.00012207L727.84 -0.00012207L0 727.84L0 744.81L744.81 -0.00012207Z",
3220
- fill: "black",
3221
- fillOpacity: "0.1"
3222
- }), /*#__PURE__*/React__default.createElement("path", {
3223
- d: "M1457.57 -0.00012207L1440.6 -0.00012207L360.602 1080H377.572L1457.57 -0.00012207Z",
3224
- fill: "black",
3225
- fillOpacity: "0.1"
3226
- }), /*#__PURE__*/React__default.createElement("path", {
3227
- d: "M1389.69 -0.00012207L1372.72 -0.00012207L292.719 1080H309.689L1389.69 -0.00012207Z",
3228
- fill: "black",
3229
- fillOpacity: "0.1"
3230
- }), /*#__PURE__*/React__default.createElement("path", {
3231
- d: "M1321.81 -0.00012207L1304.84 -0.00012207L224.84 1080H241.81L1321.81 -0.00012207Z",
3232
- fill: "black",
3233
- fillOpacity: "0.1"
3234
- }), /*#__PURE__*/React__default.createElement("path", {
3235
- d: "M1355.75 -0.00012207L1338.78 -0.00012207L258.781 1080H275.751L1355.75 -0.00012207Z",
3236
- fill: "black",
3237
- fillOpacity: "0.1"
3238
- }), /*#__PURE__*/React__default.createElement("path", {
3239
- d: "M710.87 -0.00012207L693.9 -0.00012207L0 693.9L0 710.87L710.87 -0.00012207Z",
3240
- fill: "black",
3241
- fillOpacity: "0.1"
3242
- }), /*#__PURE__*/React__default.createElement("path", {
3243
- d: "M1423.63 -0.00012207L1406.66 -0.00012207L326.66 1080H343.63L1423.63 -0.00012207Z",
3244
- fill: "black",
3245
- fillOpacity: "0.1"
3246
- }), /*#__PURE__*/React__default.createElement("path", {
3247
- d: "M1152.1 -0.00012207L1135.13 -0.00012207L55.1289 1080H72.0989L1152.1 -0.00012207Z",
3248
- fill: "black",
3249
- fillOpacity: "0.1"
3250
- }), /*#__PURE__*/React__default.createElement("path", {
3251
- d: "M1118.16 -0.00012207L1101.19 -0.00012207L21.1914 1080H38.1614L1118.16 -0.00012207Z",
3252
- fill: "black",
3253
- fillOpacity: "0.1"
3254
- }), /*#__PURE__*/React__default.createElement("path", {
3255
- d: "M1186.04 -0.00012207L1169.07 -0.00012207L89.0703 1080H106.04L1186.04 -0.00012207Z",
3256
- fill: "black",
3257
- fillOpacity: "0.1"
3258
- }), /*#__PURE__*/React__default.createElement("path", {
3259
- d: "M1253.93 -0.00012207L1236.96 -0.00012207L156.961 1080H173.931L1253.93 -0.00012207Z",
3260
- fill: "black",
3261
- fillOpacity: "0.1"
3262
- }), /*#__PURE__*/React__default.createElement("path", {
3263
- d: "M1219.99 -0.00012207L1203.02 -0.00012207L123.02 1080H139.99L1219.99 -0.00012207Z",
3264
- fill: "black",
3265
- fillOpacity: "0.1"
3266
- }), /*#__PURE__*/React__default.createElement("path", {
3267
- d: "M1287.87 -0.00012207L1270.9 -0.00012207L190.898 1080H207.868L1287.87 -0.00012207Z",
3268
- fill: "black",
3269
- fillOpacity: "0.1"
3270
- }), /*#__PURE__*/React__default.createElement("path", {
3271
- d: "M439.34 -0.00012207L422.37 -0.00012207L0 422.37L0 439.34L439.34 -0.00012207Z",
3272
- fill: "black",
3273
- fillOpacity: "0.1"
3274
- }), /*#__PURE__*/React__default.createElement("path", {
3275
- d: "M167.81 -0.00012207L150.84 -0.00012207L0 150.84L0 167.81L167.81 -0.00012207Z",
3276
- fill: "black",
3277
- fillOpacity: "0.1"
3278
- }), /*#__PURE__*/React__default.createElement("path", {
3279
- d: "M201.75 -0.00012207L184.78 -0.00012207L0 184.78L0 201.75L201.75 -0.00012207Z",
3280
- fill: "black",
3281
- fillOpacity: "0.1"
3282
- }), /*#__PURE__*/React__default.createElement("path", {
3283
- d: "M133.87 -0.00012207L116.9 -0.00012207L0 116.9L0 133.87L133.87 -0.00012207Z",
3284
- fill: "black",
3285
- fillOpacity: "0.1"
3286
- }), /*#__PURE__*/React__default.createElement("path", {
3287
- d: "M235.69 -0.00012207L218.72 -0.00012207L0 218.72L0 235.69L235.69 -0.00012207Z",
3288
- fill: "black",
3289
- fillOpacity: "0.1"
3290
- }), /*#__PURE__*/React__default.createElement("path", {
3291
- d: "M269.63 -0.00012207L252.66 -0.00012207L0 252.66L0 269.63L269.63 -0.00012207Z",
3292
- fill: "black",
3293
- fillOpacity: "0.1"
3294
- }), /*#__PURE__*/React__default.createElement("path", {
3295
- d: "M1067.25 -0.00012207L0 1067.25L0 1080H4.22L1084.22 -0.00012207L1067.25 -0.00012207Z",
3296
- fill: "black",
3297
- fillOpacity: "0.1"
3298
- }), /*#__PURE__*/React__default.createElement("path", {
3299
- d: "M303.57 -0.00012207L286.61 -0.00012207L0 286.61L0 303.57L303.57 -0.00012207Z",
3300
- fill: "black",
3301
- fillOpacity: "0.1"
3302
- }), /*#__PURE__*/React__default.createElement("path", {
3303
- d: "M32.05 -0.00012207L15.08 -0.00012207L0 15.0799L0 32.0499L32.05 -0.00012207Z",
3304
- fill: "black",
3305
- fillOpacity: "0.1"
3306
- }), /*#__PURE__*/React__default.createElement("path", {
3307
- d: "M65.99 -0.00012207L49.02 -0.00012207L0 49.0199L0 65.9899L65.99 -0.00012207Z",
3308
- fill: "black",
3309
- fillOpacity: "0.1"
3310
- }), /*#__PURE__*/React__default.createElement("path", {
3311
- d: "M99.93 -0.00012207L82.96 -0.00012207L0 82.9599L0 99.9299L99.93 -0.00012207Z",
3312
- fill: "black",
3313
- fillOpacity: "0.1"
3314
- }), /*#__PURE__*/React__default.createElement("path", {
3315
- d: "M1491.52 -0.00012207L1474.54 -0.00012207L394.539 1080H411.509L1491.52 -0.00012207Z",
3316
- fill: "black",
3317
- fillOpacity: "0.1"
3318
- }), /*#__PURE__*/React__default.createElement("path", {
3319
- d: "M575.1 -0.00012207L558.13 -0.00012207L0 558.13L0 575.1L575.1 -0.00012207Z",
3320
- fill: "black",
3321
- fillOpacity: "0.1"
3322
- }), /*#__PURE__*/React__default.createElement("path", {
3323
- d: "M507.22 -0.00012207L490.25 -0.00012207L0 490.25L0 507.22L507.22 -0.00012207Z",
3324
- fill: "black",
3325
- fillOpacity: "0.1"
3326
- }), /*#__PURE__*/React__default.createElement("path", {
3327
- d: "M337.52 -0.00012207L320.55 -0.00012207L0 320.55L0 337.52L337.52 -0.00012207Z",
3328
- fill: "black",
3329
- fillOpacity: "0.1"
3330
- }), /*#__PURE__*/React__default.createElement("path", {
3331
- d: "M642.99 -0.00012207L626.02 -0.00012207L0 626.02L0 642.99L642.99 -0.00012207Z",
3332
- fill: "black",
3333
- fillOpacity: "0.1"
3334
- }), /*#__PURE__*/React__default.createElement("path", {
3335
- d: "M609.04 -0.00012207L592.08 -0.00012207L0 592.08L0 609.04L609.04 -0.00012207Z",
3336
- fill: "black",
3337
- fillOpacity: "0.1"
3338
- }), /*#__PURE__*/React__default.createElement("path", {
3339
- d: "M541.16 -0.00012207L524.19 -0.00012207L0 524.19L0 541.16L541.16 -0.00012207Z",
3340
- fill: "black",
3341
- fillOpacity: "0.1"
3342
- }), /*#__PURE__*/React__default.createElement("path", {
3343
- d: "M473.28 -0.00012207L456.31 -0.00012207L0 456.31L0 473.28L473.28 -0.00012207Z",
3344
- fill: "black",
3345
- fillOpacity: "0.1"
3346
- }), /*#__PURE__*/React__default.createElement("path", {
3347
- d: "M371.46 -0.00012207L354.49 -0.00012207L0 354.49L0 371.46L371.46 -0.00012207Z",
3348
- fill: "black",
3349
- fillOpacity: "0.1"
3350
- }), /*#__PURE__*/React__default.createElement("path", {
3351
- d: "M405.4 -0.00012207L388.43 -0.00012207L0 388.43L0 405.4L405.4 -0.00012207Z",
3352
- fill: "black",
3353
- fillOpacity: "0.1"
3354
- }), /*#__PURE__*/React__default.createElement("path", {
3355
- d: "M676.93 -0.00012207L659.96 -0.00012207L0 659.96L0 676.93L676.93 -0.00012207Z",
3356
- fill: "black",
3357
- fillOpacity: "0.1"
3358
- }), /*#__PURE__*/React__default.createElement("path", {
3359
- d: "M1920 420.04V403.07L1243.07 1080H1260.04L1920 420.04Z",
3360
- fill: "black",
3361
- fillOpacity: "0.1"
3362
- }), /*#__PURE__*/React__default.createElement("path", {
3363
- d: "M1920 352.16V335.19L1175.19 1080H1192.16L1920 352.16Z",
3364
- fill: "black",
3365
- fillOpacity: "0.1"
3366
- }), /*#__PURE__*/React__default.createElement("path", {
3367
- d: "M1920 589.75V572.78L1412.78 1080H1429.75L1920 589.75Z",
3368
- fill: "black",
3369
- fillOpacity: "0.1"
3370
- }), /*#__PURE__*/React__default.createElement("path", {
3371
- d: "M1920 623.69V606.72L1446.72 1080H1463.69L1920 623.69Z",
3372
- fill: "black",
3373
- fillOpacity: "0.1"
3374
- }), /*#__PURE__*/React__default.createElement("path", {
3375
- d: "M1920 691.57V674.6L1514.6 1080H1531.57L1920 691.57Z",
3376
- fill: "black",
3377
- fillOpacity: "0.1"
3378
- }), /*#__PURE__*/React__default.createElement("path", {
3379
- d: "M1920 657.63V640.66L1480.66 1080H1497.63L1920 657.63Z",
3380
- fill: "black",
3381
- fillOpacity: "0.1"
3382
- }), /*#__PURE__*/React__default.createElement("path", {
3383
- d: "M1920 386.1V369.13L1209.13 1080H1226.1L1920 386.1Z",
3384
- fill: "black",
3385
- fillOpacity: "0.1"
3386
- }), /*#__PURE__*/React__default.createElement("path", {
3387
- d: "M1920 453.98V437.01L1277.01 1080H1293.98L1920 453.98Z",
3388
- fill: "black",
3389
- fillOpacity: "0.1"
3390
- }), /*#__PURE__*/React__default.createElement("path", {
3391
- d: "M1920 521.87V504.9L1344.9 1080H1361.87L1920 521.87Z",
3392
- fill: "black",
3393
- fillOpacity: "0.1"
3394
- }), /*#__PURE__*/React__default.createElement("path", {
3395
- d: "M1920 725.51V708.54L1548.54 1080H1565.51L1920 725.51Z",
3396
- fill: "black",
3397
- fillOpacity: "0.1"
3398
- }), /*#__PURE__*/React__default.createElement("path", {
3399
- d: "M1920 487.93V470.95L1310.95 1080H1327.92L1920 487.93Z",
3400
- fill: "black",
3401
- fillOpacity: "0.1"
3402
- }), /*#__PURE__*/React__default.createElement("path", {
3403
- d: "M1920 555.81V538.84L1378.84 1080H1395.81L1920 555.81Z",
3404
- fill: "black",
3405
- fillOpacity: "0.1"
3406
- }), /*#__PURE__*/React__default.createElement("path", {
3407
- d: "M1920 963.1V946.13L1786.13 1080H1803.1L1920 963.1Z",
3408
- fill: "black",
3409
- fillOpacity: "0.1"
3410
- }), /*#__PURE__*/React__default.createElement("path", {
3411
- d: "M1920 929.16V912.19L1752.19 1080H1769.16L1920 929.16Z",
3412
- fill: "black",
3413
- fillOpacity: "0.1"
3414
- }), /*#__PURE__*/React__default.createElement("path", {
3415
- d: "M1920 997.04V980.07L1820.07 1080H1837.04L1920 997.04Z",
3416
- fill: "black",
3417
- fillOpacity: "0.1"
3418
- }), /*#__PURE__*/React__default.createElement("path", {
3419
- d: "M1920 759.45V742.48L1582.48 1080H1599.45L1920 759.45Z",
3420
- fill: "black",
3421
- fillOpacity: "0.1"
3422
- }), /*#__PURE__*/React__default.createElement("path", {
3423
- d: "M1920 1064.92V1047.95L1887.95 1080H1904.92L1920 1064.92Z",
3424
- fill: "black",
3425
- fillOpacity: "0.1"
3426
- }), /*#__PURE__*/React__default.createElement("path", {
3427
- d: "M1920 1030.98V1014.01L1854.01 1080H1870.98L1920 1030.98Z",
3428
- fill: "black",
3429
- fillOpacity: "0.1"
3430
- }), /*#__PURE__*/React__default.createElement("path", {
3431
- d: "M1920 793.39V776.42L1616.42 1080H1633.39L1920 793.39Z",
3432
- fill: "black",
3433
- fillOpacity: "0.1"
3434
- }), /*#__PURE__*/React__default.createElement("path", {
3435
- d: "M1920 827.34V810.37L1650.37 1080H1667.34L1920 827.34Z",
3436
- fill: "black",
3437
- fillOpacity: "0.1"
3438
- }), /*#__PURE__*/React__default.createElement("path", {
3439
- d: "M1920 861.28V844.31L1684.31 1080H1701.28L1920 861.28Z",
3440
- fill: "black",
3441
- fillOpacity: "0.1"
3442
- }), /*#__PURE__*/React__default.createElement("path", {
3443
- d: "M1920 895.22V878.25L1718.25 1080H1735.22L1920 895.22Z",
3444
- fill: "black",
3445
- fillOpacity: "0.1"
3446
- }), /*#__PURE__*/React__default.createElement("path", {
3447
- d: "M1920 318.22V301.25L1141.25 1080H1158.22L1920 318.22Z",
3448
- fill: "black",
3449
- fillOpacity: "0.1"
3450
- }), /*#__PURE__*/React__default.createElement("path", {
3451
- d: "M1729.1 -0.00012207L1712.13 -0.00012207L632.129 1080H649.099L1729.1 -0.00012207Z",
3452
- fill: "black",
3453
- fillOpacity: "0.1"
3454
- }), /*#__PURE__*/React__default.createElement("path", {
3455
- d: "M1763.04 -0.00012207L1746.07 -0.00012207L666.07 1080H683.04L1763.04 -0.00012207Z",
3456
- fill: "black",
3457
- fillOpacity: "0.1"
3458
- }), /*#__PURE__*/React__default.createElement("path", {
3459
- d: "M1830.93 -0.00012207L1813.96 -0.00012207L733.961 1080H750.931L1830.93 -0.00012207Z",
3460
- fill: "black",
3461
- fillOpacity: "0.1"
3462
- }), /*#__PURE__*/React__default.createElement("path", {
3463
- d: "M1796.98 -0.00012207L1780.01 -0.00012207L700.012 1080H716.992L1796.98 -0.00012207Z",
3464
- fill: "black",
3465
- fillOpacity: "0.1"
3466
- }), /*#__PURE__*/React__default.createElement("path", {
3467
- d: "M1864.87 -0.00012207L1847.9 -0.00012207L767.898 1080H784.868L1864.87 -0.00012207Z",
3468
- fill: "black",
3469
- fillOpacity: "0.1"
3470
- }), /*#__PURE__*/React__default.createElement("path", {
3471
- d: "M1695.16 -0.00012207L1678.19 -0.00012207L598.191 1080H615.161L1695.16 -0.00012207Z",
3472
- fill: "black",
3473
- fillOpacity: "0.1"
3474
- }), /*#__PURE__*/React__default.createElement("path", {
3475
- d: "M1593.34 -0.00012207L1576.37 -0.00012207L496.371 1080H513.341L1593.34 -0.00012207Z",
3476
- fill: "black",
3477
- fillOpacity: "0.1"
3478
- }), /*#__PURE__*/React__default.createElement("path", {
3479
- d: "M1559.4 -0.00012207L1542.43 -0.00012207L462.43 1080H479.4L1559.4 -0.00012207Z",
3480
- fill: "black",
3481
- fillOpacity: "0.1"
3482
- }), /*#__PURE__*/React__default.createElement("path", {
3483
- d: "M1661.22 -0.00012207L1644.25 -0.00012207L564.25 1080H581.22L1661.22 -0.00012207Z",
3484
- fill: "black",
3485
- fillOpacity: "0.1"
3486
- }), /*#__PURE__*/React__default.createElement("path", {
3487
- d: "M1627.28 -0.00012207L1610.31 -0.00012207L530.309 1080H547.279L1627.28 -0.00012207Z",
3488
- fill: "black",
3489
- fillOpacity: "0.1"
3490
- }), /*#__PURE__*/React__default.createElement("path", {
3491
- d: "M1920 46.6898V29.7198L869.719 1080H886.689L1920 46.6898Z",
3492
- fill: "black",
3493
- fillOpacity: "0.1"
3494
- }), /*#__PURE__*/React__default.createElement("path", {
3495
- d: "M1920 216.4V199.43L1039.42 1080H1056.4L1920 216.4Z",
3496
- fill: "black",
3497
- fillOpacity: "0.1"
3498
- }), /*#__PURE__*/React__default.createElement("path", {
3499
- d: "M1920 182.46V165.48L1005.48 1080H1022.46L1920 182.46Z",
3500
- fill: "black",
3501
- fillOpacity: "0.1"
3502
- }), /*#__PURE__*/React__default.createElement("path", {
3503
- d: "M1920 250.34V233.37L1073.37 1080H1090.34L1920 250.34Z",
3504
- fill: "black",
3505
- fillOpacity: "0.1"
3506
- }), /*#__PURE__*/React__default.createElement("path", {
3507
- d: "M1920 148.51V131.54L971.539 1080H988.509L1920 148.51Z",
3508
- fill: "black",
3509
- fillOpacity: "0.1"
3510
- }), /*#__PURE__*/React__default.createElement("path", {
3511
- d: "M1898.81 -0.00012207L1881.84 -0.00012207L801.84 1080H818.81L1898.81 -0.00012207Z",
3512
- fill: "black",
3513
- fillOpacity: "0.1"
3514
- }), /*#__PURE__*/React__default.createElement("path", {
3515
- d: "M1920 284.28V267.31L1107.31 1080H1124.28L1920 284.28Z",
3516
- fill: "black",
3517
- fillOpacity: "0.1"
3518
- }), /*#__PURE__*/React__default.createElement("path", {
3519
- d: "M1525.46 -0.00012207L1508.48 -0.00012207L428.488 1080H445.458L1525.46 -0.00012207Z",
3520
- fill: "black",
3521
- fillOpacity: "0.1"
3522
- }), /*#__PURE__*/React__default.createElement("path", {
3523
- d: "M1920 12.7499V-0.00012207L1915.78 -0.00012207L835.781 1080H852.751L1920 12.7499Z",
3524
- fill: "black",
3525
- fillOpacity: "0.1"
3526
- }), /*#__PURE__*/React__default.createElement("path", {
3527
- d: "M1920 80.6299V63.6599L903.66 1080H920.63L1920 80.6299Z",
3528
- fill: "black",
3529
- fillOpacity: "0.1"
3530
- }), /*#__PURE__*/React__default.createElement("path", {
3531
- d: "M1920 114.57V97.5999L937.602 1080H954.572L1920 114.57Z",
3532
- fill: "black",
3533
- fillOpacity: "0.1"
3534
- })), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("filter", {
3535
- id: "filter0_d_2183_34073",
3536
- x: "-60",
3537
- y: "-64",
3538
- width: "2048",
3539
- height: "1208",
3540
- filterUnits: "userSpaceOnUse",
3541
- colorInterpolationFilters: "sRGB"
3542
- }, /*#__PURE__*/React__default.createElement("feFlood", {
3543
- floodOpacity: "0",
3544
- result: "BackgroundImageFix"
3545
- }), /*#__PURE__*/React__default.createElement("feColorMatrix", {
3546
- in: "SourceAlpha",
3547
- type: "matrix",
3548
- values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
3549
- result: "hardAlpha"
3550
- }), /*#__PURE__*/React__default.createElement("feOffset", {
3551
- dx: "4"
3552
- }), /*#__PURE__*/React__default.createElement("feGaussianBlur", {
3553
- stdDeviation: "32"
3554
- }), /*#__PURE__*/React__default.createElement("feComposite", {
3555
- in2: "hardAlpha",
3556
- operator: "out"
3557
- }), /*#__PURE__*/React__default.createElement("feColorMatrix", {
3558
- type: "matrix",
3559
- values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.28 0"
3560
- }), /*#__PURE__*/React__default.createElement("feBlend", {
3561
- mode: "normal",
3562
- in2: "BackgroundImageFix",
3563
- result: "effect1_dropShadow_2183_34073"
3564
- }), /*#__PURE__*/React__default.createElement("feBlend", {
3565
- mode: "normal",
3566
- in: "SourceGraphic",
3567
- in2: "effect1_dropShadow_2183_34073",
3568
- result: "shape"
3569
- })))));
3179
+ });
3570
3180
  };
3571
3181
 
3572
3182
  var LoginPage = function LoginPage(_ref) {
@@ -3647,7 +3257,8 @@ var Router = function Router(_ref) {
3647
3257
  })));
3648
3258
  };
3649
3259
 
3650
- var NetworkError = function NetworkError() {
3260
+ var NetworkError = function NetworkError(_ref) {
3261
+ var message = _ref.message;
3651
3262
  return /*#__PURE__*/React__default.createElement(material.Box, null, /*#__PURE__*/React__default.createElement(FullscreenBackdrop, null), /*#__PURE__*/React__default.createElement(material.Card, {
3652
3263
  style: {
3653
3264
  backgroundColor: "inherit",
@@ -3655,8 +3266,13 @@ var NetworkError = function NetworkError() {
3655
3266
  maxWidth: "600px",
3656
3267
  margin: "200px auto"
3657
3268
  }
3658
- }, /*#__PURE__*/React__default.createElement(material.CardContent, null, /*#__PURE__*/React__default.createElement(material.Box, {
3269
+ }, /*#__PURE__*/React__default.createElement(material.CardContent, {
3270
+ style: {
3271
+ minHeight: "unset"
3272
+ }
3273
+ }, /*#__PURE__*/React__default.createElement(material.Box, {
3659
3274
  display: "flex",
3275
+ flexDirection: "column",
3660
3276
  alignItems: "center",
3661
3277
  justifyContent: "center",
3662
3278
  m: "125px 80px"
@@ -3666,7 +3282,13 @@ var NetworkError = function NetworkError() {
3666
3282
  color: "rgba(255, 255, 255, 0.6)",
3667
3283
  fontFamily: "Roboto"
3668
3284
  }
3669
- }, languageStore.translations.networkErrorHeader)))));
3285
+ }, languageStore.translations.networkErrorHeader), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("p", {
3286
+ style: {
3287
+ textAlign: "center",
3288
+ color: "rgba(255, 255, 255, 0.6)",
3289
+ fontFamily: "Roboto"
3290
+ }
3291
+ }, message)))));
3670
3292
  };
3671
3293
 
3672
3294
  var App = mobxReactLite.observer(function (_ref) {
@@ -3747,8 +3369,19 @@ App.defaultProps = {
3747
3369
  muiTheme: defaultTheme
3748
3370
  };
3749
3371
 
3750
- var getLoginStatus = function getLoginStatus() {
3751
- return sessionStore.getLoginStatus();
3372
+ var useLoginStatus = function useLoginStatus() {
3373
+ var _useState = React.useState(sessionStore.loginStatus),
3374
+ loginStatus = _useState[0],
3375
+ setLoginStatus = _useState[1];
3376
+
3377
+ React.useEffect(function () {
3378
+ return mobx.reaction(function () {
3379
+ return mobx.toJS(sessionStore.loginStatus);
3380
+ }, function () {
3381
+ setLoginStatus(sessionStore.loginStatus);
3382
+ });
3383
+ }, []);
3384
+ return loginStatus;
3752
3385
  };
3753
3386
 
3754
3387
  var logout = function logout() {
@@ -3761,9 +3394,9 @@ var setLocale = function setLocale(locale) {
3761
3394
 
3762
3395
  exports.App = App;
3763
3396
  exports.Container = Container;
3764
- exports.getLoginStatus = getLoginStatus;
3765
3397
  exports.logout = logout;
3766
3398
  exports.notify = toast;
3767
3399
  exports.setLocale = setLocale;
3768
3400
  exports.useLogin = useLogin;
3401
+ exports.useLoginStatus = useLoginStatus;
3769
3402
  //# sourceMappingURL=andoncloud-sdk.js.map