@crystaldesign/diva-seller 24.15.0-beta.5 → 24.15.0-beta.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/build/esm/index.js +595 -270
  2. package/build/types/seller/src/components/Articles/index.d.ts.map +1 -1
  3. package/build/types/seller/src/components/Basket/Step3Checkout.d.ts +4 -1
  4. package/build/types/seller/src/components/Basket/Step3Checkout.d.ts.map +1 -1
  5. package/build/types/seller/src/components/Basket/Step4Checkout.d.ts +10 -0
  6. package/build/types/seller/src/components/Basket/Step4Checkout.d.ts.map +1 -0
  7. package/build/types/seller/src/components/Basket/index.d.ts +1 -1
  8. package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
  9. package/build/types/seller/src/components/Basket/types.d.ts +1 -1
  10. package/build/types/seller/src/components/Basket/types.d.ts.map +1 -1
  11. package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts.map +1 -1
  12. package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts +2 -1
  13. package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts.map +1 -1
  14. package/build/types/seller/src/components/InfoWithProducts/index.d.ts.map +1 -1
  15. package/build/types/seller/src/components/InfoWithProducts/useModelInfoPage.d.ts.map +1 -1
  16. package/build/types/seller/src/components/ProductCreator/components/Priceedit.d.ts.map +1 -1
  17. package/build/types/seller/src/components/ProductCreator/tabs/VariantTable/index.d.ts.map +1 -1
  18. package/build/types/seller/src/services/ApiHandler.d.ts.map +1 -1
  19. package/build/types/seller/src/types.d.ts +5 -5
  20. package/build/types/seller/src/types.d.ts.map +1 -1
  21. package/build/types/seller/src/ui/Basket/CheckOut/components/Step3Product.d.ts +9 -0
  22. package/build/types/seller/src/ui/Basket/CheckOut/components/Step3Product.d.ts.map +1 -0
  23. package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts +4 -1
  24. package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts.map +1 -1
  25. package/build/types/seller/src/ui/Basket/CheckOut/statusMenu.d.ts +1 -1
  26. package/build/types/seller/src/ui/Basket/CheckOut/statusMenu.d.ts.map +1 -1
  27. package/build/types/seller/src/ui/Basket/CheckOut/useProduct.d.ts +2 -2
  28. package/build/types/seller/src/ui/Basket/CheckOut/useProduct.d.ts.map +1 -1
  29. package/build/types/seller/src/ui/Basket/Header.d.ts +3 -2
  30. package/build/types/seller/src/ui/Basket/Header.d.ts.map +1 -1
  31. package/build/types/seller/src/ui/Basket/PriceOverView/Footer.d.ts +1 -1
  32. package/build/types/seller/src/ui/Basket/PriceOverView/Footer.d.ts.map +1 -1
  33. package/package.json +7 -5
@@ -17,7 +17,7 @@ import CardMedia from '@mui/material/CardMedia';
17
17
  import Typography$1 from '@mui/material/Typography';
18
18
  import createStyles from '@mui/styles/createStyles';
19
19
  import makeStyles from '@mui/styles/makeStyles';
20
- import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Tooltip, Paper as Paper$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, IconButton as IconButton$1, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box, Select as Select$1, MenuItem as MenuItem$1, ListItemButton, ListItemIcon } from '@mui/material';
20
+ import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Tooltip, Stack, Paper as Paper$1, Skeleton, IconButton as IconButton$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Divider as Divider$1, Alert, AlertTitle, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box as Box$1, Select as Select$1, MenuItem as MenuItem$1, ListItemButton, ListItemIcon } from '@mui/material';
21
21
  import { Histogram, useFilterState, FilterComponent, AnalyticsComponent } from '@crystaldesign/analytics';
22
22
  import Button from '@mui/material/Button';
23
23
  import ButtonGroup from '@mui/material/ButtonGroup';
@@ -55,7 +55,12 @@ import TextField$1 from '@mui/material/TextField';
55
55
  import Select from '@mui/material/Select';
56
56
  import Input from '@mui/material/Input';
57
57
  import OrderEntry, { apiSaveRenderJobs, VariantSelector } from '@crystaldesign/order-entry';
58
- import CloseIcon from '@mui/icons-material/Close';
58
+ import _toArray from '@babel/runtime/helpers/toArray';
59
+ import Box from '@mui/material/Box';
60
+ import StarBorderIcon from '@mui/icons-material/StarBorder';
61
+ import EditIcon from '@mui/icons-material/Edit';
62
+ import Alert$1 from '@mui/material/Alert';
63
+ import AlertTitle$1 from '@mui/material/AlertTitle';
59
64
  import classnames from 'classnames';
60
65
  import { InfoRounded, Remove, Add, Delete } from '@mui/icons-material';
61
66
  import { Swiper, SwiperSlide } from 'swiper/react';
@@ -68,7 +73,7 @@ import 'swiper/css/free-mode';
68
73
  import 'swiper/css/mousewheel';
69
74
  import ExpandMore from '@mui/icons-material/ExpandMore';
70
75
  import ProductsComponent, { useProductState as useProductState$1 } from '@crystaldesign/products-component';
71
- import Alert from '@mui/lab/Alert';
76
+ import Alert$2 from '@mui/lab/Alert';
72
77
  import Tab$1 from '@mui/material/Tab';
73
78
  import Tabs$1 from '@mui/material/Tabs';
74
79
  import Autocomplete$1 from '@mui/material/Autocomplete';
@@ -91,7 +96,6 @@ import AssetEditor, { DivaFile } from '@crystaldesign/media-upload';
91
96
  import AddIcon$1 from '@mui/icons-material/NoteAdd';
92
97
  import DeleteIcon from '@mui/icons-material/Delete';
93
98
  import debounce from 'lodash/debounce';
94
- import Alert$1 from '@mui/material/Alert';
95
99
  import Settings from '@mui/icons-material/Settings';
96
100
 
97
101
  (function() {
@@ -654,8 +658,6 @@ function _apiLoadCatalogs() {
654
658
  // "Johann Jakob - CLASSICS"
655
659
  subCategory: data.RetailSubCategory ? data.RetailSubCategory : data.SubCategory ? data.SubCategory : undefined,
656
660
  retailArticleNr: data.RetailArticleNr ? data.RetailArticleNr : undefined,
657
- fileBaseUrl: data.BaseURL ? data.BaseURL : undefined,
658
- // "https://myCC3Retail.crystal-design.local/files"
659
661
  nArticles: data.Articles ? Number(data.Articles) : 0,
660
662
  // "236"
661
663
  nConfigurators: data.Configurators ? Number(data.Configurators) : 0,
@@ -3087,7 +3089,7 @@ var Wrapper = styled('div')({
3087
3089
  display: 'flex',
3088
3090
  justifyContent: 'space-between',
3089
3091
  alignItems: 'center',
3090
- margin: '10px 10px 0 10px',
3092
+ margin: '5px 5px 5px 5px',
3091
3093
  flexWrap: 'wrap',
3092
3094
  gap: '10px'
3093
3095
  });
@@ -3874,11 +3876,7 @@ function Articles(_ref) {
3874
3876
  component: "div",
3875
3877
  variant: "body1",
3876
3878
  color: "textSecondary",
3877
- children: DivaUtils$1.sizeFormatter({
3878
- width: row.values['width'],
3879
- depth: row.values['depth'],
3880
- height: row.values['height']
3881
- }, i18n)
3879
+ children: DivaUtils$1.sizeFormatter(row.values, i18n)
3882
3880
  })]
3883
3881
  }), /*#__PURE__*/jsx("div", {
3884
3882
  style: {
@@ -3951,6 +3949,30 @@ function Articles(_ref) {
3951
3949
  }, {
3952
3950
  label: t('articles.header.depth'),
3953
3951
  accessor: 'depth'
3952
+ }, {
3953
+ label: t('articles.header.width'),
3954
+ accessor: 'widthFrom',
3955
+ hidden: true
3956
+ }, {
3957
+ label: t('articles.header.height'),
3958
+ accessor: 'heightFrom',
3959
+ hidden: true
3960
+ }, {
3961
+ label: t('articles.header.depth'),
3962
+ accessor: 'depthFrom',
3963
+ hidden: true
3964
+ }, {
3965
+ label: t('articles.header.width'),
3966
+ accessor: 'widthTo',
3967
+ hidden: true
3968
+ }, {
3969
+ label: t('articles.header.height'),
3970
+ accessor: 'heightTo',
3971
+ hidden: true
3972
+ }, {
3973
+ label: t('articles.header.depth'),
3974
+ accessor: 'depthTo',
3975
+ hidden: true
3954
3976
  }],
3955
3977
  groupBy: ['groupName'],
3956
3978
  expanded: true,
@@ -3994,8 +4016,10 @@ function Header$1(_ref) {
3994
4016
  enableVKPExportButton = _ref.enableVKPExportButton;
3995
4017
  var _useTranslation = useTranslation(),
3996
4018
  t = _useTranslation.t;
4019
+ var _useDivaCore = useDivaCore(),
4020
+ organization = _useDivaCore.state.organization;
3997
4021
  var handleClick = function handleClick(event) {
3998
- if (event.currentTarget.name == 'Step1' || event.currentTarget.name == 'Step2' || event.currentTarget.name == 'Step3') {
4022
+ if (event.currentTarget.name == 'Step1' || event.currentTarget.name == 'Step2' || event.currentTarget.name == 'Step3' || event.currentTarget.name == 'Step4') {
3999
4023
  setActBasketPage(event.currentTarget.name);
4000
4024
  }
4001
4025
  };
@@ -4006,7 +4030,7 @@ function Header$1(_ref) {
4006
4030
  zIndex: 1
4007
4031
  },
4008
4032
  children: /*#__PURE__*/jsxs(Title, {
4009
- text: t('data.' + status) + ' - Nr. ' + divaNr + '-' + documentVersion,
4033
+ text: (actBasketPage === 'Step4' ? 'Marketing' : t('data.' + status)) + ' - Nr. ' + divaNr + '-' + documentVersion,
4010
4034
  children: [showVKPExportButton && /*#__PURE__*/jsx(Button, {
4011
4035
  color: 'primary',
4012
4036
  variant: 'contained',
@@ -4041,6 +4065,13 @@ function Header$1(_ref) {
4041
4065
  children: t('basket.navigation.checkoutNew', {
4042
4066
  step: (config === null || config === void 0 ? void 0 : config.clientData) != false ? 3 : 2
4043
4067
  })
4068
+ }), organization.settings.enableVKMarketing && /*#__PURE__*/jsx(Button, {
4069
+ name: "Step4",
4070
+ onClick: handleClick,
4071
+ variant: actBasketPage == 'Step4' ? 'contained' : 'outlined',
4072
+ children: t('basket.navigation.checkoutMarketing', {
4073
+ step: (config === null || config === void 0 ? void 0 : config.clientData) != false ? 4 : 3
4074
+ })
4044
4075
  })]
4045
4076
  })]
4046
4077
  })
@@ -4101,12 +4132,12 @@ function MenuListComposition(_ref) {
4101
4132
  }
4102
4133
  prevOpen.current = open;
4103
4134
  }, [open]);
4104
- return /*#__PURE__*/jsx("div", {
4135
+ return /*#__PURE__*/jsxs("div", {
4105
4136
  style: {
4106
4137
  "float": 'right',
4107
4138
  height: 'fit-content'
4108
4139
  },
4109
- children: /*#__PURE__*/jsxs(ButtonGroup, {
4140
+ children: [/*#__PURE__*/jsxs(ButtonGroup, {
4110
4141
  color: "primary",
4111
4142
  "aria-label": "outlined primary button group",
4112
4143
  children: [/*#__PURE__*/jsx(Button, {
@@ -4128,61 +4159,61 @@ function MenuListComposition(_ref) {
4128
4159
  "aria-haspopup": "true",
4129
4160
  onClick: handleToggle,
4130
4161
  children: t('basket.priceOverview.actions.addtionalActions')
4131
- }), /*#__PURE__*/jsx(Popper, {
4132
- style: {
4133
- zIndex: 1
4134
- },
4135
- open: open,
4136
- anchorEl: anchorRef.current,
4137
- role: undefined,
4138
- transition: true,
4139
- disablePortal: true,
4140
- children: function children(_ref2) {
4141
- var TransitionProps = _ref2.TransitionProps,
4142
- placement = _ref2.placement;
4143
- return /*#__PURE__*/jsx(Grow, _objectSpread$w(_objectSpread$w({}, TransitionProps), {}, {
4144
- style: {
4145
- transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
4146
- },
4147
- children: /*#__PURE__*/jsx(Paper, {
4148
- children: /*#__PURE__*/jsx(ClickAwayListener, {
4149
- onClickAway: handleClose,
4150
- children: /*#__PURE__*/jsxs(MenuList, {
4151
- autoFocusItem: open,
4152
- id: "menu-list-grow",
4153
- onKeyDown: handleListKeyDown,
4154
- children: [/*#__PURE__*/jsx(MenuItem, {
4155
- style: {
4156
- display: !visibile ? 'block' : 'none'
4157
- },
4158
- onClick: function onClick(e) {
4159
- handleClose(e);
4160
- setVisibile(true);
4161
- },
4162
- children: t('basket.priceOverview.actions.showOrder')
4163
- }), /*#__PURE__*/jsx(MenuItem, {
4164
- style: {
4165
- display: visibile ? 'block' : 'none'
4166
- },
4167
- onClick: function onClick(e) {
4168
- handleClose(e);
4169
- setVisibile(false);
4170
- },
4171
- children: t('basket.priceOverview.actions.hideOrder')
4172
- }), /*#__PURE__*/jsx(MenuItem, {
4173
- onClick: function onClick(e) {
4174
- handleClose(e);
4175
- openInfo();
4176
- },
4177
- children: t('basket.priceOverview.actions.openInfo')
4178
- })]
4179
- })
4162
+ })]
4163
+ }), /*#__PURE__*/jsx(Popper, {
4164
+ sx: {
4165
+ zIndex: 1
4166
+ },
4167
+ open: open,
4168
+ anchorEl: anchorRef.current,
4169
+ role: undefined,
4170
+ transition: true,
4171
+ disablePortal: true,
4172
+ children: function children(_ref2) {
4173
+ var TransitionProps = _ref2.TransitionProps,
4174
+ placement = _ref2.placement;
4175
+ return /*#__PURE__*/jsx(Grow, _objectSpread$w(_objectSpread$w({}, TransitionProps), {}, {
4176
+ style: {
4177
+ transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
4178
+ },
4179
+ children: /*#__PURE__*/jsx(Paper, {
4180
+ children: /*#__PURE__*/jsx(ClickAwayListener, {
4181
+ onClickAway: handleClose,
4182
+ children: /*#__PURE__*/jsxs(MenuList, {
4183
+ autoFocusItem: open,
4184
+ id: "menu-list-grow",
4185
+ onKeyDown: handleListKeyDown,
4186
+ children: [/*#__PURE__*/jsx(MenuItem, {
4187
+ style: {
4188
+ display: !visibile ? 'block' : 'none'
4189
+ },
4190
+ onClick: function onClick(e) {
4191
+ handleClose(e);
4192
+ setVisibile(true);
4193
+ },
4194
+ children: t('basket.priceOverview.actions.showOrder')
4195
+ }), /*#__PURE__*/jsx(MenuItem, {
4196
+ style: {
4197
+ display: visibile ? 'block' : 'none'
4198
+ },
4199
+ onClick: function onClick(e) {
4200
+ handleClose(e);
4201
+ setVisibile(false);
4202
+ },
4203
+ children: t('basket.priceOverview.actions.hideOrder')
4204
+ }), /*#__PURE__*/jsx(MenuItem, {
4205
+ onClick: function onClick(e) {
4206
+ handleClose(e);
4207
+ openInfo();
4208
+ },
4209
+ children: t('basket.priceOverview.actions.openInfo')
4210
+ })]
4180
4211
  })
4181
4212
  })
4182
- }));
4183
- }
4184
- })]
4185
- })
4213
+ })
4214
+ }));
4215
+ }
4216
+ })]
4186
4217
  });
4187
4218
  }
4188
4219
 
@@ -5319,8 +5350,7 @@ function Step2ClientData(_ref) {
5319
5350
  function StatusMenu(_ref) {
5320
5351
  var visibleStatus = _ref.visibleStatus,
5321
5352
  status = _ref.status,
5322
- setStatus = _ref.setStatus,
5323
- productSaved = _ref.productSaved;
5353
+ setStatus = _ref.setStatus;
5324
5354
  var handleClick = function handleClick(item) {
5325
5355
  setStatus(item);
5326
5356
  };
@@ -5345,7 +5375,6 @@ function StatusMenu(_ref) {
5345
5375
  onClick: function onClick() {
5346
5376
  return handleClick(item);
5347
5377
  },
5348
- disabled: productSaved && item !== 'BASE_CONFIGURATION',
5349
5378
  children: t('data.' + item, item)
5350
5379
  }, item);
5351
5380
  })
@@ -5746,7 +5775,7 @@ var HQ_RenderingTypeSource = [{
5746
5775
 
5747
5776
  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; }
5748
5777
  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; }
5749
- function useProduct(basket) {
5778
+ function useProduct() {
5750
5779
  var _useState = useState(undefined),
5751
5780
  _useState2 = _slicedToArray(_useState, 2),
5752
5781
  currentProduct = _useState2[0],
@@ -5754,7 +5783,7 @@ function useProduct(basket) {
5754
5783
  var _useDivaCore = useDivaCore(),
5755
5784
  productHandler = _useDivaCore.handler.productHandler;
5756
5785
  var loadProduct = /*#__PURE__*/function () {
5757
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
5786
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(basket) {
5758
5787
  var _myProduct$baseData$p;
5759
5788
  var myProduct;
5760
5789
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -5763,7 +5792,8 @@ function useProduct(basket) {
5763
5792
  _context.next = 2;
5764
5793
  return productHandler.loadProducts({
5765
5794
  basket: new BasketData(basket),
5766
- divaNr: basket.DivaNr
5795
+ productData: currentProduct !== null && currentProduct !== void 0 ? currentProduct : undefined,
5796
+ getUniqueNewDivaNr: true
5767
5797
  });
5768
5798
  case 2:
5769
5799
  myProduct = _context.sent;
@@ -5777,13 +5807,10 @@ function useProduct(basket) {
5777
5807
  }
5778
5808
  }, _callee);
5779
5809
  }));
5780
- return function loadProduct() {
5810
+ return function loadProduct(_x) {
5781
5811
  return _ref.apply(this, arguments);
5782
5812
  };
5783
5813
  }();
5784
- useEffect(function () {
5785
- loadProduct();
5786
- }, [basket]);
5787
5814
  var saveProduct = /*#__PURE__*/function () {
5788
5815
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(favourite) {
5789
5816
  var _myproduct$0$parent;
@@ -5805,17 +5832,16 @@ function useProduct(basket) {
5805
5832
  break;
5806
5833
  }
5807
5834
  _context2.next = 7;
5808
- return productHandler.apiMarkAsFavorite(currentProduct._id, basket.OrganizationId);
5835
+ return productHandler.apiMarkAsFavorite(currentProduct._id, currentProduct.organizationId);
5809
5836
  case 7:
5810
5837
  setCurrentProduct(currentProduct);
5811
- basket.DocumentVersion = basket.DocumentVersion + 1;
5812
- case 9:
5838
+ case 8:
5813
5839
  case "end":
5814
5840
  return _context2.stop();
5815
5841
  }
5816
5842
  }, _callee2);
5817
5843
  }));
5818
- return function saveProduct(_x) {
5844
+ return function saveProduct(_x2) {
5819
5845
  return _ref2.apply(this, arguments);
5820
5846
  };
5821
5847
  }();
@@ -5853,12 +5879,250 @@ function styleInject(css, ref) {
5853
5879
  }
5854
5880
  }
5855
5881
 
5856
- var paperContainer = "paperContainer-9grpT";
5857
- var hqMediaHeaderContainer = "hqMediaHeaderContainer-PlXdo";
5858
- var hqmediaContainer = "hqmediaContainer-sBjym";
5859
- var hqMediaTitle = "hqMediaTitle-ugda8";
5860
- var css_248z$a = ".paperContainer-9grpT {\n height: 68vh;\n margin-left: 50px;\n margin-right: 50px;\n margin-top: 10px;\n}\n\n.hqMediaHeaderContainer-PlXdo {\n display: flex;\n justify-content: space-between;\n padding-left: 15px;\n}\n\n.hqmediaContainer-sBjym {\n height: 90%;\n border: 1px solid rgb(224, 224, 224);\n}\n.hqMediaTitle-ugda8 {\n font-size: 20px;\n font-weight: normal;\n color: #333;\n padding: 10px 0;\n}\n";
5861
- styleInject(css_248z$a);
5882
+ var container$1 = "container-3kPdM";
5883
+ var mainStack = "mainStack-1xE4c";
5884
+ var productContainer = "productContainer-JcVn0";
5885
+ var productNameContainer = "productNameContainer-35ZZc";
5886
+ var productNameField = "productNameField-hPNbW";
5887
+ var productImage = "productImage-Vn0l-";
5888
+ var hidden$1 = "hidden-zZ8fS";
5889
+ var productDetailsContainer = "productDetailsContainer-5c-V9";
5890
+ var productDetailRow = "productDetailRow-9KtDG";
5891
+ var productDetailLabel = "productDetailLabel-t7Mn7";
5892
+ var favoriteContainer = "favoriteContainer-ka7lC";
5893
+ var favoriteCheckbox = "favoriteCheckbox-JYnH-";
5894
+ var actionButtonContainer = "actionButtonContainer-WfYfD";
5895
+ var productDetailsPaper = "productDetailsPaper-VsWfW";
5896
+ var productDetailText = "productDetailText-wkk6U";
5897
+ var productDetailSkeleton = "productDetailSkeleton-3-RLq";
5898
+ var productDetailDivider = "productDetailDivider-C1Cdh";
5899
+ var alertTitle = "alertTitle-Bm1NO";
5900
+ var css_248z$b = ".container-3kPdM {\n padding-bottom: 10px;\n margin-top: 2px;\n}\n\n.mainStack-1xE4c {\n width: 100%;\n margin-top: 16px;\n}\n\n.productContainer-JcVn0 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-bottom: 16px;\n width: 100%;\n}\n\n.productNameContainer-35ZZc {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n}\n\n.productNameField-hPNbW {\n margin: 8px;\n width: 70%;\n}\n\n.productImage-Vn0l- {\n width: 70%;\n display: block;\n}\n\n.productImage-Vn0l-.hidden-zZ8fS {\n display: none;\n}\n\n.productDetailsContainer-5c-V9 {\n margin: 20px;\n max-height: 100%;\n}\n\n.productDetailRow-9KtDG {\n display: flex;\n}\n\n.productDetailLabel-t7Mn7 {\n font-weight: 600;\n width: 40%;\n}\n\n.favoriteContainer-ka7lC {\n display: flex;\n align-items: center;\n margin-top: 16px;\n}\n.favoriteCheckbox-JYnH- {\n margin-left: 10px;\n}\n\n.actionButtonContainer-WfYfD {\n display: flex;\n gap: 16px;\n margin-top: 16px;\n justify-content: right;\n}\n@media (max-width: 768px) {\n .actionButtonContainer-WfYfD {\n display: flex;\n justify-content: space-between;\n }\n}\n\n.productDetailsPaper-VsWfW {\n width: 100%;\n max-height: 100%;\n overflow: auto;\n}\n\n.productDetailText-wkk6U {\n white-space: pre-wrap;\n}\n\n.productDetailSkeleton-3-RLq {\n margin-left: 30px;\n height: 28px;\n}\n\n.productDetailDivider-C1Cdh {\n margin-bottom: 16px;\n}\n\n.alertTitle-Bm1NO {\n font-weight: 600;\n}\n\n/* Responsive styles */\n@media (min-width: 900px) {\n .productDetailsPaper-VsWfW {\n width: 60%;\n }\n}\n";
5901
+ styleInject(css_248z$b);
5902
+
5903
+ function Step3Product(_ref) {
5904
+ var _currentProduct$short, _currentProduct$image, _currentProduct$techn;
5905
+ var currentProduct = _ref.currentProduct,
5906
+ startWithEmptyBasket = _ref.startWithEmptyBasket,
5907
+ handleSave = _ref.handleSave;
5908
+ var _useTranslation = useTranslation(),
5909
+ t = _useTranslation.t;
5910
+ var _useState = useState(false),
5911
+ _useState2 = _slicedToArray(_useState, 2),
5912
+ imgIsLoaded = _useState2[0],
5913
+ setImgIsLoaded = _useState2[1];
5914
+ var _useState3 = useState(false),
5915
+ _useState4 = _slicedToArray(_useState3, 2),
5916
+ isFavorite = _useState4[0],
5917
+ setIsFavorite = _useState4[1];
5918
+ var _useState5 = useState(false),
5919
+ _useState6 = _slicedToArray(_useState5, 2),
5920
+ dataIsReady = _useState6[0],
5921
+ setDataIsReady = _useState6[1];
5922
+ var _useState7 = useState(false),
5923
+ _useState8 = _slicedToArray(_useState7, 2),
5924
+ editProductName = _useState8[0],
5925
+ setEditProductName = _useState8[1];
5926
+ var _useState9 = useState((_currentProduct$short = currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.shortDescription) !== null && _currentProduct$short !== void 0 ? _currentProduct$short : ''),
5927
+ _useState10 = _slicedToArray(_useState9, 2),
5928
+ text = _useState10[0],
5929
+ setText = _useState10[1];
5930
+ useEffect(function () {
5931
+ setText(currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.shortDescription);
5932
+ }, [currentProduct]);
5933
+ var handleEditProductName = function handleEditProductName() {
5934
+ setEditProductName(true);
5935
+ };
5936
+ var handleBlur = function handleBlur() {
5937
+ setEditProductName(false);
5938
+ };
5939
+ var handleChangeProductName = function handleChangeProductName(event) {
5940
+ currentProduct.shortDescription = event.target.value;
5941
+ setText(event.target.value);
5942
+ };
5943
+ var handleFavoriteToggle = function handleFavoriteToggle() {
5944
+ setIsFavorite(!isFavorite);
5945
+ };
5946
+ useEffect(function () {
5947
+ setDataIsReady(currentProduct && imgIsLoaded);
5948
+ }, [currentProduct, imgIsLoaded]);
5949
+ return /*#__PURE__*/jsxs(Box, {
5950
+ className: container$1,
5951
+ children: [/*#__PURE__*/jsx(InfoAlert$1, {
5952
+ type: "info",
5953
+ content: /*#__PURE__*/jsx(Fragment, {
5954
+ children: t('basket.checkout.step4.info')
5955
+ })
5956
+ }), /*#__PURE__*/jsxs(Stack, {
5957
+ direction: {
5958
+ xs: 'column',
5959
+ md: 'row'
5960
+ },
5961
+ spacing: 2,
5962
+ className: mainStack,
5963
+ children: [/*#__PURE__*/jsxs(Box, {
5964
+ sx: {
5965
+ width: {
5966
+ xs: '100%',
5967
+ md: '40%'
5968
+ }
5969
+ },
5970
+ children: [/*#__PURE__*/jsx(Paper$1, {
5971
+ variant: "outlined",
5972
+ children: /*#__PURE__*/jsxs("div", {
5973
+ className: productContainer,
5974
+ children: [/*#__PURE__*/jsxs("div", {
5975
+ className: productNameContainer,
5976
+ children: [editProductName ? /*#__PURE__*/jsx(TextField, {
5977
+ variant: "standard",
5978
+ value: text,
5979
+ onChange: handleChangeProductName,
5980
+ onBlur: handleBlur,
5981
+ autoFocus: true,
5982
+ className: productNameField
5983
+ }) : dataIsReady ? /*#__PURE__*/jsx("h2", {
5984
+ children: text
5985
+ }) : /*#__PURE__*/jsx(Skeleton, {
5986
+ animation: "wave",
5987
+ variant: "text",
5988
+ width: "50%",
5989
+ height: 50
5990
+ }), !editProductName && /*#__PURE__*/jsx(IconButton$1, {
5991
+ size: "small",
5992
+ onClick: handleEditProductName,
5993
+ children: /*#__PURE__*/jsx(EditIcon, {
5994
+ fontSize: "small"
5995
+ })
5996
+ })]
5997
+ }), /*#__PURE__*/jsx("img", {
5998
+ src: (_currentProduct$image = currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image) !== null && _currentProduct$image !== void 0 ? _currentProduct$image : currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image2D,
5999
+ className: "".concat(productImage, " ").concat(!dataIsReady ? hidden$1 : ''),
6000
+ alt: "Product",
6001
+ onLoad: function onLoad() {
6002
+ return setImgIsLoaded(true);
6003
+ }
6004
+ }), !dataIsReady && /*#__PURE__*/jsx(Skeleton, {
6005
+ animation: "wave",
6006
+ variant: "text",
6007
+ width: "75%",
6008
+ height: 300
6009
+ })]
6010
+ })
6011
+ }), /*#__PURE__*/jsx(Box, {
6012
+ className: favoriteContainer,
6013
+ children: /*#__PURE__*/jsx(InfoAlert$1, {
6014
+ type: "warning",
6015
+ icon: /*#__PURE__*/jsx(StarBorderIcon, {}),
6016
+ title: t('basket.checkout.step4.favorite'),
6017
+ content: /*#__PURE__*/jsxs(Fragment, {
6018
+ children: [/*#__PURE__*/jsx(Typography, {
6019
+ mb: 1,
6020
+ children: t('basket.checkout.step4.favoriteinfo')
6021
+ }), /*#__PURE__*/jsx(FormControlLabel$1, {
6022
+ disabled: !dataIsReady,
6023
+ control: /*#__PURE__*/jsx(Checkbox$1, {
6024
+ className: favoriteCheckbox,
6025
+ checked: isFavorite,
6026
+ onChange: handleFavoriteToggle
6027
+ }),
6028
+ label: t('basket.checkout.step4.savemsg')
6029
+ })]
6030
+ })
6031
+ })
6032
+ }), /*#__PURE__*/jsxs(Box, {
6033
+ className: actionButtonContainer,
6034
+ children: [/*#__PURE__*/jsx(Button$1, {
6035
+ variant: "contained",
6036
+ onClick: function onClick() {
6037
+ return handleSave(undefined, false, isFavorite);
6038
+ },
6039
+ disabled: !dataIsReady,
6040
+ children: t('basket.checkout.step4.saveproduct')
6041
+ }), /*#__PURE__*/jsx(Button$1, {
6042
+ onClick: startWithEmptyBasket,
6043
+ variant: "outlined",
6044
+ disabled: !dataIsReady,
6045
+ children: t('basket.checkout.step4.cancel')
6046
+ })]
6047
+ })]
6048
+ }), /*#__PURE__*/jsx(Paper$1, {
6049
+ variant: "outlined",
6050
+ className: productDetailsPaper,
6051
+ children: /*#__PURE__*/jsxs("div", {
6052
+ className: productDetailsContainer,
6053
+ children: [/*#__PURE__*/jsx("h2", {
6054
+ children: t('basket.checkout.step3.productdetails')
6055
+ }), !dataIsReady && /*#__PURE__*/jsx(Fragment, {
6056
+ children: _toConsumableArray(Array(13)).map(function (_, index) {
6057
+ return /*#__PURE__*/jsxs(Box, {
6058
+ className: productDetailRow,
6059
+ children: [/*#__PURE__*/jsx(Skeleton, {
6060
+ animation: "wave",
6061
+ variant: "text",
6062
+ width: "40%",
6063
+ className: productDetailSkeleton
6064
+ }), /*#__PURE__*/jsx(Skeleton, {
6065
+ animation: "wave",
6066
+ variant: "text",
6067
+ width: "60%",
6068
+ className: productDetailSkeleton
6069
+ }), index < 12 && /*#__PURE__*/jsx(Divider$1, {
6070
+ className: productDetailDivider
6071
+ })]
6072
+ }, index);
6073
+ })
6074
+ }), dataIsReady && (currentProduct === null || currentProduct === void 0 || (_currentProduct$techn = currentProduct.technicalDescription) === null || _currentProduct$techn === void 0 ? void 0 : _currentProduct$techn.split('\n').map(function (line, index) {
6075
+ var _currentProduct$techn2;
6076
+ var formattedLine = line.trim().endsWith(',') ? line.slice(0, -1) : line;
6077
+ var _formattedLine$split = formattedLine.split(':'),
6078
+ _formattedLine$split2 = _toArray(_formattedLine$split),
6079
+ firstPart = _formattedLine$split2[0],
6080
+ rest = _formattedLine$split2.slice(1);
6081
+ var formattedFirstPart = firstPart.trim();
6082
+ var formattedRest = rest.join(':').trim();
6083
+ return /*#__PURE__*/jsxs("div", {
6084
+ children: [/*#__PURE__*/jsx(Typography, {
6085
+ sx: {
6086
+ fontSize: {
6087
+ xs: '12px',
6088
+ md: '1rem'
6089
+ }
6090
+ },
6091
+ className: productDetailText,
6092
+ children: /*#__PURE__*/jsxs(Box, {
6093
+ className: productDetailRow,
6094
+ children: [/*#__PURE__*/jsxs("span", {
6095
+ className: productDetailLabel,
6096
+ children: [formattedFirstPart, ":"]
6097
+ }), /*#__PURE__*/jsx("span", {
6098
+ children: formattedRest
6099
+ })]
6100
+ })
6101
+ }), index < (currentProduct === null || currentProduct === void 0 || (_currentProduct$techn2 = currentProduct.technicalDescription) === null || _currentProduct$techn2 === void 0 ? void 0 : _currentProduct$techn2.split('\n').length) - 1 && /*#__PURE__*/jsx(Divider$1, {
6102
+ className: productDetailDivider
6103
+ })]
6104
+ }, index);
6105
+ }))]
6106
+ })
6107
+ })]
6108
+ })]
6109
+ });
6110
+ }
6111
+ function InfoAlert$1(_ref2) {
6112
+ var type = _ref2.type,
6113
+ content = _ref2.content,
6114
+ title = _ref2.title,
6115
+ icon = _ref2.icon;
6116
+ return /*#__PURE__*/jsxs(Alert, {
6117
+ variant: "outlined",
6118
+ severity: type,
6119
+ icon: icon,
6120
+ children: [title && /*#__PURE__*/jsx(AlertTitle, {
6121
+ className: alertTitle,
6122
+ children: title
6123
+ }), content]
6124
+ });
6125
+ }
5862
6126
 
5863
6127
  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; }
5864
6128
  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; }
@@ -5875,23 +6139,25 @@ function CheckOut(_ref) {
5875
6139
  updateBasket = _ref.updateBasket,
5876
6140
  statusArray = _ref.statusArray,
5877
6141
  configSaveButtons = _ref.configSaveButtons,
5878
- gdpr = _ref.gdpr;
6142
+ gdpr = _ref.gdpr,
6143
+ setCurrentProduct = _ref.setCurrentProduct,
6144
+ setProductSaved = _ref.setProductSaved;
5879
6145
  var _useState = useState(false),
5880
6146
  _useState2 = _slicedToArray(_useState, 2),
5881
6147
  isSaving = _useState2[0],
5882
6148
  setIsSaving = _useState2[1];
5883
6149
  var _useState3 = useState(false),
5884
6150
  _useState4 = _slicedToArray(_useState3, 2),
5885
- isSaved = _useState4[0],
5886
- setIsSaved = _useState4[1];
6151
+ isSaved = _useState4[0];
6152
+ _useState4[1];
5887
6153
  var _useState5 = useState(false),
5888
6154
  _useState6 = _slicedToArray(_useState5, 2),
5889
- showRenderJobs = _useState6[0],
5890
- setShowRenderJobs = _useState6[1];
5891
- var _useState7 = useState(false),
5892
- _useState8 = _slicedToArray(_useState7, 2),
5893
- basket3DExportChecked = _useState8[0],
5894
- setBasket3DExportChecked = _useState8[1];
6155
+ basket3DExportChecked = _useState6[0],
6156
+ setBasket3DExportChecked = _useState6[1];
6157
+ var _useProduct = useProduct(),
6158
+ currentProduct = _useProduct.currentProduct,
6159
+ loadProduct = _useProduct.loadProduct,
6160
+ saveProduct = _useProduct.saveProduct;
5895
6161
  var _useTranslation = useTranslation(),
5896
6162
  t = _useTranslation.t;
5897
6163
  var _useSellerState = useSellerState(),
@@ -5901,15 +6167,10 @@ function CheckOut(_ref) {
5901
6167
  userHasPermission = _useDivaCore$actions.userHasPermission,
5902
6168
  toggleLoading = _useDivaCore$actions.toggleLoading,
5903
6169
  openModal = _useDivaCore$actions.openModal,
5904
- productHandler = _useDivaCore.handler.productHandler,
5905
6170
  _useDivaCore$state = _useDivaCore.state,
5906
6171
  apiConfig = _useDivaCore$state.apiConfig,
5907
6172
  jwt = _useDivaCore$state.jwt,
5908
6173
  organization = _useDivaCore$state.organization;
5909
- var _useProduct = useProduct(basket),
5910
- currentProduct = _useProduct.currentProduct,
5911
- loadProduct = _useProduct.loadProduct,
5912
- saveProduct = _useProduct.saveProduct;
5913
6174
  useEffect(function () {
5914
6175
  var fetchProduct = /*#__PURE__*/function () {
5915
6176
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
@@ -5921,7 +6182,7 @@ function CheckOut(_ref) {
5921
6182
  break;
5922
6183
  }
5923
6184
  _context.next = 3;
5924
- return loadProduct();
6185
+ return loadProduct(basket);
5925
6186
  case 3:
5926
6187
  case "end":
5927
6188
  return _context.stop();
@@ -5933,75 +6194,50 @@ function CheckOut(_ref) {
5933
6194
  };
5934
6195
  }();
5935
6196
  fetchProduct();
5936
- setShowRenderJobs(false);
5937
6197
  }, [status]);
5938
- var saveProductAndShowHqMedia = /*#__PURE__*/function () {
5939
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
5940
- var myProduct;
5941
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
5942
- while (1) switch (_context2.prev = _context2.next) {
5943
- case 0:
5944
- _context2.next = 2;
5945
- return loadProduct();
5946
- case 2:
5947
- myProduct = _context2.sent;
5948
- if (!(!myProduct || myProduct.isNew)) {
5949
- _context2.next = 11;
5950
- break;
5951
- }
5952
- toggleLoading('saveProduct');
5953
- _context2.next = 7;
5954
- return saveProduct();
5955
- case 7:
5956
- toggleLoading('saveProduct');
5957
- setShowRenderJobs(true);
5958
- _context2.next = 12;
5959
- break;
5960
- case 11:
5961
- setShowRenderJobs(true);
5962
- case 12:
5963
- case "end":
5964
- return _context2.stop();
5965
- }
5966
- }, _callee2);
5967
- }));
5968
- return function saveProductAndShowHqMedia() {
5969
- return _ref3.apply(this, arguments);
5970
- };
5971
- }();
6198
+ useEffect(function () {
6199
+ var fetchProduct = /*#__PURE__*/function () {
6200
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
6201
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
6202
+ while (1) switch (_context2.prev = _context2.next) {
6203
+ case 0:
6204
+ if (currentProduct) {
6205
+ setCurrentProduct(currentProduct);
6206
+ }
6207
+ case 1:
6208
+ case "end":
6209
+ return _context2.stop();
6210
+ }
6211
+ }, _callee2);
6212
+ }));
6213
+ return function fetchProduct() {
6214
+ return _ref3.apply(this, arguments);
6215
+ };
6216
+ }();
6217
+ fetchProduct();
6218
+ }, [currentProduct]);
5972
6219
  var handleSave = useCallback(/*#__PURE__*/function () {
5973
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail, favourite, hqMedia) {
6220
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail, isFav) {
5974
6221
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
5975
6222
  while (1) switch (_context4.prev = _context4.next) {
5976
6223
  case 0:
5977
6224
  if (!(status === 'BASE_CONFIGURATION')) {
5978
- _context4.next = 13;
5979
- break;
5980
- }
5981
- if (!hqMedia) {
5982
- _context4.next = 6;
6225
+ _context4.next = 8;
5983
6226
  break;
5984
6227
  }
6228
+ toggleLoading('saveProduct');
5985
6229
  _context4.next = 4;
5986
- return saveProductAndShowHqMedia();
6230
+ return saveProduct(isFav);
5987
6231
  case 4:
5988
- _context4.next = 11;
5989
- break;
5990
- case 6:
5991
- toggleLoading('saveProduct');
5992
- _context4.next = 9;
5993
- return saveProduct(favourite);
5994
- case 9:
5995
6232
  toggleLoading('saveProduct');
5996
6233
  openModal({
5997
6234
  title: t('basket.checkout.productsavedtitle'),
5998
6235
  accept: true,
5999
6236
  text: t('basket.checkout.productsavedtext')
6000
6237
  });
6001
- case 11:
6002
- setIsSaved(true);
6238
+ setProductSaved(true);
6003
6239
  return _context4.abrupt("return");
6004
- case 13:
6240
+ case 8:
6005
6241
  if (!isSaving) {
6006
6242
  setIsSaving(true);
6007
6243
  onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
@@ -6035,20 +6271,20 @@ function CheckOut(_ref) {
6035
6271
  }
6036
6272
  }, _callee3);
6037
6273
  }));
6038
- return function (_x5) {
6274
+ return function (_x4) {
6039
6275
  return _ref5.apply(this, arguments);
6040
6276
  };
6041
6277
  }())["catch"](function () {
6042
6278
  return setIsSaving(false);
6043
6279
  });
6044
6280
  }
6045
- case 14:
6281
+ case 9:
6046
6282
  case "end":
6047
6283
  return _context4.stop();
6048
6284
  }
6049
6285
  }, _callee4);
6050
6286
  }));
6051
- return function (_x, _x2, _x3, _x4) {
6287
+ return function (_x, _x2, _x3) {
6052
6288
  return _ref4.apply(this, arguments);
6053
6289
  };
6054
6290
  }(), [isSaving, onClickSave, basket3DExportChecked]);
@@ -6058,13 +6294,6 @@ function CheckOut(_ref) {
6058
6294
  basket[key] = data[key];
6059
6295
  }
6060
6296
  };
6061
- var onErrorHqMedia = function onErrorHqMedia(error) {
6062
- openModal({
6063
- title: t('Error'),
6064
- accept: true,
6065
- text: t('basket.checkout.errorhqmediatext')
6066
- });
6067
- };
6068
6297
 
6069
6298
  // for LEAFLET don't show printOptions, if there are any configured.
6070
6299
  var finalSchema = _objectSpread$r(_objectSpread$r({}, uiSchema), {}, {
@@ -6103,59 +6332,11 @@ function CheckOut(_ref) {
6103
6332
  productSaved: isSaved
6104
6333
  })]
6105
6334
  }), /*#__PURE__*/jsxs("div", {
6106
- children: [showRenderJobs && /*#__PURE__*/jsxs(Paper$1, {
6107
- elevation: 4,
6108
- className: paperContainer,
6109
- children: [/*#__PURE__*/jsxs("div", {
6110
- className: hqMediaHeaderContainer,
6111
- children: [/*#__PURE__*/jsx("div", {
6112
- className: hqMediaTitle,
6113
- children: "HQ Medien"
6114
- }), /*#__PURE__*/jsx(Button$1, {
6115
- onClick: function onClick() {
6116
- return setShowRenderJobs(false);
6117
- },
6118
- children: /*#__PURE__*/jsx(CloseIcon, {})
6119
- })]
6120
- }), /*#__PURE__*/jsx("div", {
6121
- className: hqmediaContainer,
6122
- children: /*#__PURE__*/jsx(OrderEntry, {
6123
- variantData: [],
6124
- baseData: currentProduct,
6125
- basketData: basket,
6126
- onSave: function onSave() {
6127
- return productHandler.saveProducts({
6128
- products: [currentProduct]
6129
- }).then(function (r) {
6130
- return !!r.length;
6131
- });
6132
- },
6133
- saved: true,
6134
- onError: function onError() {
6135
- return onErrorHqMedia;
6136
- }
6137
- })
6138
- })]
6139
- }), status === 'BASE_CONFIGURATION' && !showRenderJobs && /*#__PURE__*/jsx(Fragment, {
6140
- children: /*#__PURE__*/jsxs("div", {
6141
- style: {
6142
- margin: '1rem',
6143
- marginLeft: '150px',
6144
- display: 'flex',
6145
- alignItems: 'center',
6146
- gap: 25
6147
- },
6148
- children: [/*#__PURE__*/jsx("img", {
6149
- src: currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image,
6150
- height: 250
6151
- }), /*#__PURE__*/jsx("div", {
6152
- style: {
6153
- whiteSpace: 'pre-wrap'
6154
- },
6155
- children: currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.technicalDescription
6156
- })]
6157
- })
6158
- }), status !== 'BASE_CONFIGURATION' && !showRenderJobs && /*#__PURE__*/jsxs(Fragment, {
6335
+ children: [status === 'BASE_CONFIGURATION' && /*#__PURE__*/jsx(Step3Product, {
6336
+ startWithEmptyBasket: startWithEmptyBasket,
6337
+ currentProduct: currentProduct,
6338
+ handleSave: handleSave
6339
+ }), status !== 'BASE_CONFIGURATION' && /*#__PURE__*/jsxs(Fragment, {
6159
6340
  children: [/*#__PURE__*/jsx("div", {
6160
6341
  style: {
6161
6342
  margin: '1rem',
@@ -6172,7 +6353,7 @@ function CheckOut(_ref) {
6172
6353
  }), !!renderService && permissionAnyHqRenderBox && (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && /*#__PURE__*/jsx(HqRenderBox, {
6173
6354
  basket: basket,
6174
6355
  config: renderService
6175
- }), (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].arReady) && organization.settings.enable3DExport && /*#__PURE__*/jsxs("div", {
6356
+ }), (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && organization.settings.enable3DExport && /*#__PURE__*/jsxs("div", {
6176
6357
  style: {
6177
6358
  marginLeft: '50px',
6178
6359
  width: '700px'
@@ -6200,7 +6381,7 @@ function CheckOut(_ref) {
6200
6381
  })
6201
6382
  })]
6202
6383
  })]
6203
- }), !showRenderJobs && /*#__PURE__*/jsx(SaveButtonsGroup, {
6384
+ }), status !== 'BASE_CONFIGURATION' && /*#__PURE__*/jsx(SaveButtonsGroup, {
6204
6385
  orderEmpty: !basket.OrderSets || basket.OrderSets.length == 0 || gdpr && !isEmpty(basket === null || basket === void 0 ? void 0 : basket.Client) && !basket.Gdpr,
6205
6386
  onClickSave: handleSave,
6206
6387
  startWithEmptyBasket: startWithEmptyBasket,
@@ -6464,7 +6645,10 @@ function Step3Checkout(_ref) {
6464
6645
  status = _ref.status,
6465
6646
  setStatus = _ref.setStatus,
6466
6647
  statusArray = _ref.statusArray,
6467
- config = _ref.config;
6648
+ config = _ref.config,
6649
+ currentProduct = _ref.currentProduct,
6650
+ setCurrentProduct = _ref.setCurrentProduct,
6651
+ setProductSaved = _ref.setProductSaved;
6468
6652
  var _useDivaCore = useDivaCore(),
6469
6653
  organization = _useDivaCore.state.organization;
6470
6654
  return /*#__PURE__*/jsx(CheckOut, {
@@ -6479,7 +6663,98 @@ function Step3Checkout(_ref) {
6479
6663
  updateBasket: updateBasket,
6480
6664
  renderService: config === null || config === void 0 || (_config$checkout3 = config.checkout) === null || _config$checkout3 === void 0 ? void 0 : _config$checkout3.renderService,
6481
6665
  configSaveButtons: (config === null || config === void 0 || (_config$checkout4 = config.checkout) === null || _config$checkout4 === void 0 ? void 0 : _config$checkout4.saveButtons) || ['SAVE', 'SAVE_AND_OPEN', 'SAVE_AND_SEND', 'NEW'],
6482
- gdpr: config === null || config === void 0 || (_config$checkout5 = config.checkout) === null || _config$checkout5 === void 0 ? void 0 : _config$checkout5.checkGdpr
6666
+ gdpr: config === null || config === void 0 || (_config$checkout5 = config.checkout) === null || _config$checkout5 === void 0 ? void 0 : _config$checkout5.checkGdpr,
6667
+ currentProduct: currentProduct,
6668
+ setCurrentProduct: setCurrentProduct,
6669
+ setProductSaved: setProductSaved
6670
+ });
6671
+ }
6672
+
6673
+ var infocontainer = "infocontainer-ir9gv";
6674
+ var css_248z$a = ".infocontainer-ir9gv {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
6675
+ styleInject(css_248z$a);
6676
+
6677
+ function Step4Checkout(_ref) {
6678
+ var currentProduct = _ref.currentProduct,
6679
+ basket = _ref.basket,
6680
+ productSaved = _ref.productSaved,
6681
+ is3dReady = _ref.is3dReady;
6682
+ var _useTranslation = useTranslation(),
6683
+ t = _useTranslation.t;
6684
+ var _useDivaCore = useDivaCore(),
6685
+ openModal = _useDivaCore.actions.openModal,
6686
+ productHandler = _useDivaCore.handler.productHandler;
6687
+ var onErrorHqMedia = function onErrorHqMedia(error) {
6688
+ openModal({
6689
+ title: t('Error'),
6690
+ accept: true,
6691
+ text: t('basket.checkout.errorhqmediatext')
6692
+ });
6693
+ };
6694
+ if (!is3dReady) {
6695
+ return /*#__PURE__*/jsx("div", {
6696
+ className: infocontainer,
6697
+ children: /*#__PURE__*/jsx(InfoAlert, {
6698
+ title: t('basket.checkout.step4.errortitle'),
6699
+ content: /*#__PURE__*/jsx(Fragment, {
6700
+ children: t('basket.checkout.step4.error3d')
6701
+ })
6702
+ })
6703
+ });
6704
+ }
6705
+ if (!productSaved) {
6706
+ return /*#__PURE__*/jsx("div", {
6707
+ className: infocontainer,
6708
+ children: /*#__PURE__*/jsx(InfoAlert, {
6709
+ title: t('basket.checkout.step4.errortitle'),
6710
+ content: /*#__PURE__*/jsx(Fragment, {
6711
+ children: t('basket.checkout.step4.productNotSaved')
6712
+ })
6713
+ })
6714
+ });
6715
+ }
6716
+ return /*#__PURE__*/jsxs(Box, {
6717
+ sx: {
6718
+ display: 'flex',
6719
+ flexDirection: 'column',
6720
+ gap: 2,
6721
+ height: '100%'
6722
+ },
6723
+ children: [/*#__PURE__*/jsx(InfoAlert, {
6724
+ content: /*#__PURE__*/jsxs(Fragment, {
6725
+ children: [t('basket.checkout.step4.hqmediainfo'), ":", ' ', /*#__PURE__*/jsx("a", {
6726
+ href: "https://www.diva-portal.de/digitalisierungs-service",
6727
+ target: "_blank",
6728
+ children: "www.diva-portal.de/digitalisierungs-service"
6729
+ })]
6730
+ })
6731
+ }), /*#__PURE__*/jsx(OrderEntry, {
6732
+ variantData: [],
6733
+ baseData: currentProduct,
6734
+ basketData: basket,
6735
+ onSave: function onSave() {
6736
+ return productHandler.saveProducts({
6737
+ products: [currentProduct]
6738
+ }).then(function (r) {
6739
+ return !!r.length;
6740
+ });
6741
+ },
6742
+ saved: true,
6743
+ onError: function onError() {
6744
+ return onErrorHqMedia;
6745
+ }
6746
+ })]
6747
+ });
6748
+ }
6749
+ function InfoAlert(_ref2) {
6750
+ var title = _ref2.title,
6751
+ content = _ref2.content;
6752
+ return /*#__PURE__*/jsxs(Alert$1, {
6753
+ variant: "outlined",
6754
+ severity: "info",
6755
+ children: [title && /*#__PURE__*/jsx(AlertTitle$1, {
6756
+ children: title
6757
+ }), content]
6483
6758
  });
6484
6759
  }
6485
6760
 
@@ -6487,7 +6762,7 @@ function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
6487
6762
  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; }
6488
6763
  var LOG$4 = getLogger('SellerBasket', 'Basket');
6489
6764
  function Basket(_ref) {
6490
- var _configurationData$Ch5;
6765
+ var _configurationData$Ch5, _currentBasket$OrderS5;
6491
6766
  var divaNr = _ref.divaNr,
6492
6767
  basket = _ref.basket,
6493
6768
  checkBasket = _ref.checkBasket;
@@ -6496,6 +6771,14 @@ function Basket(_ref) {
6496
6771
  _useState2 = _slicedToArray(_useState, 2),
6497
6772
  actBasketPage = _useState2[0],
6498
6773
  setActBasketPage = _useState2[1];
6774
+ var _useState3 = useState(),
6775
+ _useState4 = _slicedToArray(_useState3, 2),
6776
+ currentProduct = _useState4[0],
6777
+ setCurrentProduct = _useState4[1];
6778
+ var _useState5 = useState(false),
6779
+ _useState6 = _slicedToArray(_useState5, 2),
6780
+ productSaved = _useState6[0],
6781
+ setProductSaved = _useState6[1];
6499
6782
  var _useTranslation = useTranslation(),
6500
6783
  t = _useTranslation.t,
6501
6784
  i18n = _useTranslation.i18n;
@@ -6701,6 +6984,7 @@ function Basket(_ref) {
6701
6984
  message: t('basket.checkout.pdfqr'),
6702
6985
  type: 'big',
6703
6986
  clickable: true,
6987
+ qrCodeSize: 312,
6704
6988
  autoHideDuration: (_configurationData$Ch3 = configurationData === null || configurationData === void 0 || (_configurationData$Ch4 = configurationData.Checkout) === null || _configurationData$Ch4 === void 0 ? void 0 : _configurationData$Ch4.pdfQRAutoHideDuration) !== null && _configurationData$Ch3 !== void 0 ? _configurationData$Ch3 : 1000 * 60 * 2
6705
6989
  });
6706
6990
  }
@@ -6868,7 +7152,7 @@ function Basket(_ref) {
6868
7152
  config: configurationData === null || configurationData === void 0 ? void 0 : configurationData.Checkout,
6869
7153
  status: statusRef.current,
6870
7154
  documentVersion: currentBasket.getDocumentVersion(),
6871
- divaNr: currentBasket.DivaNr,
7155
+ divaNr: statusRef.current == 'BASE_CONFIGURATION' && currentProduct ? currentProduct.divaNr : currentBasket.DivaNr,
6872
7156
  actBasketPage: actBasketPage,
6873
7157
  setActBasketPage: setActBasketPage,
6874
7158
  showVKPExportButton: !!(vkpExportData !== null && vkpExportData !== void 0 && vkpExportData.callbackurl) || !!(configurationData !== null && configurationData !== void 0 && configurationData.VKPExportUrl),
@@ -6907,7 +7191,18 @@ function Basket(_ref) {
6907
7191
  onClickSave: onClickSave,
6908
7192
  statusArray: getBasketStatusArr(),
6909
7193
  updateBasket: update,
6910
- currentUser: currentUser
7194
+ currentUser: currentUser,
7195
+ currentProduct: currentProduct,
7196
+ setCurrentProduct: setCurrentProduct,
7197
+ setProductSaved: setProductSaved
7198
+ }), actBasketPage == 'Step4' && organization.settings.enableVKMarketing && /*#__PURE__*/jsx(Step4Checkout, {
7199
+ config: configurationData === null || configurationData === void 0 ? void 0 : configurationData.Checkout,
7200
+ basket: currentBasket,
7201
+ setActBasketPage: setActBasketPage,
7202
+ startWithEmptyBasket: startWithEmptyBasket,
7203
+ currentProduct: currentProduct,
7204
+ productSaved: productSaved,
7205
+ is3dReady: currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS5 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS5 !== void 0 && _currentBasket$OrderS5.HQRenderScript ? true : false
6911
7206
  })]
6912
7207
  })]
6913
7208
  });
@@ -6920,7 +7215,7 @@ var modelTitle = "model-title-Sgm-0";
6920
7215
  var description = "description-GyPZq";
6921
7216
  var pdf = "pdf-oNnao";
6922
7217
  var hidden = "hidden-xYPOr";
6923
- var css_248z$9 = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n height: 100%;\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\n}\n\n.title-iTDPA .MuiButtonBase-root {\n display: none;\n}\n\n.subTitle-4-0PW {\n padding: 12px 18px;\n font-size: 28px;\n}\n\n.description-container-k1vLT {\n display: flex;\n flex-direction: column;\n background-color: #f2f2f2;\n padding: 18px;\n gap: 12px;\n height: 100%;\n}\n\n.model-title-Sgm-0 {\n font-size: 24px;\n font-weight: 600;\n}\n.description-GyPZq {\n font-size: 16px;\n overflow: auto;\n flex-grow: 3;\n}\n\n.pdf-oNnao {\n display: 'flex';\n flex: 1 1 10px;\n}\n\n.pdf-oNnao svg {\n margin-right: 10px;\n}\n\n@media (max-width: 820px) {\n .wrapper-fSL18 {\n height: 75px;\n }\n .description-container-k1vLT {\n position: fixed;\n top: 22px;\n width: 80%;\n z-index: 101;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n margin-top: 135px;\n margin-left: -10px;\n transition: width 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n .title-iTDPA .MuiButtonBase-root {\n display: inline-flex;\n }\n .hidden-xYPOr .description-container-k1vLT {\n padding: 0;\n width: 0;\n }\n\n .hidden-xYPOr .model-title-Sgm-0 {\n display: none;\n }\n\n .hidden-xYPOr .description-GyPZq {\n display: none;\n }\n}\n";
7218
+ var css_248z$9 = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n height: 100%;\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\n}\n\n.title-iTDPA .MuiButtonBase-root {\n display: none;\n}\n\n.subTitle-4-0PW {\n padding: 12px 18px;\n font-size: 28px;\n}\n\n.description-container-k1vLT {\n display: flex;\n flex-direction: column;\n background-color: #f2f2f2;\n padding: 18px;\n gap: 12px;\n height: 100%;\n overflow: auto;\n}\n\n.model-title-Sgm-0 {\n font-size: 24px;\n font-weight: 600;\n}\n.description-GyPZq {\n font-size: 16px;\n overflow: auto;\n flex-grow: 3;\n scrollbar-width: thin;\n}\n\n.pdf-oNnao {\n display: 'flex';\n flex: 1 1 10px;\n}\n\n.pdf-oNnao svg {\n margin-right: 10px;\n}\n\n@media (max-width: 820px) {\n .wrapper-fSL18 {\n height: 75px;\n }\n .description-container-k1vLT {\n position: fixed;\n top: 22px;\n width: 80%;\n z-index: 101;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n margin-top: 135px;\n margin-left: -10px;\n transition: width 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n height: calc(100% - 195px);\n }\n .title-iTDPA .MuiButtonBase-root {\n display: inline-flex;\n }\n .hidden-xYPOr .description-container-k1vLT {\n padding: 0;\n width: 0;\n }\n\n .hidden-xYPOr .pdf-oNnao {\n display: none;\n }\n\n .hidden-xYPOr .model-title-Sgm-0 {\n display: none;\n }\n\n .hidden-xYPOr .description-GyPZq {\n display: none;\n }\n}\n";
6924
7219
  styleInject(css_248z$9);
6925
7220
 
6926
7221
  var _excluded$6 = ["data", "text"];
@@ -6975,8 +7270,9 @@ function Description$1 (_ref) {
6975
7270
  }
6976
7271
 
6977
7272
  var container = "container-Sr3pC";
7273
+ var iconOnly = "icon-only-2SJ6e";
6978
7274
  var icon$1 = "icon-0h-39";
6979
- var css_248z$8 = ".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-0h-39 {\n width: 24px;\n height: 24px;\n}\n";
7275
+ var css_248z$8 = ".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";
6980
7276
  styleInject(css_248z$8);
6981
7277
 
6982
7278
  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; }
@@ -7049,6 +7345,7 @@ function NavBar (buttons) {
7049
7345
  return /*#__PURE__*/jsxs("div", {
7050
7346
  className: container,
7051
7347
  children: [/*#__PURE__*/jsx(Button, {
7348
+ className: iconOnly,
7052
7349
  variant: "outlined",
7053
7350
  color: "primary",
7054
7351
  startIcon: /*#__PURE__*/jsx(NavBackSvg, {
@@ -7100,7 +7397,7 @@ var leftSide = "left-side-10jmj";
7100
7397
  var rightSide$1 = "right-side-64-Yz";
7101
7398
  var catalogImages = "catalog-images-jJGqW";
7102
7399
  var footer = "footer-1ONIt";
7103
- var css_248z$7 = ".layout-NhUpB {\n display: flex;\n height: 100%;\n flex-direction: column;\n}\n\n.content-t8Rtl {\n display: flex;\n flex: 1;\n overflow: auto;\n}\n\n.left-side-10jmj {\n width: 25%;\n min-width: 300px;\n}\n\n.right-side-64-Yz {\n display: flex;\n flex-direction: column;\n position: relative;\n flex: 1;\n overflow: auto;\n}\n\n.catalog-images-jJGqW {\n flex: 1;\n padding: 12px;\n}\n\n.footer-1ONIt {\n display: flex;\n justify-content: flex-end;\n}\n\n@media (max-width: 820px) {\n .content-t8Rtl {\n flex-direction: column;\n }\n}\n";
7400
+ var css_248z$7 = ".layout-NhUpB {\n display: flex;\n height: 100%;\n flex-direction: column;\n}\n\n.content-t8Rtl {\n display: flex;\n flex: 1;\n overflow: auto;\n}\n\n.left-side-10jmj {\n width: 25%;\n min-width: 300px;\n}\n\n.right-side-64-Yz {\n display: flex;\n flex-direction: column;\n position: relative;\n flex: 1;\n overflow: auto;\n justify-content: flex-end;\n}\n\n.catalog-images-jJGqW {\n flex: 1;\n padding: 12px;\n}\n\n.footer-1ONIt {\n display: flex;\n justify-content: flex-end;\n}\n\n@media (max-width: 820px) {\n .content-t8Rtl {\n flex-direction: column;\n }\n}\n";
7104
7401
  styleInject(css_248z$7);
7105
7402
 
7106
7403
  var wrapper$5 = "wrapper-D5Cmc";
@@ -7192,9 +7489,10 @@ var CatalogImages = function CatalogImages(_ref) {
7192
7489
  };
7193
7490
 
7194
7491
  var wrapper$4 = "wrapper-3d2zl";
7492
+ var fullHeight = "full-height-CQ8Cy";
7195
7493
  var tabBar = "tab-bar-lQQ28";
7196
7494
  var nothingFound = "nothing-found-0eqZ5";
7197
- var css_248z$5 = ".wrapper-3d2zl {\n max-height: 50%;\n overflow: hidden;\n}\n\n.wrapper-3d2zl.MuiAccordion-root.Mui-expanded {\n height: 50%;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-expanded {\n min-height: 0;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-focused {\n background-color: #fff8f8;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-content {\n justify-content: space-between;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiTabs-root {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n height: calc(100% - 46px) !important;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n scrollbar-width: thin;\n overflow-y: scroll;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapper {\n display: none;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root.MuiCollapse-entered .MuiCollapse-wrapper {\n display: flex;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner > div {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiAccordionDetails-root {\n height: calc(100% - 24px);\n width: calc(100% - 32px);\n}\n\n.tab-bar-lQQ28 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: #f8f8f8;\n height: 46px;\n}\n\n.nothing-found-0eqZ5 {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n flex-direction: column;\n gap: 15px;\n margin: auto;\n}\n";
7495
+ var css_248z$5 = ".wrapper-3d2zl {\n max-height: 50%;\n overflow: hidden;\n}\n\n.wrapper-3d2zl.MuiAccordion-root.Mui-expanded {\n height: 50%;\n}\n\n.wrapper-3d2zl.full-height-CQ8Cy {\n max-height: 100%;\n}\n\n.wrapper-3d2zl.full-height-CQ8Cy.MuiAccordion-root.Mui-expanded {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-expanded {\n min-height: 0;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-focused {\n background-color: #fff8f8;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-content {\n justify-content: space-between;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiTabs-root {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n height: calc(100% - 46px) !important;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n scrollbar-width: thin;\n overflow-y: scroll;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapper {\n display: none;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root.MuiCollapse-entered .MuiCollapse-wrapper {\n display: flex;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner > div {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiAccordionDetails-root {\n height: calc(100% - 24px);\n width: calc(100% - 32px);\n}\n\n.tab-bar-lQQ28 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: #f8f8f8;\n height: 46px;\n}\n\n.nothing-found-0eqZ5 {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n flex-direction: column;\n gap: 15px;\n margin: auto;\n}\n";
7198
7496
  styleInject(css_248z$5);
7199
7497
 
7200
7498
  var wrapper$3 = "wrapper-i9mNn";
@@ -7238,7 +7536,7 @@ function NothingFound (_ref) {
7238
7536
  children: [/*#__PURE__*/jsx(Typography$1, {
7239
7537
  variant: "body2",
7240
7538
  children: text
7241
- }), info && /*#__PURE__*/jsx(Alert, {
7539
+ }), info && /*#__PURE__*/jsx(Alert$2, {
7242
7540
  variant: "outlined",
7243
7541
  severity: "info",
7244
7542
  children: info
@@ -7250,7 +7548,8 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
7250
7548
  var _scroller$current, _scroller$current2;
7251
7549
  var catalogCodex = _ref.catalogCodex,
7252
7550
  onProductClick = _ref.onProductClick,
7253
- hideProducts = _ref.hideProducts;
7551
+ hideProducts = _ref.hideProducts,
7552
+ hideImages = _ref.hideImages;
7254
7553
  var _useSellerState = useSellerState(),
7255
7554
  configurationData = _useSellerState.state.configurationData;
7256
7555
  var _useState = useState(0),
@@ -7330,17 +7629,9 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
7330
7629
  }
7331
7630
  };
7332
7631
  if (hideAll || vzProductsState.loading || favoriteProductsState.loading) return /*#__PURE__*/jsx(Fragment, {});
7333
- /*#__PURE__*/jsx(ProductsComponent, {
7334
- productState: vzProductsState,
7335
- onClickFunction: onProductClick,
7336
- groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
7337
- galleryConfig: {
7338
- hidePrices: true
7339
- }
7340
- });
7341
- var isEmpty = tab == 0 ? vzProductsState.groups.length == 0 : favoriteProductsState.groups.length == 0;
7632
+ var isEmpty = selectedTab == 0 ? vzProductsState.groups.length == 0 : favoriteProductsState.groups.length == 0;
7342
7633
  return /*#__PURE__*/jsxs(Accordion, {
7343
- className: wrapper$4,
7634
+ className: classnames(wrapper$4, _defineProperty({}, fullHeight, hideImages)),
7344
7635
  expanded: shouldExpand,
7345
7636
  onChange: function onChange(_, exp) {
7346
7637
  return setExpanded(exp);
@@ -7354,7 +7645,7 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
7354
7645
  children: [showVZProducts && /*#__PURE__*/jsx(Tab, {
7355
7646
  label: t('info.products.shared'),
7356
7647
  value: 0
7357
- }), /*#__PURE__*/jsx(Tab, {
7648
+ }), showFavoriteProducts && /*#__PURE__*/jsx(Tab, {
7358
7649
  label: t('info.products.favorite'),
7359
7650
  value: 1
7360
7651
  })]
@@ -7370,7 +7661,10 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
7370
7661
  onClickFunction: onProductClick,
7371
7662
  groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
7372
7663
  galleryConfig: {
7373
- hidePrices: true
7664
+ hidePrices: true,
7665
+ imageWrapperStyle: {
7666
+ maxHeight: '200px'
7667
+ }
7374
7668
  }
7375
7669
  }), isEmpty && /*#__PURE__*/jsx(NothingFound, {
7376
7670
  text: selectedTab == 0 ? t('info.products.novzproducts') : t('info.products.nofavorites'),
@@ -7433,11 +7727,11 @@ function useModelInfoPage (_ref) {
7433
7727
  toggleLoading('seller-model-info', false, true);
7434
7728
  accountSessionId = undefined;
7435
7729
  if (!(organization.type === 'RETAILER')) {
7436
- _context.next = 13;
7730
+ _context.next = 14;
7437
7731
  break;
7438
7732
  }
7439
7733
  if (accountId) {
7440
- _context.next = 10;
7734
+ _context.next = 11;
7441
7735
  break;
7442
7736
  }
7443
7737
  LOG$3.errorTransaction('ON_OPEN_MODULE_INFO', 'SELLER_0001', 'Missing account ID', {
@@ -7446,33 +7740,46 @@ function useModelInfoPage (_ref) {
7446
7740
  });
7447
7741
  setLoading(false);
7448
7742
  toggleLoading('seller-model-info', false, false);
7743
+ openComponent({
7744
+ type: 'SELLER'
7745
+ });
7449
7746
  return _context.abrupt("return");
7450
- case 10:
7451
- _context.next = 12;
7747
+ case 11:
7748
+ _context.next = 13;
7452
7749
  return checkAccountLogin({
7453
7750
  accountId: accountId
7454
7751
  });
7455
- case 12:
7456
- accountSessionId = _context.sent;
7457
7752
  case 13:
7753
+ accountSessionId = _context.sent;
7754
+ case 14:
7458
7755
  if (!catalogCodex) {
7459
- _context.next = 21;
7756
+ _context.next = 26;
7460
7757
  break;
7461
7758
  }
7462
- _context.next = 16;
7759
+ _context.next = 17;
7463
7760
  return loadCatalogInfo({
7464
7761
  catalogCodex: catalogCodex,
7465
7762
  accountSessionId: accountSessionId,
7466
7763
  accountId: accountId,
7467
7764
  language: i18n.language || 'en'
7468
7765
  });
7469
- case 16:
7766
+ case 17:
7470
7767
  catalogInfoData = _context.sent;
7768
+ if (catalogInfoData) {
7769
+ _context.next = 22;
7770
+ break;
7771
+ }
7772
+ toggleLoading('seller-model-info', false, false);
7773
+ openComponent({
7774
+ type: 'SELLER'
7775
+ });
7776
+ return _context.abrupt("return");
7777
+ case 22:
7471
7778
  {
7472
- _context.next = 19;
7779
+ _context.next = 24;
7473
7780
  break;
7474
7781
  }
7475
- case 19:
7782
+ case 24:
7476
7783
  setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
7477
7784
 
7478
7785
  //if there is no relevant catalog information, as a normal seller continue directly to the planner
@@ -7482,14 +7789,14 @@ function useModelInfoPage (_ref) {
7482
7789
  onOpenPlanner(accountSessionId);
7483
7790
  }
7484
7791
  }
7485
- case 21:
7792
+ case 26:
7486
7793
  LOG$3.successTransaction('ON_OPEN_MODULE_INFO', {
7487
7794
  cat: catalogCodex,
7488
7795
  accountId: accountId
7489
7796
  });
7490
7797
  setLoading(false);
7491
7798
  toggleLoading('seller-model-info', false, false);
7492
- case 24:
7799
+ case 29:
7493
7800
  case "end":
7494
7801
  return _context.stop();
7495
7802
  }
@@ -7624,7 +7931,8 @@ function Info(props) {
7624
7931
  }), /*#__PURE__*/jsx(ProductsOrArticles, {
7625
7932
  catalogCodex: catalogData.codex,
7626
7933
  onProductClick: onOpenPlannerWithProduct,
7627
- hideProducts: hideProducts
7934
+ hideProducts: hideProducts,
7935
+ hideImages: hideImage
7628
7936
  })]
7629
7937
  })]
7630
7938
  }), /*#__PURE__*/jsx("div", {
@@ -7685,10 +7993,16 @@ function Priceedit (_ref) {
7685
7993
  discount.percentageDiscount = isPercentage ? value : undefined;
7686
7994
  var price = (_productData$addedPri = productData.addedPrice) !== null && _productData$addedPri !== void 0 ? _productData$addedPri : 0;
7687
7995
  if (isPercentage) {
7688
- var discountPrice = (discount.percentageDiscount || 0) / 100 * price;
7689
- discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
7690
- calcDiscountPrice: formatTwoDecimals(price - discountPrice)
7691
- });
7996
+ if (discount.percentageDiscount == 0 || discount.percentageDiscount == undefined) {
7997
+ discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
7998
+ calcDiscountPrice: ''
7999
+ });
8000
+ } else {
8001
+ var discountPrice = (discount.percentageDiscount || 0) / 100 * price;
8002
+ discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
8003
+ calcDiscountPrice: formatTwoDecimals(price - discountPrice)
8004
+ });
8005
+ }
7692
8006
  } else {
7693
8007
  discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
7694
8008
  percentageDiscount: formatOneDecimals((price - value || 0) / price * 100)
@@ -7696,8 +8010,8 @@ function Priceedit (_ref) {
7696
8010
  }
7697
8011
  setDiscount(discount);
7698
8012
  update(_objectSpread$i(_objectSpread$i({}, productData), {}, {
7699
- discountedPrice: isPercentage ? formatTwoDecimals(discount.calcDiscountPrice) : value,
7700
- percentageDiscount: discount.percentageDiscount
8013
+ discountedPrice: isPercentage ? discount.calcDiscountPrice ? formatTwoDecimals(discount.calcDiscountPrice) : undefined : value,
8014
+ percentageDiscount: discount.percentageDiscount > 0 ? discount.percentageDiscount : undefined
7701
8015
  }));
7702
8016
  }, [productData, update]);
7703
8017
  function formatTwoDecimals(value) {
@@ -8772,9 +9086,9 @@ var CustomDataFields = function CustomDataFields(_ref) {
8772
9086
  children: [/*#__PURE__*/jsx(CardHeader, {
8773
9087
  title: t('seller.productcreator.customfields') + (productData.variantId !== undefined ? ' (' + t('productvariant') + ':' + productData.variantId + ')' : '')
8774
9088
  }), /*#__PURE__*/jsx(CardContent, {
8775
- children: /*#__PURE__*/jsxs(Box, {
9089
+ children: /*#__PURE__*/jsxs(Box$1, {
8776
9090
  children: [pairs.map(function (pair, index) {
8777
- return /*#__PURE__*/jsxs(Box, {
9091
+ return /*#__PURE__*/jsxs(Box$1, {
8778
9092
  className: wrapper$2,
8779
9093
  children: [/*#__PURE__*/jsx(TextField, {
8780
9094
  style: {
@@ -9797,7 +10111,6 @@ function VariantTable (_ref) {
9797
10111
  sortBy: [{
9798
10112
  id: getSortByIdField()
9799
10113
  }],
9800
- expanded: true,
9801
10114
  views: ['Table'],
9802
10115
  defaultView: 'Table',
9803
10116
  selectable: false,
@@ -9910,8 +10223,14 @@ function _preUpdateData(field, value, row) {
9910
10223
  var calcedValue = (price - myValue || 0) / price * 100;
9911
10224
  if (fieldName === 'percentageDiscount') {
9912
10225
  calcedField = 'discountedPrice';
9913
- var discountedPrice = Math.round((myValue || 0) / 100 * price);
9914
- calcedValue = price - discountedPrice;
10226
+ myValue = isNaN(myValue) ? 0 : myValue;
10227
+ if (myValue > 0) {
10228
+ var discountedPrice = Math.round(myValue / 100 * price);
10229
+ calcedValue = price - discountedPrice;
10230
+ } else {
10231
+ myValue = 0;
10232
+ calcedValue = undefined;
10233
+ }
9915
10234
  }
9916
10235
  return _objectSpread$7(_objectSpread$7({}, row.original), {}, _defineProperty(_defineProperty({}, fieldName, myValue), calcedField, calcedValue));
9917
10236
  }
@@ -9929,7 +10248,7 @@ function _preUpdateData(field, value, row) {
9929
10248
 
9930
10249
  var wrapper$1 = "wrapper-I8eY4";
9931
10250
  var dataTable = "data-table-ImAxQ";
9932
- var css_248z$2 = ".wrapper-I8eY4 {\n display: flex;\n height: 100%;\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";
10251
+ var css_248z$2 = ".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";
9933
10252
  styleInject(css_248z$2);
9934
10253
 
9935
10254
  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; }
@@ -11354,6 +11673,12 @@ function updateVariants(prevState, currentState, configurationData, baseDataFiel
11354
11673
  if (field == 'shortDescription' || field == ' customData') {
11355
11674
  //updated shortDescription as last value
11356
11675
  continue;
11676
+ } else if (field == 'discountedPrice' && (newVariant === null || newVariant === void 0 ? void 0 : newVariant['percentageDiscount']) === 0 && (newVariant === null || newVariant === void 0 ? void 0 : newVariant[field]) === undefined) {
11677
+ finalVariant[field] = undefined;
11678
+ newModified[field] = variant[field] !== undefined;
11679
+ } else if (field == 'percentageDiscount' && (newVariant === null || newVariant === void 0 ? void 0 : newVariant[field]) === 0) {
11680
+ finalVariant[field] = 0;
11681
+ newModified[field] = variant[field] !== 0;
11357
11682
  } else if (field == 'addedPrice' || field == 'calculatedPrice') {
11358
11683
  var _currentState$modifie;
11359
11684
  var _ProductHandler$calcu = ProductHandler.calculateComputedValue(variant[field], newVariant === null || newVariant === void 0 ? void 0 : newVariant[field], currentState.baseData[field], (_currentState$modifie = currentState.modified.variantData[_i]) === null || _currentState$modifie === void 0 ? void 0 : _currentState$modifie[field]),