@crystaldesign/diva-core 26.4.3-rc.7 → 26.4.3-rc.9
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-f3b47634.js → ModalsWrapper-fc4051fc.js} +1 -1
- package/build/esm/{index-80f2a900.js → index-a468cb7a.js} +118 -94
- package/build/esm/{index-a3ebcd55.js → index-dc3c0f0d.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/types/core/src/elements/Spinner/index.d.ts.map +1 -1
- package/build/types/core/src/store/LoadingAndErrorStore.d.ts +3 -1
- package/build/types/core/src/store/LoadingAndErrorStore.d.ts.map +1 -1
- package/build/types/core/src/store/index.d.ts +2 -1
- package/build/types/core/src/store/index.d.ts.map +1 -1
- package/build/umd/diva-core.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
|
@@ -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.3-rc.
|
|
48
|
+
const env = {"STAGE":"production","VERSION":"26.4.3-rc.9"};
|
|
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$f = 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$f.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$e = 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$e.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$e.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$e.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$e.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$e.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$e.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$d = 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$d.debug('User did not change');
|
|
1590
1590
|
} else if (!user) {
|
|
1591
|
-
LOG$
|
|
1591
|
+
LOG$d.debug('User was removed');
|
|
1592
1592
|
} else if (user._id) {
|
|
1593
1593
|
var _this$_user2;
|
|
1594
|
-
LOG$
|
|
1594
|
+
LOG$d.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$d.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$d.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$d.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$d.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$d.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$d.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$c = 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$c.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$b = 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$b.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$a = getLogger('Framework', 'ContentStore');
|
|
2167
2167
|
var ALLOWED_WRAPPER_MODULES = ['ARCHIVE', 'PRODUCT_LIST'];
|
|
2168
2168
|
var ContentStore = /*#__PURE__*/function () {
|
|
2169
2169
|
function ContentStore(components, root) {
|
|
@@ -2316,7 +2316,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2316
2316
|
case 17:
|
|
2317
2317
|
_context.prev = 17;
|
|
2318
2318
|
_context.t0 = _context["catch"](8);
|
|
2319
|
-
LOG$
|
|
2319
|
+
LOG$a.error(_context.t0);
|
|
2320
2320
|
if (callback) {
|
|
2321
2321
|
callback(false);
|
|
2322
2322
|
} else {
|
|
@@ -2348,7 +2348,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2348
2348
|
this.root = root;
|
|
2349
2349
|
this.configuration = components;
|
|
2350
2350
|
if (window.customElements.get('model-viewer')) this._modelViewerHasLoaded = true;
|
|
2351
|
-
LOG$
|
|
2351
|
+
LOG$a.debug("Available Components: ".concat(components.map(function (c) {
|
|
2352
2352
|
return c.name;
|
|
2353
2353
|
})));
|
|
2354
2354
|
makeAutoObservable(this, {
|
|
@@ -2506,12 +2506,12 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2506
2506
|
case 3:
|
|
2507
2507
|
this.root.loadingAndErrorStore.setError(undefined);
|
|
2508
2508
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2509
|
-
LOG$
|
|
2509
|
+
LOG$a.debug('openComponent', toJS(action));
|
|
2510
2510
|
if (!action.url) {
|
|
2511
2511
|
_context3.next = 11;
|
|
2512
2512
|
break;
|
|
2513
2513
|
}
|
|
2514
|
-
LOG$
|
|
2514
|
+
LOG$a.businessEvent('onOpenModule', action.openInNewTab ? 'OpenUrlNewTab' : 'OpenUrl', "Open link ".concat(action.url), {
|
|
2515
2515
|
url: action.url
|
|
2516
2516
|
});
|
|
2517
2517
|
if (action.openInNewTab) {
|
|
@@ -2608,7 +2608,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2608
2608
|
_context3.next = 41;
|
|
2609
2609
|
break;
|
|
2610
2610
|
}
|
|
2611
|
-
LOG$
|
|
2611
|
+
LOG$a.debug("Component is restricted, open login form");
|
|
2612
2612
|
this._restrictedComponent = action;
|
|
2613
2613
|
this.root.authorizationStore.showLogin();
|
|
2614
2614
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
@@ -2633,7 +2633,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2633
2633
|
_context3.next = 51;
|
|
2634
2634
|
break;
|
|
2635
2635
|
}
|
|
2636
|
-
LOG$
|
|
2636
|
+
LOG$a.warn('Wrapper org restriction detected, redirecting to default module', {
|
|
2637
2637
|
requestedAction: toJS(action),
|
|
2638
2638
|
defaultComponent: toJS(defaultComponent),
|
|
2639
2639
|
organizationId: this.root.dataStore.organizationId
|
|
@@ -2667,7 +2667,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2667
2667
|
parameters = otherPrams;
|
|
2668
2668
|
}
|
|
2669
2669
|
module = this.mapTypeToModule((_config8 = config) === null || _config8 === void 0 ? void 0 : _config8.type);
|
|
2670
|
-
LOG$
|
|
2670
|
+
LOG$a.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
|
|
2671
2671
|
prevType = this.visible;
|
|
2672
2672
|
prevState = this.state.get(this.visible || '');
|
|
2673
2673
|
currentState = this.state.get(config.type);
|
|
@@ -2718,7 +2718,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2718
2718
|
return _regeneratorRuntime.wrap(function openComponentInFullscreen$(_context4) {
|
|
2719
2719
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2720
2720
|
case 0:
|
|
2721
|
-
LOG$
|
|
2721
|
+
LOG$a.debug('openComponentInFullscreen', toJS(component));
|
|
2722
2722
|
this.root.loadingAndErrorStore.setError(undefined);
|
|
2723
2723
|
type = component.type, parameters = component.parameters, internal = component.internal, route = component.route;
|
|
2724
2724
|
config = undefined;
|
|
@@ -2764,7 +2764,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2764
2764
|
settings = _context4.sent;
|
|
2765
2765
|
case 18:
|
|
2766
2766
|
module = this.mapTypeToModule((_config10 = config) === null || _config10 === void 0 ? void 0 : _config10.type);
|
|
2767
|
-
LOG$
|
|
2767
|
+
LOG$a.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
|
|
2768
2768
|
componentState = {
|
|
2769
2769
|
key: config.type,
|
|
2770
2770
|
parameters: parameters,
|
|
@@ -3550,7 +3550,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3550
3550
|
if (this.isAbsoluteFullscreenComponent) {
|
|
3551
3551
|
dimensions = calculateDimensions(window.innerWidth, window.innerHeight);
|
|
3552
3552
|
}
|
|
3553
|
-
LOG$
|
|
3553
|
+
LOG$a.debug("Detected dimensions: ".concat(JSON.stringify(dimensions, null, 2), " "));
|
|
3554
3554
|
return dimensions;
|
|
3555
3555
|
}
|
|
3556
3556
|
|
|
@@ -3561,7 +3561,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3561
3561
|
}, {
|
|
3562
3562
|
key: "resetState",
|
|
3563
3563
|
value: function resetState() {
|
|
3564
|
-
LOG$
|
|
3564
|
+
LOG$a.debug('Reset page state');
|
|
3565
3565
|
var prevType = this.visible;
|
|
3566
3566
|
var prevState = this.state.get(this.visible || '');
|
|
3567
3567
|
this.root.dataStore.clearSessionGuids();
|
|
@@ -3755,13 +3755,14 @@ function getLocalStorageToggle(key) {
|
|
|
3755
3755
|
}
|
|
3756
3756
|
|
|
3757
3757
|
var LOADING_TEXT_CLEAR_DELAY_MS = 1500;
|
|
3758
|
-
var LOG$
|
|
3758
|
+
var LOG$9 = getLogger('Framework', 'LoadingAndErrorStore');
|
|
3759
3759
|
var _default = /*#__PURE__*/function () {
|
|
3760
3760
|
function _default(root, spinnerClass) {
|
|
3761
3761
|
var _this = this;
|
|
3762
3762
|
_classCallCheck(this, _default);
|
|
3763
3763
|
this.root = root;
|
|
3764
3764
|
_defineProperty(this, "loading", new Map());
|
|
3765
|
+
_defineProperty(this, "loadingWithoutSpinnerDelay", new Set());
|
|
3765
3766
|
_defineProperty(this, "loadingTexts", new Map());
|
|
3766
3767
|
_defineProperty(this, "_lastTexts", []);
|
|
3767
3768
|
_defineProperty(this, "_textClearTimer", null);
|
|
@@ -3866,9 +3867,14 @@ var _default = /*#__PURE__*/function () {
|
|
|
3866
3867
|
}, {
|
|
3867
3868
|
key: "isLoading",
|
|
3868
3869
|
get: function get() {
|
|
3869
|
-
LOG$
|
|
3870
|
+
LOG$9.debug("isLoading: ".concat(this.loading.size, " [").concat(Array.from(this.loading.keys()).join(', '), "]"));
|
|
3870
3871
|
return this.loading.size != 0;
|
|
3871
3872
|
}
|
|
3873
|
+
}, {
|
|
3874
|
+
key: "skipSpinnerDelay",
|
|
3875
|
+
get: function get() {
|
|
3876
|
+
return this.loadingWithoutSpinnerDelay.size > 0;
|
|
3877
|
+
}
|
|
3872
3878
|
}, {
|
|
3873
3879
|
key: "error",
|
|
3874
3880
|
get: function get() {
|
|
@@ -3882,21 +3888,21 @@ var _default = /*#__PURE__*/function () {
|
|
|
3882
3888
|
this._errorMsg = undefined;
|
|
3883
3889
|
} else if (typeof error == 'string') {
|
|
3884
3890
|
this._errorMsg = error;
|
|
3885
|
-
LOG$
|
|
3891
|
+
LOG$9.error(new DivaError(error));
|
|
3886
3892
|
} else if (error.name == 'CORE_0005') {
|
|
3887
|
-
LOG$
|
|
3893
|
+
LOG$9.error(error);
|
|
3888
3894
|
this._errorMsg = this.root.t('core.error.page_not_found', {
|
|
3889
3895
|
defaultValue: 'Die Seite existiert nicht oder Sie haben nicht die benötigten Berechtigungen. Bei Fragen wenden Sie sich bitte an den Support.'
|
|
3890
3896
|
});
|
|
3891
3897
|
var conf = this.root.configurationStore.components;
|
|
3892
3898
|
console.log(conf);
|
|
3893
3899
|
} else if (error.name == 'CORE_0002') {
|
|
3894
|
-
LOG$
|
|
3900
|
+
LOG$9.error(error);
|
|
3895
3901
|
this._errorMsg = this.root.t('core.error.resource_not_found', {
|
|
3896
3902
|
defaultValue: 'Eine oder mehrere der benötigten Resource existiert nicht oder konnte nicht gefunden werden. Bei Fragen wenden Sie sich bitte an den Support.'
|
|
3897
3903
|
});
|
|
3898
3904
|
} else {
|
|
3899
|
-
LOG$
|
|
3905
|
+
LOG$9.error(error);
|
|
3900
3906
|
this._errorMsg = error.message;
|
|
3901
3907
|
}
|
|
3902
3908
|
if (this._errorMsg) {
|
|
@@ -3968,9 +3974,10 @@ var _default = /*#__PURE__*/function () {
|
|
|
3968
3974
|
}
|
|
3969
3975
|
}, {
|
|
3970
3976
|
key: "toggleLoading",
|
|
3971
|
-
value: function toggleLoading(id, hidden, toggle, texts) {
|
|
3977
|
+
value: function toggleLoading(id, hidden, toggle, texts, skipSpinnerDelay) {
|
|
3972
3978
|
if (this.loading.has(id) && toggle !== true) {
|
|
3973
3979
|
this.loading["delete"](id);
|
|
3980
|
+
this.loadingWithoutSpinnerDelay["delete"](id);
|
|
3974
3981
|
if (this.loadingTexts.has(id)) {
|
|
3975
3982
|
var snapshot = this.activeTexts;
|
|
3976
3983
|
this.loadingTexts["delete"](id);
|
|
@@ -3978,17 +3985,18 @@ var _default = /*#__PURE__*/function () {
|
|
|
3978
3985
|
this._lastTexts = snapshot;
|
|
3979
3986
|
}
|
|
3980
3987
|
}
|
|
3981
|
-
LOG$
|
|
3988
|
+
LOG$9.debug("End loading: ".concat(id, " [").concat(Array.from(this.loading.keys()), "]"));
|
|
3982
3989
|
} else if (!this.loading.has(id) && toggle !== false) {
|
|
3983
|
-
LOG$
|
|
3990
|
+
LOG$9.debug("Start loading: ".concat(id).concat(skipSpinnerDelay ? ' (skip spinner delay)' : ''));
|
|
3984
3991
|
this.loading.set(id, hidden == undefined ? false : hidden);
|
|
3992
|
+
if (skipSpinnerDelay) this.loadingWithoutSpinnerDelay.add(id);
|
|
3985
3993
|
if (texts !== null && texts !== void 0 && texts.length) this.loadingTexts.set(id, texts);
|
|
3986
3994
|
}
|
|
3987
3995
|
}
|
|
3988
3996
|
}]);
|
|
3989
3997
|
}();
|
|
3990
3998
|
|
|
3991
|
-
var LOG$
|
|
3999
|
+
var LOG$8 = getLogger('Framework', 'BrowserStateStore');
|
|
3992
4000
|
var BANNER_STATE_LOCALSTORAGE_KEY = 'diva-banner-state';
|
|
3993
4001
|
var NTOKEN_LOCALSTORAGE_KEY = 'diva-ntoken';
|
|
3994
4002
|
var ORGANIZATION_LOCALSTORAGE_KEY = 'diva-organization';
|
|
@@ -4302,7 +4310,7 @@ var BrowserStateStore = /*#__PURE__*/function () {
|
|
|
4302
4310
|
var _componentState$path;
|
|
4303
4311
|
var componentConfig = _this2.root.contentStore.currentComponent;
|
|
4304
4312
|
if (!componentConfig) {
|
|
4305
|
-
LOG$
|
|
4313
|
+
LOG$8.debug('No current component found, while updating url, do nothing');
|
|
4306
4314
|
return;
|
|
4307
4315
|
}
|
|
4308
4316
|
var componentState = _this2.root.contentStore.getState(componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.type);
|
|
@@ -4380,7 +4388,7 @@ var BrowserStateStore = /*#__PURE__*/function () {
|
|
|
4380
4388
|
|
|
4381
4389
|
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; }
|
|
4382
4390
|
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; }
|
|
4383
|
-
var LOG$
|
|
4391
|
+
var LOG$7 = getLogger('Framework', 'AuthorizationStore');
|
|
4384
4392
|
var AuthorizationStore = /*#__PURE__*/function () {
|
|
4385
4393
|
function AuthorizationStore(root) {
|
|
4386
4394
|
_classCallCheck(this, AuthorizationStore);
|
|
@@ -4571,14 +4579,14 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4571
4579
|
_context2.next = 6;
|
|
4572
4580
|
break;
|
|
4573
4581
|
}
|
|
4574
|
-
LOG$
|
|
4582
|
+
LOG$7.debug('NToken removed');
|
|
4575
4583
|
_context2.next = 4;
|
|
4576
4584
|
return this.root.authorizationStore.logout();
|
|
4577
4585
|
case 4:
|
|
4578
4586
|
_context2.next = 15;
|
|
4579
4587
|
break;
|
|
4580
4588
|
case 6:
|
|
4581
|
-
LOG$
|
|
4589
|
+
LOG$7.debug('NToken change detected, login');
|
|
4582
4590
|
_context2.next = 9;
|
|
4583
4591
|
return this.root.authorizationStore.autorize(this.root.dataStore.organizationId, this.root.browserStateStore.getStoredNToken());
|
|
4584
4592
|
case 9:
|
|
@@ -4631,7 +4639,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4631
4639
|
_context3.next = 21;
|
|
4632
4640
|
break;
|
|
4633
4641
|
}
|
|
4634
|
-
LOG$
|
|
4642
|
+
LOG$7.log('The stored organization is no longer valid, fallback to default organization');
|
|
4635
4643
|
//for anonymous users, we fallback to the 'default' organization for ohter users we let the backend determine the right organization
|
|
4636
4644
|
_context3.next = 18;
|
|
4637
4645
|
return this.autorize(nToken ? undefined : this.root.configurationStore.organizations[0], nToken);
|
|
@@ -4642,7 +4650,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4642
4650
|
_context3.next = 26;
|
|
4643
4651
|
break;
|
|
4644
4652
|
}
|
|
4645
|
-
LOG$
|
|
4653
|
+
LOG$7.log('Authentication expired or invalid, logging out.');
|
|
4646
4654
|
_context3.next = 25;
|
|
4647
4655
|
return this.logout(true, true, organizationId);
|
|
4648
4656
|
case 25:
|
|
@@ -4742,7 +4750,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4742
4750
|
_context5.next = 19;
|
|
4743
4751
|
break;
|
|
4744
4752
|
}
|
|
4745
|
-
LOG$
|
|
4753
|
+
LOG$7.log('The stored organization is no longer valid, fallback to default organization');
|
|
4746
4754
|
_context5.next = 18;
|
|
4747
4755
|
return this.login(email, password, loginSimple, undefined);
|
|
4748
4756
|
case 18:
|
|
@@ -4802,7 +4810,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4802
4810
|
this._timeout = undefined;
|
|
4803
4811
|
}
|
|
4804
4812
|
refreshTokenIn = zExpireBy - 1000 * 60 * 5 - Date.now(); //refresh 5 minutes before expire
|
|
4805
|
-
LOG$
|
|
4813
|
+
LOG$7.debug("Set token refresh interval to ".concat(refreshTokenIn, " ms. Refresh at ").concat(new Date(Date.now() + refreshTokenIn)));
|
|
4806
4814
|
|
|
4807
4815
|
//set the timout to refresh token
|
|
4808
4816
|
this._timeout = setTimeout(function () {
|
|
@@ -7778,7 +7786,7 @@ var SupportHandler = /*#__PURE__*/function () {
|
|
|
7778
7786
|
}]);
|
|
7779
7787
|
}();
|
|
7780
7788
|
|
|
7781
|
-
var LOG$
|
|
7789
|
+
var LOG$6 = getLogger('Framework', 'AuthorizationHandler');
|
|
7782
7790
|
var AuthorizationHandler = /*#__PURE__*/function () {
|
|
7783
7791
|
function AuthorizationHandler(root) {
|
|
7784
7792
|
_classCallCheck(this, AuthorizationHandler);
|
|
@@ -7829,7 +7837,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7829
7837
|
if (res.status !== 200) {
|
|
7830
7838
|
throw new Error('Error updating online state');
|
|
7831
7839
|
}
|
|
7832
|
-
LOG$
|
|
7840
|
+
LOG$6.debug('Updating online state.');
|
|
7833
7841
|
});
|
|
7834
7842
|
case 6:
|
|
7835
7843
|
_context.sent;
|
|
@@ -7838,7 +7846,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7838
7846
|
case 9:
|
|
7839
7847
|
_context.prev = 9;
|
|
7840
7848
|
_context.t0 = _context["catch"](3);
|
|
7841
|
-
LOG$
|
|
7849
|
+
LOG$6.error(new DivaError('Error updating online state', {
|
|
7842
7850
|
cause: _context.t0
|
|
7843
7851
|
}));
|
|
7844
7852
|
case 12:
|
|
@@ -8427,7 +8435,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
8427
8435
|
case 13:
|
|
8428
8436
|
_context10.prev = 13;
|
|
8429
8437
|
_context10.t0 = _context10["catch"](0);
|
|
8430
|
-
LOG$
|
|
8438
|
+
LOG$6.error(new DivaError('Error updating user language', {
|
|
8431
8439
|
cause: _context10.t0
|
|
8432
8440
|
}));
|
|
8433
8441
|
case 16:
|
|
@@ -8602,7 +8610,7 @@ var AIHandler = /*#__PURE__*/function () {
|
|
|
8602
8610
|
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; }
|
|
8603
8611
|
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; }
|
|
8604
8612
|
var LOGINMODE_LOCALSTORAGE_KEY = 'diva-login-mode';
|
|
8605
|
-
var LOG$
|
|
8613
|
+
var LOG$5 = getLogger('Framework', 'root');
|
|
8606
8614
|
var RootStore = /*#__PURE__*/function () {
|
|
8607
8615
|
function RootStore(_ref) {
|
|
8608
8616
|
var _ref2,
|
|
@@ -8727,7 +8735,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8727
8735
|
this.loadingAndErrorStore.toggleLoading('language');
|
|
8728
8736
|
instance.changeLanguage(lang, function (err) {
|
|
8729
8737
|
if (err) {
|
|
8730
|
-
LOG$
|
|
8738
|
+
LOG$5.error(new DivaError('Could not change language', {
|
|
8731
8739
|
cause: err,
|
|
8732
8740
|
code: 'CORE_0007'
|
|
8733
8741
|
}));
|
|
@@ -8997,7 +9005,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8997
9005
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8998
9006
|
while (1) switch (_context.prev = _context.next) {
|
|
8999
9007
|
case 0:
|
|
9000
|
-
LOG$
|
|
9008
|
+
LOG$5.startTransaction({
|
|
9001
9009
|
event: 'initCore',
|
|
9002
9010
|
message: 'Initalizing Core',
|
|
9003
9011
|
labels: {
|
|
@@ -9016,7 +9024,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9016
9024
|
_this4._initializing = true;
|
|
9017
9025
|
});
|
|
9018
9026
|
this.loadingAndErrorStore.toggleLoading('initalize', true, undefined, initialLoadingTexts);
|
|
9019
|
-
LOG$
|
|
9027
|
+
LOG$5.successTransaction('UNTIL_INIT');
|
|
9020
9028
|
_context.next = 7;
|
|
9021
9029
|
return this.browserStateStore.loadUrlState();
|
|
9022
9030
|
case 7:
|
|
@@ -9027,7 +9035,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9027
9035
|
if (organizationId) {
|
|
9028
9036
|
initAuthPromise = this.initializeAuthorization(organizationId);
|
|
9029
9037
|
}
|
|
9030
|
-
LOG$
|
|
9038
|
+
LOG$5.startTransaction({
|
|
9031
9039
|
event: 'onLoadConfig',
|
|
9032
9040
|
message: 'loading Config',
|
|
9033
9041
|
eventId: 'LOAD_CONFIG'
|
|
@@ -9051,8 +9059,8 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9051
9059
|
//open default route
|
|
9052
9060
|
this._initalComponent = undefined;
|
|
9053
9061
|
}
|
|
9054
|
-
LOG$
|
|
9055
|
-
LOG$
|
|
9062
|
+
LOG$5.successTransaction('LOAD_CONFIG');
|
|
9063
|
+
LOG$5.startTransaction({
|
|
9056
9064
|
event: 'onLoadServerData',
|
|
9057
9065
|
message: 'load server data',
|
|
9058
9066
|
eventId: 'LOAD_SERVER_DATA'
|
|
@@ -9077,8 +9085,8 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9077
9085
|
}
|
|
9078
9086
|
});
|
|
9079
9087
|
});
|
|
9080
|
-
LOG$
|
|
9081
|
-
LOG$
|
|
9088
|
+
LOG$5.successTransaction('LOAD_SERVER_DATA');
|
|
9089
|
+
LOG$5.startTransaction({
|
|
9082
9090
|
event: 'onLoadUserData',
|
|
9083
9091
|
message: 'load user data',
|
|
9084
9092
|
eventId: 'LOAD_USER_DATA'
|
|
@@ -9096,7 +9104,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9096
9104
|
break;
|
|
9097
9105
|
case 33:
|
|
9098
9106
|
if (authObject.error) {
|
|
9099
|
-
LOG$
|
|
9107
|
+
LOG$5.errorTransaction('LOAD_USER_DATA', (_authObject$code = authObject.code) !== null && _authObject$code !== void 0 ? _authObject$code : 'CORE_0006', authObject.error);
|
|
9100
9108
|
this.authorizationStore.showLogin(false, true);
|
|
9101
9109
|
} else {
|
|
9102
9110
|
if (urlState !== null && urlState !== void 0 && urlState.provider) {
|
|
@@ -9107,7 +9115,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9107
9115
|
return _context.abrupt("break", 50);
|
|
9108
9116
|
case 35:
|
|
9109
9117
|
if (authObject.error) {
|
|
9110
|
-
LOG$
|
|
9118
|
+
LOG$5.errorTransaction('LOAD_USER_DATA', (_authObject$code2 = authObject.code) !== null && _authObject$code2 !== void 0 ? _authObject$code2 : 'CORE_0006', authObject.error);
|
|
9111
9119
|
this.loadingAndErrorStore.setError(authObject.error);
|
|
9112
9120
|
} else {
|
|
9113
9121
|
this.authorizationStore.showChangePassword(authObject.token);
|
|
@@ -9115,7 +9123,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9115
9123
|
return _context.abrupt("break", 50);
|
|
9116
9124
|
case 37:
|
|
9117
9125
|
if (authObject.error) {
|
|
9118
|
-
LOG$
|
|
9126
|
+
LOG$5.errorTransaction('LOAD_USER_DATA', (_authObject$code3 = authObject.code) !== null && _authObject$code3 !== void 0 ? _authObject$code3 : 'CORE_0006', authObject.error);
|
|
9119
9127
|
this.loadingAndErrorStore.setError(authObject.error);
|
|
9120
9128
|
} else {
|
|
9121
9129
|
verifyEmailToken = authObject.token;
|
|
@@ -9126,7 +9134,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9126
9134
|
_context.next = 44;
|
|
9127
9135
|
break;
|
|
9128
9136
|
}
|
|
9129
|
-
LOG$
|
|
9137
|
+
LOG$5.errorTransaction('LOAD_INVITATION', (_authObject$code4 = authObject.code) !== null && _authObject$code4 !== void 0 ? _authObject$code4 : 'CORE_0006', authObject.error);
|
|
9130
9138
|
this.loadingAndErrorStore.setError(authObject.error);
|
|
9131
9139
|
_context.next = 48;
|
|
9132
9140
|
break;
|
|
@@ -9147,7 +9155,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9147
9155
|
_context.next = 52;
|
|
9148
9156
|
break;
|
|
9149
9157
|
case 52:
|
|
9150
|
-
LOG$
|
|
9158
|
+
LOG$5.successTransaction('LOAD_USER_DATA');
|
|
9151
9159
|
if (!initAuthPromise) {
|
|
9152
9160
|
_context.next = 59;
|
|
9153
9161
|
break;
|
|
@@ -9224,18 +9232,18 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9224
9232
|
_context.prev = 78;
|
|
9225
9233
|
_context.t1 = _context["catch"](27);
|
|
9226
9234
|
if (_context.t1 instanceof DivaError && _context.t1.name == 'AUTH_0006') {
|
|
9227
|
-
LOG$
|
|
9235
|
+
LOG$5.errorTransaction('INITIALIZE_CORE', 'AUTH_0006', 'Existing verification token not valid.');
|
|
9228
9236
|
} else {
|
|
9229
|
-
LOG$
|
|
9237
|
+
LOG$5.errorTransaction('INITIALIZE_CORE', 'CORE_0006', 'An error occured during initialization.');
|
|
9230
9238
|
}
|
|
9231
9239
|
case 81:
|
|
9232
9240
|
this.initalizeView();
|
|
9233
9241
|
if (this.jwt) {
|
|
9234
9242
|
DivaUtils.businessMetrics.jwtSetter = this.jwt;
|
|
9235
9243
|
} else {
|
|
9236
|
-
LOG$
|
|
9244
|
+
LOG$5.debug('No JWT available for Loging');
|
|
9237
9245
|
}
|
|
9238
|
-
LOG$
|
|
9246
|
+
LOG$5.successTransaction('INITIALIZE_CORE', {
|
|
9239
9247
|
identifier: identifier,
|
|
9240
9248
|
organizationId: this.dataStore.organizationId,
|
|
9241
9249
|
domain: domain,
|
|
@@ -9249,7 +9257,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9249
9257
|
_context.t2 = _context["catch"](1);
|
|
9250
9258
|
this.loadingAndErrorStore.toggleLoading('initalize', false);
|
|
9251
9259
|
this.loadingAndErrorStore.setError(_context.t2);
|
|
9252
|
-
LOG$
|
|
9260
|
+
LOG$5.errorTransaction('INITIALIZE_CORE', 'CORE_0000', _context.t2.message, {
|
|
9253
9261
|
identifier: identifier,
|
|
9254
9262
|
organizationId: this.dataStore.organizationId,
|
|
9255
9263
|
domain: domain,
|
|
@@ -9316,7 +9324,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9316
9324
|
_this5.initializeBusinessMetrics(telemetry, environment, applicationEnvironment, telemetrySettings, analyticsProps);
|
|
9317
9325
|
}
|
|
9318
9326
|
}, function (reason) {
|
|
9319
|
-
LOG$
|
|
9327
|
+
LOG$5.error(new DivaError('Cookiebot initialization failed', {
|
|
9320
9328
|
code: 'CORE_0009',
|
|
9321
9329
|
custom: {
|
|
9322
9330
|
reason: reason
|
|
@@ -9402,7 +9410,7 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9402
9410
|
case 10:
|
|
9403
9411
|
_context4.prev = 10;
|
|
9404
9412
|
_context4.t0 = _context4["catch"](0);
|
|
9405
|
-
LOG$
|
|
9413
|
+
LOG$5.errorTransaction('INITIALIZE_CORE', 'CORE_0002', 'Error initializing Organization');
|
|
9406
9414
|
this.loadingAndErrorStore.setError(_context4.t0, 'CORE_0002', true);
|
|
9407
9415
|
return _context4.abrupt("return");
|
|
9408
9416
|
case 15:
|
|
@@ -9420,12 +9428,12 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
9420
9428
|
key: "initalizeView",
|
|
9421
9429
|
value: function initalizeView() {
|
|
9422
9430
|
if (this.contentStore.currentComponent) {
|
|
9423
|
-
LOG$
|
|
9431
|
+
LOG$5.debug('View is already initialized');
|
|
9424
9432
|
return;
|
|
9425
9433
|
}
|
|
9426
9434
|
var initalComponent = this._initalComponent || this.configurationStore.defaultComponent;
|
|
9427
9435
|
if (initalComponent) {
|
|
9428
|
-
LOG$
|
|
9436
|
+
LOG$5.debug("Inital component", JSON.stringify(initalComponent, null, 2));
|
|
9429
9437
|
this.contentStore.openComponent(initalComponent);
|
|
9430
9438
|
} else {
|
|
9431
9439
|
this.loadingAndErrorStore.setError(new DivaError('No inital component available', {
|
|
@@ -9839,7 +9847,7 @@ var statusText = "statusText-guHKc";
|
|
|
9839
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";
|
|
9840
9848
|
styleInject(css_248z$5);
|
|
9841
9849
|
|
|
9842
|
-
var LOG$
|
|
9850
|
+
var LOG$4 = getLogger('Framework', 'loadDependency');
|
|
9843
9851
|
function loadDependency(_x) {
|
|
9844
9852
|
return _loadDependency.apply(this, arguments);
|
|
9845
9853
|
}
|
|
@@ -9880,7 +9888,7 @@ function _loadDependency() {
|
|
|
9880
9888
|
resolve(id);
|
|
9881
9889
|
};
|
|
9882
9890
|
elem.onerror = function (e) {
|
|
9883
|
-
LOG$
|
|
9891
|
+
LOG$4.error(new DivaError('Failed to load dependency: ' + type, {
|
|
9884
9892
|
cause: e
|
|
9885
9893
|
}));
|
|
9886
9894
|
resolve(id);
|
|
@@ -9932,6 +9940,8 @@ function StatusTexts(_ref) {
|
|
|
9932
9940
|
});
|
|
9933
9941
|
}
|
|
9934
9942
|
|
|
9943
|
+
var SPINNER_DELAY_MS = 350;
|
|
9944
|
+
var LOG$3 = getLogger('Framework', 'Spinner');
|
|
9935
9945
|
function Spinner() {
|
|
9936
9946
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
9937
9947
|
loadingAndErrorStore = _useDivaCoreContext.loadingAndErrorStore;
|
|
@@ -9962,18 +9972,32 @@ function Spinner() {
|
|
|
9962
9972
|
}
|
|
9963
9973
|
}, [loadingAndErrorStore.customLoader.cssFile, loadingAndErrorStore.customLoader.spinnerClass]);
|
|
9964
9974
|
useEffect(function () {
|
|
9965
|
-
if (loadingAndErrorStore.isLoading &&
|
|
9975
|
+
if (loadingAndErrorStore.isLoading && loadingAndErrorStore.skipSpinnerDelay) {
|
|
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"));
|
|
9966
9983
|
throttleRef.current = setTimeout(function () {
|
|
9967
|
-
|
|
9968
|
-
|
|
9984
|
+
throttleRef.current = null;
|
|
9985
|
+
LOG$3.debug("Show spinner after ".concat(Date.now() - scheduledAt, "ms delay"));
|
|
9986
|
+
setShowSpinner(true);
|
|
9987
|
+
}, SPINNER_DELAY_MS);
|
|
9969
9988
|
} else if (!loadingAndErrorStore.isLoading) {
|
|
9970
|
-
if (throttleRef.current)
|
|
9989
|
+
if (throttleRef.current) {
|
|
9990
|
+
clearTimeout(throttleRef.current);
|
|
9991
|
+
LOG$3.debug('Cancel scheduled spinner show because loading ended');
|
|
9992
|
+
}
|
|
9971
9993
|
throttleRef.current = null;
|
|
9994
|
+
LOG$3.debug('Hide spinner because loading ended');
|
|
9972
9995
|
setShowSpinner(false);
|
|
9973
9996
|
}
|
|
9974
|
-
}, [loadingAndErrorStore.isLoading]);
|
|
9997
|
+
}, [loadingAndErrorStore.isLoading, loadingAndErrorStore.skipSpinnerDelay]);
|
|
9975
9998
|
var activeTexts = loadingAndErrorStore.activeTexts;
|
|
9976
|
-
|
|
9999
|
+
var shouldShowSpinner = loadingAndErrorStore.skipSpinnerDelay || showSpinner;
|
|
10000
|
+
if (!shouldShowSpinner) {
|
|
9977
10001
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
9978
10002
|
}
|
|
9979
10003
|
return /*#__PURE__*/jsxs("div", {
|
|
@@ -10375,7 +10399,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
|
|
|
10375
10399
|
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; }
|
|
10376
10400
|
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; }
|
|
10377
10401
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
10378
|
-
return import('./ModalsWrapper-
|
|
10402
|
+
return import('./ModalsWrapper-fc4051fc.js');
|
|
10379
10403
|
});
|
|
10380
10404
|
function Fullscreen(_ref) {
|
|
10381
10405
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10835,10 +10859,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10835
10859
|
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; }
|
|
10836
10860
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10837
10861
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10838
|
-
return import('./index-
|
|
10862
|
+
return import('./index-dc3c0f0d.js');
|
|
10839
10863
|
});
|
|
10840
10864
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10841
|
-
return import('./ModalsWrapper-
|
|
10865
|
+
return import('./ModalsWrapper-fc4051fc.js');
|
|
10842
10866
|
});
|
|
10843
10867
|
function ContentComponent() {
|
|
10844
10868
|
var context = useDivaCoreContext();
|
|
@@ -11617,9 +11641,9 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
11617
11641
|
throw new Error('Method not implemented.');
|
|
11618
11642
|
}
|
|
11619
11643
|
},
|
|
11620
|
-
toggleLoading: function toggleLoading(id, hidden, toggle) {
|
|
11644
|
+
toggleLoading: function toggleLoading(id, hidden, toggle, texts, skipSpinnerDelay) {
|
|
11621
11645
|
if (_this2.actions.toggleLoading) {
|
|
11622
|
-
_this2.actions.toggleLoading(id, hidden, toggle);
|
|
11646
|
+
_this2.actions.toggleLoading(id, hidden, toggle, texts, skipSpinnerDelay);
|
|
11623
11647
|
} else {
|
|
11624
11648
|
throw new Error('Method not implemented.');
|
|
11625
11649
|
}
|