andoncloud-sdk 1.2.0 → 1.2.1

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.
@@ -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-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,o=(e,t)=>{let r,l="",a="",n="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?o(s,c):c+"{"+o(s,"k"==c[1]?"":t)+"}":o(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=o.p?o.p(c,s):c+":"+s+";");}return n[0]?(r=t?t+"{"+n+"}":n,l+r+a):l+a},n={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=n[p]||(n[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!n[u]){let t="object"==typeof 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]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);n[u]=o(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(n[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):e;}return e+l+(null==n?"":n)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d,g=p.bind({g:1}),b=p.bind({k:1});function h(e,t,r,l){o.p=t,u=e,f=r,d=l;}function j(e,t){let r=this||{};return function(){let l=arguments;function a(o,n){let c=Object.assign({},o),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=n);let i=c.as||e;return delete c.as,d&&i[0]&&d(c),u(i,c)}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=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) {
@@ -470,7 +470,7 @@ function _templateObject() {
470
470
  var circleAnimation = /*#__PURE__*/b( /*#__PURE__*/_templateObject());
471
471
  var firstLineAnimation = /*#__PURE__*/b( /*#__PURE__*/_templateObject2());
472
472
  var secondLineAnimation = /*#__PURE__*/b( /*#__PURE__*/_templateObject3());
473
- var ErrorIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject4(), function (p) {
473
+ var ErrorIcon = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject4(), function (p) {
474
474
  return p.primary || '#ff4b4b';
475
475
  }, circleAnimation, firstLineAnimation, function (p) {
476
476
  return p.secondary || '#fff';
@@ -496,7 +496,7 @@ function _templateObject$1() {
496
496
  return data;
497
497
  }
498
498
  var rotate = /*#__PURE__*/b( /*#__PURE__*/_templateObject$1());
499
- var LoaderIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$1(), function (p) {
499
+ var LoaderIcon = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject2$1(), function (p) {
500
500
  return p.secondary || '#e0e0e0';
501
501
  }, function (p) {
502
502
  return p.primary || '#616161';
@@ -533,7 +533,7 @@ function _templateObject$2() {
533
533
  }
534
534
  var circleAnimation$1 = /*#__PURE__*/b( /*#__PURE__*/_templateObject$2());
535
535
  var checkmarkAnimation = /*#__PURE__*/b( /*#__PURE__*/_templateObject2$2());
536
- var CheckmarkIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject3$1(), function (p) {
536
+ var CheckmarkIcon = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject3$1(), function (p) {
537
537
  return p.primary || '#61d345';
538
538
  }, circleAnimation$1, checkmarkAnimation, function (p) {
539
539
  return p.secondary || '#fff';
@@ -578,10 +578,10 @@ function _templateObject$3() {
578
578
 
579
579
  return data;
580
580
  }
581
- var StatusWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject$3());
582
- var IndicatorWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$3());
581
+ var StatusWrapper = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject$3());
582
+ var IndicatorWrapper = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject2$3());
583
583
  var enter = /*#__PURE__*/b( /*#__PURE__*/_templateObject3$2());
584
- var AnimatedIconWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject4$1(), enter);
584
+ var AnimatedIconWrapper = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject4$1(), enter);
585
585
  var ToastIcon = function ToastIcon(_ref) {
586
586
  var toast = _ref.toast;
587
587
  var icon = toast.icon,
@@ -604,7 +604,7 @@ var ToastIcon = function ToastIcon(_ref) {
604
604
  };
605
605
 
606
606
  function _templateObject2$4() {
607
- var data = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n"]);
607
+ var data = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n"]);
608
608
 
609
609
  _templateObject2$4 = function _templateObject2() {
610
610
  return data;
@@ -633,8 +633,8 @@ var exitAnimation = function exitAnimation(factor) {
633
633
 
634
634
  var fadeInAnimation = "0%{opacity:0;} 100%{opacity:1;}";
635
635
  var fadeOutAnimation = "0%{opacity:1;} 100%{opacity:0;}";
636
- var ToastBarBase = /*#__PURE__*/j('div', React.forwardRef)( /*#__PURE__*/_templateObject$4());
637
- var Message = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$4());
636
+ var ToastBarBase = /*#__PURE__*/m('div', React.forwardRef)( /*#__PURE__*/_templateObject$4());
637
+ var Message = /*#__PURE__*/m('div')( /*#__PURE__*/_templateObject2$4());
638
638
 
639
639
  var getAnimationStyle = function getAnimationStyle(position, visible) {
640
640
  var top = position.includes('top');
@@ -703,7 +703,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
703
703
  }, verticalStyle, horizontalStyle);
704
704
  };
705
705
 
706
- var activeClass = /*#__PURE__*/p( /*#__PURE__*/_templateObject$5());
706
+ var activeClass = /*#__PURE__*/u( /*#__PURE__*/_templateObject$5());
707
707
  var DEFAULT_OFFSET = 16;
708
708
  var Toaster = function Toaster(_ref) {
709
709
  var reverseOrder = _ref.reverseOrder,
@@ -768,6 +768,9 @@ function _defineProperties(target, props) {
768
768
  function _createClass(Constructor, protoProps, staticProps) {
769
769
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
770
770
  if (staticProps) _defineProperties(Constructor, staticProps);
771
+ Object.defineProperty(Constructor, "prototype", {
772
+ writable: false
773
+ });
771
774
  return Constructor;
772
775
  }
773
776
 
@@ -966,158 +969,144 @@ function createCommonjsModule(fn, module) {
966
969
  }
967
970
 
968
971
  var js_cookie = createCommonjsModule(function (module, exports) {
969
- (function (factory) {
970
- var registeredInModuleLoader;
971
- {
972
- module.exports = factory();
973
- registeredInModuleLoader = true;
974
- }
975
- if (!registeredInModuleLoader) {
976
- var OldCookies = window.Cookies;
977
- var api = window.Cookies = factory();
978
- api.noConflict = function () {
979
- window.Cookies = OldCookies;
980
- return api;
981
- };
982
- }
983
- }(function () {
984
- function extend () {
985
- var i = 0;
986
- var result = {};
987
- for (; i < arguments.length; i++) {
988
- var attributes = arguments[ i ];
989
- for (var key in attributes) {
990
- result[key] = attributes[key];
991
- }
992
- }
993
- return result;
994
- }
995
-
996
- function decode (s) {
997
- return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
998
- }
999
-
1000
- function init (converter) {
1001
- function api() {}
1002
-
1003
- function set (key, value, attributes) {
1004
- if (typeof document === 'undefined') {
1005
- return;
1006
- }
1007
-
1008
- attributes = extend({
1009
- path: '/'
1010
- }, api.defaults, attributes);
1011
-
1012
- if (typeof attributes.expires === 'number') {
1013
- attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
1014
- }
1015
-
1016
- // We're using "expires" because "max-age" is not supported by IE
1017
- attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
972
+ (function (global, factory) {
973
+ module.exports = factory() ;
974
+ }(commonjsGlobal, (function () {
975
+ /* eslint-disable no-var */
976
+ function assign (target) {
977
+ for (var i = 1; i < arguments.length; i++) {
978
+ var source = arguments[i];
979
+ for (var key in source) {
980
+ target[key] = source[key];
981
+ }
982
+ }
983
+ return target
984
+ }
985
+ /* eslint-enable no-var */
1018
986
 
1019
- try {
1020
- var result = JSON.stringify(value);
1021
- if (/^[\{\[]/.test(result)) {
1022
- value = result;
1023
- }
1024
- } catch (e) {}
987
+ /* eslint-disable no-var */
988
+ var defaultConverter = {
989
+ read: function (value) {
990
+ if (value[0] === '"') {
991
+ value = value.slice(1, -1);
992
+ }
993
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
994
+ },
995
+ write: function (value) {
996
+ return encodeURIComponent(value).replace(
997
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
998
+ decodeURIComponent
999
+ )
1000
+ }
1001
+ };
1002
+ /* eslint-enable no-var */
1025
1003
 
1026
- value = converter.write ?
1027
- converter.write(value, key) :
1028
- encodeURIComponent(String(value))
1029
- .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
1004
+ /* eslint-disable no-var */
1030
1005
 
1031
- key = encodeURIComponent(String(key))
1032
- .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
1033
- .replace(/[\(\)]/g, escape);
1006
+ function init (converter, defaultAttributes) {
1007
+ function set (key, value, attributes) {
1008
+ if (typeof document === 'undefined') {
1009
+ return
1010
+ }
1034
1011
 
1035
- var stringifiedAttributes = '';
1036
- for (var attributeName in attributes) {
1037
- if (!attributes[attributeName]) {
1038
- continue;
1039
- }
1040
- stringifiedAttributes += '; ' + attributeName;
1041
- if (attributes[attributeName] === true) {
1042
- continue;
1043
- }
1012
+ attributes = assign({}, defaultAttributes, attributes);
1044
1013
 
1045
- // Considers RFC 6265 section 5.2:
1046
- // ...
1047
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
1048
- // character:
1049
- // Consume the characters of the unparsed-attributes up to,
1050
- // not including, the first %x3B (";") character.
1051
- // ...
1052
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
1053
- }
1014
+ if (typeof attributes.expires === 'number') {
1015
+ attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
1016
+ }
1017
+ if (attributes.expires) {
1018
+ attributes.expires = attributes.expires.toUTCString();
1019
+ }
1054
1020
 
1055
- return (document.cookie = key + '=' + value + stringifiedAttributes);
1056
- }
1021
+ key = encodeURIComponent(key)
1022
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
1023
+ .replace(/[()]/g, escape);
1057
1024
 
1058
- function get (key, json) {
1059
- if (typeof document === 'undefined') {
1060
- return;
1061
- }
1025
+ var stringifiedAttributes = '';
1026
+ for (var attributeName in attributes) {
1027
+ if (!attributes[attributeName]) {
1028
+ continue
1029
+ }
1062
1030
 
1063
- var jar = {};
1064
- // To prevent the for loop in the first place assign an empty array
1065
- // in case there are no cookies at all.
1066
- var cookies = document.cookie ? document.cookie.split('; ') : [];
1067
- var i = 0;
1031
+ stringifiedAttributes += '; ' + attributeName;
1068
1032
 
1069
- for (; i < cookies.length; i++) {
1070
- var parts = cookies[i].split('=');
1071
- var cookie = parts.slice(1).join('=');
1033
+ if (attributes[attributeName] === true) {
1034
+ continue
1035
+ }
1072
1036
 
1073
- if (!json && cookie.charAt(0) === '"') {
1074
- cookie = cookie.slice(1, -1);
1075
- }
1037
+ // Considers RFC 6265 section 5.2:
1038
+ // ...
1039
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
1040
+ // character:
1041
+ // Consume the characters of the unparsed-attributes up to,
1042
+ // not including, the first %x3B (";") character.
1043
+ // ...
1044
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
1045
+ }
1076
1046
 
1077
- try {
1078
- var name = decode(parts[0]);
1079
- cookie = (converter.read || converter)(cookie, name) ||
1080
- decode(cookie);
1047
+ return (document.cookie =
1048
+ key + '=' + converter.write(value, key) + stringifiedAttributes)
1049
+ }
1081
1050
 
1082
- if (json) {
1083
- try {
1084
- cookie = JSON.parse(cookie);
1085
- } catch (e) {}
1086
- }
1051
+ function get (key) {
1052
+ if (typeof document === 'undefined' || (arguments.length && !key)) {
1053
+ return
1054
+ }
1087
1055
 
1088
- jar[name] = cookie;
1056
+ // To prevent the for loop in the first place assign an empty array
1057
+ // in case there are no cookies at all.
1058
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
1059
+ var jar = {};
1060
+ for (var i = 0; i < cookies.length; i++) {
1061
+ var parts = cookies[i].split('=');
1062
+ var value = parts.slice(1).join('=');
1089
1063
 
1090
- if (key === name) {
1091
- break;
1092
- }
1093
- } catch (e) {}
1094
- }
1064
+ try {
1065
+ var foundKey = decodeURIComponent(parts[0]);
1066
+ jar[foundKey] = converter.read(value, foundKey);
1095
1067
 
1096
- return key ? jar[key] : jar;
1097
- }
1068
+ if (key === foundKey) {
1069
+ break
1070
+ }
1071
+ } catch (e) {}
1072
+ }
1098
1073
 
1099
- api.set = set;
1100
- api.get = function (key) {
1101
- return get(key, false /* read as raw */);
1102
- };
1103
- api.getJSON = function (key) {
1104
- return get(key, true /* read as json */);
1105
- };
1106
- api.remove = function (key, attributes) {
1107
- set(key, '', extend(attributes, {
1108
- expires: -1
1109
- }));
1110
- };
1074
+ return key ? jar[key] : jar
1075
+ }
1111
1076
 
1112
- api.defaults = {};
1077
+ return Object.create(
1078
+ {
1079
+ set: set,
1080
+ get: get,
1081
+ remove: function (key, attributes) {
1082
+ set(
1083
+ key,
1084
+ '',
1085
+ assign({}, attributes, {
1086
+ expires: -1
1087
+ })
1088
+ );
1089
+ },
1090
+ withAttributes: function (attributes) {
1091
+ return init(this.converter, assign({}, this.attributes, attributes))
1092
+ },
1093
+ withConverter: function (converter) {
1094
+ return init(assign({}, this.converter, converter), this.attributes)
1095
+ }
1096
+ },
1097
+ {
1098
+ attributes: { value: Object.freeze(defaultAttributes) },
1099
+ converter: { value: Object.freeze(converter) }
1100
+ }
1101
+ )
1102
+ }
1113
1103
 
1114
- api.withConverter = init;
1104
+ var api = init(defaultConverter, { path: '/' });
1105
+ /* eslint-enable no-var */
1115
1106
 
1116
- return api;
1117
- }
1107
+ return api;
1118
1108
 
1119
- return init(function () {});
1120
- }));
1109
+ })));
1121
1110
  });
1122
1111
 
1123
1112
  var CookiesManager = /*#__PURE__*/function () {
@@ -1254,8 +1243,6 @@ var SessionAPI = /*#__PURE__*/function () {
1254
1243
  var session;
1255
1244
  return Promise.resolve(acFetch(_this2.baseUrl + "/v2/oauth2/token", fetchParams).then(function (response) {
1256
1245
  try {
1257
- var _exit2 = false;
1258
-
1259
1246
  var _temp3 = function _temp3(_result) {
1260
1247
  if (_exit2) return _result;
1261
1248
  session = new Session();
@@ -1267,6 +1254,7 @@ var SessionAPI = /*#__PURE__*/function () {
1267
1254
  });
1268
1255
  };
1269
1256
 
1257
+ var _exit2 = false;
1270
1258
  var data;
1271
1259
 
1272
1260
  var _temp4 = _catch(function () {
@@ -3732,13 +3720,13 @@ var App = mobxReactLite.observer(function (_ref) {
3732
3720
  }, [authEnabled]);
3733
3721
  return /*#__PURE__*/React__default.createElement(styles.ThemeProvider, {
3734
3722
  theme: styles.createTheme(muiTheme)
3735
- }, /*#__PURE__*/React__default.createElement(CssBaseline, null), /*#__PURE__*/React__default.createElement(AuthConfigProvider, {
3723
+ }, /*#__PURE__*/React__default.createElement(CssBaseline, null), /*#__PURE__*/React__default.createElement(Toaster, null), /*#__PURE__*/React__default.createElement(AuthConfigProvider, {
3736
3724
  config: _extends$1({
3737
3725
  baseUrl: baseUrl
3738
3726
  }, authProps)
3739
3727
  }, sessionStore.networkError ? /*#__PURE__*/React__default.createElement(NetworkError, null) : appReady && /*#__PURE__*/React__default.createElement(Router, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
3740
3728
  path: "*",
3741
- element: /*#__PURE__*/React__default.createElement(useModalHook.ModalProvider, null, /*#__PURE__*/React__default.createElement(Toaster, null), children)
3729
+ element: /*#__PURE__*/React__default.createElement(useModalHook.ModalProvider, null, children)
3742
3730
  }))));
3743
3731
  });
3744
3732
  App.propTypes = {