@crystaldesign/diva-core 26.5.0-beta.5 → 26.5.0-beta.50

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.
Files changed (29) hide show
  1. package/build/esm/{ModalsWrapper-1a9f0258.js → ModalsWrapper-7f669c55.js} +4 -1
  2. package/build/esm/{index-88c88835.js → index-98d97ead.js} +296 -172
  3. package/build/esm/{index-1c514085.js → index-f22c0e91.js} +1 -1
  4. package/build/esm/index.js +1 -1
  5. package/build/types/core/src/elements/Modal/index.d.ts.map +1 -1
  6. package/build/types/core/src/elements/Spinner/StatusTexts.d.ts +5 -0
  7. package/build/types/core/src/elements/Spinner/StatusTexts.d.ts.map +1 -0
  8. package/build/types/core/src/elements/Spinner/index.d.ts.map +1 -1
  9. package/build/types/core/src/externalTypes.d.ts +2 -1
  10. package/build/types/core/src/externalTypes.d.ts.map +1 -1
  11. package/build/types/core/src/handler/AIHandler/index.d.ts +3 -1
  12. package/build/types/core/src/handler/AIHandler/index.d.ts.map +1 -1
  13. package/build/types/core/src/store/ContentStore.d.ts +1 -0
  14. package/build/types/core/src/store/ContentStore.d.ts.map +1 -1
  15. package/build/types/core/src/store/LoadingAndErrorStore.d.ts +7 -1
  16. package/build/types/core/src/store/LoadingAndErrorStore.d.ts.map +1 -1
  17. package/build/types/core/src/store/RootStore.d.ts +1 -1
  18. package/build/types/core/src/store/RootStore.d.ts.map +1 -1
  19. package/build/types/core/src/store/index.d.ts +5 -2
  20. package/build/types/core/src/store/index.d.ts.map +1 -1
  21. package/build/umd/541.diva-core.umd.min.js +1 -1
  22. package/build/umd/643.diva-core.umd.min.js +1 -1
  23. package/build/umd/662.diva-core.umd.min.js +1 -1
  24. package/build/umd/858.diva-core.umd.min.js +1 -1
  25. package/build/umd/911.diva-core.umd.min.js +1 -1
  26. package/build/umd/935.diva-core.umd.min.js +1 -1
  27. package/build/umd/diva-core.umd.min.js +3 -3
  28. package/build/umd/report.html +1 -1
  29. package/package.json +11 -11
@@ -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, makeObservable, runInAction } from 'mobx';
20
+ import { makeAutoObservable, flow, flowResult, toJS, observable, computed, reaction, autorun, action, runInAction, makeObservable } 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.5.0-beta.5"};
48
+ const env = {"STAGE":"production","VERSION":"26.5.0-beta.50"};
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$e = getLogger('Framework', 'webcomponent');
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$e.debug('Loading UMD Component', key, window[key]);
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$d = getLogger('Framework', 'ConfigurationStore');
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$d.debug("Fetching configuration for ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
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$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));
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$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));
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$d.error(new DivaError('Error while fetching configuration', {
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$d.error(new DivaError("Error while fetching configuration for ".concat(subType), {
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$d.debug("Loaded configuration from service ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
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$c = getLogger('Framework', 'DataStore');
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$c.debug('User did not change');
1589
+ LOG$d.debug('User did not change');
1590
1590
  } else if (!user) {
1591
- LOG$c.debug('User was removed');
1591
+ LOG$d.debug('User was removed');
1592
1592
  } else if (user._id) {
1593
1593
  var _this$_user2;
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));
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$c.debug("Found Session GUID in store for ".concat(sessionKey));
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$c.debug("No Session GUID found in store for ".concat(sessionKey), toJS(this._sessionGuids));
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$c.debug("Fetched new session GUID from api for ".concat(sessionKey));
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$c.debug("Organization changed from ".concat(prevOrganization, " to ").concat(organizationId));
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$c.debug("Organization did not change.");
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$c.warn('Could not fetch organization tree');
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$b = getLogger('Framework', 'root');
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$b.error(new DivaError('Error while rendring in Core', {
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$a = getLogger('Framework', 'root');
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$a.successTransaction('UNTIL_RENDER');
1995
+ LOG$b.successTransaction('UNTIL_RENDER');
1996
1996
  }, []);
1997
1997
  return /*#__PURE__*/jsx(DivaCoreProvider, _objectSpread$b(_objectSpread$b({}, props), {}, {
1998
1998
  ref: ref,
@@ -2163,8 +2163,8 @@ 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$9 = getLogger('Framework', 'ContentStore');
2167
- var ALLOWED_WRAPPER_MODULES = ['ARCHIVE', 'PRODUCT_LIST'];
2166
+ var LOG$a = getLogger('Framework', 'ContentStore');
2167
+ var ALLOWED_WRAPPER_MODULES = ['ARCHIVE', 'PRODUCT_LIST', 'SALES_MANAGER'];
2168
2168
  var ContentStore = /*#__PURE__*/function () {
2169
2169
  function ContentStore(components, root) {
2170
2170
  var _this = this;
@@ -2195,6 +2195,8 @@ 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);
2198
2200
  _defineProperty(this, "mapTypeToModule", function (type) {
2199
2201
  switch (type) {
2200
2202
  case 'START_PAGE':
@@ -2314,7 +2316,7 @@ var ContentStore = /*#__PURE__*/function () {
2314
2316
  case 17:
2315
2317
  _context.prev = 17;
2316
2318
  _context.t0 = _context["catch"](8);
2317
- LOG$9.error(_context.t0);
2319
+ LOG$a.error(_context.t0);
2318
2320
  if (callback) {
2319
2321
  callback(false);
2320
2322
  } else {
@@ -2346,7 +2348,7 @@ var ContentStore = /*#__PURE__*/function () {
2346
2348
  this.root = root;
2347
2349
  this.configuration = components;
2348
2350
  if (window.customElements.get('model-viewer')) this._modelViewerHasLoaded = true;
2349
- LOG$9.debug("Available Components: ".concat(components.map(function (c) {
2351
+ LOG$a.debug("Available Components: ".concat(components.map(function (c) {
2350
2352
  return c.name;
2351
2353
  })));
2352
2354
  makeAutoObservable(this, {
@@ -2366,6 +2368,7 @@ var ContentStore = /*#__PURE__*/function () {
2366
2368
  _drawerMenu: observable.ref,
2367
2369
  resizeObserver: false,
2368
2370
  _currentlyRendered: false,
2371
+ _fullscreenRender: false,
2369
2372
  openComponent: flow,
2370
2373
  openComponentInFullscreen: flow,
2371
2374
  getState: false
@@ -2490,7 +2493,7 @@ var ContentStore = /*#__PURE__*/function () {
2490
2493
  _config6,
2491
2494
  _config8,
2492
2495
  _config9;
2493
- var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref4, type, identifier, parameters, internal, route, openInFullscreen, keepOldState, config, parent, _this$root$dataStore$, _this$root$dataStore$2, _config4, newTab, _config7, base, defaultComponent, canOpenDefault, settings, openModuleLables, _parameters, otherPrams, module, prevType, prevState, currentState, componentState;
2496
+ var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref4, type, identifier, parameters, internal, route, openInFullscreen, keepOldState, config, fsc, parent, _this$root$dataStore$, _this$root$dataStore$2, _config4, newTab, _config7, base, defaultComponent, canOpenDefault, settings, openModuleLables, _parameters, otherPrams, module, prevType, prevState, currentState, componentState;
2494
2497
  return _regeneratorRuntime.wrap(function openComponent$(_context3) {
2495
2498
  while (1) switch (_context3.prev = _context3.next) {
2496
2499
  case 0:
@@ -2503,12 +2506,12 @@ var ContentStore = /*#__PURE__*/function () {
2503
2506
  case 3:
2504
2507
  this.root.loadingAndErrorStore.setError(undefined);
2505
2508
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2506
- LOG$9.debug('openComponent', toJS(action));
2509
+ LOG$a.debug('openComponent', toJS(action));
2507
2510
  if (!action.url) {
2508
2511
  _context3.next = 11;
2509
2512
  break;
2510
2513
  }
2511
- LOG$9.businessEvent('onOpenModule', action.openInNewTab ? 'OpenUrlNewTab' : 'OpenUrl', "Open link ".concat(action.url), {
2514
+ LOG$a.businessEvent('onOpenModule', action.openInNewTab ? 'OpenUrlNewTab' : 'OpenUrl', "Open link ".concat(action.url), {
2512
2515
  url: action.url
2513
2516
  });
2514
2517
  if (action.openInNewTab) {
@@ -2529,6 +2532,18 @@ var ContentStore = /*#__PURE__*/function () {
2529
2532
  this.openComponentInFullscreen(action);
2530
2533
  return _context3.abrupt("return");
2531
2534
  case 16:
2535
+ fsc = this._fullscreenComponent;
2536
+ if (!(fsc && fsc.key === type)) {
2537
+ _context3.next = 21;
2538
+ break;
2539
+ }
2540
+ this._fullscreenComponent = _objectSpread$a(_objectSpread$a({}, fsc), {}, {
2541
+ parameters: parameters,
2542
+ internal: internal !== null && internal !== void 0 ? internal : fsc.internal
2543
+ });
2544
+ this.root.loadingAndErrorStore.toggleLoading('openComponent');
2545
+ return _context3.abrupt("return");
2546
+ case 21:
2532
2547
  if (type) {
2533
2548
  config = this.availableComponents.find(function (c) {
2534
2549
  return c.type == type && (!identifier || c.identifier == identifier);
@@ -2539,7 +2554,7 @@ var ContentStore = /*#__PURE__*/function () {
2539
2554
  });
2540
2555
  }
2541
2556
  if (!(((_config2 = config) === null || _config2 === void 0 ? void 0 : _config2.type) == 'CATEGORY_MANAGER' || ((_config3 = config) === null || _config3 === void 0 ? void 0 : _config3.type) == 'ASSORTMENT_MANAGER')) {
2542
- _context3.next = 24;
2557
+ _context3.next = 29;
2543
2558
  break;
2544
2559
  }
2545
2560
  parent = undefined;
@@ -2553,7 +2568,7 @@ var ContentStore = /*#__PURE__*/function () {
2553
2568
  });
2554
2569
  }
2555
2570
  if (!parent) {
2556
- _context3.next = 24;
2571
+ _context3.next = 29;
2557
2572
  break;
2558
2573
  }
2559
2574
  this.openModal({
@@ -2578,33 +2593,33 @@ var ContentStore = /*#__PURE__*/function () {
2578
2593
  });
2579
2594
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2580
2595
  return _context3.abrupt("return");
2581
- case 24:
2596
+ case 29:
2582
2597
  newTab = action.openInNewTab || ((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.openInNewTab);
2583
2598
  if (!newTab) {
2584
- _context3.next = 30;
2599
+ _context3.next = 35;
2585
2600
  break;
2586
2601
  }
2587
2602
  base = typeof action.openInNewTab == 'string' ? action.openInNewTab : window.origin;
2588
2603
  this.openInNewTab(action, "".concat(base).concat(((_config7 = config) === null || _config7 === void 0 ? void 0 : _config7.route) || ''));
2589
2604
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2590
2605
  return _context3.abrupt("return");
2591
- case 30:
2606
+ case 35:
2592
2607
  if (!(!this.root.dataStore.user && !this.isPublic(action))) {
2593
- _context3.next = 36;
2608
+ _context3.next = 41;
2594
2609
  break;
2595
2610
  }
2596
- LOG$9.debug("Component is restricted, open login form");
2611
+ LOG$a.debug("Component is restricted, open login form");
2597
2612
  this._restrictedComponent = action;
2598
2613
  this.root.authorizationStore.showLogin();
2599
2614
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2600
2615
  return _context3.abrupt("return");
2601
- case 36:
2616
+ case 41:
2602
2617
  if (config) {
2603
- _context3.next = 50;
2618
+ _context3.next = 55;
2604
2619
  break;
2605
2620
  }
2606
2621
  if (!this.isWrapperRestrictedAction(action)) {
2607
- _context3.next = 46;
2622
+ _context3.next = 51;
2608
2623
  break;
2609
2624
  }
2610
2625
  defaultComponent = this.root.configurationStore.defaultComponent;
@@ -2615,20 +2630,20 @@ var ContentStore = /*#__PURE__*/function () {
2615
2630
  return c.route && ((_defaultComponent$rou = defaultComponent.route) === null || _defaultComponent$rou === void 0 ? void 0 : _defaultComponent$rou.startsWith(c.route));
2616
2631
  }));
2617
2632
  if (!canOpenDefault) {
2618
- _context3.next = 46;
2633
+ _context3.next = 51;
2619
2634
  break;
2620
2635
  }
2621
- LOG$9.warn('Wrapper org restriction detected, redirecting to default module', {
2636
+ LOG$a.warn('Wrapper org restriction detected, redirecting to default module', {
2622
2637
  requestedAction: toJS(action),
2623
2638
  defaultComponent: toJS(defaultComponent),
2624
2639
  organizationId: this.root.dataStore.organizationId
2625
2640
  });
2626
2641
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2627
- _context3.next = 45;
2642
+ _context3.next = 50;
2628
2643
  return this.openComponent(defaultComponent);
2629
- case 45:
2644
+ case 50:
2630
2645
  return _context3.abrupt("return");
2631
- case 46:
2646
+ case 51:
2632
2647
  this._restrictedComponent = action;
2633
2648
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2634
2649
  this.root.loadingAndErrorStore.setError(new DivaError("No component with the specified settings found", {
@@ -2638,7 +2653,7 @@ var ContentStore = /*#__PURE__*/function () {
2638
2653
  }
2639
2654
  }), 'CORE_0005');
2640
2655
  return _context3.abrupt("return");
2641
- case 50:
2656
+ case 55:
2642
2657
  settings = undefined;
2643
2658
  if (config.settings) {
2644
2659
  settings = config.settings;
@@ -2652,7 +2667,7 @@ var ContentStore = /*#__PURE__*/function () {
2652
2667
  parameters = otherPrams;
2653
2668
  }
2654
2669
  module = this.mapTypeToModule((_config8 = config) === null || _config8 === void 0 ? void 0 : _config8.type);
2655
- LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
2670
+ LOG$a.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
2656
2671
  prevType = this.visible;
2657
2672
  prevState = this.state.get(this.visible || '');
2658
2673
  currentState = this.state.get(config.type);
@@ -2689,7 +2704,7 @@ var ContentStore = /*#__PURE__*/function () {
2689
2704
  }
2690
2705
  this.setGlobalClass();
2691
2706
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2692
- case 69:
2707
+ case 74:
2693
2708
  case "end":
2694
2709
  return _context3.stop();
2695
2710
  }
@@ -2699,11 +2714,11 @@ var ContentStore = /*#__PURE__*/function () {
2699
2714
  key: "openComponentInFullscreen",
2700
2715
  value: /*#__PURE__*/_regeneratorRuntime.mark(function openComponentInFullscreen(component) {
2701
2716
  var _config10, _config11;
2702
- var type, parameters, internal, route, config, settings, module, componentState;
2717
+ var type, parameters, internal, route, config, settings, module, componentState, cmp;
2703
2718
  return _regeneratorRuntime.wrap(function openComponentInFullscreen$(_context4) {
2704
2719
  while (1) switch (_context4.prev = _context4.next) {
2705
2720
  case 0:
2706
- LOG$9.debug('openComponentInFullscreen', toJS(component));
2721
+ LOG$a.debug('openComponentInFullscreen', toJS(component));
2707
2722
  this.root.loadingAndErrorStore.setError(undefined);
2708
2723
  type = component.type, parameters = component.parameters, internal = component.internal, route = component.route;
2709
2724
  config = undefined;
@@ -2749,7 +2764,7 @@ var ContentStore = /*#__PURE__*/function () {
2749
2764
  settings = _context4.sent;
2750
2765
  case 18:
2751
2766
  module = this.mapTypeToModule((_config10 = config) === null || _config10 === void 0 ? void 0 : _config10.type);
2752
- LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
2767
+ LOG$a.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
2753
2768
  componentState = {
2754
2769
  key: config.type,
2755
2770
  parameters: parameters,
@@ -2760,8 +2775,15 @@ var ContentStore = /*#__PURE__*/function () {
2760
2775
  };
2761
2776
  this.setGlobalClass();
2762
2777
  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
+ };
2763
2785
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2764
- case 24:
2786
+ case 26:
2765
2787
  case "end":
2766
2788
  return _context4.stop();
2767
2789
  }
@@ -2771,6 +2793,7 @@ var ContentStore = /*#__PURE__*/function () {
2771
2793
  key: "closeComponentInFullscreen",
2772
2794
  value: function closeComponentInFullscreen() {
2773
2795
  this._fullscreenComponent = undefined;
2796
+ this._fullscreenRender = undefined;
2774
2797
  this.root.onEvent({
2775
2798
  type: 'closeComponentInFullscreen'
2776
2799
  });
@@ -3386,7 +3409,6 @@ var ContentStore = /*#__PURE__*/function () {
3386
3409
  if (component.type === 'SALES_MANAGER' && !((_this7$root$dataStore = _this7.root.dataStore.organization) !== null && _this7$root$dataStore !== void 0 && (_this7$root$dataStore = _this7$root$dataStore.settings) !== null && _this7$root$dataStore !== void 0 && _this7$root$dataStore.enableInsights)) {
3387
3410
  return false;
3388
3411
  }
3389
-
3390
3412
  //only this modules are allowed in wrapper organizations
3391
3413
  if (_this7.isWrapperOrganization && !ALLOWED_WRAPPER_MODULES.includes(component.type)) return false;
3392
3414
 
@@ -3437,23 +3459,16 @@ var ContentStore = /*#__PURE__*/function () {
3437
3459
  }, {
3438
3460
  key: "fullscreenComponent",
3439
3461
  get: function get() {
3440
- var _this9 = this;
3441
- var component = this.availableComponents.find(function (component) {
3442
- var _this9$_fullscreenCom;
3443
- return component.type == ((_this9$_fullscreenCom = _this9._fullscreenComponent) === null || _this9$_fullscreenCom === void 0 ? void 0 : _this9$_fullscreenCom.key);
3444
- });
3445
- var cmp = this.configuration.find(function (config) {
3446
- return (component === null || component === void 0 ? void 0 : component.type) == config.name;
3447
- });
3448
- if (!cmp || !component || !this._fullscreenComponent) throw new DivaError("No component with the specified settings found", {
3462
+ var _this$_fullscreenComp;
3463
+ if (!this._fullscreenComponent || !this._fullscreenRender) throw new DivaError("No component with the specified settings found", {
3449
3464
  code: 'CORE_0005',
3450
3465
  custom: {
3451
- key: this._fullscreenComponent.key
3466
+ key: (_this$_fullscreenComp = this._fullscreenComponent) === null || _this$_fullscreenComp === void 0 ? void 0 : _this$_fullscreenComp.key
3452
3467
  }
3453
3468
  });
3454
3469
  return {
3455
- name: cmp.name,
3456
- component: withTransaction(this._fullscreenComponent.key, 'Module')(cmp.renderFunction),
3470
+ name: this._fullscreenRender.name,
3471
+ component: this._fullscreenRender.component,
3457
3472
  state: this._fullscreenComponent
3458
3473
  };
3459
3474
  }
@@ -3465,8 +3480,8 @@ var ContentStore = /*#__PURE__*/function () {
3465
3480
  }, {
3466
3481
  key: "isAbsoluteFullscreenComponent",
3467
3482
  get: function get() {
3468
- var _this$_fullscreenComp;
3469
- return !!((_this$_fullscreenComp = this._fullscreenComponent) !== null && _this$_fullscreenComp !== void 0 && _this$_fullscreenComp.absoluteFullscreen) || this._isAbsoluteComponent;
3483
+ var _this$_fullscreenComp2;
3484
+ return !!((_this$_fullscreenComp2 = this._fullscreenComponent) !== null && _this$_fullscreenComp2 !== void 0 && _this$_fullscreenComp2.absoluteFullscreen) || this._isAbsoluteComponent;
3470
3485
  }
3471
3486
 
3472
3487
  /**
@@ -3487,24 +3502,24 @@ var ContentStore = /*#__PURE__*/function () {
3487
3502
  key: "availableButtons",
3488
3503
  get: function get() {
3489
3504
  var _this$root$configurat,
3490
- _this10 = this;
3505
+ _this9 = this;
3491
3506
  return (_this$root$configurat = this.root.configurationStore.navigation) === null || _this$root$configurat === void 0 ? void 0 : _this$root$configurat.buttons.filter(function (button) {
3492
3507
  //if component is public it can be displayed
3493
3508
  if (button.isPublic) {
3494
3509
  return true;
3495
3510
  }
3496
3511
  //if the user is not logged in the component must be public
3497
- if (!_this10.root.dataStore.user) {
3512
+ if (!_this9.root.dataStore.user) {
3498
3513
  return false;
3499
3514
  }
3500
3515
 
3501
3516
  //if the button is opening a component, the component must be availalbe
3502
- if (button.action.type && !_this10.availableComponentList.includes(button.action.type)) {
3517
+ if (button.action.type && !_this9.availableComponentList.includes(button.action.type)) {
3503
3518
  return false;
3504
3519
  }
3505
3520
 
3506
3521
  //if there is a permission specified, the user must have it
3507
- return button.permission ? _this10.root.dataStore.userHasPermission(button.permission) : true;
3522
+ return button.permission ? _this9.root.dataStore.userHasPermission(button.permission) : true;
3508
3523
  });
3509
3524
  }
3510
3525
 
@@ -3534,7 +3549,7 @@ var ContentStore = /*#__PURE__*/function () {
3534
3549
  if (this.isAbsoluteFullscreenComponent) {
3535
3550
  dimensions = calculateDimensions(window.innerWidth, window.innerHeight);
3536
3551
  }
3537
- LOG$9.debug("Detected dimensions: ".concat(JSON.stringify(dimensions, null, 2), " "));
3552
+ LOG$a.debug("Detected dimensions: ".concat(JSON.stringify(dimensions, null, 2), " "));
3538
3553
  return dimensions;
3539
3554
  }
3540
3555
 
@@ -3545,7 +3560,7 @@ var ContentStore = /*#__PURE__*/function () {
3545
3560
  }, {
3546
3561
  key: "resetState",
3547
3562
  value: function resetState() {
3548
- LOG$9.debug('Reset page state');
3563
+ LOG$a.debug('Reset page state');
3549
3564
  var prevType = this.visible;
3550
3565
  var prevState = this.state.get(this.visible || '');
3551
3566
  this.root.dataStore.clearSessionGuids();
@@ -3589,7 +3604,7 @@ var ContentStore = /*#__PURE__*/function () {
3589
3604
  }, {
3590
3605
  key: "updateStateAfterLogout",
3591
3606
  value: function updateStateAfterLogout() {
3592
- var _this11 = this;
3607
+ var _this10 = this;
3593
3608
  var _iterator3 = _createForOfIteratorHelper$1(this.state.entries()),
3594
3609
  _step3;
3595
3610
  try {
@@ -3597,19 +3612,19 @@ var ContentStore = /*#__PURE__*/function () {
3597
3612
  var _step3$value = _slicedToArray(_step3.value, 2),
3598
3613
  type = _step3$value[0],
3599
3614
  component = _step3$value[1];
3600
- var config = _this11.root.configurationStore.components.find(function (c) {
3615
+ var config = _this10.root.configurationStore.components.find(function (c) {
3601
3616
  return c.type == type;
3602
3617
  });
3603
3618
  if (!(config !== null && config !== void 0 && config.isPublic)) {
3604
- _this11.state["delete"](type);
3605
- if (_this11.visible == type) {
3606
- _this11.visible = undefined;
3607
- _this11._restrictedComponent = {
3619
+ _this10.state["delete"](type);
3620
+ if (_this10.visible == type) {
3621
+ _this10.visible = undefined;
3622
+ _this10._restrictedComponent = {
3608
3623
  type: type,
3609
3624
  parameters: component.parameters,
3610
3625
  internal: component.internal
3611
3626
  };
3612
- _this11.root.authorizationStore.showLogin();
3627
+ _this10.root.authorizationStore.showLogin();
3613
3628
  }
3614
3629
  }
3615
3630
  };
@@ -3704,10 +3719,10 @@ var ContentStore = /*#__PURE__*/function () {
3704
3719
  }, {
3705
3720
  key: "onResize",
3706
3721
  value: function onResize(width, height) {
3707
- var _this12 = this;
3722
+ var _this11 = this;
3708
3723
  this.onResizeFunc(width, height);
3709
3724
  setTimeout(function () {
3710
- _this12.onResizeFunc(width, height);
3725
+ _this11.onResizeFunc(width, height);
3711
3726
  }, 500);
3712
3727
  }
3713
3728
  }, {
@@ -3738,13 +3753,18 @@ function getLocalStorageToggle(key) {
3738
3753
  return window.localStorage.getItem(key) !== null ? window.localStorage.getItem(key) == '1' : undefined;
3739
3754
  }
3740
3755
 
3741
- var LOG$8 = getLogger('Framework', 'LoadingAndErrorStore');
3756
+ var LOADING_TEXT_CLEAR_DELAY_MS = 1500;
3757
+ var LOG$9 = getLogger('Framework', 'LoadingAndErrorStore');
3742
3758
  var _default = /*#__PURE__*/function () {
3743
3759
  function _default(root, spinnerClass) {
3744
3760
  var _this = this;
3745
3761
  _classCallCheck(this, _default);
3746
3762
  this.root = root;
3747
3763
  _defineProperty(this, "loading", new Map());
3764
+ _defineProperty(this, "loadingTexts", new Map());
3765
+ _defineProperty(this, "immediateLoading", new Set());
3766
+ _defineProperty(this, "_lastTexts", []);
3767
+ _defineProperty(this, "_textClearTimer", null);
3748
3768
  _defineProperty(this, "spinnerClass", undefined);
3749
3769
  _defineProperty(this, "cssFile", undefined);
3750
3770
  _defineProperty(this, "_errorMsg", undefined);
@@ -3776,6 +3796,23 @@ var _default = /*#__PURE__*/function () {
3776
3796
  }, {
3777
3797
  name: 'onLoading'
3778
3798
  });
3799
+ autorun(function () {
3800
+ if (_this.isLoading) {
3801
+ if (_this._textClearTimer) {
3802
+ clearTimeout(_this._textClearTimer);
3803
+ _this._textClearTimer = null;
3804
+ }
3805
+ } else if (_this._lastTexts.length > 0) {
3806
+ _this._textClearTimer = setTimeout(function () {
3807
+ runInAction(function () {
3808
+ _this._lastTexts = [];
3809
+ _this._textClearTimer = null;
3810
+ });
3811
+ }, LOADING_TEXT_CLEAR_DELAY_MS);
3812
+ }
3813
+ }, {
3814
+ name: 'onLoadingTextsClear'
3815
+ });
3779
3816
  }
3780
3817
  return _createClass(_default, [{
3781
3818
  key: "setCustomLoader",
@@ -3829,9 +3866,14 @@ var _default = /*#__PURE__*/function () {
3829
3866
  }, {
3830
3867
  key: "isLoading",
3831
3868
  get: function get() {
3832
- LOG$8.debug("isLoading: ".concat(this.loading.size, " [").concat(Array.from(this.loading.keys()).join(', '), "]"));
3869
+ LOG$9.debug("isLoading: ".concat(this.loading.size, " [").concat(Array.from(this.loading.keys()).join(', '), "]"));
3833
3870
  return this.loading.size != 0;
3834
3871
  }
3872
+ }, {
3873
+ key: "hasImmediateLoading",
3874
+ get: function get() {
3875
+ return this.immediateLoading.size != 0;
3876
+ }
3835
3877
  }, {
3836
3878
  key: "error",
3837
3879
  get: function get() {
@@ -3845,21 +3887,21 @@ var _default = /*#__PURE__*/function () {
3845
3887
  this._errorMsg = undefined;
3846
3888
  } else if (typeof error == 'string') {
3847
3889
  this._errorMsg = error;
3848
- LOG$8.error(new DivaError(error));
3890
+ LOG$9.error(new DivaError(error));
3849
3891
  } else if (error.name == 'CORE_0005') {
3850
- LOG$8.error(error);
3892
+ LOG$9.error(error);
3851
3893
  this._errorMsg = this.root.t('core.error.page_not_found', {
3852
3894
  defaultValue: 'Die Seite existiert nicht oder Sie haben nicht die benötigten Berechtigungen. Bei Fragen wenden Sie sich bitte an den Support.'
3853
3895
  });
3854
3896
  var conf = this.root.configurationStore.components;
3855
3897
  console.log(conf);
3856
3898
  } else if (error.name == 'CORE_0002') {
3857
- LOG$8.error(error);
3899
+ LOG$9.error(error);
3858
3900
  this._errorMsg = this.root.t('core.error.resource_not_found', {
3859
3901
  defaultValue: 'Eine oder mehrere der benötigten Resource existiert nicht oder konnte nicht gefunden werden. Bei Fragen wenden Sie sich bitte an den Support.'
3860
3902
  });
3861
3903
  } else {
3862
- LOG$8.error(error);
3904
+ LOG$9.error(error);
3863
3905
  this._errorMsg = error.message;
3864
3906
  }
3865
3907
  if (this._errorMsg) {
@@ -3917,21 +3959,43 @@ var _default = /*#__PURE__*/function () {
3917
3959
  return hidden == true;
3918
3960
  }) || this.error;
3919
3961
  }
3962
+ }, {
3963
+ key: "activeTexts",
3964
+ get: function get() {
3965
+ if (this.loadingTexts.size > 0) {
3966
+ var merged = [];
3967
+ this.loadingTexts.forEach(function (texts) {
3968
+ return merged.push.apply(merged, _toConsumableArray(texts));
3969
+ });
3970
+ return merged;
3971
+ }
3972
+ return this._lastTexts;
3973
+ }
3920
3974
  }, {
3921
3975
  key: "toggleLoading",
3922
- value: function toggleLoading(id, hidden, toggle) {
3976
+ value: function toggleLoading(id, hidden, toggle, texts, dontWaitForDelay) {
3923
3977
  if (this.loading.has(id) && toggle !== true) {
3924
3978
  this.loading["delete"](id);
3925
- LOG$8.debug("End loading: ".concat(id, " [").concat(Array.from(this.loading.keys()), "]"));
3979
+ this.immediateLoading["delete"](id);
3980
+ if (this.loadingTexts.has(id)) {
3981
+ var snapshot = this.activeTexts;
3982
+ this.loadingTexts["delete"](id);
3983
+ if (snapshot.length > 0) {
3984
+ this._lastTexts = snapshot;
3985
+ }
3986
+ }
3987
+ LOG$9.debug("End loading: ".concat(id, " [").concat(Array.from(this.loading.keys()), "]"));
3926
3988
  } else if (!this.loading.has(id) && toggle !== false) {
3927
- LOG$8.debug("Start loading: ".concat(id));
3989
+ LOG$9.debug("Start loading: ".concat(id).concat(dontWaitForDelay ? ' (immediate)' : ''));
3928
3990
  this.loading.set(id, hidden == undefined ? false : hidden);
3991
+ if (texts !== null && texts !== void 0 && texts.length) this.loadingTexts.set(id, texts);
3992
+ if (dontWaitForDelay) this.immediateLoading.add(id);
3929
3993
  }
3930
3994
  }
3931
3995
  }]);
3932
3996
  }();
3933
3997
 
3934
- var LOG$7 = getLogger('Framework', 'BrowserStateStore');
3998
+ var LOG$8 = getLogger('Framework', 'BrowserStateStore');
3935
3999
  var BANNER_STATE_LOCALSTORAGE_KEY = 'diva-banner-state';
3936
4000
  var NTOKEN_LOCALSTORAGE_KEY = 'diva-ntoken';
3937
4001
  var ORGANIZATION_LOCALSTORAGE_KEY = 'diva-organization';
@@ -4245,7 +4309,7 @@ var BrowserStateStore = /*#__PURE__*/function () {
4245
4309
  var _componentState$path;
4246
4310
  var componentConfig = _this2.root.contentStore.currentComponent;
4247
4311
  if (!componentConfig) {
4248
- LOG$7.debug('No current component found, while updating url, do nothing');
4312
+ LOG$8.debug('No current component found, while updating url, do nothing');
4249
4313
  return;
4250
4314
  }
4251
4315
  var componentState = _this2.root.contentStore.getState(componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.type);
@@ -4323,7 +4387,7 @@ var BrowserStateStore = /*#__PURE__*/function () {
4323
4387
 
4324
4388
  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; }
4325
4389
  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; }
4326
- var LOG$6 = getLogger('Framework', 'AuthorizationStore');
4390
+ var LOG$7 = getLogger('Framework', 'AuthorizationStore');
4327
4391
  var AuthorizationStore = /*#__PURE__*/function () {
4328
4392
  function AuthorizationStore(root) {
4329
4393
  _classCallCheck(this, AuthorizationStore);
@@ -4514,14 +4578,14 @@ var AuthorizationStore = /*#__PURE__*/function () {
4514
4578
  _context2.next = 6;
4515
4579
  break;
4516
4580
  }
4517
- LOG$6.debug('NToken removed');
4581
+ LOG$7.debug('NToken removed');
4518
4582
  _context2.next = 4;
4519
4583
  return this.root.authorizationStore.logout();
4520
4584
  case 4:
4521
4585
  _context2.next = 15;
4522
4586
  break;
4523
4587
  case 6:
4524
- LOG$6.debug('NToken change detected, login');
4588
+ LOG$7.debug('NToken change detected, login');
4525
4589
  _context2.next = 9;
4526
4590
  return this.root.authorizationStore.autorize(this.root.dataStore.organizationId, this.root.browserStateStore.getStoredNToken());
4527
4591
  case 9:
@@ -4574,7 +4638,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
4574
4638
  _context3.next = 21;
4575
4639
  break;
4576
4640
  }
4577
- LOG$6.log('The stored organization is no longer valid, fallback to default organization');
4641
+ LOG$7.log('The stored organization is no longer valid, fallback to default organization');
4578
4642
  //for anonymous users, we fallback to the 'default' organization for ohter users we let the backend determine the right organization
4579
4643
  _context3.next = 18;
4580
4644
  return this.autorize(nToken ? undefined : this.root.configurationStore.organizations[0], nToken);
@@ -4585,7 +4649,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
4585
4649
  _context3.next = 26;
4586
4650
  break;
4587
4651
  }
4588
- LOG$6.log('Authentication expired or invalid, logging out.');
4652
+ LOG$7.log('Authentication expired or invalid, logging out.');
4589
4653
  _context3.next = 25;
4590
4654
  return this.logout(true, true, organizationId);
4591
4655
  case 25:
@@ -4685,7 +4749,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
4685
4749
  _context5.next = 19;
4686
4750
  break;
4687
4751
  }
4688
- LOG$6.log('The stored organization is no longer valid, fallback to default organization');
4752
+ LOG$7.log('The stored organization is no longer valid, fallback to default organization');
4689
4753
  _context5.next = 18;
4690
4754
  return this.login(email, password, loginSimple, undefined);
4691
4755
  case 18:
@@ -4745,7 +4809,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
4745
4809
  this._timeout = undefined;
4746
4810
  }
4747
4811
  refreshTokenIn = zExpireBy - 1000 * 60 * 5 - Date.now(); //refresh 5 minutes before expire
4748
- LOG$6.debug("Set token refresh interval to ".concat(refreshTokenIn, " ms. Refresh at ").concat(new Date(Date.now() + refreshTokenIn)));
4812
+ LOG$7.debug("Set token refresh interval to ".concat(refreshTokenIn, " ms. Refresh at ").concat(new Date(Date.now() + refreshTokenIn)));
4749
4813
 
4750
4814
  //set the timout to refresh token
4751
4815
  this._timeout = setTimeout(function () {
@@ -7721,7 +7785,7 @@ var SupportHandler = /*#__PURE__*/function () {
7721
7785
  }]);
7722
7786
  }();
7723
7787
 
7724
- var LOG$5 = getLogger('Framework', 'AuthorizationHandler');
7788
+ var LOG$6 = getLogger('Framework', 'AuthorizationHandler');
7725
7789
  var AuthorizationHandler = /*#__PURE__*/function () {
7726
7790
  function AuthorizationHandler(root) {
7727
7791
  _classCallCheck(this, AuthorizationHandler);
@@ -7772,7 +7836,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
7772
7836
  if (res.status !== 200) {
7773
7837
  throw new Error('Error updating online state');
7774
7838
  }
7775
- LOG$5.debug('Updating online state.');
7839
+ LOG$6.debug('Updating online state.');
7776
7840
  });
7777
7841
  case 6:
7778
7842
  _context.sent;
@@ -7781,7 +7845,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
7781
7845
  case 9:
7782
7846
  _context.prev = 9;
7783
7847
  _context.t0 = _context["catch"](3);
7784
- LOG$5.error(new DivaError('Error updating online state', {
7848
+ LOG$6.error(new DivaError('Error updating online state', {
7785
7849
  cause: _context.t0
7786
7850
  }));
7787
7851
  case 12:
@@ -8370,7 +8434,7 @@ var AuthorizationHandler = /*#__PURE__*/function () {
8370
8434
  case 13:
8371
8435
  _context10.prev = 13;
8372
8436
  _context10.t0 = _context10["catch"](0);
8373
- LOG$5.error(new DivaError('Error updating user language', {
8437
+ LOG$6.error(new DivaError('Error updating user language', {
8374
8438
  cause: _context10.t0
8375
8439
  }));
8376
8440
  case 16:
@@ -8493,48 +8557,51 @@ var AIHandler = /*#__PURE__*/function () {
8493
8557
  }, {
8494
8558
  key: "getPrompts",
8495
8559
  value: function () {
8496
- var _getPrompts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
8560
+ var _getPrompts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
8497
8561
  var url, res, resData;
8498
8562
  return _regeneratorRuntime.wrap(function _callee$(_context) {
8499
8563
  while (1) switch (_context.prev = _context.next) {
8500
8564
  case 0:
8501
8565
  url = new URL(this.aiService + '/room-renderings');
8502
8566
  url.searchParams.append('organizationId', this.organizationId);
8503
- _context.prev = 2;
8504
- _context.next = 5;
8567
+ if (options !== null && options !== void 0 && options.includeProductRooms) {
8568
+ url.searchParams.append('includeProductRooms', 'true');
8569
+ }
8570
+ _context.prev = 3;
8571
+ _context.next = 6;
8505
8572
  return fetch(url.toString(), {
8506
8573
  headers: {
8507
8574
  Authorization: 'Bearer ' + this.jwt,
8508
8575
  'Content-Type': 'application/json'
8509
8576
  }
8510
8577
  });
8511
- case 5:
8578
+ case 6:
8512
8579
  res = _context.sent;
8513
- _context.next = 8;
8580
+ _context.next = 9;
8514
8581
  return res.json();
8515
- case 8:
8582
+ case 9:
8516
8583
  resData = _context.sent;
8517
- _context.next = 14;
8584
+ _context.next = 15;
8518
8585
  break;
8519
- case 11:
8520
- _context.prev = 11;
8521
- _context.t0 = _context["catch"](2);
8586
+ case 12:
8587
+ _context.prev = 12;
8588
+ _context.t0 = _context["catch"](3);
8522
8589
  throw new Error('Could not fetch Prompts ' + _context.t0.message);
8523
- case 14:
8590
+ case 15:
8524
8591
  if (!res.ok) {
8525
- _context.next = 16;
8592
+ _context.next = 17;
8526
8593
  break;
8527
8594
  }
8528
8595
  return _context.abrupt("return", resData);
8529
- case 16:
8530
- throw new Error(resData.error);
8531
8596
  case 17:
8597
+ throw new Error(resData.error);
8598
+ case 18:
8532
8599
  case "end":
8533
8600
  return _context.stop();
8534
8601
  }
8535
- }, _callee, this, [[2, 11]]);
8602
+ }, _callee, this, [[3, 12]]);
8536
8603
  }));
8537
- function getPrompts() {
8604
+ function getPrompts(_x) {
8538
8605
  return _getPrompts.apply(this, arguments);
8539
8606
  }
8540
8607
  return getPrompts;
@@ -8545,7 +8612,7 @@ var AIHandler = /*#__PURE__*/function () {
8545
8612
  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; }
8546
8613
  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; }
8547
8614
  var LOGINMODE_LOCALSTORAGE_KEY = 'diva-login-mode';
8548
- var LOG$4 = getLogger('Framework', 'root');
8615
+ var LOG$5 = getLogger('Framework', 'root');
8549
8616
  var RootStore = /*#__PURE__*/function () {
8550
8617
  function RootStore(_ref) {
8551
8618
  var _ref2,
@@ -8564,7 +8631,8 @@ var RootStore = /*#__PURE__*/function () {
8564
8631
  _ref$telemetry = _ref.telemetry,
8565
8632
  telemetry = _ref$telemetry === void 0 ? true : _ref$telemetry,
8566
8633
  analyticsProps = _ref.analyticsProps,
8567
- onEvent = _ref.onEvent;
8634
+ onEvent = _ref.onEvent,
8635
+ initialLoadingTexts = _ref.initialLoadingTexts;
8568
8636
  _classCallCheck(this, RootStore);
8569
8637
  _defineProperty(this, "contentStore", void 0);
8570
8638
  _defineProperty(this, "configurationStore", void 0);
@@ -8655,7 +8723,7 @@ var RootStore = /*#__PURE__*/function () {
8655
8723
  DivaUtils.businessMetrics.onClose();
8656
8724
  flashLoggers();
8657
8725
  });
8658
- this.initialize(telemetry, identifier, organizationId, domain, language, component, analyticsProps);
8726
+ this.initialize(telemetry, identifier, organizationId, domain, language, component, analyticsProps, initialLoadingTexts);
8659
8727
  }
8660
8728
 
8661
8729
  /**
@@ -8669,7 +8737,7 @@ var RootStore = /*#__PURE__*/function () {
8669
8737
  this.loadingAndErrorStore.toggleLoading('language');
8670
8738
  instance.changeLanguage(lang, function (err) {
8671
8739
  if (err) {
8672
- LOG$4.error(new DivaError('Could not change language', {
8740
+ LOG$5.error(new DivaError('Could not change language', {
8673
8741
  cause: err,
8674
8742
  code: 'CORE_0007'
8675
8743
  }));
@@ -8933,13 +9001,13 @@ var RootStore = /*#__PURE__*/function () {
8933
9001
  }, {
8934
9002
  key: "initialize",
8935
9003
  value: (function () {
8936
- var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(telemetry, identifier, organizationId, domain, language, component, analyticsProps) {
9004
+ var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(telemetry, identifier, organizationId, domain, language, component, analyticsProps, initialLoadingTexts) {
8937
9005
  var _this4 = this;
8938
9006
  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;
8939
9007
  return _regeneratorRuntime.wrap(function _callee$(_context) {
8940
9008
  while (1) switch (_context.prev = _context.next) {
8941
9009
  case 0:
8942
- LOG$4.startTransaction({
9010
+ LOG$5.startTransaction({
8943
9011
  event: 'initCore',
8944
9012
  message: 'Initalizing Core',
8945
9013
  labels: {
@@ -8957,8 +9025,8 @@ var RootStore = /*#__PURE__*/function () {
8957
9025
  runInAction(function () {
8958
9026
  _this4._initializing = true;
8959
9027
  });
8960
- this.loadingAndErrorStore.toggleLoading('initalize', true);
8961
- LOG$4.successTransaction('UNTIL_INIT');
9028
+ this.loadingAndErrorStore.toggleLoading('initalize', true, undefined, initialLoadingTexts);
9029
+ LOG$5.successTransaction('UNTIL_INIT');
8962
9030
  _context.next = 7;
8963
9031
  return this.browserStateStore.loadUrlState();
8964
9032
  case 7:
@@ -8969,7 +9037,7 @@ var RootStore = /*#__PURE__*/function () {
8969
9037
  if (organizationId) {
8970
9038
  initAuthPromise = this.initializeAuthorization(organizationId);
8971
9039
  }
8972
- LOG$4.startTransaction({
9040
+ LOG$5.startTransaction({
8973
9041
  event: 'onLoadConfig',
8974
9042
  message: 'loading Config',
8975
9043
  eventId: 'LOAD_CONFIG'
@@ -8993,8 +9061,8 @@ var RootStore = /*#__PURE__*/function () {
8993
9061
  //open default route
8994
9062
  this._initalComponent = undefined;
8995
9063
  }
8996
- LOG$4.successTransaction('LOAD_CONFIG');
8997
- LOG$4.startTransaction({
9064
+ LOG$5.successTransaction('LOAD_CONFIG');
9065
+ LOG$5.startTransaction({
8998
9066
  event: 'onLoadServerData',
8999
9067
  message: 'load server data',
9000
9068
  eventId: 'LOAD_SERVER_DATA'
@@ -9019,8 +9087,8 @@ var RootStore = /*#__PURE__*/function () {
9019
9087
  }
9020
9088
  });
9021
9089
  });
9022
- LOG$4.successTransaction('LOAD_SERVER_DATA');
9023
- LOG$4.startTransaction({
9090
+ LOG$5.successTransaction('LOAD_SERVER_DATA');
9091
+ LOG$5.startTransaction({
9024
9092
  event: 'onLoadUserData',
9025
9093
  message: 'load user data',
9026
9094
  eventId: 'LOAD_USER_DATA'
@@ -9038,7 +9106,7 @@ var RootStore = /*#__PURE__*/function () {
9038
9106
  break;
9039
9107
  case 33:
9040
9108
  if (authObject.error) {
9041
- LOG$4.errorTransaction('LOAD_USER_DATA', (_authObject$code = authObject.code) !== null && _authObject$code !== void 0 ? _authObject$code : 'CORE_0006', authObject.error);
9109
+ LOG$5.errorTransaction('LOAD_USER_DATA', (_authObject$code = authObject.code) !== null && _authObject$code !== void 0 ? _authObject$code : 'CORE_0006', authObject.error);
9042
9110
  this.authorizationStore.showLogin(false, true);
9043
9111
  } else {
9044
9112
  if (urlState !== null && urlState !== void 0 && urlState.provider) {
@@ -9049,7 +9117,7 @@ var RootStore = /*#__PURE__*/function () {
9049
9117
  return _context.abrupt("break", 50);
9050
9118
  case 35:
9051
9119
  if (authObject.error) {
9052
- LOG$4.errorTransaction('LOAD_USER_DATA', (_authObject$code2 = authObject.code) !== null && _authObject$code2 !== void 0 ? _authObject$code2 : 'CORE_0006', authObject.error);
9120
+ LOG$5.errorTransaction('LOAD_USER_DATA', (_authObject$code2 = authObject.code) !== null && _authObject$code2 !== void 0 ? _authObject$code2 : 'CORE_0006', authObject.error);
9053
9121
  this.loadingAndErrorStore.setError(authObject.error);
9054
9122
  } else {
9055
9123
  this.authorizationStore.showChangePassword(authObject.token);
@@ -9057,7 +9125,7 @@ var RootStore = /*#__PURE__*/function () {
9057
9125
  return _context.abrupt("break", 50);
9058
9126
  case 37:
9059
9127
  if (authObject.error) {
9060
- LOG$4.errorTransaction('LOAD_USER_DATA', (_authObject$code3 = authObject.code) !== null && _authObject$code3 !== void 0 ? _authObject$code3 : 'CORE_0006', authObject.error);
9128
+ LOG$5.errorTransaction('LOAD_USER_DATA', (_authObject$code3 = authObject.code) !== null && _authObject$code3 !== void 0 ? _authObject$code3 : 'CORE_0006', authObject.error);
9061
9129
  this.loadingAndErrorStore.setError(authObject.error);
9062
9130
  } else {
9063
9131
  verifyEmailToken = authObject.token;
@@ -9068,7 +9136,7 @@ var RootStore = /*#__PURE__*/function () {
9068
9136
  _context.next = 44;
9069
9137
  break;
9070
9138
  }
9071
- LOG$4.errorTransaction('LOAD_INVITATION', (_authObject$code4 = authObject.code) !== null && _authObject$code4 !== void 0 ? _authObject$code4 : 'CORE_0006', authObject.error);
9139
+ LOG$5.errorTransaction('LOAD_INVITATION', (_authObject$code4 = authObject.code) !== null && _authObject$code4 !== void 0 ? _authObject$code4 : 'CORE_0006', authObject.error);
9072
9140
  this.loadingAndErrorStore.setError(authObject.error);
9073
9141
  _context.next = 48;
9074
9142
  break;
@@ -9089,7 +9157,7 @@ var RootStore = /*#__PURE__*/function () {
9089
9157
  _context.next = 52;
9090
9158
  break;
9091
9159
  case 52:
9092
- LOG$4.successTransaction('LOAD_USER_DATA');
9160
+ LOG$5.successTransaction('LOAD_USER_DATA');
9093
9161
  if (!initAuthPromise) {
9094
9162
  _context.next = 59;
9095
9163
  break;
@@ -9166,18 +9234,18 @@ var RootStore = /*#__PURE__*/function () {
9166
9234
  _context.prev = 78;
9167
9235
  _context.t1 = _context["catch"](27);
9168
9236
  if (_context.t1 instanceof DivaError && _context.t1.name == 'AUTH_0006') {
9169
- LOG$4.errorTransaction('INITIALIZE_CORE', 'AUTH_0006', 'Existing verification token not valid.');
9237
+ LOG$5.errorTransaction('INITIALIZE_CORE', 'AUTH_0006', 'Existing verification token not valid.');
9170
9238
  } else {
9171
- LOG$4.errorTransaction('INITIALIZE_CORE', 'CORE_0006', 'An error occured during initialization.');
9239
+ LOG$5.errorTransaction('INITIALIZE_CORE', 'CORE_0006', 'An error occured during initialization.');
9172
9240
  }
9173
9241
  case 81:
9174
9242
  this.initalizeView();
9175
9243
  if (this.jwt) {
9176
9244
  DivaUtils.businessMetrics.jwtSetter = this.jwt;
9177
9245
  } else {
9178
- LOG$4.debug('No JWT available for Loging');
9246
+ LOG$5.debug('No JWT available for Loging');
9179
9247
  }
9180
- LOG$4.successTransaction('INITIALIZE_CORE', {
9248
+ LOG$5.successTransaction('INITIALIZE_CORE', {
9181
9249
  identifier: identifier,
9182
9250
  organizationId: this.dataStore.organizationId,
9183
9251
  domain: domain,
@@ -9191,7 +9259,7 @@ var RootStore = /*#__PURE__*/function () {
9191
9259
  _context.t2 = _context["catch"](1);
9192
9260
  this.loadingAndErrorStore.toggleLoading('initalize', false);
9193
9261
  this.loadingAndErrorStore.setError(_context.t2);
9194
- LOG$4.errorTransaction('INITIALIZE_CORE', 'CORE_0000', _context.t2.message, {
9262
+ LOG$5.errorTransaction('INITIALIZE_CORE', 'CORE_0000', _context.t2.message, {
9195
9263
  identifier: identifier,
9196
9264
  organizationId: this.dataStore.organizationId,
9197
9265
  domain: domain,
@@ -9213,7 +9281,7 @@ var RootStore = /*#__PURE__*/function () {
9213
9281
  }
9214
9282
  }, _callee, this, [[1, 86, 91, 95], [27, 78]]);
9215
9283
  }));
9216
- function initialize(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
9284
+ function initialize(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {
9217
9285
  return _initialize.apply(this, arguments);
9218
9286
  }
9219
9287
  return initialize;
@@ -9258,7 +9326,7 @@ var RootStore = /*#__PURE__*/function () {
9258
9326
  _this5.initializeBusinessMetrics(telemetry, environment, applicationEnvironment, telemetrySettings, analyticsProps);
9259
9327
  }
9260
9328
  }, function (reason) {
9261
- LOG$4.error(new DivaError('Cookiebot initialization failed', {
9329
+ LOG$5.error(new DivaError('Cookiebot initialization failed', {
9262
9330
  code: 'CORE_0009',
9263
9331
  custom: {
9264
9332
  reason: reason
@@ -9278,7 +9346,7 @@ var RootStore = /*#__PURE__*/function () {
9278
9346
  }
9279
9347
  }, _callee2, this);
9280
9348
  }));
9281
- function initializeTelemetry(_x8) {
9349
+ function initializeTelemetry(_x9) {
9282
9350
  return _initializeTelemetry.apply(this, arguments);
9283
9351
  }
9284
9352
  return initializeTelemetry;
@@ -9318,7 +9386,7 @@ var RootStore = /*#__PURE__*/function () {
9318
9386
  }
9319
9387
  }, _callee3, this);
9320
9388
  }));
9321
- function initializeBusinessMetrics(_x9, _x10, _x11, _x12, _x13) {
9389
+ function initializeBusinessMetrics(_x10, _x11, _x12, _x13, _x14) {
9322
9390
  return _initializeBusinessMetrics.apply(this, arguments);
9323
9391
  }
9324
9392
  return initializeBusinessMetrics;
@@ -9344,7 +9412,7 @@ var RootStore = /*#__PURE__*/function () {
9344
9412
  case 10:
9345
9413
  _context4.prev = 10;
9346
9414
  _context4.t0 = _context4["catch"](0);
9347
- LOG$4.errorTransaction('INITIALIZE_CORE', 'CORE_0002', 'Error initializing Organization');
9415
+ LOG$5.errorTransaction('INITIALIZE_CORE', 'CORE_0002', 'Error initializing Organization');
9348
9416
  this.loadingAndErrorStore.setError(_context4.t0, 'CORE_0002', true);
9349
9417
  return _context4.abrupt("return");
9350
9418
  case 15:
@@ -9353,7 +9421,7 @@ var RootStore = /*#__PURE__*/function () {
9353
9421
  }
9354
9422
  }, _callee4, this, [[0, 10]]);
9355
9423
  }));
9356
- function initializeAuthorization(_x14) {
9424
+ function initializeAuthorization(_x15) {
9357
9425
  return _initializeAuthorization.apply(this, arguments);
9358
9426
  }
9359
9427
  return initializeAuthorization;
@@ -9362,12 +9430,12 @@ var RootStore = /*#__PURE__*/function () {
9362
9430
  key: "initalizeView",
9363
9431
  value: function initalizeView() {
9364
9432
  if (this.contentStore.currentComponent) {
9365
- LOG$4.debug('View is already initialized');
9433
+ LOG$5.debug('View is already initialized');
9366
9434
  return;
9367
9435
  }
9368
9436
  var initalComponent = this._initalComponent || this.configurationStore.defaultComponent;
9369
9437
  if (initalComponent) {
9370
- LOG$4.debug("Inital component", JSON.stringify(initalComponent, null, 2));
9438
+ LOG$5.debug("Inital component", JSON.stringify(initalComponent, null, 2));
9371
9439
  this.contentStore.openComponent(initalComponent);
9372
9440
  } else {
9373
9441
  this.loadingAndErrorStore.setError(new DivaError('No inital component available', {
@@ -9776,10 +9844,12 @@ function styleInject(css, ref) {
9776
9844
 
9777
9845
  var overlay$2 = "overlay-X3zhH";
9778
9846
  var loading = "loading-kAuhm";
9779
- 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";
9847
+ var textContainer = "textContainer--pqsi";
9848
+ var statusText = "statusText-guHKc";
9849
+ 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";
9780
9850
  styleInject(css_248z$5);
9781
9851
 
9782
- var LOG$3 = getLogger('Framework', 'loadDependency');
9852
+ var LOG$4 = getLogger('Framework', 'loadDependency');
9783
9853
  function loadDependency(_x) {
9784
9854
  return _loadDependency.apply(this, arguments);
9785
9855
  }
@@ -9820,7 +9890,7 @@ function _loadDependency() {
9820
9890
  resolve(id);
9821
9891
  };
9822
9892
  elem.onerror = function (e) {
9823
- LOG$3.error(new DivaError('Failed to load dependency: ' + type, {
9893
+ LOG$4.error(new DivaError('Failed to load dependency: ' + type, {
9824
9894
  cause: e
9825
9895
  }));
9826
9896
  resolve(id);
@@ -9840,6 +9910,40 @@ function getCacheStamp() {
9840
9910
  return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
9841
9911
  }
9842
9912
 
9913
+ var TEXT_CYCLE_INTERVAL_MS = 1500;
9914
+ function StatusTexts(_ref) {
9915
+ var texts = _ref.texts;
9916
+ var _useState = useState(0),
9917
+ _useState2 = _slicedToArray(_useState, 2),
9918
+ index = _useState2[0],
9919
+ setIndex = _useState2[1];
9920
+ var intervalRef = useRef(null);
9921
+ useEffect(function () {
9922
+ setIndex(0);
9923
+ }, [texts]);
9924
+ useEffect(function () {
9925
+ if (texts.length <= 1) return;
9926
+ intervalRef.current = setInterval(function () {
9927
+ setIndex(function (prev) {
9928
+ return (prev + 1) % texts.length;
9929
+ });
9930
+ }, TEXT_CYCLE_INTERVAL_MS);
9931
+ return function () {
9932
+ if (intervalRef.current) clearInterval(intervalRef.current);
9933
+ };
9934
+ }, [texts]);
9935
+ if (texts.length === 0) return null;
9936
+ return /*#__PURE__*/jsx("div", {
9937
+ className: textContainer,
9938
+ children: /*#__PURE__*/jsx("span", {
9939
+ className: statusText,
9940
+ children: texts[index]
9941
+ }, "".concat(texts[index], "-").concat(index))
9942
+ });
9943
+ }
9944
+
9945
+ var SPINNER_DELAY_MS = 350;
9946
+ var LOG$3 = getLogger('Framework', 'Spinner');
9843
9947
  function Spinner() {
9844
9948
  var _useDivaCoreContext = useDivaCoreContext(),
9845
9949
  loadingAndErrorStore = _useDivaCoreContext.loadingAndErrorStore;
@@ -9870,26 +9974,46 @@ function Spinner() {
9870
9974
  }
9871
9975
  }, [loadingAndErrorStore.customLoader.cssFile, loadingAndErrorStore.customLoader.spinnerClass]);
9872
9976
  useEffect(function () {
9873
- if (loadingAndErrorStore.isLoading && throttleRef.current === null) {
9874
- throttleRef.current = setTimeout(function () {
9875
- return setShowSpinner(true);
9876
- }, 350);
9877
- } else if (!loadingAndErrorStore.isLoading) {
9878
- if (throttleRef.current) clearTimeout(throttleRef.current);
9977
+ if (loadingAndErrorStore.isLoading) {
9978
+ if (loadingAndErrorStore.hasImmediateLoading) {
9979
+ if (throttleRef.current) {
9980
+ clearTimeout(throttleRef.current);
9981
+ throttleRef.current = null;
9982
+ }
9983
+ LOG$3.debug('Show spinner immediately (dontWaitForDelay)');
9984
+ setShowSpinner(true);
9985
+ } else if (throttleRef.current === null) {
9986
+ var scheduledAt = Date.now();
9987
+ LOG$3.debug("Schedule spinner show in ".concat(SPINNER_DELAY_MS, "ms"));
9988
+ throttleRef.current = setTimeout(function () {
9989
+ throttleRef.current = null;
9990
+ LOG$3.debug("Show spinner after ".concat(Date.now() - scheduledAt, "ms delay"));
9991
+ setShowSpinner(true);
9992
+ }, SPINNER_DELAY_MS);
9993
+ }
9994
+ } else {
9995
+ if (throttleRef.current) {
9996
+ clearTimeout(throttleRef.current);
9997
+ LOG$3.debug('Cancel scheduled spinner show because loading ended');
9998
+ }
9879
9999
  throttleRef.current = null;
10000
+ LOG$3.debug('Hide spinner because loading ended');
9880
10001
  setShowSpinner(false);
9881
10002
  }
9882
- }, [loadingAndErrorStore.isLoading]);
10003
+ }, [loadingAndErrorStore.isLoading, loadingAndErrorStore.hasImmediateLoading]);
10004
+ var activeTexts = loadingAndErrorStore.activeTexts;
9883
10005
  if (!showSpinner) {
9884
10006
  return /*#__PURE__*/jsx(Fragment, {});
9885
10007
  }
9886
- return /*#__PURE__*/jsx("div", {
10008
+ return /*#__PURE__*/jsxs("div", {
9887
10009
  className: overlay$2,
9888
10010
  id: "diva-loader",
9889
- children: /*#__PURE__*/jsxs("div", {
10011
+ children: [/*#__PURE__*/jsxs("div", {
9890
10012
  className: className,
9891
10013
  children: [/*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {})]
9892
- })
10014
+ }), activeTexts.length > 0 && /*#__PURE__*/jsx(StatusTexts, {
10015
+ texts: activeTexts
10016
+ })]
9893
10017
  });
9894
10018
  }
9895
10019
  var Spinner$1 = observer(Spinner);
@@ -9897,7 +10021,7 @@ var Spinner$1 = observer(Spinner);
9897
10021
  var overlay$1 = "overlay-34l68";
9898
10022
  var absoluteOverlay = "absolute-overlay-cG7uO";
9899
10023
  var closeIcon = "close-icon-1kDyU";
9900
- var css_248z$4 = ".overlay-34l68 {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: #fff;\n z-index: 999;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.absolute-overlay-cG7uO {\n height: 100% !important;\n}\n\n.absolute-overlay-cG7uO {\n background-color: #fff;\n position: fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow: hidden;\n z-index: 1000000;\n display: block;\n width: 100vw;\n}\n\nbody.darkmode .overlay-34l68,\nbody.darkmode .absolute-overlay-cG7uO {\n background-color: #0a0a0a;\n}\n\n.diva-pseudo-fullscreen body {\n height: auto !important;\n}\n.diva-pseudo-fullscreen, .diva-pseudo-fullscreen body {\n overflow: hidden !important;\n}\n\n.close-icon-1kDyU {\n position: absolute;\n right: 32px;\n top: 32px;\n width: 50px;\n height: 40px;\n opacity: 0.3;\n z-index: 700;\n cursor: pointer;\n}\n\n.close-icon-1kDyU:before {\n transform: rotate(45deg);\n}\n\n.close-icon-1kDyU:after {\n transform: rotate(-45deg);\n}\n\n.close-icon-1kDyU:before,\n.close-icon-1kDyU:after {\n position: absolute;\n left: 23px;\n top: 5px;\n content: ' ';\n height: 33px;\n width: 3px;\n background-color: #4b4b4b;\n}\n\n.close-icon-1kDyU:hover {\n opacity: 0.8;\n transition: opacity 0.2s ease-in-out;\n}\n\nbody.darkmode .close-icon-1kDyU:before,\nbody.darkmode .close-icon-1kDyU:after {\n background-color: #fff;\n}\n";
10024
+ var css_248z$4 = ".overlay-34l68 {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: #fff;\n z-index: 999;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.absolute-overlay-cG7uO {\n height: 100% !important;\n}\n\n.absolute-overlay-cG7uO {\n background-color: #fff;\n position: fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow: hidden;\n z-index: 1000000;\n display: block;\n width: 100vw;\n}\n\nbody.darkmode .overlay-34l68,\nbody.darkmode .absolute-overlay-cG7uO {\n background-color: #0a0a0a;\n}\n\n.diva-pseudo-fullscreen body {\n height: auto !important;\n}\n.diva-pseudo-fullscreen, .diva-pseudo-fullscreen body {\n overflow: hidden !important;\n}\n\n.close-icon-1kDyU {\n position: absolute;\n right: 32px;\n top: 32px;\n width: 44px;\n height: 44px;\n z-index: 700;\n cursor: pointer;\n border-radius: 999px;\n background-color: rgba(0, 0, 0, 0.45);\n border: 1px solid rgba(255, 255, 255, 0.6);\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);\n}\n\n.close-icon-1kDyU:before {\n transform: rotate(45deg);\n}\n\n.close-icon-1kDyU:after {\n transform: rotate(-45deg);\n}\n\n.close-icon-1kDyU:before,\n.close-icon-1kDyU:after {\n position: absolute;\n left: 20px;\n top: 8px;\n content: ' ';\n height: 26px;\n width: 2.5px;\n background-color: #fff;\n box-shadow: 0 0 1px rgba(0, 0, 0, 0.8);\n}\n\n.close-icon-1kDyU:hover {\n background-color: rgba(0, 0, 0, 0.6);\n transition: background-color 0.2s ease-in-out;\n}\n";
9901
10025
  styleInject(css_248z$4);
9902
10026
 
9903
10027
  var drawerContent = "drawer-content-3-85N";
@@ -10280,7 +10404,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
10280
10404
  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; }
10281
10405
  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; }
10282
10406
  var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
10283
- return import('./ModalsWrapper-1a9f0258.js');
10407
+ return import('./ModalsWrapper-7f669c55.js');
10284
10408
  });
10285
10409
  function Fullscreen(_ref) {
10286
10410
  var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
@@ -10740,10 +10864,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
10740
10864
  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; }
10741
10865
  var LOG$2 = getLogger('Framework', 'Root');
10742
10866
  var LazyAuth = /*#__PURE__*/React.lazy(function () {
10743
- return import('./index-1c514085.js');
10867
+ return import('./index-f22c0e91.js');
10744
10868
  });
10745
10869
  var LazyModals = /*#__PURE__*/React.lazy(function () {
10746
- return import('./ModalsWrapper-1a9f0258.js');
10870
+ return import('./ModalsWrapper-7f669c55.js');
10747
10871
  });
10748
10872
  function ContentComponent() {
10749
10873
  var context = useDivaCoreContext();
@@ -11522,9 +11646,9 @@ var MockedRootStore = /*#__PURE__*/function () {
11522
11646
  throw new Error('Method not implemented.');
11523
11647
  }
11524
11648
  },
11525
- toggleLoading: function toggleLoading(id, hidden, toggle) {
11649
+ toggleLoading: function toggleLoading(id, hidden, toggle, texts, dontWaitForDelay) {
11526
11650
  if (_this2.actions.toggleLoading) {
11527
- _this2.actions.toggleLoading(id, hidden, toggle);
11651
+ _this2.actions.toggleLoading(id, hidden, toggle, texts, dontWaitForDelay);
11528
11652
  } else {
11529
11653
  throw new Error('Method not implemented.');
11530
11654
  }