@crystaldesign/diva-core 26.4.4-rc.0 → 26.4.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.
- package/build/esm/{ModalsWrapper-34782715.js → ModalsWrapper-9e35ffa4.js} +1 -4
- package/build/esm/{index-4a850619.js → index-87d98e32.js} +136 -243
- package/build/esm/{index-a8580005.js → index-dc13c706.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/types/core/src/elements/Modal/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Spinner/index.d.ts.map +1 -1
- package/build/types/core/src/store/ContentStore.d.ts +0 -1
- package/build/types/core/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/core/src/store/LoadingAndErrorStore.d.ts +1 -7
- package/build/types/core/src/store/LoadingAndErrorStore.d.ts.map +1 -1
- package/build/types/core/src/store/RootStore.d.ts +1 -1
- package/build/types/core/src/store/RootStore.d.ts.map +1 -1
- package/build/types/core/src/store/index.d.ts +2 -5
- package/build/types/core/src/store/index.d.ts.map +1 -1
- package/build/umd/858.diva-core.umd.min.js +1 -1
- package/build/umd/diva-core.umd.min.js +3 -3
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/types/core/src/elements/Spinner/StatusTexts.d.ts +0 -5
- package/build/types/core/src/elements/Spinner/StatusTexts.d.ts.map +0 -1
|
@@ -17,7 +17,7 @@ import ReactDOM from 'react-dom';
|
|
|
17
17
|
import React, { forwardRef, useState, useEffect, useCallback, Suspense, createContext, useMemo, useImperativeHandle, useRef } from 'react';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
20
|
-
import { makeAutoObservable, flow, flowResult, toJS, observable, computed, reaction, autorun, action,
|
|
20
|
+
import { makeAutoObservable, flow, flowResult, toJS, observable, computed, reaction, autorun, action, makeObservable, runInAction } from 'mobx';
|
|
21
21
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
22
22
|
import MobileDetect from 'mobile-detect';
|
|
23
23
|
import platform from 'platform';
|
|
@@ -45,7 +45,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
45
45
|
import * as Styles from '@mui/styles';
|
|
46
46
|
|
|
47
47
|
(function() {
|
|
48
|
-
const env = {"STAGE":"production","VERSION":"26.4.4
|
|
48
|
+
const env = {"STAGE":"production","VERSION":"26.4.4"};
|
|
49
49
|
try {
|
|
50
50
|
if (process) {
|
|
51
51
|
process.env = Object.assign({}, process.env);
|
|
@@ -602,7 +602,7 @@ function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
602
602
|
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
603
603
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
604
604
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
605
|
-
var LOG$
|
|
605
|
+
var LOG$e = getLogger('Framework', 'webcomponent');
|
|
606
606
|
var DivaFramework = /*#__PURE__*/function (_HTMLElement) {
|
|
607
607
|
function DivaFramework() {
|
|
608
608
|
var _this;
|
|
@@ -827,7 +827,7 @@ var CoreWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
827
827
|
return key.startsWith('Crystaldesign');
|
|
828
828
|
}).forEach(function (key) {
|
|
829
829
|
var _key2;
|
|
830
|
-
LOG$
|
|
830
|
+
LOG$e.debug('Loading UMD Component', key, window[key]);
|
|
831
831
|
var value = (_key2 = window[key]) === null || _key2 === void 0 ? void 0 : _key2["default"];
|
|
832
832
|
if (value !== null && value !== void 0 && value.name) {
|
|
833
833
|
available.push(value);
|
|
@@ -951,7 +951,7 @@ var defaultTheme = {
|
|
|
951
951
|
|
|
952
952
|
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
953
953
|
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
954
|
-
var LOG$
|
|
954
|
+
var LOG$d = getLogger('Framework', 'ConfigurationStore');
|
|
955
955
|
var ConfigurationStore = /*#__PURE__*/function () {
|
|
956
956
|
function ConfigurationStore(root, identifier, defaultApiConfig, domain) {
|
|
957
957
|
_classCallCheck(this, ConfigurationStore);
|
|
@@ -1288,17 +1288,17 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1288
1288
|
while (1) switch (_context.prev = _context.next) {
|
|
1289
1289
|
case 0:
|
|
1290
1290
|
identifier = _ref3.identifier, type = _ref3.type, domain = _ref3.domain, _ref3$organizationId = _ref3.organizationId, organizationId = _ref3$organizationId === void 0 ? this.root.dataStore.organizationId : _ref3$organizationId;
|
|
1291
|
-
LOG$
|
|
1291
|
+
LOG$d.debug("Fetching configuration for ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
|
|
1292
1292
|
configuration = this.configurationCache.get(type + identifier + organizationId);
|
|
1293
1293
|
if (!configuration) {
|
|
1294
1294
|
_context.next = 6;
|
|
1295
1295
|
break;
|
|
1296
1296
|
}
|
|
1297
|
-
LOG$
|
|
1297
|
+
LOG$d.debug("Found configuration in cache for ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
|
|
1298
1298
|
return _context.abrupt("return", configuration);
|
|
1299
1299
|
case 6:
|
|
1300
1300
|
_context.prev = 6;
|
|
1301
|
-
LOG$
|
|
1301
|
+
LOG$d.debug("Need to load configuration from service for ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
|
|
1302
1302
|
_context.next = 10;
|
|
1303
1303
|
return this.root.apiHandler.fetchConfiguration({
|
|
1304
1304
|
organizationId: organizationId,
|
|
@@ -1313,7 +1313,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1313
1313
|
case 13:
|
|
1314
1314
|
_context.prev = 13;
|
|
1315
1315
|
_context.t0 = _context["catch"](6);
|
|
1316
|
-
LOG$
|
|
1316
|
+
LOG$d.error(new DivaError('Error while fetching configuration', {
|
|
1317
1317
|
cause: _context.t0
|
|
1318
1318
|
}));
|
|
1319
1319
|
configuration = {};
|
|
@@ -1358,7 +1358,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1358
1358
|
case 31:
|
|
1359
1359
|
_context.prev = 31;
|
|
1360
1360
|
_context.t1 = _context["catch"](25);
|
|
1361
|
-
LOG$
|
|
1361
|
+
LOG$d.error(new DivaError("Error while fetching configuration for ".concat(subType), {
|
|
1362
1362
|
cause: _context.t1
|
|
1363
1363
|
}));
|
|
1364
1364
|
configuration["".concat(subType, "Settings")] = {};
|
|
@@ -1368,7 +1368,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1368
1368
|
break;
|
|
1369
1369
|
case 38:
|
|
1370
1370
|
this.configurationCache.set(type + identifier + organizationId, configuration);
|
|
1371
|
-
LOG$
|
|
1371
|
+
LOG$d.debug("Loaded configuration from service ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
|
|
1372
1372
|
return _context.abrupt("return", configuration);
|
|
1373
1373
|
case 41:
|
|
1374
1374
|
case "end":
|
|
@@ -1474,7 +1474,7 @@ function isIpadOS() {
|
|
|
1474
1474
|
|
|
1475
1475
|
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1476
1476
|
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1477
|
-
var LOG$
|
|
1477
|
+
var LOG$c = getLogger('Framework', 'DataStore');
|
|
1478
1478
|
var DataStore = /*#__PURE__*/function () {
|
|
1479
1479
|
function DataStore(root) {
|
|
1480
1480
|
_classCallCheck(this, DataStore);
|
|
@@ -1586,12 +1586,12 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1586
1586
|
set: function set(user) {
|
|
1587
1587
|
var _this$_user;
|
|
1588
1588
|
if (user !== null && user !== void 0 && user._id && user._id == ((_this$_user = this._user) === null || _this$_user === void 0 ? void 0 : _this$_user._id)) {
|
|
1589
|
-
LOG$
|
|
1589
|
+
LOG$c.debug('User did not change');
|
|
1590
1590
|
} else if (!user) {
|
|
1591
|
-
LOG$
|
|
1591
|
+
LOG$c.debug('User was removed');
|
|
1592
1592
|
} else if (user._id) {
|
|
1593
1593
|
var _this$_user2;
|
|
1594
|
-
LOG$
|
|
1594
|
+
LOG$c.debug("User changed from ".concat((_this$_user2 = this._user) === null || _this$_user2 === void 0 ? void 0 : _this$_user2._id, " to ").concat(user._id));
|
|
1595
1595
|
DivaUtils.businessMetrics.setUser(user._id, user.mainEmail, user.name + ' ' + user.familyName); //Obsolete
|
|
1596
1596
|
}
|
|
1597
1597
|
this._user = user;
|
|
@@ -1739,10 +1739,10 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1739
1739
|
_context4.next = 23;
|
|
1740
1740
|
break;
|
|
1741
1741
|
}
|
|
1742
|
-
LOG$
|
|
1742
|
+
LOG$c.debug("Found Session GUID in store for ".concat(sessionKey));
|
|
1743
1743
|
return _context4.abrupt("return", this._sessionGuids[sessionKey]);
|
|
1744
1744
|
case 23:
|
|
1745
|
-
LOG$
|
|
1745
|
+
LOG$c.debug("No Session GUID found in store for ".concat(sessionKey), toJS(this._sessionGuids));
|
|
1746
1746
|
url = api2Url + '?function=JsonLoginByAuthToken' + ('&UserRole=' + userRole) + ('&organizationId=' + organization) + ('&mode=' + (mode !== null && mode !== void 0 ? mode : this.root.loginMode));
|
|
1747
1747
|
_context4.next = 27;
|
|
1748
1748
|
return fetch(url, {
|
|
@@ -1769,7 +1769,7 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1769
1769
|
});
|
|
1770
1770
|
case 27:
|
|
1771
1771
|
res = _context4.sent;
|
|
1772
|
-
LOG$
|
|
1772
|
+
LOG$c.debug("Fetched new session GUID from api for ".concat(sessionKey));
|
|
1773
1773
|
this._sessionGuids[sessionKey] = res;
|
|
1774
1774
|
return _context4.abrupt("return", this._sessionGuids[sessionKey]);
|
|
1775
1775
|
case 31:
|
|
@@ -1833,11 +1833,11 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1833
1833
|
if (this.root.authorizationStore.loginState == 'user') {
|
|
1834
1834
|
this.root.browserStateStore.setStoredOrganization(organizationId);
|
|
1835
1835
|
}
|
|
1836
|
-
LOG$
|
|
1836
|
+
LOG$c.debug("Organization changed from ".concat(prevOrganization, " to ").concat(organizationId));
|
|
1837
1837
|
_context5.next = 19;
|
|
1838
1838
|
break;
|
|
1839
1839
|
case 18:
|
|
1840
|
-
LOG$
|
|
1840
|
+
LOG$c.debug("Organization did not change.");
|
|
1841
1841
|
case 19:
|
|
1842
1842
|
_context5.next = 24;
|
|
1843
1843
|
break;
|
|
@@ -1884,7 +1884,7 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1884
1884
|
_context6.prev = 10;
|
|
1885
1885
|
_context6.t0 = _context6["catch"](3);
|
|
1886
1886
|
this._organizationTree = DataStore.EMPTY_ORGANIZATION_TREE;
|
|
1887
|
-
LOG$
|
|
1887
|
+
LOG$c.warn('Could not fetch organization tree');
|
|
1888
1888
|
case 14:
|
|
1889
1889
|
case "end":
|
|
1890
1890
|
return _context6.stop();
|
|
@@ -1936,7 +1936,7 @@ function empty(p) {
|
|
|
1936
1936
|
|
|
1937
1937
|
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1938
1938
|
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1939
|
-
var LOG$
|
|
1939
|
+
var LOG$b = getLogger('Framework', 'root');
|
|
1940
1940
|
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
1941
1941
|
function ErrorBoundary(props) {
|
|
1942
1942
|
var _this;
|
|
@@ -1950,7 +1950,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
1950
1950
|
return _createClass(ErrorBoundary, [{
|
|
1951
1951
|
key: "componentDidCatch",
|
|
1952
1952
|
value: function componentDidCatch(error) {
|
|
1953
|
-
LOG$
|
|
1953
|
+
LOG$b.error(new DivaError('Error while rendring in Core', {
|
|
1954
1954
|
cause: error,
|
|
1955
1955
|
custom: {
|
|
1956
1956
|
code: 'CORE_0000'
|
|
@@ -1987,12 +1987,12 @@ function Fallback () {
|
|
|
1987
1987
|
var _excluded$5 = ["children"];
|
|
1988
1988
|
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1989
1989
|
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1990
|
-
var LOG$
|
|
1990
|
+
var LOG$a = getLogger('Framework', 'root');
|
|
1991
1991
|
var DivaCore = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1992
1992
|
var children = _ref.children,
|
|
1993
1993
|
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
1994
1994
|
useEffect(function () {
|
|
1995
|
-
LOG$
|
|
1995
|
+
LOG$a.successTransaction('UNTIL_RENDER');
|
|
1996
1996
|
}, []);
|
|
1997
1997
|
return /*#__PURE__*/jsx(DivaCoreProvider, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
1998
1998
|
ref: ref,
|
|
@@ -2163,7 +2163,7 @@ function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r
|
|
|
2163
2163
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
2164
2164
|
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2165
2165
|
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2166
|
-
var LOG$
|
|
2166
|
+
var LOG$9 = getLogger('Framework', 'ContentStore');
|
|
2167
2167
|
var ALLOWED_WRAPPER_MODULES = ['ARCHIVE', 'PRODUCT_LIST'];
|
|
2168
2168
|
var ContentStore = /*#__PURE__*/function () {
|
|
2169
2169
|
function ContentStore(components, root) {
|
|
@@ -2195,8 +2195,6 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2195
2195
|
_defineProperty(this, "resizeObserver", undefined);
|
|
2196
2196
|
_defineProperty(this, "_dimensions", undefined);
|
|
2197
2197
|
_defineProperty(this, "_currentlyRendered", []);
|
|
2198
|
-
// Built once on open so the component identity stays stable across `_fullscreenComponent` updates and React doesn't remount.
|
|
2199
|
-
_defineProperty(this, "_fullscreenRender", undefined);
|
|
2200
2198
|
_defineProperty(this, "mapTypeToModule", function (type) {
|
|
2201
2199
|
switch (type) {
|
|
2202
2200
|
case 'START_PAGE':
|
|
@@ -2316,7 +2314,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2316
2314
|
case 17:
|
|
2317
2315
|
_context.prev = 17;
|
|
2318
2316
|
_context.t0 = _context["catch"](8);
|
|
2319
|
-
LOG$
|
|
2317
|
+
LOG$9.error(_context.t0);
|
|
2320
2318
|
if (callback) {
|
|
2321
2319
|
callback(false);
|
|
2322
2320
|
} else {
|
|
@@ -2348,7 +2346,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2348
2346
|
this.root = root;
|
|
2349
2347
|
this.configuration = components;
|
|
2350
2348
|
if (window.customElements.get('model-viewer')) this._modelViewerHasLoaded = true;
|
|
2351
|
-
LOG$
|
|
2349
|
+
LOG$9.debug("Available Components: ".concat(components.map(function (c) {
|
|
2352
2350
|
return c.name;
|
|
2353
2351
|
})));
|
|
2354
2352
|
makeAutoObservable(this, {
|
|
@@ -2368,7 +2366,6 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2368
2366
|
_drawerMenu: observable.ref,
|
|
2369
2367
|
resizeObserver: false,
|
|
2370
2368
|
_currentlyRendered: false,
|
|
2371
|
-
_fullscreenRender: false,
|
|
2372
2369
|
openComponent: flow,
|
|
2373
2370
|
openComponentInFullscreen: flow,
|
|
2374
2371
|
getState: false
|
|
@@ -2506,12 +2503,12 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2506
2503
|
case 3:
|
|
2507
2504
|
this.root.loadingAndErrorStore.setError(undefined);
|
|
2508
2505
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2509
|
-
LOG$
|
|
2506
|
+
LOG$9.debug('openComponent', toJS(action));
|
|
2510
2507
|
if (!action.url) {
|
|
2511
2508
|
_context3.next = 11;
|
|
2512
2509
|
break;
|
|
2513
2510
|
}
|
|
2514
|
-
LOG$
|
|
2511
|
+
LOG$9.businessEvent('onOpenModule', action.openInNewTab ? 'OpenUrlNewTab' : 'OpenUrl', "Open link ".concat(action.url), {
|
|
2515
2512
|
url: action.url
|
|
2516
2513
|
});
|
|
2517
2514
|
if (action.openInNewTab) {
|
|
@@ -2608,7 +2605,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2608
2605
|
_context3.next = 41;
|
|
2609
2606
|
break;
|
|
2610
2607
|
}
|
|
2611
|
-
LOG$
|
|
2608
|
+
LOG$9.debug("Component is restricted, open login form");
|
|
2612
2609
|
this._restrictedComponent = action;
|
|
2613
2610
|
this.root.authorizationStore.showLogin();
|
|
2614
2611
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
@@ -2633,7 +2630,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2633
2630
|
_context3.next = 51;
|
|
2634
2631
|
break;
|
|
2635
2632
|
}
|
|
2636
|
-
LOG$
|
|
2633
|
+
LOG$9.warn('Wrapper org restriction detected, redirecting to default module', {
|
|
2637
2634
|
requestedAction: toJS(action),
|
|
2638
2635
|
defaultComponent: toJS(defaultComponent),
|
|
2639
2636
|
organizationId: this.root.dataStore.organizationId
|
|
@@ -2667,7 +2664,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2667
2664
|
parameters = otherPrams;
|
|
2668
2665
|
}
|
|
2669
2666
|
module = this.mapTypeToModule((_config8 = config) === null || _config8 === void 0 ? void 0 : _config8.type);
|
|
2670
|
-
LOG$
|
|
2667
|
+
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
|
|
2671
2668
|
prevType = this.visible;
|
|
2672
2669
|
prevState = this.state.get(this.visible || '');
|
|
2673
2670
|
currentState = this.state.get(config.type);
|
|
@@ -2714,11 +2711,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2714
2711
|
key: "openComponentInFullscreen",
|
|
2715
2712
|
value: /*#__PURE__*/_regeneratorRuntime.mark(function openComponentInFullscreen(component) {
|
|
2716
2713
|
var _config10, _config11;
|
|
2717
|
-
var type, parameters, internal, route, config, settings, module, componentState
|
|
2714
|
+
var type, parameters, internal, route, config, settings, module, componentState;
|
|
2718
2715
|
return _regeneratorRuntime.wrap(function openComponentInFullscreen$(_context4) {
|
|
2719
2716
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2720
2717
|
case 0:
|
|
2721
|
-
LOG$
|
|
2718
|
+
LOG$9.debug('openComponentInFullscreen', toJS(component));
|
|
2722
2719
|
this.root.loadingAndErrorStore.setError(undefined);
|
|
2723
2720
|
type = component.type, parameters = component.parameters, internal = component.internal, route = component.route;
|
|
2724
2721
|
config = undefined;
|
|
@@ -2764,7 +2761,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2764
2761
|
settings = _context4.sent;
|
|
2765
2762
|
case 18:
|
|
2766
2763
|
module = this.mapTypeToModule((_config10 = config) === null || _config10 === void 0 ? void 0 : _config10.type);
|
|
2767
|
-
LOG$
|
|
2764
|
+
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
|
|
2768
2765
|
componentState = {
|
|
2769
2766
|
key: config.type,
|
|
2770
2767
|
parameters: parameters,
|
|
@@ -2775,15 +2772,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2775
2772
|
};
|
|
2776
2773
|
this.setGlobalClass();
|
|
2777
2774
|
this._fullscreenComponent = componentState;
|
|
2778
|
-
cmp = this.configuration.find(function (c) {
|
|
2779
|
-
return c.name == config.type;
|
|
2780
|
-
});
|
|
2781
|
-
if (cmp) this._fullscreenRender = {
|
|
2782
|
-
name: cmp.name,
|
|
2783
|
-
component: withTransaction(config.type, 'Module')(cmp.renderFunction)
|
|
2784
|
-
};
|
|
2785
2775
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2786
|
-
case
|
|
2776
|
+
case 24:
|
|
2787
2777
|
case "end":
|
|
2788
2778
|
return _context4.stop();
|
|
2789
2779
|
}
|
|
@@ -2793,7 +2783,6 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2793
2783
|
key: "closeComponentInFullscreen",
|
|
2794
2784
|
value: function closeComponentInFullscreen() {
|
|
2795
2785
|
this._fullscreenComponent = undefined;
|
|
2796
|
-
this._fullscreenRender = undefined;
|
|
2797
2786
|
this.root.onEvent({
|
|
2798
2787
|
type: 'closeComponentInFullscreen'
|
|
2799
2788
|
});
|
|
@@ -3460,16 +3449,23 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3460
3449
|
}, {
|
|
3461
3450
|
key: "fullscreenComponent",
|
|
3462
3451
|
get: function get() {
|
|
3463
|
-
var
|
|
3464
|
-
|
|
3452
|
+
var _this9 = this;
|
|
3453
|
+
var component = this.availableComponents.find(function (component) {
|
|
3454
|
+
var _this9$_fullscreenCom;
|
|
3455
|
+
return component.type == ((_this9$_fullscreenCom = _this9._fullscreenComponent) === null || _this9$_fullscreenCom === void 0 ? void 0 : _this9$_fullscreenCom.key);
|
|
3456
|
+
});
|
|
3457
|
+
var cmp = this.configuration.find(function (config) {
|
|
3458
|
+
return (component === null || component === void 0 ? void 0 : component.type) == config.name;
|
|
3459
|
+
});
|
|
3460
|
+
if (!cmp || !component || !this._fullscreenComponent) throw new DivaError("No component with the specified settings found", {
|
|
3465
3461
|
code: 'CORE_0005',
|
|
3466
3462
|
custom: {
|
|
3467
|
-
key:
|
|
3463
|
+
key: this._fullscreenComponent.key
|
|
3468
3464
|
}
|
|
3469
3465
|
});
|
|
3470
3466
|
return {
|
|
3471
|
-
name:
|
|
3472
|
-
component: this.
|
|
3467
|
+
name: cmp.name,
|
|
3468
|
+
component: withTransaction(this._fullscreenComponent.key, 'Module')(cmp.renderFunction),
|
|
3473
3469
|
state: this._fullscreenComponent
|
|
3474
3470
|
};
|
|
3475
3471
|
}
|
|
@@ -3481,8 +3477,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3481
3477
|
}, {
|
|
3482
3478
|
key: "isAbsoluteFullscreenComponent",
|
|
3483
3479
|
get: function get() {
|
|
3484
|
-
var _this$
|
|
3485
|
-
return !!((_this$
|
|
3480
|
+
var _this$_fullscreenComp;
|
|
3481
|
+
return !!((_this$_fullscreenComp = this._fullscreenComponent) !== null && _this$_fullscreenComp !== void 0 && _this$_fullscreenComp.absoluteFullscreen) || this._isAbsoluteComponent;
|
|
3486
3482
|
}
|
|
3487
3483
|
|
|
3488
3484
|
/**
|
|
@@ -3503,24 +3499,24 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3503
3499
|
key: "availableButtons",
|
|
3504
3500
|
get: function get() {
|
|
3505
3501
|
var _this$root$configurat,
|
|
3506
|
-
|
|
3502
|
+
_this10 = this;
|
|
3507
3503
|
return (_this$root$configurat = this.root.configurationStore.navigation) === null || _this$root$configurat === void 0 ? void 0 : _this$root$configurat.buttons.filter(function (button) {
|
|
3508
3504
|
//if component is public it can be displayed
|
|
3509
3505
|
if (button.isPublic) {
|
|
3510
3506
|
return true;
|
|
3511
3507
|
}
|
|
3512
3508
|
//if the user is not logged in the component must be public
|
|
3513
|
-
if (!
|
|
3509
|
+
if (!_this10.root.dataStore.user) {
|
|
3514
3510
|
return false;
|
|
3515
3511
|
}
|
|
3516
3512
|
|
|
3517
3513
|
//if the button is opening a component, the component must be availalbe
|
|
3518
|
-
if (button.action.type && !
|
|
3514
|
+
if (button.action.type && !_this10.availableComponentList.includes(button.action.type)) {
|
|
3519
3515
|
return false;
|
|
3520
3516
|
}
|
|
3521
3517
|
|
|
3522
3518
|
//if there is a permission specified, the user must have it
|
|
3523
|
-
return button.permission ?
|
|
3519
|
+
return button.permission ? _this10.root.dataStore.userHasPermission(button.permission) : true;
|
|
3524
3520
|
});
|
|
3525
3521
|
}
|
|
3526
3522
|
|
|
@@ -3550,7 +3546,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3550
3546
|
if (this.isAbsoluteFullscreenComponent) {
|
|
3551
3547
|
dimensions = calculateDimensions(window.innerWidth, window.innerHeight);
|
|
3552
3548
|
}
|
|
3553
|
-
LOG$
|
|
3549
|
+
LOG$9.debug("Detected dimensions: ".concat(JSON.stringify(dimensions, null, 2), " "));
|
|
3554
3550
|
return dimensions;
|
|
3555
3551
|
}
|
|
3556
3552
|
|
|
@@ -3561,7 +3557,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3561
3557
|
}, {
|
|
3562
3558
|
key: "resetState",
|
|
3563
3559
|
value: function resetState() {
|
|
3564
|
-
LOG$
|
|
3560
|
+
LOG$9.debug('Reset page state');
|
|
3565
3561
|
var prevType = this.visible;
|
|
3566
3562
|
var prevState = this.state.get(this.visible || '');
|
|
3567
3563
|
this.root.dataStore.clearSessionGuids();
|
|
@@ -3605,7 +3601,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3605
3601
|
}, {
|
|
3606
3602
|
key: "updateStateAfterLogout",
|
|
3607
3603
|
value: function updateStateAfterLogout() {
|
|
3608
|
-
var
|
|
3604
|
+
var _this11 = this;
|
|
3609
3605
|
var _iterator3 = _createForOfIteratorHelper$1(this.state.entries()),
|
|
3610
3606
|
_step3;
|
|
3611
3607
|
try {
|
|
@@ -3613,19 +3609,19 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3613
3609
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
3614
3610
|
type = _step3$value[0],
|
|
3615
3611
|
component = _step3$value[1];
|
|
3616
|
-
var config =
|
|
3612
|
+
var config = _this11.root.configurationStore.components.find(function (c) {
|
|
3617
3613
|
return c.type == type;
|
|
3618
3614
|
});
|
|
3619
3615
|
if (!(config !== null && config !== void 0 && config.isPublic)) {
|
|
3620
|
-
|
|
3621
|
-
if (
|
|
3622
|
-
|
|
3623
|
-
|
|
3616
|
+
_this11.state["delete"](type);
|
|
3617
|
+
if (_this11.visible == type) {
|
|
3618
|
+
_this11.visible = undefined;
|
|
3619
|
+
_this11._restrictedComponent = {
|
|
3624
3620
|
type: type,
|
|
3625
3621
|
parameters: component.parameters,
|
|
3626
3622
|
internal: component.internal
|
|
3627
3623
|
};
|
|
3628
|
-
|
|
3624
|
+
_this11.root.authorizationStore.showLogin();
|
|
3629
3625
|
}
|
|
3630
3626
|
}
|
|
3631
3627
|
};
|
|
@@ -3720,10 +3716,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3720
3716
|
}, {
|
|
3721
3717
|
key: "onResize",
|
|
3722
3718
|
value: function onResize(width, height) {
|
|
3723
|
-
var
|
|
3719
|
+
var _this12 = this;
|
|
3724
3720
|
this.onResizeFunc(width, height);
|
|
3725
3721
|
setTimeout(function () {
|
|
3726
|
-
|
|
3722
|
+
_this12.onResizeFunc(width, height);
|
|
3727
3723
|
}, 500);
|
|
3728
3724
|
}
|
|
3729
3725
|
}, {
|
|
@@ -3754,18 +3750,13 @@ function getLocalStorageToggle(key) {
|
|
|
3754
3750
|
return window.localStorage.getItem(key) !== null ? window.localStorage.getItem(key) == '1' : undefined;
|
|
3755
3751
|
}
|
|
3756
3752
|
|
|
3757
|
-
var
|
|
3758
|
-
var LOG$9 = getLogger('Framework', 'LoadingAndErrorStore');
|
|
3753
|
+
var LOG$8 = getLogger('Framework', 'LoadingAndErrorStore');
|
|
3759
3754
|
var _default = /*#__PURE__*/function () {
|
|
3760
3755
|
function _default(root, spinnerClass) {
|
|
3761
3756
|
var _this = this;
|
|
3762
3757
|
_classCallCheck(this, _default);
|
|
3763
3758
|
this.root = root;
|
|
3764
3759
|
_defineProperty(this, "loading", new Map());
|
|
3765
|
-
_defineProperty(this, "loadingWithoutSpinnerDelay", new Set());
|
|
3766
|
-
_defineProperty(this, "loadingTexts", new Map());
|
|
3767
|
-
_defineProperty(this, "_lastTexts", []);
|
|
3768
|
-
_defineProperty(this, "_textClearTimer", null);
|
|
3769
3760
|
_defineProperty(this, "spinnerClass", undefined);
|
|
3770
3761
|
_defineProperty(this, "cssFile", undefined);
|
|
3771
3762
|
_defineProperty(this, "_errorMsg", undefined);
|
|
@@ -3797,23 +3788,6 @@ var _default = /*#__PURE__*/function () {
|
|
|
3797
3788
|
}, {
|
|
3798
3789
|
name: 'onLoading'
|
|
3799
3790
|
});
|
|
3800
|
-
autorun(function () {
|
|
3801
|
-
if (_this.isLoading) {
|
|
3802
|
-
if (_this._textClearTimer) {
|
|
3803
|
-
clearTimeout(_this._textClearTimer);
|
|
3804
|
-
_this._textClearTimer = null;
|
|
3805
|
-
}
|
|
3806
|
-
} else if (_this._lastTexts.length > 0) {
|
|
3807
|
-
_this._textClearTimer = setTimeout(function () {
|
|
3808
|
-
runInAction(function () {
|
|
3809
|
-
_this._lastTexts = [];
|
|
3810
|
-
_this._textClearTimer = null;
|
|
3811
|
-
});
|
|
3812
|
-
}, LOADING_TEXT_CLEAR_DELAY_MS);
|
|
3813
|
-
}
|
|
3814
|
-
}, {
|
|
3815
|
-
name: 'onLoadingTextsClear'
|
|
3816
|
-
});
|
|
3817
3791
|
}
|
|
3818
3792
|
return _createClass(_default, [{
|
|
3819
3793
|
key: "setCustomLoader",
|
|
@@ -3867,14 +3841,9 @@ var _default = /*#__PURE__*/function () {
|
|
|
3867
3841
|
}, {
|
|
3868
3842
|
key: "isLoading",
|
|
3869
3843
|
get: function get() {
|
|
3870
|
-
LOG$
|
|
3844
|
+
LOG$8.debug("isLoading: ".concat(this.loading.size, " [").concat(Array.from(this.loading.keys()).join(', '), "]"));
|
|
3871
3845
|
return this.loading.size != 0;
|
|
3872
3846
|
}
|
|
3873
|
-
}, {
|
|
3874
|
-
key: "skipSpinnerDelay",
|
|
3875
|
-
get: function get() {
|
|
3876
|
-
return this.loadingWithoutSpinnerDelay.size > 0;
|
|
3877
|
-
}
|
|
3878
3847
|
}, {
|
|
3879
3848
|
key: "error",
|
|
3880
3849
|
get: function get() {
|
|
@@ -3888,21 +3857,21 @@ var _default = /*#__PURE__*/function () {
|
|
|
3888
3857
|
this._errorMsg = undefined;
|
|
3889
3858
|
} else if (typeof error == 'string') {
|
|
3890
3859
|
this._errorMsg = error;
|
|
3891
|
-
LOG$
|
|
3860
|
+
LOG$8.error(new DivaError(error));
|
|
3892
3861
|
} else if (error.name == 'CORE_0005') {
|
|
3893
|
-
LOG$
|
|
3862
|
+
LOG$8.error(error);
|
|
3894
3863
|
this._errorMsg = this.root.t('core.error.page_not_found', {
|
|
3895
3864
|
defaultValue: 'Die Seite existiert nicht oder Sie haben nicht die benötigten Berechtigungen. Bei Fragen wenden Sie sich bitte an den Support.'
|
|
3896
3865
|
});
|
|
3897
3866
|
var conf = this.root.configurationStore.components;
|
|
3898
3867
|
console.log(conf);
|
|
3899
3868
|
} else if (error.name == 'CORE_0002') {
|
|
3900
|
-
LOG$
|
|
3869
|
+
LOG$8.error(error);
|
|
3901
3870
|
this._errorMsg = this.root.t('core.error.resource_not_found', {
|
|
3902
3871
|
defaultValue: 'Eine oder mehrere der benötigten Resource existiert nicht oder konnte nicht gefunden werden. Bei Fragen wenden Sie sich bitte an den Support.'
|
|
3903
3872
|
});
|
|
3904
3873
|
} else {
|
|
3905
|
-
LOG$
|
|
3874
|
+
LOG$8.error(error);
|
|
3906
3875
|
this._errorMsg = error.message;
|
|
3907
3876
|
}
|
|
3908
3877
|
if (this._errorMsg) {
|
|
@@ -3960,43 +3929,21 @@ var _default = /*#__PURE__*/function () {
|
|
|
3960
3929
|
return hidden == true;
|
|
3961
3930
|
}) || this.error;
|
|
3962
3931
|
}
|
|
3963
|
-
}, {
|
|
3964
|
-
key: "activeTexts",
|
|
3965
|
-
get: function get() {
|
|
3966
|
-
if (this.loadingTexts.size > 0) {
|
|
3967
|
-
var merged = [];
|
|
3968
|
-
this.loadingTexts.forEach(function (texts) {
|
|
3969
|
-
return merged.push.apply(merged, _toConsumableArray(texts));
|
|
3970
|
-
});
|
|
3971
|
-
return merged;
|
|
3972
|
-
}
|
|
3973
|
-
return this._lastTexts;
|
|
3974
|
-
}
|
|
3975
3932
|
}, {
|
|
3976
3933
|
key: "toggleLoading",
|
|
3977
|
-
value: function toggleLoading(id, hidden, toggle
|
|
3934
|
+
value: function toggleLoading(id, hidden, toggle) {
|
|
3978
3935
|
if (this.loading.has(id) && toggle !== true) {
|
|
3979
3936
|
this.loading["delete"](id);
|
|
3980
|
-
|
|
3981
|
-
if (this.loadingTexts.has(id)) {
|
|
3982
|
-
var snapshot = this.activeTexts;
|
|
3983
|
-
this.loadingTexts["delete"](id);
|
|
3984
|
-
if (snapshot.length > 0) {
|
|
3985
|
-
this._lastTexts = snapshot;
|
|
3986
|
-
}
|
|
3987
|
-
}
|
|
3988
|
-
LOG$9.debug("End loading: ".concat(id, " [").concat(Array.from(this.loading.keys()), "]"));
|
|
3937
|
+
LOG$8.debug("End loading: ".concat(id, " [").concat(Array.from(this.loading.keys()), "]"));
|
|
3989
3938
|
} else if (!this.loading.has(id) && toggle !== false) {
|
|
3990
|
-
LOG$
|
|
3939
|
+
LOG$8.debug("Start loading: ".concat(id));
|
|
3991
3940
|
this.loading.set(id, hidden == undefined ? false : hidden);
|
|
3992
|
-
if (skipSpinnerDelay) this.loadingWithoutSpinnerDelay.add(id);
|
|
3993
|
-
if (texts !== null && texts !== void 0 && texts.length) this.loadingTexts.set(id, texts);
|
|
3994
3941
|
}
|
|
3995
3942
|
}
|
|
3996
3943
|
}]);
|
|
3997
3944
|
}();
|
|
3998
3945
|
|
|
3999
|
-
var LOG$
|
|
3946
|
+
var LOG$7 = getLogger('Framework', 'BrowserStateStore');
|
|
4000
3947
|
var BANNER_STATE_LOCALSTORAGE_KEY = 'diva-banner-state';
|
|
4001
3948
|
var NTOKEN_LOCALSTORAGE_KEY = 'diva-ntoken';
|
|
4002
3949
|
var ORGANIZATION_LOCALSTORAGE_KEY = 'diva-organization';
|
|
@@ -4310,7 +4257,7 @@ var BrowserStateStore = /*#__PURE__*/function () {
|
|
|
4310
4257
|
var _componentState$path;
|
|
4311
4258
|
var componentConfig = _this2.root.contentStore.currentComponent;
|
|
4312
4259
|
if (!componentConfig) {
|
|
4313
|
-
LOG$
|
|
4260
|
+
LOG$7.debug('No current component found, while updating url, do nothing');
|
|
4314
4261
|
return;
|
|
4315
4262
|
}
|
|
4316
4263
|
var componentState = _this2.root.contentStore.getState(componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.type);
|
|
@@ -4388,7 +4335,7 @@ var BrowserStateStore = /*#__PURE__*/function () {
|
|
|
4388
4335
|
|
|
4389
4336
|
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4390
4337
|
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4391
|
-
var LOG$
|
|
4338
|
+
var LOG$6 = getLogger('Framework', 'AuthorizationStore');
|
|
4392
4339
|
var AuthorizationStore = /*#__PURE__*/function () {
|
|
4393
4340
|
function AuthorizationStore(root) {
|
|
4394
4341
|
_classCallCheck(this, AuthorizationStore);
|
|
@@ -4579,14 +4526,14 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4579
4526
|
_context2.next = 6;
|
|
4580
4527
|
break;
|
|
4581
4528
|
}
|
|
4582
|
-
LOG$
|
|
4529
|
+
LOG$6.debug('NToken removed');
|
|
4583
4530
|
_context2.next = 4;
|
|
4584
4531
|
return this.root.authorizationStore.logout();
|
|
4585
4532
|
case 4:
|
|
4586
4533
|
_context2.next = 15;
|
|
4587
4534
|
break;
|
|
4588
4535
|
case 6:
|
|
4589
|
-
LOG$
|
|
4536
|
+
LOG$6.debug('NToken change detected, login');
|
|
4590
4537
|
_context2.next = 9;
|
|
4591
4538
|
return this.root.authorizationStore.autorize(this.root.dataStore.organizationId, this.root.browserStateStore.getStoredNToken());
|
|
4592
4539
|
case 9:
|
|
@@ -4639,7 +4586,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4639
4586
|
_context3.next = 21;
|
|
4640
4587
|
break;
|
|
4641
4588
|
}
|
|
4642
|
-
LOG$
|
|
4589
|
+
LOG$6.log('The stored organization is no longer valid, fallback to default organization');
|
|
4643
4590
|
//for anonymous users, we fallback to the 'default' organization for ohter users we let the backend determine the right organization
|
|
4644
4591
|
_context3.next = 18;
|
|
4645
4592
|
return this.autorize(nToken ? undefined : this.root.configurationStore.organizations[0], nToken);
|
|
@@ -4650,7 +4597,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4650
4597
|
_context3.next = 26;
|
|
4651
4598
|
break;
|
|
4652
4599
|
}
|
|
4653
|
-
LOG$
|
|
4600
|
+
LOG$6.log('Authentication expired or invalid, logging out.');
|
|
4654
4601
|
_context3.next = 25;
|
|
4655
4602
|
return this.logout(true, true, organizationId);
|
|
4656
4603
|
case 25:
|
|
@@ -4750,7 +4697,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4750
4697
|
_context5.next = 19;
|
|
4751
4698
|
break;
|
|
4752
4699
|
}
|
|
4753
|
-
LOG$
|
|
4700
|
+
LOG$6.log('The stored organization is no longer valid, fallback to default organization');
|
|
4754
4701
|
_context5.next = 18;
|
|
4755
4702
|
return this.login(email, password, loginSimple, undefined);
|
|
4756
4703
|
case 18:
|
|
@@ -4810,7 +4757,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4810
4757
|
this._timeout = undefined;
|
|
4811
4758
|
}
|
|
4812
4759
|
refreshTokenIn = zExpireBy - 1000 * 60 * 5 - Date.now(); //refresh 5 minutes before expire
|
|
4813
|
-
LOG$
|
|
4760
|
+
LOG$6.debug("Set token refresh interval to ".concat(refreshTokenIn, " ms. Refresh at ").concat(new Date(Date.now() + refreshTokenIn)));
|
|
4814
4761
|
|
|
4815
4762
|
//set the timout to refresh token
|
|
4816
4763
|
this._timeout = setTimeout(function () {
|
|
@@ -7786,7 +7733,7 @@ var SupportHandler = /*#__PURE__*/function () {
|
|
|
7786
7733
|
}]);
|
|
7787
7734
|
}();
|
|
7788
7735
|
|
|
7789
|
-
var LOG$
|
|
7736
|
+
var LOG$5 = getLogger('Framework', 'AuthorizationHandler');
|
|
7790
7737
|
var AuthorizationHandler = /*#__PURE__*/function () {
|
|
7791
7738
|
function AuthorizationHandler(root) {
|
|
7792
7739
|
_classCallCheck(this, AuthorizationHandler);
|
|
@@ -7837,7 +7784,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7837
7784
|
if (res.status !== 200) {
|
|
7838
7785
|
throw new Error('Error updating online state');
|
|
7839
7786
|
}
|
|
7840
|
-
LOG$
|
|
7787
|
+
LOG$5.debug('Updating online state.');
|
|
7841
7788
|
});
|
|
7842
7789
|
case 6:
|
|
7843
7790
|
_context.sent;
|
|
@@ -7846,7 +7793,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7846
7793
|
case 9:
|
|
7847
7794
|
_context.prev = 9;
|
|
7848
7795
|
_context.t0 = _context["catch"](3);
|
|
7849
|
-
LOG$
|
|
7796
|
+
LOG$5.error(new DivaError('Error updating online state', {
|
|
7850
7797
|
cause: _context.t0
|
|
7851
7798
|
}));
|
|
7852
7799
|
case 12:
|
|
@@ -8435,7 +8382,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
8435
8382
|
case 13:
|
|
8436
8383
|
_context10.prev = 13;
|
|
8437
8384
|
_context10.t0 = _context10["catch"](0);
|
|
8438
|
-
LOG$
|
|
8385
|
+
LOG$5.error(new DivaError('Error updating user language', {
|
|
8439
8386
|
cause: _context10.t0
|
|
8440
8387
|
}));
|
|
8441
8388
|
case 16:
|
|
@@ -8610,7 +8557,7 @@ var AIHandler = /*#__PURE__*/function () {
|
|
|
8610
8557
|
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8611
8558
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8612
8559
|
var LOGINMODE_LOCALSTORAGE_KEY = 'diva-login-mode';
|
|
8613
|
-
var LOG$
|
|
8560
|
+
var LOG$4 = getLogger('Framework', 'root');
|
|
8614
8561
|
var RootStore = /*#__PURE__*/function () {
|
|
8615
8562
|
function RootStore(_ref) {
|
|
8616
8563
|
var _ref2,
|
|
@@ -8629,8 +8576,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8629
8576
|
_ref$telemetry = _ref.telemetry,
|
|
8630
8577
|
telemetry = _ref$telemetry === void 0 ? true : _ref$telemetry,
|
|
8631
8578
|
analyticsProps = _ref.analyticsProps,
|
|
8632
|
-
onEvent = _ref.onEvent
|
|
8633
|
-
initialLoadingTexts = _ref.initialLoadingTexts;
|
|
8579
|
+
onEvent = _ref.onEvent;
|
|
8634
8580
|
_classCallCheck(this, RootStore);
|
|
8635
8581
|
_defineProperty(this, "contentStore", void 0);
|
|
8636
8582
|
_defineProperty(this, "configurationStore", void 0);
|
|
@@ -8721,7 +8667,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8721
8667
|
DivaUtils.businessMetrics.onClose();
|
|
8722
8668
|
flashLoggers();
|
|
8723
8669
|
});
|
|
8724
|
-
this.initialize(telemetry, identifier, organizationId, domain, language, component, analyticsProps
|
|
8670
|
+
this.initialize(telemetry, identifier, organizationId, domain, language, component, analyticsProps);
|
|
8725
8671
|
}
|
|
8726
8672
|
|
|
8727
8673
|
/**
|
|
@@ -8735,7 +8681,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8735
8681
|
this.loadingAndErrorStore.toggleLoading('language');
|
|
8736
8682
|
instance.changeLanguage(lang, function (err) {
|
|
8737
8683
|
if (err) {
|
|
8738
|
-
LOG$
|
|
8684
|
+
LOG$4.error(new DivaError('Could not change language', {
|
|
8739
8685
|
cause: err,
|
|
8740
8686
|
code: 'CORE_0007'
|
|
8741
8687
|
}));
|
|
@@ -8999,13 +8945,13 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8999
8945
|
}, {
|
|
9000
8946
|
key: "initialize",
|
|
9001
8947
|
value: (function () {
|
|
9002
|
-
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(telemetry, identifier, organizationId, domain, language, component, analyticsProps
|
|
8948
|
+
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(telemetry, identifier, organizationId, domain, language, component, analyticsProps) {
|
|
9003
8949
|
var _this4 = this;
|
|
9004
8950
|
var _this$_initalComponen, _this$_initalComponen2, _configuration$pwa, _this$contentStore$cu, urlState, storedOrganization, initialOrganization, initAuthPromise, afterInitPromise, configuration, header, manifest, verifyEmailToken, authObject, _authObject$code, _authObject$code2, _authObject$code3, _authObject$code4, _authObject$additiona, _authObject$additiona2, loadedOrganization, email, _this$contentStore$cu2;
|
|
9005
8951
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
9006
8952
|
while (1) switch (_context.prev = _context.next) {
|
|
9007
8953
|
case 0:
|
|
9008
|
-
LOG$
|
|
8954
|
+
LOG$4.startTransaction({
|
|
9009
8955
|
event: 'initCore',
|
|
9010
8956
|
message: 'Initalizing Core',
|
|
9011
8957
|
labels: {
|
|
@@ -9023,8 +8969,8 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9023
8969
|
runInAction(function () {
|
|
9024
8970
|
_this4._initializing = true;
|
|
9025
8971
|
});
|
|
9026
|
-
this.loadingAndErrorStore.toggleLoading('initalize', true
|
|
9027
|
-
LOG$
|
|
8972
|
+
this.loadingAndErrorStore.toggleLoading('initalize', true);
|
|
8973
|
+
LOG$4.successTransaction('UNTIL_INIT');
|
|
9028
8974
|
_context.next = 7;
|
|
9029
8975
|
return this.browserStateStore.loadUrlState();
|
|
9030
8976
|
case 7:
|
|
@@ -9035,7 +8981,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9035
8981
|
if (organizationId) {
|
|
9036
8982
|
initAuthPromise = this.initializeAuthorization(organizationId);
|
|
9037
8983
|
}
|
|
9038
|
-
LOG$
|
|
8984
|
+
LOG$4.startTransaction({
|
|
9039
8985
|
event: 'onLoadConfig',
|
|
9040
8986
|
message: 'loading Config',
|
|
9041
8987
|
eventId: 'LOAD_CONFIG'
|
|
@@ -9059,8 +9005,8 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9059
9005
|
//open default route
|
|
9060
9006
|
this._initalComponent = undefined;
|
|
9061
9007
|
}
|
|
9062
|
-
LOG$
|
|
9063
|
-
LOG$
|
|
9008
|
+
LOG$4.successTransaction('LOAD_CONFIG');
|
|
9009
|
+
LOG$4.startTransaction({
|
|
9064
9010
|
event: 'onLoadServerData',
|
|
9065
9011
|
message: 'load server data',
|
|
9066
9012
|
eventId: 'LOAD_SERVER_DATA'
|
|
@@ -9085,8 +9031,8 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9085
9031
|
}
|
|
9086
9032
|
});
|
|
9087
9033
|
});
|
|
9088
|
-
LOG$
|
|
9089
|
-
LOG$
|
|
9034
|
+
LOG$4.successTransaction('LOAD_SERVER_DATA');
|
|
9035
|
+
LOG$4.startTransaction({
|
|
9090
9036
|
event: 'onLoadUserData',
|
|
9091
9037
|
message: 'load user data',
|
|
9092
9038
|
eventId: 'LOAD_USER_DATA'
|
|
@@ -9104,7 +9050,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9104
9050
|
break;
|
|
9105
9051
|
case 33:
|
|
9106
9052
|
if (authObject.error) {
|
|
9107
|
-
LOG$
|
|
9053
|
+
LOG$4.errorTransaction('LOAD_USER_DATA', (_authObject$code = authObject.code) !== null && _authObject$code !== void 0 ? _authObject$code : 'CORE_0006', authObject.error);
|
|
9108
9054
|
this.authorizationStore.showLogin(false, true);
|
|
9109
9055
|
} else {
|
|
9110
9056
|
if (urlState !== null && urlState !== void 0 && urlState.provider) {
|
|
@@ -9115,7 +9061,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9115
9061
|
return _context.abrupt("break", 50);
|
|
9116
9062
|
case 35:
|
|
9117
9063
|
if (authObject.error) {
|
|
9118
|
-
LOG$
|
|
9064
|
+
LOG$4.errorTransaction('LOAD_USER_DATA', (_authObject$code2 = authObject.code) !== null && _authObject$code2 !== void 0 ? _authObject$code2 : 'CORE_0006', authObject.error);
|
|
9119
9065
|
this.loadingAndErrorStore.setError(authObject.error);
|
|
9120
9066
|
} else {
|
|
9121
9067
|
this.authorizationStore.showChangePassword(authObject.token);
|
|
@@ -9123,7 +9069,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9123
9069
|
return _context.abrupt("break", 50);
|
|
9124
9070
|
case 37:
|
|
9125
9071
|
if (authObject.error) {
|
|
9126
|
-
LOG$
|
|
9072
|
+
LOG$4.errorTransaction('LOAD_USER_DATA', (_authObject$code3 = authObject.code) !== null && _authObject$code3 !== void 0 ? _authObject$code3 : 'CORE_0006', authObject.error);
|
|
9127
9073
|
this.loadingAndErrorStore.setError(authObject.error);
|
|
9128
9074
|
} else {
|
|
9129
9075
|
verifyEmailToken = authObject.token;
|
|
@@ -9134,7 +9080,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9134
9080
|
_context.next = 44;
|
|
9135
9081
|
break;
|
|
9136
9082
|
}
|
|
9137
|
-
LOG$
|
|
9083
|
+
LOG$4.errorTransaction('LOAD_INVITATION', (_authObject$code4 = authObject.code) !== null && _authObject$code4 !== void 0 ? _authObject$code4 : 'CORE_0006', authObject.error);
|
|
9138
9084
|
this.loadingAndErrorStore.setError(authObject.error);
|
|
9139
9085
|
_context.next = 48;
|
|
9140
9086
|
break;
|
|
@@ -9155,7 +9101,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9155
9101
|
_context.next = 52;
|
|
9156
9102
|
break;
|
|
9157
9103
|
case 52:
|
|
9158
|
-
LOG$
|
|
9104
|
+
LOG$4.successTransaction('LOAD_USER_DATA');
|
|
9159
9105
|
if (!initAuthPromise) {
|
|
9160
9106
|
_context.next = 59;
|
|
9161
9107
|
break;
|
|
@@ -9232,18 +9178,18 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9232
9178
|
_context.prev = 78;
|
|
9233
9179
|
_context.t1 = _context["catch"](27);
|
|
9234
9180
|
if (_context.t1 instanceof DivaError && _context.t1.name == 'AUTH_0006') {
|
|
9235
|
-
LOG$
|
|
9181
|
+
LOG$4.errorTransaction('INITIALIZE_CORE', 'AUTH_0006', 'Existing verification token not valid.');
|
|
9236
9182
|
} else {
|
|
9237
|
-
LOG$
|
|
9183
|
+
LOG$4.errorTransaction('INITIALIZE_CORE', 'CORE_0006', 'An error occured during initialization.');
|
|
9238
9184
|
}
|
|
9239
9185
|
case 81:
|
|
9240
9186
|
this.initalizeView();
|
|
9241
9187
|
if (this.jwt) {
|
|
9242
9188
|
DivaUtils.businessMetrics.jwtSetter = this.jwt;
|
|
9243
9189
|
} else {
|
|
9244
|
-
LOG$
|
|
9190
|
+
LOG$4.debug('No JWT available for Loging');
|
|
9245
9191
|
}
|
|
9246
|
-
LOG$
|
|
9192
|
+
LOG$4.successTransaction('INITIALIZE_CORE', {
|
|
9247
9193
|
identifier: identifier,
|
|
9248
9194
|
organizationId: this.dataStore.organizationId,
|
|
9249
9195
|
domain: domain,
|
|
@@ -9257,7 +9203,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9257
9203
|
_context.t2 = _context["catch"](1);
|
|
9258
9204
|
this.loadingAndErrorStore.toggleLoading('initalize', false);
|
|
9259
9205
|
this.loadingAndErrorStore.setError(_context.t2);
|
|
9260
|
-
LOG$
|
|
9206
|
+
LOG$4.errorTransaction('INITIALIZE_CORE', 'CORE_0000', _context.t2.message, {
|
|
9261
9207
|
identifier: identifier,
|
|
9262
9208
|
organizationId: this.dataStore.organizationId,
|
|
9263
9209
|
domain: domain,
|
|
@@ -9279,7 +9225,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9279
9225
|
}
|
|
9280
9226
|
}, _callee, this, [[1, 86, 91, 95], [27, 78]]);
|
|
9281
9227
|
}));
|
|
9282
|
-
function initialize(_x, _x2, _x3, _x4, _x5, _x6, _x7
|
|
9228
|
+
function initialize(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
|
|
9283
9229
|
return _initialize.apply(this, arguments);
|
|
9284
9230
|
}
|
|
9285
9231
|
return initialize;
|
|
@@ -9324,7 +9270,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9324
9270
|
_this5.initializeBusinessMetrics(telemetry, environment, applicationEnvironment, telemetrySettings, analyticsProps);
|
|
9325
9271
|
}
|
|
9326
9272
|
}, function (reason) {
|
|
9327
|
-
LOG$
|
|
9273
|
+
LOG$4.error(new DivaError('Cookiebot initialization failed', {
|
|
9328
9274
|
code: 'CORE_0009',
|
|
9329
9275
|
custom: {
|
|
9330
9276
|
reason: reason
|
|
@@ -9344,7 +9290,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9344
9290
|
}
|
|
9345
9291
|
}, _callee2, this);
|
|
9346
9292
|
}));
|
|
9347
|
-
function initializeTelemetry(
|
|
9293
|
+
function initializeTelemetry(_x8) {
|
|
9348
9294
|
return _initializeTelemetry.apply(this, arguments);
|
|
9349
9295
|
}
|
|
9350
9296
|
return initializeTelemetry;
|
|
@@ -9384,7 +9330,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9384
9330
|
}
|
|
9385
9331
|
}, _callee3, this);
|
|
9386
9332
|
}));
|
|
9387
|
-
function initializeBusinessMetrics(_x10, _x11, _x12, _x13
|
|
9333
|
+
function initializeBusinessMetrics(_x9, _x10, _x11, _x12, _x13) {
|
|
9388
9334
|
return _initializeBusinessMetrics.apply(this, arguments);
|
|
9389
9335
|
}
|
|
9390
9336
|
return initializeBusinessMetrics;
|
|
@@ -9410,7 +9356,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9410
9356
|
case 10:
|
|
9411
9357
|
_context4.prev = 10;
|
|
9412
9358
|
_context4.t0 = _context4["catch"](0);
|
|
9413
|
-
LOG$
|
|
9359
|
+
LOG$4.errorTransaction('INITIALIZE_CORE', 'CORE_0002', 'Error initializing Organization');
|
|
9414
9360
|
this.loadingAndErrorStore.setError(_context4.t0, 'CORE_0002', true);
|
|
9415
9361
|
return _context4.abrupt("return");
|
|
9416
9362
|
case 15:
|
|
@@ -9419,7 +9365,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9419
9365
|
}
|
|
9420
9366
|
}, _callee4, this, [[0, 10]]);
|
|
9421
9367
|
}));
|
|
9422
|
-
function initializeAuthorization(
|
|
9368
|
+
function initializeAuthorization(_x14) {
|
|
9423
9369
|
return _initializeAuthorization.apply(this, arguments);
|
|
9424
9370
|
}
|
|
9425
9371
|
return initializeAuthorization;
|
|
@@ -9428,12 +9374,12 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9428
9374
|
key: "initalizeView",
|
|
9429
9375
|
value: function initalizeView() {
|
|
9430
9376
|
if (this.contentStore.currentComponent) {
|
|
9431
|
-
LOG$
|
|
9377
|
+
LOG$4.debug('View is already initialized');
|
|
9432
9378
|
return;
|
|
9433
9379
|
}
|
|
9434
9380
|
var initalComponent = this._initalComponent || this.configurationStore.defaultComponent;
|
|
9435
9381
|
if (initalComponent) {
|
|
9436
|
-
LOG$
|
|
9382
|
+
LOG$4.debug("Inital component", JSON.stringify(initalComponent, null, 2));
|
|
9437
9383
|
this.contentStore.openComponent(initalComponent);
|
|
9438
9384
|
} else {
|
|
9439
9385
|
this.loadingAndErrorStore.setError(new DivaError('No inital component available', {
|
|
@@ -9842,12 +9788,10 @@ function styleInject(css, ref) {
|
|
|
9842
9788
|
|
|
9843
9789
|
var overlay$2 = "overlay-X3zhH";
|
|
9844
9790
|
var loading = "loading-kAuhm";
|
|
9845
|
-
var
|
|
9846
|
-
var statusText = "statusText-guHKc";
|
|
9847
|
-
var css_248z$5 = ".overlay-X3zhH {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 15000;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.loading-kAuhm {\n margin: 0 auto;\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.loading-kAuhm div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #b6b6b6;\n border-radius: 50%;\n animation: loading-kAuhm 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #b6b6b6 transparent transparent transparent;\n}\n.loading-kAuhm div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loading-kAuhm div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loading-kAuhm div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes loading-kAuhm {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.textContainer--pqsi {\n margin-top: 24px;\n text-align: center;\n min-height: 24px;\n position: relative;\n}\n\n.statusText-guHKc {\n font-family: inherit;\n font-size: 14px;\n color: #555;\n letter-spacing: 0.2px;\n animation: textFadeIn-XQtVF 0.4s ease-out;\n}\n\n@keyframes textFadeIn-XQtVF {\n 0% {\n opacity: 0;\n transform: translateY(6px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes textCrossfade-zwWrn {\n 0%,\n 8% {\n opacity: 0;\n transform: translateY(6px);\n }\n 16%,\n 84% {\n opacity: 1;\n transform: translateY(0);\n }\n 92%,\n 100% {\n opacity: 0;\n transform: translateY(-6px);\n }\n}\n";
|
|
9791
|
+
var css_248z$5 = ".overlay-X3zhH {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 15000;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.loading-kAuhm {\n margin: 0 auto;\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.loading-kAuhm div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #b6b6b6;\n border-radius: 50%;\n animation: loading-kAuhm 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #b6b6b6 transparent transparent transparent;\n}\n.loading-kAuhm div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loading-kAuhm div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loading-kAuhm div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes loading-kAuhm {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
9848
9792
|
styleInject(css_248z$5);
|
|
9849
9793
|
|
|
9850
|
-
var LOG$
|
|
9794
|
+
var LOG$3 = getLogger('Framework', 'loadDependency');
|
|
9851
9795
|
function loadDependency(_x) {
|
|
9852
9796
|
return _loadDependency.apply(this, arguments);
|
|
9853
9797
|
}
|
|
@@ -9888,7 +9832,7 @@ function _loadDependency() {
|
|
|
9888
9832
|
resolve(id);
|
|
9889
9833
|
};
|
|
9890
9834
|
elem.onerror = function (e) {
|
|
9891
|
-
LOG$
|
|
9835
|
+
LOG$3.error(new DivaError('Failed to load dependency: ' + type, {
|
|
9892
9836
|
cause: e
|
|
9893
9837
|
}));
|
|
9894
9838
|
resolve(id);
|
|
@@ -9908,40 +9852,6 @@ function getCacheStamp() {
|
|
|
9908
9852
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
|
|
9909
9853
|
}
|
|
9910
9854
|
|
|
9911
|
-
var TEXT_CYCLE_INTERVAL_MS = 1500;
|
|
9912
|
-
function StatusTexts(_ref) {
|
|
9913
|
-
var texts = _ref.texts;
|
|
9914
|
-
var _useState = useState(0),
|
|
9915
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
9916
|
-
index = _useState2[0],
|
|
9917
|
-
setIndex = _useState2[1];
|
|
9918
|
-
var intervalRef = useRef(null);
|
|
9919
|
-
useEffect(function () {
|
|
9920
|
-
setIndex(0);
|
|
9921
|
-
}, [texts]);
|
|
9922
|
-
useEffect(function () {
|
|
9923
|
-
if (texts.length <= 1) return;
|
|
9924
|
-
intervalRef.current = setInterval(function () {
|
|
9925
|
-
setIndex(function (prev) {
|
|
9926
|
-
return (prev + 1) % texts.length;
|
|
9927
|
-
});
|
|
9928
|
-
}, TEXT_CYCLE_INTERVAL_MS);
|
|
9929
|
-
return function () {
|
|
9930
|
-
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
9931
|
-
};
|
|
9932
|
-
}, [texts]);
|
|
9933
|
-
if (texts.length === 0) return null;
|
|
9934
|
-
return /*#__PURE__*/jsx("div", {
|
|
9935
|
-
className: textContainer,
|
|
9936
|
-
children: /*#__PURE__*/jsx("span", {
|
|
9937
|
-
className: statusText,
|
|
9938
|
-
children: texts[index]
|
|
9939
|
-
}, "".concat(texts[index], "-").concat(index))
|
|
9940
|
-
});
|
|
9941
|
-
}
|
|
9942
|
-
|
|
9943
|
-
var SPINNER_DELAY_MS = 350;
|
|
9944
|
-
var LOG$3 = getLogger('Framework', 'Spinner');
|
|
9945
9855
|
function Spinner() {
|
|
9946
9856
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
9947
9857
|
loadingAndErrorStore = _useDivaCoreContext.loadingAndErrorStore;
|
|
@@ -9972,43 +9882,26 @@ function Spinner() {
|
|
|
9972
9882
|
}
|
|
9973
9883
|
}, [loadingAndErrorStore.customLoader.cssFile, loadingAndErrorStore.customLoader.spinnerClass]);
|
|
9974
9884
|
useEffect(function () {
|
|
9975
|
-
if (loadingAndErrorStore.isLoading &&
|
|
9976
|
-
if (throttleRef.current) clearTimeout(throttleRef.current);
|
|
9977
|
-
throttleRef.current = null;
|
|
9978
|
-
LOG$3.debug('Show spinner immediately because skipSpinnerDelay is active');
|
|
9979
|
-
setShowSpinner(true);
|
|
9980
|
-
} else if (loadingAndErrorStore.isLoading && throttleRef.current === null) {
|
|
9981
|
-
var scheduledAt = Date.now();
|
|
9982
|
-
LOG$3.debug("Schedule spinner show in ".concat(SPINNER_DELAY_MS, "ms"));
|
|
9885
|
+
if (loadingAndErrorStore.isLoading && throttleRef.current === null) {
|
|
9983
9886
|
throttleRef.current = setTimeout(function () {
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
setShowSpinner(true);
|
|
9987
|
-
}, SPINNER_DELAY_MS);
|
|
9887
|
+
return setShowSpinner(true);
|
|
9888
|
+
}, 350);
|
|
9988
9889
|
} else if (!loadingAndErrorStore.isLoading) {
|
|
9989
|
-
if (throttleRef.current)
|
|
9990
|
-
clearTimeout(throttleRef.current);
|
|
9991
|
-
LOG$3.debug('Cancel scheduled spinner show because loading ended');
|
|
9992
|
-
}
|
|
9890
|
+
if (throttleRef.current) clearTimeout(throttleRef.current);
|
|
9993
9891
|
throttleRef.current = null;
|
|
9994
|
-
LOG$3.debug('Hide spinner because loading ended');
|
|
9995
9892
|
setShowSpinner(false);
|
|
9996
9893
|
}
|
|
9997
|
-
}, [loadingAndErrorStore.isLoading
|
|
9998
|
-
|
|
9999
|
-
var shouldShowSpinner = loadingAndErrorStore.skipSpinnerDelay || showSpinner;
|
|
10000
|
-
if (!shouldShowSpinner) {
|
|
9894
|
+
}, [loadingAndErrorStore.isLoading]);
|
|
9895
|
+
if (!showSpinner) {
|
|
10001
9896
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
10002
9897
|
}
|
|
10003
|
-
return /*#__PURE__*/
|
|
9898
|
+
return /*#__PURE__*/jsx("div", {
|
|
10004
9899
|
className: overlay$2,
|
|
10005
9900
|
id: "diva-loader",
|
|
10006
|
-
children:
|
|
9901
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
10007
9902
|
className: className,
|
|
10008
9903
|
children: [/*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {})]
|
|
10009
|
-
})
|
|
10010
|
-
texts: activeTexts
|
|
10011
|
-
})]
|
|
9904
|
+
})
|
|
10012
9905
|
});
|
|
10013
9906
|
}
|
|
10014
9907
|
var Spinner$1 = observer(Spinner);
|
|
@@ -10399,7 +10292,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
|
|
|
10399
10292
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10400
10293
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10401
10294
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
10402
|
-
return import('./ModalsWrapper-
|
|
10295
|
+
return import('./ModalsWrapper-9e35ffa4.js');
|
|
10403
10296
|
});
|
|
10404
10297
|
function Fullscreen(_ref) {
|
|
10405
10298
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10859,10 +10752,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10859
10752
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10860
10753
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10861
10754
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10862
|
-
return import('./index-
|
|
10755
|
+
return import('./index-dc13c706.js');
|
|
10863
10756
|
});
|
|
10864
10757
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10865
|
-
return import('./ModalsWrapper-
|
|
10758
|
+
return import('./ModalsWrapper-9e35ffa4.js');
|
|
10866
10759
|
});
|
|
10867
10760
|
function ContentComponent() {
|
|
10868
10761
|
var context = useDivaCoreContext();
|
|
@@ -11641,9 +11534,9 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
11641
11534
|
throw new Error('Method not implemented.');
|
|
11642
11535
|
}
|
|
11643
11536
|
},
|
|
11644
|
-
toggleLoading: function toggleLoading(id, hidden, toggle
|
|
11537
|
+
toggleLoading: function toggleLoading(id, hidden, toggle) {
|
|
11645
11538
|
if (_this2.actions.toggleLoading) {
|
|
11646
|
-
_this2.actions.toggleLoading(id, hidden, toggle
|
|
11539
|
+
_this2.actions.toggleLoading(id, hidden, toggle);
|
|
11647
11540
|
} else {
|
|
11648
11541
|
throw new Error('Method not implemented.');
|
|
11649
11542
|
}
|