@crystaldesign/diva-seller 24.15.0-beta.2 → 24.15.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.js +359 -257
- package/build/types/seller/src/components/Basket/Step3Checkout.d.ts +4 -1
- package/build/types/seller/src/components/Basket/Step3Checkout.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/Step4Checkout.d.ts +8 -0
- package/build/types/seller/src/components/Basket/Step4Checkout.d.ts.map +1 -0
- package/build/types/seller/src/components/Basket/index.d.ts +1 -1
- package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/types.d.ts +1 -1
- package/build/types/seller/src/components/Basket/types.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts.map +1 -1
- package/build/types/seller/src/services/ApiHandler.d.ts.map +1 -1
- package/build/types/seller/src/types.d.ts +1 -1
- package/build/types/seller/src/types.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts +4 -1
- package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/statusMenu.d.ts +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/statusMenu.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/useProduct.d.ts +2 -2
- package/build/types/seller/src/ui/Basket/CheckOut/useProduct.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/Header.d.ts +4 -3
- package/build/types/seller/src/ui/Basket/Header.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Footer.d.ts +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Footer.d.ts.map +1 -1
- package/package.json +7 -5
package/build/esm/index.js
CHANGED
|
@@ -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,
|
|
20
|
+
import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Tooltip, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Checkbox as Checkbox$1, FormControlLabel as FormControlLabel$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 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,9 @@ 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
|
|
58
|
+
import Box from '@mui/material/Box';
|
|
59
|
+
import Alert from '@mui/material/Alert';
|
|
60
|
+
import InfoIcon from '@mui/icons-material/Info';
|
|
59
61
|
import classnames from 'classnames';
|
|
60
62
|
import { InfoRounded, Remove, Add, Delete } from '@mui/icons-material';
|
|
61
63
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
@@ -68,7 +70,7 @@ import 'swiper/css/free-mode';
|
|
|
68
70
|
import 'swiper/css/mousewheel';
|
|
69
71
|
import ExpandMore from '@mui/icons-material/ExpandMore';
|
|
70
72
|
import ProductsComponent, { useProductState as useProductState$1 } from '@crystaldesign/products-component';
|
|
71
|
-
import Alert from '@mui/lab/Alert';
|
|
73
|
+
import Alert$1 from '@mui/lab/Alert';
|
|
72
74
|
import Tab$1 from '@mui/material/Tab';
|
|
73
75
|
import Tabs$1 from '@mui/material/Tabs';
|
|
74
76
|
import Autocomplete$1 from '@mui/material/Autocomplete';
|
|
@@ -91,7 +93,6 @@ import AssetEditor, { DivaFile } from '@crystaldesign/media-upload';
|
|
|
91
93
|
import AddIcon$1 from '@mui/icons-material/NoteAdd';
|
|
92
94
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
93
95
|
import debounce from 'lodash/debounce';
|
|
94
|
-
import Alert$1 from '@mui/material/Alert';
|
|
95
96
|
import Settings from '@mui/icons-material/Settings';
|
|
96
97
|
|
|
97
98
|
(function() {
|
|
@@ -654,8 +655,6 @@ function _apiLoadCatalogs() {
|
|
|
654
655
|
// "Johann Jakob - CLASSICS"
|
|
655
656
|
subCategory: data.RetailSubCategory ? data.RetailSubCategory : data.SubCategory ? data.SubCategory : undefined,
|
|
656
657
|
retailArticleNr: data.RetailArticleNr ? data.RetailArticleNr : undefined,
|
|
657
|
-
fileBaseUrl: data.BaseURL ? data.BaseURL : undefined,
|
|
658
|
-
// "https://myCC3Retail.crystal-design.local/files"
|
|
659
658
|
nArticles: data.Articles ? Number(data.Articles) : 0,
|
|
660
659
|
// "236"
|
|
661
660
|
nConfigurators: data.Configurators ? Number(data.Configurators) : 0,
|
|
@@ -3087,7 +3086,7 @@ var Wrapper = styled('div')({
|
|
|
3087
3086
|
display: 'flex',
|
|
3088
3087
|
justifyContent: 'space-between',
|
|
3089
3088
|
alignItems: 'center',
|
|
3090
|
-
margin: '
|
|
3089
|
+
margin: '5px 5px 5px 5px',
|
|
3091
3090
|
flexWrap: 'wrap',
|
|
3092
3091
|
gap: '10px'
|
|
3093
3092
|
});
|
|
@@ -3981,6 +3980,7 @@ function Articles(_ref) {
|
|
|
3981
3980
|
}
|
|
3982
3981
|
|
|
3983
3982
|
function Header$1(_ref) {
|
|
3983
|
+
var _config$checkout;
|
|
3984
3984
|
var status = _ref.status,
|
|
3985
3985
|
divaNr = _ref.divaNr,
|
|
3986
3986
|
documentVersion = _ref.documentVersion,
|
|
@@ -3991,11 +3991,12 @@ function Header$1(_ref) {
|
|
|
3991
3991
|
doExportToVKP = _ref.doExportToVKP,
|
|
3992
3992
|
showProductCreator = _ref.showProductCreator,
|
|
3993
3993
|
config = _ref.config,
|
|
3994
|
-
enableVKPExportButton = _ref.enableVKPExportButton
|
|
3994
|
+
enableVKPExportButton = _ref.enableVKPExportButton,
|
|
3995
|
+
disableMarketing = _ref.disableMarketing;
|
|
3995
3996
|
var _useTranslation = useTranslation(),
|
|
3996
3997
|
t = _useTranslation.t;
|
|
3997
3998
|
var handleClick = function handleClick(event) {
|
|
3998
|
-
if (event.currentTarget.name == 'Step1' || event.currentTarget.name == 'Step2' || event.currentTarget.name == 'Step3') {
|
|
3999
|
+
if (event.currentTarget.name == 'Step1' || event.currentTarget.name == 'Step2' || event.currentTarget.name == 'Step3' || event.currentTarget.name == 'Step4') {
|
|
3999
4000
|
setActBasketPage(event.currentTarget.name);
|
|
4000
4001
|
}
|
|
4001
4002
|
};
|
|
@@ -4006,7 +4007,7 @@ function Header$1(_ref) {
|
|
|
4006
4007
|
zIndex: 1
|
|
4007
4008
|
},
|
|
4008
4009
|
children: /*#__PURE__*/jsxs(Title, {
|
|
4009
|
-
text: t('data.' + status) + ' - Nr. ' + divaNr + '-' + documentVersion,
|
|
4010
|
+
text: (actBasketPage === 'Step4' ? 'Marketing' : t('data.' + status)) + ' - Nr. ' + divaNr + '-' + documentVersion,
|
|
4010
4011
|
children: [showVKPExportButton && /*#__PURE__*/jsx(Button, {
|
|
4011
4012
|
color: 'primary',
|
|
4012
4013
|
variant: 'contained',
|
|
@@ -4041,6 +4042,19 @@ function Header$1(_ref) {
|
|
|
4041
4042
|
children: t('basket.navigation.checkoutNew', {
|
|
4042
4043
|
step: (config === null || config === void 0 ? void 0 : config.clientData) != false ? 3 : 2
|
|
4043
4044
|
})
|
|
4045
|
+
}), !(config !== null && config !== void 0 && (_config$checkout = config.checkout) !== null && _config$checkout !== void 0 && _config$checkout.hideMarketingStep) && /*#__PURE__*/jsx(Tooltip, {
|
|
4046
|
+
title: disableMarketing ? t('basket.navigation.marketingDisabled') : '',
|
|
4047
|
+
children: /*#__PURE__*/jsx("div", {
|
|
4048
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
4049
|
+
name: "Step4",
|
|
4050
|
+
onClick: handleClick,
|
|
4051
|
+
variant: actBasketPage == 'Step4' ? 'contained' : 'outlined',
|
|
4052
|
+
disabled: disableMarketing,
|
|
4053
|
+
children: t('basket.navigation.checkoutMarketing', {
|
|
4054
|
+
step: (config === null || config === void 0 ? void 0 : config.clientData) != false ? 4 : 3
|
|
4055
|
+
})
|
|
4056
|
+
})
|
|
4057
|
+
})
|
|
4044
4058
|
})]
|
|
4045
4059
|
})]
|
|
4046
4060
|
})
|
|
@@ -4101,12 +4115,12 @@ function MenuListComposition(_ref) {
|
|
|
4101
4115
|
}
|
|
4102
4116
|
prevOpen.current = open;
|
|
4103
4117
|
}, [open]);
|
|
4104
|
-
return /*#__PURE__*/
|
|
4118
|
+
return /*#__PURE__*/jsxs("div", {
|
|
4105
4119
|
style: {
|
|
4106
4120
|
"float": 'right',
|
|
4107
4121
|
height: 'fit-content'
|
|
4108
4122
|
},
|
|
4109
|
-
children: /*#__PURE__*/jsxs(ButtonGroup, {
|
|
4123
|
+
children: [/*#__PURE__*/jsxs(ButtonGroup, {
|
|
4110
4124
|
color: "primary",
|
|
4111
4125
|
"aria-label": "outlined primary button group",
|
|
4112
4126
|
children: [/*#__PURE__*/jsx(Button, {
|
|
@@ -4128,61 +4142,61 @@ function MenuListComposition(_ref) {
|
|
|
4128
4142
|
"aria-haspopup": "true",
|
|
4129
4143
|
onClick: handleToggle,
|
|
4130
4144
|
children: t('basket.priceOverview.actions.addtionalActions')
|
|
4131
|
-
})
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
})
|
|
4145
|
+
})]
|
|
4146
|
+
}), /*#__PURE__*/jsx(Popper, {
|
|
4147
|
+
sx: {
|
|
4148
|
+
zIndex: 1
|
|
4149
|
+
},
|
|
4150
|
+
open: open,
|
|
4151
|
+
anchorEl: anchorRef.current,
|
|
4152
|
+
role: undefined,
|
|
4153
|
+
transition: true,
|
|
4154
|
+
disablePortal: true,
|
|
4155
|
+
children: function children(_ref2) {
|
|
4156
|
+
var TransitionProps = _ref2.TransitionProps,
|
|
4157
|
+
placement = _ref2.placement;
|
|
4158
|
+
return /*#__PURE__*/jsx(Grow, _objectSpread$w(_objectSpread$w({}, TransitionProps), {}, {
|
|
4159
|
+
style: {
|
|
4160
|
+
transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
|
|
4161
|
+
},
|
|
4162
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
4163
|
+
children: /*#__PURE__*/jsx(ClickAwayListener, {
|
|
4164
|
+
onClickAway: handleClose,
|
|
4165
|
+
children: /*#__PURE__*/jsxs(MenuList, {
|
|
4166
|
+
autoFocusItem: open,
|
|
4167
|
+
id: "menu-list-grow",
|
|
4168
|
+
onKeyDown: handleListKeyDown,
|
|
4169
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
4170
|
+
style: {
|
|
4171
|
+
display: !visibile ? 'block' : 'none'
|
|
4172
|
+
},
|
|
4173
|
+
onClick: function onClick(e) {
|
|
4174
|
+
handleClose(e);
|
|
4175
|
+
setVisibile(true);
|
|
4176
|
+
},
|
|
4177
|
+
children: t('basket.priceOverview.actions.showOrder')
|
|
4178
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
4179
|
+
style: {
|
|
4180
|
+
display: visibile ? 'block' : 'none'
|
|
4181
|
+
},
|
|
4182
|
+
onClick: function onClick(e) {
|
|
4183
|
+
handleClose(e);
|
|
4184
|
+
setVisibile(false);
|
|
4185
|
+
},
|
|
4186
|
+
children: t('basket.priceOverview.actions.hideOrder')
|
|
4187
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
4188
|
+
onClick: function onClick(e) {
|
|
4189
|
+
handleClose(e);
|
|
4190
|
+
openInfo();
|
|
4191
|
+
},
|
|
4192
|
+
children: t('basket.priceOverview.actions.openInfo')
|
|
4193
|
+
})]
|
|
4180
4194
|
})
|
|
4181
4195
|
})
|
|
4182
|
-
})
|
|
4183
|
-
}
|
|
4184
|
-
}
|
|
4185
|
-
})
|
|
4196
|
+
})
|
|
4197
|
+
}));
|
|
4198
|
+
}
|
|
4199
|
+
})]
|
|
4186
4200
|
});
|
|
4187
4201
|
}
|
|
4188
4202
|
|
|
@@ -5319,8 +5333,7 @@ function Step2ClientData(_ref) {
|
|
|
5319
5333
|
function StatusMenu(_ref) {
|
|
5320
5334
|
var visibleStatus = _ref.visibleStatus,
|
|
5321
5335
|
status = _ref.status,
|
|
5322
|
-
setStatus = _ref.setStatus
|
|
5323
|
-
productSaved = _ref.productSaved;
|
|
5336
|
+
setStatus = _ref.setStatus;
|
|
5324
5337
|
var handleClick = function handleClick(item) {
|
|
5325
5338
|
setStatus(item);
|
|
5326
5339
|
};
|
|
@@ -5345,7 +5358,6 @@ function StatusMenu(_ref) {
|
|
|
5345
5358
|
onClick: function onClick() {
|
|
5346
5359
|
return handleClick(item);
|
|
5347
5360
|
},
|
|
5348
|
-
disabled: productSaved && item !== 'BASE_CONFIGURATION',
|
|
5349
5361
|
children: t('data.' + item, item)
|
|
5350
5362
|
}, item);
|
|
5351
5363
|
})
|
|
@@ -5746,7 +5758,7 @@ var HQ_RenderingTypeSource = [{
|
|
|
5746
5758
|
|
|
5747
5759
|
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
5760
|
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(
|
|
5761
|
+
function useProduct() {
|
|
5750
5762
|
var _useState = useState(undefined),
|
|
5751
5763
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5752
5764
|
currentProduct = _useState2[0],
|
|
@@ -5754,7 +5766,7 @@ function useProduct(basket) {
|
|
|
5754
5766
|
var _useDivaCore = useDivaCore(),
|
|
5755
5767
|
productHandler = _useDivaCore.handler.productHandler;
|
|
5756
5768
|
var loadProduct = /*#__PURE__*/function () {
|
|
5757
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
5769
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(basket) {
|
|
5758
5770
|
var _myProduct$baseData$p;
|
|
5759
5771
|
var myProduct;
|
|
5760
5772
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -5763,7 +5775,8 @@ function useProduct(basket) {
|
|
|
5763
5775
|
_context.next = 2;
|
|
5764
5776
|
return productHandler.loadProducts({
|
|
5765
5777
|
basket: new BasketData(basket),
|
|
5766
|
-
|
|
5778
|
+
productData: currentProduct !== null && currentProduct !== void 0 ? currentProduct : undefined,
|
|
5779
|
+
getUniqueNewDivaNr: true
|
|
5767
5780
|
});
|
|
5768
5781
|
case 2:
|
|
5769
5782
|
myProduct = _context.sent;
|
|
@@ -5777,13 +5790,10 @@ function useProduct(basket) {
|
|
|
5777
5790
|
}
|
|
5778
5791
|
}, _callee);
|
|
5779
5792
|
}));
|
|
5780
|
-
return function loadProduct() {
|
|
5793
|
+
return function loadProduct(_x) {
|
|
5781
5794
|
return _ref.apply(this, arguments);
|
|
5782
5795
|
};
|
|
5783
5796
|
}();
|
|
5784
|
-
useEffect(function () {
|
|
5785
|
-
loadProduct();
|
|
5786
|
-
}, [basket]);
|
|
5787
5797
|
var saveProduct = /*#__PURE__*/function () {
|
|
5788
5798
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(favourite) {
|
|
5789
5799
|
var _myproduct$0$parent;
|
|
@@ -5805,17 +5815,16 @@ function useProduct(basket) {
|
|
|
5805
5815
|
break;
|
|
5806
5816
|
}
|
|
5807
5817
|
_context2.next = 7;
|
|
5808
|
-
return productHandler.apiMarkAsFavorite(currentProduct._id,
|
|
5818
|
+
return productHandler.apiMarkAsFavorite(currentProduct._id, currentProduct.organizationId);
|
|
5809
5819
|
case 7:
|
|
5810
5820
|
setCurrentProduct(currentProduct);
|
|
5811
|
-
|
|
5812
|
-
case 9:
|
|
5821
|
+
case 8:
|
|
5813
5822
|
case "end":
|
|
5814
5823
|
return _context2.stop();
|
|
5815
5824
|
}
|
|
5816
5825
|
}, _callee2);
|
|
5817
5826
|
}));
|
|
5818
|
-
return function saveProduct(
|
|
5827
|
+
return function saveProduct(_x2) {
|
|
5819
5828
|
return _ref2.apply(this, arguments);
|
|
5820
5829
|
};
|
|
5821
5830
|
}();
|
|
@@ -5826,40 +5835,6 @@ function useProduct(basket) {
|
|
|
5826
5835
|
};
|
|
5827
5836
|
}
|
|
5828
5837
|
|
|
5829
|
-
function styleInject(css, ref) {
|
|
5830
|
-
if ( ref === void 0 ) ref = {};
|
|
5831
|
-
var insertAt = ref.insertAt;
|
|
5832
|
-
|
|
5833
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
5834
|
-
|
|
5835
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
5836
|
-
var style = document.createElement('style');
|
|
5837
|
-
style.type = 'text/css';
|
|
5838
|
-
|
|
5839
|
-
if (insertAt === 'top') {
|
|
5840
|
-
if (head.firstChild) {
|
|
5841
|
-
head.insertBefore(style, head.firstChild);
|
|
5842
|
-
} else {
|
|
5843
|
-
head.appendChild(style);
|
|
5844
|
-
}
|
|
5845
|
-
} else {
|
|
5846
|
-
head.appendChild(style);
|
|
5847
|
-
}
|
|
5848
|
-
|
|
5849
|
-
if (style.styleSheet) {
|
|
5850
|
-
style.styleSheet.cssText = css;
|
|
5851
|
-
} else {
|
|
5852
|
-
style.appendChild(document.createTextNode(css));
|
|
5853
|
-
}
|
|
5854
|
-
}
|
|
5855
|
-
|
|
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);
|
|
5862
|
-
|
|
5863
5838
|
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
5839
|
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; }
|
|
5865
5840
|
function CheckOut(_ref) {
|
|
@@ -5875,23 +5850,29 @@ function CheckOut(_ref) {
|
|
|
5875
5850
|
updateBasket = _ref.updateBasket,
|
|
5876
5851
|
statusArray = _ref.statusArray,
|
|
5877
5852
|
configSaveButtons = _ref.configSaveButtons,
|
|
5878
|
-
gdpr = _ref.gdpr
|
|
5853
|
+
gdpr = _ref.gdpr,
|
|
5854
|
+
setCurrentProduct = _ref.setCurrentProduct,
|
|
5855
|
+
setProductSaved = _ref.setProductSaved;
|
|
5879
5856
|
var _useState = useState(false),
|
|
5880
5857
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5881
5858
|
isSaving = _useState2[0],
|
|
5882
5859
|
setIsSaving = _useState2[1];
|
|
5883
5860
|
var _useState3 = useState(false),
|
|
5884
5861
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
5885
|
-
isSaved = _useState4[0]
|
|
5886
|
-
|
|
5862
|
+
isSaved = _useState4[0];
|
|
5863
|
+
_useState4[1];
|
|
5887
5864
|
var _useState5 = useState(false),
|
|
5888
5865
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
5889
|
-
|
|
5890
|
-
|
|
5866
|
+
basket3DExportChecked = _useState6[0],
|
|
5867
|
+
setBasket3DExportChecked = _useState6[1];
|
|
5891
5868
|
var _useState7 = useState(false),
|
|
5892
5869
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
5893
|
-
|
|
5894
|
-
|
|
5870
|
+
imgIsLoaded = _useState8[0],
|
|
5871
|
+
setImgIsLoaded = _useState8[1];
|
|
5872
|
+
var _useProduct = useProduct(),
|
|
5873
|
+
currentProduct = _useProduct.currentProduct,
|
|
5874
|
+
loadProduct = _useProduct.loadProduct,
|
|
5875
|
+
saveProduct = _useProduct.saveProduct;
|
|
5895
5876
|
var _useTranslation = useTranslation(),
|
|
5896
5877
|
t = _useTranslation.t;
|
|
5897
5878
|
var _useSellerState = useSellerState(),
|
|
@@ -5901,15 +5882,14 @@ function CheckOut(_ref) {
|
|
|
5901
5882
|
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
5902
5883
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
5903
5884
|
openModal = _useDivaCore$actions.openModal,
|
|
5904
|
-
productHandler = _useDivaCore.handler.productHandler,
|
|
5905
5885
|
_useDivaCore$state = _useDivaCore.state,
|
|
5906
5886
|
apiConfig = _useDivaCore$state.apiConfig,
|
|
5907
5887
|
jwt = _useDivaCore$state.jwt,
|
|
5908
5888
|
organization = _useDivaCore$state.organization;
|
|
5909
|
-
var
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5889
|
+
var _useState9 = useState(false),
|
|
5890
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
5891
|
+
isFavorite = _useState10[0],
|
|
5892
|
+
setIsFavorite = _useState10[1];
|
|
5913
5893
|
useEffect(function () {
|
|
5914
5894
|
var fetchProduct = /*#__PURE__*/function () {
|
|
5915
5895
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -5921,7 +5901,7 @@ function CheckOut(_ref) {
|
|
|
5921
5901
|
break;
|
|
5922
5902
|
}
|
|
5923
5903
|
_context.next = 3;
|
|
5924
|
-
return loadProduct();
|
|
5904
|
+
return loadProduct(basket);
|
|
5925
5905
|
case 3:
|
|
5926
5906
|
case "end":
|
|
5927
5907
|
return _context.stop();
|
|
@@ -5933,75 +5913,53 @@ function CheckOut(_ref) {
|
|
|
5933
5913
|
};
|
|
5934
5914
|
}();
|
|
5935
5915
|
fetchProduct();
|
|
5936
|
-
setShowRenderJobs(false);
|
|
5937
5916
|
}, [status]);
|
|
5938
|
-
|
|
5939
|
-
var
|
|
5940
|
-
var
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
_context2.
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
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
|
-
}();
|
|
5917
|
+
useEffect(function () {
|
|
5918
|
+
var fetchProduct = /*#__PURE__*/function () {
|
|
5919
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
5920
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
5921
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
5922
|
+
case 0:
|
|
5923
|
+
if (currentProduct) {
|
|
5924
|
+
setCurrentProduct(currentProduct);
|
|
5925
|
+
}
|
|
5926
|
+
case 1:
|
|
5927
|
+
case "end":
|
|
5928
|
+
return _context2.stop();
|
|
5929
|
+
}
|
|
5930
|
+
}, _callee2);
|
|
5931
|
+
}));
|
|
5932
|
+
return function fetchProduct() {
|
|
5933
|
+
return _ref3.apply(this, arguments);
|
|
5934
|
+
};
|
|
5935
|
+
}();
|
|
5936
|
+
fetchProduct();
|
|
5937
|
+
}, [currentProduct]);
|
|
5938
|
+
var handleFavoriteToggle = function handleFavoriteToggle() {
|
|
5939
|
+
setIsFavorite(!isFavorite);
|
|
5940
|
+
};
|
|
5972
5941
|
var handleSave = useCallback(/*#__PURE__*/function () {
|
|
5973
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail,
|
|
5942
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail, isFav) {
|
|
5974
5943
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
5975
5944
|
while (1) switch (_context4.prev = _context4.next) {
|
|
5976
5945
|
case 0:
|
|
5977
5946
|
if (!(status === 'BASE_CONFIGURATION')) {
|
|
5978
|
-
_context4.next =
|
|
5979
|
-
break;
|
|
5980
|
-
}
|
|
5981
|
-
if (!hqMedia) {
|
|
5982
|
-
_context4.next = 6;
|
|
5947
|
+
_context4.next = 8;
|
|
5983
5948
|
break;
|
|
5984
5949
|
}
|
|
5950
|
+
toggleLoading('saveProduct');
|
|
5985
5951
|
_context4.next = 4;
|
|
5986
|
-
return
|
|
5952
|
+
return saveProduct(isFav);
|
|
5987
5953
|
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
5954
|
toggleLoading('saveProduct');
|
|
5996
5955
|
openModal({
|
|
5997
5956
|
title: t('basket.checkout.productsavedtitle'),
|
|
5998
5957
|
accept: true,
|
|
5999
5958
|
text: t('basket.checkout.productsavedtext')
|
|
6000
5959
|
});
|
|
6001
|
-
|
|
6002
|
-
setIsSaved(true);
|
|
5960
|
+
setProductSaved(true);
|
|
6003
5961
|
return _context4.abrupt("return");
|
|
6004
|
-
case
|
|
5962
|
+
case 8:
|
|
6005
5963
|
if (!isSaving) {
|
|
6006
5964
|
setIsSaving(true);
|
|
6007
5965
|
onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
|
|
@@ -6035,20 +5993,20 @@ function CheckOut(_ref) {
|
|
|
6035
5993
|
}
|
|
6036
5994
|
}, _callee3);
|
|
6037
5995
|
}));
|
|
6038
|
-
return function (
|
|
5996
|
+
return function (_x4) {
|
|
6039
5997
|
return _ref5.apply(this, arguments);
|
|
6040
5998
|
};
|
|
6041
5999
|
}())["catch"](function () {
|
|
6042
6000
|
return setIsSaving(false);
|
|
6043
6001
|
});
|
|
6044
6002
|
}
|
|
6045
|
-
case
|
|
6003
|
+
case 9:
|
|
6046
6004
|
case "end":
|
|
6047
6005
|
return _context4.stop();
|
|
6048
6006
|
}
|
|
6049
6007
|
}, _callee4);
|
|
6050
6008
|
}));
|
|
6051
|
-
return function (_x, _x2, _x3
|
|
6009
|
+
return function (_x, _x2, _x3) {
|
|
6052
6010
|
return _ref4.apply(this, arguments);
|
|
6053
6011
|
};
|
|
6054
6012
|
}(), [isSaving, onClickSave, basket3DExportChecked]);
|
|
@@ -6058,13 +6016,6 @@ function CheckOut(_ref) {
|
|
|
6058
6016
|
basket[key] = data[key];
|
|
6059
6017
|
}
|
|
6060
6018
|
};
|
|
6061
|
-
var onErrorHqMedia = function onErrorHqMedia(error) {
|
|
6062
|
-
openModal({
|
|
6063
|
-
title: t('Error'),
|
|
6064
|
-
accept: true,
|
|
6065
|
-
text: t('basket.checkout.errorhqmediatext')
|
|
6066
|
-
});
|
|
6067
|
-
};
|
|
6068
6019
|
|
|
6069
6020
|
// for LEAFLET don't show printOptions, if there are any configured.
|
|
6070
6021
|
var finalSchema = _objectSpread$r(_objectSpread$r({}, uiSchema), {}, {
|
|
@@ -6103,59 +6054,73 @@ function CheckOut(_ref) {
|
|
|
6103
6054
|
productSaved: isSaved
|
|
6104
6055
|
})]
|
|
6105
6056
|
}), /*#__PURE__*/jsxs("div", {
|
|
6106
|
-
children: [
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
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", {
|
|
6057
|
+
children: [status === 'BASE_CONFIGURATION' && /*#__PURE__*/jsxs("div", {
|
|
6058
|
+
style: {
|
|
6059
|
+
padding: 50
|
|
6060
|
+
},
|
|
6061
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
6141
6062
|
style: {
|
|
6142
|
-
|
|
6143
|
-
|
|
6063
|
+
width: 'fit-content'
|
|
6064
|
+
},
|
|
6065
|
+
children: /*#__PURE__*/jsx(InfoAlert$1, {
|
|
6066
|
+
content: /*#__PURE__*/jsx(Fragment, {
|
|
6067
|
+
children: t('basket.checkout.step4.info')
|
|
6068
|
+
})
|
|
6069
|
+
})
|
|
6070
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
6071
|
+
sx: {
|
|
6144
6072
|
display: 'flex',
|
|
6145
|
-
|
|
6146
|
-
gap: 25
|
|
6073
|
+
gap: 2
|
|
6147
6074
|
},
|
|
6148
6075
|
children: [/*#__PURE__*/jsx("img", {
|
|
6149
6076
|
src: currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.image,
|
|
6150
|
-
height: 250
|
|
6151
|
-
|
|
6077
|
+
height: 250,
|
|
6078
|
+
alt: "Product",
|
|
6079
|
+
onLoad: function onLoad() {
|
|
6080
|
+
return setImgIsLoaded(true);
|
|
6081
|
+
},
|
|
6152
6082
|
style: {
|
|
6153
|
-
|
|
6083
|
+
display: imgIsLoaded ? 'block' : 'none'
|
|
6084
|
+
}
|
|
6085
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
6086
|
+
sx: {
|
|
6087
|
+
whiteSpace: 'pre-wrap',
|
|
6088
|
+
fontSize: 14
|
|
6154
6089
|
},
|
|
6155
6090
|
children: currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.technicalDescription
|
|
6156
6091
|
})]
|
|
6157
|
-
})
|
|
6158
|
-
|
|
6092
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
6093
|
+
sx: {
|
|
6094
|
+
display: 'flex',
|
|
6095
|
+
alignItems: 'center',
|
|
6096
|
+
mt: 2
|
|
6097
|
+
},
|
|
6098
|
+
children: [/*#__PURE__*/jsx(Checkbox$1, {
|
|
6099
|
+
checked: isFavorite,
|
|
6100
|
+
onChange: handleFavoriteToggle
|
|
6101
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
6102
|
+
variant: "body2",
|
|
6103
|
+
children: t('basket.checkout.step4.favorite')
|
|
6104
|
+
})]
|
|
6105
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
6106
|
+
sx: {
|
|
6107
|
+
display: 'flex',
|
|
6108
|
+
gap: 2,
|
|
6109
|
+
mt: 2
|
|
6110
|
+
},
|
|
6111
|
+
children: [/*#__PURE__*/jsx(Button$1, {
|
|
6112
|
+
variant: "contained",
|
|
6113
|
+
onClick: function onClick() {
|
|
6114
|
+
return handleSave(undefined, false, isFavorite);
|
|
6115
|
+
},
|
|
6116
|
+
children: t('basket.checkout.step4.saveproduct')
|
|
6117
|
+
}), /*#__PURE__*/jsx(Button$1, {
|
|
6118
|
+
onClick: startWithEmptyBasket,
|
|
6119
|
+
variant: "outlined",
|
|
6120
|
+
children: t('basket.checkout.step4.cancel')
|
|
6121
|
+
})]
|
|
6122
|
+
})]
|
|
6123
|
+
}), status !== 'BASE_CONFIGURATION' && /*#__PURE__*/jsxs(Fragment, {
|
|
6159
6124
|
children: [/*#__PURE__*/jsx("div", {
|
|
6160
6125
|
style: {
|
|
6161
6126
|
margin: '1rem',
|
|
@@ -6172,7 +6137,7 @@ function CheckOut(_ref) {
|
|
|
6172
6137
|
}), !!renderService && permissionAnyHqRenderBox && (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && /*#__PURE__*/jsx(HqRenderBox, {
|
|
6173
6138
|
basket: basket,
|
|
6174
6139
|
config: renderService
|
|
6175
|
-
}), (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) &&
|
|
6140
|
+
}), (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && organization.settings.enable3DExport && /*#__PURE__*/jsxs("div", {
|
|
6176
6141
|
style: {
|
|
6177
6142
|
marginLeft: '50px',
|
|
6178
6143
|
width: '700px'
|
|
@@ -6200,7 +6165,7 @@ function CheckOut(_ref) {
|
|
|
6200
6165
|
})
|
|
6201
6166
|
})]
|
|
6202
6167
|
})]
|
|
6203
|
-
}),
|
|
6168
|
+
}), status !== 'BASE_CONFIGURATION' && /*#__PURE__*/jsx(SaveButtonsGroup, {
|
|
6204
6169
|
orderEmpty: !basket.OrderSets || basket.OrderSets.length == 0 || gdpr && !isEmpty(basket === null || basket === void 0 ? void 0 : basket.Client) && !basket.Gdpr,
|
|
6205
6170
|
onClickSave: handleSave,
|
|
6206
6171
|
startWithEmptyBasket: startWithEmptyBasket,
|
|
@@ -6223,6 +6188,26 @@ function isEmpty(data) {
|
|
|
6223
6188
|
return isEmpty(data[k]);
|
|
6224
6189
|
});
|
|
6225
6190
|
}
|
|
6191
|
+
function InfoAlert$1(_ref7) {
|
|
6192
|
+
var content = _ref7.content;
|
|
6193
|
+
return /*#__PURE__*/jsx(Alert, {
|
|
6194
|
+
severity: "info",
|
|
6195
|
+
iconMapping: {
|
|
6196
|
+
info: /*#__PURE__*/jsx(InfoIcon, {
|
|
6197
|
+
sx: {
|
|
6198
|
+
fontSize: '2rem'
|
|
6199
|
+
}
|
|
6200
|
+
})
|
|
6201
|
+
},
|
|
6202
|
+
sx: {
|
|
6203
|
+
display: 'flex',
|
|
6204
|
+
alignItems: 'center',
|
|
6205
|
+
fontSize: '1.1rem',
|
|
6206
|
+
textAlign: 'center'
|
|
6207
|
+
},
|
|
6208
|
+
children: content
|
|
6209
|
+
});
|
|
6210
|
+
}
|
|
6226
6211
|
|
|
6227
6212
|
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; }
|
|
6228
6213
|
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; }
|
|
@@ -6464,7 +6449,10 @@ function Step3Checkout(_ref) {
|
|
|
6464
6449
|
status = _ref.status,
|
|
6465
6450
|
setStatus = _ref.setStatus,
|
|
6466
6451
|
statusArray = _ref.statusArray,
|
|
6467
|
-
config = _ref.config
|
|
6452
|
+
config = _ref.config,
|
|
6453
|
+
currentProduct = _ref.currentProduct,
|
|
6454
|
+
setCurrentProduct = _ref.setCurrentProduct,
|
|
6455
|
+
setProductSaved = _ref.setProductSaved;
|
|
6468
6456
|
var _useDivaCore = useDivaCore(),
|
|
6469
6457
|
organization = _useDivaCore.state.organization;
|
|
6470
6458
|
return /*#__PURE__*/jsx(CheckOut, {
|
|
@@ -6479,7 +6467,79 @@ function Step3Checkout(_ref) {
|
|
|
6479
6467
|
updateBasket: updateBasket,
|
|
6480
6468
|
renderService: config === null || config === void 0 || (_config$checkout3 = config.checkout) === null || _config$checkout3 === void 0 ? void 0 : _config$checkout3.renderService,
|
|
6481
6469
|
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
|
|
6470
|
+
gdpr: config === null || config === void 0 || (_config$checkout5 = config.checkout) === null || _config$checkout5 === void 0 ? void 0 : _config$checkout5.checkGdpr,
|
|
6471
|
+
currentProduct: currentProduct,
|
|
6472
|
+
setCurrentProduct: setCurrentProduct,
|
|
6473
|
+
setProductSaved: setProductSaved
|
|
6474
|
+
});
|
|
6475
|
+
}
|
|
6476
|
+
|
|
6477
|
+
function Step4Checkout(_ref) {
|
|
6478
|
+
var currentProduct = _ref.currentProduct,
|
|
6479
|
+
basket = _ref.basket;
|
|
6480
|
+
var _useTranslation = useTranslation(),
|
|
6481
|
+
t = _useTranslation.t;
|
|
6482
|
+
var _useDivaCore = useDivaCore(),
|
|
6483
|
+
openModal = _useDivaCore.actions.openModal,
|
|
6484
|
+
productHandler = _useDivaCore.handler.productHandler;
|
|
6485
|
+
var onErrorHqMedia = function onErrorHqMedia(error) {
|
|
6486
|
+
openModal({
|
|
6487
|
+
title: t('Error'),
|
|
6488
|
+
accept: true,
|
|
6489
|
+
text: t('basket.checkout.errorhqmediatext')
|
|
6490
|
+
});
|
|
6491
|
+
};
|
|
6492
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
6493
|
+
sx: {
|
|
6494
|
+
display: 'flex',
|
|
6495
|
+
flexDirection: 'column',
|
|
6496
|
+
gap: 2,
|
|
6497
|
+
height: '100%'
|
|
6498
|
+
},
|
|
6499
|
+
children: [/*#__PURE__*/jsx(InfoAlert, {
|
|
6500
|
+
content: /*#__PURE__*/jsxs(Fragment, {
|
|
6501
|
+
children: [t('basket.checkout.step4.hqmediainfo'), ":", ' ', /*#__PURE__*/jsx("a", {
|
|
6502
|
+
href: "https://www.diva-portal.de/digitalisierungs-service",
|
|
6503
|
+
target: "_blank",
|
|
6504
|
+
children: "www.diva-portal.de/digitalisierungs-service"
|
|
6505
|
+
})]
|
|
6506
|
+
})
|
|
6507
|
+
}), /*#__PURE__*/jsx(OrderEntry, {
|
|
6508
|
+
variantData: [],
|
|
6509
|
+
baseData: currentProduct,
|
|
6510
|
+
basketData: basket,
|
|
6511
|
+
onSave: function onSave() {
|
|
6512
|
+
return productHandler.saveProducts({
|
|
6513
|
+
products: [currentProduct]
|
|
6514
|
+
}).then(function (r) {
|
|
6515
|
+
return !!r.length;
|
|
6516
|
+
});
|
|
6517
|
+
},
|
|
6518
|
+
saved: true,
|
|
6519
|
+
onError: function onError() {
|
|
6520
|
+
return onErrorHqMedia;
|
|
6521
|
+
}
|
|
6522
|
+
})]
|
|
6523
|
+
});
|
|
6524
|
+
}
|
|
6525
|
+
function InfoAlert(_ref2) {
|
|
6526
|
+
var content = _ref2.content;
|
|
6527
|
+
return /*#__PURE__*/jsx(Alert, {
|
|
6528
|
+
severity: "info",
|
|
6529
|
+
iconMapping: {
|
|
6530
|
+
info: /*#__PURE__*/jsx(InfoIcon, {
|
|
6531
|
+
sx: {
|
|
6532
|
+
fontSize: '2rem'
|
|
6533
|
+
}
|
|
6534
|
+
})
|
|
6535
|
+
},
|
|
6536
|
+
sx: {
|
|
6537
|
+
display: 'flex',
|
|
6538
|
+
alignItems: 'center',
|
|
6539
|
+
fontSize: '1.1rem',
|
|
6540
|
+
textAlign: 'center'
|
|
6541
|
+
},
|
|
6542
|
+
children: content
|
|
6483
6543
|
});
|
|
6484
6544
|
}
|
|
6485
6545
|
|
|
@@ -6487,7 +6547,7 @@ function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
6487
6547
|
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
6548
|
var LOG$4 = getLogger('SellerBasket', 'Basket');
|
|
6489
6549
|
function Basket(_ref) {
|
|
6490
|
-
var _configurationData$Ch5;
|
|
6550
|
+
var _currentBasket$OrderS5, _configurationData$Ch5;
|
|
6491
6551
|
var divaNr = _ref.divaNr,
|
|
6492
6552
|
basket = _ref.basket,
|
|
6493
6553
|
checkBasket = _ref.checkBasket;
|
|
@@ -6496,6 +6556,14 @@ function Basket(_ref) {
|
|
|
6496
6556
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6497
6557
|
actBasketPage = _useState2[0],
|
|
6498
6558
|
setActBasketPage = _useState2[1];
|
|
6559
|
+
var _useState3 = useState(),
|
|
6560
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
6561
|
+
currentProduct = _useState4[0],
|
|
6562
|
+
setCurrentProduct = _useState4[1];
|
|
6563
|
+
var _useState5 = useState(false),
|
|
6564
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
6565
|
+
productSaved = _useState6[0],
|
|
6566
|
+
setProductSaved = _useState6[1];
|
|
6499
6567
|
var _useTranslation = useTranslation(),
|
|
6500
6568
|
t = _useTranslation.t,
|
|
6501
6569
|
i18n = _useTranslation.i18n;
|
|
@@ -6868,14 +6936,15 @@ function Basket(_ref) {
|
|
|
6868
6936
|
config: configurationData === null || configurationData === void 0 ? void 0 : configurationData.Checkout,
|
|
6869
6937
|
status: statusRef.current,
|
|
6870
6938
|
documentVersion: currentBasket.getDocumentVersion(),
|
|
6871
|
-
divaNr: currentBasket.DivaNr,
|
|
6939
|
+
divaNr: statusRef.current == 'BASE_CONFIGURATION' && currentProduct ? currentProduct.divaNr : currentBasket.DivaNr,
|
|
6872
6940
|
actBasketPage: actBasketPage,
|
|
6873
6941
|
setActBasketPage: setActBasketPage,
|
|
6874
6942
|
showVKPExportButton: !!(vkpExportData !== null && vkpExportData !== void 0 && vkpExportData.callbackurl) || !!(configurationData !== null && configurationData !== void 0 && configurationData.VKPExportUrl),
|
|
6875
6943
|
doExportToVKP: doExportToVKP,
|
|
6876
6944
|
openProductCreator: openProductCreator,
|
|
6877
6945
|
showProductCreator: userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator),
|
|
6878
|
-
enableVKPExportButton: !currentBasket.catalogStatus || currentBasket.catalogStatus == 'LISTED' || userHasPermission('alwaysenablevkpexport')
|
|
6946
|
+
enableVKPExportButton: !currentBasket.catalogStatus || currentBasket.catalogStatus == 'LISTED' || userHasPermission('alwaysenablevkpexport'),
|
|
6947
|
+
disableMarketing: !(currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS5 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS5 !== void 0 && _currentBasket$OrderS5.HQRenderScript) || !productSaved ? true : false
|
|
6879
6948
|
}), /*#__PURE__*/jsxs("div", {
|
|
6880
6949
|
style: {
|
|
6881
6950
|
marginLeft: 10,
|
|
@@ -6907,12 +6976,48 @@ function Basket(_ref) {
|
|
|
6907
6976
|
onClickSave: onClickSave,
|
|
6908
6977
|
statusArray: getBasketStatusArr(),
|
|
6909
6978
|
updateBasket: update,
|
|
6910
|
-
currentUser: currentUser
|
|
6979
|
+
currentUser: currentUser,
|
|
6980
|
+
currentProduct: currentProduct,
|
|
6981
|
+
setCurrentProduct: setCurrentProduct,
|
|
6982
|
+
setProductSaved: setProductSaved
|
|
6983
|
+
}), actBasketPage == 'Step4' && /*#__PURE__*/jsx(Step4Checkout, {
|
|
6984
|
+
config: configurationData === null || configurationData === void 0 ? void 0 : configurationData.Checkout,
|
|
6985
|
+
basket: currentBasket,
|
|
6986
|
+
setActBasketPage: setActBasketPage,
|
|
6987
|
+
startWithEmptyBasket: startWithEmptyBasket,
|
|
6988
|
+
currentProduct: currentProduct
|
|
6911
6989
|
})]
|
|
6912
6990
|
})]
|
|
6913
6991
|
});
|
|
6914
6992
|
}
|
|
6915
6993
|
|
|
6994
|
+
function styleInject(css, ref) {
|
|
6995
|
+
if ( ref === void 0 ) ref = {};
|
|
6996
|
+
var insertAt = ref.insertAt;
|
|
6997
|
+
|
|
6998
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
6999
|
+
|
|
7000
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
7001
|
+
var style = document.createElement('style');
|
|
7002
|
+
style.type = 'text/css';
|
|
7003
|
+
|
|
7004
|
+
if (insertAt === 'top') {
|
|
7005
|
+
if (head.firstChild) {
|
|
7006
|
+
head.insertBefore(style, head.firstChild);
|
|
7007
|
+
} else {
|
|
7008
|
+
head.appendChild(style);
|
|
7009
|
+
}
|
|
7010
|
+
} else {
|
|
7011
|
+
head.appendChild(style);
|
|
7012
|
+
}
|
|
7013
|
+
|
|
7014
|
+
if (style.styleSheet) {
|
|
7015
|
+
style.styleSheet.cssText = css;
|
|
7016
|
+
} else {
|
|
7017
|
+
style.appendChild(document.createTextNode(css));
|
|
7018
|
+
}
|
|
7019
|
+
}
|
|
7020
|
+
|
|
6916
7021
|
var wrapper$6 = "wrapper-fSL18";
|
|
6917
7022
|
var title$2 = "title-iTDPA";
|
|
6918
7023
|
var descriptionContainer$1 = "description-container-k1vLT";
|
|
@@ -6920,7 +7025,7 @@ var modelTitle = "model-title-Sgm-0";
|
|
|
6920
7025
|
var description = "description-GyPZq";
|
|
6921
7026
|
var pdf = "pdf-oNnao";
|
|
6922
7027
|
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";
|
|
7028
|
+
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
7029
|
styleInject(css_248z$9);
|
|
6925
7030
|
|
|
6926
7031
|
var _excluded$6 = ["data", "text"];
|
|
@@ -6975,8 +7080,9 @@ function Description$1 (_ref) {
|
|
|
6975
7080
|
}
|
|
6976
7081
|
|
|
6977
7082
|
var container = "container-Sr3pC";
|
|
7083
|
+
var iconOnly = "icon-only-2SJ6e";
|
|
6978
7084
|
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";
|
|
7085
|
+
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
7086
|
styleInject(css_248z$8);
|
|
6981
7087
|
|
|
6982
7088
|
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 +7155,7 @@ function NavBar (buttons) {
|
|
|
7049
7155
|
return /*#__PURE__*/jsxs("div", {
|
|
7050
7156
|
className: container,
|
|
7051
7157
|
children: [/*#__PURE__*/jsx(Button, {
|
|
7158
|
+
className: iconOnly,
|
|
7052
7159
|
variant: "outlined",
|
|
7053
7160
|
color: "primary",
|
|
7054
7161
|
startIcon: /*#__PURE__*/jsx(NavBackSvg, {
|
|
@@ -7238,7 +7345,7 @@ function NothingFound (_ref) {
|
|
|
7238
7345
|
children: [/*#__PURE__*/jsx(Typography$1, {
|
|
7239
7346
|
variant: "body2",
|
|
7240
7347
|
children: text
|
|
7241
|
-
}), info && /*#__PURE__*/jsx(Alert, {
|
|
7348
|
+
}), info && /*#__PURE__*/jsx(Alert$1, {
|
|
7242
7349
|
variant: "outlined",
|
|
7243
7350
|
severity: "info",
|
|
7244
7351
|
children: info
|
|
@@ -7330,14 +7437,6 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
|
|
|
7330
7437
|
}
|
|
7331
7438
|
};
|
|
7332
7439
|
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
7440
|
var isEmpty = tab == 0 ? vzProductsState.groups.length == 0 : favoriteProductsState.groups.length == 0;
|
|
7342
7441
|
return /*#__PURE__*/jsxs(Accordion, {
|
|
7343
7442
|
className: wrapper$4,
|
|
@@ -7354,7 +7453,7 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
|
|
|
7354
7453
|
children: [showVZProducts && /*#__PURE__*/jsx(Tab, {
|
|
7355
7454
|
label: t('info.products.shared'),
|
|
7356
7455
|
value: 0
|
|
7357
|
-
}), /*#__PURE__*/jsx(Tab, {
|
|
7456
|
+
}), showFavoriteProducts && /*#__PURE__*/jsx(Tab, {
|
|
7358
7457
|
label: t('info.products.favorite'),
|
|
7359
7458
|
value: 1
|
|
7360
7459
|
})]
|
|
@@ -7370,7 +7469,10 @@ var ProductsOrArticles = function ProductsOrArticles(_ref) {
|
|
|
7370
7469
|
onClickFunction: onProductClick,
|
|
7371
7470
|
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7372
7471
|
galleryConfig: {
|
|
7373
|
-
hidePrices: true
|
|
7472
|
+
hidePrices: true,
|
|
7473
|
+
imageWrapperStyle: {
|
|
7474
|
+
maxHeight: '200px'
|
|
7475
|
+
}
|
|
7374
7476
|
}
|
|
7375
7477
|
}), isEmpty && /*#__PURE__*/jsx(NothingFound, {
|
|
7376
7478
|
text: selectedTab == 0 ? t('info.products.novzproducts') : t('info.products.nofavorites'),
|
|
@@ -8772,9 +8874,9 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
8772
8874
|
children: [/*#__PURE__*/jsx(CardHeader, {
|
|
8773
8875
|
title: t('seller.productcreator.customfields') + (productData.variantId !== undefined ? ' (' + t('productvariant') + ':' + productData.variantId + ')' : '')
|
|
8774
8876
|
}), /*#__PURE__*/jsx(CardContent, {
|
|
8775
|
-
children: /*#__PURE__*/jsxs(Box, {
|
|
8877
|
+
children: /*#__PURE__*/jsxs(Box$1, {
|
|
8776
8878
|
children: [pairs.map(function (pair, index) {
|
|
8777
|
-
return /*#__PURE__*/jsxs(Box, {
|
|
8879
|
+
return /*#__PURE__*/jsxs(Box$1, {
|
|
8778
8880
|
className: wrapper$2,
|
|
8779
8881
|
children: [/*#__PURE__*/jsx(TextField, {
|
|
8780
8882
|
style: {
|
|
@@ -12452,13 +12554,13 @@ function ProductCreator (_ref) {
|
|
|
12452
12554
|
})
|
|
12453
12555
|
})]
|
|
12454
12556
|
})
|
|
12455
|
-
}), !!error && /*#__PURE__*/jsx(Alert
|
|
12557
|
+
}), !!error && /*#__PURE__*/jsx(Alert, {
|
|
12456
12558
|
severity: "error",
|
|
12457
12559
|
onClose: function onClose() {
|
|
12458
12560
|
return setError(undefined);
|
|
12459
12561
|
},
|
|
12460
12562
|
children: error
|
|
12461
|
-
}), warn && /*#__PURE__*/jsx(Alert
|
|
12563
|
+
}), warn && /*#__PURE__*/jsx(Alert, {
|
|
12462
12564
|
severity: "warning",
|
|
12463
12565
|
onClose: function onClose() {
|
|
12464
12566
|
return setWarning(undefined);
|