@crystaldesign/diva-seller 25.4.0-beta.8 → 25.4.0-rc.0

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.
@@ -5,8 +5,8 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
5
5
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
6
6
  import _regeneratorRuntime from '@babel/runtime/regenerator';
7
7
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
8
- import { useDivaCore, getLogger, BasketData, useTranslation, DivaError, DivaUtils as DivaUtils$1, HelpButton, ProductHandler } from '@crystaldesign/diva-core';
9
- import DivaUtils, { nanoid } from '@crystaldesign/diva-utils';
8
+ import { useDivaCore, getLogger, BasketData, useTranslation, DivaError as DivaError$1, DivaUtils as DivaUtils$1, HelpButton, ProductHandler } from '@crystaldesign/diva-core';
9
+ import DivaUtils, { DivaError, nanoid } from '@crystaldesign/diva-utils';
10
10
  import '@mui/material/locale';
11
11
  import BasketHandler, { BASKET_SAVE_ERROR } from '@crystaldesign/basket-handler';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -216,7 +216,6 @@ function useBreadcrumbs(_ref) {
216
216
  module = state.module,
217
217
  catalogs = state.catalogs,
218
218
  basketState = state.basketState;
219
- state.returnTo;
220
219
  var _useDivaCore = useDivaCore(),
221
220
  organization = _useDivaCore.state.organization;
222
221
  useEffect(function () {
@@ -462,11 +461,11 @@ function breadcrumbCollection() {
462
461
  };
463
462
  }
464
463
 
465
- 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; }
466
- 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; }
464
+ function ownKeys$E(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; }
465
+ 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; }
467
466
  var reducer$1 = function reducer(state, action) {
468
467
  if (action.type == 'update') {
469
- var newState = _objectSpread$C({}, state);
468
+ var newState = _objectSpread$E({}, state);
470
469
  action.payload.forEach(function (p) {
471
470
  if (p.field == 'basketState') {
472
471
  if (p.value) {
@@ -500,7 +499,9 @@ function updateBasketState(state, _ref) {
500
499
  };
501
500
  }
502
501
 
503
- getLogger('Seller', 'ApiHandler');
502
+ 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; }
503
+ 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; }
504
+ var LOG$a = getLogger('Seller', 'ApiHandler');
504
505
  function apiLoadAnalyticScore(_x) {
505
506
  return _apiLoadAnalyticScore.apply(this, arguments);
506
507
  }
@@ -551,15 +552,14 @@ function _apiLoadAnalyticScore() {
551
552
  function apiLoadCollections(_x2) {
552
553
  return _apiLoadCollections.apply(this, arguments);
553
554
  }
554
-
555
- //20150430112400 -> 30.04.2015 11:24
556
555
  function _apiLoadCollections() {
557
556
  _apiLoadCollections = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
558
- var serverUrl, sessionGuid, fullUrl, response, newCollectionArray;
557
+ var _response$Accounts$ma, _response$Accounts;
558
+ var serverUrl, enricherUrl, sessionGuid, settings, jwt, organizationId, language, fullUrl, response, newCollectionArray, enricherCollections;
559
559
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
560
560
  while (1) switch (_context2.prev = _context2.next) {
561
561
  case 0:
562
- serverUrl = _ref2.serverUrl, sessionGuid = _ref2.sessionGuid;
562
+ serverUrl = _ref2.serverUrl, enricherUrl = _ref2.enricherUrl, sessionGuid = _ref2.sessionGuid, settings = _ref2.settings, jwt = _ref2.jwt, organizationId = _ref2.organizationId, language = _ref2.language;
563
563
  fullUrl = serverUrl + '?function=GetJsonAccountList&noCatalogs=True&ACT=&divaModul=_&TAR=';
564
564
  _context2.next = 4;
565
565
  return fetch(fullUrl, {
@@ -574,29 +574,29 @@ function _apiLoadCollections() {
574
574
  });
575
575
  case 4:
576
576
  response = _context2.sent;
577
- newCollectionArray = response.Accounts.map(function (data) {
577
+ newCollectionArray = (_response$Accounts$ma = (_response$Accounts = response.Accounts) === null || _response$Accounts === void 0 ? void 0 : _response$Accounts.map(function (data) {
578
578
  return {
579
- serverUrl: data.Api2Url ? data.Api2Url : undefined,
580
- // https://retail.diva-portal.de
581
- serverName: data.Servername ? data.Servername : undefined,
582
- // myCatalogCenter 3 Retail Server
583
579
  accountName: data.Accountname ? data.Accountname : undefined,
584
- // Ekornes Stressless IDM
585
580
  accountLogo: data.Accountlogo ? data.Accountlogo : undefined,
586
- // https://retail.diva-portal.de/files/33/aaa807ad-9473-4206-b6af-703dc9b32416/log_7ea0a4a5-7cf6-4d9d-83d7-58ce2fdd4bb6.jpg
587
- // data.RetailBrandLogo: "http://myCC3Retail.crystal-design.local/files//33/9680c4a3-fc60-4541-8738-4859d9b24e9d/LOG_75ec5e70-c701-474d-98ad-7a0f39ac24c6.jpg"
588
- // data.RetailBrandName: "Candy"
589
581
  catalogCount: data.NewCatalogCount ? data.NewCatalogCount : 0,
590
- // NewCatalogCount: 20
591
582
  accountGuid: data.AccountGUID,
592
- // a9dac143-4d52-4557-b980-1748c83ddfdf
593
583
  position: data.Position,
594
584
  id: data.AccountGUID,
595
585
  type: data.AccountType
596
586
  };
597
- });
587
+ })) !== null && _response$Accounts$ma !== void 0 ? _response$Accounts$ma : [];
588
+ if (!settings.loadIDMServiceData) {
589
+ _context2.next = 11;
590
+ break;
591
+ }
592
+ _context2.next = 9;
593
+ return apiLoadCollectionsEnricher(enricherUrl, jwt, organizationId, language);
594
+ case 9:
595
+ enricherCollections = _context2.sent;
596
+ if (enricherCollections) newCollectionArray = [].concat(_toConsumableArray(newCollectionArray), _toConsumableArray(enricherCollections));
597
+ case 11:
598
598
  return _context2.abrupt("return", newCollectionArray);
599
- case 7:
599
+ case 12:
600
600
  case "end":
601
601
  return _context2.stop();
602
602
  }
@@ -604,31 +604,97 @@ function _apiLoadCollections() {
604
604
  }));
605
605
  return _apiLoadCollections.apply(this, arguments);
606
606
  }
607
- function getDate(myDate) {
608
- var year = Number(myDate.slice(0, 4));
609
- var month = Number(myDate.slice(4, 6)) - 1; // Subtract 1 since months are zero-based
610
- var day = Number(myDate.slice(6, 8));
611
- var hour = Number(myDate.slice(8, 10));
612
- var minute = Number(myDate.slice(10, 12));
613
- var second = Number(myDate.slice(12, 14));
614
- return new Date(year, month, day, hour, minute, second);
607
+ function apiLoadCollectionsEnricher(_x3, _x4, _x5, _x6) {
608
+ return _apiLoadCollectionsEnricher.apply(this, arguments);
609
+ }
610
+ function _apiLoadCollectionsEnricher() {
611
+ _apiLoadCollectionsEnricher = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(enricherUrl, jwt, organizationId, language) {
612
+ var fullUrl, response, newCollectionArray;
613
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
614
+ while (1) switch (_context3.prev = _context3.next) {
615
+ case 0:
616
+ fullUrl = enricherUrl + '/collections?organizationId=' + organizationId;
617
+ _context3.prev = 1;
618
+ _context3.next = 4;
619
+ return fetch(fullUrl, {
620
+ headers: {
621
+ Authorization: "Bearer ".concat(jwt),
622
+ 'Content-Type': 'application/json'
623
+ }
624
+ }).then(function (res) {
625
+ if (res.status !== 200) {
626
+ throw new Error('Collections not loaded.');
627
+ }
628
+ return res.json();
629
+ });
630
+ case 4:
631
+ response = _context3.sent;
632
+ newCollectionArray = response.data.filter(function (data) {
633
+ return data.active === undefined || data.active === true;
634
+ }).map(function (data) {
635
+ var series = [];
636
+ for (var i = 0; i < ((_data$memberSeries = data.memberSeries) !== null && _data$memberSeries !== void 0 ? _data$memberSeries : []).length; i++) {
637
+ var _data$memberSeries;
638
+ var packa = data.memberSeries[i];
639
+ if (packa.active === undefined || packa.active === true) {
640
+ for (var j = 0; j < ((_packa$series$length = (_packa$series = packa.series) === null || _packa$series === void 0 ? void 0 : _packa$series.length) !== null && _packa$series$length !== void 0 ? _packa$series$length : 0); j++) {
641
+ var _packa$series$length, _packa$series;
642
+ var serie = packa.series[j];
643
+ if (serie.active === undefined || serie.active === true) {
644
+ series.push({
645
+ name: DivaUtils.getLocals(serie.name, language),
646
+ serieNo: serie.serieNo,
647
+ url: serie.url,
648
+ enricherPackageName: DivaUtils.getLocals(packa.enricherPackageName, language),
649
+ idmVersion: packa.idmVersion,
650
+ catalogId: packa.catalogId,
651
+ enricherId: packa.enricherId,
652
+ accountId: packa.catalogId
653
+ });
654
+ }
655
+ }
656
+ }
657
+ }
658
+ return _objectSpread$D(_objectSpread$D({}, data), {}, {
659
+ id: data._id,
660
+ accountLogo: data.url,
661
+ type: 'ENRICHER_PACKAGE',
662
+ enricherSeries: series,
663
+ catalogCount: series.length,
664
+ accountName: DivaUtils.getLocals(data.name, language)
665
+ });
666
+ });
667
+ return _context3.abrupt("return", newCollectionArray);
668
+ case 9:
669
+ _context3.prev = 9;
670
+ _context3.t0 = _context3["catch"](1);
671
+ LOG$a.error(new DivaError('Failed to fetch collections from enricher', {}));
672
+ case 12:
673
+ return _context3.abrupt("return", undefined);
674
+ case 13:
675
+ case "end":
676
+ return _context3.stop();
677
+ }
678
+ }, _callee3, null, [[1, 9]]);
679
+ }));
680
+ return _apiLoadCollectionsEnricher.apply(this, arguments);
615
681
  }
616
- function apiLoadCatalogs(_x3) {
682
+ function apiLoadCatalogs(_x7) {
617
683
  return _apiLoadCatalogs.apply(this, arguments);
618
684
  }
619
685
  function _apiLoadCatalogs() {
620
- _apiLoadCatalogs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) {
686
+ _apiLoadCatalogs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref3) {
621
687
  var _response$Catalogs;
622
688
  var serverUrl, sessionGuid, collectionGuid, fullUrl, response, newCatalogArray;
623
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
624
- while (1) switch (_context3.prev = _context3.next) {
689
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
690
+ while (1) switch (_context4.prev = _context4.next) {
625
691
  case 0:
626
692
  serverUrl = _ref3.serverUrl, sessionGuid = _ref3.sessionGuid, collectionGuid = _ref3.collectionGuid;
627
693
  fullUrl = serverUrl + '?function=GetJsonCatalogList&sortOrderBy=position';
628
694
  if (collectionGuid) {
629
695
  fullUrl = fullUrl + '&accountGuid=' + collectionGuid;
630
696
  }
631
- _context3.next = 5;
697
+ _context4.next = 5;
632
698
  return fetch(fullUrl, {
633
699
  headers: {
634
700
  sessionGuid: sessionGuid
@@ -640,72 +706,53 @@ function _apiLoadCatalogs() {
640
706
  return res.json();
641
707
  });
642
708
  case 5:
643
- response = _context3.sent;
709
+ response = _context4.sent;
644
710
  newCatalogArray = (_response$Catalogs = response.Catalogs) === null || _response$Catalogs === void 0 ? void 0 : _response$Catalogs.map(function (data) {
645
711
  return {
646
712
  id: data.GUID.toLowerCase(),
647
- // "d593d5f9-6587-4589-82b5-5fde4a0d19ff"
648
713
  codex: data.Codex,
649
- // "CLASSICS_PLUS"
650
714
  accountId: data.AccountGUID,
651
715
  name: data.Name,
652
- // "Classics Plus"
653
716
  description: data.ShortDesc ? data.ShortDesc : undefined,
654
717
  catalogLogo: data.Image,
655
- // "http://myCC3Retail.crystal-design.local/files/33/9680C4A3-FC60-4541-8738-4859D9B24E9D/CAT_e96a9793-b0fa-4e4e-b483-e5ee1e658a35.jpg"
656
718
  collectionName: data.RetailBrandName,
657
719
  collectionLogo: data.RetailBrandLogo,
658
720
  mainCategory: data.RetailMainCategory ? data.RetailMainCategory : data.MainCategory ? data.MainCategory : undefined,
659
- // "Johann Jakob - CLASSICS"
660
721
  subCategory: data.RetailSubCategory ? data.RetailSubCategory : data.SubCategory ? data.SubCategory : undefined,
661
722
  retailArticleNr: data.RetailArticleNr ? data.RetailArticleNr : undefined,
662
723
  nArticles: data.Articles ? Number(data.Articles) : 0,
663
- // "236"
664
- nConfigurators: data.Configurators ? Number(data.Configurators) : 0,
665
- // "236"
666
- nImages: data.ShowroomimagesNumber ? Number(data.ShowroomimagesNumber) : 0,
667
- // 20
668
- nDocuments: data.PDF ? data.PDF : 0,
669
724
  brandLogo: data.BrandLogo ? data.BrandLogo : undefined,
670
725
  supplierGuid: data.SupplierGUID ? data.SupplierGUID : undefined,
671
- // "9680c4a3-fc60-4541-8738-4859d9b24e9d"
672
726
  supplierILN: data.SupplierILN ? data.SupplierILN : undefined,
673
- // "4045604000007"
674
727
  supplierLogo: data.SupplierLogo ? data.SupplierLogo : undefined,
675
- // "http://myCC3Retail.crystal-design.local/files/33/9680c4a3-fc60-4541-8738-4859d9b24e9d/LOG_75ec5e70-c701-474d-98ad-7a0f39ac24c6.jpg"
676
728
  supplierName: data.SupplierName ? data.SupplierName : undefined,
677
- // "Candy Polstermöbel GmbH & Co. KG"
678
- hideSupplierInfo: data.HideSupplierInfo == 'True',
679
- lastUpdate: data.LastUpdate ? getDate(data.LastUpdate) : undefined,
680
- // "20200228140307"
681
- validFrom: data.ValidFrom ? getDate(data.ValidFrom) : undefined,
682
- // "20180401000000"
683
- validTo: data.ValidTo ? getDate(data.ValidTo) : undefined,
684
- // "20181231000000"
729
+ lastUpdate: data.LastUpdate ? DivaUtils.getDate(data.LastUpdate) : undefined,
730
+ validFrom: data.ValidFrom ? DivaUtils.getDate(data.ValidFrom) : undefined,
731
+ validTo: data.ValidTo ? DivaUtils.getDate(data.ValidTo) : undefined,
685
732
  has3D: data.Planer == 3 ? true : false
686
733
  };
687
734
  });
688
- return _context3.abrupt("return", newCatalogArray);
735
+ return _context4.abrupt("return", newCatalogArray);
689
736
  case 8:
690
737
  case "end":
691
- return _context3.stop();
738
+ return _context4.stop();
692
739
  }
693
- }, _callee3);
740
+ }, _callee4);
694
741
  }));
695
742
  return _apiLoadCatalogs.apply(this, arguments);
696
743
  }
697
- function apiAccountLogin(_x4) {
744
+ function apiAccountLogin(_x8) {
698
745
  return _apiAccountLogin.apply(this, arguments);
699
746
  }
700
747
  function _apiAccountLogin() {
701
- _apiAccountLogin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
748
+ _apiAccountLogin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref4) {
702
749
  var serverUrl, sessionGuid, accountId, fullUrl, response;
703
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
704
- while (1) switch (_context4.prev = _context4.next) {
750
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
751
+ while (1) switch (_context5.prev = _context5.next) {
705
752
  case 0:
706
753
  serverUrl = _ref4.serverUrl, sessionGuid = _ref4.sessionGuid, accountId = _ref4.accountId;
707
754
  fullUrl = serverUrl + '?function=JsonAccountLogin&UserRole=v&accountGuid=' + accountId;
708
- _context4.next = 4;
755
+ _context5.next = 4;
709
756
  return fetch(fullUrl, {
710
757
  headers: {
711
758
  sessionGuid: sessionGuid
@@ -717,28 +764,28 @@ function _apiAccountLogin() {
717
764
  return res.json();
718
765
  });
719
766
  case 4:
720
- response = _context4.sent;
721
- return _context4.abrupt("return", response.SessionGUID);
767
+ response = _context5.sent;
768
+ return _context5.abrupt("return", response.SessionGUID);
722
769
  case 6:
723
770
  case "end":
724
- return _context4.stop();
771
+ return _context5.stop();
725
772
  }
726
- }, _callee4);
773
+ }, _callee5);
727
774
  }));
728
775
  return _apiAccountLogin.apply(this, arguments);
729
776
  }
730
- function apiCatalogGuidLogin(_x5) {
777
+ function apiCatalogGuidLogin(_x9) {
731
778
  return _apiCatalogGuidLogin.apply(this, arguments);
732
779
  }
733
780
  function _apiCatalogGuidLogin() {
734
- _apiCatalogGuidLogin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref5) {
781
+ _apiCatalogGuidLogin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref5) {
735
782
  var serverUrl, sessionGuid, catalogGuid, fullUrl, response;
736
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
737
- while (1) switch (_context5.prev = _context5.next) {
783
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
784
+ while (1) switch (_context6.prev = _context6.next) {
738
785
  case 0:
739
786
  serverUrl = _ref5.serverUrl, sessionGuid = _ref5.sessionGuid, catalogGuid = _ref5.catalogGuid;
740
787
  fullUrl = serverUrl + '?function=JsonAccountLogin&UserRole=v&catalogGuid=' + catalogGuid;
741
- _context5.next = 4;
788
+ _context6.next = 4;
742
789
  return fetch(fullUrl, {
743
790
  headers: {
744
791
  sessionGuid: sessionGuid
@@ -750,39 +797,39 @@ function _apiCatalogGuidLogin() {
750
797
  return res.json();
751
798
  });
752
799
  case 4:
753
- response = _context5.sent;
800
+ response = _context6.sent;
754
801
  if (!response.Error) {
755
- _context5.next = 7;
802
+ _context6.next = 7;
756
803
  break;
757
804
  }
758
805
  throw new Error(response.Error);
759
806
  case 7:
760
- return _context5.abrupt("return", {
807
+ return _context6.abrupt("return", {
761
808
  sessionGuid: response.SessionGUID,
762
809
  accountId: response.AccountGUID
763
810
  });
764
811
  case 8:
765
812
  case "end":
766
- return _context5.stop();
813
+ return _context6.stop();
767
814
  }
768
- }, _callee5);
815
+ }, _callee6);
769
816
  }));
770
817
  return _apiCatalogGuidLogin.apply(this, arguments);
771
818
  }
772
- function apiLoadCatalogInfo(_x6) {
819
+ function apiLoadCatalogInfo(_x10) {
773
820
  return _apiLoadCatalogInfo.apply(this, arguments);
774
821
  }
775
822
  function _apiLoadCatalogInfo() {
776
- _apiLoadCatalogInfo = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref6) {
823
+ _apiLoadCatalogInfo = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref6) {
777
824
  var _response$CollectionG, _response$Properties, _response$Properties2, _response$Properties3;
778
825
  var serverUrlAPI, catalogCodex, accountSessionId, language, serverUrl, fullUrl, response, actCatalogInfoData, i, _i, j;
779
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
780
- while (1) switch (_context6.prev = _context6.next) {
826
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
827
+ while (1) switch (_context7.prev = _context7.next) {
781
828
  case 0:
782
829
  serverUrlAPI = _ref6.serverUrlAPI, catalogCodex = _ref6.catalogCodex, accountSessionId = _ref6.accountSessionId, language = _ref6.language;
783
830
  serverUrl = new URL(serverUrlAPI).origin;
784
831
  fullUrl = serverUrlAPI + '?function=GetJsonCatalogData' + '&catalogCodex=' + catalogCodex + '&IncludeVariantValues=True&lang=' + language.toLocaleUpperCase();
785
- _context6.next = 5;
832
+ _context7.next = 5;
786
833
  return fetch(fullUrl, {
787
834
  headers: {
788
835
  sessionGuid: accountSessionId
@@ -794,9 +841,9 @@ function _apiLoadCatalogInfo() {
794
841
  return res.json();
795
842
  });
796
843
  case 5:
797
- response = _context6.sent;
844
+ response = _context7.sent;
798
845
  if (!response.Error) {
799
- _context6.next = 8;
846
+ _context7.next = 8;
800
847
  break;
801
848
  }
802
849
  throw new Error(response.Error);
@@ -865,28 +912,107 @@ function _apiLoadCatalogInfo() {
865
912
  }
866
913
  }
867
914
  }
868
- return _context6.abrupt("return", actCatalogInfoData);
915
+ return _context7.abrupt("return", actCatalogInfoData);
869
916
  case 12:
870
917
  case "end":
871
- return _context6.stop();
918
+ return _context7.stop();
872
919
  }
873
- }, _callee6);
920
+ }, _callee7);
874
921
  }));
875
922
  return _apiLoadCatalogInfo.apply(this, arguments);
876
923
  }
877
- function apiLoadArticles(_x7) {
924
+ function apiLoadCatalogInfoEnricher(_x11) {
925
+ return _apiLoadCatalogInfoEnricher.apply(this, arguments);
926
+ }
927
+ function _apiLoadCatalogInfoEnricher() {
928
+ _apiLoadCatalogInfoEnricher = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref7) {
929
+ var _cat$Properties;
930
+ var enricherUrl, serieNo, catalogId, language, jwt, fullUrl, response, cat, actCatalogInfoData;
931
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
932
+ while (1) switch (_context8.prev = _context8.next) {
933
+ case 0:
934
+ enricherUrl = _ref7.enricherUrl, serieNo = _ref7.serieNo, catalogId = _ref7.catalogId, language = _ref7.language, jwt = _ref7.jwt;
935
+ fullUrl = enricherUrl + '/live/v3.0/catalogs/' + catalogId + '/series' + '?filter=' + encodeURIComponent('serieNo==' + serieNo);
936
+ _context8.next = 4;
937
+ return fetch(fullUrl, {
938
+ headers: {
939
+ Authorization: "Bearer ".concat(jwt),
940
+ 'Content-Type': 'application/json'
941
+ }
942
+ }).then(function (res) {
943
+ if (res.status !== 200) {
944
+ throw new Error('Collections not loaded.');
945
+ }
946
+ return res.json();
947
+ });
948
+ case 4:
949
+ response = _context8.sent;
950
+ if (!response.Error) {
951
+ _context8.next = 7;
952
+ break;
953
+ }
954
+ throw new Error(response.Error);
955
+ case 7:
956
+ cat = response.data[0];
957
+ if (cat) {
958
+ _context8.next = 10;
959
+ break;
960
+ }
961
+ throw new Error('serieNo: ' + serieNo + ' not found');
962
+ case 10:
963
+ actCatalogInfoData = {
964
+ lang: language,
965
+ guid: cat._id,
966
+ disable3DExport: false,
967
+ name: DivaUtils.getLocals(cat.seriesName, language),
968
+ name_locales: cat.seriesName,
969
+ codex: serieNo,
970
+ isIDMData: true,
971
+ //accountLogo: cat.AccountLogo,
972
+ description: DivaUtils.getLocals(cat.seriesFullText, language),
973
+ description_locales: cat.seriesFullText,
974
+ hasPlanner: true,
975
+ accountGuid: catalogId,
976
+ //brand: cat.Brandname,
977
+ supplierGuid: catalogId,
978
+ //retailCatalogNr: cat.RetailCatalogNr,
979
+ options: cat.Options,
980
+ optionValues: cat.Optionvalues,
981
+ //currency: cat.currency,
982
+ has3D: !!((_cat$Properties = cat.Properties) !== null && _cat$Properties !== void 0 && (_cat$Properties = _cat$Properties.find(function (p) {
983
+ return p.Codex == 'DIVA3D_RENDERING';
984
+ })) !== null && _cat$Properties !== void 0 && _cat$Properties.Value),
985
+ images: [],
986
+ documents: []
987
+ //accountSessionId: cat.AccountSessionGuid,
988
+ //arReady: !!cat.Properties?.find((p: any) => p.Codex == 'DIVA3D_AR_READY')?.Value,
989
+ }; //Schauraumbilder
990
+
991
+ if (cat.ShowroomImages) ;
992
+ //Documente
993
+ if (cat.Docs) ;
994
+ return _context8.abrupt("return", actCatalogInfoData);
995
+ case 14:
996
+ case "end":
997
+ return _context8.stop();
998
+ }
999
+ }, _callee8);
1000
+ }));
1001
+ return _apiLoadCatalogInfoEnricher.apply(this, arguments);
1002
+ }
1003
+ function apiLoadArticles(_x12) {
878
1004
  return _apiLoadArticles.apply(this, arguments);
879
1005
  }
880
1006
  function _apiLoadArticles() {
881
- _apiLoadArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref7) {
1007
+ _apiLoadArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref8) {
882
1008
  var serverUrlAPI, catalogCodex, accountSessionId, lang, serverUrl, fullUrl, response, articleList, i, jsonArticle;
883
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
884
- while (1) switch (_context7.prev = _context7.next) {
1009
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
1010
+ while (1) switch (_context9.prev = _context9.next) {
885
1011
  case 0:
886
- serverUrlAPI = _ref7.serverUrlAPI, catalogCodex = _ref7.catalogCodex, accountSessionId = _ref7.accountSessionId, lang = _ref7.lang;
1012
+ serverUrlAPI = _ref8.serverUrlAPI, catalogCodex = _ref8.catalogCodex, accountSessionId = _ref8.accountSessionId, lang = _ref8.lang;
887
1013
  serverUrl = new URL(serverUrlAPI).origin;
888
1014
  fullUrl = serverUrlAPI + '?function=GetJsonArticleList' + '&Lang=' + lang.toUpperCase() + '&catalogCodex=' + catalogCodex;
889
- _context7.next = 5;
1015
+ _context9.next = 5;
890
1016
  return fetch(fullUrl, {
891
1017
  headers: {
892
1018
  sessionGuid: accountSessionId
@@ -898,7 +1024,7 @@ function _apiLoadArticles() {
898
1024
  return res.json();
899
1025
  });
900
1026
  case 5:
901
- response = _context7.sent;
1027
+ response = _context9.sent;
902
1028
  articleList = [];
903
1029
  for (i = 0; i < response.Articles.length; i++) {
904
1030
  jsonArticle = response.Articles[i];
@@ -918,8 +1044,6 @@ function _apiLoadArticles() {
918
1044
  properties: jsonArticle.Metadatas ? jsonArticle.Metadatas : [],
919
1045
  divaNr: jsonArticle.DivaNr && jsonArticle.DivaNr != '' ? jsonArticle.DivaNr : undefined,
920
1046
  image: jsonArticle.Image && jsonArticle.Image != '' ? serverUrl + '/files/33/' + jsonArticle.SubFolder + '/' + jsonArticle.Image : undefined,
921
- imageWidth: jsonArticle.ImageWidth ? jsonArticle.ImageWidth : undefined,
922
- imageHeight: jsonArticle.ImageHeight ? jsonArticle.ImageHeight : undefined,
923
1047
  groupName: jsonArticle.GroupName && jsonArticle.GroupName != '' ? jsonArticle.GroupName : undefined,
924
1048
  mainCategory: jsonArticle.MainCategory && jsonArticle.MainCategory != '' ? jsonArticle.MainCategory : undefined,
925
1049
  width: jsonArticle.Width && jsonArticle.Width != '' ? Number(jsonArticle.Width.replace('cm', '').replace(',', '.')) : undefined,
@@ -959,34 +1083,96 @@ function _apiLoadArticles() {
959
1083
  hasArticleRelations: false
960
1084
  });
961
1085
  }
962
- return _context7.abrupt("return", articleList);
1086
+ return _context9.abrupt("return", articleList);
963
1087
  case 9:
964
1088
  case "end":
965
- return _context7.stop();
1089
+ return _context9.stop();
966
1090
  }
967
- }, _callee7);
1091
+ }, _callee9);
968
1092
  }));
969
1093
  return _apiLoadArticles.apply(this, arguments);
970
1094
  }
1095
+ function apiLoadEnricherArticles(_x13) {
1096
+ return _apiLoadEnricherArticles.apply(this, arguments);
1097
+ }
1098
+ function _apiLoadEnricherArticles() {
1099
+ _apiLoadEnricherArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref9) {
1100
+ var serieId, catalogId, enricherUrl, jwt, language, fullUrl, response, articleList, i, jsonArticle;
1101
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
1102
+ while (1) switch (_context10.prev = _context10.next) {
1103
+ case 0:
1104
+ serieId = _ref9.serieId, catalogId = _ref9.catalogId, enricherUrl = _ref9.enricherUrl, jwt = _ref9.jwt, language = _ref9.language;
1105
+ fullUrl = enricherUrl + '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items?fields=serieNo;itemIdentification;catalogPage;weightBrutto;weightNetto;volume;minimumDeliveryTime;widthBasicShapeNominalValue;widthBasicShapeFrom;widthBasicShapeTo;widthBasicShapeStepSize;heightBasicShapeNominalValue;heightBasicShapeFrom;heightBasicShapeTo;heightBasicShapeStepSize;depthBasicShapeNominalValue;depthBasicShapeFrom;depthBasicShapeTo;depthBasicShapeStepSize;typeKey;eClassNo;detailInfoRefs;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber';
1106
+ _context10.next = 4;
1107
+ return fetch(fullUrl, {
1108
+ headers: {
1109
+ Authorization: "Bearer ".concat(jwt),
1110
+ 'Content-Type': 'application/json'
1111
+ }
1112
+ }).then(function (res) {
1113
+ if (res.status !== 200) {
1114
+ throw new Error('Collections not loaded.');
1115
+ }
1116
+ return res.json();
1117
+ });
1118
+ case 4:
1119
+ response = _context10.sent;
1120
+ articleList = [];
1121
+ for (i = 0; i < response.data.length; i++) {
1122
+ jsonArticle = response.data[i];
1123
+ if (!jsonArticle.partListExclusive) articleList.push({
1124
+ articleCodex: jsonArticle.typeNo,
1125
+ catalogCodex: jsonArticle.serieNo,
1126
+ typeNr: jsonArticle.TypeNr,
1127
+ guid: jsonArticle.GUID,
1128
+ name: DivaUtils.getLocals(jsonArticle.shortText, language),
1129
+ longDescription: DivaUtils.getLocals(jsonArticle.fullText, language),
1130
+ articleType: jsonArticle.featureClassRefNo === undefined ? 'FLAT' : 'OPTIONTREE',
1131
+ width: jsonArticle.depthBasicShapeNominalValue,
1132
+ height: jsonArticle.heightBasicShapeNominalValue,
1133
+ depth: jsonArticle.depthBasicShapeNominalValue,
1134
+ image: jsonArticle.image,
1135
+ templateCodex: jsonArticle.featureClassRefNo,
1136
+ price: 0,
1137
+ priceGroup: jsonArticle.priceTypeRef
1138
+
1139
+ //edpNumber: 'BKDD501020',
1140
+ //salesNumber: 'BKDD501020',
1141
+
1142
+ //properties: jsonArticle.Metadatas ? jsonArticle.Metadatas : [],
1143
+ //retailArticleNr: jsonArticle.RetailArticleNr && jsonArticle.RetailArticleNr != '' ? jsonArticle.RetailArticleNr : undefined,
1144
+ //retailPrefix: jsonArticle.RetailPrefix && jsonArticle.RetailPrefix != '' ? jsonArticle.RetailPrefix : undefined,
1145
+ //retailTypeNr: jsonArticle.RetailTypeNr && jsonArticle.RetailTypeNr != '' ? jsonArticle.RetailTypeNr : undefined,
1146
+ });
1147
+ }
1148
+ return _context10.abrupt("return", articleList);
1149
+ case 8:
1150
+ case "end":
1151
+ return _context10.stop();
1152
+ }
1153
+ }, _callee10);
1154
+ }));
1155
+ return _apiLoadEnricherArticles.apply(this, arguments);
1156
+ }
971
1157
  //Basket API functions
972
1158
 
973
- function apiLoadBasket(_x8) {
1159
+ function apiLoadBasket(_x14) {
974
1160
  return _apiLoadBasket.apply(this, arguments);
975
1161
  }
976
1162
  function _apiLoadBasket() {
977
- _apiLoadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref8) {
1163
+ _apiLoadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref10) {
978
1164
  var divaNr, apiConfig, customProductId, jwt, fullUrl, _divaNr$split, _divaNr$split2, onlyDivaNr, version, response, basket, key, value, _response, result, _basket;
979
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
980
- while (1) switch (_context8.prev = _context8.next) {
1165
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
1166
+ while (1) switch (_context11.prev = _context11.next) {
981
1167
  case 0:
982
- divaNr = _ref8.divaNr, apiConfig = _ref8.apiConfig, customProductId = _ref8.customProductId, jwt = _ref8.jwt;
1168
+ divaNr = _ref10.divaNr, apiConfig = _ref10.apiConfig, customProductId = _ref10.customProductId, jwt = _ref10.jwt;
983
1169
  if (!divaNr) {
984
- _context8.next = 11;
1170
+ _context11.next = 11;
985
1171
  break;
986
1172
  }
987
1173
  _divaNr$split = divaNr.split('-'), _divaNr$split2 = _slicedToArray(_divaNr$split, 3), onlyDivaNr = _divaNr$split2[1], version = _divaNr$split2[2];
988
1174
  fullUrl = apiConfig.basketService + '/baskets/configuration?divaNr=' + 'DIVA-' + onlyDivaNr + (version ? '&version=' + version : '');
989
- _context8.next = 6;
1175
+ _context11.next = 6;
990
1176
  return fetch(fullUrl, {
991
1177
  headers: {
992
1178
  Authorization: 'Bearer ' + jwt,
@@ -996,22 +1182,22 @@ function _apiLoadBasket() {
996
1182
  return res.json();
997
1183
  });
998
1184
  case 6:
999
- response = _context8.sent;
1185
+ response = _context11.sent;
1000
1186
  basket = new BasketData(response.basket);
1001
- return _context8.abrupt("return", {
1187
+ return _context11.abrupt("return", {
1002
1188
  basket: basket,
1003
1189
  newestDocumentVersion: Number(response.newestDocumentVersion),
1004
1190
  sourceOrganization: response.sourceOrganization
1005
1191
  });
1006
1192
  case 11:
1007
1193
  if (!customProductId) {
1008
- _context8.next = 25;
1194
+ _context11.next = 25;
1009
1195
  break;
1010
1196
  }
1011
1197
  key = 'customData.SAP_MARA_MATNR.value';
1012
1198
  value = customProductId;
1013
1199
  fullUrl = apiConfig.catalogService + "/v1/products/basket?key=".concat(key, "&value=").concat(value, "&repair=true");
1014
- _context8.next = 17;
1200
+ _context11.next = 17;
1015
1201
  return fetch(fullUrl, {
1016
1202
  method: 'POST',
1017
1203
  headers: {
@@ -1021,13 +1207,13 @@ function _apiLoadBasket() {
1021
1207
  body: JSON.stringify({})
1022
1208
  });
1023
1209
  case 17:
1024
- _response = _context8.sent;
1025
- _context8.next = 20;
1210
+ _response = _context11.sent;
1211
+ _context11.next = 20;
1026
1212
  return _response.json();
1027
1213
  case 20:
1028
- result = _context8.sent;
1214
+ result = _context11.sent;
1029
1215
  _basket = new BasketData(result.basket);
1030
- return _context8.abrupt("return", {
1216
+ return _context11.abrupt("return", {
1031
1217
  basket: _basket,
1032
1218
  newestDocumentVersion: Number(result.newestDocumentVersion),
1033
1219
  sourceOrganization: result.sourceOrganization
@@ -1036,24 +1222,24 @@ function _apiLoadBasket() {
1036
1222
  throw new Error('apiLoadBasket was called without any information to load basket');
1037
1223
  case 26:
1038
1224
  case "end":
1039
- return _context8.stop();
1225
+ return _context11.stop();
1040
1226
  }
1041
- }, _callee8);
1227
+ }, _callee11);
1042
1228
  }));
1043
1229
  return _apiLoadBasket.apply(this, arguments);
1044
1230
  }
1045
- function apiLoadUniqueDivaNr(_x9) {
1231
+ function apiLoadUniqueDivaNr(_x15) {
1046
1232
  return _apiLoadUniqueDivaNr.apply(this, arguments);
1047
1233
  }
1048
1234
  function _apiLoadUniqueDivaNr() {
1049
- _apiLoadUniqueDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref9) {
1235
+ _apiLoadUniqueDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref11) {
1050
1236
  var basketUrl, jwt, fullUrl, returnDivaNr, response;
1051
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
1052
- while (1) switch (_context9.prev = _context9.next) {
1237
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
1238
+ while (1) switch (_context12.prev = _context12.next) {
1053
1239
  case 0:
1054
- basketUrl = _ref9.basketUrl, jwt = _ref9.jwt;
1240
+ basketUrl = _ref11.basketUrl, jwt = _ref11.jwt;
1055
1241
  fullUrl = "".concat(basketUrl, "/baskets/uniqueDivaNr");
1056
- _context9.next = 4;
1242
+ _context12.next = 4;
1057
1243
  return fetch(fullUrl, {
1058
1244
  headers: {
1059
1245
  Authorization: 'Bearer ' + jwt
@@ -1065,139 +1251,139 @@ function _apiLoadUniqueDivaNr() {
1065
1251
  return res.json();
1066
1252
  });
1067
1253
  case 4:
1068
- response = _context9.sent;
1254
+ response = _context12.sent;
1069
1255
  returnDivaNr = response.divaNr;
1070
1256
  if (!returnDivaNr) returnDivaNr = 'DIVA-' + Math.floor(Math.random() * 1000000);
1071
- return _context9.abrupt("return", returnDivaNr);
1257
+ return _context12.abrupt("return", returnDivaNr);
1072
1258
  case 8:
1073
1259
  case "end":
1074
- return _context9.stop();
1260
+ return _context12.stop();
1075
1261
  }
1076
- }, _callee9);
1262
+ }, _callee12);
1077
1263
  }));
1078
1264
  return _apiLoadUniqueDivaNr.apply(this, arguments);
1079
1265
  }
1080
- function apiGetClassification(_x11) {
1266
+ function apiGetClassification(_x17) {
1081
1267
  return _apiGetClassification.apply(this, arguments);
1082
1268
  }
1083
1269
  function _apiGetClassification() {
1084
- _apiGetClassification = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref11) {
1270
+ _apiGetClassification = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref13) {
1085
1271
  var serviceUrl, res, resData;
1086
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
1087
- while (1) switch (_context11.prev = _context11.next) {
1272
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
1273
+ while (1) switch (_context14.prev = _context14.next) {
1088
1274
  case 0:
1089
- serviceUrl = _ref11.serviceUrl;
1090
- _context11.prev = 1;
1091
- _context11.next = 4;
1275
+ serviceUrl = _ref13.serviceUrl;
1276
+ _context14.prev = 1;
1277
+ _context14.next = 4;
1092
1278
  return fetch("".concat(serviceUrl, "/v2/views/configs/load?type=CLASSIFICATION&identifier=DEFAULT"), {
1093
1279
  headers: {
1094
1280
  'Content-Type': 'application/json'
1095
1281
  }
1096
1282
  });
1097
1283
  case 4:
1098
- res = _context11.sent;
1099
- _context11.next = 7;
1284
+ res = _context14.sent;
1285
+ _context14.next = 7;
1100
1286
  return res.json();
1101
1287
  case 7:
1102
- resData = _context11.sent;
1103
- return _context11.abrupt("return", resData.configParams);
1288
+ resData = _context14.sent;
1289
+ return _context14.abrupt("return", resData.configParams);
1104
1290
  case 11:
1105
- _context11.prev = 11;
1106
- _context11.t0 = _context11["catch"](1);
1291
+ _context14.prev = 11;
1292
+ _context14.t0 = _context14["catch"](1);
1107
1293
  throw new Error('Could not fetch classification');
1108
1294
  case 14:
1109
1295
  case "end":
1110
- return _context11.stop();
1296
+ return _context14.stop();
1111
1297
  }
1112
- }, _callee11, null, [[1, 11]]);
1298
+ }, _callee14, null, [[1, 11]]);
1113
1299
  }));
1114
1300
  return _apiGetClassification.apply(this, arguments);
1115
1301
  }
1116
- function apiGetProductCreator(_x12) {
1302
+ function apiGetProductCreator(_x18) {
1117
1303
  return _apiGetProductCreator.apply(this, arguments);
1118
1304
  }
1119
1305
  function _apiGetProductCreator() {
1120
- _apiGetProductCreator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref12) {
1306
+ _apiGetProductCreator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref14) {
1121
1307
  var serviceUrl, res, resData;
1122
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
1123
- while (1) switch (_context12.prev = _context12.next) {
1308
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
1309
+ while (1) switch (_context15.prev = _context15.next) {
1124
1310
  case 0:
1125
- serviceUrl = _ref12.serviceUrl;
1126
- _context12.prev = 1;
1127
- _context12.next = 4;
1311
+ serviceUrl = _ref14.serviceUrl;
1312
+ _context15.prev = 1;
1313
+ _context15.next = 4;
1128
1314
  return fetch("".concat(serviceUrl, "/v2/views/configs/load?type=PRODUCT_CREATOR&identifier=Default"), {
1129
1315
  headers: {
1130
1316
  'Content-Type': 'application/json'
1131
1317
  }
1132
1318
  });
1133
1319
  case 4:
1134
- res = _context12.sent;
1135
- _context12.next = 7;
1320
+ res = _context15.sent;
1321
+ _context15.next = 7;
1136
1322
  return res.json();
1137
1323
  case 7:
1138
- resData = _context12.sent;
1139
- return _context12.abrupt("return", resData.configParams);
1324
+ resData = _context15.sent;
1325
+ return _context15.abrupt("return", resData.configParams);
1140
1326
  case 11:
1141
- _context12.prev = 11;
1142
- _context12.t0 = _context12["catch"](1);
1327
+ _context15.prev = 11;
1328
+ _context15.t0 = _context15["catch"](1);
1143
1329
  throw new Error('Could not fetch ProductCreator Config');
1144
1330
  case 14:
1145
1331
  case "end":
1146
- return _context12.stop();
1332
+ return _context15.stop();
1147
1333
  }
1148
- }, _callee12, null, [[1, 11]]);
1334
+ }, _callee15, null, [[1, 11]]);
1149
1335
  }));
1150
1336
  return _apiGetProductCreator.apply(this, arguments);
1151
1337
  }
1152
- function apiGetManualCustomDataFields(_x13) {
1338
+ function apiGetManualCustomDataFields(_x19) {
1153
1339
  return _apiGetManualCustomDataFields.apply(this, arguments);
1154
1340
  }
1155
1341
  function _apiGetManualCustomDataFields() {
1156
- _apiGetManualCustomDataFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref13) {
1342
+ _apiGetManualCustomDataFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref15) {
1157
1343
  var serviceUrl, res, resData;
1158
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
1159
- while (1) switch (_context13.prev = _context13.next) {
1344
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
1345
+ while (1) switch (_context16.prev = _context16.next) {
1160
1346
  case 0:
1161
- serviceUrl = _ref13.serviceUrl;
1162
- _context13.prev = 1;
1163
- _context13.next = 4;
1347
+ serviceUrl = _ref15.serviceUrl;
1348
+ _context16.prev = 1;
1349
+ _context16.next = 4;
1164
1350
  return fetch("".concat(serviceUrl, "/v1/customdata/fields"), {
1165
1351
  headers: {
1166
1352
  'Content-Type': 'application/json'
1167
1353
  }
1168
1354
  });
1169
1355
  case 4:
1170
- res = _context13.sent;
1171
- _context13.next = 7;
1356
+ res = _context16.sent;
1357
+ _context16.next = 7;
1172
1358
  return res.json();
1173
1359
  case 7:
1174
- resData = _context13.sent;
1175
- return _context13.abrupt("return", resData);
1360
+ resData = _context16.sent;
1361
+ return _context16.abrupt("return", resData);
1176
1362
  case 11:
1177
- _context13.prev = 11;
1178
- _context13.t0 = _context13["catch"](1);
1363
+ _context16.prev = 11;
1364
+ _context16.t0 = _context16["catch"](1);
1179
1365
  throw new Error('Could not custom data field keys');
1180
1366
  case 14:
1181
1367
  case "end":
1182
- return _context13.stop();
1368
+ return _context16.stop();
1183
1369
  }
1184
- }, _callee13, null, [[1, 11]]);
1370
+ }, _callee16, null, [[1, 11]]);
1185
1371
  }));
1186
1372
  return _apiGetManualCustomDataFields.apply(this, arguments);
1187
1373
  }
1188
- function apiGetAffiliates(_x14) {
1374
+ function apiGetAffiliates(_x20) {
1189
1375
  return _apiGetAffiliates.apply(this, arguments);
1190
1376
  }
1191
1377
  function _apiGetAffiliates() {
1192
- _apiGetAffiliates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref14) {
1378
+ _apiGetAffiliates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref16) {
1193
1379
  var serviceUrl, organizationId, jwt, fullUrl, res, resOrg;
1194
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
1195
- while (1) switch (_context14.prev = _context14.next) {
1380
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
1381
+ while (1) switch (_context17.prev = _context17.next) {
1196
1382
  case 0:
1197
- serviceUrl = _ref14.serviceUrl, organizationId = _ref14.organizationId, jwt = _ref14.jwt;
1383
+ serviceUrl = _ref16.serviceUrl, organizationId = _ref16.organizationId, jwt = _ref16.jwt;
1198
1384
  fullUrl = serviceUrl + '/v2/organizations/' + organizationId + '/affiliate?inherit=true';
1199
- _context14.prev = 2;
1200
- _context14.next = 5;
1385
+ _context17.prev = 2;
1386
+ _context17.next = 5;
1201
1387
  return fetch(fullUrl, {
1202
1388
  headers: {
1203
1389
  Authorization: 'Bearer ' + jwt,
@@ -1205,24 +1391,24 @@ function _apiGetAffiliates() {
1205
1391
  }
1206
1392
  });
1207
1393
  case 5:
1208
- res = _context14.sent;
1209
- _context14.next = 8;
1394
+ res = _context17.sent;
1395
+ _context17.next = 8;
1210
1396
  return res.json();
1211
1397
  case 8:
1212
- resOrg = _context14.sent;
1213
- _context14.next = 14;
1398
+ resOrg = _context17.sent;
1399
+ _context17.next = 14;
1214
1400
  break;
1215
1401
  case 11:
1216
- _context14.prev = 11;
1217
- _context14.t0 = _context14["catch"](2);
1402
+ _context17.prev = 11;
1403
+ _context17.t0 = _context17["catch"](2);
1218
1404
  throw new Error('Could not fetch existing affiliates for organization');
1219
1405
  case 14:
1220
- return _context14.abrupt("return", resOrg.data);
1406
+ return _context17.abrupt("return", resOrg.data);
1221
1407
  case 15:
1222
1408
  case "end":
1223
- return _context14.stop();
1409
+ return _context17.stop();
1224
1410
  }
1225
- }, _callee14, null, [[2, 11]]);
1411
+ }, _callee17, null, [[2, 11]]);
1226
1412
  }));
1227
1413
  return _apiGetAffiliates.apply(this, arguments);
1228
1414
  }
@@ -1332,8 +1518,8 @@ var _excluded$a = ["collectionId"],
1332
1518
  function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1333
1519
  function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
1334
1520
  function _arrayLikeToArray$2(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; }
1335
- 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; }
1336
- 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; }
1521
+ 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; }
1522
+ 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; }
1337
1523
  var LOG$9 = getLogger('Seller', 'SellerStateData');
1338
1524
  function useSellerStateData(_ref) {
1339
1525
  var sessionGuid = _ref.sessionGuid,
@@ -1349,9 +1535,9 @@ function useSellerStateData(_ref) {
1349
1535
  _useDivaCore$state = _useDivaCore.state,
1350
1536
  apiConfig = _useDivaCore$state.apiConfig,
1351
1537
  loginMode = _useDivaCore$state.loginMode,
1352
- jwt = _useDivaCore$state.jwt;
1353
- _useDivaCore$state.organizationHierarchy;
1354
- var _useDivaCore$actions = _useDivaCore.actions,
1538
+ jwt = _useDivaCore$state.jwt,
1539
+ organization = _useDivaCore$state.organization,
1540
+ _useDivaCore$actions = _useDivaCore.actions,
1355
1541
  toggleLoading = _useDivaCore$actions.toggleLoading,
1356
1542
  getSessionGuid = _useDivaCore$actions.getSessionGuid,
1357
1543
  updateCustomLogo = _useDivaCore$actions.updateCustomLogo,
@@ -1439,7 +1625,7 @@ function useSellerStateData(_ref) {
1439
1625
  return _regeneratorRuntime.wrap(function _callee$(_context) {
1440
1626
  while (1) switch (_context.prev = _context.next) {
1441
1627
  case 0:
1442
- if (!(state.firstLoginApiUrl && sessionGuid)) {
1628
+ if (!(state.firstLoginApiUrl && sessionGuid && configData)) {
1443
1629
  _context.next = 10;
1444
1630
  break;
1445
1631
  }
@@ -1451,7 +1637,12 @@ function useSellerStateData(_ref) {
1451
1637
  _context.next = 5;
1452
1638
  return apiLoadCollections({
1453
1639
  serverUrl: state.firstLoginApiUrl,
1454
- sessionGuid: sessionGuid
1640
+ enricherUrl: apiConfig.enricherService,
1641
+ sessionGuid: sessionGuid,
1642
+ organizationId: organization === null || organization === void 0 ? void 0 : organization._id,
1643
+ jwt: jwt,
1644
+ settings: configData,
1645
+ language: i18n.language
1455
1646
  });
1456
1647
  case 5:
1457
1648
  collections = _context.sent;
@@ -1463,7 +1654,7 @@ function useSellerStateData(_ref) {
1463
1654
  }]
1464
1655
  });
1465
1656
  case 7:
1466
- return _context.abrupt("return", processData(_objectSpread$B(_objectSpread$B({}, props), {}, {
1657
+ return _context.abrupt("return", processData(_objectSpread$C(_objectSpread$C({}, props), {}, {
1467
1658
  data: collections
1468
1659
  })));
1469
1660
  case 10:
@@ -1483,27 +1674,90 @@ function useSellerStateData(_ref) {
1483
1674
  }();
1484
1675
  var loadCatalogs = /*#__PURE__*/function () {
1485
1676
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
1486
- var collectionId, props, _state$collections, catalogs, newCatalogCodex;
1677
+ var collectionId, props, _state$collections, catalogs, collections, collection, _collection$enricherS, _collection$enricherS2, series, newCatalogCodex;
1487
1678
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
1488
1679
  while (1) switch (_context2.prev = _context2.next) {
1489
1680
  case 0:
1490
1681
  collectionId = _ref3.collectionId, props = _objectWithoutProperties(_ref3, _excluded$a);
1491
1682
  if (!(state.firstLoginApiUrl && sessionGuid)) {
1492
- _context2.next = 14;
1683
+ _context2.next = 28;
1493
1684
  break;
1494
1685
  }
1495
1686
  catalogs = state.catalogs;
1687
+ collections = state.collections;
1688
+ if (collections) {
1689
+ _context2.next = 8;
1690
+ break;
1691
+ }
1692
+ _context2.next = 7;
1693
+ return loadCollections({});
1694
+ case 7:
1695
+ collections = _context2.sent.data;
1696
+ case 8:
1697
+ collection = collections.find(function (c) {
1698
+ return c.id == collectionId;
1699
+ });
1700
+ if (!((collection === null || collection === void 0 ? void 0 : collection.type) === 'ENRICHER_PACKAGE')) {
1701
+ _context2.next = 17;
1702
+ break;
1703
+ }
1704
+ if ((_collection$enricherS = collection.enricherSeries) !== null && _collection$enricherS !== void 0 && _collection$enricherS.length) {
1705
+ _context2.next = 12;
1706
+ break;
1707
+ }
1708
+ throw new Error('collection ' + collection.accountName + ' has no series ' + collection.id + '');
1709
+ case 12:
1710
+ series = (_collection$enricherS2 = collection.enricherSeries) === null || _collection$enricherS2 === void 0 ? void 0 : _collection$enricherS2.map(function (data) {
1711
+ return {
1712
+ id: data.catalogId,
1713
+ codex: data.serieNo,
1714
+ accountId: data.accountId,
1715
+ name: data.name,
1716
+ catalogLogo: data.url,
1717
+ supplierGuid: data.catalogId,
1718
+ collectionName: data.enricherPackageName
1719
+ //description: data.ShortDesc ? data.ShortDesc : undefined,
1720
+ //collectionLogo: ,
1721
+ //mainCategory: data.RetailMainCategory ? data.RetailMainCategory : data.MainCategory ? data.MainCategory : undefined,
1722
+ //subCategory: data.RetailSubCategory ? data.RetailSubCategory : data.SubCategory ? data.SubCategory : undefined,
1723
+ //retailArticleNr: data.RetailArticleNr ? data.RetailArticleNr : undefined,
1724
+ //nArticles: 0,
1725
+ // brandLogo: data.BrandLogo ? data.BrandLogo : undefined,
1726
+ //supplierGuid: data.SupplierGUID ? data.SupplierGUID : undefined,
1727
+ //supplierILN: data.SupplierILN ? data.SupplierILN : undefined,
1728
+ //supplierLogo: data.SupplierLogo ? data.SupplierLogo : undefined,
1729
+ //supplierName: data.SupplierName ? data.SupplierName : undefined,
1730
+ //lastUpdate: data. ? DivaUtils.getDate(data.LastUpdate) : undefined,
1731
+ //validFrom: data.ValidFrom ? DivaUtils.getDate(data.ValidFrom) : undefined,
1732
+ //validTo: data.ValidTo ? DivaUtils.getDate(data.ValidTo) : undefined,
1733
+ //has3D: data.Planer == 3 ? true : false,
1734
+ };
1735
+ });
1736
+ dispatch({
1737
+ type: 'update',
1738
+ payload: [{
1739
+ field: 'currentCollectionId',
1740
+ value: collectionId
1741
+ }, {
1742
+ field: 'catalogs',
1743
+ value: series
1744
+ }]
1745
+ });
1746
+ return _context2.abrupt("return", processData(_objectSpread$C(_objectSpread$C({}, props), {}, {
1747
+ data: series || []
1748
+ })));
1749
+ case 17:
1496
1750
  if (!(!catalogs || collectionId != state.currentCollectionId)) {
1497
- _context2.next = 10;
1751
+ _context2.next = 24;
1498
1752
  break;
1499
1753
  }
1500
- _context2.next = 6;
1754
+ _context2.next = 20;
1501
1755
  return apiLoadCatalogs({
1502
1756
  serverUrl: state.firstLoginApiUrl,
1503
1757
  sessionGuid: sessionGuid,
1504
1758
  collectionGuid: collectionId
1505
1759
  });
1506
- case 6:
1760
+ case 20:
1507
1761
  catalogs = _context2.sent;
1508
1762
  // reset catalogCodex only if a different collection is loaded, not if "all" catalogs are shown
1509
1763
  newCatalogCodex = state.currentCatalogCodex;
@@ -1523,19 +1777,19 @@ function useSellerStateData(_ref) {
1523
1777
  value: catalogs
1524
1778
  }]
1525
1779
  });
1526
- case 10:
1780
+ case 24:
1527
1781
  updateAcountLogo((_state$collections = state.collections) === null || _state$collections === void 0 || (_state$collections = _state$collections.find(function (c) {
1528
1782
  return c.id == collectionId;
1529
1783
  })) === null || _state$collections === void 0 ? void 0 : _state$collections.accountLogo);
1530
- return _context2.abrupt("return", processData(_objectSpread$B(_objectSpread$B({}, props), {}, {
1784
+ return _context2.abrupt("return", processData(_objectSpread$C(_objectSpread$C({}, props), {}, {
1531
1785
  data: catalogs || []
1532
1786
  })));
1533
- case 14:
1787
+ case 28:
1534
1788
  return _context2.abrupt("return", {
1535
1789
  data: [],
1536
1790
  total: 0
1537
1791
  });
1538
- case 15:
1792
+ case 29:
1539
1793
  case "end":
1540
1794
  return _context2.stop();
1541
1795
  }
@@ -1586,150 +1840,232 @@ function useSellerStateData(_ref) {
1586
1840
  var _len,
1587
1841
  catalog,
1588
1842
  _key,
1843
+ collections,
1844
+ collection,
1589
1845
  catalogData,
1590
1846
  _iterator,
1591
1847
  _step,
1592
- _c$accountSessionId,
1593
- c,
1594
- currentAccountSessionId,
1595
- cData,
1596
- _args4 = arguments;
1597
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
1598
- while (1) switch (_context4.prev = _context4.next) {
1848
+ _loop,
1849
+ _ret,
1850
+ _args5 = arguments;
1851
+ return _regeneratorRuntime.wrap(function _callee4$(_context5) {
1852
+ while (1) switch (_context5.prev = _context5.next) {
1599
1853
  case 0:
1600
- for (_len = _args4.length, catalog = new Array(_len), _key = 0; _key < _len; _key++) {
1601
- catalog[_key] = _args4[_key];
1854
+ for (_len = _args5.length, catalog = new Array(_len), _key = 0; _key < _len; _key++) {
1855
+ catalog[_key] = _args5[_key];
1602
1856
  }
1857
+ collections = state.collections;
1858
+ if (collections) {
1859
+ _context5.next = 6;
1860
+ break;
1861
+ }
1862
+ _context5.next = 5;
1863
+ return loadCollections({});
1864
+ case 5:
1865
+ collections = _context5.sent.data;
1866
+ case 6:
1867
+ collection = collections.find(function (c) {
1868
+ var _state$currentCollect, _catalog$;
1869
+ return c.id == ((_state$currentCollect = state.currentCollectionId) !== null && _state$currentCollect !== void 0 ? _state$currentCollect : (_catalog$ = catalog[0]) === null || _catalog$ === void 0 ? void 0 : _catalog$.accountId);
1870
+ });
1603
1871
  if (!(catalog.length != 0 && state.firstLoginApiUrl)) {
1604
- _context4.next = 52;
1872
+ _context5.next = 31;
1605
1873
  break;
1606
1874
  }
1607
1875
  catalogData = state.catalogData ? _toConsumableArray(state.catalogData) : [];
1608
1876
  if (!(!catalogData.length || catalogData.length != catalog.length || catalog[0].catalogCodex != state.currentCatalogCodex || catalog[0].language != catalogData[0].lang)) {
1609
- _context4.next = 51;
1877
+ _context5.next = 30;
1610
1878
  break;
1611
1879
  }
1612
1880
  catalogData = [];
1613
1881
  _iterator = _createForOfIteratorHelper$2(catalog);
1614
- _context4.prev = 6;
1882
+ _context5.prev = 12;
1883
+ _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
1884
+ var _collection$enricherS3;
1885
+ var c, isIDMData, cData, _c$accountSessionId, currentAccountSessionId, _cData;
1886
+ return _regeneratorRuntime.wrap(function _loop$(_context4) {
1887
+ while (1) switch (_context4.prev = _context4.next) {
1888
+ case 0:
1889
+ c = _step.value;
1890
+ isIDMData = collection === null || collection === void 0 || (_collection$enricherS3 = collection.enricherSeries) === null || _collection$enricherS3 === void 0 ? void 0 : _collection$enricherS3.find(function (s) {
1891
+ return s.serieNo === c.catalogCodex;
1892
+ });
1893
+ if (!isIDMData) {
1894
+ _context4.next = 11;
1895
+ break;
1896
+ }
1897
+ _context4.next = 5;
1898
+ return apiLoadCatalogInfoEnricher({
1899
+ catalogId: isIDMData.catalogId,
1900
+ enricherUrl: apiConfig.enricherService,
1901
+ jwt: jwt,
1902
+ language: c.language,
1903
+ serieNo: isIDMData.serieNo
1904
+ });
1905
+ case 5:
1906
+ cData = _context4.sent;
1907
+ catalogData.push(cData);
1908
+ dispatch({
1909
+ type: 'update',
1910
+ payload: [{
1911
+ field: 'catalogData',
1912
+ value: catalogData
1913
+ }, {
1914
+ field: 'currentCatalogCodex',
1915
+ value: catalog[0].catalogCodex
1916
+ }, {
1917
+ field: 'currentPlannerParams',
1918
+ value: undefined
1919
+ }, {
1920
+ field: 'currentAccountLoginId',
1921
+ value: catalog[0].accountSessionId || catalogData[0].accountSessionId
1922
+ }, {
1923
+ field: 'currentAccountId',
1924
+ value: catalog[0].accountId
1925
+ }, {
1926
+ field: 'currentCatalogGuid',
1927
+ value: catalogData[0].guid
1928
+ }]
1929
+ });
1930
+ updateAcountLogo(catalogData[0].accountLogo);
1931
+ _context4.next = 42;
1932
+ break;
1933
+ case 11:
1934
+ if (!((_c$accountSessionId = c.accountSessionId) !== null && _c$accountSessionId !== void 0)) {
1935
+ _context4.next = 15;
1936
+ break;
1937
+ }
1938
+ _context4.t0 = _c$accountSessionId;
1939
+ _context4.next = 23;
1940
+ break;
1941
+ case 15:
1942
+ if (!c.accountId) {
1943
+ _context4.next = 21;
1944
+ break;
1945
+ }
1946
+ _context4.next = 18;
1947
+ return checkAccountLogin({
1948
+ accountId: c.accountId
1949
+ });
1950
+ case 18:
1951
+ _context4.t1 = _context4.sent;
1952
+ _context4.next = 22;
1953
+ break;
1954
+ case 21:
1955
+ _context4.t1 = sessionGuid;
1956
+ case 22:
1957
+ _context4.t0 = _context4.t1;
1958
+ case 23:
1959
+ currentAccountSessionId = _context4.t0;
1960
+ if (currentAccountSessionId) {
1961
+ _context4.next = 27;
1962
+ break;
1963
+ }
1964
+ LOG$9.error(new DivaError$1('AccountSessionId is undefined', {
1965
+ code: 'SELLER_0001'
1966
+ }));
1967
+ return _context4.abrupt("return", {
1968
+ v: void 0
1969
+ });
1970
+ case 27:
1971
+ _context4.prev = 27;
1972
+ _context4.next = 30;
1973
+ return apiLoadCatalogInfo({
1974
+ serverUrlAPI: state.firstLoginApiUrl,
1975
+ catalogCodex: c.catalogCodex,
1976
+ accountSessionId: currentAccountSessionId,
1977
+ language: c.language
1978
+ });
1979
+ case 30:
1980
+ _cData = _context4.sent;
1981
+ catalogData.push(_cData);
1982
+ dispatch({
1983
+ type: 'update',
1984
+ payload: [{
1985
+ field: 'catalogData',
1986
+ value: catalogData
1987
+ }, {
1988
+ field: 'currentCatalogCodex',
1989
+ value: catalog[0].catalogCodex
1990
+ }, {
1991
+ field: 'currentPlannerParams',
1992
+ value: undefined
1993
+ }, {
1994
+ field: 'currentAccountLoginId',
1995
+ value: catalog[0].accountSessionId || catalogData[0].accountSessionId
1996
+ }, {
1997
+ field: 'currentAccountId',
1998
+ value: catalog[0].accountId
1999
+ }, {
2000
+ field: 'currentCatalogGuid',
2001
+ value: catalogData[0].guid
2002
+ }]
2003
+ });
2004
+ updateAcountLogo(catalogData[0].accountLogo);
2005
+ _context4.next = 42;
2006
+ break;
2007
+ case 36:
2008
+ _context4.prev = 36;
2009
+ _context4.t2 = _context4["catch"](27);
2010
+ if (!((_context4.t2 === null || _context4.t2 === void 0 ? void 0 : _context4.t2.message) == 'Es trat ein technischer Fehler auf, probieren Sie es später erneut nochmal und melden Sie sich neu an.')) {
2011
+ _context4.next = 41;
2012
+ break;
2013
+ }
2014
+ LOG$9.error(new DivaError$1('Error on Loading CatalogData', {
2015
+ code: 'SELLER_0001',
2016
+ cause: _context4.t2
2017
+ }));
2018
+ return _context4.abrupt("return", {
2019
+ v: void 0
2020
+ });
2021
+ case 41:
2022
+ openModal({
2023
+ title: t('modals.error_accured') + ': ' + (_context4.t2 === null || _context4.t2 === void 0 ? void 0 : _context4.t2.message),
2024
+ accept: true
2025
+ });
2026
+ case 42:
2027
+ case "end":
2028
+ return _context4.stop();
2029
+ }
2030
+ }, _loop, null, [[27, 36]]);
2031
+ });
1615
2032
  _iterator.s();
1616
- case 8:
2033
+ case 15:
1617
2034
  if ((_step = _iterator.n()).done) {
1618
- _context4.next = 43;
2035
+ _context5.next = 22;
1619
2036
  break;
1620
2037
  }
1621
- c = _step.value;
1622
- if (!((_c$accountSessionId = c.accountSessionId) !== null && _c$accountSessionId !== void 0)) {
1623
- _context4.next = 14;
1624
- break;
1625
- }
1626
- _context4.t0 = _c$accountSessionId;
1627
- _context4.next = 22;
1628
- break;
1629
- case 14:
1630
- if (!c.accountId) {
1631
- _context4.next = 20;
1632
- break;
1633
- }
1634
- _context4.next = 17;
1635
- return checkAccountLogin({
1636
- accountId: c.accountId
1637
- });
2038
+ return _context5.delegateYield(_loop(), "t0", 17);
1638
2039
  case 17:
1639
- _context4.t1 = _context4.sent;
1640
- _context4.next = 21;
1641
- break;
1642
- case 20:
1643
- _context4.t1 = sessionGuid;
1644
- case 21:
1645
- _context4.t0 = _context4.t1;
1646
- case 22:
1647
- currentAccountSessionId = _context4.t0;
1648
- if (currentAccountSessionId) {
1649
- _context4.next = 26;
1650
- break;
1651
- }
1652
- LOG$9.error(new DivaError('AccountSessionId is undefined', {
1653
- code: 'SELLER_0001'
1654
- }));
1655
- return _context4.abrupt("return");
1656
- case 26:
1657
- _context4.prev = 26;
1658
- _context4.next = 29;
1659
- return apiLoadCatalogInfo({
1660
- serverUrlAPI: state.firstLoginApiUrl,
1661
- catalogCodex: c.catalogCodex,
1662
- accountSessionId: currentAccountSessionId,
1663
- language: c.language
1664
- });
1665
- case 29:
1666
- cData = _context4.sent;
1667
- catalogData.push(cData);
1668
- dispatch({
1669
- type: 'update',
1670
- payload: [{
1671
- field: 'catalogData',
1672
- value: catalogData
1673
- }, {
1674
- field: 'currentCatalogCodex',
1675
- value: catalog[0].catalogCodex
1676
- }, {
1677
- field: 'currentPlannerParams',
1678
- value: undefined
1679
- }, {
1680
- field: 'currentAccountLoginId',
1681
- value: catalog[0].accountSessionId || catalogData[0].accountSessionId
1682
- }, {
1683
- field: 'currentAccountId',
1684
- value: catalog[0].accountId
1685
- }, {
1686
- field: 'currentCatalogGuid',
1687
- value: catalogData[0].guid
1688
- }]
1689
- });
1690
- updateAcountLogo(catalogData[0].accountLogo);
1691
- _context4.next = 41;
1692
- break;
1693
- case 35:
1694
- _context4.prev = 35;
1695
- _context4.t2 = _context4["catch"](26);
1696
- if (!((_context4.t2 === null || _context4.t2 === void 0 ? void 0 : _context4.t2.message) == 'Es trat ein technischer Fehler auf, probieren Sie es später erneut nochmal und melden Sie sich neu an.')) {
1697
- _context4.next = 40;
2040
+ _ret = _context5.t0;
2041
+ if (!_ret) {
2042
+ _context5.next = 20;
1698
2043
  break;
1699
2044
  }
1700
- LOG$9.error(new DivaError('Error on Loading CatalogData', {
1701
- code: 'SELLER_0001',
1702
- cause: _context4.t2
1703
- }));
1704
- return _context4.abrupt("return");
1705
- case 40:
1706
- openModal({
1707
- title: t('modals.error_accured') + ': ' + (_context4.t2 === null || _context4.t2 === void 0 ? void 0 : _context4.t2.message),
1708
- accept: true
1709
- });
1710
- case 41:
1711
- _context4.next = 8;
2045
+ return _context5.abrupt("return", _ret.v);
2046
+ case 20:
2047
+ _context5.next = 15;
1712
2048
  break;
1713
- case 43:
1714
- _context4.next = 48;
2049
+ case 22:
2050
+ _context5.next = 27;
1715
2051
  break;
1716
- case 45:
1717
- _context4.prev = 45;
1718
- _context4.t3 = _context4["catch"](6);
1719
- _iterator.e(_context4.t3);
1720
- case 48:
1721
- _context4.prev = 48;
2052
+ case 24:
2053
+ _context5.prev = 24;
2054
+ _context5.t1 = _context5["catch"](12);
2055
+ _iterator.e(_context5.t1);
2056
+ case 27:
2057
+ _context5.prev = 27;
1722
2058
  _iterator.f();
1723
- return _context4.finish(48);
1724
- case 51:
1725
- return _context4.abrupt("return", catalogData);
1726
- case 52:
1727
- return _context4.abrupt("return", undefined);
1728
- case 53:
2059
+ return _context5.finish(27);
2060
+ case 30:
2061
+ return _context5.abrupt("return", catalogData);
2062
+ case 31:
2063
+ return _context5.abrupt("return", undefined);
2064
+ case 32:
1729
2065
  case "end":
1730
- return _context4.stop();
2066
+ return _context5.stop();
1731
2067
  }
1732
- }, _callee4, null, [[6, 45, 48, 51], [26, 35]]);
2068
+ }, _callee4, null, [[12, 24, 27, 30]]);
1733
2069
  }));
1734
2070
  return function loadCatalogInfo() {
1735
2071
  return _ref7.apply(this, arguments);
@@ -1738,34 +2074,34 @@ function useSellerStateData(_ref) {
1738
2074
  var checkAccountLogin = /*#__PURE__*/function () {
1739
2075
  var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref8) {
1740
2076
  var accountId, accountLoginId;
1741
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
1742
- while (1) switch (_context5.prev = _context5.next) {
2077
+ return _regeneratorRuntime.wrap(function _callee5$(_context6) {
2078
+ while (1) switch (_context6.prev = _context6.next) {
1743
2079
  case 0:
1744
2080
  accountId = _ref8.accountId;
1745
2081
  if (!(state.firstLoginApiUrl && sessionGuid)) {
1746
- _context5.next = 10;
2082
+ _context6.next = 10;
1747
2083
  break;
1748
2084
  }
1749
2085
  accountLoginId = state.currentAccountLoginId;
1750
2086
  if (!(!accountLoginId || accountId != state.currentAccountId)) {
1751
- _context5.next = 7;
2087
+ _context6.next = 7;
1752
2088
  break;
1753
2089
  }
1754
- _context5.next = 6;
2090
+ _context6.next = 6;
1755
2091
  return apiAccountLogin({
1756
2092
  serverUrl: state.firstLoginApiUrl,
1757
2093
  sessionGuid: sessionGuid,
1758
2094
  accountId: accountId
1759
2095
  });
1760
2096
  case 6:
1761
- accountLoginId = _context5.sent;
2097
+ accountLoginId = _context6.sent;
1762
2098
  case 7:
1763
- return _context5.abrupt("return", accountLoginId);
2099
+ return _context6.abrupt("return", accountLoginId);
1764
2100
  case 10:
1765
- return _context5.abrupt("return", undefined);
2101
+ return _context6.abrupt("return", undefined);
1766
2102
  case 11:
1767
2103
  case "end":
1768
- return _context5.stop();
2104
+ return _context6.stop();
1769
2105
  }
1770
2106
  }, _callee5);
1771
2107
  }));
@@ -1776,27 +2112,27 @@ function useSellerStateData(_ref) {
1776
2112
  var catalogGuidLogin = /*#__PURE__*/function () {
1777
2113
  var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref10) {
1778
2114
  var catalogGuid, accountSessionGuid, accountId, accountLoginId, _yield$apiCatalogGuid, s, a;
1779
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
1780
- while (1) switch (_context6.prev = _context6.next) {
2115
+ return _regeneratorRuntime.wrap(function _callee6$(_context7) {
2116
+ while (1) switch (_context7.prev = _context7.next) {
1781
2117
  case 0:
1782
2118
  catalogGuid = _ref10.catalogGuid;
1783
2119
  if (!(state.firstLoginApiUrl && sessionGuid)) {
1784
- _context6.next = 15;
2120
+ _context7.next = 15;
1785
2121
  break;
1786
2122
  }
1787
2123
  accountLoginId = state.currentAccountLoginId;
1788
2124
  if (!(!accountLoginId || catalogGuid != state.currentAccountId)) {
1789
- _context6.next = 11;
2125
+ _context7.next = 11;
1790
2126
  break;
1791
2127
  }
1792
- _context6.next = 6;
2128
+ _context7.next = 6;
1793
2129
  return apiCatalogGuidLogin({
1794
2130
  serverUrl: state.firstLoginApiUrl,
1795
2131
  sessionGuid: sessionGuid,
1796
2132
  catalogGuid: catalogGuid
1797
2133
  });
1798
2134
  case 6:
1799
- _yield$apiCatalogGuid = _context6.sent;
2135
+ _yield$apiCatalogGuid = _context7.sent;
1800
2136
  s = _yield$apiCatalogGuid.sessionGuid;
1801
2137
  a = _yield$apiCatalogGuid.accountId;
1802
2138
  accountSessionGuid = s;
@@ -1812,15 +2148,15 @@ function useSellerStateData(_ref) {
1812
2148
  value: accountSessionGuid
1813
2149
  }]
1814
2150
  });
1815
- return _context6.abrupt("return", {
2151
+ return _context7.abrupt("return", {
1816
2152
  accountSessionGuid: accountSessionGuid,
1817
2153
  accountId: accountId
1818
2154
  });
1819
2155
  case 15:
1820
- return _context6.abrupt("return", undefined);
2156
+ return _context7.abrupt("return", undefined);
1821
2157
  case 16:
1822
2158
  case "end":
1823
- return _context6.stop();
2159
+ return _context7.stop();
1824
2160
  }
1825
2161
  }, _callee6);
1826
2162
  }));
@@ -1854,11 +2190,11 @@ function useSellerStateData(_ref) {
1854
2190
  var updateBasket = /*#__PURE__*/function () {
1855
2191
  var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(divaNr, basket, customProductId, organizationId, assignNewDivaNr, jwt) {
1856
2192
  var _state$basketState, _currentBasket, _state$basketState2, _currentBasket2, currentBasket, basketIsAlreadySaved, oldSetIds, newSetIds, doReallyConcat, _state$basketState5, _state$basketState6, _state$basketState3, _divaNr, _state$basketState4, _state$basketState7, ret, _getBasketStatusArr, _divaNr2, catalogData;
1857
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
1858
- while (1) switch (_context7.prev = _context7.next) {
2193
+ return _regeneratorRuntime.wrap(function _callee7$(_context8) {
2194
+ while (1) switch (_context8.prev = _context8.next) {
1859
2195
  case 0:
1860
2196
  if (!(state.firstLoginApiUrl && sessionGuid)) {
1861
- _context7.next = 53;
2197
+ _context8.next = 53;
1862
2198
  break;
1863
2199
  }
1864
2200
  currentBasket = basket;
@@ -1873,29 +2209,29 @@ function useSellerStateData(_ref) {
1873
2209
  return newSetIds.includes(x);
1874
2210
  }).length == 0 : false;
1875
2211
  if (!(divaNr && divaNr == state.currentDivaNr && (_state$basketState2 = state.basketState) !== null && _state$basketState2 !== void 0 && _state$basketState2.basket)) {
1876
- _context7.next = 19;
2212
+ _context8.next = 19;
1877
2213
  break;
1878
2214
  }
1879
2215
  if (currentBasket) {
1880
- _context7.next = 16;
2216
+ _context8.next = 16;
1881
2217
  break;
1882
2218
  }
1883
2219
  //if no new basket object is passed in, update the divaNr on the current basket
1884
2220
  currentBasket = (_state$basketState3 = state.basketState) === null || _state$basketState3 === void 0 ? void 0 : _state$basketState3.basket;
1885
2221
  if (!(!((_divaNr = divaNr) !== null && _divaNr !== void 0 && _divaNr.startsWith(currentBasket.DivaNr)) || (_state$basketState4 = state.basketState) !== null && _state$basketState4 !== void 0 && _state$basketState4.assignNewDivaNr)) {
1886
- _context7.next = 14;
2222
+ _context8.next = 14;
1887
2223
  break;
1888
2224
  }
1889
- _context7.next = 12;
2225
+ _context8.next = 12;
1890
2226
  return apiLoadUniqueDivaNr({
1891
2227
  basketUrl: apiConfig.basketService,
1892
2228
  jwt: jwt
1893
2229
  });
1894
2230
  case 12:
1895
- divaNr = _context7.sent;
2231
+ divaNr = _context8.sent;
1896
2232
  currentBasket.DivaNr = divaNr;
1897
2233
  case 14:
1898
- _context7.next = 17;
2234
+ _context8.next = 17;
1899
2235
  break;
1900
2236
  case 16:
1901
2237
  if ((_state$basketState5 = state.basketState) !== null && _state$basketState5 !== void 0 && _state$basketState5.concat && doReallyConcat && state !== null && state !== void 0 && (_state$basketState6 = state.basketState) !== null && _state$basketState6 !== void 0 && _state$basketState6.basket && basket) {
@@ -1904,18 +2240,18 @@ function useSellerStateData(_ref) {
1904
2240
  currentBasket = state.basketState.basket;
1905
2241
  }
1906
2242
  case 17:
1907
- _context7.next = 40;
2243
+ _context8.next = 40;
1908
2244
  break;
1909
2245
  case 19:
1910
2246
  if (!(!currentBasket || divaNr != currentBasket.DivaNr || customProductId)) {
1911
- _context7.next = 40;
2247
+ _context8.next = 40;
1912
2248
  break;
1913
2249
  }
1914
- _context7.next = 22;
2250
+ _context8.next = 22;
1915
2251
  return apiLoadBasket({
1916
2252
  divaNr: divaNr,
1917
- apiConfig: _objectSpread$B(_objectSpread$B({}, apiConfig), {}, {
1918
- api2: _objectSpread$B(_objectSpread$B({}, apiConfig.api2), {}, {
2253
+ apiConfig: _objectSpread$C(_objectSpread$C({}, apiConfig), {}, {
2254
+ api2: _objectSpread$C(_objectSpread$C({}, apiConfig.api2), {}, {
1919
2255
  "default": state.firstLoginApiUrl
1920
2256
  })
1921
2257
  }),
@@ -1928,31 +2264,31 @@ function useSellerStateData(_ref) {
1928
2264
  jwt: jwt
1929
2265
  });
1930
2266
  case 22:
1931
- ret = _context7.sent;
2267
+ ret = _context8.sent;
1932
2268
  if (ret) {
1933
- _context7.next = 25;
2269
+ _context8.next = 25;
1934
2270
  break;
1935
2271
  }
1936
- return _context7.abrupt("return");
2272
+ return _context8.abrupt("return");
1937
2273
  case 25:
1938
2274
  currentBasket = ret.basket;
1939
2275
  if (!((_state$basketState7 = state.basketState) !== null && _state$basketState7 !== void 0 && _state$basketState7.assignNewDivaNr || assignNewDivaNr || !divaNr && customProductId)) {
1940
- _context7.next = 36;
2276
+ _context8.next = 36;
1941
2277
  break;
1942
2278
  }
1943
- _context7.next = 29;
2279
+ _context8.next = 29;
1944
2280
  return apiLoadUniqueDivaNr({
1945
2281
  basketUrl: apiConfig.basketService,
1946
2282
  jwt: jwt
1947
2283
  });
1948
2284
  case 29:
1949
- divaNr = _context7.sent;
2285
+ divaNr = _context8.sent;
1950
2286
  currentBasket.DivaNr = divaNr;
1951
2287
  //reset status basket gets new DivaNr
1952
2288
  if ((_getBasketStatusArr = getBasketStatusArr()) !== null && _getBasketStatusArr !== void 0 && _getBasketStatusArr[0]) currentBasket.Status = getBasketStatusArr()[0];
1953
2289
  currentBasket.setDocumentVersion(1);
1954
2290
  divaNr = divaNr + '-1';
1955
- _context7.next = 39;
2291
+ _context8.next = 39;
1956
2292
  break;
1957
2293
  case 36:
1958
2294
  currentBasket.setDocumentVersion(ret.newestDocumentVersion);
@@ -1965,10 +2301,10 @@ function useSellerStateData(_ref) {
1965
2301
  case 40:
1966
2302
  catalogData = undefined;
1967
2303
  if (!currentBasket) {
1968
- _context7.next = 45;
2304
+ _context8.next = 45;
1969
2305
  break;
1970
2306
  }
1971
- _context7.next = 44;
2307
+ _context8.next = 44;
1972
2308
  return loadCatalogInfo.apply(void 0, _toConsumableArray(currentBasket.OrderSets.map(function (os) {
1973
2309
  return {
1974
2310
  catalogCodex: os.CatalogCodex,
@@ -1978,16 +2314,16 @@ function useSellerStateData(_ref) {
1978
2314
  };
1979
2315
  })));
1980
2316
  case 44:
1981
- catalogData = _context7.sent;
2317
+ catalogData = _context8.sent;
1982
2318
  case 45:
1983
2319
  if (!currentBasket) {
1984
- _context7.next = 51;
2320
+ _context8.next = 51;
1985
2321
  break;
1986
2322
  }
1987
2323
  currentBasket.PrintOptions = getPrintOptions(currentBasket.PrintOptions);
1988
2324
  currentBasket.UserLanguage = i18n.language;
1989
2325
  currentBasket.ClientLanguage = i18n.language;
1990
- _context7.next = 51;
2326
+ _context8.next = 51;
1991
2327
  return DivaUtils$1.updateBasketOrgInfo(currentBasket, currentOrganization, currentUser, false);
1992
2328
  case 51:
1993
2329
  dispatch({
@@ -2010,7 +2346,7 @@ function useSellerStateData(_ref) {
2010
2346
  value: undefined
2011
2347
  }]
2012
2348
  });
2013
- return _context7.abrupt("return", {
2349
+ return _context8.abrupt("return", {
2014
2350
  currentBasket: currentBasket,
2015
2351
  catalogData: catalogData,
2016
2352
  saved: basketIsAlreadySaved
@@ -2019,7 +2355,7 @@ function useSellerStateData(_ref) {
2019
2355
  throw new Error('Function: updateBasket was called bevor state.firstLoginApiUrl is initialized!');
2020
2356
  case 54:
2021
2357
  case "end":
2022
- return _context7.stop();
2358
+ return _context8.stop();
2023
2359
  }
2024
2360
  }, _callee7);
2025
2361
  }));
@@ -2030,17 +2366,17 @@ function useSellerStateData(_ref) {
2030
2366
  var saveBasket = /*#__PURE__*/function () {
2031
2367
  var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(basket, openPDF, saveToApi2, toggleEvent) {
2032
2368
  var response;
2033
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
2034
- while (1) switch (_context8.prev = _context8.next) {
2369
+ return _regeneratorRuntime.wrap(function _callee8$(_context9) {
2370
+ while (1) switch (_context9.prev = _context9.next) {
2035
2371
  case 0:
2036
2372
  if (!(configData && jwt)) {
2037
- _context8.next = 13;
2373
+ _context9.next = 13;
2038
2374
  break;
2039
2375
  }
2040
2376
  if (toggleEvent) toggleLoading(toggleEvent);
2041
2377
  basket.ApplicationEnvironment = 'SELLER';
2042
2378
  basket.ReportConfigIdentifier = configData.reportConfigIdentifier;
2043
- _context8.next = 6;
2379
+ _context9.next = 6;
2044
2380
  return basketHandler.saveBasket({
2045
2381
  basket: basket,
2046
2382
  jwt: jwt,
@@ -2049,20 +2385,20 @@ function useSellerStateData(_ref) {
2049
2385
  sessionGuid: sessionGuid
2050
2386
  });
2051
2387
  case 6:
2052
- response = _context8.sent;
2388
+ response = _context9.sent;
2053
2389
  if (!Object.values(BASKET_SAVE_ERROR).includes(response)) {
2054
- _context8.next = 10;
2390
+ _context9.next = 10;
2055
2391
  break;
2056
2392
  }
2057
2393
  if (toggleEvent) toggleLoading(toggleEvent);
2058
- return _context8.abrupt("return", response);
2394
+ return _context9.abrupt("return", response);
2059
2395
  case 10:
2060
2396
  updateBasketState({
2061
2397
  saved: true,
2062
2398
  basetId: response.MongoDBId
2063
2399
  });
2064
2400
  if (toggleEvent) toggleLoading(toggleEvent);
2065
- return _context8.abrupt("return", {
2401
+ return _context9.abrupt("return", {
2066
2402
  mongodbId: response._id,
2067
2403
  pdfUrl: response.PDFDocumentURL
2068
2404
  });
@@ -2070,7 +2406,7 @@ function useSellerStateData(_ref) {
2070
2406
  throw new Error('Function: saveBasket was called bevor state.firstLoginApiUrl is initialized!');
2071
2407
  case 14:
2072
2408
  case "end":
2073
- return _context8.stop();
2409
+ return _context9.stop();
2074
2410
  }
2075
2411
  }, _callee8);
2076
2412
  }));
@@ -2105,6 +2441,7 @@ function useSellerStateData(_ref) {
2105
2441
  Remark: reportConfig.printWithRemark != undefined ? reportConfig.printWithRemark : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.Remark,
2106
2442
  Prices: reportConfig.printWithPrices != undefined ? reportConfig.printWithPrices : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.Prices,
2107
2443
  AllPrices: reportConfig.printWithAllPrices != undefined ? reportConfig.printWithAllPrices : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.AllPrices,
2444
+ OpvCodices: reportConfig.printWithOpvCodices != undefined ? reportConfig.printWithOpvCodices : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.OpvCodices,
2108
2445
  ModelName: reportConfig.printWithModelName != undefined ? reportConfig.printWithModelName : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.ModelName,
2109
2446
  CollectionLogo: reportConfig.printWithCollectionLogo != undefined ? reportConfig.printWithCollectionLogo : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.CollectionLogo,
2110
2447
  DivaLogo: reportConfig.printWithDivaLogo != undefined ? reportConfig.printWithDivaLogo : currentPrintOptions === null || currentPrintOptions === void 0 ? void 0 : currentPrintOptions.DivaLogo,
@@ -2173,67 +2510,155 @@ function useSellerStateData(_ref) {
2173
2510
  };
2174
2511
  var loadArticles = /*#__PURE__*/function () {
2175
2512
  var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref15) {
2176
- var catalogCodex, accountId, props, _state$currentAccount, _state$catalogData2, articles, accountSessionId;
2177
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
2178
- while (1) switch (_context9.prev = _context9.next) {
2513
+ var catalogCodex, accountId, props, _state$catalogData2, _collection$enricherS4, articles, catalogs, collections, collection, accountSessionId, isIDMData, _catalogs, _catalog, _catalog2, catalog, _yield$loadCatalogInf, _state$currentCollect3;
2514
+ return _regeneratorRuntime.wrap(function _callee9$(_context10) {
2515
+ while (1) switch (_context10.prev = _context10.next) {
2179
2516
  case 0:
2180
2517
  catalogCodex = _ref15.catalogCodex, accountId = _ref15.accountId, props = _objectWithoutProperties(_ref15, _excluded3$1);
2181
2518
  if (!state.firstLoginApiUrl) {
2182
- _context9.next = 27;
2519
+ _context10.next = 58;
2183
2520
  break;
2184
2521
  }
2185
2522
  articles = state.articles;
2186
- if (!((_state$currentAccount = state.currentAccountLoginId) !== null && _state$currentAccount !== void 0)) {
2187
- _context9.next = 7;
2523
+ catalogs = state.catalogData;
2524
+ collections = state.collections;
2525
+ if (collections) {
2526
+ _context10.next = 9;
2527
+ break;
2528
+ }
2529
+ _context10.next = 8;
2530
+ return loadCollections({});
2531
+ case 8:
2532
+ collections = _context10.sent.data;
2533
+ case 9:
2534
+ collection = collections.find(function (c) {
2535
+ var _state$currentCollect2;
2536
+ return c.id == ((_state$currentCollect2 = state.currentCollectionId) !== null && _state$currentCollect2 !== void 0 ? _state$currentCollect2 : accountId);
2537
+ });
2538
+ if (!(!state.currentAccountLoginId && (collection === null || collection === void 0 ? void 0 : collection.type) !== 'ENRICHER_PACKAGE')) {
2539
+ _context10.next = 21;
2188
2540
  break;
2189
2541
  }
2190
- _context9.t0 = _state$currentAccount;
2191
- _context9.next = 15;
2192
- break;
2193
- case 7:
2194
2542
  if (!accountId) {
2195
- _context9.next = 13;
2543
+ _context10.next = 17;
2196
2544
  break;
2197
2545
  }
2198
- _context9.next = 10;
2546
+ _context10.next = 14;
2199
2547
  return checkAccountLogin({
2200
2548
  accountId: accountId
2201
2549
  });
2202
- case 10:
2203
- _context9.t1 = _context9.sent;
2204
- _context9.next = 14;
2205
- break;
2206
- case 13:
2207
- _context9.t1 = sessionGuid;
2208
2550
  case 14:
2209
- _context9.t0 = _context9.t1;
2210
- case 15:
2211
- accountSessionId = _context9.t0;
2551
+ _context10.t1 = _context10.sent;
2552
+ _context10.next = 18;
2553
+ break;
2554
+ case 17:
2555
+ _context10.t1 = sessionGuid;
2556
+ case 18:
2557
+ _context10.t0 = _context10.t1;
2558
+ _context10.next = 22;
2559
+ break;
2560
+ case 21:
2561
+ _context10.t0 = state.currentAccountLoginId;
2562
+ case 22:
2563
+ accountSessionId = _context10.t0;
2212
2564
  if (!(!state.catalogs || !((_state$catalogData2 = state.catalogData) !== null && _state$catalogData2 !== void 0 && _state$catalogData2.length))) {
2213
- _context9.next = 19;
2565
+ _context10.next = 27;
2214
2566
  break;
2215
2567
  }
2216
- _context9.next = 19;
2568
+ _context10.next = 26;
2217
2569
  return loadCatalogInfo({
2218
2570
  catalogCodex: catalogCodex,
2219
2571
  accountId: accountId,
2220
2572
  accountSessionId: accountSessionId,
2221
2573
  language: 'en'
2222
2574
  });
2223
- case 19:
2575
+ case 26:
2576
+ catalogs = _context10.sent;
2577
+ case 27:
2578
+ isIDMData = collection === null || collection === void 0 || (_collection$enricherS4 = collection.enricherSeries) === null || _collection$enricherS4 === void 0 ? void 0 : _collection$enricherS4.find(function (s) {
2579
+ return s.serieNo === catalogCodex;
2580
+ });
2581
+ if (!isIDMData) {
2582
+ _context10.next = 50;
2583
+ break;
2584
+ }
2585
+ catalog = (_catalogs = catalogs) === null || _catalogs === void 0 ? void 0 : _catalogs.find(function (c) {
2586
+ return c.codex == isIDMData.serieNo;
2587
+ });
2588
+ if (catalog) {
2589
+ _context10.next = 43;
2590
+ break;
2591
+ }
2592
+ _context10.next = 33;
2593
+ return loadCatalogInfo({
2594
+ catalogCodex: isIDMData.serieNo,
2595
+ language: i18n.language,
2596
+ accountId: (_state$currentCollect3 = state.currentCollectionId) !== null && _state$currentCollect3 !== void 0 ? _state$currentCollect3 : accountId
2597
+ });
2598
+ case 33:
2599
+ _context10.t3 = _yield$loadCatalogInf = _context10.sent;
2600
+ _context10.t2 = _context10.t3 === null;
2601
+ if (_context10.t2) {
2602
+ _context10.next = 37;
2603
+ break;
2604
+ }
2605
+ _context10.t2 = _yield$loadCatalogInf === void 0;
2606
+ case 37:
2607
+ if (!_context10.t2) {
2608
+ _context10.next = 41;
2609
+ break;
2610
+ }
2611
+ _context10.t4 = void 0;
2612
+ _context10.next = 42;
2613
+ break;
2614
+ case 41:
2615
+ _context10.t4 = _yield$loadCatalogInf[0];
2616
+ case 42:
2617
+ catalog = _context10.t4;
2618
+ case 43:
2619
+ _context10.next = 45;
2620
+ return apiLoadEnricherArticles({
2621
+ catalogId: (_catalog = catalog) === null || _catalog === void 0 ? void 0 : _catalog.supplierGuid,
2622
+ enricherUrl: apiConfig.enricherService,
2623
+ jwt: jwt,
2624
+ language: i18n.language,
2625
+ serieId: (_catalog2 = catalog) === null || _catalog2 === void 0 ? void 0 : _catalog2.guid
2626
+ });
2627
+ case 45:
2628
+ articles = _context10.sent;
2629
+ dispatch({
2630
+ type: 'update',
2631
+ payload: [{
2632
+ field: 'articles',
2633
+ value: articles
2634
+ }, {
2635
+ field: 'currentCatalogCodex',
2636
+ value: catalogCodex
2637
+ }, {
2638
+ field: 'currentAccountLoginId',
2639
+ value: accountSessionId
2640
+ }, {
2641
+ field: 'currentAccountId',
2642
+ value: accountId
2643
+ }]
2644
+ });
2645
+ return _context10.abrupt("return", processData(_objectSpread$C(_objectSpread$C({}, props), {}, {
2646
+ data: articles || []
2647
+ })));
2648
+ case 50:
2224
2649
  if (!(catalogCodex && accountSessionId && (!articles || articles.length == 0 || articles[0].catalogCodex != catalogCodex))) {
2225
- _context9.next = 24;
2650
+ _context10.next = 55;
2226
2651
  break;
2227
2652
  }
2228
- _context9.next = 22;
2653
+ _context10.next = 53;
2229
2654
  return apiLoadArticles({
2230
2655
  serverUrlAPI: state.firstLoginApiUrl,
2231
2656
  catalogCodex: catalogCodex,
2232
2657
  accountSessionId: accountSessionId,
2233
2658
  lang: i18n.language
2234
2659
  });
2235
- case 22:
2236
- articles = _context9.sent;
2660
+ case 53:
2661
+ articles = _context10.sent;
2237
2662
  dispatch({
2238
2663
  type: 'update',
2239
2664
  payload: [{
@@ -2250,18 +2675,18 @@ function useSellerStateData(_ref) {
2250
2675
  value: accountId
2251
2676
  }]
2252
2677
  });
2253
- case 24:
2254
- return _context9.abrupt("return", processData(_objectSpread$B(_objectSpread$B({}, props), {}, {
2678
+ case 55:
2679
+ return _context10.abrupt("return", processData(_objectSpread$C(_objectSpread$C({}, props), {}, {
2255
2680
  data: articles || []
2256
2681
  })));
2257
- case 27:
2258
- return _context9.abrupt("return", {
2682
+ case 58:
2683
+ return _context10.abrupt("return", {
2259
2684
  data: [],
2260
2685
  total: 0
2261
2686
  });
2262
- case 28:
2687
+ case 59:
2263
2688
  case "end":
2264
- return _context9.stop();
2689
+ return _context10.stop();
2265
2690
  }
2266
2691
  }, _callee9);
2267
2692
  }));
@@ -2309,8 +2734,8 @@ function useSellerStateData(_ref) {
2309
2734
  }
2310
2735
 
2311
2736
  var _excluded$9 = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "setManualCustomDataFields", "resetState", "resetForCache"];
2312
- 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; }
2313
- 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; }
2737
+ 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; }
2738
+ 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; }
2314
2739
  var LOG$8 = getLogger('Seller', 'SellerStateProvider');
2315
2740
  var SellerStateProvider = function SellerStateProvider(_ref) {
2316
2741
  var children = _ref.children,
@@ -2634,7 +3059,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2634
3059
  case 37:
2635
3060
  _context3.prev = 37;
2636
3061
  _context3.t0 = _context3["catch"](0);
2637
- LOG$8.error(new DivaError('Could not open divaNr', {
3062
+ LOG$8.error(new DivaError$1('Could not open divaNr', {
2638
3063
  cause: _context3.t0,
2639
3064
  code: 'SELLER_0001'
2640
3065
  }));
@@ -2666,16 +3091,25 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2666
3091
  }();
2667
3092
  var openPlanner = /*#__PURE__*/function () {
2668
3093
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
2669
- var catalogCodex, articleCodexes, forceReload, accountSessionGuid, accountId, retailArticleNr, setId, divaNr, productId, basketData, returnTo, productName, params, internal, _state$basketState4, _params2, _internal2, orderSet, _params3, _basketData$OrderSets, _basketData$OrderSets2;
3094
+ var _state$collections, _state$catalogData;
3095
+ var catalogCodex, articleCodexes, forceReload, accountSessionGuid, accountId, retailArticleNr, setId, divaNr, productId, basketData, returnTo, productName, coll, isIDMData, serieId, params, internal, _state$basketState4, _params2, _internal2, orderSet, _params3, _basketData$OrderSets, _basketData$OrderSets2;
2670
3096
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
2671
3097
  while (1) switch (_context4.prev = _context4.next) {
2672
3098
  case 0:
2673
3099
  catalogCodex = _ref4.catalogCodex, articleCodexes = _ref4.articleCodexes, forceReload = _ref4.forceReload, accountSessionGuid = _ref4.accountSessionGuid, accountId = _ref4.accountId, retailArticleNr = _ref4.retailArticleNr, setId = _ref4.setId, divaNr = _ref4.divaNr, productId = _ref4.productId, basketData = _ref4.basketData, returnTo = _ref4.returnTo, productName = _ref4.productName;
2674
- if (!(catalogCodex && (accountSessionGuid && accountId || organization.parentType === 'SUPPLIER') && returnTo === 'SETPLANNER_OPEN_SELLER_BASKET' && basketData)) {
2675
- _context4.next = 8;
3100
+ coll = (_state$collections = state.collections) === null || _state$collections === void 0 ? void 0 : _state$collections.find(function (c) {
3101
+ var _state$currentCollect;
3102
+ return c.id == ((_state$currentCollect = state.currentCollectionId) !== null && _state$currentCollect !== void 0 ? _state$currentCollect : accountId);
3103
+ });
3104
+ isIDMData = (coll === null || coll === void 0 ? void 0 : coll.type) == 'ENRICHER_PACKAGE';
3105
+ serieId = isIDMData ? (_state$catalogData = state.catalogData) === null || _state$catalogData === void 0 || (_state$catalogData = _state$catalogData.find(function (c) {
3106
+ return c.codex == state.currentCatalogCodex;
3107
+ })) === null || _state$catalogData === void 0 ? void 0 : _state$catalogData.guid : undefined;
3108
+ if (!(catalogCodex && (accountSessionGuid && accountId || isIDMData || organization.parentType === 'SUPPLIER') && returnTo === 'SETPLANNER_OPEN_SELLER_BASKET' && basketData)) {
3109
+ _context4.next = 11;
2676
3110
  break;
2677
3111
  }
2678
- params = _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({
3112
+ params = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({
2679
3113
  catalogCodex: catalogCodex
2680
3114
  }, accountId ? {
2681
3115
  accountId: accountId
@@ -2687,16 +3121,20 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2687
3121
  productName: productName
2688
3122
  } : {}), articleCodexes ? {
2689
3123
  articleCodexes: articleCodexes
3124
+ } : {}), isIDMData ? {
3125
+ isIDMData: '1'
3126
+ } : {}), serieId ? {
3127
+ serieId: serieId
2690
3128
  } : {}), retailArticleNr ? {
2691
3129
  retailArticleNr: retailArticleNr
2692
3130
  } : {});
2693
- internal = _objectSpread$A(_objectSpread$A({}, forceReload ? {
3131
+ internal = _objectSpread$B(_objectSpread$B({}, forceReload ? {
2694
3132
  forceReload: forceReload
2695
3133
  } : {}), {}, {
2696
3134
  accountSessionGuid: accountSessionGuid,
2697
3135
  basketData: basketData
2698
3136
  });
2699
- setPlannerParams(_objectSpread$A(_objectSpread$A({}, params), {}, {
3137
+ setPlannerParams(_objectSpread$B(_objectSpread$B({}, params), {}, {
2700
3138
  internal: internal
2701
3139
  }));
2702
3140
  openComponent({
@@ -2704,18 +3142,18 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2704
3142
  parameters: params,
2705
3143
  internal: internal
2706
3144
  });
2707
- _context4.next = 23;
3145
+ _context4.next = 26;
2708
3146
  break;
2709
- case 8:
2710
- if (!(catalogCodex && (accountSessionGuid && accountId || organization.parentType === 'SUPPLIER') && returnTo || productId)) {
2711
- _context4.next = 12;
3147
+ case 11:
3148
+ if (!(catalogCodex && (accountSessionGuid && accountId || isIDMData || organization.parentType === 'SUPPLIER') && returnTo || productId)) {
3149
+ _context4.next = 15;
2712
3150
  break;
2713
3151
  }
2714
3152
  if ((_state$basketState4 = state.basketState) !== null && _state$basketState4 !== void 0 && _state$basketState4.basket && state.currentDivaNr) {
2715
3153
  //if a basket already exists ask if the user wants to add the new planning to the existing Basket
2716
3154
  //if originProductId is set, always create new planning
2717
3155
  if (state.originProductId) {
2718
- prepareNewPlanning(catalogCodex, accountId, productId, productName, articleCodexes, retailArticleNr, accountSessionGuid, forceReload, returnTo);
3156
+ prepareNewPlanning(catalogCodex, accountId, productId, productName, articleCodexes, isIDMData, serieId, retailArticleNr, accountSessionGuid, forceReload, returnTo);
2719
3157
  } else {
2720
3158
  openModal({
2721
3159
  title: t('modals.add_to_order'),
@@ -2728,7 +3166,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2728
3166
  updateBasketState({
2729
3167
  concat: true
2730
3168
  });
2731
- var _params = _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, catalogCodex ? {
3169
+ var _params = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, catalogCodex ? {
2732
3170
  catalogCodex: catalogCodex
2733
3171
  } : {}), accountId ? {
2734
3172
  accountId: accountId
@@ -2740,17 +3178,19 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2740
3178
  productName: productName
2741
3179
  } : {}), articleCodexes ? {
2742
3180
  articleCodexes: articleCodexes
3181
+ } : {}), isIDMData ? {
3182
+ isIDMData: '1'
2743
3183
  } : {}), retailArticleNr ? {
2744
3184
  retailArticleNr: retailArticleNr
2745
3185
  } : {}), productId ? {
2746
3186
  productId: productId
2747
3187
  } : {});
2748
- var _internal = _objectSpread$A(_objectSpread$A({}, forceReload ? {
3188
+ var _internal = _objectSpread$B(_objectSpread$B({}, forceReload ? {
2749
3189
  forceReload: forceReload
2750
3190
  } : {}), {}, {
2751
3191
  accountSessionGuid: accountSessionGuid
2752
3192
  });
2753
- setPlannerParams(_objectSpread$A(_objectSpread$A({}, _params), {}, {
3193
+ setPlannerParams(_objectSpread$B(_objectSpread$B({}, _params), {}, {
2754
3194
  internal: _internal
2755
3195
  }));
2756
3196
  openComponent({
@@ -2765,6 +3205,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2765
3205
  askSavePlanning('toPlanner', state.currentDivaNr, {
2766
3206
  catalogCodex: catalogCodex,
2767
3207
  articleCodexes: articleCodexes,
3208
+ isIDMData: isIDMData,
2768
3209
  forceReload: forceReload,
2769
3210
  accountId: accountId,
2770
3211
  accountSessionGuid: accountSessionGuid,
@@ -2776,14 +3217,14 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2776
3217
  returnTo: returnTo
2777
3218
  });
2778
3219
  } else {
2779
- prepareNewPlanning(catalogCodex, accountId, productId, productName, articleCodexes, retailArticleNr, accountSessionGuid, forceReload, returnTo);
3220
+ prepareNewPlanning(catalogCodex, accountId, productId, productName, articleCodexes, isIDMData, serieId, retailArticleNr, accountSessionGuid, forceReload, returnTo);
2780
3221
  }
2781
3222
  }
2782
3223
  }
2783
3224
  });
2784
3225
  }
2785
3226
  } else {
2786
- _params2 = _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, catalogCodex ? {
3227
+ _params2 = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, catalogCodex ? {
2787
3228
  catalogCodex: catalogCodex
2788
3229
  } : {}), accountId ? {
2789
3230
  accountId: accountId
@@ -2795,15 +3236,19 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2795
3236
  productName: productName
2796
3237
  } : {}), articleCodexes ? {
2797
3238
  articleCodexes: articleCodexes
3239
+ } : {}), isIDMData ? {
3240
+ isIDMData: '1'
3241
+ } : {}), serieId ? {
3242
+ serieId: serieId
2798
3243
  } : {}), retailArticleNr ? {
2799
3244
  retailArticleNr: retailArticleNr
2800
3245
  } : {});
2801
- _internal2 = _objectSpread$A(_objectSpread$A({}, forceReload ? {
3246
+ _internal2 = _objectSpread$B(_objectSpread$B({}, forceReload ? {
2802
3247
  forceReload: forceReload
2803
3248
  } : {}), {}, {
2804
3249
  accountSessionGuid: accountSessionGuid
2805
3250
  });
2806
- setPlannerParams(_objectSpread$A(_objectSpread$A({}, _params2), {}, {
3251
+ setPlannerParams(_objectSpread$B(_objectSpread$B({}, _params2), {}, {
2807
3252
  internal: _internal2
2808
3253
  }));
2809
3254
  openComponent({
@@ -2812,34 +3257,34 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2812
3257
  internal: _internal2
2813
3258
  });
2814
3259
  }
2815
- _context4.next = 23;
3260
+ _context4.next = 26;
2816
3261
  break;
2817
- case 12:
3262
+ case 15:
2818
3263
  if (!(divaNr && basketData && returnTo)) {
2819
- _context4.next = 22;
3264
+ _context4.next = 25;
2820
3265
  break;
2821
3266
  }
2822
3267
  orderSet = basketData.OrderSets.find(function (s) {
2823
3268
  return s.SetID == setId;
2824
3269
  });
2825
3270
  if (!(orderSet && orderSet.CatalogCodex != state.currentCatalogCodex)) {
2826
- _context4.next = 17;
3271
+ _context4.next = 20;
2827
3272
  break;
2828
3273
  }
2829
- _context4.next = 17;
3274
+ _context4.next = 20;
2830
3275
  return stateFunctions.loadCatalogInfo({
2831
3276
  catalogCodex: orderSet.CatalogCodex,
2832
3277
  accountId: orderSet.AccountGUID,
2833
3278
  accountSessionId: accountSessionGuid,
2834
3279
  language: 'de'
2835
3280
  });
2836
- case 17:
3281
+ case 20:
2837
3282
  _params3 = {
2838
3283
  setId: setId,
2839
3284
  divaNr: divaNr,
2840
3285
  returnTo: returnTo
2841
3286
  };
2842
- setPlannerParams(_objectSpread$A(_objectSpread$A({}, _params3), {}, {
3287
+ setPlannerParams(_objectSpread$B(_objectSpread$B({}, _params3), {}, {
2843
3288
  internal: {
2844
3289
  basketData: basketData,
2845
3290
  forceReload: forceReload
@@ -2853,13 +3298,13 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2853
3298
  forceReload: forceReload
2854
3299
  }
2855
3300
  });
2856
- _context4.next = 23;
3301
+ _context4.next = 26;
2857
3302
  break;
2858
- case 22:
2859
- LOG$8.error(new DivaError('openPlanner got called with non all required params', {
3303
+ case 25:
3304
+ LOG$8.error(new DivaError$1('openPlanner got called with non all required params', {
2860
3305
  code: 'SELLER_0001'
2861
3306
  }));
2862
- case 23:
3307
+ case 26:
2863
3308
  if (DivaUtils$1.bridge) {
2864
3309
  DivaUtils$1.bridge.sendMessage({
2865
3310
  type: 'ABN',
@@ -2869,7 +3314,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2869
3314
  catalogName: (_basketData$OrderSets2 = basketData === null || basketData === void 0 ? void 0 : basketData.OrderSets[0].CatalogName) !== null && _basketData$OrderSets2 !== void 0 ? _basketData$OrderSets2 : undefined
2870
3315
  });
2871
3316
  }
2872
- case 24:
3317
+ case 27:
2873
3318
  case "end":
2874
3319
  return _context4.stop();
2875
3320
  }
@@ -2879,7 +3324,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2879
3324
  return _ref5.apply(this, arguments);
2880
3325
  };
2881
3326
  }();
2882
- var prepareNewPlanning = function prepareNewPlanning(catalogCodex, accountId, productId, productName, articleCodexes, retailArticleNr, accountSessionGuid, forceReload, returnToParam) {
3327
+ var prepareNewPlanning = function prepareNewPlanning(catalogCodex, accountId, productId, productName, articleCodexes, isIDMData, serieId, retailArticleNr, accountSessionGuid, forceReload, returnToParam) {
2883
3328
  updateBasketState({
2884
3329
  saved: false,
2885
3330
  concat: false,
@@ -2887,7 +3332,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2887
3332
  step: null,
2888
3333
  assignNewDivaNr: false
2889
3334
  });
2890
- var params = _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, catalogCodex ? {
3335
+ var params = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, catalogCodex ? {
2891
3336
  catalogCodex: catalogCodex
2892
3337
  } : {}), accountId ? {
2893
3338
  accountId: accountId
@@ -2899,15 +3344,19 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2899
3344
  productName: productName
2900
3345
  } : {}), articleCodexes ? {
2901
3346
  articleCodexes: articleCodexes
3347
+ } : {}), isIDMData ? {
3348
+ isIDMData: '1'
3349
+ } : {}), serieId ? {
3350
+ serieId: serieId
2902
3351
  } : {}), retailArticleNr ? {
2903
3352
  retailArticleNr: retailArticleNr
2904
3353
  } : {});
2905
- var internal = _objectSpread$A(_objectSpread$A({}, forceReload ? {
3354
+ var internal = _objectSpread$B(_objectSpread$B({}, forceReload ? {
2906
3355
  forceReload: forceReload
2907
3356
  } : {}), {}, {
2908
3357
  accountSessionGuid: accountSessionGuid
2909
3358
  });
2910
- setPlannerParams(_objectSpread$A(_objectSpread$A({}, params), {}, {
3359
+ setPlannerParams(_objectSpread$B(_objectSpread$B({}, params), {}, {
2911
3360
  internal: internal
2912
3361
  }));
2913
3362
  openComponent({
@@ -2956,7 +3405,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2956
3405
  case 'toPlanner':
2957
3406
  {
2958
3407
  if (plannerParams) {
2959
- var params = _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, plannerParams.catalogCodex ? {
3408
+ var params = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, plannerParams.catalogCodex ? {
2960
3409
  catalogCodex: plannerParams.catalogCodex
2961
3410
  } : {}), plannerParams.accountId ? {
2962
3411
  accountId: plannerParams.accountId
@@ -2964,17 +3413,21 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
2964
3413
  returnTo: plannerParams.returnTo
2965
3414
  } : {}), plannerParams.articleCodexes ? {
2966
3415
  articleCodexes: plannerParams.articleCodexes
3416
+ } : {}), plannerParams.isIDMData ? {
3417
+ isIDMData: '1'
3418
+ } : {}), plannerParams.serieId ? {
3419
+ serieId: plannerParams.serieId
2967
3420
  } : {}), plannerParams.productId ? {
2968
3421
  productId: plannerParams.productId
2969
3422
  } : {}), plannerParams.retailArticleNr ? {
2970
3423
  retailArticleNr: plannerParams.retailArticleNr
2971
3424
  } : {});
2972
- var internal = _objectSpread$A(_objectSpread$A({}, plannerParams.forceReload ? {
3425
+ var internal = _objectSpread$B(_objectSpread$B({}, plannerParams.forceReload ? {
2973
3426
  forceReload: plannerParams.forceReload
2974
3427
  } : {}), {}, {
2975
3428
  accountSessionGuid: plannerParams.accountSessionGuid
2976
3429
  });
2977
- setPlannerParams(_objectSpread$A(_objectSpread$A({}, params), {}, {
3430
+ setPlannerParams(_objectSpread$B(_objectSpread$B({}, params), {}, {
2978
3431
  internal: internal
2979
3432
  }));
2980
3433
  openComponent({
@@ -3001,8 +3454,8 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
3001
3454
  _context5.next = 2;
3002
3455
  return apiLoadBasket({
3003
3456
  divaNr: divaNr,
3004
- apiConfig: _objectSpread$A(_objectSpread$A({}, apiConfig), {}, {
3005
- api2: _objectSpread$A(_objectSpread$A({}, apiConfig.api2), {}, {
3457
+ apiConfig: _objectSpread$B(_objectSpread$B({}, apiConfig), {}, {
3458
+ api2: _objectSpread$B(_objectSpread$B({}, apiConfig.api2), {}, {
3006
3459
  "default": state.firstLoginApiUrl
3007
3460
  })
3008
3461
  }),
@@ -3095,7 +3548,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
3095
3548
  productCategories: state.productCategories,
3096
3549
  manualCustomDataFields: state.manualCustomDataFields
3097
3550
  },
3098
- actions: _objectSpread$A(_objectSpread$A({}, stateFunctions), {}, {
3551
+ actions: _objectSpread$B(_objectSpread$B({}, stateFunctions), {}, {
3099
3552
  openComponent: openComponent,
3100
3553
  openModal: openModal,
3101
3554
  openPlanner: openPlanner,
@@ -3144,8 +3597,8 @@ var useStyles$3 = makeStyles(function () {
3144
3597
  });
3145
3598
  });
3146
3599
 
3147
- function ownKeys$z(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; }
3148
- function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3600
+ 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; }
3601
+ 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; }
3149
3602
  function Title(_ref) {
3150
3603
  var text = _ref.text,
3151
3604
  children = _ref.children,
@@ -3157,7 +3610,7 @@ function Title(_ref) {
3157
3610
  style: {
3158
3611
  flexGrow: 1
3159
3612
  },
3160
- children: [text, help && /*#__PURE__*/jsx(HelpButton, _objectSpread$z({}, help))]
3613
+ children: [text, help && /*#__PURE__*/jsx(HelpButton, _objectSpread$A({}, help))]
3161
3614
  }), children]
3162
3615
  });
3163
3616
  }
@@ -3174,8 +3627,8 @@ function getImageOrFallbackUrl(url) {
3174
3627
  return url || 'https://cdn.diva-portal.com/static/images/image_placeholder-landscape-short.png';
3175
3628
  }
3176
3629
 
3177
- function ownKeys$y(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; }
3178
- function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3630
+ function ownKeys$z(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; }
3631
+ function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3179
3632
  var LOG$7 = getLogger('SellerCatalogs', 'Catalogs');
3180
3633
  function Catalogs(_ref) {
3181
3634
  var _configurationData$an, _configurationData$ca5, _configurationData$an3, _configurationData$an4;
@@ -3209,7 +3662,7 @@ function Catalogs(_ref) {
3209
3662
  var enableModelAnalytics = !!(configurationData !== null && configurationData !== void 0 && (_configurationData$an = configurationData.analyticsHistogramConfig) !== null && _configurationData$an !== void 0 && _configurationData$an.enableModelAnalytics);
3210
3663
  var load = useCallback(/*#__PURE__*/function () {
3211
3664
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(collectionId) {
3212
- var collections, _configurationData$an2, pastMonths, catalogCodex, analytics;
3665
+ var catalogs, _configurationData$an2, pastMonths, catalogCodex, analytics;
3213
3666
  return _regeneratorRuntime.wrap(function _callee$(_context) {
3214
3667
  while (1) switch (_context.prev = _context.next) {
3215
3668
  case 0:
@@ -3220,14 +3673,14 @@ function Catalogs(_ref) {
3220
3673
  collectionId: collectionId
3221
3674
  });
3222
3675
  case 4:
3223
- collections = _context.sent;
3224
- setData(collections.data);
3676
+ catalogs = _context.sent;
3677
+ setData(catalogs.data);
3225
3678
  if (!(enableModelAnalytics && userHasPermission('analyticsmodel'))) {
3226
3679
  _context.next = 17;
3227
3680
  break;
3228
3681
  }
3229
3682
  pastMonths = configurationData === null || configurationData === void 0 || (_configurationData$an2 = configurationData.analyticsHistogramConfig) === null || _configurationData$an2 === void 0 ? void 0 : _configurationData$an2.pastAnalyticsMonths;
3230
- catalogCodex = collections.data.map(function (catalog) {
3683
+ catalogCodex = catalogs.data.map(function (catalog) {
3231
3684
  return catalog.codex;
3232
3685
  });
3233
3686
  _context.next = 11;
@@ -3240,7 +3693,7 @@ function Catalogs(_ref) {
3240
3693
  analytics = _context.sent;
3241
3694
  _context.t0 = setData;
3242
3695
  _context.next = 15;
3243
- return mergeModelsAndScore(collections, analytics);
3696
+ return mergeModelsAndScore(catalogs, analytics);
3244
3697
  case 15:
3245
3698
  _context.t1 = _context.sent.data;
3246
3699
  (0, _context.t0)(_context.t1);
@@ -3305,7 +3758,7 @@ function Catalogs(_ref) {
3305
3758
  if (configurationData !== null && configurationData !== void 0 && (_configurationData$ca = configurationData.catalogs) !== null && _configurationData$ca !== void 0 && _configurationData$ca.onOpen) {
3306
3759
  action = configurationData === null || configurationData === void 0 || (_configurationData$ca2 = configurationData.catalogs) === null || _configurationData$ca2 === void 0 ? void 0 : _configurationData$ca2.onOpen;
3307
3760
  if (!action.url) {
3308
- action = _objectSpread$y({}, action);
3761
+ action = _objectSpread$z({}, action);
3309
3762
  parameters = {};
3310
3763
  Object.entries(action.parameters || {}).forEach(function (_ref4) {
3311
3764
  var _ref5 = _slicedToArray(_ref4, 2),
@@ -3321,7 +3774,7 @@ function Catalogs(_ref) {
3321
3774
  } else {
3322
3775
  openComponent({
3323
3776
  type: 'SELLER',
3324
- parameters: _objectSpread$y({
3777
+ parameters: _objectSpread$z({
3325
3778
  module: 'Info',
3326
3779
  catalogCodex: item.codex
3327
3780
  }, item.accountId ? {
@@ -3822,6 +4275,9 @@ function Articles(_ref) {
3822
4275
  currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
3823
4276
  sessionGuid = _useSellerState$state.sessionGuid,
3824
4277
  returnTo = _useSellerState$state.returnTo;
4278
+ _useSellerState$state.collections;
4279
+ _useSellerState$state.currentCollectionId;
4280
+ _useSellerState$state.catalogData;
3825
4281
  var _useDivaCore = useDivaCore(),
3826
4282
  organization = _useDivaCore.state.organization;
3827
4283
  useEffect(function () {
@@ -4107,7 +4563,7 @@ function Header$1(_ref) {
4107
4563
  zIndex: 1
4108
4564
  },
4109
4565
  children: /*#__PURE__*/jsxs(Title, {
4110
- text: (actBasketPage === 'Step4' ? 'Marketing' : t('data.' + status)) + ' - Nr. ' + divaNr + '-' + documentVersion,
4566
+ text: (actBasketPage === 'Step4' ? 'Marketing' : t('data.' + status)) + ' - Nr. ' + divaNr + (status !== 'BASE_CONFIGURATION' ? '-' + documentVersion : ''),
4111
4567
  children: [showVKPExportButton && /*#__PURE__*/jsx(Button, {
4112
4568
  color: 'primary',
4113
4569
  variant: 'contained',
@@ -4174,8 +4630,8 @@ function Header(_ref) {
4174
4630
  });
4175
4631
  }
4176
4632
 
4177
- function ownKeys$x(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; }
4178
- function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4633
+ function ownKeys$y(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; }
4634
+ function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4179
4635
  function MenuListComposition(_ref) {
4180
4636
  var setId = _ref.setId,
4181
4637
  visibile = _ref.visibile,
@@ -4258,7 +4714,7 @@ function MenuListComposition(_ref) {
4258
4714
  children: function children(_ref2) {
4259
4715
  var TransitionProps = _ref2.TransitionProps,
4260
4716
  placement = _ref2.placement;
4261
- return /*#__PURE__*/jsx(Grow, _objectSpread$x(_objectSpread$x({}, TransitionProps), {}, {
4717
+ return /*#__PURE__*/jsx(Grow, _objectSpread$y(_objectSpread$y({}, TransitionProps), {}, {
4262
4718
  style: {
4263
4719
  transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
4264
4720
  },
@@ -4338,8 +4794,8 @@ function Images(_ref) {
4338
4794
  });
4339
4795
  }
4340
4796
 
4341
- function ownKeys$w(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; }
4342
- function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4797
+ function ownKeys$x(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; }
4798
+ function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4343
4799
  var OpvImage = function OpvImage(_ref) {
4344
4800
  var src = _ref.src;
4345
4801
  var _useHover = useHover({
@@ -4357,15 +4813,15 @@ var OpvImage = function OpvImage(_ref) {
4357
4813
  layerProps = _useLayer.layerProps,
4358
4814
  triggerProps = _useLayer.triggerProps;
4359
4815
  return /*#__PURE__*/jsxs(Fragment, {
4360
- children: [/*#__PURE__*/jsx("img", _objectSpread$w(_objectSpread$w(_objectSpread$w({}, triggerProps), hoverProps), {}, {
4816
+ children: [/*#__PURE__*/jsx("img", _objectSpread$x(_objectSpread$x(_objectSpread$x({}, triggerProps), hoverProps), {}, {
4361
4817
  src: src,
4362
4818
  style: {
4363
4819
  width: '20px'
4364
4820
  }
4365
- })), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$w(_objectSpread$w({
4821
+ })), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$x(_objectSpread$x({
4366
4822
  src: src.replace('_gal.', '.')
4367
4823
  }, layerProps), {}, {
4368
- style: _objectSpread$w({
4824
+ style: _objectSpread$x({
4369
4825
  width: '300px'
4370
4826
  }, layerProps.style)
4371
4827
  }))))]
@@ -4775,8 +5231,8 @@ function Set$1(_ref) {
4775
5231
  }
4776
5232
 
4777
5233
  var _excluded$8 = ["onValueChange", "value"];
4778
- function ownKeys$v(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; }
4779
- function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5234
+ function ownKeys$w(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; }
5235
+ function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4780
5236
  function DiscountField (_ref) {
4781
5237
  var _ref2;
4782
5238
  var updateDiscount = _ref.updateDiscount,
@@ -4864,7 +5320,7 @@ function ControlledNumberFormat$1(_ref3) {
4864
5320
  useEffect(function () {
4865
5321
  setValue(origValue);
4866
5322
  }, [origValue]);
4867
- return /*#__PURE__*/jsx(NumericFormat, _objectSpread$v(_objectSpread$v({}, props), {}, {
5323
+ return /*#__PURE__*/jsx(NumericFormat, _objectSpread$w(_objectSpread$w({}, props), {}, {
4868
5324
  placeholder: props.suffix,
4869
5325
  value: value === 0 ? undefined : value,
4870
5326
  customInput: StyledTextFiled$1,
@@ -4889,8 +5345,8 @@ var StyledTextFiled$1 = withStyles({
4889
5345
  })(TextField);
4890
5346
 
4891
5347
  var _excluded$7 = ["onValueChange", "value"];
4892
- function ownKeys$u(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; }
4893
- function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5348
+ function ownKeys$v(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; }
5349
+ function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4894
5350
  function AdditionalPriceField (_ref) {
4895
5351
  var updatePrice = _ref.updatePrice,
4896
5352
  price = _ref.price,
@@ -4971,7 +5427,7 @@ function ControlledNumberFormat(_ref2) {
4971
5427
  useEffect(function () {
4972
5428
  setValue(origValue);
4973
5429
  }, [origValue]);
4974
- return /*#__PURE__*/jsx(NumericFormat, _objectSpread$u(_objectSpread$u({}, props), {}, {
5430
+ return /*#__PURE__*/jsx(NumericFormat, _objectSpread$v(_objectSpread$v({}, props), {}, {
4975
5431
  placeholder: '0 ' + DivaUtils$1.defaultPriceFormat.currency,
4976
5432
  value: value,
4977
5433
  customInput: StyledTextFiled,
@@ -6193,8 +6649,8 @@ function InfoAlert(_ref2) {
6193
6649
  });
6194
6650
  }
6195
6651
 
6196
- function ownKeys$t(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; }
6197
- function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6652
+ function ownKeys$u(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; }
6653
+ function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6198
6654
  function CheckOut(_ref) {
6199
6655
  var _basket$Client;
6200
6656
  var schema = _ref.schema,
@@ -6295,7 +6751,7 @@ function CheckOut(_ref) {
6295
6751
  };
6296
6752
 
6297
6753
  // for LEAFLET don't show printOptions, if there are any configured.
6298
- var finalSchema = _objectSpread$t(_objectSpread$t({}, uiSchema), {}, {
6754
+ var finalSchema = _objectSpread$u(_objectSpread$u({}, uiSchema), {}, {
6299
6755
  elements: _toConsumableArray(uiSchema.elements)
6300
6756
  });
6301
6757
  if (status == 'LEAFLET') {
@@ -6407,12 +6863,12 @@ function isEmpty(data) {
6407
6863
  });
6408
6864
  }
6409
6865
 
6410
- function ownKeys$s(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; }
6411
- function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6866
+ function ownKeys$t(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; }
6867
+ function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6412
6868
  var schema = function schema(hideWWSButton) {
6413
6869
  return {
6414
6870
  type: 'object',
6415
- properties: _objectSpread$s(_objectSpread$s({
6871
+ properties: _objectSpread$t(_objectSpread$t({
6416
6872
  Salesperson: {
6417
6873
  type: 'string',
6418
6874
  title: 'basket.checkout.form.seller'
@@ -6466,6 +6922,10 @@ var schema = function schema(hideWWSButton) {
6466
6922
  type: 'boolean',
6467
6923
  title: 'basket.checkout.form.allPrices'
6468
6924
  },
6925
+ OpvCodices: {
6926
+ type: 'boolean',
6927
+ title: 'basket.checkout.form.opvCodices'
6928
+ },
6469
6929
  CollectionLogo: {
6470
6930
  type: 'boolean',
6471
6931
  title: 'basket.checkout.form.logo'
@@ -6605,6 +7065,9 @@ var uiSchema = function uiSchema(hideWWSButton, enableSellerInfos) {
6605
7065
  }, {
6606
7066
  type: 'Control',
6607
7067
  scope: '#/properties/PrintOptions/properties/Prices'
7068
+ }, {
7069
+ type: 'Control',
7070
+ scope: '#/properties/PrintOptions/properties/OpvCodices'
6608
7071
  }]
6609
7072
  }, {
6610
7073
  type: 'VerticalLayout',
@@ -6747,8 +7210,8 @@ function Step4Checkout(_ref) {
6747
7210
  });
6748
7211
  }
6749
7212
 
6750
- function ownKeys$r(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; }
6751
- function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7213
+ function ownKeys$s(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; }
7214
+ function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6752
7215
  function useProduct(basket) {
6753
7216
  var _useState = useState(false),
6754
7217
  _useState2 = _slicedToArray(_useState, 2),
@@ -6811,7 +7274,7 @@ function useProduct(basket) {
6811
7274
  });
6812
7275
  case 2:
6813
7276
  myProduct = _context2.sent;
6814
- setCurrentProduct(_objectSpread$r(_objectSpread$r({}, myProduct.baseData), {}, {
7277
+ setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myProduct.baseData), {}, {
6815
7278
  parent: (_myProduct$baseData$p = myProduct.baseData.parent) !== null && _myProduct$baseData$p !== void 0 ? _myProduct$baseData$p : myProduct.baseData._id
6816
7279
  }));
6817
7280
  case 4:
@@ -6843,7 +7306,7 @@ function useProduct(basket) {
6843
7306
  });
6844
7307
  case 5:
6845
7308
  myproduct = _context3.sent;
6846
- setCurrentProduct(_objectSpread$r(_objectSpread$r({}, myproduct[0]), {}, {
7309
+ setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myproduct[0]), {}, {
6847
7310
  parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
6848
7311
  }));
6849
7312
  if (!favourite) {
@@ -6871,7 +7334,7 @@ function useProduct(basket) {
6871
7334
  };
6872
7335
  }();
6873
7336
  var updateProductData = function updateProductData(product) {
6874
- setCurrentProduct(_objectSpread$r({}, product));
7337
+ setCurrentProduct(_objectSpread$s({}, product));
6875
7338
  };
6876
7339
  var resetProductSaved = function resetProductSaved() {
6877
7340
  setCurrentProduct(undefined);
@@ -6887,8 +7350,8 @@ function useProduct(basket) {
6887
7350
  };
6888
7351
  }
6889
7352
 
6890
- function ownKeys$q(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; }
6891
- function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7353
+ function ownKeys$r(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; }
7354
+ function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6892
7355
  var LOG$4 = getLogger('SellerBasket', 'Basket');
6893
7356
  function Basket(_ref) {
6894
7357
  var _currentProduct$divaN, _configurationData$Ch5, _currentBasket$OrderS5;
@@ -7286,7 +7749,7 @@ function Basket(_ref) {
7286
7749
  var _currentBasket$OrderS2, _currentBasket$OrderS3, _currentBasket$OrderS4;
7287
7750
  openComponent({
7288
7751
  type: 'SELLER',
7289
- parameters: _objectSpread$q({
7752
+ parameters: _objectSpread$r({
7290
7753
  module: 'Info',
7291
7754
  catalogCodex: currentBasket === null || currentBasket === void 0 || (_currentBasket$OrderS2 = currentBasket.OrderSets[0]) === null || _currentBasket$OrderS2 === void 0 ? void 0 : _currentBasket$OrderS2.CatalogCodex
7292
7755
  }, currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS3 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS3 !== void 0 && _currentBasket$OrderS3.AccountGUID ? {
@@ -7384,8 +7847,8 @@ var css_248z$a = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\
7384
7847
  styleInject(css_248z$a);
7385
7848
 
7386
7849
  var _excluded$6 = ["data", "text"];
7387
- function ownKeys$p(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; }
7388
- function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7850
+ function ownKeys$q(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; }
7851
+ function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7389
7852
  function Description$1 (_ref) {
7390
7853
  var data = _ref.data,
7391
7854
  text = _ref.text,
@@ -7397,7 +7860,7 @@ function Description$1 (_ref) {
7397
7860
  _useState2 = _slicedToArray(_useState, 2),
7398
7861
  isHidden = _useState2[0],
7399
7862
  setIsHidden = _useState2[1];
7400
- return /*#__PURE__*/jsxs("div", _objectSpread$p(_objectSpread$p({}, props), {}, {
7863
+ return /*#__PURE__*/jsxs("div", _objectSpread$q(_objectSpread$q({}, props), {}, {
7401
7864
  className: classnames(wrapper$6, isHidden ? hidden : undefined, props.className),
7402
7865
  children: [/*#__PURE__*/jsxs("div", {
7403
7866
  className: title$2,
@@ -7440,10 +7903,10 @@ var icon$1 = "icon-0h-39";
7440
7903
  var css_248z$9 = ".container-Sr3pC {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n padding: 8px;\n flex-wrap: wrap;\n}\n.container-Sr3pC .MuiButton-root {\n height: 45px;\n}\n\n.icon-only-2SJ6e span {\n margin-right: 2px;\n}\n\n.icon-0h-39 {\n width: 24px;\n height: 24px;\n}\n";
7441
7904
  styleInject(css_248z$9);
7442
7905
 
7443
- function ownKeys$o(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; }
7444
- function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7906
+ function ownKeys$p(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; }
7907
+ function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7445
7908
  function ArticleSvg (props) {
7446
- return /*#__PURE__*/jsx("svg", _objectSpread$o(_objectSpread$o({}, props), {}, {
7909
+ return /*#__PURE__*/jsx("svg", _objectSpread$p(_objectSpread$p({}, props), {}, {
7447
7910
  xmlns: "http://www.w3.org/2000/svg",
7448
7911
  viewBox: "0 0 24 24",
7449
7912
  children: /*#__PURE__*/jsx("path", {
@@ -7453,10 +7916,10 @@ function ArticleSvg (props) {
7453
7916
  }));
7454
7917
  }
7455
7918
 
7456
- function ownKeys$n(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; }
7457
- function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7919
+ function ownKeys$o(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; }
7920
+ function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7458
7921
  function EmptyPlanningSvg (props) {
7459
- return /*#__PURE__*/jsx("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
7922
+ return /*#__PURE__*/jsx("svg", _objectSpread$o(_objectSpread$o({}, props), {}, {
7460
7923
  viewBox: "0 0 24 24",
7461
7924
  fill: "none",
7462
7925
  xmlns: "http://www.w3.org/2000/svg",
@@ -7467,10 +7930,10 @@ function EmptyPlanningSvg (props) {
7467
7930
  }));
7468
7931
  }
7469
7932
 
7470
- function ownKeys$m(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; }
7471
- function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7933
+ function ownKeys$n(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; }
7934
+ function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7472
7935
  function VarinatPlanningSvg (props) {
7473
- return /*#__PURE__*/jsx("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
7936
+ return /*#__PURE__*/jsx("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
7474
7937
  viewBox: "0 0 24 24",
7475
7938
  fill: "none",
7476
7939
  xmlns: "http://www.w3.org/2000/svg",
@@ -7484,10 +7947,10 @@ function VarinatPlanningSvg (props) {
7484
7947
  }));
7485
7948
  }
7486
7949
 
7487
- function ownKeys$l(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; }
7488
- function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7950
+ function ownKeys$m(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; }
7951
+ function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7489
7952
  function NavBackSvg (props) {
7490
- return /*#__PURE__*/jsx("svg", _objectSpread$l(_objectSpread$l({}, props), {}, {
7953
+ return /*#__PURE__*/jsx("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
7491
7954
  viewBox: "0 0 10 18",
7492
7955
  fill: "none",
7493
7956
  xmlns: "http://www.w3.org/2000/svg",
@@ -7866,6 +8329,8 @@ function useModelInfoPage (_ref) {
7866
8329
  returnTo = _useSellerState$state.returnTo,
7867
8330
  sessionGuid = _useSellerState$state.sessionGuid,
7868
8331
  originProductId = _useSellerState$state.originProductId;
8332
+ _useSellerState$state.collections;
8333
+ _useSellerState$state.currentCollectionId;
7869
8334
  var _useDivaCore = useDivaCore(),
7870
8335
  organization = _useDivaCore.state.organization,
7871
8336
  _useDivaCore$actions = _useDivaCore.actions,
@@ -7974,7 +8439,7 @@ function useModelInfoPage (_ref) {
7974
8439
  load();
7975
8440
  }, [accountId, catalogCodex, i18n.language, sessionGuid]);
7976
8441
  var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
7977
- if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
8442
+ if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER' || catalogData !== null && catalogData !== void 0 && catalogData.isIDMData) {
7978
8443
  var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
7979
8444
  if (checkDoReturnToProductCreator(plannerReturn, returnTo)) {
7980
8445
  plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
@@ -7988,11 +8453,11 @@ function useModelInfoPage (_ref) {
7988
8453
  returnTo: plannerReturn
7989
8454
  });
7990
8455
  } else {
7991
- LOG$3.error(new DivaError('Missing account login ID', {
8456
+ LOG$3.error(new DivaError$1('Missing account login ID', {
7992
8457
  code: 'SELLER_0001'
7993
8458
  }));
7994
8459
  }
7995
- }, [currentAccountLoginId, organization.parentType, accountId, catalogCodex, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo, currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket]);
8460
+ }, [currentAccountLoginId, organization.parentType, accountId, catalogData, catalogCodex, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo, currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket]);
7996
8461
  var onOpenArticles = useCallback(function () {
7997
8462
  if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
7998
8463
  openComponent({
@@ -8004,7 +8469,7 @@ function useModelInfoPage (_ref) {
8004
8469
  }
8005
8470
  });
8006
8471
  } else {
8007
- LOG$3.error(new DivaError('Missing account ID or catalog', {
8472
+ LOG$3.error(new DivaError$1('Missing account ID or catalog', {
8008
8473
  code: 'SELLER_0001'
8009
8474
  }));
8010
8475
  }
@@ -8027,7 +8492,7 @@ function useModelInfoPage (_ref) {
8027
8492
  }
8028
8493
  });
8029
8494
  } else {
8030
- LOG$3.error(new DivaError('Missing account ID or catalog', {
8495
+ LOG$3.error(new DivaError$1('Missing account ID or catalog', {
8031
8496
  code: 'SELLER_0001'
8032
8497
  }));
8033
8498
  }
@@ -8041,7 +8506,7 @@ function useModelInfoPage (_ref) {
8041
8506
  return onNavigateBack();
8042
8507
  }
8043
8508
  };
8044
- if ((!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && catalogData !== null && catalogData !== void 0 && catalogData.hasPlanner) {
8509
+ if ((!!currentAccountLoginId || organization.parentType === 'SUPPLIER' || catalogData !== null && catalogData !== void 0 && catalogData.isIDMData) && !!catalogCodex && catalogData !== null && catalogData !== void 0 && catalogData.hasPlanner) {
8045
8510
  buttons.planner = function () {
8046
8511
  return onOpenPlanner(currentAccountLoginId);
8047
8512
  };
@@ -8066,8 +8531,8 @@ function checkDoReturnToProductCreator(plannerReturn, returnTo) {
8066
8531
  return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
8067
8532
  }
8068
8533
 
8069
- function ownKeys$k(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; }
8070
- function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8534
+ function ownKeys$l(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; }
8535
+ function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8071
8536
  function Info(props) {
8072
8537
  var _useModelInfoPage = useModelInfoPage(props),
8073
8538
  loading = _useModelInfoPage.loading,
@@ -8103,14 +8568,14 @@ function Info(props) {
8103
8568
  }), /*#__PURE__*/jsx("div", {
8104
8569
  className: footer,
8105
8570
  id: "diva-seller-info-navbar",
8106
- children: /*#__PURE__*/jsx(NavBar, _objectSpread$k({}, navButtons))
8571
+ children: /*#__PURE__*/jsx(NavBar, _objectSpread$l({}, navButtons))
8107
8572
  })]
8108
8573
  })
8109
8574
  });
8110
8575
  }
8111
8576
 
8112
- function ownKeys$j(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; }
8113
- function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8577
+ function ownKeys$k(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; }
8578
+ function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8114
8579
  function Priceedit (_ref) {
8115
8580
  var _productData$calculat2, _productData$addedPri2;
8116
8581
  var productData = _ref.productData,
@@ -8139,13 +8604,13 @@ function Priceedit (_ref) {
8139
8604
  percentageDiscount: discount.percentageDiscount,
8140
8605
  calcDiscountPrice: formatTwoDecimals(price)
8141
8606
  });
8142
- update(_objectSpread$j(_objectSpread$j({}, productData), {}, {
8607
+ update(_objectSpread$k(_objectSpread$k({}, productData), {}, {
8143
8608
  addedPrice: value,
8144
8609
  percentageDiscount: discount.percentageDiscount,
8145
8610
  discountedPrice: formatTwoDecimals(price)
8146
8611
  }));
8147
8612
  } else {
8148
- update(_objectSpread$j(_objectSpread$j({}, productData), {}, {
8613
+ update(_objectSpread$k(_objectSpread$k({}, productData), {}, {
8149
8614
  addedPrice: value
8150
8615
  }));
8151
8616
  }
@@ -8159,22 +8624,22 @@ function Priceedit (_ref) {
8159
8624
  var price = (_productData$addedPri = productData.addedPrice) !== null && _productData$addedPri !== void 0 ? _productData$addedPri : 0;
8160
8625
  if (isPercentage) {
8161
8626
  if (discount.percentageDiscount == 0 || discount.percentageDiscount == undefined) {
8162
- discount = _objectSpread$j(_objectSpread$j({}, discount), {}, {
8627
+ discount = _objectSpread$k(_objectSpread$k({}, discount), {}, {
8163
8628
  calcDiscountPrice: ''
8164
8629
  });
8165
8630
  } else {
8166
8631
  var discountPrice = (discount.percentageDiscount || 0) / 100 * price;
8167
- discount = _objectSpread$j(_objectSpread$j({}, discount), {}, {
8632
+ discount = _objectSpread$k(_objectSpread$k({}, discount), {}, {
8168
8633
  calcDiscountPrice: formatTwoDecimals(price - discountPrice)
8169
8634
  });
8170
8635
  }
8171
8636
  } else {
8172
- discount = _objectSpread$j(_objectSpread$j({}, discount), {}, {
8637
+ discount = _objectSpread$k(_objectSpread$k({}, discount), {}, {
8173
8638
  percentageDiscount: formatOneDecimals((price - value || 0) / price * 100)
8174
8639
  });
8175
8640
  }
8176
8641
  setDiscount(discount);
8177
- update(_objectSpread$j(_objectSpread$j({}, productData), {}, {
8642
+ update(_objectSpread$k(_objectSpread$k({}, productData), {}, {
8178
8643
  discountedPrice: isPercentage ? discount.calcDiscountPrice ? formatTwoDecimals(discount.calcDiscountPrice) : undefined : value,
8179
8644
  percentageDiscount: discount.percentageDiscount > 0 ? discount.percentageDiscount : undefined
8180
8645
  }));
@@ -8280,8 +8745,8 @@ function getLabel(value, i18n) {
8280
8745
  return value.value + valueText;
8281
8746
  }
8282
8747
 
8283
- function ownKeys$i(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; }
8284
- function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8748
+ function ownKeys$j(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; }
8749
+ function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8285
8750
  function Autocomplete (_ref) {
8286
8751
  var options = _ref.options,
8287
8752
  label = _ref.label,
@@ -8348,9 +8813,9 @@ function Autocomplete (_ref) {
8348
8813
  setInputValue(newInputValue);
8349
8814
  },
8350
8815
  renderInput: function renderInput(params) {
8351
- return /*#__PURE__*/jsx(TextField$1, _objectSpread$i(_objectSpread$i({}, params), {}, {
8816
+ return /*#__PURE__*/jsx(TextField$1, _objectSpread$j(_objectSpread$j({}, params), {}, {
8352
8817
  label: label ? t(label) : undefined,
8353
- inputProps: _objectSpread$i(_objectSpread$i({}, params.inputProps), {}, {
8818
+ inputProps: _objectSpread$j(_objectSpread$j({}, params.inputProps), {}, {
8354
8819
  maxLength: maxLength
8355
8820
  })
8356
8821
  }));
@@ -8393,8 +8858,8 @@ function toOneOption(value, options) {
8393
8858
  }
8394
8859
  }
8395
8860
 
8396
- function ownKeys$h(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; }
8397
- function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8861
+ function ownKeys$i(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; }
8862
+ function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8398
8863
  function BaseDataFormCategories (_ref) {
8399
8864
  var _categories$livingAre, _categories$livingAre2, _categories$mainCateg, _categories$mainCateg2, _categories$mainCateg3, _categories$mainCateg4, _categories$subCatego, _categories$subCatego2, _categories$subCatego3, _categories$subCatego4, _Object$entries;
8400
8865
  var productData = _ref.productData,
@@ -8472,8 +8937,8 @@ function BaseDataFormCategories (_ref) {
8472
8937
  label: "productcreator.fields.".concat(key, ".name"),
8473
8938
  multiple: value.multi,
8474
8939
  onChange: function onChange(value) {
8475
- return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
8476
- customData: _objectSpread$h(_objectSpread$h({}, productData.customData), {}, _defineProperty({}, key, value))
8940
+ return update(_objectSpread$i(_objectSpread$i({}, productData), {}, {
8941
+ customData: _objectSpread$i(_objectSpread$i({}, productData.customData), {}, _defineProperty({}, key, value))
8477
8942
  }));
8478
8943
  }
8479
8944
  })
@@ -8483,8 +8948,8 @@ function BaseDataFormCategories (_ref) {
8483
8948
  });
8484
8949
  }
8485
8950
 
8486
- function ownKeys$g(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; }
8487
- function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8951
+ function ownKeys$h(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; }
8952
+ function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8488
8953
  function BaseDataFormDeliveryInfo (_ref) {
8489
8954
  var _productData$delivery, _productData$delivery2, _productData$delivery3, _productData$delivery4, _productData$delivery5, _productData$delivery6, _productData$delivery7, _productData$delivery8, _productData$delivery9, _productData$delivery10, _productData$delivery11, _productData$delivery12, _productData$delivery13, _productData$delivery14, _productData$delivery15, _productData$delivery16;
8490
8955
  var productData = _ref.productData,
@@ -8505,8 +8970,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8505
8970
  value: (_productData$delivery = (_productData$delivery2 = productData.delivery) === null || _productData$delivery2 === void 0 ? void 0 : _productData$delivery2.estMaxPackages) !== null && _productData$delivery !== void 0 ? _productData$delivery : '',
8506
8971
  type: "number",
8507
8972
  onChange: function onChange(s) {
8508
- return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8509
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
8973
+ return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
8974
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8510
8975
  estMaxPackages: Number(s.target.value)
8511
8976
  })
8512
8977
  }));
@@ -8524,8 +8989,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8524
8989
  value: (_productData$delivery3 = (_productData$delivery4 = productData.delivery) === null || _productData$delivery4 === void 0 ? void 0 : _productData$delivery4.estMaxPackageWeight) !== null && _productData$delivery3 !== void 0 ? _productData$delivery3 : '',
8525
8990
  type: "number",
8526
8991
  onChange: function onChange(s) {
8527
- return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8528
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
8992
+ return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
8993
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8529
8994
  estMaxPackageWeight: Number(s.target.value)
8530
8995
  })
8531
8996
  }));
@@ -8541,8 +9006,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8541
9006
  value: (_productData$delivery5 = (_productData$delivery6 = productData.delivery) === null || _productData$delivery6 === void 0 ? void 0 : _productData$delivery6.estMaxPackageHeight) !== null && _productData$delivery5 !== void 0 ? _productData$delivery5 : '',
8542
9007
  type: "number",
8543
9008
  onChange: function onChange(s) {
8544
- return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8545
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
9009
+ return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
9010
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8546
9011
  estMaxPackageHeight: Number(s.target.value)
8547
9012
  })
8548
9013
  }));
@@ -8562,8 +9027,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8562
9027
  value: (_productData$delivery7 = (_productData$delivery8 = productData.delivery) === null || _productData$delivery8 === void 0 ? void 0 : _productData$delivery8.estMaxPackageWidth) !== null && _productData$delivery7 !== void 0 ? _productData$delivery7 : '',
8563
9028
  type: "number",
8564
9029
  onChange: function onChange(s) {
8565
- return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8566
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
9030
+ return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
9031
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8567
9032
  estMaxPackageWidth: Number(s.target.value)
8568
9033
  })
8569
9034
  }));
@@ -8579,8 +9044,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8579
9044
  value: (_productData$delivery9 = (_productData$delivery10 = productData.delivery) === null || _productData$delivery10 === void 0 ? void 0 : _productData$delivery10.estMaxPackageDepth) !== null && _productData$delivery9 !== void 0 ? _productData$delivery9 : '',
8580
9045
  type: "number",
8581
9046
  onChange: function onChange(s) {
8582
- return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8583
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
9047
+ return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
9048
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8584
9049
  estMaxPackageDepth: Number(s.target.value)
8585
9050
  })
8586
9051
  }));
@@ -8595,8 +9060,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8595
9060
  value: (_productData$delivery11 = (_productData$delivery12 = productData.delivery) === null || _productData$delivery12 === void 0 ? void 0 : _productData$delivery12.deliveryTime) !== null && _productData$delivery11 !== void 0 ? _productData$delivery11 : '',
8596
9061
  type: "number",
8597
9062
  onChange: function onChange(s) {
8598
- return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8599
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
9063
+ return update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
9064
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8600
9065
  deliveryTime: Number(s.target.value)
8601
9066
  })
8602
9067
  }));
@@ -8622,8 +9087,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8622
9087
  return ((_v$floatValue = v === null || v === void 0 ? void 0 : v.floatValue) !== null && _v$floatValue !== void 0 ? _v$floatValue : 0) >= 0;
8623
9088
  },
8624
9089
  onValueChange: function onValueChange(value) {
8625
- update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8626
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
9090
+ update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
9091
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8627
9092
  deliveryPrice: Number(value.floatValue)
8628
9093
  })
8629
9094
  }));
@@ -8647,8 +9112,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8647
9112
  return ((_v$floatValue2 = v === null || v === void 0 ? void 0 : v.floatValue) !== null && _v$floatValue2 !== void 0 ? _v$floatValue2 : 0) >= 0;
8648
9113
  },
8649
9114
  onValueChange: function onValueChange(value) {
8650
- update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
8651
- delivery: _objectSpread$g(_objectSpread$g({}, productData.delivery), {}, {
9115
+ update(_objectSpread$h(_objectSpread$h({}, productData), {}, {
9116
+ delivery: _objectSpread$h(_objectSpread$h({}, productData.delivery), {}, {
8652
9117
  installationPrice: Number(value.floatValue)
8653
9118
  })
8654
9119
  }));
@@ -8661,8 +9126,8 @@ function BaseDataFormDeliveryInfo (_ref) {
8661
9126
  });
8662
9127
  }
8663
9128
 
8664
- function ownKeys$f(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; }
8665
- function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9129
+ function ownKeys$g(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; }
9130
+ function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8666
9131
  var TranslationWrapper = function TranslationWrapper(_ref) {
8667
9132
  var productData = _ref.productData,
8668
9133
  update = _ref.update,
@@ -8697,13 +9162,13 @@ var TranslationWrapper = function TranslationWrapper(_ref) {
8697
9162
  };
8698
9163
  var handleUpdate = function handleUpdate(key, value) {
8699
9164
  if (TRANSLATED_FILEDS.includes(key)) {
8700
- var newProductData = _objectSpread$f({}, productData);
9165
+ var newProductData = _objectSpread$g({}, productData);
8701
9166
  if (!newProductData[key + '_locales']) newProductData[key + '_locales'] = {};
8702
9167
  newProductData[key + '_locales'][languages[curLangIndex]] = value;
8703
9168
  if (curLangIndex == 0) newProductData[key] = value;
8704
9169
  update(newProductData);
8705
9170
  } else {
8706
- update(_objectSpread$f(_objectSpread$f({}, productData), {}, _defineProperty({}, key, value)));
9171
+ update(_objectSpread$g(_objectSpread$g({}, productData), {}, _defineProperty({}, key, value)));
8707
9172
  }
8708
9173
  };
8709
9174
  return /*#__PURE__*/jsxs(Fragment, {
@@ -8720,7 +9185,7 @@ var TranslationWrapper = function TranslationWrapper(_ref) {
8720
9185
  return setCutLang(newValue);
8721
9186
  },
8722
9187
  children: languages.map(function (lang, index) {
8723
- return /*#__PURE__*/jsx(Tab, _objectSpread$f({
9188
+ return /*#__PURE__*/jsx(Tab, _objectSpread$g({
8724
9189
  style: {
8725
9190
  minWidth: 72,
8726
9191
  height: '30px',
@@ -8812,8 +9277,8 @@ var BaseInfo = function BaseInfo(_ref) {
8812
9277
  });
8813
9278
  };
8814
9279
 
8815
- function ownKeys$e(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; }
8816
- 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; }
9280
+ function ownKeys$f(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; }
9281
+ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8817
9282
  var Dimensions = function Dimensions(_ref) {
8818
9283
  var _productData$width, _productData$height, _productData$depth;
8819
9284
  var productData = _ref.productData,
@@ -8839,7 +9304,7 @@ var Dimensions = function Dimensions(_ref) {
8839
9304
  label: t('productcreator.fields.width'),
8840
9305
  value: (_productData$width = productData.width) !== null && _productData$width !== void 0 ? _productData$width : '',
8841
9306
  onChange: function onChange(s) {
8842
- return update(_objectSpread$e(_objectSpread$e({}, productData), {}, {
9307
+ return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
8843
9308
  width: Number(s.target.value)
8844
9309
  }));
8845
9310
  },
@@ -8857,7 +9322,7 @@ var Dimensions = function Dimensions(_ref) {
8857
9322
  label: t('productcreator.fields.height'),
8858
9323
  value: (_productData$height = productData.height) !== null && _productData$height !== void 0 ? _productData$height : '',
8859
9324
  onChange: function onChange(s) {
8860
- return update(_objectSpread$e(_objectSpread$e({}, productData), {}, {
9325
+ return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
8861
9326
  height: Number(s.target.value)
8862
9327
  }));
8863
9328
  },
@@ -8872,7 +9337,7 @@ var Dimensions = function Dimensions(_ref) {
8872
9337
  label: t('productcreator.fields.depth'),
8873
9338
  value: (_productData$depth = productData.depth) !== null && _productData$depth !== void 0 ? _productData$depth : '',
8874
9339
  onChange: function onChange(s) {
8875
- return update(_objectSpread$e(_objectSpread$e({}, productData), {}, {
9340
+ return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
8876
9341
  depth: Number(s.target.value)
8877
9342
  }));
8878
9343
  },
@@ -8895,7 +9360,7 @@ var Dimensions = function Dimensions(_ref) {
8895
9360
  label: t('productcreator.fields.model_info_page_weight'),
8896
9361
  value: productData.modelInfoPageWeight,
8897
9362
  onChange: function onChange(s) {
8898
- return update(_objectSpread$e(_objectSpread$e({}, productData), {}, {
9363
+ return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
8899
9364
  modelInfoPageWeight: Number(s.target.value)
8900
9365
  }));
8901
9366
  },
@@ -8907,8 +9372,8 @@ var Dimensions = function Dimensions(_ref) {
8907
9372
  });
8908
9373
  };
8909
9374
 
8910
- 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; }
8911
- 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; }
9375
+ function ownKeys$e(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; }
9376
+ 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; }
8912
9377
  var Additionalnfos = function Additionalnfos(_ref) {
8913
9378
  var _Object$entries;
8914
9379
  var additionalBaseFields = _ref.additionalBaseFields,
@@ -8934,8 +9399,8 @@ var Additionalnfos = function Additionalnfos(_ref) {
8934
9399
  label: "productcreator.fields.".concat(key, ".name"),
8935
9400
  multiple: value.multi,
8936
9401
  onChange: function onChange(value) {
8937
- return update(_objectSpread$d(_objectSpread$d({}, productData), {}, {
8938
- customData: _objectSpread$d(_objectSpread$d({}, productData.customData), {}, _defineProperty({}, key, value))
9402
+ return update(_objectSpread$e(_objectSpread$e({}, productData), {}, {
9403
+ customData: _objectSpread$e(_objectSpread$e({}, productData.customData), {}, _defineProperty({}, key, value))
8939
9404
  }));
8940
9405
  }
8941
9406
  })
@@ -9027,8 +9492,8 @@ var keyDropdownText = "keyDropdownText--paVs";
9027
9492
  var css_248z$4 = ".wrapper-D74am {\n display: flex;\n grid-gap: 25px;\n margin-bottom: 10px;\n align-items: top;\n width: 100%;\n}\n.typeDropDown-A1ExF {\n min-width: 10%;\n max-height: 48px;\n}\n\n.objectListWrapper-141eT {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.inputValueElement-XljUd {\n width: 100%;\n}\n.inputValueElementItem-s6dG0 {\n display: flex;\n align-items: center;\n margin-bottom: 8px;\n gap: 10px; /* Use 'gap' instead of 'grid-gap' for flex containers */\n}\n\n.keyDropdownText--paVs {\n flex-grow: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
9028
9493
  styleInject(css_248z$4);
9029
9494
 
9030
- 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; }
9031
- 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; }
9495
+ 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; }
9496
+ 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; }
9032
9497
  var SelectClasses = function SelectClasses(_ref) {
9033
9498
  var classificationFields = _ref.classificationFields,
9034
9499
  handleListBoxValueChange = _ref.handleListBoxValueChange,
@@ -9051,15 +9516,15 @@ var SelectClasses = function SelectClasses(_ref) {
9051
9516
  })) || null,
9052
9517
  onChange: handleChange,
9053
9518
  renderInput: function renderInput(params) {
9054
- return /*#__PURE__*/jsx(TextField$1, _objectSpread$c(_objectSpread$c({}, params), {}, {
9519
+ return /*#__PURE__*/jsx(TextField$1, _objectSpread$d(_objectSpread$d({}, params), {}, {
9055
9520
  label: t('productcreator.customfields.selectclass')
9056
9521
  }));
9057
9522
  }
9058
9523
  });
9059
9524
  };
9060
9525
 
9061
- 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; }
9062
- 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; }
9526
+ 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; }
9527
+ 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; }
9063
9528
  var CustomDataFields = function CustomDataFields(_ref) {
9064
9529
  var productData = _ref.productData,
9065
9530
  update = _ref.update,
@@ -9138,7 +9603,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
9138
9603
  var pairToDelete = productData.customData[pairs[index].key];
9139
9604
  if (pairToDelete && pairToDelete.manual) {
9140
9605
  delete productData.customData[pairs[index].key];
9141
- update(_objectSpread$b({}, productData));
9606
+ update(_objectSpread$c({}, productData));
9142
9607
  }
9143
9608
  setPairs(newPairs);
9144
9609
  };
@@ -9156,7 +9621,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
9156
9621
  '': ''
9157
9622
  });
9158
9623
  } else {
9159
- actPairs[index].value[arrayIndex] = _objectSpread$b(_objectSpread$b({}, actPairs[index].value[arrayIndex]), {}, {
9624
+ actPairs[index].value[arrayIndex] = _objectSpread$c(_objectSpread$c({}, actPairs[index].value[arrayIndex]), {}, {
9160
9625
  '': ''
9161
9626
  });
9162
9627
  }
@@ -9176,8 +9641,8 @@ var CustomDataFields = function CustomDataFields(_ref) {
9176
9641
  delete actPairs[index].value[arrayIndex][key];
9177
9642
  }
9178
9643
  }
9179
- update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9180
- customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[index].key, {
9644
+ update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
9645
+ customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, actPairs[index].key, {
9181
9646
  value: actPairs[index].value,
9182
9647
  manual: true
9183
9648
  }))
@@ -9190,13 +9655,13 @@ var CustomDataFields = function CustomDataFields(_ref) {
9190
9655
  var customDataPair = productData.customData[pairs[index].key];
9191
9656
  if (customDataPair.manual) {
9192
9657
  productData.customData[pairs[index].key][i] = undefined;
9193
- update(_objectSpread$b({}, productData));
9658
+ update(_objectSpread$c({}, productData));
9194
9659
  }
9195
9660
  setPairs(newPairs);
9196
9661
  };
9197
9662
  var handleChange = function handleChange(index, field, value) {
9198
9663
  var newPairs = pairs.map(function (pair, i) {
9199
- return i === index ? _objectSpread$b(_objectSpread$b({}, pair), {}, _defineProperty({}, field, value)) : pair;
9664
+ return i === index ? _objectSpread$c(_objectSpread$c({}, pair), {}, _defineProperty({}, field, value)) : pair;
9200
9665
  });
9201
9666
  if (newPairs[index].key && newPairs[index].value) {
9202
9667
  var oldKey = pairs[index].key;
@@ -9204,8 +9669,8 @@ var CustomDataFields = function CustomDataFields(_ref) {
9204
9669
  if (oldKey !== newKey) {
9205
9670
  delete productData.customData[oldKey];
9206
9671
  }
9207
- update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9208
- customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, newPairs[index].key, {
9672
+ update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
9673
+ customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, newPairs[index].key, {
9209
9674
  value: newPairs[index].value,
9210
9675
  manual: true
9211
9676
  }))
@@ -9224,8 +9689,8 @@ var CustomDataFields = function CustomDataFields(_ref) {
9224
9689
  if (oldKey !== newKey) {
9225
9690
  delete productData.customData[oldKey];
9226
9691
  }
9227
- update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9228
- customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[pairIndex].key, {
9692
+ update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
9693
+ customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, actPairs[pairIndex].key, {
9229
9694
  value: actPairs[pairIndex].value,
9230
9695
  manual: true
9231
9696
  }))
@@ -9257,8 +9722,8 @@ var CustomDataFields = function CustomDataFields(_ref) {
9257
9722
  // Update the object in the array
9258
9723
  actPairs[pairIndex].value[arrayIndex] = updatedObject;
9259
9724
  if (value) {
9260
- update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9261
- customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[pairIndex].key, {
9725
+ update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
9726
+ customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, actPairs[pairIndex].key, {
9262
9727
  value: actPairs[pairIndex].value,
9263
9728
  manual: true
9264
9729
  }))
@@ -9273,8 +9738,8 @@ var CustomDataFields = function CustomDataFields(_ref) {
9273
9738
  if (actObject) {
9274
9739
  actPairs[pairIndex].value[arrayIndex][key] = value;
9275
9740
  }
9276
- update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9277
- customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[pairIndex].key, {
9741
+ update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
9742
+ customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, actPairs[pairIndex].key, {
9278
9743
  value: actPairs[pairIndex].value,
9279
9744
  manual: true
9280
9745
  }))
@@ -9300,8 +9765,8 @@ var CustomDataFields = function CustomDataFields(_ref) {
9300
9765
  var handleListBoxValueChange = function handleListBoxValueChange(index, value) {
9301
9766
  var actPairs = _toConsumableArray(pairs);
9302
9767
  actPairs[index].value = value;
9303
- update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9304
- customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[index].key, {
9768
+ update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
9769
+ customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, actPairs[index].key, {
9305
9770
  value: actPairs[index].value,
9306
9771
  manual: true
9307
9772
  }))
@@ -9342,13 +9807,13 @@ var CustomDataFields = function CustomDataFields(_ref) {
9342
9807
  return /*#__PURE__*/jsx(Tooltip, {
9343
9808
  title: pair.key,
9344
9809
  placement: "left",
9345
- children: /*#__PURE__*/jsx(TextField, _objectSpread$b(_objectSpread$b({}, params), {}, {
9810
+ children: /*#__PURE__*/jsx(TextField, _objectSpread$c(_objectSpread$c({}, params), {}, {
9346
9811
  label: t('productcreator.customfields.keylabel')
9347
9812
  }))
9348
9813
  });
9349
9814
  },
9350
9815
  renderOption: function renderOption(props, option) {
9351
- return /*#__PURE__*/jsx("li", _objectSpread$b(_objectSpread$b({}, props), {}, {
9816
+ return /*#__PURE__*/jsx("li", _objectSpread$c(_objectSpread$c({}, props), {}, {
9352
9817
  style: {
9353
9818
  display: 'flex',
9354
9819
  alignItems: 'center',
@@ -9595,8 +10060,8 @@ function BaseDataFormInfo (_ref) {
9595
10060
  });
9596
10061
  }
9597
10062
 
9598
- 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; }
9599
- 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; }
10063
+ 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; }
10064
+ 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; }
9600
10065
  function CustomBaseForm (_ref) {
9601
10066
  var productData = _ref.productData,
9602
10067
  customFormData = _ref.customFormData,
@@ -9617,13 +10082,13 @@ function CustomBaseForm (_ref) {
9617
10082
  customDataField = parts[1];
9618
10083
  }
9619
10084
  if (customDataField) {
9620
- var updateObj = _objectSpread$a(_objectSpread$a({}, productData), {}, {
9621
- customData: _objectSpread$a(_objectSpread$a({}, productData.customData), {}, _defineProperty({}, customDataField, element.valueType === 'number' ? parseInt(value) : value))
10085
+ var updateObj = _objectSpread$b(_objectSpread$b({}, productData), {}, {
10086
+ customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, customDataField, element.valueType === 'number' ? parseInt(value) : value))
9622
10087
  });
9623
10088
  update(updateObj);
9624
10089
  } else {
9625
10090
  console.log(element.field);
9626
- update(_objectSpread$a(_objectSpread$a({}, productData), {}, _defineProperty({}, element.field, element.valueType === 'number' ? parseInt(value) : value)));
10091
+ update(_objectSpread$b(_objectSpread$b({}, productData), {}, _defineProperty({}, element.field, element.valueType === 'number' ? parseInt(value) : value)));
9627
10092
  }
9628
10093
  }
9629
10094
  function updateOptions(_x, _x2, _x3) {
@@ -9663,7 +10128,7 @@ function CustomBaseForm (_ref) {
9663
10128
  newOptions = _context.sent;
9664
10129
  case 11:
9665
10130
  setData(function (prevData) {
9666
- var newData = _objectSpread$a({}, prevData);
10131
+ var newData = _objectSpread$b({}, prevData);
9667
10132
  var index = newData[group].findIndex(function (g) {
9668
10133
  return g.field === element.field;
9669
10134
  });
@@ -9715,7 +10180,7 @@ function CustomBaseForm (_ref) {
9715
10180
  label: t(element.title),
9716
10181
  value: (_productData$element$ = productData === null || productData === void 0 ? void 0 : productData[element.field]) !== null && _productData$element$ !== void 0 ? _productData$element$ : '',
9717
10182
  onChange: function onChange(s) {
9718
- return update(_objectSpread$a(_objectSpread$a({}, productData), {}, _defineProperty({}, element.field, Number(s.target.value))));
10183
+ return update(_objectSpread$b(_objectSpread$b({}, productData), {}, _defineProperty({}, element.field, Number(s.target.value))));
9719
10184
  },
9720
10185
  type: "number",
9721
10186
  inputProps: {
@@ -9846,8 +10311,8 @@ function BaseDataForm (_ref) {
9846
10311
  });
9847
10312
  }
9848
10313
 
9849
- 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; }
9850
- 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; }
10314
+ 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; }
10315
+ 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; }
9851
10316
  function ClassificationDataForm (_ref) {
9852
10317
  var orderDescription = _ref.orderDescription,
9853
10318
  classificationFields = _ref.classificationFields,
@@ -9866,9 +10331,9 @@ function ClassificationDataForm (_ref) {
9866
10331
  var optField = optFields.find(function (opt) {
9867
10332
  return opt.field == value;
9868
10333
  });
9869
- return _objectSpread$9(_objectSpread$9({}, optMap), {}, _defineProperty({}, className, optField));
10334
+ return _objectSpread$a(_objectSpread$a({}, optMap), {}, _defineProperty({}, className, optField));
9870
10335
  }
9871
- var newOptMap = _objectSpread$9({}, optMap);
10336
+ var newOptMap = _objectSpread$a({}, optMap);
9872
10337
  delete newOptMap[className];
9873
10338
  return newOptMap;
9874
10339
  };
@@ -9956,7 +10421,7 @@ function ClassField(_ref2) {
9956
10421
  label: cf.title || cf.field,
9957
10422
  multiple: classMap[cf.field].multi,
9958
10423
  onChange: function onChange(value) {
9959
- return update(_objectSpread$9(_objectSpread$9({}, classificationData), {}, _defineProperty({}, cf.field, value ? value : undefined)));
10424
+ return update(_objectSpread$a(_objectSpread$a({}, classificationData), {}, _defineProperty({}, cf.field, value ? value : undefined)));
9960
10425
  }
9961
10426
  })
9962
10427
  });
@@ -9965,7 +10430,7 @@ function ClassField(_ref2) {
9965
10430
  control: /*#__PURE__*/jsx(Checkbox, {
9966
10431
  checked: classificationData[cf.field],
9967
10432
  onChange: function onChange(s) {
9968
- return update(_objectSpread$9(_objectSpread$9({}, classificationData), {}, _defineProperty({}, cf.field, s.target.checked)));
10433
+ return update(_objectSpread$a(_objectSpread$a({}, classificationData), {}, _defineProperty({}, cf.field, s.target.checked)));
9969
10434
  }
9970
10435
  }),
9971
10436
  label: t(cf.title || cf.field)
@@ -10062,8 +10527,8 @@ function Buttons (_ref) {
10062
10527
  }
10063
10528
 
10064
10529
  var _excluded$4 = ["highlight"];
10065
- function ownKeys$8(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; }
10066
- function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10530
+ 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; }
10531
+ 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; }
10067
10532
  function FieldSelection (_ref) {
10068
10533
  var _ref$classificationFi = _ref.classificationFields,
10069
10534
  classificationFields = _ref$classificationFi === void 0 ? [] : _ref$classificationFi,
@@ -10261,7 +10726,7 @@ function FieldSelection (_ref) {
10261
10726
  var Badge = styled$1(function (_ref2) {
10262
10727
  _ref2.highlight;
10263
10728
  var other = _objectWithoutProperties(_ref2, _excluded$4);
10264
- return /*#__PURE__*/jsx(Typography$1, _objectSpread$8({}, other));
10729
+ return /*#__PURE__*/jsx(Typography$1, _objectSpread$9({}, other));
10265
10730
  })(function (props) {
10266
10731
  return {
10267
10732
  height: 20,
@@ -10275,8 +10740,8 @@ var Badge = styled$1(function (_ref2) {
10275
10740
  };
10276
10741
  });
10277
10742
 
10278
- 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; }
10279
- 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; }
10743
+ function ownKeys$8(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; }
10744
+ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10280
10745
  function VariantTable (_ref) {
10281
10746
  var varinatData = _ref.varinatData,
10282
10747
  classificationFields = _ref.classificationFields,
@@ -10521,7 +10986,7 @@ function _preUpdateData(field, value, row) {
10521
10986
  calcedValue = undefined;
10522
10987
  }
10523
10988
  }
10524
- return _objectSpread$7(_objectSpread$7({}, row.original), {}, _defineProperty(_defineProperty({}, fieldName, myValue), calcedField, calcedValue));
10989
+ return _objectSpread$8(_objectSpread$8({}, row.original), {}, _defineProperty(_defineProperty({}, fieldName, myValue), calcedField, calcedValue));
10525
10990
  }
10526
10991
  if (fieldName === 'addedPrice') {
10527
10992
  var _percentageDiscountCe;
@@ -10529,7 +10994,7 @@ function _preUpdateData(field, value, row) {
10529
10994
  return c.column.id === 'percentageDiscount';
10530
10995
  });
10531
10996
  var percentage = (_percentageDiscountCe = percentageDiscountCell === null || percentageDiscountCell === void 0 ? void 0 : percentageDiscountCell.value) !== null && _percentageDiscountCe !== void 0 ? _percentageDiscountCe : 0;
10532
- return _objectSpread$7(_objectSpread$7({}, row.original), {}, _defineProperty(_defineProperty({}, fieldName, value), "discountedPrice", myValue - myValue / 100 * percentage));
10997
+ return _objectSpread$8(_objectSpread$8({}, row.original), {}, _defineProperty(_defineProperty({}, fieldName, value), "discountedPrice", myValue - myValue / 100 * percentage));
10533
10998
  }
10534
10999
  }
10535
11000
  return undefined;
@@ -10540,8 +11005,8 @@ var dataTable = "data-table-ImAxQ";
10540
11005
  var css_248z$3 = ".wrapper-I8eY4 {\n display: flex;\n height: calc(100% - 67px);\n border-bottom: 1px solid rgb(224, 224, 224);\n}\n\n.data-table-ImAxQ {\n position: relative;\n height: 100%;\n flex-grow: 1;\n overflow: hidden;\n}\n";
10541
11006
  styleInject(css_248z$3);
10542
11007
 
10543
- function ownKeys$6(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; }
10544
- function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11008
+ 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; }
11009
+ 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; }
10545
11010
  function MediaTable (_ref) {
10546
11011
  var _headerInfos$HeaderEl, _headerInfos$HeaderEl2, _configurationData$Pr, _configurationData$Pr2, _configurationData$Pr3;
10547
11012
  var baseData = _ref.baseData,
@@ -10581,7 +11046,7 @@ function MediaTable (_ref) {
10581
11046
  return item.media || [];
10582
11047
  }))) : baseData.media ? baseData.media.map(function (m) {
10583
11048
  var _m$thumbnail;
10584
- return _objectSpread$6(_objectSpread$6({}, m), {}, {
11049
+ return _objectSpread$7(_objectSpread$7({}, m), {}, {
10585
11050
  files: [m],
10586
11051
  url: (_m$thumbnail = m.thumbnail) !== null && _m$thumbnail !== void 0 ? _m$thumbnail : m.url
10587
11052
  });
@@ -10648,7 +11113,7 @@ function MediaTable (_ref) {
10648
11113
  onEdit: function onEdit(item) {
10649
11114
  var _item$files;
10650
11115
  setOpenFile((_item$files = item.files) === null || _item$files === void 0 ? void 0 : _item$files.map(function (f) {
10651
- return f.file ? f.file : _objectSpread$6(_objectSpread$6({}, f), {}, {
11116
+ return f.file ? f.file : _objectSpread$7(_objectSpread$7({}, f), {}, {
10652
11117
  state: 'SAVED',
10653
11118
  fileName: ''
10654
11119
  });
@@ -10747,7 +11212,7 @@ function intersection$1() {
10747
11212
  if (data.length == 1) {
10748
11213
  return data[0].map(function (d) {
10749
11214
  var _d$thumbnail;
10750
- return _objectSpread$6(_objectSpread$6({}, d), {}, {
11215
+ return _objectSpread$7(_objectSpread$7({}, d), {}, {
10751
11216
  files: [d],
10752
11217
  url: (_d$thumbnail = d.thumbnail) !== null && _d$thumbnail !== void 0 ? _d$thumbnail : d.url
10753
11218
  });
@@ -10763,7 +11228,7 @@ function intersection$1() {
10763
11228
  });
10764
11229
  }).map(function (d) {
10765
11230
  var _d$thumbnail2;
10766
- return _objectSpread$6(_objectSpread$6({}, d), {}, {
11231
+ return _objectSpread$7(_objectSpread$7({}, d), {}, {
10767
11232
  files: [],
10768
11233
  url: (_d$thumbnail2 = d.thumbnail) !== null && _d$thumbnail2 !== void 0 ? _d$thumbnail2 : d.url
10769
11234
  });
@@ -10784,8 +11249,8 @@ function mediaMatch(a, b) {
10784
11249
 
10785
11250
  var _excluded$3 = ["mainCategories"],
10786
11251
  _excluded2$1 = ["subCategories"];
10787
- function ownKeys$5(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; }
10788
- function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11252
+ function ownKeys$6(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; }
11253
+ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10789
11254
  function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
10790
11255
  function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
10791
11256
  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; }
@@ -10914,14 +11379,14 @@ function useClassification () {
10914
11379
  values = _context2.sent;
10915
11380
  case 24:
10916
11381
  currentElement = element;
10917
- groups[ck].push(_objectSpread$5(_objectSpread$5({}, currentElement), {}, {
11382
+ groups[ck].push(_objectSpread$6(_objectSpread$6({}, currentElement), {}, {
10918
11383
  values: values
10919
11384
  }));
10920
11385
  _context2.next = 30;
10921
11386
  break;
10922
11387
  case 28:
10923
11388
  _currentElement = element;
10924
- groups[ck].push(_objectSpread$5({}, _currentElement));
11389
+ groups[ck].push(_objectSpread$6({}, _currentElement));
10925
11390
  case 30:
10926
11391
  _context2.next = 16;
10927
11392
  break;
@@ -11071,7 +11536,7 @@ function useClassification () {
11071
11536
  var _currentData$livingAr = currentData.livingAreas[key];
11072
11537
  _currentData$livingAr.mainCategories;
11073
11538
  var translations = _objectWithoutProperties(_currentData$livingAr, _excluded$3);
11074
- return _objectSpread$5({
11539
+ return _objectSpread$6({
11075
11540
  value: key
11076
11541
  }, translations);
11077
11542
  });
@@ -11087,7 +11552,7 @@ function useClassification () {
11087
11552
  var _currentData$livingAr3 = currentData.livingAreas[newCurrent.livingArea].mainCategories[key];
11088
11553
  _currentData$livingAr3.subCategories;
11089
11554
  var translations = _objectWithoutProperties(_currentData$livingAr3, _excluded2$1);
11090
- return _objectSpread$5({
11555
+ return _objectSpread$6({
11091
11556
  value: key
11092
11557
  }, translations);
11093
11558
  });
@@ -11133,8 +11598,8 @@ var _excluded$2 = ["isNew"],
11133
11598
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11134
11599
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
11135
11600
  function _arrayLikeToArray(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; }
11136
- 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; }
11137
- 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; }
11601
+ function ownKeys$5(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; }
11602
+ function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11138
11603
  var LOG$2 = getLogger('Seller', 'ProductState');
11139
11604
  function useProductState (basket, divaNr) {
11140
11605
  var _useSellerState = useSellerState(),
@@ -11345,7 +11810,7 @@ function useProductState (basket, divaNr) {
11345
11810
  }, [dispatch]);
11346
11811
  var updateCategories = useCallback(function (livingArea, mainCategory, subCategory) {
11347
11812
  var currentCategories = updateCategoriesInternal(livingArea, mainCategory, subCategory);
11348
- updateBaseData === null || updateBaseData === void 0 || updateBaseData(_objectSpread$4(_objectSpread$4({}, state.baseData), {}, {
11813
+ updateBaseData === null || updateBaseData === void 0 || updateBaseData(_objectSpread$5(_objectSpread$5({}, state.baseData), {}, {
11349
11814
  livingArea: currentCategories.livingArea,
11350
11815
  mainCategory: currentCategories.mainCategory,
11351
11816
  subCategory: currentCategories.subCategory
@@ -11430,12 +11895,12 @@ function useProductState (basket, divaNr) {
11430
11895
  case 30:
11431
11896
  (_productHandler$close3 = productHandler.closeModal) === null || _productHandler$close3 === void 0 || _productHandler$close3.call(productHandler);
11432
11897
  if (originProductId) clearOriginProductId();
11433
- LOG$2.error(new DivaError("Articles cannot be saved - ClientArticleService or JWT not set"));
11898
+ LOG$2.error(new DivaError$1("Articles cannot be saved - ClientArticleService or JWT not set"));
11434
11899
  setError(t('modal.general_error') + ' ' + t('modal.errorcode') + ':' + DivaUtils.getCurrentTraceId() + ' ' + DivaUtils.formatDate(new Date(), true, undefined, true));
11435
11900
  return _context2.abrupt("return", false);
11436
11901
  case 35:
11437
11902
  _context2.next = 37;
11438
- return productHandler.saveProducts(_objectSpread$4(_objectSpread$4({}, data), {}, {
11903
+ return productHandler.saveProducts(_objectSpread$5(_objectSpread$5({}, data), {}, {
11439
11904
  awaitPDF: undefined
11440
11905
  }));
11441
11906
  case 37:
@@ -11447,7 +11912,7 @@ function useProductState (basket, divaNr) {
11447
11912
  case 43:
11448
11913
  _context2.prev = 43;
11449
11914
  _context2.t1 = _context2["catch"](2);
11450
- LOG$2.error(new DivaError("Error saving product", {
11915
+ LOG$2.error(new DivaError$1("Error saving product", {
11451
11916
  code: 'PROD_0002',
11452
11917
  cause: _context2.t1
11453
11918
  }));
@@ -11510,7 +11975,7 @@ function useProductState (basket, divaNr) {
11510
11975
  resetState = _objectWithoutProperties(_yield$productHandler, _excluded$2);
11511
11976
  dispatch({
11512
11977
  type: 'init',
11513
- state: _objectSpread$4(_objectSpread$4({}, resetState), {}, {
11978
+ state: _objectSpread$5(_objectSpread$5({}, resetState), {}, {
11514
11979
  availableLanguages: availableLanguages,
11515
11980
  currentLang: language,
11516
11981
  classificationFields: state === null || state === void 0 ? void 0 : state.classificationFields
@@ -11587,7 +12052,7 @@ function useProductState (basket, divaNr) {
11587
12052
  case 26:
11588
12053
  _context4.prev = 26;
11589
12054
  _context4.t1 = _context4["catch"](19);
11590
- LOG$2.error(new DivaError("Error loading affiliates", {
12055
+ LOG$2.error(new DivaError$1("Error loading affiliates", {
11591
12056
  code: 'SELLER_0002',
11592
12057
  cause: _context4.t1
11593
12058
  }));
@@ -11617,7 +12082,7 @@ function useProductState (basket, divaNr) {
11617
12082
  }]
11618
12083
  })
11619
12084
  });
11620
- newCurrentData.livingAreas = _objectSpread$4({}, newLivingArea);
12085
+ newCurrentData.livingAreas = _objectSpread$5({}, newLivingArea);
11621
12086
  }
11622
12087
  _context4.next = 40;
11623
12088
  return productHandler.loadProducts({
@@ -11710,7 +12175,7 @@ function useProductState (basket, divaNr) {
11710
12175
  case 63:
11711
12176
  _context4.prev = 63;
11712
12177
  _context4.t2 = _context4["catch"](29);
11713
- LOG$2.error(new DivaError("Error initalization", {
12178
+ LOG$2.error(new DivaError$1("Error initalization", {
11714
12179
  code: 'SELLER_0002',
11715
12180
  cause: _context4.t2
11716
12181
  }));
@@ -11833,7 +12298,7 @@ function useProductState (basket, divaNr) {
11833
12298
  function reducer(state, action) {
11834
12299
  if (action.type == 'init') {
11835
12300
  var _action$state$classif;
11836
- var newState = _objectSpread$4({}, action.state);
12301
+ var newState = _objectSpread$5({}, action.state);
11837
12302
  (_action$state$classif = action.state.classificationFields) === null || _action$state$classif === void 0 || _action$state$classif.forEach(function (field) {
11838
12303
  if (newState.modified.variantData.some(function (mod) {
11839
12304
  return mod[field.field];
@@ -11853,14 +12318,14 @@ function reducer(state, action) {
11853
12318
  _newState = updateVariants(state, _newState, action.configurationData, action.baseFields, action.classificationConfig, state.availableLanguages);
11854
12319
  return _newState;
11855
12320
  } else if (action.type == 'updateClassification') {
11856
- var _newState2 = _objectSpread$4(_objectSpread$4({}, state), {}, {
12321
+ var _newState2 = _objectSpread$5(_objectSpread$5({}, state), {}, {
11857
12322
  classificationData: action.data
11858
12323
  });
11859
12324
  _newState2 = updateBaseData(_newState2, _newState2.baseData, action.configurationData, action.classificationConfig, state.availableLanguages, state.currentLang);
11860
12325
  _newState2 = updateVariants(state, _newState2, action.configurationData, action.baseFields, action.classificationConfig, state.availableLanguages);
11861
12326
  return _newState2;
11862
12327
  } else if (action.type == 'updateVariants') {
11863
- var _newState3 = _objectSpread$4(_objectSpread$4({}, state), {}, {
12328
+ var _newState3 = _objectSpread$5(_objectSpread$5({}, state), {}, {
11864
12329
  variantData: action.data
11865
12330
  });
11866
12331
  _newState3 = updateVariants(state, _newState3, action.configurationData, action.baseFields, action.classificationConfig, state.availableLanguages);
@@ -11924,7 +12389,7 @@ function updateVariants(prevState, currentState, configurationData, baseDataFiel
11924
12389
  var _currentState$modifie6, _configurationData$Pr3, _currentState$modifie7;
11925
12390
  var variant = prevState.variantData[_i];
11926
12391
  var newVariant = currentState.variantData[_i];
11927
- var finalVariant = _objectSpread$4({}, variant);
12392
+ var finalVariant = _objectSpread$5({}, variant);
11928
12393
  var newModified = {};
11929
12394
  var _iterator = _createForOfIteratorHelper(prevState.classificationFields || []),
11930
12395
  _step;
@@ -12065,9 +12530,9 @@ function updateVariants(prevState, currentState, configurationData, baseDataFiel
12065
12530
  newVarinatList.push(finalVariant);
12066
12531
  newModifiedList.push(newModified);
12067
12532
  }
12068
- return _objectSpread$4(_objectSpread$4({}, currentState), {}, {
12533
+ return _objectSpread$5(_objectSpread$5({}, currentState), {}, {
12069
12534
  variantData: newVarinatList,
12070
- modified: _objectSpread$4(_objectSpread$4({}, currentState.modified), {}, {
12535
+ modified: _objectSpread$5(_objectSpread$5({}, currentState.modified), {}, {
12071
12536
  variantData: newModifiedList
12072
12537
  })
12073
12538
  });
@@ -12087,12 +12552,12 @@ function updateBaseData(prevState, updatedData, configurationData, classificatio
12087
12552
  var updatedRest = _objectWithoutProperties(updatedData, _excluded3);
12088
12553
 
12089
12554
  //as long as shortDescription is not modified by user, autocalc it
12090
- var _ProductHandler$calcS2 = ProductHandler.calcShortDescription(prevState.baseData.shortDescription, _objectSpread$4(_objectSpread$4({}, updatedData), prevState.classificationData), prevState.modified.shortDescription, (_configurationData$Pr4 = configurationData.ProductCreator) === null || _configurationData$Pr4 === void 0 ? void 0 : _configurationData$Pr4.fields, classificationConfig),
12555
+ var _ProductHandler$calcS2 = ProductHandler.calcShortDescription(prevState.baseData.shortDescription, _objectSpread$5(_objectSpread$5({}, updatedData), prevState.classificationData), prevState.modified.shortDescription, (_configurationData$Pr4 = configurationData.ProductCreator) === null || _configurationData$Pr4 === void 0 ? void 0 : _configurationData$Pr4.fields, classificationConfig),
12091
12556
  shortDescription = _ProductHandler$calcS2.value,
12092
12557
  shortDescriptionModified = _ProductHandler$calcS2.modified;
12093
12558
 
12094
12559
  //all other fields can be applied directly from updateData
12095
- var baseData = _objectSpread$4(_objectSpread$4({}, prevState.baseData), {}, {
12560
+ var baseData = _objectSpread$5(_objectSpread$5({}, prevState.baseData), {}, {
12096
12561
  shortDescription: shortDescription
12097
12562
  }, updatedRest);
12098
12563
  for (var key in baseData) {
@@ -12107,9 +12572,9 @@ function updateBaseData(prevState, updatedData, configurationData, classificatio
12107
12572
  }
12108
12573
  }
12109
12574
  }
12110
- return _objectSpread$4(_objectSpread$4({}, prevState), {}, {
12575
+ return _objectSpread$5(_objectSpread$5({}, prevState), {}, {
12111
12576
  baseData: baseData,
12112
- modified: _objectSpread$4(_objectSpread$4({}, prevState.modified), {}, {
12577
+ modified: _objectSpread$5(_objectSpread$5({}, prevState.modified), {}, {
12113
12578
  shortDescription: shortDescriptionModified
12114
12579
  })
12115
12580
  });
@@ -12127,7 +12592,7 @@ function updateBaseData(prevState, updatedData, configurationData, classificatio
12127
12592
  */
12128
12593
  function updateMedia(currentState, data, variants) {
12129
12594
  var products;
12130
- var newState = _objectSpread$4({}, currentState);
12595
+ var newState = _objectSpread$5({}, currentState);
12131
12596
  if (variants !== null && variants !== void 0 && variants.length) {
12132
12597
  //the varinatData Array needs to change in order for react to notice
12133
12598
  newState.variantData = _toConsumableArray(newState.variantData);
@@ -12136,7 +12601,7 @@ function updateMedia(currentState, data, variants) {
12136
12601
  });
12137
12602
  } else {
12138
12603
  //the baseData object needs to change in order for react to notice
12139
- newState.baseData = _objectSpread$4({}, newState.baseData);
12604
+ newState.baseData = _objectSpread$5({}, newState.baseData);
12140
12605
  products = [newState.baseData];
12141
12606
  }
12142
12607
 
@@ -12187,7 +12652,7 @@ function updateMedia(currentState, data, variants) {
12187
12652
  return newState;
12188
12653
  }
12189
12654
  function updateOptMap(currentState, optMap, mediaService, jwt) {
12190
- var newState = _objectSpread$4(_objectSpread$4({}, currentState), {}, {
12655
+ var newState = _objectSpread$5(_objectSpread$5({}, currentState), {}, {
12191
12656
  optClassMap: optMap
12192
12657
  });
12193
12658
  newState.variantData.forEach(function (product) {
@@ -12251,7 +12716,7 @@ function updateOptMap(currentState, optMap, mediaService, jwt) {
12251
12716
  return newState;
12252
12717
  }
12253
12718
  function sortMedia(currentState, from, to, filterOpv, variantProductId) {
12254
- var newState = _objectSpread$4({}, currentState);
12719
+ var newState = _objectSpread$5({}, currentState);
12255
12720
  var media = newState.baseData.media;
12256
12721
  var variantIndex = -1;
12257
12722
  if (variantProductId !== undefined) {
@@ -12282,7 +12747,7 @@ function sortMedia(currentState, from, to, filterOpv, variantProductId) {
12282
12747
  return newState;
12283
12748
  }
12284
12749
  function sortVariantRows(currentState, from, to, sortedVariantIds) {
12285
- var newState = _objectSpread$4({}, currentState);
12750
+ var newState = _objectSpread$5({}, currentState);
12286
12751
  var variantData = newState.variantData;
12287
12752
  if (sortedVariantIds) {
12288
12753
  var _loop3 = function _loop3(i) {
@@ -12311,7 +12776,7 @@ function sortVariantRows(currentState, from, to, sortedVariantIds) {
12311
12776
  */
12312
12777
  function removeMedia(currentState, data, variants) {
12313
12778
  var products;
12314
- var newState = _objectSpread$4({}, currentState);
12779
+ var newState = _objectSpread$5({}, currentState);
12315
12780
  if (variants !== null && variants !== void 0 && variants.length) {
12316
12781
  //the varinatData Array needs to change in order for react to notice
12317
12782
  newState.variantData = _toConsumableArray(newState.variantData);
@@ -12320,7 +12785,7 @@ function removeMedia(currentState, data, variants) {
12320
12785
  });
12321
12786
  } else {
12322
12787
  //the baseData object needs to change in order for react to notice
12323
- newState.baseData = _objectSpread$4({}, newState.baseData);
12788
+ newState.baseData = _objectSpread$5({}, newState.baseData);
12324
12789
  products = [newState.baseData];
12325
12790
  }
12326
12791
  if (!newState.removedMedia) {
@@ -12381,8 +12846,8 @@ function setData(id, value, data) {
12381
12846
  }
12382
12847
 
12383
12848
  var _excluded$1 = ["value", "onChange"];
12384
- function ownKeys$3(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; }
12385
- 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; }
12849
+ 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; }
12850
+ 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; }
12386
12851
  function AffiliateTable (_ref) {
12387
12852
  var baseData = _ref.baseData,
12388
12853
  variantData = _ref.variantData,
@@ -12632,7 +13097,7 @@ function AffiliateTable (_ref) {
12632
13097
  fullWidth: true,
12633
13098
  value: d.link,
12634
13099
  onChange: function onChange(e) {
12635
- return onUpdateLink(_objectSpread$3(_objectSpread$3({}, d), {}, {
13100
+ return onUpdateLink(_objectSpread$4(_objectSpread$4({}, d), {}, {
12636
13101
  link: e.target.value
12637
13102
  }));
12638
13103
  }
@@ -12661,7 +13126,7 @@ function DebouncedTextField(_ref2) {
12661
13126
  debounce(externalOnChange, 800)(e);
12662
13127
  }
12663
13128
  };
12664
- return /*#__PURE__*/jsx(TextField$1, _objectSpread$3(_objectSpread$3({
13129
+ return /*#__PURE__*/jsx(TextField$1, _objectSpread$4(_objectSpread$4({
12665
13130
  value: state
12666
13131
  }, props), {}, {
12667
13132
  onChange: onChange
@@ -12695,6 +13160,8 @@ var renderjob = "renderjob-Yt11W";
12695
13160
  var css_248z$2 = ".main-ERs2i {\n display: flex;\n overflow: hidden;\n width: 100%;\n flex-direction: column;\n height: 100%;\n}\n\n.content-KMewq {\n position: relative;\n width: 100%;\n overflow: hidden;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.tab-content-nIlnM {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n flex: 1;\n}\n\n.renderjob-Yt11W {\n display: flex;\n height: calc(100% - 20px);\n margin: 10px;\n}\n\n.renderjob-Yt11W #diva-order-entry-footer > span > div {\n width: 500px;\n}\n\n.renderjob-Yt11W #diva-order-entry-footer > span > div > span {\n margin-left: 110px;\n}\n";
12696
13161
  styleInject(css_248z$2);
12697
13162
 
13163
+ function ownKeys$3(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; }
13164
+ 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; }
12698
13165
  function ProductCreator (_ref) {
12699
13166
  var _state$variantData, _state$variantData2, _state$variantData$fi, _state$variantData3, _state$baseData$custo2, _state$baseData$divaN, _currentBasket$OrderS;
12700
13167
  var basket = _ref.basket,
@@ -12839,7 +13306,9 @@ function ProductCreator (_ref) {
12839
13306
  var onOpenPlanner = function onOpenPlanner() {
12840
13307
  var basketToInit = new BasketData(state === null || state === void 0 ? void 0 : state.baseData.configuration);
12841
13308
  basketToInit.OrderSets[0].TinyVariantConfiguration = state === null || state === void 0 ? void 0 : state.variantData.map(function (v) {
12842
- return v.configuration;
13309
+ return _objectSpread$3(_objectSpread$3({}, v.configuration), {}, {
13310
+ VariantID: v.variantId
13311
+ });
12843
13312
  });
12844
13313
  if (currentBasket !== null && currentBasket !== void 0 && currentBasket.SetPlannerInfos) {
12845
13314
  openPlanner({
@@ -13314,7 +13783,7 @@ var ModelAnalytics = function ModelAnalytics(_ref) {
13314
13783
  _context.next = 9;
13315
13784
  break;
13316
13785
  }
13317
- LOG$1.error(new DivaError('Missing account ID', {
13786
+ LOG$1.error(new DivaError$1('Missing account ID', {
13318
13787
  code: 'SELLER_0001'
13319
13788
  }));
13320
13789
  setLoading(false);
@@ -13442,7 +13911,7 @@ function Seller(props) {
13442
13911
  toggleLoading('SellerLoading', false, isLoading);
13443
13912
  }, [props.activeModule, error, isLoading]);
13444
13913
  if (error) {
13445
- LOG.error(new DivaError(error, {
13914
+ LOG.error(new DivaError$1(error, {
13446
13915
  code: 'SELLER_0001'
13447
13916
  }));
13448
13917
  return /*#__PURE__*/jsx("div", {