@crystaldesign/diva-core 25.4.0-beta.4 → 25.4.0-beta.41

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 (56) hide show
  1. package/build/esm/{ModalsWrapper-a33488c6.js → ModalsWrapper-d5a0b6c0.js} +4 -16
  2. package/build/esm/{index-09ff024d.js → index-4aa9e493.js} +353 -311
  3. package/build/esm/{index-3563300d.js → index-ce832991.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/externalTypes.d.ts +4 -2
  7. package/build/types/core/src/externalTypes.d.ts.map +1 -1
  8. package/build/types/core/src/handler/InternalApiHandler.d.ts +1 -2
  9. package/build/types/core/src/handler/InternalApiHandler.d.ts.map +1 -1
  10. package/build/types/core/src/handler/MediaHandler/index.d.ts +3 -2
  11. package/build/types/core/src/handler/MediaHandler/index.d.ts.map +1 -1
  12. package/build/types/core/src/handler/OrganizationHandler/index.d.ts +1 -1
  13. package/build/types/core/src/handler/OrganizationHandler/index.d.ts.map +1 -1
  14. package/build/types/core/src/store/ConfigurationStore.d.ts.map +1 -1
  15. package/build/types/core/src/store/ContentStore.d.ts.map +1 -1
  16. package/build/types/core/src/store/DataStore.d.ts +1 -1
  17. package/build/umd/126.diva-core.umd.min.js +2 -0
  18. package/build/umd/126.diva-core.umd.min.js.LICENSE.txt +1 -0
  19. package/build/umd/{109.diva-core.umd.min.js → 135.diva-core.umd.min.js} +2 -2
  20. package/build/umd/135.diva-core.umd.min.js.LICENSE.txt +1 -0
  21. package/build/umd/146.diva-core.umd.min.js +2 -0
  22. package/build/umd/146.diva-core.umd.min.js.LICENSE.txt +1 -0
  23. package/build/umd/215.diva-core.umd.min.js +2 -0
  24. package/build/umd/215.diva-core.umd.min.js.LICENSE.txt +1 -0
  25. package/build/umd/{962.diva-core.umd.min.js → 263.diva-core.umd.min.js} +2 -2
  26. package/build/umd/263.diva-core.umd.min.js.LICENSE.txt +1 -0
  27. package/build/umd/429.diva-core.umd.min.js +2 -0
  28. package/build/umd/429.diva-core.umd.min.js.LICENSE.txt +1 -0
  29. package/build/umd/{535.diva-core.umd.min.js → 700.diva-core.umd.min.js} +2 -2
  30. package/build/umd/700.diva-core.umd.min.js.LICENSE.txt +1 -0
  31. package/build/umd/731.diva-core.umd.min.js +2 -0
  32. package/build/umd/731.diva-core.umd.min.js.LICENSE.txt +1 -0
  33. package/build/umd/{304.diva-core.umd.min.js → 800.diva-core.umd.min.js} +2 -2
  34. package/build/umd/800.diva-core.umd.min.js.LICENSE.txt +1 -0
  35. package/build/umd/83.diva-core.umd.min.js +2 -0
  36. package/build/umd/83.diva-core.umd.min.js.LICENSE.txt +1 -0
  37. package/build/umd/diva-core.umd.min.js +29 -2
  38. package/build/umd/diva-core.umd.min.js.LICENSE.txt +11 -1
  39. package/build/umd/report.html +1 -1
  40. package/package.json +10 -10
  41. package/build/umd/109.diva-core.umd.min.js.LICENSE.txt +0 -1
  42. package/build/umd/304.diva-core.umd.min.js.LICENSE.txt +0 -1
  43. package/build/umd/41.diva-core.umd.min.js +0 -2
  44. package/build/umd/41.diva-core.umd.min.js.LICENSE.txt +0 -1
  45. package/build/umd/53.diva-core.umd.min.js +0 -2
  46. package/build/umd/53.diva-core.umd.min.js.LICENSE.txt +0 -1
  47. package/build/umd/535.diva-core.umd.min.js.LICENSE.txt +0 -1
  48. package/build/umd/671.diva-core.umd.min.js +0 -2
  49. package/build/umd/671.diva-core.umd.min.js.LICENSE.txt +0 -1
  50. package/build/umd/704.diva-core.umd.min.js +0 -2
  51. package/build/umd/704.diva-core.umd.min.js.LICENSE.txt +0 -1
  52. package/build/umd/806.diva-core.umd.min.js +0 -2
  53. package/build/umd/806.diva-core.umd.min.js.LICENSE.txt +0 -1
  54. package/build/umd/902.diva-core.umd.min.js +0 -2
  55. package/build/umd/902.diva-core.umd.min.js.LICENSE.txt +0 -1
  56. package/build/umd/962.diva-core.umd.min.js.LICENSE.txt +0 -1
@@ -44,7 +44,7 @@ import { actions } from '@storybook/addon-actions';
44
44
  import * as Styles from '@mui/styles';
45
45
 
46
46
  (function() {
47
- const env = {"STAGE":"production","VERSION":"25.4.0-beta.4"};
47
+ const env = {"STAGE":"production","VERSION":"25.4.0-beta.41"};
48
48
  try {
49
49
  if (process) {
50
50
  process.env = Object.assign({}, process.env);
@@ -876,7 +876,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
876
876
  }, {
877
877
  key: "navigation",
878
878
  get: function get() {
879
- var _this$_configuration9, _this$_configuration10, _this$_configuration11, _this$_configuration12, _this$_configuration13, _this$_configuration14, _this$_configuration15, _this$_configuration16, _this$_configuration17, _this$_configuration18, _this$_configuration19, _this$_configuration20, _this$_configuration21, _this$_configuration22, _this$_configuration23, _this$_configuration24, _this$_configuration25, _this$_configuration26;
879
+ var _this$_configuration9, _this$_configuration10, _this$_configuration11, _this$_configuration12, _this$_configuration13, _this$_configuration14, _this$_configuration15, _this$_configuration16, _this$_configuration17, _this$_configuration18, _this$_configuration19, _this$_configuration20, _this$_configuration21, _this$_configuration22, _this$_configuration23, _this$_configuration24, _this$_configuration25, _this$root$dataStore$, _this$_configuration26;
880
880
  return {
881
881
  buttons: ((_this$_configuration9 = this._configuration) === null || _this$_configuration9 === void 0 || (_this$_configuration9 = _this$_configuration9.navigation) === null || _this$_configuration9 === void 0 ? void 0 : _this$_configuration9.buttons) || [],
882
882
  imprintUrl: (_this$_configuration10 = this._configuration) === null || _this$_configuration10 === void 0 || (_this$_configuration10 = _this$_configuration10.navigation) === null || _this$_configuration10 === void 0 ? void 0 : _this$_configuration10.imprintUrl,
@@ -895,9 +895,9 @@ var ConfigurationStore = /*#__PURE__*/function () {
895
895
  qrCodeScanner: (_this$_configuration23 = this._configuration) === null || _this$_configuration23 === void 0 || (_this$_configuration23 = _this$_configuration23.navigation) === null || _this$_configuration23 === void 0 ? void 0 : _this$_configuration23.qrCodeScanner,
896
896
  greetingsText: (_this$_configuration24 = this._configuration) === null || _this$_configuration24 === void 0 || (_this$_configuration24 = _this$_configuration24.navigation) === null || _this$_configuration24 === void 0 ? void 0 : _this$_configuration24.greetingsText,
897
897
  showSnow: (_this$_configuration25 = this._configuration) === null || _this$_configuration25 === void 0 || (_this$_configuration25 = _this$_configuration25.navigation) === null || _this$_configuration25 === void 0 ? void 0 : _this$_configuration25.showSnow,
898
- pricePreviewActive: (_this$_configuration26 = this._configuration) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.components.available.find(function (c) {
898
+ pricePreviewActive: ((_this$root$dataStore$ = this.root.dataStore.organization) === null || _this$root$dataStore$ === void 0 || (_this$root$dataStore$ = _this$root$dataStore$.settings) === null || _this$root$dataStore$ === void 0 ? void 0 : _this$root$dataStore$.pricePreview) && this.root.dataStore.organization.settings.pricePreview !== 'off' || ((_this$_configuration26 = this._configuration) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.components.available.find(function (c) {
899
899
  return c.type === 'DIVA_WEBPLANNER';
900
- })) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.settings) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.ViewConfig) === null || _this$_configuration26 === void 0 ? void 0 : _this$_configuration26.pricePreview
900
+ })) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.settings) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.ViewConfig) === null || _this$_configuration26 === void 0 ? void 0 : _this$_configuration26.pricePreview)
901
901
  };
902
902
  }
903
903
  }, {
@@ -1000,14 +1000,14 @@ var ConfigurationStore = /*#__PURE__*/function () {
1000
1000
  get: function get() {
1001
1001
  var _this$_configuration53;
1002
1002
  if ((_this$_configuration53 = this._configuration) !== null && _this$_configuration53 !== void 0 && _this$_configuration53.priceFormat) {
1003
- var _this$_configuration54, _this$root$dataStore$, _this$root$dataStore$2, _this$_configuration55;
1003
+ var _this$_configuration54, _this$root$dataStore$2, _this$root$dataStore$3, _this$_configuration55;
1004
1004
  return _objectSpread$g(_objectSpread$g({}, (_this$_configuration54 = this._configuration) === null || _this$_configuration54 === void 0 ? void 0 : _this$_configuration54.priceFormat), {}, {
1005
- currency: (_this$root$dataStore$ = (_this$root$dataStore$2 = this.root.dataStore.organization) === null || _this$root$dataStore$2 === void 0 ? void 0 : _this$root$dataStore$2.settings.defaultCurrency) !== null && _this$root$dataStore$ !== void 0 ? _this$root$dataStore$ : (_this$_configuration55 = this._configuration) === null || _this$_configuration55 === void 0 ? void 0 : _this$_configuration55.priceFormat.currency
1005
+ currency: (_this$root$dataStore$2 = (_this$root$dataStore$3 = this.root.dataStore.organization) === null || _this$root$dataStore$3 === void 0 ? void 0 : _this$root$dataStore$3.settings.defaultCurrency) !== null && _this$root$dataStore$2 !== void 0 ? _this$root$dataStore$2 : (_this$_configuration55 = this._configuration) === null || _this$_configuration55 === void 0 ? void 0 : _this$_configuration55.priceFormat.currency
1006
1006
  });
1007
1007
  } else {
1008
- var _this$root$dataStore$3, _this$root$dataStore$4;
1008
+ var _this$root$dataStore$4, _this$root$dataStore$5;
1009
1009
  return _objectSpread$g(_objectSpread$g({}, DivaUtils.defaultPriceFormat), {}, {
1010
- currency: (_this$root$dataStore$3 = (_this$root$dataStore$4 = this.root.dataStore.organization) === null || _this$root$dataStore$4 === void 0 ? void 0 : _this$root$dataStore$4.settings.defaultCurrency) !== null && _this$root$dataStore$3 !== void 0 ? _this$root$dataStore$3 : DivaUtils.defaultPriceFormat.currency
1010
+ currency: (_this$root$dataStore$4 = (_this$root$dataStore$5 = this.root.dataStore.organization) === null || _this$root$dataStore$5 === void 0 ? void 0 : _this$root$dataStore$5.settings.defaultCurrency) !== null && _this$root$dataStore$4 !== void 0 ? _this$root$dataStore$4 : DivaUtils.defaultPriceFormat.currency
1011
1011
  });
1012
1012
  }
1013
1013
  }
@@ -2235,8 +2235,14 @@ var ContentStore = /*#__PURE__*/function () {
2235
2235
  value:
2236
2236
  /*#__PURE__*/
2237
2237
  _regeneratorRuntime.mark(function openComponent(action) {
2238
- var _this$componentChange, _config2, _config4, _config5;
2239
- var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref2, type, parameters, internal, route, openInFullscreen, keepOldState, config, newTab, _config3, base, settings, openModuleLables, _parameters, otherPrams, module, prevType, prevState, currentState, componentState, _this$root$dataStore$, _config$barrier, _parameters2;
2238
+ var _this$componentChange,
2239
+ _config2,
2240
+ _config3,
2241
+ _this2 = this,
2242
+ _config6,
2243
+ _config8,
2244
+ _config9;
2245
+ var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref2, type, parameters, internal, route, openInFullscreen, keepOldState, config, parent, _this$root$dataStore$, _this$root$dataStore$2, _config4, newTab, _config7, base, settings, openModuleLables, _parameters, otherPrams, module, prevType, prevState, currentState, componentState, _this$root$dataStore$3, _config$barrier, _parameters2;
2240
2246
  return _regeneratorRuntime.wrap(function openComponent$(_context) {
2241
2247
  while (1) switch (_context.prev = _context.next) {
2242
2248
  case 0:
@@ -2283,18 +2289,59 @@ var ContentStore = /*#__PURE__*/function () {
2283
2289
  return c.route && (route === null || route === void 0 ? void 0 : route.startsWith(c.route));
2284
2290
  });
2285
2291
  }
2286
- newTab = action.openInNewTab || ((_config2 = config) === null || _config2 === void 0 ? void 0 : _config2.openInNewTab);
2292
+ 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')) {
2293
+ _context.next = 23;
2294
+ break;
2295
+ }
2296
+ parent = undefined;
2297
+ if (this.root.dataStore.organization.type == undefined && this.root.dataStore.organization.parentType == 'RETAILER') {
2298
+ parent = (_this$root$dataStore$ = this.root.dataStore.organization.parentOrganizations) === null || _this$root$dataStore$ === void 0 ? void 0 : _this$root$dataStore$.find(function (o) {
2299
+ return o.type == 'RETAILER';
2300
+ });
2301
+ } else if (this.root.dataStore.organization.type == undefined && this.root.dataStore.organization.parentType == 'ASSOCIATION') {
2302
+ parent = (_this$root$dataStore$2 = this.root.dataStore.organization.parentOrganizations) === null || _this$root$dataStore$2 === void 0 ? void 0 : _this$root$dataStore$2.find(function (o) {
2303
+ return o.type == 'ASSOCIATION';
2304
+ });
2305
+ }
2306
+ if (!parent) {
2307
+ _context.next = 23;
2308
+ break;
2309
+ }
2310
+ this.openModal({
2311
+ title: this.root.t('action.opencomponent.diva6.warning.title'),
2312
+ text: this.root.t('action.opencomponent.diva6.warning.text', {
2313
+ type: ((_config4 = config) === null || _config4 === void 0 ? void 0 : _config4.type) == 'CATEGORY_MANAGER' ? 'Category Manager' : 'Sortiments Manager',
2314
+ parent: parent.displayName
2315
+ }),
2316
+ accept: true,
2317
+ reject: true,
2318
+ rejectByIcon: true,
2319
+ callback: function callback(accept) {
2320
+ if (accept) {
2321
+ var _config5;
2322
+ var url = "".concat(window.location.origin).concat((_config5 = config) === null || _config5 === void 0 ? void 0 : _config5.route, "?lang=").concat(_this2.root.language, "&organizationId=").concat(parent._id);
2323
+ _this2.openInNewTab({
2324
+ url: url,
2325
+ openInNewTab: true
2326
+ });
2327
+ }
2328
+ }
2329
+ });
2330
+ this.root.loadingAndErrorStore.toggleLoading('openComponent');
2331
+ return _context.abrupt("return");
2332
+ case 23:
2333
+ newTab = action.openInNewTab || ((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.openInNewTab);
2287
2334
  if (!newTab) {
2288
- _context.next = 22;
2335
+ _context.next = 29;
2289
2336
  break;
2290
2337
  }
2291
2338
  base = typeof action.openInNewTab == 'string' ? action.openInNewTab : window.origin;
2292
- this.openInNewTab(action, "".concat(base).concat(((_config3 = config) === null || _config3 === void 0 ? void 0 : _config3.route) || ''));
2339
+ this.openInNewTab(action, "".concat(base).concat(((_config7 = config) === null || _config7 === void 0 ? void 0 : _config7.route) || ''));
2293
2340
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2294
2341
  return _context.abrupt("return");
2295
- case 22:
2342
+ case 29:
2296
2343
  if (!(!this.root.dataStore.user && !this.isPublic(action))) {
2297
- _context.next = 28;
2344
+ _context.next = 35;
2298
2345
  break;
2299
2346
  }
2300
2347
  LOG$9.debug("Component is restricted, open login form");
@@ -2302,9 +2349,9 @@ var ContentStore = /*#__PURE__*/function () {
2302
2349
  this.root.authorizationStore.showLogin();
2303
2350
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2304
2351
  return _context.abrupt("return");
2305
- case 28:
2352
+ case 35:
2306
2353
  if (config) {
2307
- _context.next = 33;
2354
+ _context.next = 40;
2308
2355
  break;
2309
2356
  }
2310
2357
  this._restrictedComponent = action;
@@ -2316,7 +2363,7 @@ var ContentStore = /*#__PURE__*/function () {
2316
2363
  }
2317
2364
  }), 'CORE_0005');
2318
2365
  return _context.abrupt("return");
2319
- case 33:
2366
+ case 40:
2320
2367
  settings = undefined;
2321
2368
  if (config.settings) {
2322
2369
  settings = config.settings;
@@ -2329,8 +2376,8 @@ var ContentStore = /*#__PURE__*/function () {
2329
2376
  openModuleLables = parameters;
2330
2377
  parameters = otherPrams;
2331
2378
  }
2332
- module = this.mapTypeToModule((_config4 = config) === null || _config4 === void 0 ? void 0 : _config4.type);
2333
- LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config5 = config) === null || _config5 === void 0 ? void 0 : _config5.type), openModuleLables);
2379
+ module = this.mapTypeToModule((_config8 = config) === null || _config8 === void 0 ? void 0 : _config8.type);
2380
+ LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
2334
2381
  prevType = this.visible;
2335
2382
  prevState = this.state.get(this.visible || '');
2336
2383
  currentState = this.state.get(config.type);
@@ -2342,7 +2389,7 @@ var ContentStore = /*#__PURE__*/function () {
2342
2389
  this.state.set(config.type, componentState);
2343
2390
  this.visible = config.type;
2344
2391
  if (config.isPublic == 'barrier') {
2345
- if (!this.root.dataStore.user || !((_this$root$dataStore$ = this.root.dataStore.user) !== null && _this$root$dataStore$ !== void 0 && _this$root$dataStore$.isEmailVerified)) {
2392
+ if (!this.root.dataStore.user || !((_this$root$dataStore$3 = this.root.dataStore.user) !== null && _this$root$dataStore$3 !== void 0 && _this$root$dataStore$3.isEmailVerified)) {
2346
2393
  if (!((_config$barrier = config.barrier) !== null && _config$barrier !== void 0 && _config$barrier.excludeParams) || !Object.keys((_parameters2 = parameters) !== null && _parameters2 !== void 0 ? _parameters2 : {}).find(function (p) {
2347
2394
  return config.barrier.excludeParams.includes(p);
2348
2395
  })) this.loginBarrier(true, config.barrier);
@@ -2374,7 +2421,7 @@ var ContentStore = /*#__PURE__*/function () {
2374
2421
  }
2375
2422
  this.setGlobalClass();
2376
2423
  this.root.loadingAndErrorStore.toggleLoading('openComponent');
2377
- case 53:
2424
+ case 60:
2378
2425
  case "end":
2379
2426
  return _context.stop();
2380
2427
  }
@@ -2383,7 +2430,7 @@ var ContentStore = /*#__PURE__*/function () {
2383
2430
  }, {
2384
2431
  key: "openComponentInFullscreen",
2385
2432
  value: /*#__PURE__*/_regeneratorRuntime.mark(function openComponentInFullscreen(component) {
2386
- var _config6, _config7;
2433
+ var _config10, _config11;
2387
2434
  var type, parameters, internal, route, config, settings, module, componentState;
2388
2435
  return _regeneratorRuntime.wrap(function openComponentInFullscreen$(_context2) {
2389
2436
  while (1) switch (_context2.prev = _context2.next) {
@@ -2433,8 +2480,8 @@ var ContentStore = /*#__PURE__*/function () {
2433
2480
  case 17:
2434
2481
  settings = _context2.sent;
2435
2482
  case 18:
2436
- module = this.mapTypeToModule((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.type);
2437
- LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config7 = config) === null || _config7 === void 0 ? void 0 : _config7.type));
2483
+ module = this.mapTypeToModule((_config10 = config) === null || _config10 === void 0 ? void 0 : _config10.type);
2484
+ LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
2438
2485
  componentState = {
2439
2486
  key: config.type,
2440
2487
  parameters: parameters,
@@ -2505,7 +2552,7 @@ var ContentStore = /*#__PURE__*/function () {
2505
2552
  value: function loginBarrier(anon, settings) {
2506
2553
  var _settings$title,
2507
2554
  _settings$text,
2508
- _this2 = this;
2555
+ _this3 = this;
2509
2556
  this.openBarrier({
2510
2557
  type: settings !== null && settings !== void 0 && settings.skipVerify ? 'SIMPLE' : 'GET_EMAIL',
2511
2558
  rejectable: false,
@@ -2520,22 +2567,22 @@ var ContentStore = /*#__PURE__*/function () {
2520
2567
  return;
2521
2568
  }
2522
2569
  LOG$9.debug("Request email verification for ".concat(email));
2523
- _this2.root.apiHandler.sendVerificationEmail({
2570
+ _this3.root.apiHandler.sendVerificationEmail({
2524
2571
  email: email,
2525
2572
  emailVariant: (_settings$emailVarian = settings === null || settings === void 0 ? void 0 : settings.emailVariant) !== null && _settings$emailVarian !== void 0 ? _settings$emailVarian : 'DEMO'
2526
2573
  });
2527
- _this2.openModal({
2528
- title: _this2.root.t('loginbarrier.verify.title'),
2529
- text: _this2.root.t('loginbarrier.verify.text'),
2574
+ _this3.openModal({
2575
+ title: _this3.root.t('loginbarrier.verify.title'),
2576
+ text: _this3.root.t('loginbarrier.verify.text'),
2530
2577
  maxWidth: 500,
2531
2578
  actions: [{
2532
- text: _this2.root.t('loginbarrier.verify.button'),
2579
+ text: _this3.root.t('loginbarrier.verify.button'),
2533
2580
  variant: 'contained',
2534
2581
  id: 'verify',
2535
2582
  closeable: false
2536
2583
  }],
2537
2584
  callback: function callback() {
2538
- _this2.loginBarrier(false, settings);
2585
+ _this3.loginBarrier(false, settings);
2539
2586
  }
2540
2587
  });
2541
2588
  }
@@ -2551,9 +2598,9 @@ var ContentStore = /*#__PURE__*/function () {
2551
2598
  * @param logo the custom logo
2552
2599
  */
2553
2600
  function updateCustomLogo(components, logo) {
2554
- var _this3 = this;
2601
+ var _this4 = this;
2555
2602
  components.forEach(function (c) {
2556
- return logo ? _this3.customLogoMap.set(c, logo) : _this3.customLogoMap["delete"](c);
2603
+ return logo ? _this4.customLogoMap.set(c, logo) : _this4.customLogoMap["delete"](c);
2557
2604
  });
2558
2605
  }
2559
2606
 
@@ -2565,9 +2612,9 @@ var ContentStore = /*#__PURE__*/function () {
2565
2612
  }, {
2566
2613
  key: "updateCustomHeaderElement",
2567
2614
  value: function updateCustomHeaderElement(components, element) {
2568
- var _this4 = this;
2615
+ var _this5 = this;
2569
2616
  components.forEach(function (c) {
2570
- return element ? _this4.customHeaderComponentMap.set(c, element) : _this4.customHeaderComponentMap["delete"](c);
2617
+ return element ? _this5.customHeaderComponentMap.set(c, element) : _this5.customHeaderComponentMap["delete"](c);
2571
2618
  });
2572
2619
  }
2573
2620
 
@@ -2646,7 +2693,7 @@ var ContentStore = /*#__PURE__*/function () {
2646
2693
  }, {
2647
2694
  key: "breadcrumbs",
2648
2695
  get: function get() {
2649
- var _this5 = this;
2696
+ var _this6 = this;
2650
2697
  if (!this.visible) {
2651
2698
  return undefined;
2652
2699
  }
@@ -2658,7 +2705,7 @@ var ContentStore = /*#__PURE__*/function () {
2658
2705
  var group = _step2.value;
2659
2706
  var path = group.path.find(function (p) {
2660
2707
  return componentsEqual(p.component, {
2661
- type: _this5.visible,
2708
+ type: _this6.visible,
2662
2709
  parameters: state.parameters,
2663
2710
  internal: state.internal
2664
2711
  });
@@ -2712,9 +2759,9 @@ var ContentStore = /*#__PURE__*/function () {
2712
2759
  }, {
2713
2760
  key: "currentComponent",
2714
2761
  get: function get() {
2715
- var _this6 = this;
2762
+ var _this7 = this;
2716
2763
  return this.root.configurationStore.components.find(function (c) {
2717
- return c.type == _this6.visible;
2764
+ return c.type == _this7.visible;
2718
2765
  });
2719
2766
  }
2720
2767
 
@@ -2751,11 +2798,11 @@ var ContentStore = /*#__PURE__*/function () {
2751
2798
  }, {
2752
2799
  key: "allowHidePrices",
2753
2800
  get: function get() {
2754
- var _this$root$dataStore$2;
2801
+ var _this$root$dataStore$4;
2755
2802
  if (!this.visible) {
2756
2803
  return false;
2757
2804
  }
2758
- if (((_this$root$dataStore$2 = this.root.dataStore.organization) === null || _this$root$dataStore$2 === void 0 || (_this$root$dataStore$2 = _this$root$dataStore$2.settings) === null || _this$root$dataStore$2 === void 0 ? void 0 : _this$root$dataStore$2.hidePrices) !== undefined) {
2805
+ if (((_this$root$dataStore$4 = this.root.dataStore.organization) === null || _this$root$dataStore$4 === void 0 || (_this$root$dataStore$4 = _this$root$dataStore$4.settings) === null || _this$root$dataStore$4 === void 0 ? void 0 : _this$root$dataStore$4.hidePrices) !== undefined) {
2759
2806
  return this.root.dataStore.organization.settings.hidePrices.startsWith('DEFAULT');
2760
2807
  }
2761
2808
  return true;
@@ -2770,8 +2817,8 @@ var ContentStore = /*#__PURE__*/function () {
2770
2817
  key: "hidePrices",
2771
2818
  get: function get() {
2772
2819
  if (this._hidePrices === undefined) {
2773
- var _this$root$dataStore$3;
2774
- if ((_this$root$dataStore$3 = this.root.dataStore.organization) !== null && _this$root$dataStore$3 !== void 0 && (_this$root$dataStore$3 = _this$root$dataStore$3.settings) !== null && _this$root$dataStore$3 !== void 0 && _this$root$dataStore$3.hidePrices) {
2820
+ var _this$root$dataStore$5;
2821
+ if ((_this$root$dataStore$5 = this.root.dataStore.organization) !== null && _this$root$dataStore$5 !== void 0 && (_this$root$dataStore$5 = _this$root$dataStore$5.settings) !== null && _this$root$dataStore$5 !== void 0 && _this$root$dataStore$5.hidePrices) {
2775
2822
  switch (this.root.dataStore.organization.settings.hidePrices) {
2776
2823
  case 'DEFAULT_HIDDEN':
2777
2824
  case 'ONLY_HIDDEN':
@@ -2995,11 +3042,11 @@ var ContentStore = /*#__PURE__*/function () {
2995
3042
  }, {
2996
3043
  key: "openBarrier",
2997
3044
  value: function openBarrier(barrier) {
2998
- var _this$root$dataStore$4,
2999
- _this$root$dataStore$5,
3045
+ var _this$root$dataStore$6,
3046
+ _this$root$dataStore$7,
3000
3047
  _barrier$actions,
3001
- _this7 = this;
3002
- if (barrier.anonOnly && (_this$root$dataStore$4 = this.root.dataStore.user) !== null && _this$root$dataStore$4 !== void 0 && _this$root$dataStore$4.mainEmail) {
3048
+ _this8 = this;
3049
+ if (barrier.anonOnly && (_this$root$dataStore$6 = this.root.dataStore.user) !== null && _this$root$dataStore$6 !== void 0 && _this$root$dataStore$6.mainEmail) {
3003
3050
  LOG$9.debug('Skip barrier because user is logged in');
3004
3051
  return;
3005
3052
  }
@@ -3014,25 +3061,25 @@ var ContentStore = /*#__PURE__*/function () {
3014
3061
  },
3015
3062
  content: /*#__PURE__*/React.createElement(Barrier, {
3016
3063
  type: barrier.type,
3017
- currentEmail: (_this$root$dataStore$5 = this.root.dataStore.user) === null || _this$root$dataStore$5 === void 0 ? void 0 : _this$root$dataStore$5.mainEmail,
3064
+ currentEmail: (_this$root$dataStore$7 = this.root.dataStore.user) === null || _this$root$dataStore$7 === void 0 ? void 0 : _this$root$dataStore$7.mainEmail,
3018
3065
  actions: (_barrier$actions = barrier.actions) === null || _barrier$actions === void 0 ? void 0 : _barrier$actions.map(function (a) {
3019
3066
  return _objectSpread$b(_objectSpread$b({}, a), {}, {
3020
3067
  onClick: function () {
3021
3068
  var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(email) {
3022
- var _this7$root$dataStore;
3069
+ var _this8$root$dataStore;
3023
3070
  var doLogin;
3024
3071
  return _regeneratorRuntime.wrap(function _callee$(_context3) {
3025
3072
  while (1) switch (_context3.prev = _context3.next) {
3026
3073
  case 0:
3027
- _this7.closeModal();
3074
+ _this8.closeModal();
3028
3075
  doLogin = (a.loginType ? a.loginType : barrier.type) === 'SIMPLE';
3029
- if (!(doLogin && ((_this7$root$dataStore = _this7.root.dataStore.user) === null || _this7$root$dataStore === void 0 ? void 0 : _this7$root$dataStore.mainEmail) != email)) {
3076
+ if (!(doLogin && ((_this8$root$dataStore = _this8.root.dataStore.user) === null || _this8$root$dataStore === void 0 ? void 0 : _this8$root$dataStore.mainEmail) != email)) {
3030
3077
  _context3.next = 11;
3031
3078
  break;
3032
3079
  }
3033
3080
  _context3.prev = 3;
3034
3081
  _context3.next = 6;
3035
- return flowResult(_this7.root.authorizationStore.login(email, undefined, true, _this7.root.dataStore.organizationId));
3082
+ return flowResult(_this8.root.authorizationStore.login(email, undefined, true, _this8.root.dataStore.organizationId));
3036
3083
  case 6:
3037
3084
  _context3.next = 11;
3038
3085
  break;
@@ -3078,7 +3125,7 @@ var ContentStore = /*#__PURE__*/function () {
3078
3125
  }, {
3079
3126
  key: "sendEmail",
3080
3127
  value: function sendEmail(_ref4) {
3081
- var _this8 = this;
3128
+ var _this9 = this;
3082
3129
  var dialogText = _ref4.dialogText,
3083
3130
  showDialog = _ref4.showDialog,
3084
3131
  callback = _ref4.callback,
@@ -3095,12 +3142,12 @@ var ContentStore = /*#__PURE__*/function () {
3095
3142
  }
3096
3143
  _context4.next = 4;
3097
3144
  return new Promise(function (resolve) {
3098
- return _this8.openModal({
3145
+ return _this9.openModal({
3099
3146
  reject: true,
3100
3147
  accept: true,
3101
- text: dialogText ? _this8.root.t(dialogText, {
3148
+ text: dialogText ? _this9.root.t(dialogText, {
3102
3149
  to: content.to
3103
- }) : _this8.root.t('email.question.default', {
3150
+ }) : _this9.root.t('email.question.default', {
3104
3151
  to: content.to
3105
3152
  }),
3106
3153
  callback: function callback(accept) {
@@ -3116,20 +3163,20 @@ var ContentStore = /*#__PURE__*/function () {
3116
3163
  }
3117
3164
  return _context4.abrupt("return");
3118
3165
  case 6:
3119
- _this8.root.loadingAndErrorStore.toggleLoading('sendingEmail');
3166
+ _this9.root.loadingAndErrorStore.toggleLoading('sendingEmail');
3120
3167
  _context4.prev = 7;
3121
- content.language = (_content$language$toU = (_content$language = content.language) === null || _content$language === void 0 ? void 0 : _content$language.toUpperCase()) !== null && _content$language$toU !== void 0 ? _content$language$toU : _this8.root.language.toUpperCase();
3168
+ content.language = (_content$language$toU = (_content$language = content.language) === null || _content$language === void 0 ? void 0 : _content$language.toUpperCase()) !== null && _content$language$toU !== void 0 ? _content$language$toU : _this9.root.language.toUpperCase();
3122
3169
  _context4.next = 11;
3123
- return _this8.root.apiHandler.sendEmail({
3170
+ return _this9.root.apiHandler.sendEmail({
3124
3171
  content: content,
3125
- organizationIds: _this8.root.dataStore.fullParentList
3172
+ organizationIds: _this9.root.dataStore.fullParentList
3126
3173
  });
3127
3174
  case 11:
3128
3175
  if (callback) {
3129
3176
  callback(true);
3130
3177
  } else {
3131
- _this8.openModal({
3132
- text: _this8.root.t('email.send.success'),
3178
+ _this9.openModal({
3179
+ text: _this9.root.t('email.send.success'),
3133
3180
  accept: true
3134
3181
  });
3135
3182
  }
@@ -3141,14 +3188,14 @@ var ContentStore = /*#__PURE__*/function () {
3141
3188
  if (callback) {
3142
3189
  callback(false);
3143
3190
  } else {
3144
- _this8.openModal({
3145
- text: _this8.root.t('email.send.error'),
3191
+ _this9.openModal({
3192
+ text: _this9.root.t('email.send.error'),
3146
3193
  accept: true
3147
3194
  });
3148
3195
  }
3149
3196
  case 17:
3150
3197
  _context4.prev = 17;
3151
- _this8.root.loadingAndErrorStore.toggleLoading('sendingEmail');
3198
+ _this9.root.loadingAndErrorStore.toggleLoading('sendingEmail');
3152
3199
  return _context4.finish(17);
3153
3200
  case 20:
3154
3201
  case "end":
@@ -3244,10 +3291,10 @@ var ContentStore = /*#__PURE__*/function () {
3244
3291
  key: "availableComponents",
3245
3292
  get: function get() {
3246
3293
  var _this$root,
3247
- _this9 = this;
3294
+ _this10 = this;
3248
3295
  return (_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.configurationStore.components.filter(function (component) {
3249
3296
  //the component must be passed to diva core
3250
- if (!_this9.configuration.find(function (config) {
3297
+ if (!_this10.configuration.find(function (config) {
3251
3298
  return config.name == component.type;
3252
3299
  })) {
3253
3300
  return false;
@@ -3258,11 +3305,11 @@ var ContentStore = /*#__PURE__*/function () {
3258
3305
  return true;
3259
3306
  }
3260
3307
  //if the user is not logged in the component must be public
3261
- if (!_this9.root.dataStore.user) {
3308
+ if (!_this10.root.dataStore.user) {
3262
3309
  return false;
3263
3310
  }
3264
3311
  //if there is a permission specified, the user must have it
3265
- return component.permission ? _this9.root.dataStore.userHasPermission(component.permission) : true;
3312
+ return component.permission ? _this10.root.dataStore.userHasPermission(component.permission) : true;
3266
3313
  });
3267
3314
  }
3268
3315
 
@@ -3272,14 +3319,14 @@ var ContentStore = /*#__PURE__*/function () {
3272
3319
  }, {
3273
3320
  key: "components",
3274
3321
  get: function get() {
3275
- var _this10 = this;
3322
+ var _this11 = this;
3276
3323
  var componentDefinitionToRender = this.configuration.filter(function (config) {
3277
3324
  //there must be a state present in order for the component to be rendered
3278
- if (!_this10.state.has(config.name)) {
3325
+ if (!_this11.state.has(config.name)) {
3279
3326
  return false;
3280
3327
  }
3281
3328
  //the component must be contained in the available components list in order to be rendered
3282
- return _this10.availableComponents.find(function (component) {
3329
+ return _this11.availableComponents.find(function (component) {
3283
3330
  return component.type == config.name;
3284
3331
  });
3285
3332
  });
@@ -3287,7 +3334,7 @@ var ContentStore = /*#__PURE__*/function () {
3287
3334
  //when a new component is added we have to make sure that for the currently open components the existing instance is reused
3288
3335
  //withTransaction creates a new instance if APM is active, so we would loose the state of currently open components
3289
3336
  componentDefinitionToRender.forEach(function (cmp) {
3290
- var toRender = _this10._currentlyRendered.find(function (c) {
3337
+ var toRender = _this11._currentlyRendered.find(function (c) {
3291
3338
  return c.name == cmp.name;
3292
3339
  });
3293
3340
  if (!toRender) {
@@ -3308,10 +3355,10 @@ var ContentStore = /*#__PURE__*/function () {
3308
3355
  }, {
3309
3356
  key: "fullscreenComponent",
3310
3357
  get: function get() {
3311
- var _this11 = this;
3358
+ var _this12 = this;
3312
3359
  var component = this.availableComponents.find(function (component) {
3313
- var _this11$_fullscreenCo;
3314
- return component.type == ((_this11$_fullscreenCo = _this11._fullscreenComponent) === null || _this11$_fullscreenCo === void 0 ? void 0 : _this11$_fullscreenCo.key);
3360
+ var _this12$_fullscreenCo;
3361
+ return component.type == ((_this12$_fullscreenCo = _this12._fullscreenComponent) === null || _this12$_fullscreenCo === void 0 ? void 0 : _this12$_fullscreenCo.key);
3315
3362
  });
3316
3363
  var cmp = this.configuration.find(function (config) {
3317
3364
  return (component === null || component === void 0 ? void 0 : component.type) == config.name;
@@ -3358,24 +3405,24 @@ var ContentStore = /*#__PURE__*/function () {
3358
3405
  key: "availableButtons",
3359
3406
  get: function get() {
3360
3407
  var _this$root$configurat,
3361
- _this12 = this;
3408
+ _this13 = this;
3362
3409
  return (_this$root$configurat = this.root.configurationStore.navigation) === null || _this$root$configurat === void 0 ? void 0 : _this$root$configurat.buttons.filter(function (button) {
3363
3410
  //if component is public it can be displayed
3364
3411
  if (button.isPublic) {
3365
3412
  return true;
3366
3413
  }
3367
3414
  //if the user is not logged in the component must be public
3368
- if (!_this12.root.dataStore.user) {
3415
+ if (!_this13.root.dataStore.user) {
3369
3416
  return false;
3370
3417
  }
3371
3418
 
3372
3419
  //if the button is opening a component, the component must be availalbe
3373
- if (button.action.type && !_this12.availableComponentList.includes(button.action.type)) {
3420
+ if (button.action.type && !_this13.availableComponentList.includes(button.action.type)) {
3374
3421
  return false;
3375
3422
  }
3376
3423
 
3377
3424
  //if there is a permission specified, the user must have it
3378
- return button.permission ? _this12.root.dataStore.userHasPermission(button.permission) : true;
3425
+ return button.permission ? _this13.root.dataStore.userHasPermission(button.permission) : true;
3379
3426
  });
3380
3427
  }
3381
3428
 
@@ -3460,7 +3507,7 @@ var ContentStore = /*#__PURE__*/function () {
3460
3507
  }, {
3461
3508
  key: "updateStateAfterLogout",
3462
3509
  value: function updateStateAfterLogout() {
3463
- var _this13 = this;
3510
+ var _this14 = this;
3464
3511
  var _iterator3 = _createForOfIteratorHelper(this.state.entries()),
3465
3512
  _step3;
3466
3513
  try {
@@ -3468,19 +3515,19 @@ var ContentStore = /*#__PURE__*/function () {
3468
3515
  var _step3$value = _slicedToArray(_step3.value, 2),
3469
3516
  type = _step3$value[0],
3470
3517
  component = _step3$value[1];
3471
- var config = _this13.root.configurationStore.components.find(function (c) {
3518
+ var config = _this14.root.configurationStore.components.find(function (c) {
3472
3519
  return c.type == type;
3473
3520
  });
3474
3521
  if (!(config !== null && config !== void 0 && config.isPublic)) {
3475
- _this13.state["delete"](type);
3476
- if (_this13.visible == type) {
3477
- _this13.visible = undefined;
3478
- _this13._restrictedComponent = {
3522
+ _this14.state["delete"](type);
3523
+ if (_this14.visible == type) {
3524
+ _this14.visible = undefined;
3525
+ _this14._restrictedComponent = {
3479
3526
  type: type,
3480
3527
  parameters: component.parameters,
3481
3528
  internal: component.internal
3482
3529
  };
3483
- _this13.root.authorizationStore.showLogin();
3530
+ _this14.root.authorizationStore.showLogin();
3484
3531
  }
3485
3532
  }
3486
3533
  };
@@ -3513,7 +3560,7 @@ var ContentStore = /*#__PURE__*/function () {
3513
3560
  if (action.url) {
3514
3561
  link = this.resoveUrl(action.url);
3515
3562
  } else {
3516
- var _this$root$dataStore$6;
3563
+ var _this$root$dataStore$8;
3517
3564
  var _ref5 = action,
3518
3565
  parameters = _ref5.parameters;
3519
3566
  var url = new URL(baseUrl);
@@ -3524,7 +3571,7 @@ var ContentStore = /*#__PURE__*/function () {
3524
3571
  if (this.root.language) {
3525
3572
  params.append('lang', this.root.language);
3526
3573
  }
3527
- if ((_this$root$dataStore$6 = this.root.dataStore.organization) !== null && _this$root$dataStore$6 !== void 0 && _this$root$dataStore$6._id) {
3574
+ if ((_this$root$dataStore$8 = this.root.dataStore.organization) !== null && _this$root$dataStore$8 !== void 0 && _this$root$dataStore$8._id) {
3528
3575
  params.append('organizationId', this.root.dataStore.organization._id);
3529
3576
  }
3530
3577
  link = url.href;
@@ -5190,21 +5237,27 @@ var ApiHandler = /*#__PURE__*/function () {
5190
5237
  }
5191
5238
  return _context7.abrupt("return", undefined);
5192
5239
  case 9:
5240
+ if (!(response.status == 403)) {
5241
+ _context7.next = 11;
5242
+ break;
5243
+ }
5244
+ return _context7.abrupt("return", 'FORBIDDEN');
5245
+ case 11:
5193
5246
  throw new DivaError("Error from server while loading organization. HTTP status: ".concat(response.status), {
5194
5247
  code: 'CORE_0001'
5195
5248
  });
5196
- case 12:
5197
- _context7.prev = 12;
5249
+ case 14:
5250
+ _context7.prev = 14;
5198
5251
  _context7.t0 = _context7["catch"](1);
5199
5252
  throw new DivaError('Error while loading organization', {
5200
5253
  code: 'CORE_0001',
5201
5254
  cause: _context7.t0
5202
5255
  });
5203
- case 15:
5256
+ case 17:
5204
5257
  case "end":
5205
5258
  return _context7.stop();
5206
5259
  }
5207
- }, _callee7, this, [[1, 12]]);
5260
+ }, _callee7, this, [[1, 14]]);
5208
5261
  }));
5209
5262
  function fetchOrganization(_x8) {
5210
5263
  return _fetchOrganization.apply(this, arguments);
@@ -5602,14 +5655,14 @@ var ApiHandler = /*#__PURE__*/function () {
5602
5655
  return getOrganizationBySearch;
5603
5656
  }()
5604
5657
  }, {
5605
- key: "getOrganizationDataById",
5658
+ key: "getOrganizationParentByType",
5606
5659
  value: function () {
5607
- var _getOrganizationDataById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(organizationId) {
5608
- var url, response;
5660
+ var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(organizationId, type) {
5661
+ var url, response, _data$data, data;
5609
5662
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
5610
5663
  while (1) switch (_context14.prev = _context14.next) {
5611
5664
  case 0:
5612
- url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId));
5665
+ url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId, "/parents/").concat(type.toLocaleLowerCase()));
5613
5666
  _context14.prev = 1;
5614
5667
  _context14.next = 4;
5615
5668
  return this.fetch({
@@ -5619,88 +5672,38 @@ var ApiHandler = /*#__PURE__*/function () {
5619
5672
  case 4:
5620
5673
  response = _context14.sent;
5621
5674
  if (!response.ok) {
5622
- _context14.next = 7;
5623
- break;
5624
- }
5625
- return _context14.abrupt("return", response.json());
5626
- case 7:
5627
- throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
5628
- code: 'CORE_0001'
5629
- });
5630
- case 10:
5631
- _context14.prev = 10;
5632
- _context14.t0 = _context14["catch"](1);
5633
- if (!(_context14.t0 instanceof DivaError)) {
5634
- _context14.next = 14;
5675
+ _context14.next = 10;
5635
5676
  break;
5636
5677
  }
5637
- throw _context14.t0;
5638
- case 14:
5639
- throw new DivaError('Error while getting organization', {
5640
- code: 'CORE_0001',
5641
- cause: _context14.t0
5642
- });
5643
- case 15:
5644
- case "end":
5645
- return _context14.stop();
5646
- }
5647
- }, _callee14, this, [[1, 10]]);
5648
- }));
5649
- function getOrganizationDataById(_x24) {
5650
- return _getOrganizationDataById.apply(this, arguments);
5651
- }
5652
- return getOrganizationDataById;
5653
- }()
5654
- }, {
5655
- key: "getOrganizationParentByType",
5656
- value: function () {
5657
- var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(organizationId, type) {
5658
- var url, response, _data$data, data;
5659
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
5660
- while (1) switch (_context15.prev = _context15.next) {
5661
- case 0:
5662
- url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId, "/parents/").concat(type.toLocaleLowerCase()));
5663
- _context15.prev = 1;
5664
- _context15.next = 4;
5665
- return this.fetch({
5666
- url: url.toString(),
5667
- jwt: this.jwt
5668
- });
5669
- case 4:
5670
- response = _context15.sent;
5671
- if (!response.ok) {
5672
- _context15.next = 10;
5673
- break;
5674
- }
5675
- _context15.next = 8;
5678
+ _context14.next = 8;
5676
5679
  return response.json();
5677
5680
  case 8:
5678
- data = _context15.sent;
5679
- return _context15.abrupt("return", (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[0]);
5681
+ data = _context14.sent;
5682
+ return _context14.abrupt("return", (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[0]);
5680
5683
  case 10:
5681
5684
  throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
5682
5685
  code: 'CORE_0001'
5683
5686
  });
5684
5687
  case 13:
5685
- _context15.prev = 13;
5686
- _context15.t0 = _context15["catch"](1);
5687
- if (!(_context15.t0 instanceof DivaError)) {
5688
- _context15.next = 17;
5688
+ _context14.prev = 13;
5689
+ _context14.t0 = _context14["catch"](1);
5690
+ if (!(_context14.t0 instanceof DivaError)) {
5691
+ _context14.next = 17;
5689
5692
  break;
5690
5693
  }
5691
- throw _context15.t0;
5694
+ throw _context14.t0;
5692
5695
  case 17:
5693
5696
  throw new DivaError('Error while getting organization', {
5694
5697
  code: 'CORE_0001',
5695
- cause: _context15.t0
5698
+ cause: _context14.t0
5696
5699
  });
5697
5700
  case 18:
5698
5701
  case "end":
5699
- return _context15.stop();
5702
+ return _context14.stop();
5700
5703
  }
5701
- }, _callee15, this, [[1, 13]]);
5704
+ }, _callee14, this, [[1, 13]]);
5702
5705
  }));
5703
- function getOrganizationParentByType(_x25, _x26) {
5706
+ function getOrganizationParentByType(_x24, _x25) {
5704
5707
  return _getOrganizationParentByType.apply(this, arguments);
5705
5708
  }
5706
5709
  return getOrganizationParentByType;
@@ -5708,10 +5711,10 @@ var ApiHandler = /*#__PURE__*/function () {
5708
5711
  }, {
5709
5712
  key: "getRetailerLocationsForArea",
5710
5713
  value: function () {
5711
- var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(organizationId, location, radius) {
5714
+ var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(organizationId, location, radius) {
5712
5715
  var url, response;
5713
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
5714
- while (1) switch (_context16.prev = _context16.next) {
5716
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
5717
+ while (1) switch (_context15.prev = _context15.next) {
5715
5718
  case 0:
5716
5719
  url = new URL("".concat(this.authService, "/organizations/").concat(organizationId, "/retailer-locations"));
5717
5720
  if (location) {
@@ -5719,43 +5722,43 @@ var ApiHandler = /*#__PURE__*/function () {
5719
5722
  url.searchParams.append('lng', String(location.lng()));
5720
5723
  }
5721
5724
  url.searchParams.append('radius', radius);
5722
- _context16.prev = 3;
5723
- _context16.next = 6;
5725
+ _context15.prev = 3;
5726
+ _context15.next = 6;
5724
5727
  return this.fetch({
5725
5728
  url: url.toString(),
5726
5729
  jwt: this.jwt
5727
5730
  });
5728
5731
  case 6:
5729
- response = _context16.sent;
5732
+ response = _context15.sent;
5730
5733
  if (!response.ok) {
5731
- _context16.next = 9;
5734
+ _context15.next = 9;
5732
5735
  break;
5733
5736
  }
5734
- return _context16.abrupt("return", response.json());
5737
+ return _context15.abrupt("return", response.json());
5735
5738
  case 9:
5736
5739
  throw new DivaError("Error from server while searching retailer locations. HTTP status: ".concat(response.status), {
5737
5740
  code: 'CORE_0001'
5738
5741
  });
5739
5742
  case 12:
5740
- _context16.prev = 12;
5741
- _context16.t0 = _context16["catch"](3);
5742
- if (!(_context16.t0 instanceof DivaError)) {
5743
- _context16.next = 16;
5743
+ _context15.prev = 12;
5744
+ _context15.t0 = _context15["catch"](3);
5745
+ if (!(_context15.t0 instanceof DivaError)) {
5746
+ _context15.next = 16;
5744
5747
  break;
5745
5748
  }
5746
- throw _context16.t0;
5749
+ throw _context15.t0;
5747
5750
  case 16:
5748
5751
  throw new DivaError('Error while getting retailer locations', {
5749
5752
  code: 'CORE_0001',
5750
- cause: _context16.t0
5753
+ cause: _context15.t0
5751
5754
  });
5752
5755
  case 17:
5753
5756
  case "end":
5754
- return _context16.stop();
5757
+ return _context15.stop();
5755
5758
  }
5756
- }, _callee16, this, [[3, 12]]);
5759
+ }, _callee15, this, [[3, 12]]);
5757
5760
  }));
5758
- function getRetailerLocationsForArea(_x27, _x28, _x29) {
5761
+ function getRetailerLocationsForArea(_x26, _x27, _x28) {
5759
5762
  return _getRetailerLocationsForArea.apply(this, arguments);
5760
5763
  }
5761
5764
  return getRetailerLocationsForArea;
@@ -5771,10 +5774,10 @@ var ApiHandler = /*#__PURE__*/function () {
5771
5774
  };
5772
5775
  return fetch;
5773
5776
  }(/*#__PURE__*/function () {
5774
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref6) {
5777
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref6) {
5775
5778
  var url, _ref6$method, method, jwt, body, headers;
5776
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
5777
- while (1) switch (_context17.prev = _context17.next) {
5779
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
5780
+ while (1) switch (_context16.prev = _context16.next) {
5778
5781
  case 0:
5779
5782
  url = _ref6.url, _ref6$method = _ref6.method, method = _ref6$method === void 0 ? 'GET' : _ref6$method, jwt = _ref6.jwt, body = _ref6.body;
5780
5783
  headers = {
@@ -5784,21 +5787,21 @@ var ApiHandler = /*#__PURE__*/function () {
5784
5787
  if (jwt) {
5785
5788
  headers.Authorization = "Bearer ".concat(jwt);
5786
5789
  }
5787
- _context17.next = 5;
5790
+ _context16.next = 5;
5788
5791
  return fetch(url, {
5789
5792
  method: method,
5790
5793
  headers: headers,
5791
5794
  body: body ? JSON.stringify(body) : undefined
5792
5795
  });
5793
5796
  case 5:
5794
- return _context17.abrupt("return", _context17.sent);
5797
+ return _context16.abrupt("return", _context16.sent);
5795
5798
  case 6:
5796
5799
  case "end":
5797
- return _context17.stop();
5800
+ return _context16.stop();
5798
5801
  }
5799
- }, _callee17);
5802
+ }, _callee16);
5800
5803
  }));
5801
- return function (_x30) {
5804
+ return function (_x29) {
5802
5805
  return _ref7.apply(this, arguments);
5803
5806
  };
5804
5807
  }())
@@ -5967,7 +5970,7 @@ var OrganizationHandler = /*#__PURE__*/function () {
5967
5970
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
5968
5971
  while (1) switch (_context5.prev = _context5.next) {
5969
5972
  case 0:
5970
- return _context5.abrupt("return", this.apiHandler.getOrganizationDataById(organizationId));
5973
+ return _context5.abrupt("return", this.apiHandler.fetchOrganization(organizationId));
5971
5974
  case 1:
5972
5975
  case "end":
5973
5976
  return _context5.stop();
@@ -6138,17 +6141,17 @@ var MediaHandler = /*#__PURE__*/function () {
6138
6141
  return getMediaById;
6139
6142
  }()
6140
6143
  }, {
6141
- key: "getHQRenderScriptById",
6144
+ key: "getMediaItemByRefId",
6142
6145
  value: function () {
6143
- var _getHQRenderScriptById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
6146
+ var _getMediaItemByRefId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(refid) {
6144
6147
  var fullUrl, res, resData;
6145
6148
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
6146
6149
  while (1) switch (_context3.prev = _context3.next) {
6147
6150
  case 0:
6148
- fullUrl = this.mediaService + '/hqrenderscripts';
6151
+ fullUrl = this.mediaService + '/v1/mediaitemref/' + refid + '/mediaitem';
6149
6152
  _context3.prev = 1;
6150
6153
  _context3.next = 4;
6151
- return fetch("".concat(fullUrl, "/").concat(id), {
6154
+ return fetch(fullUrl, {
6152
6155
  headers: {
6153
6156
  Authorization: 'Bearer ' + this.jwt,
6154
6157
  'Content-Type': 'application/json'
@@ -6160,27 +6163,72 @@ var MediaHandler = /*#__PURE__*/function () {
6160
6163
  return res.json();
6161
6164
  case 7:
6162
6165
  resData = _context3.sent;
6163
- _context3.next = 13;
6164
- break;
6166
+ if (!res.ok) {
6167
+ _context3.next = 10;
6168
+ break;
6169
+ }
6170
+ return _context3.abrupt("return", resData);
6165
6171
  case 10:
6166
- _context3.prev = 10;
6172
+ throw new Error(resData.error || 'Could not fetch mediaItem');
6173
+ case 13:
6174
+ _context3.prev = 13;
6167
6175
  _context3.t0 = _context3["catch"](1);
6176
+ throw new Error("Could not fetch mediaItem: ".concat(_context3.t0.message));
6177
+ case 16:
6178
+ case "end":
6179
+ return _context3.stop();
6180
+ }
6181
+ }, _callee3, this, [[1, 13]]);
6182
+ }));
6183
+ function getMediaItemByRefId(_x3) {
6184
+ return _getMediaItemByRefId.apply(this, arguments);
6185
+ }
6186
+ return getMediaItemByRefId;
6187
+ }()
6188
+ }, {
6189
+ key: "getHQRenderScriptById",
6190
+ value: function () {
6191
+ var _getHQRenderScriptById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id) {
6192
+ var fullUrl, res, resData;
6193
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
6194
+ while (1) switch (_context4.prev = _context4.next) {
6195
+ case 0:
6196
+ fullUrl = this.mediaService + '/hqrenderscripts';
6197
+ _context4.prev = 1;
6198
+ _context4.next = 4;
6199
+ return fetch("".concat(fullUrl, "/").concat(id), {
6200
+ headers: {
6201
+ Authorization: 'Bearer ' + this.jwt,
6202
+ 'Content-Type': 'application/json'
6203
+ }
6204
+ });
6205
+ case 4:
6206
+ res = _context4.sent;
6207
+ _context4.next = 7;
6208
+ return res.json();
6209
+ case 7:
6210
+ resData = _context4.sent;
6211
+ _context4.next = 13;
6212
+ break;
6213
+ case 10:
6214
+ _context4.prev = 10;
6215
+ _context4.t0 = _context4["catch"](1);
6168
6216
  throw new Error('Could not fetch mediaItem');
6169
6217
  case 13:
6170
6218
  if (!res.ok) {
6171
- _context3.next = 15;
6219
+ _context4.next = 15;
6172
6220
  break;
6173
6221
  }
6174
- return _context3.abrupt("return", resData);
6222
+ return _context4.abrupt("return", resData);
6175
6223
  case 15:
6176
6224
  throw new Error(resData.error);
6177
6225
  case 16:
6178
6226
  case "end":
6179
- return _context3.stop();
6227
+ return _context4.stop();
6180
6228
  }
6181
- }, _callee3, this, [[1, 10]]);
6229
+ }, _callee4, this, [[1, 10]]);
6182
6230
  }));
6183
- function getHQRenderScriptById(_x3) {
6231
+ function getHQRenderScriptById(_x4) {
6184
6232
  return _getHQRenderScriptById.apply(this, arguments);
6185
6233
  }
6186
6234
  return getHQRenderScriptById;
@@ -6188,10 +6236,10 @@ var MediaHandler = /*#__PURE__*/function () {
6188
6236
  }, {
6189
6237
  key: "getRooms",
6190
6238
  value: function () {
6191
- var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id, mainCategory, style, name) {
6239
+ var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, mainCategory, style, name) {
6192
6240
  var fullUrl, filterParts, filter, res, resData;
6193
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
6194
- while (1) switch (_context4.prev = _context4.next) {
6241
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
6242
+ while (1) switch (_context5.prev = _context5.next) {
6195
6243
  case 0:
6196
6244
  fullUrl = new URL(this.mediaService + '/rooms');
6197
6245
  fullUrl.searchParams.append('limit', '20');
@@ -6214,8 +6262,8 @@ var MediaHandler = /*#__PURE__*/function () {
6214
6262
  if (filter) {
6215
6263
  fullUrl.searchParams.append('filter', encodeURIComponent(filter));
6216
6264
  }
6217
- _context4.prev = 7;
6218
- _context4.next = 10;
6265
+ _context5.prev = 7;
6266
+ _context5.next = 10;
6219
6267
  return fetch(fullUrl.toString(), {
6220
6268
  headers: {
6221
6269
  Authorization: 'Bearer ' + this.jwt,
@@ -6223,32 +6271,32 @@ var MediaHandler = /*#__PURE__*/function () {
6223
6271
  }
6224
6272
  });
6225
6273
  case 10:
6226
- res = _context4.sent;
6227
- _context4.next = 13;
6274
+ res = _context5.sent;
6275
+ _context5.next = 13;
6228
6276
  return res.json();
6229
6277
  case 13:
6230
- resData = _context4.sent;
6231
- _context4.next = 19;
6278
+ resData = _context5.sent;
6279
+ _context5.next = 19;
6232
6280
  break;
6233
6281
  case 16:
6234
- _context4.prev = 16;
6235
- _context4.t0 = _context4["catch"](7);
6282
+ _context5.prev = 16;
6283
+ _context5.t0 = _context5["catch"](7);
6236
6284
  throw new Error('Could not get rooms');
6237
6285
  case 19:
6238
6286
  if (!res.ok) {
6239
- _context4.next = 21;
6287
+ _context5.next = 21;
6240
6288
  break;
6241
6289
  }
6242
- return _context4.abrupt("return", resData);
6290
+ return _context5.abrupt("return", resData.data);
6243
6291
  case 21:
6244
6292
  throw new Error(resData.error);
6245
6293
  case 22:
6246
6294
  case "end":
6247
- return _context4.stop();
6295
+ return _context5.stop();
6248
6296
  }
6249
- }, _callee4, this, [[7, 16]]);
6297
+ }, _callee5, this, [[7, 16]]);
6250
6298
  }));
6251
- function getRooms(_x4, _x5, _x6, _x7) {
6299
+ function getRooms(_x5, _x6, _x7, _x8) {
6252
6300
  return _getRooms.apply(this, arguments);
6253
6301
  }
6254
6302
  return getRooms;
@@ -6256,20 +6304,17 @@ var MediaHandler = /*#__PURE__*/function () {
6256
6304
  }, {
6257
6305
  key: "getRoomsNew",
6258
6306
  value: function () {
6259
- var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, mainCategory, organizationId, hideStandardRooms) {
6307
+ var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, mainCategory, organizationId) {
6260
6308
  var fullUrl, filterParts, filter, res, resData;
6261
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
6262
- while (1) switch (_context5.prev = _context5.next) {
6309
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
6310
+ while (1) switch (_context6.prev = _context6.next) {
6263
6311
  case 0:
6264
6312
  fullUrl = new URL(this.mediaService + '/rooms');
6265
- fullUrl.searchParams.append('limit', '20');
6313
+ fullUrl.searchParams.append('limit', '1000');
6266
6314
  fullUrl.searchParams.append('skip', '0');
6267
6315
  if (organizationId) {
6268
6316
  fullUrl.searchParams.append('organizationId', organizationId);
6269
6317
  }
6270
- if (hideStandardRooms) {
6271
- fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
6272
- }
6273
6318
  filterParts = [];
6274
6319
  if (id) {
6275
6320
  filterParts.push("+[{_id,eq,".concat(id, "},{variants.id,eq,").concat(id, "}]"));
@@ -6282,41 +6327,41 @@ var MediaHandler = /*#__PURE__*/function () {
6282
6327
  if (filter) {
6283
6328
  fullUrl.searchParams.append('filter', encodeURIComponent(filter));
6284
6329
  }
6285
- _context5.prev = 9;
6286
- _context5.next = 12;
6330
+ _context6.prev = 8;
6331
+ _context6.next = 11;
6287
6332
  return fetch(fullUrl.toString(), {
6288
6333
  headers: {
6289
6334
  Authorization: 'Bearer ' + this.jwt,
6290
6335
  'Content-Type': 'application/json'
6291
6336
  }
6292
6337
  });
6293
- case 12:
6294
- res = _context5.sent;
6295
- _context5.next = 15;
6338
+ case 11:
6339
+ res = _context6.sent;
6340
+ _context6.next = 14;
6296
6341
  return res.json();
6297
- case 15:
6298
- resData = _context5.sent;
6299
- _context5.next = 21;
6342
+ case 14:
6343
+ resData = _context6.sent;
6344
+ _context6.next = 20;
6300
6345
  break;
6301
- case 18:
6302
- _context5.prev = 18;
6303
- _context5.t0 = _context5["catch"](9);
6346
+ case 17:
6347
+ _context6.prev = 17;
6348
+ _context6.t0 = _context6["catch"](8);
6304
6349
  throw new Error('Could not get rooms');
6305
- case 21:
6350
+ case 20:
6306
6351
  if (!res.ok) {
6307
- _context5.next = 23;
6352
+ _context6.next = 22;
6308
6353
  break;
6309
6354
  }
6310
- return _context5.abrupt("return", resData);
6311
- case 23:
6355
+ return _context6.abrupt("return", resData.data);
6356
+ case 22:
6312
6357
  throw new Error(resData.error);
6313
- case 24:
6358
+ case 23:
6314
6359
  case "end":
6315
- return _context5.stop();
6360
+ return _context6.stop();
6316
6361
  }
6317
- }, _callee5, this, [[9, 18]]);
6362
+ }, _callee6, this, [[8, 17]]);
6318
6363
  }));
6319
- function getRoomsNew(_x8, _x9, _x10, _x11) {
6364
+ function getRoomsNew(_x9, _x10, _x11) {
6320
6365
  return _getRoomsNew.apply(this, arguments);
6321
6366
  }
6322
6367
  return getRoomsNew;
@@ -6324,17 +6369,14 @@ var MediaHandler = /*#__PURE__*/function () {
6324
6369
  }, {
6325
6370
  key: "getRoomsGrouped",
6326
6371
  value: function () {
6327
- var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, mainCategory, style, organizationId, hideStandardRooms) {
6372
+ var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id, mainCategory, style, organizationId) {
6328
6373
  var fullUrl, filterParts, filter, res, resData;
6329
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
6330
- while (1) switch (_context6.prev = _context6.next) {
6374
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
6375
+ while (1) switch (_context7.prev = _context7.next) {
6331
6376
  case 0:
6332
6377
  fullUrl = new URL(this.mediaService + '/rooms');
6333
6378
  if (organizationId) {
6334
6379
  fullUrl = new URL(this.mediaService + "/rooms/".concat(organizationId, "/grouped"));
6335
- if (hideStandardRooms) {
6336
- fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
6337
- }
6338
6380
  }
6339
6381
  fullUrl.searchParams.append('limit', '20');
6340
6382
  fullUrl.searchParams.append('skip', '0');
@@ -6353,8 +6395,8 @@ var MediaHandler = /*#__PURE__*/function () {
6353
6395
  if (filter) {
6354
6396
  fullUrl.searchParams.append('filter', encodeURIComponent(filter));
6355
6397
  }
6356
- _context6.prev = 8;
6357
- _context6.next = 11;
6398
+ _context7.prev = 8;
6399
+ _context7.next = 11;
6358
6400
  return fetch(fullUrl.toString(), {
6359
6401
  headers: {
6360
6402
  Authorization: 'Bearer ' + this.jwt,
@@ -6362,32 +6404,32 @@ var MediaHandler = /*#__PURE__*/function () {
6362
6404
  }
6363
6405
  });
6364
6406
  case 11:
6365
- res = _context6.sent;
6366
- _context6.next = 14;
6407
+ res = _context7.sent;
6408
+ _context7.next = 14;
6367
6409
  return res.json();
6368
6410
  case 14:
6369
- resData = _context6.sent;
6370
- _context6.next = 20;
6411
+ resData = _context7.sent;
6412
+ _context7.next = 20;
6371
6413
  break;
6372
6414
  case 17:
6373
- _context6.prev = 17;
6374
- _context6.t0 = _context6["catch"](8);
6415
+ _context7.prev = 17;
6416
+ _context7.t0 = _context7["catch"](8);
6375
6417
  throw new Error('Could not get rooms');
6376
6418
  case 20:
6377
6419
  if (!res.ok) {
6378
- _context6.next = 22;
6420
+ _context7.next = 22;
6379
6421
  break;
6380
6422
  }
6381
- return _context6.abrupt("return", resData);
6423
+ return _context7.abrupt("return", organizationId ? resData : resData.data);
6382
6424
  case 22:
6383
6425
  throw new Error(resData.error);
6384
6426
  case 23:
6385
6427
  case "end":
6386
- return _context6.stop();
6428
+ return _context7.stop();
6387
6429
  }
6388
- }, _callee6, this, [[8, 17]]);
6430
+ }, _callee7, this, [[8, 17]]);
6389
6431
  }));
6390
- function getRoomsGrouped(_x12, _x13, _x14, _x15, _x16) {
6432
+ function getRoomsGrouped(_x12, _x13, _x14, _x15) {
6391
6433
  return _getRoomsGrouped.apply(this, arguments);
6392
6434
  }
6393
6435
  return getRoomsGrouped;
@@ -6395,15 +6437,15 @@ var MediaHandler = /*#__PURE__*/function () {
6395
6437
  }, {
6396
6438
  key: "getRoomColors",
6397
6439
  value: function () {
6398
- var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(name) {
6440
+ var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(name) {
6399
6441
  var fullUrl, res, resData;
6400
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
6401
- while (1) switch (_context7.prev = _context7.next) {
6442
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
6443
+ while (1) switch (_context8.prev = _context8.next) {
6402
6444
  case 0:
6403
6445
  fullUrl = this.mediaService + '/rooms/' + name + '/colors';
6404
6446
  resData = [];
6405
- _context7.prev = 2;
6406
- _context7.next = 5;
6447
+ _context8.prev = 2;
6448
+ _context8.next = 5;
6407
6449
  return fetch(fullUrl, {
6408
6450
  headers: {
6409
6451
  Authorization: 'Bearer ' + this.jwt,
@@ -6411,32 +6453,32 @@ var MediaHandler = /*#__PURE__*/function () {
6411
6453
  }
6412
6454
  });
6413
6455
  case 5:
6414
- res = _context7.sent;
6415
- _context7.next = 8;
6456
+ res = _context8.sent;
6457
+ _context8.next = 8;
6416
6458
  return res.json();
6417
6459
  case 8:
6418
- resData = _context7.sent;
6419
- _context7.next = 14;
6460
+ resData = _context8.sent;
6461
+ _context8.next = 14;
6420
6462
  break;
6421
6463
  case 11:
6422
- _context7.prev = 11;
6423
- _context7.t0 = _context7["catch"](2);
6464
+ _context8.prev = 11;
6465
+ _context8.t0 = _context8["catch"](2);
6424
6466
  throw new Error('Could not get room variants');
6425
6467
  case 14:
6426
6468
  if (!res.ok) {
6427
- _context7.next = 16;
6469
+ _context8.next = 16;
6428
6470
  break;
6429
6471
  }
6430
- return _context7.abrupt("return", resData);
6472
+ return _context8.abrupt("return", resData);
6431
6473
  case 16:
6432
6474
  throw new Error(resData.error);
6433
6475
  case 17:
6434
6476
  case "end":
6435
- return _context7.stop();
6477
+ return _context8.stop();
6436
6478
  }
6437
- }, _callee7, this, [[2, 11]]);
6479
+ }, _callee8, this, [[2, 11]]);
6438
6480
  }));
6439
- function getRoomColors(_x17) {
6481
+ function getRoomColors(_x16) {
6440
6482
  return _getRoomColors.apply(this, arguments);
6441
6483
  }
6442
6484
  return getRoomColors;
@@ -6444,15 +6486,15 @@ var MediaHandler = /*#__PURE__*/function () {
6444
6486
  }, {
6445
6487
  key: "getRoomVariants",
6446
6488
  value: function () {
6447
- var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(id) {
6489
+ var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(id) {
6448
6490
  var fullUrl, res, resData;
6449
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
6450
- while (1) switch (_context8.prev = _context8.next) {
6491
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
6492
+ while (1) switch (_context9.prev = _context9.next) {
6451
6493
  case 0:
6452
6494
  fullUrl = this.mediaService + '/rooms/' + id + '/variants';
6453
6495
  resData = [];
6454
- _context8.prev = 2;
6455
- _context8.next = 5;
6496
+ _context9.prev = 2;
6497
+ _context9.next = 5;
6456
6498
  return fetch(fullUrl, {
6457
6499
  headers: {
6458
6500
  Authorization: 'Bearer ' + this.jwt,
@@ -6460,32 +6502,32 @@ var MediaHandler = /*#__PURE__*/function () {
6460
6502
  }
6461
6503
  });
6462
6504
  case 5:
6463
- res = _context8.sent;
6464
- _context8.next = 8;
6505
+ res = _context9.sent;
6506
+ _context9.next = 8;
6465
6507
  return res.json();
6466
6508
  case 8:
6467
- resData = _context8.sent;
6468
- _context8.next = 14;
6509
+ resData = _context9.sent;
6510
+ _context9.next = 14;
6469
6511
  break;
6470
6512
  case 11:
6471
- _context8.prev = 11;
6472
- _context8.t0 = _context8["catch"](2);
6513
+ _context9.prev = 11;
6514
+ _context9.t0 = _context9["catch"](2);
6473
6515
  throw new Error('Could not get room variants');
6474
6516
  case 14:
6475
6517
  if (!res.ok) {
6476
- _context8.next = 16;
6518
+ _context9.next = 16;
6477
6519
  break;
6478
6520
  }
6479
- return _context8.abrupt("return", resData);
6521
+ return _context9.abrupt("return", resData);
6480
6522
  case 16:
6481
6523
  throw new Error(resData.error);
6482
6524
  case 17:
6483
6525
  case "end":
6484
- return _context8.stop();
6526
+ return _context9.stop();
6485
6527
  }
6486
- }, _callee8, this, [[2, 11]]);
6528
+ }, _callee9, this, [[2, 11]]);
6487
6529
  }));
6488
- function getRoomVariants(_x18) {
6530
+ function getRoomVariants(_x17) {
6489
6531
  return _getRoomVariants.apply(this, arguments);
6490
6532
  }
6491
6533
  return getRoomVariants;
@@ -6493,16 +6535,16 @@ var MediaHandler = /*#__PURE__*/function () {
6493
6535
  }, {
6494
6536
  key: "getRenderPackages",
6495
6537
  value: function () {
6496
- var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(organizationId) {
6538
+ var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(organizationId) {
6497
6539
  var fullUrl, res, resData;
6498
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
6499
- while (1) switch (_context9.prev = _context9.next) {
6540
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
6541
+ while (1) switch (_context10.prev = _context10.next) {
6500
6542
  case 0:
6501
6543
  fullUrl = new URL(this.mediaService + '/renderpackages');
6502
6544
  if (organizationId) fullUrl.searchParams.append('organizationId', organizationId);
6503
6545
  fullUrl.searchParams.append('sort', encodeURIComponent('{position}'));
6504
- _context9.prev = 3;
6505
- _context9.next = 6;
6546
+ _context10.prev = 3;
6547
+ _context10.next = 6;
6506
6548
  return fetch(fullUrl, {
6507
6549
  headers: {
6508
6550
  Authorization: 'Bearer ' + this.jwt,
@@ -6510,32 +6552,32 @@ var MediaHandler = /*#__PURE__*/function () {
6510
6552
  }
6511
6553
  });
6512
6554
  case 6:
6513
- res = _context9.sent;
6514
- _context9.next = 9;
6555
+ res = _context10.sent;
6556
+ _context10.next = 9;
6515
6557
  return res.json();
6516
6558
  case 9:
6517
- resData = _context9.sent;
6518
- _context9.next = 15;
6559
+ resData = _context10.sent;
6560
+ _context10.next = 15;
6519
6561
  break;
6520
6562
  case 12:
6521
- _context9.prev = 12;
6522
- _context9.t0 = _context9["catch"](3);
6563
+ _context10.prev = 12;
6564
+ _context10.t0 = _context10["catch"](3);
6523
6565
  throw new Error('Could not get render packages');
6524
6566
  case 15:
6525
6567
  if (!res.ok) {
6526
- _context9.next = 17;
6568
+ _context10.next = 17;
6527
6569
  break;
6528
6570
  }
6529
- return _context9.abrupt("return", resData);
6571
+ return _context10.abrupt("return", resData);
6530
6572
  case 17:
6531
6573
  throw new Error(resData.error);
6532
6574
  case 18:
6533
6575
  case "end":
6534
- return _context9.stop();
6576
+ return _context10.stop();
6535
6577
  }
6536
- }, _callee9, this, [[3, 12]]);
6578
+ }, _callee10, this, [[3, 12]]);
6537
6579
  }));
6538
- function getRenderPackages(_x19) {
6580
+ function getRenderPackages(_x18) {
6539
6581
  return _getRenderPackages.apply(this, arguments);
6540
6582
  }
6541
6583
  return getRenderPackages;
@@ -9530,7 +9572,7 @@ var SideMenu$1 = observer(SideMenu);
9530
9572
  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; }
9531
9573
  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; }
9532
9574
  var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
9533
- return import('./ModalsWrapper-a33488c6.js');
9575
+ return import('./ModalsWrapper-d5a0b6c0.js');
9534
9576
  });
9535
9577
  function Fullscreen() {
9536
9578
  var _useDivaCoreContext = useDivaCoreContext(),
@@ -9984,10 +10026,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
9984
10026
  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; }
9985
10027
  var LOG$2 = getLogger('Framework', 'Root');
9986
10028
  var LazyAuth = /*#__PURE__*/React.lazy(function () {
9987
- return import('./index-3563300d.js');
10029
+ return import('./index-ce832991.js');
9988
10030
  });
9989
10031
  var LazyModals = /*#__PURE__*/React.lazy(function () {
9990
- return import('./ModalsWrapper-a33488c6.js');
10032
+ return import('./ModalsWrapper-d5a0b6c0.js');
9991
10033
  });
9992
10034
  function ContentComponent() {
9993
10035
  var context = useDivaCoreContext();