@crystaldesign/diva-seller 24.14.0-beta.8 → 24.14.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.js +777 -1286
- package/build/types/seller/src/components/InfoWithProducts/CatalogImages/index.d.ts +1 -0
- package/build/types/seller/src/components/InfoWithProducts/CatalogImages/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/Description/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/ArticleSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/ArticleSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/EmptyPlanningSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/EmptyPlanningSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/NavBackSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/NavBackSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/VariantPlanningSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/VariantPlanningSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts +7 -12
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/NothingFound.d.ts +6 -0
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/NothingFound.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Search/index.d.ts +4 -2
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Search/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts +4 -21
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/index.d.ts +2 -6
- package/build/types/seller/src/components/InfoWithProducts/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/useModelInfoPage.d.ts +16 -0
- package/build/types/seller/src/components/InfoWithProducts/useModelInfoPage.d.ts.map +1 -0
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormDeliveryInfo.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/Dimensions.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/Priceedit.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/AffiliateTable.d.ts.map +1 -1
- package/build/types/seller/src/components/Seller/index.d.ts.map +1 -1
- package/build/types/seller/src/index.d.ts.map +1 -1
- package/build/types/seller/src/provider/utils.d.ts +1 -1
- package/build/types/seller/src/provider/utils.d.ts.map +1 -1
- package/build/types/seller/src/types.d.ts +2 -3
- package/build/types/seller/src/types.d.ts.map +1 -1
- package/build/types/seller/src/ui/AdditionalPriceField.d.ts +1 -1
- package/build/types/seller/src/ui/AdditionalPriceField.d.ts.map +1 -1
- package/build/types/seller/src/ui/Badge3d.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/SaveButtonsGroup.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/Header.d.ts +1 -1
- package/build/types/seller/src/ui/Basket/Header.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/HqRenderBox/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/PriceTable.d.ts.map +1 -1
- package/build/types/seller/src/ui/DiscountField.d.ts +1 -1
- package/build/types/seller/src/ui/DiscountField.d.ts.map +1 -1
- package/package.json +8 -8
- package/build/types/seller/src/components/Info/Description.d.ts +0 -9
- package/build/types/seller/src/components/Info/Description.d.ts.map +0 -1
- package/build/types/seller/src/components/Info/ImagesBar.d.ts +0 -12
- package/build/types/seller/src/components/Info/ImagesBar.d.ts.map +0 -1
- package/build/types/seller/src/components/Info/MainView.d.ts +0 -11
- package/build/types/seller/src/components/Info/MainView.d.ts.map +0 -1
- package/build/types/seller/src/components/Info/NavBar.d.ts +0 -14
- package/build/types/seller/src/components/Info/NavBar.d.ts.map +0 -1
- package/build/types/seller/src/components/Info/index.d.ts +0 -8
- package/build/types/seller/src/components/Info/index.d.ts.map +0 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/ArticleItem/index.d.ts +0 -9
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/ArticleItem/index.d.ts.map +0 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/index.d.ts +0 -11
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/index.d.ts.map +0 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Products/index.d.ts +0 -11
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Products/index.d.ts.map +0 -1
package/build/esm/index.js
CHANGED
|
@@ -7,98 +7,92 @@ import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
|
7
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
8
8
|
import { useDivaCore, getLogger, BasketData, useTranslation, DivaError, DivaUtils as DivaUtils$1, HelpButton, ProductHandler } from '@crystaldesign/diva-core';
|
|
9
9
|
import DivaUtils, { nanoid } from '@crystaldesign/diva-utils';
|
|
10
|
-
import '@material
|
|
10
|
+
import '@mui/material/locale';
|
|
11
11
|
import BasketHandler, { BASKET_SAVE_ERROR } from '@crystaldesign/basket-handler';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import Grid from '@crystaldesign/grid';
|
|
14
|
-
import Card from '@material
|
|
15
|
-
import CardActionArea from '@material
|
|
16
|
-
import CardMedia from '@material
|
|
17
|
-
import Typography$1 from '@material
|
|
18
|
-
import
|
|
19
|
-
import
|
|
14
|
+
import Card from '@mui/material/Card';
|
|
15
|
+
import CardActionArea from '@mui/material/CardActionArea';
|
|
16
|
+
import CardMedia from '@mui/material/CardMedia';
|
|
17
|
+
import Typography$1 from '@mui/material/Typography';
|
|
18
|
+
import createStyles from '@mui/styles/createStyles';
|
|
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
21
|
import { Histogram, useFilterState, FilterComponent, AnalyticsComponent } from '@crystaldesign/analytics';
|
|
21
|
-
import Button from '@material
|
|
22
|
-
import ButtonGroup from '@material
|
|
23
|
-
import ClickAwayListener from '@material
|
|
24
|
-
import Grow from '@material
|
|
25
|
-
import Paper from '@material
|
|
26
|
-
import Popper from '@material
|
|
27
|
-
import MenuItem from '@material
|
|
28
|
-
import MenuList from '@material
|
|
29
|
-
import Table from '@material
|
|
30
|
-
import TableRow from '@material
|
|
31
|
-
import TableBody from '@material
|
|
32
|
-
import TableCell from '@material
|
|
33
|
-
import TableHead from '@material
|
|
34
|
-
import TableContainer from '@material
|
|
22
|
+
import Button from '@mui/material/Button';
|
|
23
|
+
import ButtonGroup from '@mui/material/ButtonGroup';
|
|
24
|
+
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
25
|
+
import Grow from '@mui/material/Grow';
|
|
26
|
+
import Paper from '@mui/material/Paper';
|
|
27
|
+
import Popper from '@mui/material/Popper';
|
|
28
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
29
|
+
import MenuList from '@mui/material/MenuList';
|
|
30
|
+
import Table from '@mui/material/Table';
|
|
31
|
+
import TableRow from '@mui/material/TableRow';
|
|
32
|
+
import TableBody from '@mui/material/TableBody';
|
|
33
|
+
import TableCell from '@mui/material/TableCell';
|
|
34
|
+
import TableHead from '@mui/material/TableHead';
|
|
35
|
+
import TableContainer from '@mui/material/TableContainer';
|
|
35
36
|
import { useHover, useLayer } from 'react-laag';
|
|
36
|
-
import AddIcon from '@
|
|
37
|
-
import AddCircleIcon from '@
|
|
38
|
-
import RemoveIcon from '@
|
|
39
|
-
import LocalOfferIcon from '@
|
|
40
|
-
import IconButton from '@material
|
|
37
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
38
|
+
import AddCircleIcon from '@mui/icons-material/AddCircle';
|
|
39
|
+
import RemoveIcon from '@mui/icons-material/Remove';
|
|
40
|
+
import LocalOfferIcon from '@mui/icons-material/LocalOffer';
|
|
41
|
+
import IconButton from '@mui/material/IconButton';
|
|
42
|
+
import withStyles from '@mui/styles/withStyles';
|
|
41
43
|
import { NumericFormat } from 'react-number-format';
|
|
42
|
-
import Divider from '@material
|
|
44
|
+
import Divider from '@mui/material/Divider';
|
|
43
45
|
import Form from '@crystaldesign/forms';
|
|
44
46
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
45
|
-
import InputLabel from '@material
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import TextField$1 from '@material
|
|
53
|
-
import Select from '@material
|
|
54
|
-
import Input from '@material
|
|
55
|
-
import OrderEntry, { VariantSelector } from '@crystaldesign/order-entry';
|
|
56
|
-
import CloseIcon from '@
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import PictureAsPdfIcon from '@material-ui/icons/PictureAsPdf';
|
|
60
|
-
import GridList from '@material-ui/core/GridList';
|
|
61
|
-
import GridListTile from '@material-ui/core/GridListTile';
|
|
62
|
-
import ExpandLess from '@material-ui/icons/ExpandLess';
|
|
63
|
-
import ExpandMore from '@material-ui/icons/ExpandMore';
|
|
64
|
-
import Skeleton from '@material-ui/lab/Skeleton';
|
|
65
|
-
import Carousel from 'react-material-ui-carousel';
|
|
66
|
-
import Toolbar from '@material-ui/core/Toolbar';
|
|
67
|
-
import classNames from 'classnames';
|
|
47
|
+
import InputLabel from '@mui/material/InputLabel';
|
|
48
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
49
|
+
import FormControl from '@mui/material/FormControl';
|
|
50
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
51
|
+
import FormGroup from '@mui/material/FormGroup';
|
|
52
|
+
import FormLabel from '@mui/material/FormLabel';
|
|
53
|
+
import { styled as styled$1 } from '@mui/material/styles';
|
|
54
|
+
import TextField$1 from '@mui/material/TextField';
|
|
55
|
+
import Select from '@mui/material/Select';
|
|
56
|
+
import Input from '@mui/material/Input';
|
|
57
|
+
import OrderEntry, { apiSaveRenderJobs, VariantSelector } from '@crystaldesign/order-entry';
|
|
58
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
59
|
+
import classnames from 'classnames';
|
|
60
|
+
import { InfoRounded, Remove, Add, Delete } from '@mui/icons-material';
|
|
68
61
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
69
|
-
import { Autoplay, Thumbs, Pagination, FreeMode } from 'swiper/modules';
|
|
62
|
+
import { Autoplay, Thumbs, Pagination, FreeMode, Mousewheel } from 'swiper/modules';
|
|
70
63
|
import 'swiper/css';
|
|
71
64
|
import 'swiper/css/pagination';
|
|
72
65
|
import 'swiper/css/autoplay';
|
|
73
66
|
import 'swiper/css/thumbs';
|
|
74
67
|
import 'swiper/css/free-mode';
|
|
75
|
-
import '
|
|
76
|
-
import
|
|
68
|
+
import 'swiper/css/mousewheel';
|
|
69
|
+
import ExpandMore from '@mui/icons-material/ExpandMore';
|
|
77
70
|
import ProductsComponent, { useProductState as useProductState$1 } from '@crystaldesign/products-component';
|
|
78
|
-
import
|
|
79
|
-
import Tab$1 from '@material
|
|
80
|
-
import Tabs$1 from '@material
|
|
81
|
-
import Autocomplete$1 from '@material
|
|
71
|
+
import Alert from '@mui/lab/Alert';
|
|
72
|
+
import Tab$1 from '@mui/material/Tab';
|
|
73
|
+
import Tabs$1 from '@mui/material/Tabs';
|
|
74
|
+
import Autocomplete$1 from '@mui/material/Autocomplete';
|
|
75
|
+
import Grid$1 from '@mui/material/Grid2';
|
|
82
76
|
import { TRANSLATED_FILEDS, ProductHandlerAbstract } from '@crystaldesign/product-handler';
|
|
83
77
|
import RTFEditor from '@crystaldesign/rtf-editor';
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
import
|
|
93
|
-
import
|
|
78
|
+
import CardHeader$1 from '@mui/material/CardHeader';
|
|
79
|
+
import CardContent$1 from '@mui/material/CardContent';
|
|
80
|
+
import Menu from '@mui/material/Menu';
|
|
81
|
+
import Tooltip$1 from '@mui/material/Tooltip';
|
|
82
|
+
import Collapse from '@mui/material/Collapse';
|
|
83
|
+
import List from '@mui/material/List';
|
|
84
|
+
import ListItem from '@mui/material/ListItem';
|
|
85
|
+
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
86
|
+
import ListItemText from '@mui/material/ListItemText';
|
|
87
|
+
import ExpandLess from '@mui/icons-material/ExpandLess';
|
|
94
88
|
import SearchField from '@crystaldesign/searchfield';
|
|
95
|
-
import Drawer from '@material
|
|
89
|
+
import Drawer from '@mui/material/Drawer';
|
|
96
90
|
import AssetEditor, { DivaFile } from '@crystaldesign/media-upload';
|
|
97
|
-
import AddIcon$1 from '@
|
|
98
|
-
import DeleteIcon from '@
|
|
91
|
+
import AddIcon$1 from '@mui/icons-material/NoteAdd';
|
|
92
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
99
93
|
import debounce from 'lodash/debounce';
|
|
100
|
-
import Alert from '@material
|
|
101
|
-
import Settings from '@
|
|
94
|
+
import Alert$1 from '@mui/material/Alert';
|
|
95
|
+
import Settings from '@mui/icons-material/Settings';
|
|
102
96
|
|
|
103
97
|
(function() {
|
|
104
98
|
const env = {"STAGE":"production"};
|
|
@@ -200,7 +194,7 @@ var SellerContext = /*#__PURE__*/createContext({
|
|
|
200
194
|
}
|
|
201
195
|
});
|
|
202
196
|
|
|
203
|
-
var _excluded$
|
|
197
|
+
var _excluded$b = ["internal"];
|
|
204
198
|
var GROUP_ID = 'SELLER';
|
|
205
199
|
function useBreadcrumbs(_ref) {
|
|
206
200
|
var updateBreadcrumbs = _ref.updateBreadcrumbs,
|
|
@@ -364,7 +358,7 @@ function breadcrumbPlanner(_ref6) {
|
|
|
364
358
|
if (state.currentPlannerParams) {
|
|
365
359
|
var _state$currentPlanner = state.currentPlannerParams,
|
|
366
360
|
internal = _state$currentPlanner.internal,
|
|
367
|
-
params = _objectWithoutProperties(_state$currentPlanner, _excluded$
|
|
361
|
+
params = _objectWithoutProperties(_state$currentPlanner, _excluded$b);
|
|
368
362
|
return {
|
|
369
363
|
groupId: GROUP_ID,
|
|
370
364
|
level: 3,
|
|
@@ -463,11 +457,11 @@ function breadcrumbCollection() {
|
|
|
463
457
|
};
|
|
464
458
|
}
|
|
465
459
|
|
|
466
|
-
function ownKeys$
|
|
467
|
-
function _objectSpread$
|
|
460
|
+
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
461
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
468
462
|
var reducer$1 = function reducer(state, action) {
|
|
469
463
|
if (action.type == 'update') {
|
|
470
|
-
var newState = _objectSpread$
|
|
464
|
+
var newState = _objectSpread$B({}, state);
|
|
471
465
|
action.payload.forEach(function (p) {
|
|
472
466
|
if (p.field == 'basketState') {
|
|
473
467
|
if (p.value) {
|
|
@@ -1290,15 +1284,15 @@ function orderFn(a, b, orderBy) {
|
|
|
1290
1284
|
return 0;
|
|
1291
1285
|
}
|
|
1292
1286
|
|
|
1293
|
-
var _excluded$
|
|
1294
|
-
_excluded2$
|
|
1287
|
+
var _excluded$a = ["collectionId"],
|
|
1288
|
+
_excluded2$2 = ["basetId"],
|
|
1295
1289
|
_excluded3$1 = ["catalogCodex", "accountId"];
|
|
1296
1290
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
1297
1291
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
1298
1292
|
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1299
|
-
function ownKeys$
|
|
1300
|
-
function _objectSpread$
|
|
1301
|
-
var LOG$
|
|
1293
|
+
function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1294
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1295
|
+
var LOG$9 = getLogger('Seller', 'SellerStateData');
|
|
1302
1296
|
function useSellerStateData(_ref) {
|
|
1303
1297
|
var sessionGuid = _ref.sessionGuid,
|
|
1304
1298
|
configData = _ref.configData,
|
|
@@ -1335,7 +1329,7 @@ function useSellerStateData(_ref) {
|
|
|
1335
1329
|
var updateAcountLogo = function updateAcountLogo(logo) {
|
|
1336
1330
|
updateCustomLogo(['SELLER', 'DIVA_WEBPLANNER', 'REPORT'], logo);
|
|
1337
1331
|
};
|
|
1338
|
-
var basketHandler = new BasketHandler(LOG$
|
|
1332
|
+
var basketHandler = new BasketHandler(LOG$9, apiConfig.basketService, apiConfig.api2["default"]);
|
|
1339
1333
|
useEffect(function () {
|
|
1340
1334
|
if (loginMode !== 'offline' && isVisible == true) {
|
|
1341
1335
|
resetState();
|
|
@@ -1427,7 +1421,7 @@ function useSellerStateData(_ref) {
|
|
|
1427
1421
|
}]
|
|
1428
1422
|
});
|
|
1429
1423
|
case 7:
|
|
1430
|
-
return _context.abrupt("return", processData(_objectSpread$
|
|
1424
|
+
return _context.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
1431
1425
|
data: collections
|
|
1432
1426
|
})));
|
|
1433
1427
|
case 10:
|
|
@@ -1451,7 +1445,7 @@ function useSellerStateData(_ref) {
|
|
|
1451
1445
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
1452
1446
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1453
1447
|
case 0:
|
|
1454
|
-
collectionId = _ref3.collectionId, props = _objectWithoutProperties(_ref3, _excluded$
|
|
1448
|
+
collectionId = _ref3.collectionId, props = _objectWithoutProperties(_ref3, _excluded$a);
|
|
1455
1449
|
if (!(state.firstLoginApiUrl && sessionGuid)) {
|
|
1456
1450
|
_context2.next = 14;
|
|
1457
1451
|
break;
|
|
@@ -1491,7 +1485,7 @@ function useSellerStateData(_ref) {
|
|
|
1491
1485
|
updateAcountLogo((_state$collections = state.collections) === null || _state$collections === void 0 || (_state$collections = _state$collections.find(function (c) {
|
|
1492
1486
|
return c.id == collectionId;
|
|
1493
1487
|
})) === null || _state$collections === void 0 ? void 0 : _state$collections.accountLogo);
|
|
1494
|
-
return _context2.abrupt("return", processData(_objectSpread$
|
|
1488
|
+
return _context2.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
1495
1489
|
data: catalogs || []
|
|
1496
1490
|
})));
|
|
1497
1491
|
case 14:
|
|
@@ -1613,7 +1607,7 @@ function useSellerStateData(_ref) {
|
|
|
1613
1607
|
_context4.next = 26;
|
|
1614
1608
|
break;
|
|
1615
1609
|
}
|
|
1616
|
-
LOG$
|
|
1610
|
+
LOG$9.error(new DivaError('AccountSessionId is undefined', {
|
|
1617
1611
|
code: 'SELLER_0001'
|
|
1618
1612
|
}));
|
|
1619
1613
|
return _context4.abrupt("return");
|
|
@@ -1661,7 +1655,7 @@ function useSellerStateData(_ref) {
|
|
|
1661
1655
|
_context4.next = 40;
|
|
1662
1656
|
break;
|
|
1663
1657
|
}
|
|
1664
|
-
LOG$
|
|
1658
|
+
LOG$9.error(new DivaError('Error on Loading CatalogData', {
|
|
1665
1659
|
code: 'SELLER_0001',
|
|
1666
1660
|
cause: _context4.t2
|
|
1667
1661
|
}));
|
|
@@ -1794,7 +1788,7 @@ function useSellerStateData(_ref) {
|
|
|
1794
1788
|
}();
|
|
1795
1789
|
var updateBasketState = function updateBasketState(_ref12) {
|
|
1796
1790
|
var basetId = _ref12.basetId,
|
|
1797
|
-
basketState = _objectWithoutProperties(_ref12, _excluded2$
|
|
1791
|
+
basketState = _objectWithoutProperties(_ref12, _excluded2$2);
|
|
1798
1792
|
dispatch({
|
|
1799
1793
|
type: 'update',
|
|
1800
1794
|
payload: [{
|
|
@@ -1878,8 +1872,8 @@ function useSellerStateData(_ref) {
|
|
|
1878
1872
|
_context7.next = 22;
|
|
1879
1873
|
return apiLoadBasket({
|
|
1880
1874
|
divaNr: divaNr,
|
|
1881
|
-
apiConfig: _objectSpread$
|
|
1882
|
-
api2: _objectSpread$
|
|
1875
|
+
apiConfig: _objectSpread$A(_objectSpread$A({}, apiConfig), {}, {
|
|
1876
|
+
api2: _objectSpread$A(_objectSpread$A({}, apiConfig.api2), {}, {
|
|
1883
1877
|
"default": state.firstLoginApiUrl
|
|
1884
1878
|
})
|
|
1885
1879
|
}),
|
|
@@ -2207,7 +2201,7 @@ function useSellerStateData(_ref) {
|
|
|
2207
2201
|
}]
|
|
2208
2202
|
});
|
|
2209
2203
|
case 24:
|
|
2210
|
-
return _context9.abrupt("return", processData(_objectSpread$
|
|
2204
|
+
return _context9.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
2211
2205
|
data: articles || []
|
|
2212
2206
|
})));
|
|
2213
2207
|
case 27:
|
|
@@ -2263,10 +2257,10 @@ function useSellerStateData(_ref) {
|
|
|
2263
2257
|
};
|
|
2264
2258
|
}
|
|
2265
2259
|
|
|
2266
|
-
var _excluded$
|
|
2267
|
-
function ownKeys$
|
|
2268
|
-
function _objectSpread$
|
|
2269
|
-
var LOG$
|
|
2260
|
+
var _excluded$9 = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "resetState", "resetForCache"];
|
|
2261
|
+
function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2262
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2263
|
+
var LOG$8 = getLogger('Seller', 'SellerStateProvider');
|
|
2270
2264
|
var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
2271
2265
|
var children = _ref.children,
|
|
2272
2266
|
vkpExportParams = _ref.vkpExportParams,
|
|
@@ -2346,7 +2340,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2346
2340
|
setProductCategories = _useSellerStateData.setProductCategories,
|
|
2347
2341
|
resetState = _useSellerStateData.resetState,
|
|
2348
2342
|
resetForCache = _useSellerStateData.resetForCache,
|
|
2349
|
-
stateFunctions = _objectWithoutProperties(_useSellerStateData, _excluded$
|
|
2343
|
+
stateFunctions = _objectWithoutProperties(_useSellerStateData, _excluded$9);
|
|
2350
2344
|
if (oldSession !== undefined && oldSession !== sessionGuid) resetState();
|
|
2351
2345
|
if (oldSession !== sessionGuid) setOldSession(sessionGuid);
|
|
2352
2346
|
useEffect(function () {
|
|
@@ -2588,7 +2582,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2588
2582
|
case 37:
|
|
2589
2583
|
_context3.prev = 37;
|
|
2590
2584
|
_context3.t0 = _context3["catch"](0);
|
|
2591
|
-
LOG$
|
|
2585
|
+
LOG$8.error(new DivaError('Could not open divaNr', {
|
|
2592
2586
|
cause: _context3.t0,
|
|
2593
2587
|
code: 'SELLER_0001'
|
|
2594
2588
|
}));
|
|
@@ -2629,7 +2623,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2629
2623
|
_context4.next = 8;
|
|
2630
2624
|
break;
|
|
2631
2625
|
}
|
|
2632
|
-
params = _objectSpread$
|
|
2626
|
+
params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({
|
|
2633
2627
|
catalogCodex: catalogCodex
|
|
2634
2628
|
}, accountId ? {
|
|
2635
2629
|
accountId: accountId
|
|
@@ -2644,13 +2638,13 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2644
2638
|
} : {}), retailArticleNr ? {
|
|
2645
2639
|
retailArticleNr: retailArticleNr
|
|
2646
2640
|
} : {});
|
|
2647
|
-
internal = _objectSpread$
|
|
2641
|
+
internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2648
2642
|
forceReload: forceReload
|
|
2649
2643
|
} : {}), {}, {
|
|
2650
2644
|
accountSessionGuid: accountSessionGuid,
|
|
2651
2645
|
basketData: basketData
|
|
2652
2646
|
});
|
|
2653
|
-
setPlannerParams(_objectSpread$
|
|
2647
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2654
2648
|
internal: internal
|
|
2655
2649
|
}));
|
|
2656
2650
|
openComponent({
|
|
@@ -2682,7 +2676,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2682
2676
|
updateBasketState({
|
|
2683
2677
|
concat: true
|
|
2684
2678
|
});
|
|
2685
|
-
var _params = _objectSpread$
|
|
2679
|
+
var _params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2686
2680
|
catalogCodex: catalogCodex
|
|
2687
2681
|
} : {}), accountId ? {
|
|
2688
2682
|
accountId: accountId
|
|
@@ -2699,12 +2693,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2699
2693
|
} : {}), productId ? {
|
|
2700
2694
|
productId: productId
|
|
2701
2695
|
} : {});
|
|
2702
|
-
var _internal = _objectSpread$
|
|
2696
|
+
var _internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2703
2697
|
forceReload: forceReload
|
|
2704
2698
|
} : {}), {}, {
|
|
2705
2699
|
accountSessionGuid: accountSessionGuid
|
|
2706
2700
|
});
|
|
2707
|
-
setPlannerParams(_objectSpread$
|
|
2701
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params), {}, {
|
|
2708
2702
|
internal: _internal
|
|
2709
2703
|
}));
|
|
2710
2704
|
openComponent({
|
|
@@ -2737,7 +2731,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2737
2731
|
});
|
|
2738
2732
|
}
|
|
2739
2733
|
} else {
|
|
2740
|
-
_params2 = _objectSpread$
|
|
2734
|
+
_params2 = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2741
2735
|
catalogCodex: catalogCodex
|
|
2742
2736
|
} : {}), accountId ? {
|
|
2743
2737
|
accountId: accountId
|
|
@@ -2752,12 +2746,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2752
2746
|
} : {}), retailArticleNr ? {
|
|
2753
2747
|
retailArticleNr: retailArticleNr
|
|
2754
2748
|
} : {});
|
|
2755
|
-
_internal2 = _objectSpread$
|
|
2749
|
+
_internal2 = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2756
2750
|
forceReload: forceReload
|
|
2757
2751
|
} : {}), {}, {
|
|
2758
2752
|
accountSessionGuid: accountSessionGuid
|
|
2759
2753
|
});
|
|
2760
|
-
setPlannerParams(_objectSpread$
|
|
2754
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params2), {}, {
|
|
2761
2755
|
internal: _internal2
|
|
2762
2756
|
}));
|
|
2763
2757
|
openComponent({
|
|
@@ -2793,7 +2787,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2793
2787
|
divaNr: divaNr,
|
|
2794
2788
|
returnTo: returnTo
|
|
2795
2789
|
};
|
|
2796
|
-
setPlannerParams(_objectSpread$
|
|
2790
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params3), {}, {
|
|
2797
2791
|
internal: {
|
|
2798
2792
|
basketData: basketData,
|
|
2799
2793
|
forceReload: forceReload
|
|
@@ -2810,7 +2804,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2810
2804
|
_context4.next = 23;
|
|
2811
2805
|
break;
|
|
2812
2806
|
case 22:
|
|
2813
|
-
LOG$
|
|
2807
|
+
LOG$8.error(new DivaError('openPlanner got called with non all required params', {
|
|
2814
2808
|
code: 'SELLER_0001'
|
|
2815
2809
|
}));
|
|
2816
2810
|
case 23:
|
|
@@ -2841,7 +2835,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2841
2835
|
step: null,
|
|
2842
2836
|
assignNewDivaNr: false
|
|
2843
2837
|
});
|
|
2844
|
-
var params = _objectSpread$
|
|
2838
|
+
var params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2845
2839
|
catalogCodex: catalogCodex
|
|
2846
2840
|
} : {}), accountId ? {
|
|
2847
2841
|
accountId: accountId
|
|
@@ -2856,12 +2850,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2856
2850
|
} : {}), retailArticleNr ? {
|
|
2857
2851
|
retailArticleNr: retailArticleNr
|
|
2858
2852
|
} : {});
|
|
2859
|
-
var internal = _objectSpread$
|
|
2853
|
+
var internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2860
2854
|
forceReload: forceReload
|
|
2861
2855
|
} : {}), {}, {
|
|
2862
2856
|
accountSessionGuid: accountSessionGuid
|
|
2863
2857
|
});
|
|
2864
|
-
setPlannerParams(_objectSpread$
|
|
2858
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2865
2859
|
internal: internal
|
|
2866
2860
|
}));
|
|
2867
2861
|
openComponent({
|
|
@@ -2909,7 +2903,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2909
2903
|
case 'toPlanner':
|
|
2910
2904
|
{
|
|
2911
2905
|
if (plannerParams) {
|
|
2912
|
-
var params = _objectSpread$
|
|
2906
|
+
var params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, plannerParams.catalogCodex ? {
|
|
2913
2907
|
catalogCodex: plannerParams.catalogCodex
|
|
2914
2908
|
} : {}), plannerParams.accountId ? {
|
|
2915
2909
|
accountId: plannerParams.accountId
|
|
@@ -2922,12 +2916,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2922
2916
|
} : {}), plannerParams.retailArticleNr ? {
|
|
2923
2917
|
retailArticleNr: plannerParams.retailArticleNr
|
|
2924
2918
|
} : {});
|
|
2925
|
-
var internal = _objectSpread$
|
|
2919
|
+
var internal = _objectSpread$z(_objectSpread$z({}, plannerParams.forceReload ? {
|
|
2926
2920
|
forceReload: plannerParams.forceReload
|
|
2927
2921
|
} : {}), {}, {
|
|
2928
2922
|
accountSessionGuid: plannerParams.accountSessionGuid
|
|
2929
2923
|
});
|
|
2930
|
-
setPlannerParams(_objectSpread$
|
|
2924
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2931
2925
|
internal: internal
|
|
2932
2926
|
}));
|
|
2933
2927
|
openComponent({
|
|
@@ -2954,8 +2948,8 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2954
2948
|
_context5.next = 2;
|
|
2955
2949
|
return apiLoadBasket({
|
|
2956
2950
|
divaNr: divaNr,
|
|
2957
|
-
apiConfig: _objectSpread$
|
|
2958
|
-
api2: _objectSpread$
|
|
2951
|
+
apiConfig: _objectSpread$z(_objectSpread$z({}, apiConfig), {}, {
|
|
2952
|
+
api2: _objectSpread$z(_objectSpread$z({}, apiConfig.api2), {}, {
|
|
2959
2953
|
"default": state.firstLoginApiUrl
|
|
2960
2954
|
})
|
|
2961
2955
|
}),
|
|
@@ -3024,7 +3018,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3024
3018
|
originProductId: state.originProductId,
|
|
3025
3019
|
productCategories: state.productCategories
|
|
3026
3020
|
},
|
|
3027
|
-
actions: _objectSpread$
|
|
3021
|
+
actions: _objectSpread$z(_objectSpread$z({}, stateFunctions), {}, {
|
|
3028
3022
|
openComponent: openComponent,
|
|
3029
3023
|
openModal: openModal,
|
|
3030
3024
|
openPlanner: openPlanner,
|
|
@@ -3048,13 +3042,13 @@ var useSellerState = function useSellerState() {
|
|
|
3048
3042
|
};
|
|
3049
3043
|
|
|
3050
3044
|
function Badge3D() {
|
|
3051
|
-
var classes = useStyles$
|
|
3045
|
+
var classes = useStyles$3();
|
|
3052
3046
|
return /*#__PURE__*/jsx("span", {
|
|
3053
3047
|
className: classes.root,
|
|
3054
3048
|
children: "3D"
|
|
3055
3049
|
});
|
|
3056
3050
|
}
|
|
3057
|
-
var useStyles$
|
|
3051
|
+
var useStyles$3 = makeStyles(function () {
|
|
3058
3052
|
return createStyles({
|
|
3059
3053
|
root: {
|
|
3060
3054
|
position: 'absolute',
|
|
@@ -3072,38 +3066,39 @@ var useStyles$7 = makeStyles(function () {
|
|
|
3072
3066
|
});
|
|
3073
3067
|
});
|
|
3074
3068
|
|
|
3075
|
-
function ownKeys$
|
|
3076
|
-
function _objectSpread$
|
|
3069
|
+
function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3070
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3077
3071
|
function Title(_ref) {
|
|
3078
3072
|
var text = _ref.text,
|
|
3079
3073
|
children = _ref.children,
|
|
3080
3074
|
help = _ref.help;
|
|
3081
3075
|
return /*#__PURE__*/jsxs(Wrapper, {
|
|
3082
|
-
children: [/*#__PURE__*/
|
|
3076
|
+
children: [/*#__PURE__*/jsxs(Typography, {
|
|
3083
3077
|
variant: "h4",
|
|
3084
3078
|
component: "h2",
|
|
3085
|
-
children: text
|
|
3086
|
-
}), help && /*#__PURE__*/jsx(HelpButton, _objectSpread$x({}, help)), /*#__PURE__*/jsx("div", {
|
|
3087
3079
|
style: {
|
|
3088
|
-
|
|
3089
|
-
}
|
|
3080
|
+
flexGrow: 1
|
|
3081
|
+
},
|
|
3082
|
+
children: [text, help && /*#__PURE__*/jsx(HelpButton, _objectSpread$y({}, help))]
|
|
3090
3083
|
}), children]
|
|
3091
3084
|
});
|
|
3092
3085
|
}
|
|
3093
|
-
var Wrapper = styled(
|
|
3086
|
+
var Wrapper = styled('div')({
|
|
3094
3087
|
display: 'flex',
|
|
3095
3088
|
justifyContent: 'space-between',
|
|
3096
3089
|
alignItems: 'center',
|
|
3097
|
-
margin: '10px 10px 0 10px'
|
|
3090
|
+
margin: '10px 10px 0 10px',
|
|
3091
|
+
flexWrap: 'wrap',
|
|
3092
|
+
gap: '10px'
|
|
3098
3093
|
});
|
|
3099
3094
|
|
|
3100
3095
|
function getImageOrFallbackUrl(url) {
|
|
3101
3096
|
return url || 'https://cdn.diva-portal.com/static/images/image_placeholder-landscape-short.png';
|
|
3102
3097
|
}
|
|
3103
3098
|
|
|
3104
|
-
function ownKeys$
|
|
3105
|
-
function _objectSpread$
|
|
3106
|
-
var LOG$
|
|
3099
|
+
function ownKeys$x(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3100
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3101
|
+
var LOG$7 = getLogger('SellerCatalogs', 'Catalogs');
|
|
3107
3102
|
function Catalogs(_ref) {
|
|
3108
3103
|
var _configurationData$an, _configurationData$ca5, _configurationData$an3, _configurationData$an4;
|
|
3109
3104
|
var collectionId = _ref.collectionId;
|
|
@@ -3177,11 +3172,11 @@ function Catalogs(_ref) {
|
|
|
3177
3172
|
case 19:
|
|
3178
3173
|
_context.prev = 19;
|
|
3179
3174
|
_context.t2 = _context["catch"](1);
|
|
3180
|
-
LOG$
|
|
3175
|
+
LOG$7.errorTransaction('ON_OPEN_MODULE_CATALOGS', 'SELLER_0001', 'Could not load catalogs: ' + _context.t2, {
|
|
3181
3176
|
accountId: collectionId
|
|
3182
3177
|
});
|
|
3183
3178
|
case 22:
|
|
3184
|
-
LOG$
|
|
3179
|
+
LOG$7.successTransaction('ON_OPEN_MODULE_CATALOGS', {
|
|
3185
3180
|
accountId: collectionId
|
|
3186
3181
|
});
|
|
3187
3182
|
setLoading(false);
|
|
@@ -3196,7 +3191,7 @@ function Catalogs(_ref) {
|
|
|
3196
3191
|
};
|
|
3197
3192
|
}(), [loadCatalogs]);
|
|
3198
3193
|
useEffect(function () {
|
|
3199
|
-
LOG$
|
|
3194
|
+
LOG$7.startTransaction({
|
|
3200
3195
|
event: 'onOpenModule',
|
|
3201
3196
|
message: 'Open Catalogs',
|
|
3202
3197
|
eventId: 'ON_OPEN_MODULE_CATALOGS',
|
|
@@ -3215,7 +3210,7 @@ function Catalogs(_ref) {
|
|
|
3215
3210
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
3216
3211
|
while (1) switch (_context2.prev = _context2.next) {
|
|
3217
3212
|
case 0:
|
|
3218
|
-
LOG$
|
|
3213
|
+
LOG$7.businessEvent('onSelectCatalog', 'Seller', "Katalog wurde ausgew\xE4hlt: '".concat(item.name, "'"), {
|
|
3219
3214
|
catalogCodex: item.codex,
|
|
3220
3215
|
catalogName: item.name,
|
|
3221
3216
|
accountId: item.accountId,
|
|
@@ -3232,7 +3227,7 @@ function Catalogs(_ref) {
|
|
|
3232
3227
|
if (configurationData !== null && configurationData !== void 0 && (_configurationData$ca = configurationData.catalogs) !== null && _configurationData$ca !== void 0 && _configurationData$ca.onOpen) {
|
|
3233
3228
|
action = configurationData === null || configurationData === void 0 || (_configurationData$ca2 = configurationData.catalogs) === null || _configurationData$ca2 === void 0 ? void 0 : _configurationData$ca2.onOpen;
|
|
3234
3229
|
if (!action.url) {
|
|
3235
|
-
action = _objectSpread$
|
|
3230
|
+
action = _objectSpread$x({}, action);
|
|
3236
3231
|
parameters = {};
|
|
3237
3232
|
Object.entries(action.parameters || {}).forEach(function (_ref4) {
|
|
3238
3233
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
@@ -3248,7 +3243,7 @@ function Catalogs(_ref) {
|
|
|
3248
3243
|
} else {
|
|
3249
3244
|
openComponent({
|
|
3250
3245
|
type: 'SELLER',
|
|
3251
|
-
parameters: _objectSpread$
|
|
3246
|
+
parameters: _objectSpread$x({
|
|
3252
3247
|
module: 'Info',
|
|
3253
3248
|
catalogCodex: item.codex
|
|
3254
3249
|
}, item.accountId ? {
|
|
@@ -3506,7 +3501,7 @@ function Catalogs(_ref) {
|
|
|
3506
3501
|
});
|
|
3507
3502
|
}
|
|
3508
3503
|
|
|
3509
|
-
var LOG$
|
|
3504
|
+
var LOG$6 = getLogger('SellerCollections', 'Collections');
|
|
3510
3505
|
function Collections() {
|
|
3511
3506
|
var _configurationData$an, _configurationData$an2, _configurationData$an3;
|
|
3512
3507
|
var _useTranslation = useTranslation(),
|
|
@@ -3540,7 +3535,7 @@ function Collections() {
|
|
|
3540
3535
|
parameters: {
|
|
3541
3536
|
module: 'Catalogs'
|
|
3542
3537
|
}
|
|
3543
|
-
});else LOG$
|
|
3538
|
+
});else LOG$6.startTransaction({
|
|
3544
3539
|
event: 'onOpenModule',
|
|
3545
3540
|
message: 'Open Collections',
|
|
3546
3541
|
eventId: 'ON_OPEN_MODULE_COLLECTIONS'
|
|
@@ -3565,9 +3560,9 @@ function Collections() {
|
|
|
3565
3560
|
case 8:
|
|
3566
3561
|
_context.prev = 8;
|
|
3567
3562
|
_context.t0 = _context["catch"](1);
|
|
3568
|
-
LOG$
|
|
3563
|
+
LOG$6.errorTransaction('ON_OPEN_MODULE_COLLECTIONS', 'SELLER_0005', 'Error loading collections: ' + _context.t0);
|
|
3569
3564
|
case 11:
|
|
3570
|
-
LOG$
|
|
3565
|
+
LOG$6.successTransaction('ON_OPEN_MODULE_COLLECTIONS');
|
|
3571
3566
|
setLoading(false);
|
|
3572
3567
|
case 13:
|
|
3573
3568
|
case "end":
|
|
@@ -3585,7 +3580,7 @@ function Collections() {
|
|
|
3585
3580
|
//Grupperiung anch Kollektionen und Lieferanten
|
|
3586
3581
|
var onCollectionClick = function onCollectionClick(item) {
|
|
3587
3582
|
if (item) {
|
|
3588
|
-
LOG$
|
|
3583
|
+
LOG$6.businessEvent('onSelectCollection', 'Seller', "Kollektion wurde ausgew\xE4hlt: '".concat(item.accountName, "'"), {
|
|
3589
3584
|
accountId: item.id,
|
|
3590
3585
|
accountName: item.accountName
|
|
3591
3586
|
});
|
|
@@ -3725,7 +3720,7 @@ function Collections() {
|
|
|
3725
3720
|
});
|
|
3726
3721
|
}
|
|
3727
3722
|
|
|
3728
|
-
var LOG$
|
|
3723
|
+
var LOG$5 = getLogger('SellerArticles', 'Articles');
|
|
3729
3724
|
function Articles(_ref) {
|
|
3730
3725
|
var catalogCodex = _ref.catalogCodex,
|
|
3731
3726
|
accountId = _ref.accountId;
|
|
@@ -3752,7 +3747,7 @@ function Articles(_ref) {
|
|
|
3752
3747
|
var _useDivaCore = useDivaCore(),
|
|
3753
3748
|
organization = _useDivaCore.state.organization;
|
|
3754
3749
|
useEffect(function () {
|
|
3755
|
-
LOG$
|
|
3750
|
+
LOG$5.startTransaction({
|
|
3756
3751
|
event: 'onOpenModule',
|
|
3757
3752
|
message: 'Open Articles',
|
|
3758
3753
|
eventId: 'ON_OPEN_MODULE_SELLER_ARTICLES',
|
|
@@ -3774,7 +3769,7 @@ function Articles(_ref) {
|
|
|
3774
3769
|
_context.next = 5;
|
|
3775
3770
|
break;
|
|
3776
3771
|
}
|
|
3777
|
-
LOG$
|
|
3772
|
+
LOG$5.errorTransaction('ON_OPEN_MODULE_SELLER_ARTICLES', 'SELLER_0001', 'accountId or Catalog Codex missing', {
|
|
3778
3773
|
cat: catalogCodex,
|
|
3779
3774
|
accountId: accountId
|
|
3780
3775
|
});
|
|
@@ -3789,7 +3784,7 @@ function Articles(_ref) {
|
|
|
3789
3784
|
case 7:
|
|
3790
3785
|
articleItems = _context.sent;
|
|
3791
3786
|
setData(articleItems.data);
|
|
3792
|
-
LOG$
|
|
3787
|
+
LOG$5.successTransaction('ON_OPEN_MODULE_SELLER_ARTICLES', {
|
|
3793
3788
|
cat: catalogCodex,
|
|
3794
3789
|
accountId: accountId
|
|
3795
3790
|
});
|
|
@@ -4007,7 +4002,6 @@ function Header$1(_ref) {
|
|
|
4007
4002
|
return /*#__PURE__*/jsx("div", {
|
|
4008
4003
|
style: {
|
|
4009
4004
|
padding: '12px 16px',
|
|
4010
|
-
minHeight: '64px',
|
|
4011
4005
|
boxShadow: '0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)',
|
|
4012
4006
|
zIndex: 1
|
|
4013
4007
|
},
|
|
@@ -4016,18 +4010,12 @@ function Header$1(_ref) {
|
|
|
4016
4010
|
children: [showVKPExportButton && /*#__PURE__*/jsx(Button, {
|
|
4017
4011
|
color: 'primary',
|
|
4018
4012
|
variant: 'contained',
|
|
4019
|
-
style: {
|
|
4020
|
-
marginRight: 20
|
|
4021
|
-
},
|
|
4022
4013
|
onClick: doExportToVKP,
|
|
4023
4014
|
disabled: !enableVKPExportButton,
|
|
4024
4015
|
children: "VKP-Export"
|
|
4025
4016
|
}), showProductCreator && /*#__PURE__*/jsx(Button, {
|
|
4026
4017
|
color: 'primary',
|
|
4027
4018
|
variant: 'contained',
|
|
4028
|
-
style: {
|
|
4029
|
-
marginRight: 20
|
|
4030
|
-
},
|
|
4031
4019
|
onClick: openProductCreator,
|
|
4032
4020
|
children: t('basket.navigation.products')
|
|
4033
4021
|
}), /*#__PURE__*/jsxs(ButtonGroup, {
|
|
@@ -4071,8 +4059,8 @@ function Header(_ref) {
|
|
|
4071
4059
|
});
|
|
4072
4060
|
}
|
|
4073
4061
|
|
|
4074
|
-
function ownKeys$
|
|
4075
|
-
function _objectSpread$
|
|
4062
|
+
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4063
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4076
4064
|
function MenuListComposition(_ref) {
|
|
4077
4065
|
var setId = _ref.setId,
|
|
4078
4066
|
visibile = _ref.visibile,
|
|
@@ -4152,7 +4140,7 @@ function MenuListComposition(_ref) {
|
|
|
4152
4140
|
children: function children(_ref2) {
|
|
4153
4141
|
var TransitionProps = _ref2.TransitionProps,
|
|
4154
4142
|
placement = _ref2.placement;
|
|
4155
|
-
return /*#__PURE__*/jsx(Grow, _objectSpread$
|
|
4143
|
+
return /*#__PURE__*/jsx(Grow, _objectSpread$w(_objectSpread$w({}, TransitionProps), {}, {
|
|
4156
4144
|
style: {
|
|
4157
4145
|
transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
|
|
4158
4146
|
},
|
|
@@ -4233,8 +4221,8 @@ function Images(_ref) {
|
|
|
4233
4221
|
});
|
|
4234
4222
|
}
|
|
4235
4223
|
|
|
4236
|
-
function ownKeys$
|
|
4237
|
-
function _objectSpread$
|
|
4224
|
+
function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4225
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4238
4226
|
var OpvImage = function OpvImage(_ref) {
|
|
4239
4227
|
var src = _ref.src;
|
|
4240
4228
|
var _useHover = useHover({
|
|
@@ -4252,15 +4240,15 @@ var OpvImage = function OpvImage(_ref) {
|
|
|
4252
4240
|
layerProps = _useLayer.layerProps,
|
|
4253
4241
|
triggerProps = _useLayer.triggerProps;
|
|
4254
4242
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
4255
|
-
children: [/*#__PURE__*/jsx("img", _objectSpread$
|
|
4243
|
+
children: [/*#__PURE__*/jsx("img", _objectSpread$v(_objectSpread$v(_objectSpread$v({}, triggerProps), hoverProps), {}, {
|
|
4256
4244
|
src: src,
|
|
4257
4245
|
style: {
|
|
4258
4246
|
width: '20px'
|
|
4259
4247
|
}
|
|
4260
|
-
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$
|
|
4248
|
+
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$v(_objectSpread$v({
|
|
4261
4249
|
src: src.replace('_gal.', '.')
|
|
4262
4250
|
}, layerProps), {}, {
|
|
4263
|
-
style: _objectSpread$
|
|
4251
|
+
style: _objectSpread$v({
|
|
4264
4252
|
width: '300px'
|
|
4265
4253
|
}, layerProps.style)
|
|
4266
4254
|
}))))]
|
|
@@ -4273,7 +4261,7 @@ function SetTable(_ref) {
|
|
|
4273
4261
|
visibile = _ref.visibile;
|
|
4274
4262
|
var _useTranslation = useTranslation(),
|
|
4275
4263
|
t = _useTranslation.t;
|
|
4276
|
-
var classes = useStyles$
|
|
4264
|
+
var classes = useStyles$2();
|
|
4277
4265
|
var _useSellerState = useSellerState(),
|
|
4278
4266
|
_useSellerState$state = _useSellerState.state,
|
|
4279
4267
|
doShowPrices = _useSellerState$state.doShowPrices,
|
|
@@ -4584,7 +4572,7 @@ function SetTable(_ref) {
|
|
|
4584
4572
|
})
|
|
4585
4573
|
});
|
|
4586
4574
|
}
|
|
4587
|
-
var useStyles$
|
|
4575
|
+
var useStyles$2 = makeStyles({
|
|
4588
4576
|
table: {
|
|
4589
4577
|
minWidth: 650
|
|
4590
4578
|
}
|
|
@@ -4667,9 +4655,9 @@ function Set$1(_ref) {
|
|
|
4667
4655
|
});
|
|
4668
4656
|
}
|
|
4669
4657
|
|
|
4670
|
-
var _excluded$
|
|
4671
|
-
function ownKeys$
|
|
4672
|
-
function _objectSpread$
|
|
4658
|
+
var _excluded$8 = ["onValueChange", "value"];
|
|
4659
|
+
function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4660
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4673
4661
|
function DiscountField (_ref) {
|
|
4674
4662
|
var _ref2;
|
|
4675
4663
|
var updateDiscount = _ref.updateDiscount,
|
|
@@ -4699,6 +4687,7 @@ function DiscountField (_ref) {
|
|
|
4699
4687
|
},
|
|
4700
4688
|
onValueChange: function onValueChange(value) {
|
|
4701
4689
|
var _value$floatValue;
|
|
4690
|
+
if (value.floatValue === discount.percentageDiscount ? discount.percentageDiscount : '') return;
|
|
4702
4691
|
updateDiscount((_value$floatValue = value.floatValue) !== null && _value$floatValue !== void 0 ? _value$floatValue : 0, true, index);
|
|
4703
4692
|
}
|
|
4704
4693
|
}), showCalcedDiscountPrice && /*#__PURE__*/jsx(Typography, {
|
|
@@ -4736,7 +4725,7 @@ function DiscountField (_ref) {
|
|
|
4736
4725
|
function ControlledNumberFormat$1(_ref3) {
|
|
4737
4726
|
var onValueChange = _ref3.onValueChange,
|
|
4738
4727
|
origValue = _ref3.value,
|
|
4739
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
4728
|
+
props = _objectWithoutProperties(_ref3, _excluded$8);
|
|
4740
4729
|
var _useState = useState(origValue),
|
|
4741
4730
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4742
4731
|
value = _useState2[0],
|
|
@@ -4756,7 +4745,7 @@ function ControlledNumberFormat$1(_ref3) {
|
|
|
4756
4745
|
useEffect(function () {
|
|
4757
4746
|
setValue(origValue);
|
|
4758
4747
|
}, [origValue]);
|
|
4759
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4748
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
4760
4749
|
placeholder: props.suffix,
|
|
4761
4750
|
value: value === 0 ? undefined : value,
|
|
4762
4751
|
customInput: StyledTextFiled$1,
|
|
@@ -4780,9 +4769,9 @@ var StyledTextFiled$1 = withStyles({
|
|
|
4780
4769
|
}
|
|
4781
4770
|
})(TextField);
|
|
4782
4771
|
|
|
4783
|
-
var _excluded$
|
|
4784
|
-
function ownKeys$
|
|
4785
|
-
function _objectSpread$
|
|
4772
|
+
var _excluded$7 = ["onValueChange", "value"];
|
|
4773
|
+
function ownKeys$t(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4774
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4786
4775
|
function AdditionalPriceField (_ref) {
|
|
4787
4776
|
var updatePrice = _ref.updatePrice,
|
|
4788
4777
|
price = _ref.price,
|
|
@@ -4840,7 +4829,7 @@ function AdditionalPriceField (_ref) {
|
|
|
4840
4829
|
function ControlledNumberFormat(_ref2) {
|
|
4841
4830
|
var onValueChange = _ref2.onValueChange,
|
|
4842
4831
|
origValue = _ref2.value,
|
|
4843
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
4832
|
+
props = _objectWithoutProperties(_ref2, _excluded$7);
|
|
4844
4833
|
var _useState = useState(origValue),
|
|
4845
4834
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4846
4835
|
value = _useState2[0],
|
|
@@ -4860,7 +4849,7 @@ function ControlledNumberFormat(_ref2) {
|
|
|
4860
4849
|
useEffect(function () {
|
|
4861
4850
|
setValue(origValue);
|
|
4862
4851
|
}, [origValue]);
|
|
4863
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4852
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
4864
4853
|
placeholder: '0 ' + DivaUtils$1.defaultPriceFormat.currency,
|
|
4865
4854
|
value: value,
|
|
4866
4855
|
customInput: StyledTextFiled,
|
|
@@ -5007,6 +4996,7 @@ function PriceTable (_ref) {
|
|
|
5007
4996
|
onClick: function onClick() {
|
|
5008
4997
|
return updatePrice('', '', i, true);
|
|
5009
4998
|
},
|
|
4999
|
+
size: "large",
|
|
5010
5000
|
children: /*#__PURE__*/jsx(RemoveIcon, {})
|
|
5011
5001
|
})
|
|
5012
5002
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -5014,6 +5004,7 @@ function PriceTable (_ref) {
|
|
|
5014
5004
|
children: basket.AdditionalPrices.length - 1 == i && /*#__PURE__*/jsx(IconButton, {
|
|
5015
5005
|
"aria-label": "addPrice",
|
|
5016
5006
|
onClick: addPrice,
|
|
5007
|
+
size: "large",
|
|
5017
5008
|
children: /*#__PURE__*/jsx(AddIcon, {})
|
|
5018
5009
|
})
|
|
5019
5010
|
})]
|
|
@@ -5061,6 +5052,7 @@ function PriceTable (_ref) {
|
|
|
5061
5052
|
onClick: function onClick() {
|
|
5062
5053
|
return removeDiscount(i);
|
|
5063
5054
|
},
|
|
5055
|
+
size: "large",
|
|
5064
5056
|
children: /*#__PURE__*/jsx(RemoveIcon, {})
|
|
5065
5057
|
})
|
|
5066
5058
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -5068,6 +5060,7 @@ function PriceTable (_ref) {
|
|
|
5068
5060
|
children: basket.Discounts.length - 1 == i && /*#__PURE__*/jsx(IconButton, {
|
|
5069
5061
|
"aria-label": "addDiscount",
|
|
5070
5062
|
onClick: addDiscount,
|
|
5063
|
+
size: "large",
|
|
5071
5064
|
children: /*#__PURE__*/jsx(AddIcon, {})
|
|
5072
5065
|
})
|
|
5073
5066
|
})]
|
|
@@ -5097,11 +5090,13 @@ function PriceTable (_ref) {
|
|
|
5097
5090
|
id: "addPrice",
|
|
5098
5091
|
"aria-label": "addPrice",
|
|
5099
5092
|
onClick: addPrice,
|
|
5093
|
+
size: "large",
|
|
5100
5094
|
children: /*#__PURE__*/jsx(AddCircleIcon, {})
|
|
5101
5095
|
}), (!basket.Discounts || basket.Discounts.length == 0) && /*#__PURE__*/jsx(IconButton, {
|
|
5102
5096
|
id: "addDiscount",
|
|
5103
5097
|
"aria-label": "addDiscount",
|
|
5104
5098
|
onClick: addDiscount,
|
|
5099
|
+
size: "large",
|
|
5105
5100
|
children: /*#__PURE__*/jsx(LocalOfferIcon, {})
|
|
5106
5101
|
})]
|
|
5107
5102
|
})
|
|
@@ -5358,8 +5353,8 @@ function StatusMenu(_ref) {
|
|
|
5358
5353
|
});
|
|
5359
5354
|
}
|
|
5360
5355
|
|
|
5361
|
-
var useStyles$
|
|
5362
|
-
return createStyles
|
|
5356
|
+
var useStyles$1 = makeStyles(function (theme) {
|
|
5357
|
+
return createStyles({
|
|
5363
5358
|
margin: {
|
|
5364
5359
|
margin: theme.spacing(1)
|
|
5365
5360
|
},
|
|
@@ -5377,7 +5372,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5377
5372
|
userInfoPresent = _ref.userInfoPresent;
|
|
5378
5373
|
var _useTranslation = useTranslation(),
|
|
5379
5374
|
t = _useTranslation.t;
|
|
5380
|
-
var classes = useStyles$
|
|
5375
|
+
var classes = useStyles$1();
|
|
5381
5376
|
return /*#__PURE__*/jsxs("div", {
|
|
5382
5377
|
style: {
|
|
5383
5378
|
marginTop: '0.4rem',
|
|
@@ -5430,7 +5425,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5430
5425
|
onClickSave(undefined, false, true);
|
|
5431
5426
|
},
|
|
5432
5427
|
className: classes.margin,
|
|
5433
|
-
children: t('
|
|
5428
|
+
children: t('basket.checkout.actions.saveAsFavorite')
|
|
5434
5429
|
})
|
|
5435
5430
|
}), status == 'BASE_CONFIGURATION' && /*#__PURE__*/jsx(Button$1, {
|
|
5436
5431
|
variant: "outlined",
|
|
@@ -5441,7 +5436,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5441
5436
|
onClickSave(undefined, false, true, true);
|
|
5442
5437
|
},
|
|
5443
5438
|
className: classes.margin,
|
|
5444
|
-
children: t('
|
|
5439
|
+
children: t('basket.checkout.actions.saveAndOrderMedia')
|
|
5445
5440
|
}), (configSaveButtons === null || configSaveButtons === void 0 ? void 0 : configSaveButtons.includes('NEW')) && /*#__PURE__*/jsx(Button$1, {
|
|
5446
5441
|
variant: "outlined",
|
|
5447
5442
|
size: "medium",
|
|
@@ -5664,12 +5659,12 @@ function HqRenderBox (_ref) {
|
|
|
5664
5659
|
})]
|
|
5665
5660
|
});
|
|
5666
5661
|
}
|
|
5667
|
-
var ErrorBox = styled$1(
|
|
5662
|
+
var ErrorBox = styled$1('div')({
|
|
5668
5663
|
marginLeft: '50px',
|
|
5669
5664
|
color: 'red',
|
|
5670
5665
|
marginTop: '20px'
|
|
5671
5666
|
});
|
|
5672
|
-
var BorderBox = styled$1(
|
|
5667
|
+
var BorderBox = styled$1('div')({
|
|
5673
5668
|
border: '1px grey solid',
|
|
5674
5669
|
padding: '20px',
|
|
5675
5670
|
marginLeft: '50px',
|
|
@@ -5749,8 +5744,8 @@ var HQ_RenderingTypeSource = [{
|
|
|
5749
5744
|
RenderPipeline: 'vRayNext'
|
|
5750
5745
|
}];
|
|
5751
5746
|
|
|
5752
|
-
function ownKeys$
|
|
5753
|
-
function _objectSpread$
|
|
5747
|
+
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
|
+
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; }
|
|
5754
5749
|
function useProduct(basket) {
|
|
5755
5750
|
var _useState = useState(undefined),
|
|
5756
5751
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5772,7 +5767,7 @@ function useProduct(basket) {
|
|
|
5772
5767
|
});
|
|
5773
5768
|
case 2:
|
|
5774
5769
|
myProduct = _context.sent;
|
|
5775
|
-
setCurrentProduct(_objectSpread$
|
|
5770
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myProduct.baseData), {}, {
|
|
5776
5771
|
parent: (_myProduct$baseData$p = myProduct.baseData.parent) !== null && _myProduct$baseData$p !== void 0 ? _myProduct$baseData$p : myProduct.baseData._id
|
|
5777
5772
|
}));
|
|
5778
5773
|
return _context.abrupt("return", myProduct);
|
|
@@ -5802,7 +5797,7 @@ function useProduct(basket) {
|
|
|
5802
5797
|
});
|
|
5803
5798
|
case 2:
|
|
5804
5799
|
myproduct = _context2.sent;
|
|
5805
|
-
setCurrentProduct(_objectSpread$
|
|
5800
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myproduct[0]), {}, {
|
|
5806
5801
|
parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
|
|
5807
5802
|
}));
|
|
5808
5803
|
if (!favourite) {
|
|
@@ -5810,7 +5805,7 @@ function useProduct(basket) {
|
|
|
5810
5805
|
break;
|
|
5811
5806
|
}
|
|
5812
5807
|
_context2.next = 7;
|
|
5813
|
-
return productHandler.
|
|
5808
|
+
return productHandler.apiMarkAsFavorite(currentProduct._id, basket.OrganizationId);
|
|
5814
5809
|
case 7:
|
|
5815
5810
|
setCurrentProduct(currentProduct);
|
|
5816
5811
|
basket.DocumentVersion = basket.DocumentVersion + 1;
|
|
@@ -5865,8 +5860,8 @@ var hqMediaTitle = "hqMediaTitle-ugda8";
|
|
|
5865
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";
|
|
5866
5861
|
styleInject(css_248z$a);
|
|
5867
5862
|
|
|
5868
|
-
function ownKeys$
|
|
5869
|
-
function _objectSpread$
|
|
5863
|
+
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
|
+
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; }
|
|
5870
5865
|
function CheckOut(_ref) {
|
|
5871
5866
|
var _basket$Client;
|
|
5872
5867
|
var schema = _ref.schema,
|
|
@@ -5893,18 +5888,24 @@ function CheckOut(_ref) {
|
|
|
5893
5888
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
5894
5889
|
showRenderJobs = _useState6[0],
|
|
5895
5890
|
setShowRenderJobs = _useState6[1];
|
|
5891
|
+
var _useState7 = useState(false),
|
|
5892
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5893
|
+
basket3DExportChecked = _useState8[0],
|
|
5894
|
+
setBasket3DExportChecked = _useState8[1];
|
|
5896
5895
|
var _useTranslation = useTranslation(),
|
|
5897
5896
|
t = _useTranslation.t;
|
|
5898
5897
|
var _useSellerState = useSellerState(),
|
|
5899
|
-
|
|
5900
|
-
catalogData = _useSellerState$state.catalogData;
|
|
5901
|
-
_useSellerState$state.configurationData;
|
|
5898
|
+
catalogData = _useSellerState.state.catalogData;
|
|
5902
5899
|
var _useDivaCore = useDivaCore(),
|
|
5903
5900
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
5904
5901
|
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
5905
5902
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
5906
5903
|
openModal = _useDivaCore$actions.openModal,
|
|
5907
|
-
productHandler = _useDivaCore.handler.productHandler
|
|
5904
|
+
productHandler = _useDivaCore.handler.productHandler,
|
|
5905
|
+
_useDivaCore$state = _useDivaCore.state,
|
|
5906
|
+
apiConfig = _useDivaCore$state.apiConfig,
|
|
5907
|
+
jwt = _useDivaCore$state.jwt,
|
|
5908
|
+
organization = _useDivaCore$state.organization;
|
|
5908
5909
|
var _useProduct = useProduct(basket),
|
|
5909
5910
|
currentProduct = _useProduct.currentProduct,
|
|
5910
5911
|
loadProduct = _useProduct.loadProduct,
|
|
@@ -5969,26 +5970,26 @@ function CheckOut(_ref) {
|
|
|
5969
5970
|
};
|
|
5970
5971
|
}();
|
|
5971
5972
|
var handleSave = useCallback(/*#__PURE__*/function () {
|
|
5972
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5973
|
-
return _regeneratorRuntime.wrap(function
|
|
5974
|
-
while (1) switch (
|
|
5973
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail, favourite, hqMedia) {
|
|
5974
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
5975
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
5975
5976
|
case 0:
|
|
5976
5977
|
if (!(status === 'BASE_CONFIGURATION')) {
|
|
5977
|
-
|
|
5978
|
+
_context4.next = 13;
|
|
5978
5979
|
break;
|
|
5979
5980
|
}
|
|
5980
5981
|
if (!hqMedia) {
|
|
5981
|
-
|
|
5982
|
+
_context4.next = 6;
|
|
5982
5983
|
break;
|
|
5983
5984
|
}
|
|
5984
|
-
|
|
5985
|
+
_context4.next = 4;
|
|
5985
5986
|
return saveProductAndShowHqMedia();
|
|
5986
5987
|
case 4:
|
|
5987
|
-
|
|
5988
|
+
_context4.next = 11;
|
|
5988
5989
|
break;
|
|
5989
5990
|
case 6:
|
|
5990
5991
|
toggleLoading('saveProduct');
|
|
5991
|
-
|
|
5992
|
+
_context4.next = 9;
|
|
5992
5993
|
return saveProduct(favourite);
|
|
5993
5994
|
case 9:
|
|
5994
5995
|
toggleLoading('saveProduct');
|
|
@@ -5999,28 +6000,60 @@ function CheckOut(_ref) {
|
|
|
5999
6000
|
});
|
|
6000
6001
|
case 11:
|
|
6001
6002
|
setIsSaved(true);
|
|
6002
|
-
return
|
|
6003
|
+
return _context4.abrupt("return");
|
|
6003
6004
|
case 13:
|
|
6004
6005
|
if (!isSaving) {
|
|
6005
6006
|
setIsSaving(true);
|
|
6006
|
-
onClickSave(openPDF, sendMail).then(function (
|
|
6007
|
-
|
|
6008
|
-
|
|
6007
|
+
onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
|
|
6008
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
|
|
6009
|
+
var newRenderJob;
|
|
6010
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6011
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
6012
|
+
case 0:
|
|
6013
|
+
if (!basket3DExportChecked) {
|
|
6014
|
+
_context3.next = 4;
|
|
6015
|
+
break;
|
|
6016
|
+
}
|
|
6017
|
+
newRenderJob = {
|
|
6018
|
+
divaNr: basket.DivaNr,
|
|
6019
|
+
organization: basket.OrganizationId,
|
|
6020
|
+
job: '3DEXPORT',
|
|
6021
|
+
diva3DProject: basket.Diva3DProject ? atob(basket.Diva3DProject) : undefined,
|
|
6022
|
+
hQRenderScript: basket.OrderSets[0].HQRenderScript
|
|
6023
|
+
};
|
|
6024
|
+
_context3.next = 4;
|
|
6025
|
+
return apiSaveRenderJobs({
|
|
6026
|
+
serviceUrl: apiConfig.mediaService,
|
|
6027
|
+
jobs: [newRenderJob],
|
|
6028
|
+
jwt: jwt
|
|
6029
|
+
});
|
|
6030
|
+
case 4:
|
|
6031
|
+
setIsSaving(false);
|
|
6032
|
+
case 5:
|
|
6033
|
+
case "end":
|
|
6034
|
+
return _context3.stop();
|
|
6035
|
+
}
|
|
6036
|
+
}, _callee3);
|
|
6037
|
+
}));
|
|
6038
|
+
return function (_x5) {
|
|
6039
|
+
return _ref5.apply(this, arguments);
|
|
6040
|
+
};
|
|
6041
|
+
}())["catch"](function () {
|
|
6009
6042
|
return setIsSaving(false);
|
|
6010
6043
|
});
|
|
6011
6044
|
}
|
|
6012
6045
|
case 14:
|
|
6013
6046
|
case "end":
|
|
6014
|
-
return
|
|
6047
|
+
return _context4.stop();
|
|
6015
6048
|
}
|
|
6016
|
-
},
|
|
6049
|
+
}, _callee4);
|
|
6017
6050
|
}));
|
|
6018
6051
|
return function (_x, _x2, _x3, _x4) {
|
|
6019
6052
|
return _ref4.apply(this, arguments);
|
|
6020
6053
|
};
|
|
6021
|
-
}(), [isSaving, onClickSave]);
|
|
6022
|
-
var onChangeForm = function onChangeForm(
|
|
6023
|
-
var data =
|
|
6054
|
+
}(), [isSaving, onClickSave, basket3DExportChecked]);
|
|
6055
|
+
var onChangeForm = function onChangeForm(_ref6) {
|
|
6056
|
+
var data = _ref6.data;
|
|
6024
6057
|
for (var key in data) {
|
|
6025
6058
|
basket[key] = data[key];
|
|
6026
6059
|
}
|
|
@@ -6034,7 +6067,7 @@ function CheckOut(_ref) {
|
|
|
6034
6067
|
};
|
|
6035
6068
|
|
|
6036
6069
|
// for LEAFLET don't show printOptions, if there are any configured.
|
|
6037
|
-
var finalSchema = _objectSpread$
|
|
6070
|
+
var finalSchema = _objectSpread$r(_objectSpread$r({}, uiSchema), {}, {
|
|
6038
6071
|
elements: _toConsumableArray(uiSchema.elements)
|
|
6039
6072
|
});
|
|
6040
6073
|
if (status == 'LEAFLET') {
|
|
@@ -6046,6 +6079,9 @@ function CheckOut(_ref) {
|
|
|
6046
6079
|
}
|
|
6047
6080
|
}
|
|
6048
6081
|
var permissionAnyHqRenderBox = userHasPermission('anyhqrenderbox');
|
|
6082
|
+
var handleCheckBoxChange = function handleCheckBoxChange(event) {
|
|
6083
|
+
setBasket3DExportChecked(event.target.checked);
|
|
6084
|
+
};
|
|
6049
6085
|
return /*#__PURE__*/jsxs("div", {
|
|
6050
6086
|
style: {
|
|
6051
6087
|
display: 'flex',
|
|
@@ -6136,7 +6172,21 @@ function CheckOut(_ref) {
|
|
|
6136
6172
|
}), !!renderService && permissionAnyHqRenderBox && (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && /*#__PURE__*/jsx(HqRenderBox, {
|
|
6137
6173
|
basket: basket,
|
|
6138
6174
|
config: renderService
|
|
6139
|
-
}),
|
|
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", {
|
|
6176
|
+
style: {
|
|
6177
|
+
marginLeft: '50px',
|
|
6178
|
+
width: '700px'
|
|
6179
|
+
},
|
|
6180
|
+
children: [/*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6181
|
+
control: /*#__PURE__*/jsx(Checkbox$1, {
|
|
6182
|
+
onChange: handleCheckBoxChange
|
|
6183
|
+
}),
|
|
6184
|
+
label: t('basket.checkout.order3dexport')
|
|
6185
|
+
}), /*#__PURE__*/jsxs(Typography, {
|
|
6186
|
+
variant: "caption",
|
|
6187
|
+
children: ["(", t('basket.checkout.3dexport'), ")"]
|
|
6188
|
+
})]
|
|
6189
|
+
}), gdpr && !isEmpty(basket === null || basket === void 0 ? void 0 : basket.Client) && /*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6140
6190
|
style: {
|
|
6141
6191
|
marginLeft: '40px'
|
|
6142
6192
|
},
|
|
@@ -6174,12 +6224,12 @@ function isEmpty(data) {
|
|
|
6174
6224
|
});
|
|
6175
6225
|
}
|
|
6176
6226
|
|
|
6177
|
-
function ownKeys$
|
|
6178
|
-
function _objectSpread$
|
|
6227
|
+
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
|
+
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; }
|
|
6179
6229
|
var schema = function schema(hideWWSButton) {
|
|
6180
6230
|
return {
|
|
6181
6231
|
type: 'object',
|
|
6182
|
-
properties: _objectSpread$
|
|
6232
|
+
properties: _objectSpread$q(_objectSpread$q({
|
|
6183
6233
|
Salesperson: {
|
|
6184
6234
|
type: 'string',
|
|
6185
6235
|
title: 'basket.checkout.form.seller'
|
|
@@ -6433,9 +6483,9 @@ function Step3Checkout(_ref) {
|
|
|
6433
6483
|
});
|
|
6434
6484
|
}
|
|
6435
6485
|
|
|
6436
|
-
function ownKeys$
|
|
6437
|
-
function _objectSpread$
|
|
6438
|
-
var LOG$
|
|
6486
|
+
function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6487
|
+
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
|
+
var LOG$4 = getLogger('SellerBasket', 'Basket');
|
|
6439
6489
|
function Basket(_ref) {
|
|
6440
6490
|
var _configurationData$Ch5;
|
|
6441
6491
|
var divaNr = _ref.divaNr,
|
|
@@ -6477,7 +6527,8 @@ function Basket(_ref) {
|
|
|
6477
6527
|
resetBasketState = _useSellerState$actio.resetBasketState;
|
|
6478
6528
|
var statusRef = useRef(basket !== null && basket !== void 0 && basket.StatusKey ? basket === null || basket === void 0 ? void 0 : basket.StatusKey : basket !== null && basket !== void 0 && basket.Status ? basket === null || basket === void 0 ? void 0 : basket.Status : '');
|
|
6479
6529
|
useEffect(function () {
|
|
6480
|
-
|
|
6530
|
+
if (!basket) DivaUtils$1.businessMetrics.setConfiguratorSessionId();
|
|
6531
|
+
LOG$4.startTransaction({
|
|
6481
6532
|
event: 'onOpenModule',
|
|
6482
6533
|
message: 'Open Basket',
|
|
6483
6534
|
eventId: 'ON_OPEN_MODULE_BASKET',
|
|
@@ -6485,12 +6536,11 @@ function Basket(_ref) {
|
|
|
6485
6536
|
divaNr: divaNr
|
|
6486
6537
|
}
|
|
6487
6538
|
});
|
|
6488
|
-
if (!basket) DivaUtils$1.businessMetrics.setConfiguratorSessionId();
|
|
6489
6539
|
}, []);
|
|
6490
6540
|
useEffect(function () {
|
|
6491
6541
|
openBasket(statusRef, divaNr, checkBasket, basket).then(function () {
|
|
6492
6542
|
var _getBasketStatusArr;
|
|
6493
|
-
LOG$
|
|
6543
|
+
LOG$4.successTransaction('ON_OPEN_MODULE_BASKET', {
|
|
6494
6544
|
divaNr: divaNr
|
|
6495
6545
|
});
|
|
6496
6546
|
if (!statusRef.current || !((_getBasketStatusArr = getBasketStatusArr()) !== null && _getBasketStatusArr !== void 0 && _getBasketStatusArr.includes(statusRef.current))) {
|
|
@@ -6526,7 +6576,7 @@ function Basket(_ref) {
|
|
|
6526
6576
|
}
|
|
6527
6577
|
}, [currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.step]);
|
|
6528
6578
|
useEffect(function () {
|
|
6529
|
-
LOG$
|
|
6579
|
+
LOG$4.businessEvent('onBasketStep', 'SellerBasket', "goto BasketStep '".concat(actBasketPage, "'"), {
|
|
6530
6580
|
basketStep: actBasketPage
|
|
6531
6581
|
});
|
|
6532
6582
|
}, [actBasketPage]);
|
|
@@ -6701,7 +6751,7 @@ function Basket(_ref) {
|
|
|
6701
6751
|
});
|
|
6702
6752
|
*/
|
|
6703
6753
|
}
|
|
6704
|
-
LOG$
|
|
6754
|
+
LOG$4.successTransaction('ON_SAVE_BASKET', {
|
|
6705
6755
|
divaNr: currentBasket.DivaNr,
|
|
6706
6756
|
status: currentBasket.Status,
|
|
6707
6757
|
documentVersion: currentBasket.DocumentVersion,
|
|
@@ -6768,7 +6818,7 @@ function Basket(_ref) {
|
|
|
6768
6818
|
};
|
|
6769
6819
|
}();
|
|
6770
6820
|
var errorOnSaving = function errorOnSaving(type) {
|
|
6771
|
-
LOG$
|
|
6821
|
+
LOG$4.errorTransaction('ON_SAVE_BASKET', 'SELLER_0003', 'Error Saving Basket', {
|
|
6772
6822
|
divaNr: currentBasket.DivaNr,
|
|
6773
6823
|
status: currentBasket.Status,
|
|
6774
6824
|
documentVersion: currentBasket.DocumentVersion,
|
|
@@ -6785,7 +6835,7 @@ function Basket(_ref) {
|
|
|
6785
6835
|
var _currentBasket$OrderS2, _currentBasket$OrderS3, _currentBasket$OrderS4;
|
|
6786
6836
|
openComponent({
|
|
6787
6837
|
type: 'SELLER',
|
|
6788
|
-
parameters: _objectSpread$
|
|
6838
|
+
parameters: _objectSpread$p({
|
|
6789
6839
|
module: 'Info',
|
|
6790
6840
|
catalogCodex: currentBasket === null || currentBasket === void 0 || (_currentBasket$OrderS2 = currentBasket.OrderSets[0]) === null || _currentBasket$OrderS2 === void 0 ? void 0 : _currentBasket$OrderS2.CatalogCodex
|
|
6791
6841
|
}, currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS3 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS3 !== void 0 && _currentBasket$OrderS3.AccountGUID ? {
|
|
@@ -6863,719 +6913,200 @@ function Basket(_ref) {
|
|
|
6863
6913
|
});
|
|
6864
6914
|
}
|
|
6865
6915
|
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
useEffect(function () {
|
|
6876
|
-
setOpen(!hide && !!data);
|
|
6877
|
-
}, [hide, data]);
|
|
6878
|
-
return /*#__PURE__*/jsx("div", {
|
|
6879
|
-
className: classes.root,
|
|
6880
|
-
children: /*#__PURE__*/jsxs(Paper, {
|
|
6881
|
-
className: "".concat(classes.paper, " ").concat(open ? '' : 'hide'),
|
|
6882
|
-
elevation: 4,
|
|
6883
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
6884
|
-
className: classes.expander,
|
|
6885
|
-
onClick: function onClick() {
|
|
6886
|
-
return setOpen(!open);
|
|
6887
|
-
},
|
|
6888
|
-
children: [open && /*#__PURE__*/jsx(ArrowBackIosIcon, {}), !open && /*#__PURE__*/jsx(ArrowForwardIosIcon, {})]
|
|
6889
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
6890
|
-
variant: "h5",
|
|
6891
|
-
children: (data === null || data === void 0 ? void 0 : data.name) || ''
|
|
6892
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
6893
|
-
className: classes.scrollWrapper,
|
|
6894
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
6895
|
-
component: "div",
|
|
6896
|
-
children: /*#__PURE__*/jsx("div", {
|
|
6897
|
-
dangerouslySetInnerHTML: {
|
|
6898
|
-
__html: (data === null || data === void 0 ? void 0 : data.description) || ''
|
|
6899
|
-
}
|
|
6900
|
-
})
|
|
6901
|
-
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
6902
|
-
return /*#__PURE__*/jsxs("div", {
|
|
6903
|
-
className: classes.document,
|
|
6904
|
-
children: [/*#__PURE__*/jsx(PictureAsPdfIcon, {}), /*#__PURE__*/jsx(Typography, {
|
|
6905
|
-
children: /*#__PURE__*/jsx(Link, {
|
|
6906
|
-
href: d.url,
|
|
6907
|
-
download: true,
|
|
6908
|
-
target: "_blank",
|
|
6909
|
-
children: d.name
|
|
6910
|
-
})
|
|
6911
|
-
})]
|
|
6912
|
-
}, i);
|
|
6913
|
-
})]
|
|
6914
|
-
})]
|
|
6915
|
-
})
|
|
6916
|
-
});
|
|
6917
|
-
}
|
|
6918
|
-
var useStyles$4 = makeStyles(function (theme) {
|
|
6919
|
-
return {
|
|
6920
|
-
root: {
|
|
6921
|
-
position: 'absolute',
|
|
6922
|
-
height: '100%',
|
|
6923
|
-
width: '500px',
|
|
6924
|
-
overflow: 'hidden'
|
|
6925
|
-
},
|
|
6926
|
-
paper: {
|
|
6927
|
-
display: 'flex',
|
|
6928
|
-
width: '300px',
|
|
6929
|
-
minHeight: '60px',
|
|
6930
|
-
maxHeight: 'calc(100% - 150px - 300px)',
|
|
6931
|
-
flexDirection: 'column',
|
|
6932
|
-
justifyContent: 'center',
|
|
6933
|
-
position: 'absolute',
|
|
6934
|
-
top: 150,
|
|
6935
|
-
left: 0,
|
|
6936
|
-
zIndex: 3,
|
|
6937
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
6938
|
-
transition: 'all 0.4s ease-in-out 0s',
|
|
6939
|
-
borderRadius: '0 4px 4px 0',
|
|
6940
|
-
padding: '1rem',
|
|
6941
|
-
'&.hide': {
|
|
6942
|
-
left: 'calc(-300px + -2rem)'
|
|
6943
|
-
}
|
|
6944
|
-
},
|
|
6945
|
-
scrollWrapper: {
|
|
6946
|
-
overflow: 'auto'
|
|
6947
|
-
},
|
|
6948
|
-
expander: {
|
|
6949
|
-
display: 'flex',
|
|
6950
|
-
alignItems: 'center',
|
|
6951
|
-
justifyContent: 'center',
|
|
6952
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
6953
|
-
width: 30,
|
|
6954
|
-
height: 40,
|
|
6955
|
-
right: '-30px',
|
|
6956
|
-
top: 10,
|
|
6957
|
-
zIndex: 10,
|
|
6958
|
-
position: 'absolute',
|
|
6959
|
-
boxShadow: '2px 0px 5px 0px rgba(0,0,0,0.2)',
|
|
6960
|
-
borderRadius: '0 4px 4px 0',
|
|
6961
|
-
'&:hover': {
|
|
6962
|
-
cursor: 'pointer'
|
|
6963
|
-
}
|
|
6964
|
-
},
|
|
6965
|
-
document: {
|
|
6966
|
-
display: 'flex',
|
|
6967
|
-
'& svg': {
|
|
6968
|
-
marginRight: '10px'
|
|
6969
|
-
}
|
|
6970
|
-
}
|
|
6971
|
-
};
|
|
6972
|
-
});
|
|
6916
|
+
var wrapper$6 = "wrapper-fSL18";
|
|
6917
|
+
var title$2 = "title-iTDPA";
|
|
6918
|
+
var descriptionContainer$1 = "description-container-k1vLT";
|
|
6919
|
+
var modelTitle = "model-title-Sgm-0";
|
|
6920
|
+
var description = "description-GyPZq";
|
|
6921
|
+
var pdf = "pdf-oNnao";
|
|
6922
|
+
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";
|
|
6924
|
+
styleInject(css_248z$9);
|
|
6973
6925
|
|
|
6974
|
-
|
|
6975
|
-
|
|
6926
|
+
var _excluded$6 = ["data", "text"];
|
|
6927
|
+
function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6928
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6929
|
+
function Description$1 (_ref) {
|
|
6976
6930
|
var data = _ref.data,
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
hide = _ref.hide,
|
|
6980
|
-
loading = _ref.loading;
|
|
6931
|
+
text = _ref.text,
|
|
6932
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
6981
6933
|
var _useTranslation = useTranslation(),
|
|
6982
6934
|
t = _useTranslation.t;
|
|
6983
|
-
|
|
6984
|
-
var
|
|
6985
|
-
return (data === null || data === void 0 ? void 0 : data.images.map(function () {
|
|
6986
|
-
return /*#__PURE__*/React.createRef();
|
|
6987
|
-
})) || [];
|
|
6988
|
-
}, [data]);
|
|
6989
|
-
var classes = useStyles$3();
|
|
6990
|
-
var _useState = useState(false),
|
|
6935
|
+
//hiden is only for smaller devices relevant
|
|
6936
|
+
var _useState = useState(true),
|
|
6991
6937
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
}
|
|
7002
|
-
}, [selected, open]);
|
|
7003
|
-
return /*#__PURE__*/jsx("div", {
|
|
7004
|
-
className: classes.root,
|
|
7005
|
-
children: /*#__PURE__*/jsxs(Paper, {
|
|
7006
|
-
className: "".concat(classes.paper, " ").concat(open ? '' : 'hide'),
|
|
7007
|
-
elevation: 4,
|
|
7008
|
-
onWheel: function onWheel(e) {
|
|
7009
|
-
return listRef.current.scrollLeft = listRef.current.scrollLeft + e.deltaY * 10;
|
|
7010
|
-
},
|
|
7011
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
7012
|
-
className: classes.expander,
|
|
6938
|
+
isHidden = _useState2[0],
|
|
6939
|
+
setIsHidden = _useState2[1];
|
|
6940
|
+
return /*#__PURE__*/jsxs("div", _objectSpread$o(_objectSpread$o({}, props), {}, {
|
|
6941
|
+
className: classnames(wrapper$6, isHidden ? hidden : undefined, props.className),
|
|
6942
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6943
|
+
className: title$2,
|
|
6944
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
6945
|
+
children: t(text)
|
|
6946
|
+
}), /*#__PURE__*/jsx(IconButton$1, {
|
|
7013
6947
|
onClick: function onClick() {
|
|
7014
|
-
return
|
|
7015
|
-
},
|
|
7016
|
-
children: [!open && /*#__PURE__*/jsx(ExpandLess, {}), open && /*#__PURE__*/jsx(ExpandMore, {}), /*#__PURE__*/jsx(Typography$1, {
|
|
7017
|
-
variant: "button",
|
|
7018
|
-
style: {
|
|
7019
|
-
padding: '0 15px 0 5px'
|
|
7020
|
-
},
|
|
7021
|
-
children: t('info.buttons.images')
|
|
7022
|
-
})]
|
|
7023
|
-
}), /*#__PURE__*/jsxs(GridList, {
|
|
7024
|
-
ref: listRef,
|
|
7025
|
-
cols: (data === null || data === void 0 || (_data$images = data.images) === null || _data$images === void 0 ? void 0 : _data$images.length) == 1 ? 1 : 2,
|
|
7026
|
-
className: classes.gridList,
|
|
7027
|
-
style: {
|
|
7028
|
-
margin: 0
|
|
6948
|
+
return setIsHidden(!isHidden);
|
|
7029
6949
|
},
|
|
7030
|
-
children:
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
className: classes.gridTile,
|
|
7046
|
-
children: /*#__PURE__*/jsx("div", {
|
|
7047
|
-
style: {
|
|
7048
|
-
height: 120,
|
|
7049
|
-
width: 160
|
|
7050
|
-
}
|
|
6950
|
+
children: /*#__PURE__*/jsx(InfoRounded, {})
|
|
6951
|
+
})]
|
|
6952
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6953
|
+
className: descriptionContainer$1,
|
|
6954
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
6955
|
+
className: modelTitle,
|
|
6956
|
+
children: data.name
|
|
6957
|
+
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
6958
|
+
return /*#__PURE__*/jsx("div", {
|
|
6959
|
+
className: pdf,
|
|
6960
|
+
children: /*#__PURE__*/jsx(Link, {
|
|
6961
|
+
href: d.url,
|
|
6962
|
+
download: true,
|
|
6963
|
+
target: "_blank",
|
|
6964
|
+
children: d.name
|
|
7051
6965
|
})
|
|
7052
|
-
}
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
className: classes.gridTile,
|
|
7059
|
-
children: /*#__PURE__*/jsx(Card, {
|
|
7060
|
-
className: "".concat(classes.card, " ").concat(selected == i ? 'selected' : ''),
|
|
7061
|
-
children: /*#__PURE__*/jsx(CardActionArea, {
|
|
7062
|
-
className: classes.cardActionArea,
|
|
7063
|
-
onClick: function onClick() {
|
|
7064
|
-
return setSelected(i);
|
|
7065
|
-
},
|
|
7066
|
-
children: /*#__PURE__*/jsx(CardMedia, {
|
|
7067
|
-
className: classes.cardMedia,
|
|
7068
|
-
image: getImageOrFallbackUrl(img.thumbUrl)
|
|
7069
|
-
})
|
|
7070
|
-
})
|
|
7071
|
-
})
|
|
7072
|
-
}, i)
|
|
7073
|
-
);
|
|
7074
|
-
}))]
|
|
6966
|
+
}, i);
|
|
6967
|
+
}), data.description && /*#__PURE__*/jsx("div", {
|
|
6968
|
+
className: description,
|
|
6969
|
+
dangerouslySetInnerHTML: {
|
|
6970
|
+
__html: data.description
|
|
6971
|
+
}
|
|
7075
6972
|
})]
|
|
6973
|
+
})]
|
|
6974
|
+
}));
|
|
6975
|
+
}
|
|
6976
|
+
|
|
6977
|
+
var container = "container-Sr3pC";
|
|
6978
|
+
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";
|
|
6980
|
+
styleInject(css_248z$8);
|
|
6981
|
+
|
|
6982
|
+
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; }
|
|
6983
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6984
|
+
function ArticleSvg (props) {
|
|
6985
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
6986
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6987
|
+
viewBox: "0 0 24 24",
|
|
6988
|
+
children: /*#__PURE__*/jsx("path", {
|
|
6989
|
+
fill: "currentColor",
|
|
6990
|
+
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
|
|
7076
6991
|
})
|
|
7077
|
-
});
|
|
6992
|
+
}));
|
|
7078
6993
|
}
|
|
7079
|
-
var useStyles$3 = makeStyles(function (theme) {
|
|
7080
|
-
return {
|
|
7081
|
-
root: {
|
|
7082
|
-
position: 'absolute',
|
|
7083
|
-
bottom: 0,
|
|
7084
|
-
height: '300px',
|
|
7085
|
-
width: '100%',
|
|
7086
|
-
overflow: 'hidden'
|
|
7087
|
-
},
|
|
7088
|
-
paper: {
|
|
7089
|
-
display: 'flex',
|
|
7090
|
-
width: '100%',
|
|
7091
|
-
justifyContent: 'center',
|
|
7092
|
-
position: 'absolute',
|
|
7093
|
-
bottom: 0,
|
|
7094
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7095
|
-
transition: 'all 0.4s ease-in-out 0s',
|
|
7096
|
-
'&.hide': {
|
|
7097
|
-
bottom: '-199px'
|
|
7098
|
-
}
|
|
7099
|
-
},
|
|
7100
|
-
expander: {
|
|
7101
|
-
display: 'flex',
|
|
7102
|
-
alignItems: 'center',
|
|
7103
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7104
|
-
height: 40,
|
|
7105
|
-
top: '-40px',
|
|
7106
|
-
right: 24,
|
|
7107
|
-
zIndex: 10,
|
|
7108
|
-
position: 'absolute',
|
|
7109
|
-
boxShadow: '2px -2px 5px -1px rgba(0,0,0,0.2),0px -2px 5px 0px rgba(0,0,0,0.2)',
|
|
7110
|
-
borderRadius: '4px 4px 0 0',
|
|
7111
|
-
'&:hover': {
|
|
7112
|
-
cursor: 'pointer'
|
|
7113
|
-
}
|
|
7114
|
-
},
|
|
7115
|
-
gridList: {
|
|
7116
|
-
flexWrap: 'nowrap',
|
|
7117
|
-
// Promote the list into his own layer on Chrome. This cost memory but helps keeping high FPS.
|
|
7118
|
-
transform: 'translateZ(0)'
|
|
7119
|
-
},
|
|
7120
|
-
gridTile: {
|
|
7121
|
-
flexShrink: 'initial',
|
|
7122
|
-
height: '100%'
|
|
7123
|
-
},
|
|
7124
|
-
card: {
|
|
7125
|
-
height: 120,
|
|
7126
|
-
width: 160,
|
|
7127
|
-
margin: '15px 5px',
|
|
7128
|
-
display: 'flex',
|
|
7129
|
-
alignItems: 'stretch',
|
|
7130
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7131
|
-
'&.selected': {
|
|
7132
|
-
border: '1px solid #4B4B4B'
|
|
7133
|
-
}
|
|
7134
|
-
},
|
|
7135
|
-
cardActionArea: {
|
|
7136
|
-
display: 'flex',
|
|
7137
|
-
flexDirection: 'column',
|
|
7138
|
-
justifyContent: 'start'
|
|
7139
|
-
},
|
|
7140
|
-
cardMedia: {
|
|
7141
|
-
height: '100%',
|
|
7142
|
-
width: '100%',
|
|
7143
|
-
backgroundSize: 'auto 100%'
|
|
7144
|
-
}
|
|
7145
|
-
};
|
|
7146
|
-
});
|
|
7147
6994
|
|
|
7148
|
-
function
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
children:
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
index: selected,
|
|
7161
|
-
onChange: function onChange(next) {
|
|
7162
|
-
if (next !== selected) {
|
|
7163
|
-
setSelected(next);
|
|
7164
|
-
}
|
|
7165
|
-
},
|
|
7166
|
-
children: data === null || data === void 0 ? void 0 : data.images.map(function (img, i) {
|
|
7167
|
-
return /*#__PURE__*/jsx("div", {
|
|
7168
|
-
style: {
|
|
7169
|
-
backgroundImage: "url(".concat(getImageOrFallbackUrl(img.url), ")")
|
|
7170
|
-
},
|
|
7171
|
-
className: classes.image,
|
|
7172
|
-
onWheel: function onWheel(e) {
|
|
7173
|
-
return setSelected(getNext(e.deltaY, selected, data.images.length));
|
|
7174
|
-
},
|
|
7175
|
-
onClick: onClick
|
|
7176
|
-
}, i);
|
|
7177
|
-
})
|
|
7178
|
-
}), /*#__PURE__*/jsx("div", {
|
|
7179
|
-
style: {
|
|
7180
|
-
height: '100px'
|
|
7181
|
-
}
|
|
7182
|
-
})]
|
|
7183
|
-
});
|
|
6995
|
+
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6996
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6997
|
+
function EmptyPlanningSvg (props) {
|
|
6998
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
6999
|
+
viewBox: "0 0 24 24",
|
|
7000
|
+
fill: "none",
|
|
7001
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7002
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7003
|
+
d: "M4 16L3.57574 15.5757C3.46321 15.6883 3.4 15.8409 3.4 16H4ZM17 3L17.4243 2.57574C17.1899 2.34142 16.8101 2.34142 16.5757 2.57574L17 3ZM21 7L21.4243 7.42426C21.6586 7.18995 21.6586 6.81005 21.4243 6.57574L21 7ZM8 20V20.6C8.15913 20.6 8.31174 20.5368 8.42426 20.4243L8 20ZM4 20H3.4C3.4 20.3314 3.66863 20.6 4 20.6V20ZM12 19.4C11.6686 19.4 11.4 19.6686 11.4 20C11.4 20.3314 11.6686 20.6 12 20.6V19.4ZM20.5 20.6C20.8314 20.6 21.1 20.3314 21.1 20C21.1 19.6686 20.8314 19.4 20.5 19.4V20.6ZM4.42426 16.4243L17.4243 3.42426L16.5757 2.57574L3.57574 15.5757L4.42426 16.4243ZM16.5757 3.42426L20.5757 7.42426L21.4243 6.57574L17.4243 2.57574L16.5757 3.42426ZM20.5757 6.57574L7.57574 19.5757L8.42426 20.4243L21.4243 7.42426L20.5757 6.57574ZM8 19.4H4V20.6H8V19.4ZM4.6 20V16H3.4V20H4.6ZM13.5757 6.42426L17.5757 10.4243L18.4243 9.57574L14.4243 5.57574L13.5757 6.42426ZM12 20.6H20.5V19.4H12V20.6Z",
|
|
7004
|
+
fill: "currentColor"
|
|
7005
|
+
})
|
|
7006
|
+
}));
|
|
7184
7007
|
}
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7008
|
+
|
|
7009
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7010
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7011
|
+
function VarinatPlanningSvg (props) {
|
|
7012
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
7013
|
+
viewBox: "0 0 24 24",
|
|
7014
|
+
fill: "none",
|
|
7015
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7016
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7017
|
+
d: "M4.3314 12.0474L12 20L19.6686 12.0474C20.5211 11.1633 21 9.96429 21 8.71405C21 6.11055 18.9648 4 16.4543 4C15.2487 4 14.0925 4.49666 13.24 5.38071L12 6.66667L10.76 5.38071C9.90749 4.49666 8.75128 4 7.54569 4C5.03517 4 3 6.11055 3 8.71405C3 9.96429 3.47892 11.1633 4.3314 12.0474Z",
|
|
7018
|
+
stroke: "currentColor",
|
|
7019
|
+
strokeWidth: "1.5",
|
|
7020
|
+
strokeLinecap: "round",
|
|
7021
|
+
strokeLinejoin: "round"
|
|
7022
|
+
})
|
|
7023
|
+
}));
|
|
7188
7024
|
}
|
|
7189
|
-
var useStyles$2 = makeStyles(function (theme) {
|
|
7190
|
-
return {
|
|
7191
|
-
carousel: {
|
|
7192
|
-
flex: 1,
|
|
7193
|
-
display: 'flex',
|
|
7194
|
-
flexDirection: 'column',
|
|
7195
|
-
'& div.CarouselItem': {
|
|
7196
|
-
flex: 1,
|
|
7197
|
-
display: 'flex',
|
|
7198
|
-
'& div': {
|
|
7199
|
-
height: '100%',
|
|
7200
|
-
width: '100%'
|
|
7201
|
-
}
|
|
7202
|
-
}
|
|
7203
|
-
},
|
|
7204
|
-
image: {
|
|
7205
|
-
backgroundRepeat: 'no-repeat',
|
|
7206
|
-
backgroundPosition: 'center',
|
|
7207
|
-
backgroundSize: 'auto 100%',
|
|
7208
|
-
marginTop: '10px'
|
|
7209
|
-
}
|
|
7210
|
-
};
|
|
7211
|
-
});
|
|
7212
7025
|
|
|
7213
|
-
function
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7026
|
+
function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7027
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7028
|
+
function NavBackSvg (props) {
|
|
7029
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
7030
|
+
viewBox: "0 0 10 18",
|
|
7031
|
+
fill: "none",
|
|
7032
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7033
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7034
|
+
d: "M9 1L1 9L9 17",
|
|
7035
|
+
stroke: "currentColor",
|
|
7036
|
+
strokeWidth: "1.5",
|
|
7037
|
+
strokeLinecap: "round",
|
|
7038
|
+
strokeLinejoin: "round"
|
|
7039
|
+
})
|
|
7040
|
+
}));
|
|
7041
|
+
}
|
|
7042
|
+
|
|
7043
|
+
function NavBar (buttons) {
|
|
7221
7044
|
var _useTranslation = useTranslation(),
|
|
7222
7045
|
t = _useTranslation.t;
|
|
7223
|
-
var
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
className: classes.button,
|
|
7231
|
-
disabled: !hasArticles,
|
|
7046
|
+
var varinatArticles = !buttons.planner ? 'contained' : 'outlined';
|
|
7047
|
+
var varinatVarinats = !buttons.articles && !buttons.planner ? 'contained' : 'outlined';
|
|
7048
|
+
var variantPlanner = 'contained';
|
|
7049
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7050
|
+
className: container,
|
|
7051
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
7052
|
+
variant: "outlined",
|
|
7232
7053
|
color: "primary",
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7054
|
+
startIcon: /*#__PURE__*/jsx(NavBackSvg, {
|
|
7055
|
+
className: icon$1
|
|
7056
|
+
}),
|
|
7057
|
+
onClick: function onClick() {
|
|
7058
|
+
return buttons.navigateBack();
|
|
7059
|
+
}
|
|
7237
7060
|
}), /*#__PURE__*/jsx(Button, {
|
|
7238
|
-
|
|
7239
|
-
|
|
7061
|
+
id: "diva-seller-info-openarticlesbtn",
|
|
7062
|
+
variant: varinatArticles,
|
|
7240
7063
|
color: "primary",
|
|
7241
|
-
|
|
7064
|
+
startIcon: /*#__PURE__*/jsx(ArticleSvg, {
|
|
7065
|
+
className: icon$1
|
|
7066
|
+
}),
|
|
7242
7067
|
onClick: function onClick() {
|
|
7243
|
-
return
|
|
7068
|
+
return buttons.articles();
|
|
7244
7069
|
},
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
disabled: !hasPlanner,
|
|
7070
|
+
children: t('info.buttons.articles')
|
|
7071
|
+
}), buttons.variantsPlanner && /*#__PURE__*/jsx(Button, {
|
|
7072
|
+
id: "diva-seller-info-openfavplannerbtn",
|
|
7073
|
+
variant: varinatVarinats,
|
|
7250
7074
|
color: "primary",
|
|
7251
|
-
|
|
7075
|
+
startIcon: /*#__PURE__*/jsx(VarinatPlanningSvg, {
|
|
7076
|
+
className: icon$1
|
|
7077
|
+
}),
|
|
7252
7078
|
onClick: function onClick() {
|
|
7253
|
-
return
|
|
7079
|
+
return buttons.variantsPlanner();
|
|
7254
7080
|
},
|
|
7255
7081
|
children: t('info.buttons.varinats')
|
|
7256
|
-
}),
|
|
7257
|
-
|
|
7258
|
-
|
|
7082
|
+
}), buttons.planner && /*#__PURE__*/jsx(Button, {
|
|
7083
|
+
id: "diva-seller-info-openplannerbtn",
|
|
7084
|
+
variant: variantPlanner,
|
|
7259
7085
|
color: "primary",
|
|
7260
|
-
|
|
7086
|
+
startIcon: /*#__PURE__*/jsx(EmptyPlanningSvg, {
|
|
7087
|
+
className: icon$1
|
|
7088
|
+
}),
|
|
7261
7089
|
onClick: function onClick() {
|
|
7262
|
-
return
|
|
7090
|
+
return buttons.planner();
|
|
7263
7091
|
},
|
|
7264
|
-
children: t('info.buttons.
|
|
7092
|
+
children: t('info.buttons.configurator')
|
|
7265
7093
|
})]
|
|
7266
7094
|
});
|
|
7267
7095
|
}
|
|
7268
|
-
var useStyles$1 = makeStyles(function (theme) {
|
|
7269
|
-
return {
|
|
7270
|
-
toolbar: {
|
|
7271
|
-
boxShadow: '0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)',
|
|
7272
|
-
zIndex: 10,
|
|
7273
|
-
padding: '12px 0'
|
|
7274
|
-
},
|
|
7275
|
-
spacer: {
|
|
7276
|
-
flex: 1
|
|
7277
|
-
},
|
|
7278
|
-
button: {
|
|
7279
|
-
margin: '0 10px'
|
|
7280
|
-
}
|
|
7281
|
-
};
|
|
7282
|
-
});
|
|
7283
|
-
|
|
7284
|
-
var LOG$4 = getLogger('Seller', 'Info');
|
|
7285
|
-
function Info$1(_ref) {
|
|
7286
|
-
var accountId = _ref.accountId,
|
|
7287
|
-
catalogCodex = _ref.catalogCodex;
|
|
7288
|
-
var _useTranslation = useTranslation(),
|
|
7289
|
-
t = _useTranslation.t,
|
|
7290
|
-
i18n = _useTranslation.i18n;
|
|
7291
|
-
var _useState = useState(),
|
|
7292
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7293
|
-
data = _useState2[0],
|
|
7294
|
-
setData = _useState2[1];
|
|
7295
|
-
var _useState3 = useState(true),
|
|
7296
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
7297
|
-
loading = _useState4[0],
|
|
7298
|
-
setLoading = _useState4[1];
|
|
7299
|
-
var _useSellerState = useSellerState(),
|
|
7300
|
-
_useSellerState$actio = _useSellerState.actions,
|
|
7301
|
-
loadCatalogInfo = _useSellerState$actio.loadCatalogInfo,
|
|
7302
|
-
openPlanner = _useSellerState$actio.openPlanner,
|
|
7303
|
-
openComponent = _useSellerState$actio.openComponent,
|
|
7304
|
-
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
7305
|
-
_useSellerState$state = _useSellerState.state,
|
|
7306
|
-
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
7307
|
-
catalogs = _useSellerState$state.catalogs;
|
|
7308
|
-
_useSellerState$state.currentUser;
|
|
7309
|
-
var currentBasketState = _useSellerState$state.currentBasketState,
|
|
7310
|
-
configurationData = _useSellerState$state.configurationData,
|
|
7311
|
-
returnTo = _useSellerState$state.returnTo,
|
|
7312
|
-
sessionGuid = _useSellerState$state.sessionGuid;
|
|
7313
|
-
var _useState5 = useState(0),
|
|
7314
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7315
|
-
selected = _useState6[0],
|
|
7316
|
-
setSelected = _useState6[1];
|
|
7317
|
-
var _useState7 = useState(false),
|
|
7318
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
7319
|
-
hideAll = _useState8[0],
|
|
7320
|
-
setHideAll = _useState8[1];
|
|
7321
|
-
var _useDivaCore = useDivaCore(),
|
|
7322
|
-
_useDivaCore$actions = _useDivaCore.actions,
|
|
7323
|
-
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
7324
|
-
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
7325
|
-
organization = _useDivaCore.state.organization;
|
|
7326
|
-
useEffect(function () {
|
|
7327
|
-
LOG$4.businessEvent('onOpenModule', 'SellerCatalogInfo', "Open Catalog Info", {
|
|
7328
|
-
cat: catalogCodex,
|
|
7329
|
-
accountId: accountId
|
|
7330
|
-
});
|
|
7331
|
-
}, []);
|
|
7332
|
-
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7333
|
-
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7334
|
-
openPlanner({
|
|
7335
|
-
catalogCodex: catalogCodex,
|
|
7336
|
-
accountId: accountId,
|
|
7337
|
-
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7338
|
-
forceReload: '1',
|
|
7339
|
-
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7340
|
-
returnTo: returnToPlanner !== null && returnToPlanner !== void 0 && returnToPlanner.endsWith('PRODUCTCREATOR') ? returnToPlanner : ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') ? 'OPEN_SELLER_PRODUCTCREATOR' : returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET'
|
|
7341
|
-
});
|
|
7342
|
-
} else {
|
|
7343
|
-
LOG$4.error(new DivaError('Missing account login ID', {
|
|
7344
|
-
code: 'SELLER_0001'
|
|
7345
|
-
}));
|
|
7346
|
-
}
|
|
7347
|
-
}, [openPlanner, catalogs, currentAccountLoginId]);
|
|
7348
|
-
var _onOpenArticles = useCallback(function () {
|
|
7349
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7350
|
-
openComponent({
|
|
7351
|
-
type: 'SELLER',
|
|
7352
|
-
parameters: {
|
|
7353
|
-
module: 'Articles',
|
|
7354
|
-
accountId: accountId,
|
|
7355
|
-
catalogCodex: catalogCodex
|
|
7356
|
-
}
|
|
7357
|
-
});
|
|
7358
|
-
} else {
|
|
7359
|
-
LOG$4.error(new DivaError('Missing account ID or catalog', {
|
|
7360
|
-
code: 'SELLER_0001'
|
|
7361
|
-
}));
|
|
7362
|
-
}
|
|
7363
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7364
|
-
useEffect(function () {
|
|
7365
|
-
var load = /*#__PURE__*/function () {
|
|
7366
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
7367
|
-
var accountSessionId, _catalogInfoData$, catalogInfoData;
|
|
7368
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7369
|
-
while (1) switch (_context.prev = _context.next) {
|
|
7370
|
-
case 0:
|
|
7371
|
-
setLoading(true);
|
|
7372
|
-
toggleLoading('seller-model-info', false, true);
|
|
7373
|
-
accountSessionId = undefined;
|
|
7374
|
-
if (!(organization.type === 'RETAILER')) {
|
|
7375
|
-
_context.next = 12;
|
|
7376
|
-
break;
|
|
7377
|
-
}
|
|
7378
|
-
if (accountId) {
|
|
7379
|
-
_context.next = 9;
|
|
7380
|
-
break;
|
|
7381
|
-
}
|
|
7382
|
-
LOG$4.error(new DivaError('Missing account ID', {
|
|
7383
|
-
code: 'SELLER_0001'
|
|
7384
|
-
}));
|
|
7385
|
-
setLoading(false);
|
|
7386
|
-
toggleLoading('seller-model-info', false, false);
|
|
7387
|
-
return _context.abrupt("return");
|
|
7388
|
-
case 9:
|
|
7389
|
-
_context.next = 11;
|
|
7390
|
-
return checkAccountLogin({
|
|
7391
|
-
accountId: accountId
|
|
7392
|
-
});
|
|
7393
|
-
case 11:
|
|
7394
|
-
accountSessionId = _context.sent;
|
|
7395
|
-
case 12:
|
|
7396
|
-
if (!catalogCodex) {
|
|
7397
|
-
_context.next = 18;
|
|
7398
|
-
break;
|
|
7399
|
-
}
|
|
7400
|
-
_context.next = 15;
|
|
7401
|
-
return loadCatalogInfo({
|
|
7402
|
-
catalogCodex: catalogCodex,
|
|
7403
|
-
accountSessionId: accountSessionId,
|
|
7404
|
-
accountId: accountId,
|
|
7405
|
-
language: i18n.language || 'en'
|
|
7406
|
-
});
|
|
7407
|
-
case 15:
|
|
7408
|
-
catalogInfoData = _context.sent;
|
|
7409
|
-
if ((catalogInfoData === null || catalogInfoData === void 0 || (_catalogInfoData$ = catalogInfoData[0]) === null || _catalogInfoData$ === void 0 || (_catalogInfoData$ = _catalogInfoData$.images) === null || _catalogInfoData$ === void 0 ? void 0 : _catalogInfoData$.length) == 0 && !userHasPermission('productcreator')) {
|
|
7410
|
-
catalogInfoData !== null && catalogInfoData !== void 0 && catalogInfoData[0].hasPlanner ? onOpenPlanner(accountSessionId) : _onOpenArticles();
|
|
7411
|
-
}
|
|
7412
|
-
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
7413
|
-
case 18:
|
|
7414
|
-
setLoading(false);
|
|
7415
|
-
toggleLoading('seller-model-info', false, false);
|
|
7416
|
-
case 20:
|
|
7417
|
-
case "end":
|
|
7418
|
-
return _context.stop();
|
|
7419
|
-
}
|
|
7420
|
-
}, _callee);
|
|
7421
|
-
}));
|
|
7422
|
-
return function load() {
|
|
7423
|
-
return _ref2.apply(this, arguments);
|
|
7424
|
-
};
|
|
7425
|
-
}();
|
|
7426
|
-
load();
|
|
7427
|
-
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
7428
|
-
return /*#__PURE__*/jsx(Fragment, {
|
|
7429
|
-
children: !loading && /*#__PURE__*/jsxs(Fragment, {
|
|
7430
|
-
children: [/*#__PURE__*/jsx(NavBar$1, {
|
|
7431
|
-
title: /*#__PURE__*/jsx(Title, {
|
|
7432
|
-
text: t('info.title')
|
|
7433
|
-
}),
|
|
7434
|
-
onOpenPlanner: onOpenPlanner,
|
|
7435
|
-
onOpenArticles: function onOpenArticles() {
|
|
7436
|
-
return _onOpenArticles();
|
|
7437
|
-
},
|
|
7438
|
-
hasPlanner: (!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && (data === null || data === void 0 ? void 0 : data.hasPlanner),
|
|
7439
|
-
hasArticles: (!!currentAccountLoginId && !!accountId || organization.parentType === 'SUPPLIER') && !!catalogCodex,
|
|
7440
|
-
showVariants: userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator) || returnTo === 'toAssortmentManager' || returnTo === 'toProductsGallery',
|
|
7441
|
-
showSetPlanner: userHasPermission('productcreator')
|
|
7442
|
-
}), /*#__PURE__*/jsx(MainView, {
|
|
7443
|
-
data: data,
|
|
7444
|
-
selected: selected,
|
|
7445
|
-
setSelected: setSelected,
|
|
7446
|
-
onClick: function onClick() {
|
|
7447
|
-
setHideAll(!hideAll);
|
|
7448
|
-
}
|
|
7449
|
-
}), /*#__PURE__*/jsx(Description$2, {
|
|
7450
|
-
data: data,
|
|
7451
|
-
hide: hideAll
|
|
7452
|
-
}), /*#__PURE__*/jsx(ImagesBar, {
|
|
7453
|
-
data: data,
|
|
7454
|
-
selected: selected,
|
|
7455
|
-
setSelected: setSelected,
|
|
7456
|
-
hide: hideAll,
|
|
7457
|
-
loading: loading
|
|
7458
|
-
})]
|
|
7459
|
-
})
|
|
7460
|
-
});
|
|
7461
|
-
}
|
|
7462
|
-
|
|
7463
|
-
var wrapper$7 = "wrapper-fSL18";
|
|
7464
|
-
var title$2 = "title-iTDPA";
|
|
7465
|
-
var subTitle = "subTitle-4-0PW";
|
|
7466
|
-
var descriptionContainer$1 = "description-container-k1vLT";
|
|
7467
|
-
var modelTitle = "model-title-Sgm-0";
|
|
7468
|
-
var description = "description-GyPZq";
|
|
7469
|
-
var pdf = "pdf-oNnao";
|
|
7470
|
-
var css_248z$9 = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n max-height: calc(100% - 42px);\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\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: #f8f8f8;\n padding: 18px;\n gap: 12px;\n height: calc(100% - 164px);\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";
|
|
7471
|
-
styleInject(css_248z$9);
|
|
7472
|
-
|
|
7473
|
-
var _excluded$7 = ["data", "text"];
|
|
7474
|
-
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; }
|
|
7475
|
-
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7476
|
-
getLogger('SellerCatalogInfo', 'Description');
|
|
7477
|
-
function Description$1 (_ref) {
|
|
7478
|
-
var data = _ref.data,
|
|
7479
|
-
text = _ref.text,
|
|
7480
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
7481
|
-
var _useTranslation = useTranslation(),
|
|
7482
|
-
t = _useTranslation.t;
|
|
7483
|
-
return /*#__PURE__*/jsxs("div", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
7484
|
-
className: classNames(wrapper$7, props.className),
|
|
7485
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
7486
|
-
className: title$2,
|
|
7487
|
-
children: t(text)
|
|
7488
|
-
}), /*#__PURE__*/jsx("div", {
|
|
7489
|
-
className: subTitle,
|
|
7490
|
-
children: t('pdp.info')
|
|
7491
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
7492
|
-
className: descriptionContainer$1,
|
|
7493
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
7494
|
-
className: modelTitle,
|
|
7495
|
-
children: data.name
|
|
7496
|
-
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
7497
|
-
return /*#__PURE__*/jsx("div", {
|
|
7498
|
-
className: pdf,
|
|
7499
|
-
children: /*#__PURE__*/jsx(Link, {
|
|
7500
|
-
href: d.url,
|
|
7501
|
-
download: true,
|
|
7502
|
-
target: "_blank",
|
|
7503
|
-
children: d.name
|
|
7504
|
-
})
|
|
7505
|
-
}, i);
|
|
7506
|
-
}), data.description && /*#__PURE__*/jsx("div", {
|
|
7507
|
-
className: description,
|
|
7508
|
-
dangerouslySetInnerHTML: {
|
|
7509
|
-
__html: data.description
|
|
7510
|
-
}
|
|
7511
|
-
})]
|
|
7512
|
-
})]
|
|
7513
|
-
}));
|
|
7514
|
-
}
|
|
7515
|
-
|
|
7516
|
-
var wrapper$6 = "wrapper-oUrTP";
|
|
7517
|
-
var container = "container-Sr3pC";
|
|
7518
|
-
var button = "button-NXyWV";
|
|
7519
|
-
var navBack = "nav-back-AzU6X";
|
|
7520
|
-
var icon$1 = "icon-0h-39";
|
|
7521
|
-
var text = "text-55Zpw";
|
|
7522
|
-
var css_248z$8 = ".wrapper-oUrTP {\n right: 10px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n z-index: 500;\n background-color: #fff;\n position: absolute;\n bottom: 0;\n width: 83%;\n}\n\n.container-Sr3pC {\n display: flex;\n gap: 12px;\n width: 50%;\n justify-content: flex-end;\n padding: 8px;\n}\n\n.button-NXyWV {\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--diva-theme-palette-primary-main);\n border-radius: 2px;\n border-color: var(--diva-theme-palette-primary-main);\n border-style: solid;\n border-width: 1.5px;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.nav-back-AzU6X {\n width: 50px;\n height: 50px;\n border-radius: 2px;\n border-color: var(--diva-theme-palette-primary-main);\n border-style: solid;\n border-width: 1.5px;\n background-color: #fff;\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%2218%22 viewBox%3D%220 0 10 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M9 1L1 9L9 17%22 stroke%3D%22%23713434%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n background-size: 27%;\n background-repeat: no-repeat;\n background-position: center center;\n cursor: pointer;\n}\n\n.icon-0h-39 {\n width: 24px;\n height: 24px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n}\n\n.text-55Zpw {\n text-align: center;\n /* flex-basis: 100%; */\n color: white;\n}\n";
|
|
7523
|
-
styleInject(css_248z$8);
|
|
7524
|
-
|
|
7525
|
-
var _excluded$6 = ["navigateBack", "buttons"];
|
|
7526
|
-
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7527
|
-
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7528
|
-
function NavBar (_ref) {
|
|
7529
|
-
var navigateBack = _ref.navigateBack,
|
|
7530
|
-
buttons = _ref.buttons,
|
|
7531
|
-
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
7532
|
-
var _useTranslation = useTranslation(),
|
|
7533
|
-
t = _useTranslation.t;
|
|
7534
|
-
return /*#__PURE__*/jsx("div", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
7535
|
-
className: classNames(wrapper$6, props.className),
|
|
7536
|
-
id: "diva-seller-info-navbar",
|
|
7537
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
7538
|
-
className: container,
|
|
7539
|
-
children: [navigateBack && /*#__PURE__*/jsx("div", {
|
|
7540
|
-
className: classNames(navBack),
|
|
7541
|
-
onClick: navigateBack
|
|
7542
|
-
}), buttons.map(function (button$1) {
|
|
7543
|
-
return /*#__PURE__*/jsxs("div", {
|
|
7544
|
-
className: classNames(button),
|
|
7545
|
-
onClick: button$1.onClick,
|
|
7546
|
-
id: button$1.key,
|
|
7547
|
-
children: [button$1.iconClass && /*#__PURE__*/jsx("div", {
|
|
7548
|
-
className: classNames(icon$1, button$1.iconClass)
|
|
7549
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
7550
|
-
className: classNames(text),
|
|
7551
|
-
children: [" ", t(button$1.text)]
|
|
7552
|
-
})]
|
|
7553
|
-
}, button$1.key);
|
|
7554
|
-
})]
|
|
7555
|
-
})
|
|
7556
|
-
}));
|
|
7557
|
-
}
|
|
7558
7096
|
|
|
7559
7097
|
var layout$1 = "layout-NhUpB";
|
|
7560
|
-
var
|
|
7098
|
+
var content = "content-t8Rtl";
|
|
7099
|
+
var leftSide = "left-side-10jmj";
|
|
7561
7100
|
var rightSide$1 = "right-side-64-Yz";
|
|
7562
|
-
var scrollerContainer = "scroller-container-TAsAz";
|
|
7563
7101
|
var catalogImages = "catalog-images-jJGqW";
|
|
7564
|
-
var productsHidden = "products-hidden-T6mTt";
|
|
7565
|
-
var products = "products-QxoIf";
|
|
7566
7102
|
var footer = "footer-1ONIt";
|
|
7567
|
-
var
|
|
7568
|
-
var favPlanning = "fav-planning-R8cxS";
|
|
7569
|
-
var setPlanning = "set-planning-1AQNC";
|
|
7570
|
-
var articleList = "article-list-uOn26";
|
|
7571
|
-
var analyticsIcon = "analytics-icon-kCv53";
|
|
7572
|
-
var css_248z$7 = ".layout-NhUpB {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: repeat(10, 1fr);\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n overflow: auto;\n height: 100%;\n}\n\n.info-9St01 {\n grid-area: 1 / 1 / 11 / 3;\n z-index: 100;\n}\n\n.right-side-64-Yz {\n grid-area: 1 / 3 / 11 / 13;\n width: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.scroller-container-TAsAz {\n overflow: auto;\n height: calc(100% - 70px);\n}\n\n.catalog-images-jJGqW {\n padding: 12px 12px 0 12px;\n height: calc(50% - 12px);\n}\n.products-hidden-T6mTt .catalog-images-jJGqW {\n height: calc(100% - 12px);\n}\n.products-QxoIf {\n height: 50%;\n}\n.footer-1ONIt {\n bottom: 0;\n right: 8px;\n}\n\n.empty-planning-BZTrr {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4 16L3.57574 15.5757C3.46321 15.6883 3.4 15.8409 3.4 16H4ZM17 3L17.4243 2.57574C17.1899 2.34142 16.8101 2.34142 16.5757 2.57574L17 3ZM21 7L21.4243 7.42426C21.6586 7.18995 21.6586 6.81005 21.4243 6.57574L21 7ZM8 20V20.6C8.15913 20.6 8.31174 20.5368 8.42426 20.4243L8 20ZM4 20H3.4C3.4 20.3314 3.66863 20.6 4 20.6V20ZM12 19.4C11.6686 19.4 11.4 19.6686 11.4 20C11.4 20.3314 11.6686 20.6 12 20.6V19.4ZM20.5 20.6C20.8314 20.6 21.1 20.3314 21.1 20C21.1 19.6686 20.8314 19.4 20.5 19.4V20.6ZM4.42426 16.4243L17.4243 3.42426L16.5757 2.57574L3.57574 15.5757L4.42426 16.4243ZM16.5757 3.42426L20.5757 7.42426L21.4243 6.57574L17.4243 2.57574L16.5757 3.42426ZM20.5757 6.57574L7.57574 19.5757L8.42426 20.4243L21.4243 7.42426L20.5757 6.57574ZM8 19.4H4V20.6H8V19.4ZM4.6 20V16H3.4V20H4.6ZM13.5757 6.42426L17.5757 10.4243L18.4243 9.57574L14.4243 5.57574L13.5757 6.42426ZM12 20.6H20.5V19.4H12V20.6Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.fav-planning-R8cxS {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4.3314 12.0474L12 20L19.6686 12.0474C20.5211 11.1633 21 9.96429 21 8.71405C21 6.11055 18.9648 4 16.4543 4C15.2487 4 14.0925 4.49666 13.24 5.38071L12 6.66667L10.76 5.38071C9.90749 4.49666 8.75128 4 7.54569 4C5.03517 4 3 6.11055 3 8.71405C3 9.96429 3.47892 11.1633 4.3314 12.0474Z%22 stroke%3D%22white%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.set-planning-1AQNC {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M7.11164 16.5938L3.8061 18.9095C3.46519 19.1412 3 18.9011 3 18.4934V5.5064C3 5.12726 3.4083 4.88294 3.75042 5.05738L7.1021 6.77004M12.1193 16.7346V9.76989C12.1193 9.49058 12.3494 9.26416 12.6332 9.26416H16.1086C16.3924 9.26416 16.6225 9.49058 16.6225 9.76989V16.7346M7.46741 16.7346H19.486C19.7699 16.7346 20 16.5081 20 16.2288V7.12577C20 6.84647 19.7699 6.62004 19.486 6.62004H7.46741C7.18356 6.62004 6.95346 6.84647 6.95346 7.12577V16.2288C6.95346 16.5081 7.18356 16.7346 7.46741 16.7346Z%22 stroke%3D%22white%22 stroke-width%3D%221.5%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.article-list-uOn26 {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 24 24%22 %3E %3Cpath fill%3D%22white%22 d%3D%22M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.analytics-icon-kCv53 {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 stroke%3D%22%23fff%22 fill%3D%22%23fff%22 stroke-width%3D%222px%22 height%3D%2248%22 width%3D%2248%22%3E%3Cpath d%3D%22M7.3 40.7v-2.1l1.1-1.1v3.2Zm8.1 0V30.6l1.1-1.1v11.2Zm8.05 0V29.5l1.1 1.15V40.7Zm8.1 0V30.65l1.1-1.1V40.7Zm8.05 0V22.6l1.1-1.1v19.2ZM7.3 28.05v-1.5L20 13.85l8 8 12.7-12.7v1.55L28 23.4l-8-8Z%22%2F%3E%3C%2Fsvg%3E\");\n}\n";
|
|
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";
|
|
7573
7104
|
styleInject(css_248z$7);
|
|
7574
7105
|
|
|
7575
7106
|
var wrapper$5 = "wrapper-D5Cmc";
|
|
7576
7107
|
var thumbs = "thumbs-cWKAj";
|
|
7577
7108
|
var mainSlider = "mainSlider-S8opH";
|
|
7578
|
-
var css_248z$6 = ".wrapper-D5Cmc {\n display: flex;\n position: relative;\n
|
|
7109
|
+
var css_248z$6 = ".wrapper-D5Cmc {\n display: flex;\n position: relative;\n gap: 12px;\n overflow: auto;\n}\n\n.thumbs-cWKAj .swiper-slide {\n opacity: 0.4;\n}\n\n.thumbs-cWKAj .swiper-slide-thumb-active {\n opacity: 1;\n}\n\n.mainSlider-S8opH .swiper-pagination-bullet-active {\n background-color: var(--diva-theme-palette-primary-main) !important;\n}\n\n.mainSlider-S8opH .swiper-pagination-bullet-active { /* Active bullet color */\n}\n\n@media (max-width: 820px) {\n .thumbs-cWKAj {\n display: none;\n }\n}\n";
|
|
7579
7110
|
styleInject(css_248z$6);
|
|
7580
7111
|
|
|
7581
7112
|
var _excluded$5 = ["data"];
|
|
@@ -7589,7 +7120,7 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7589
7120
|
var mainSwiperRef = useRef(null);
|
|
7590
7121
|
return /*#__PURE__*/jsxs("div", {
|
|
7591
7122
|
id: "diva-catalog-images",
|
|
7592
|
-
className:
|
|
7123
|
+
className: classnames(wrapper$5, props.className),
|
|
7593
7124
|
children: [/*#__PURE__*/jsx(Swiper, {
|
|
7594
7125
|
ref: mainSwiperRef,
|
|
7595
7126
|
pagination: {
|
|
@@ -7605,7 +7136,8 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7605
7136
|
},
|
|
7606
7137
|
style: {
|
|
7607
7138
|
height: '100%',
|
|
7608
|
-
width: '90%'
|
|
7139
|
+
width: '90%',
|
|
7140
|
+
minWidth: 0
|
|
7609
7141
|
},
|
|
7610
7142
|
className: mainSlider,
|
|
7611
7143
|
children: data.images.map(function (media, index) {
|
|
@@ -7623,14 +7155,18 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7623
7155
|
}), /*#__PURE__*/jsx(Swiper, {
|
|
7624
7156
|
onSwiper: setThumbsSwiper,
|
|
7625
7157
|
spaceBetween: 10,
|
|
7626
|
-
slidesPerView:
|
|
7627
|
-
freeMode:
|
|
7158
|
+
slidesPerView: "auto",
|
|
7159
|
+
freeMode: {
|
|
7160
|
+
sticky: true
|
|
7161
|
+
},
|
|
7162
|
+
mousewheel: true,
|
|
7628
7163
|
direction: "vertical",
|
|
7629
7164
|
watchSlidesProgress: true,
|
|
7630
|
-
modules: [Thumbs, FreeMode],
|
|
7165
|
+
modules: [Thumbs, FreeMode, Mousewheel],
|
|
7631
7166
|
style: {
|
|
7632
7167
|
width: '10%',
|
|
7633
7168
|
marginLeft: '10px',
|
|
7169
|
+
minWidth: '150px',
|
|
7634
7170
|
cursor: 'pointer'
|
|
7635
7171
|
},
|
|
7636
7172
|
className: thumbs,
|
|
@@ -7656,160 +7192,203 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7656
7192
|
};
|
|
7657
7193
|
|
|
7658
7194
|
var wrapper$4 = "wrapper-3d2zl";
|
|
7659
|
-
var
|
|
7195
|
+
var tabBar = "tab-bar-lQQ28";
|
|
7196
|
+
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";
|
|
7660
7198
|
styleInject(css_248z$5);
|
|
7661
7199
|
|
|
7662
|
-
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7663
|
-
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7664
|
-
var Products = function Products(_ref) {
|
|
7665
|
-
var catalogCodex = _ref.catalogCodex,
|
|
7666
|
-
onProductClick = _ref.onProductClick,
|
|
7667
|
-
productState = _ref.productState;
|
|
7668
|
-
var _useSellerState = useSellerState(),
|
|
7669
|
-
_useSellerState$state = _useSellerState.state,
|
|
7670
|
-
currentProductId = _useSellerState$state.currentProductId,
|
|
7671
|
-
configurationData = _useSellerState$state.configurationData;
|
|
7672
|
-
var _productState$filter = _slicedToArray(productState.filter, 2),
|
|
7673
|
-
filter = _productState$filter[0],
|
|
7674
|
-
setFilter = _productState$filter[1];
|
|
7675
|
-
useEffect(function () {
|
|
7676
|
-
setFilter(_objectSpread$l(_objectSpread$l({}, filter), {}, {
|
|
7677
|
-
catCodex: {
|
|
7678
|
-
type: 'singleSelect',
|
|
7679
|
-
value: catalogCodex
|
|
7680
|
-
}
|
|
7681
|
-
}));
|
|
7682
|
-
}, []);
|
|
7683
|
-
return /*#__PURE__*/jsx(ProductsComponent, {
|
|
7684
|
-
productState: productState,
|
|
7685
|
-
onClickFunction: onProductClick,
|
|
7686
|
-
curProductId: currentProductId,
|
|
7687
|
-
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7688
|
-
galleryConfig: {
|
|
7689
|
-
hidePrices: true
|
|
7690
|
-
}
|
|
7691
|
-
});
|
|
7692
|
-
};
|
|
7693
|
-
|
|
7694
7200
|
var wrapper$3 = "wrapper-i9mNn";
|
|
7695
7201
|
var searchText = "search-text-grXdY";
|
|
7696
7202
|
var icon = "icon-ydD53";
|
|
7697
|
-
var css_248z$4 = ".wrapper-i9mNn {\n display: flex;\n height:
|
|
7203
|
+
var css_248z$4 = ".wrapper-i9mNn {\n display: flex;\n height: 36px;\n align-items: center;\n background-color: #fefefe;\n margin: 6px 0;\n border-radius: 5px;\n}\n\n.search-text-grXdY {\n padding: 8px 8px 8px 0px;\n transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);\n width: 130px;\n}\n\n.search-text-grXdY.Mui-focused {\n width: 200px;\n}\n\n.search-text-grXdY .MuiInputBase-input {\n padding-left: 36px;\n}\n\n.icon-ydD53 {\n width: 36px;\n height: 36px;\n background: center / contain no-repeat url(\"data:image/svg+xml,%3Csvg width%3D%2259%22 height%3D%2259%22 viewBox%3D%220 0 59 59%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M39.9163 41.38C40.3208 41.7844 40.9765 41.7844 41.3809 41.38C41.7854 40.9755 41.7854 40.3198 41.3809 39.9153L39.9163 41.38ZM36.851 27.5286C36.851 32.6767 32.6776 36.85 27.5296 36.85V38.9215C33.8216 38.9215 38.9224 33.8206 38.9224 27.5286H36.851ZM27.5296 36.85C22.3815 36.85 18.2081 32.6767 18.2081 27.5286H16.1367C16.1367 33.8206 21.2375 38.9215 27.5296 38.9215V36.85ZM18.2081 27.5286C18.2081 22.3805 22.3815 18.2072 27.5296 18.2072V16.1357C21.2375 16.1357 16.1367 21.2365 16.1367 27.5286H18.2081ZM27.5296 18.2072C32.6776 18.2072 36.851 22.3805 36.851 27.5286H38.9224C38.9224 21.2365 33.8216 16.1357 27.5296 16.1357V18.2072ZM41.3809 39.9153L35.5982 34.1325L34.1334 35.5972L39.9163 41.38L41.3809 39.9153Z%22 fill%3D%22%234F4F4F%22%2F%3E%3C%2Fsvg%3E\");\n position: absolute;\n pointer-events: none;\n}\n";
|
|
7698
7204
|
styleInject(css_248z$4);
|
|
7699
7205
|
|
|
7700
7206
|
var Search = function Search(_ref) {
|
|
7701
|
-
var
|
|
7702
|
-
|
|
7703
|
-
|
|
7207
|
+
var searchValue = _ref.searchValue,
|
|
7208
|
+
onSearch = _ref.onSearch,
|
|
7209
|
+
setExpanded = _ref.setExpanded;
|
|
7704
7210
|
var _useTranslation = useTranslation(),
|
|
7705
7211
|
t = _useTranslation.t;
|
|
7706
|
-
var _useState = useState(''),
|
|
7707
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7708
|
-
value = _useState2[0],
|
|
7709
|
-
setValue = _useState2[1];
|
|
7710
|
-
var inputRef = useRef(null);
|
|
7711
|
-
useEffect(function () {
|
|
7712
|
-
if (value && value.length > 2) setSearch(value);else if ((search === null || search === void 0 ? void 0 : search.length) !== 0) {
|
|
7713
|
-
setSearch(undefined);
|
|
7714
|
-
}
|
|
7715
|
-
}, [value]);
|
|
7716
|
-
useEffect(function () {
|
|
7717
|
-
if (!(search !== null && search !== void 0 && search.length)) setValue('');
|
|
7718
|
-
}, [search]);
|
|
7719
7212
|
return /*#__PURE__*/jsxs("div", {
|
|
7720
7213
|
className: wrapper$3,
|
|
7721
|
-
|
|
7722
|
-
|
|
7214
|
+
onClick: function onClick(ev) {
|
|
7215
|
+
return ev.stopPropagation();
|
|
7216
|
+
},
|
|
7217
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
7218
|
+
className: icon
|
|
7219
|
+
}), /*#__PURE__*/jsx(InputBase, {
|
|
7723
7220
|
onChange: function onChange(e) {
|
|
7724
|
-
return
|
|
7221
|
+
return onSearch(e.target.value);
|
|
7725
7222
|
},
|
|
7726
|
-
|
|
7727
|
-
value: value,
|
|
7223
|
+
value: searchValue,
|
|
7728
7224
|
className: searchText,
|
|
7729
|
-
placeholder: t('filter.global')
|
|
7730
|
-
|
|
7731
|
-
|
|
7225
|
+
placeholder: t('filter.global'),
|
|
7226
|
+
onFocus: function onFocus() {
|
|
7227
|
+
return setExpanded(true);
|
|
7228
|
+
}
|
|
7732
7229
|
})]
|
|
7733
7230
|
});
|
|
7734
7231
|
};
|
|
7735
7232
|
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
({
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
}
|
|
7750
|
-
var StyledTab = withStyles$1(function (theme) {
|
|
7751
|
-
return createStyles$1({
|
|
7752
|
-
root: {
|
|
7753
|
-
textTransform: 'none',
|
|
7754
|
-
fontWeight: 'bold',
|
|
7755
|
-
fontSize: theme.typography.pxToRem(15),
|
|
7756
|
-
marginRight: theme.spacing(1)
|
|
7757
|
-
}
|
|
7233
|
+
function NothingFound (_ref) {
|
|
7234
|
+
var text = _ref.text,
|
|
7235
|
+
info = _ref.info;
|
|
7236
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7237
|
+
className: nothingFound,
|
|
7238
|
+
children: [/*#__PURE__*/jsx(Typography$1, {
|
|
7239
|
+
variant: "body2",
|
|
7240
|
+
children: text
|
|
7241
|
+
}), info && /*#__PURE__*/jsx(Alert, {
|
|
7242
|
+
variant: "outlined",
|
|
7243
|
+
severity: "info",
|
|
7244
|
+
children: info
|
|
7245
|
+
})]
|
|
7758
7246
|
});
|
|
7759
|
-
}
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
_ref2.onArticleClick;
|
|
7769
|
-
var productState = _ref2.productState,
|
|
7770
|
-
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
7247
|
+
}
|
|
7248
|
+
|
|
7249
|
+
var ProductsOrArticles = function ProductsOrArticles(_ref) {
|
|
7250
|
+
var _scroller$current, _scroller$current2;
|
|
7251
|
+
var catalogCodex = _ref.catalogCodex,
|
|
7252
|
+
onProductClick = _ref.onProductClick,
|
|
7253
|
+
hideProducts = _ref.hideProducts;
|
|
7254
|
+
var _useSellerState = useSellerState(),
|
|
7255
|
+
configurationData = _useSellerState.state.configurationData;
|
|
7771
7256
|
var _useState = useState(0),
|
|
7772
7257
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7773
|
-
|
|
7774
|
-
|
|
7258
|
+
tab = _useState2[0],
|
|
7259
|
+
setTab = _useState2[1];
|
|
7260
|
+
var _useState3 = useState(false),
|
|
7261
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7262
|
+
expanded = _useState4[0],
|
|
7263
|
+
setExpanded = _useState4[1];
|
|
7264
|
+
var _useState5 = useState(''),
|
|
7265
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7266
|
+
productSearch = _useState6[0],
|
|
7267
|
+
setProductSearch = _useState6[1];
|
|
7268
|
+
var _useState7 = useState(false),
|
|
7269
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7270
|
+
showVZProducts = _useState8[0],
|
|
7271
|
+
setShowVZProducts = _useState8[1];
|
|
7272
|
+
var _useState9 = useState(false),
|
|
7273
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7274
|
+
showFavoriteProducts = _useState10[0],
|
|
7275
|
+
setShowFavoriteProducts = _useState10[1];
|
|
7276
|
+
var favDisabled = hideProducts == true || hideProducts == 'hideFav';
|
|
7277
|
+
var vzDisabled = hideProducts == true || hideProducts == 'hideVZ';
|
|
7278
|
+
var hideAll = !showFavoriteProducts && !showVZProducts;
|
|
7279
|
+
//expand only if there is something to show
|
|
7280
|
+
var shouldExpand = expanded && !hideAll;
|
|
7281
|
+
//tabs are only selectable if both are shown
|
|
7282
|
+
var selectedTab = !showVZProducts ? 1 : tab;
|
|
7775
7283
|
var _useTranslation = useTranslation(),
|
|
7776
7284
|
t = _useTranslation.t;
|
|
7285
|
+
var scroller = useRef(null);
|
|
7286
|
+
var vzProductsState = useProductState$1({
|
|
7287
|
+
parameters: {
|
|
7288
|
+
catCodex: catalogCodex
|
|
7289
|
+
},
|
|
7290
|
+
sort: '{-modelInfoPageWeight}',
|
|
7291
|
+
scroller: (_scroller$current = scroller.current) !== null && _scroller$current !== void 0 ? _scroller$current : undefined,
|
|
7292
|
+
disabled: vzDisabled,
|
|
7293
|
+
onInitialized: function onInitialized(empty) {
|
|
7294
|
+
setShowVZProducts(!empty);
|
|
7295
|
+
if (!empty) setExpanded(true);
|
|
7296
|
+
}
|
|
7297
|
+
});
|
|
7298
|
+
var favoriteProductsState = useProductState$1({
|
|
7299
|
+
parameters: {
|
|
7300
|
+
catCodex: catalogCodex
|
|
7301
|
+
},
|
|
7302
|
+
favorites: true,
|
|
7303
|
+
scroller: (_scroller$current2 = scroller.current) !== null && _scroller$current2 !== void 0 ? _scroller$current2 : undefined,
|
|
7304
|
+
disabled: favDisabled,
|
|
7305
|
+
onInitialized: function onInitialized(empty) {
|
|
7306
|
+
if (!favDisabled) {
|
|
7307
|
+
setShowFavoriteProducts(true);
|
|
7308
|
+
if (!empty) setExpanded(true);
|
|
7309
|
+
}
|
|
7310
|
+
}
|
|
7311
|
+
});
|
|
7777
7312
|
var handleChange = function handleChange(event, newValue) {
|
|
7778
|
-
|
|
7779
|
-
|
|
7313
|
+
vzProductsState.search[1](undefined);
|
|
7314
|
+
favoriteProductsState.search[1](undefined);
|
|
7315
|
+
setProductSearch('');
|
|
7316
|
+
setTab(newValue);
|
|
7317
|
+
if (newValue == selectedTab) {
|
|
7318
|
+
setExpanded(!expanded);
|
|
7319
|
+
} else {
|
|
7320
|
+
setExpanded(true);
|
|
7321
|
+
}
|
|
7322
|
+
event.stopPropagation();
|
|
7780
7323
|
};
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7324
|
+
var handleSearch = function handleSearch(search) {
|
|
7325
|
+
setProductSearch(search);
|
|
7326
|
+
if (selectedTab === 0) {
|
|
7327
|
+
vzProductsState.search[1](search);
|
|
7328
|
+
} else {
|
|
7329
|
+
favoriteProductsState.search[1](search);
|
|
7330
|
+
}
|
|
7331
|
+
};
|
|
7332
|
+
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;
|
|
7342
|
+
return /*#__PURE__*/jsxs(Accordion, {
|
|
7343
|
+
className: wrapper$4,
|
|
7344
|
+
expanded: shouldExpand,
|
|
7345
|
+
onChange: function onChange(_, exp) {
|
|
7346
|
+
return setExpanded(exp);
|
|
7347
|
+
},
|
|
7348
|
+
children: [/*#__PURE__*/jsxs(AccordionSummary, {
|
|
7349
|
+
className: tabBar,
|
|
7350
|
+
expandIcon: /*#__PURE__*/jsx(ExpandMore, {}),
|
|
7351
|
+
children: [/*#__PURE__*/jsxs(Tabs, {
|
|
7352
|
+
value: selectedTab,
|
|
7786
7353
|
onChange: handleChange,
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7354
|
+
children: [showVZProducts && /*#__PURE__*/jsx(Tab, {
|
|
7355
|
+
label: t('info.products.shared'),
|
|
7356
|
+
value: 0
|
|
7357
|
+
}), /*#__PURE__*/jsx(Tab, {
|
|
7358
|
+
label: t('info.products.favorite'),
|
|
7359
|
+
value: 1
|
|
7360
|
+
})]
|
|
7792
7361
|
}), /*#__PURE__*/jsx(Search, {
|
|
7793
|
-
|
|
7362
|
+
searchValue: productSearch,
|
|
7363
|
+
onSearch: handleSearch,
|
|
7364
|
+
setExpanded: setExpanded
|
|
7365
|
+
}, selectedTab)]
|
|
7366
|
+
}), /*#__PURE__*/jsxs(AccordionDetails, {
|
|
7367
|
+
ref: scroller,
|
|
7368
|
+
children: [!isEmpty && /*#__PURE__*/jsx(ProductsComponent, {
|
|
7369
|
+
productState: selectedTab == 0 ? vzProductsState : favoriteProductsState,
|
|
7370
|
+
onClickFunction: onProductClick,
|
|
7371
|
+
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7372
|
+
galleryConfig: {
|
|
7373
|
+
hidePrices: true
|
|
7374
|
+
}
|
|
7375
|
+
}), isEmpty && /*#__PURE__*/jsx(NothingFound, {
|
|
7376
|
+
text: selectedTab == 0 ? t('info.products.novzproducts') : t('info.products.nofavorites'),
|
|
7377
|
+
info: selectedTab == 0 ? undefined : t('info.products.farvoritesinfo')
|
|
7794
7378
|
})]
|
|
7795
|
-
}), /*#__PURE__*/jsx(Products, {
|
|
7796
|
-
catalogCodex: catalogCodex,
|
|
7797
|
-
onProductClick: onProductClick,
|
|
7798
|
-
productState: productState
|
|
7799
7379
|
})]
|
|
7800
|
-
})
|
|
7380
|
+
});
|
|
7801
7381
|
};
|
|
7802
7382
|
|
|
7803
|
-
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7804
|
-
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7805
7383
|
var LOG$3 = getLogger('SellerArticles', 'InfoWithProducts');
|
|
7806
|
-
function
|
|
7807
|
-
var _scroller$current;
|
|
7384
|
+
function useModelInfoPage (_ref) {
|
|
7808
7385
|
var accountId = _ref.accountId,
|
|
7809
7386
|
catalogCodex = _ref.catalogCodex;
|
|
7387
|
+
var _useTranslation = useTranslation(),
|
|
7388
|
+
i18n = _useTranslation.i18n;
|
|
7810
7389
|
var _useState = useState(),
|
|
7811
7390
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7812
|
-
|
|
7391
|
+
catalogData = _useState2[0],
|
|
7813
7392
|
setData = _useState2[1];
|
|
7814
7393
|
var _useState3 = useState(true),
|
|
7815
7394
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -7822,10 +7401,7 @@ function Info(_ref) {
|
|
|
7822
7401
|
openComponent = _useSellerState$actio.openComponent,
|
|
7823
7402
|
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
7824
7403
|
_useSellerState$state = _useSellerState.state,
|
|
7825
|
-
sellerIsVisible = _useSellerState$state.sellerIsVisible,
|
|
7826
|
-
currentProductId = _useSellerState$state.currentProductId,
|
|
7827
7404
|
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
7828
|
-
catalogs = _useSellerState$state.catalogs,
|
|
7829
7405
|
currentBasketState = _useSellerState$state.currentBasketState,
|
|
7830
7406
|
configurationData = _useSellerState$state.configurationData,
|
|
7831
7407
|
returnTo = _useSellerState$state.returnTo,
|
|
@@ -7836,121 +7412,7 @@ function Info(_ref) {
|
|
|
7836
7412
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
7837
7413
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
7838
7414
|
userHasPermission = _useDivaCore$actions.userHasPermission;
|
|
7839
|
-
|
|
7840
|
-
i18n = _useTranslation.i18n;
|
|
7841
|
-
var scroller = useRef(null);
|
|
7842
|
-
var productState = useProductState$1({
|
|
7843
|
-
parameters: {},
|
|
7844
|
-
sort: '{-modelInfoPageWeight}',
|
|
7845
|
-
scroller: (_scroller$current = scroller.current) !== null && _scroller$current !== void 0 ? _scroller$current : undefined
|
|
7846
|
-
});
|
|
7847
|
-
useEffect(function () {
|
|
7848
|
-
LOG$3.startTransaction({
|
|
7849
|
-
event: 'onOpenModule',
|
|
7850
|
-
message: 'Open Catalog Info',
|
|
7851
|
-
eventId: 'ON_OPEN_MODULE_INFO',
|
|
7852
|
-
labels: {
|
|
7853
|
-
cat: catalogCodex,
|
|
7854
|
-
accountId: accountId
|
|
7855
|
-
}
|
|
7856
|
-
});
|
|
7857
|
-
}, []);
|
|
7858
|
-
var _useState5 = useState(false),
|
|
7859
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7860
|
-
showProducts = _useState6[0],
|
|
7861
|
-
setShowProducts = _useState6[1];
|
|
7862
|
-
var showImages = !(configurationData !== null && configurationData !== void 0 && configurationData.hideCatalogImagesInModelInfo);
|
|
7863
|
-
useEffect(function () {
|
|
7864
|
-
if (!showProducts && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductsInModelInfo)) {
|
|
7865
|
-
if (productState.groups.length) setShowProducts(true);
|
|
7866
|
-
}
|
|
7867
|
-
}, [productState.groups]);
|
|
7868
|
-
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7869
|
-
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7870
|
-
var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7871
|
-
if (checkDoReturnToProductCreator(plannerReturn)) {
|
|
7872
|
-
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7873
|
-
}
|
|
7874
|
-
openPlanner({
|
|
7875
|
-
catalogCodex: catalogCodex,
|
|
7876
|
-
accountId: accountId,
|
|
7877
|
-
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7878
|
-
forceReload: '1',
|
|
7879
|
-
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7880
|
-
returnTo: plannerReturn
|
|
7881
|
-
});
|
|
7882
|
-
} else {
|
|
7883
|
-
LOG$3.error(new DivaError('Missing account login ID', {
|
|
7884
|
-
code: 'SELLER_0001'
|
|
7885
|
-
}));
|
|
7886
|
-
}
|
|
7887
|
-
}, [openPlanner, catalogs, currentAccountLoginId]);
|
|
7888
|
-
var onOpenArticles = useCallback(function () {
|
|
7889
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7890
|
-
openComponent({
|
|
7891
|
-
type: 'SELLER',
|
|
7892
|
-
parameters: {
|
|
7893
|
-
module: 'Articles',
|
|
7894
|
-
accountId: accountId,
|
|
7895
|
-
catalogCodex: catalogCodex
|
|
7896
|
-
}
|
|
7897
|
-
});
|
|
7898
|
-
} else {
|
|
7899
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7900
|
-
code: 'SELLER_0001'
|
|
7901
|
-
}));
|
|
7902
|
-
}
|
|
7903
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7904
|
-
var onOpenAnalytics = useCallback(function () {
|
|
7905
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7906
|
-
openComponent({
|
|
7907
|
-
type: 'SELLER',
|
|
7908
|
-
parameters: {
|
|
7909
|
-
module: 'InfoAnalytics',
|
|
7910
|
-
accountId: accountId,
|
|
7911
|
-
catalogCodex: catalogCodex
|
|
7912
|
-
}
|
|
7913
|
-
});
|
|
7914
|
-
} else {
|
|
7915
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7916
|
-
code: 'SELLER_0001'
|
|
7917
|
-
}));
|
|
7918
|
-
}
|
|
7919
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7920
|
-
var onArticleClick = function onArticleClick(item) {
|
|
7921
|
-
var plannerReturn = (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7922
|
-
if (checkDoReturnToProductCreator(plannerReturn)) {
|
|
7923
|
-
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7924
|
-
}
|
|
7925
|
-
openPlanner({
|
|
7926
|
-
catalogCodex: item.catalogCodex,
|
|
7927
|
-
articleCodexes: item.articleCodex,
|
|
7928
|
-
forceReload: '1',
|
|
7929
|
-
accountSessionGuid: currentAccountLoginId,
|
|
7930
|
-
accountId: accountId,
|
|
7931
|
-
retailArticleNr: item.retailArticleNr,
|
|
7932
|
-
returnTo: plannerReturn
|
|
7933
|
-
});
|
|
7934
|
-
};
|
|
7935
|
-
var checkDoReturnToProductCreator = function checkDoReturnToProductCreator(plannerReturn) {
|
|
7936
|
-
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
7937
|
-
};
|
|
7938
|
-
var navigateBack = useCallback(function () {
|
|
7939
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7940
|
-
var _data$accountGuid;
|
|
7941
|
-
openComponent({
|
|
7942
|
-
type: 'SELLER',
|
|
7943
|
-
parameters: {
|
|
7944
|
-
module: 'Catalogs',
|
|
7945
|
-
collectionId: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule) === 'Catalogs' ? undefined : (_data$accountGuid = data === null || data === void 0 ? void 0 : data.accountGuid) !== null && _data$accountGuid !== void 0 ? _data$accountGuid : accountId
|
|
7946
|
-
}
|
|
7947
|
-
});
|
|
7948
|
-
} else {
|
|
7949
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7950
|
-
code: 'SELLER_0001'
|
|
7951
|
-
}));
|
|
7952
|
-
}
|
|
7953
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7415
|
+
useEffect(function () {}, []);
|
|
7954
7416
|
useEffect(function () {
|
|
7955
7417
|
var load = /*#__PURE__*/function () {
|
|
7956
7418
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -7958,59 +7420,76 @@ function Info(_ref) {
|
|
|
7958
7420
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7959
7421
|
while (1) switch (_context.prev = _context.next) {
|
|
7960
7422
|
case 0:
|
|
7423
|
+
LOG$3.startTransaction({
|
|
7424
|
+
event: 'onOpenModule',
|
|
7425
|
+
message: 'Open Catalog Info',
|
|
7426
|
+
eventId: 'ON_OPEN_MODULE_INFO',
|
|
7427
|
+
labels: {
|
|
7428
|
+
cat: catalogCodex,
|
|
7429
|
+
accountId: accountId
|
|
7430
|
+
}
|
|
7431
|
+
});
|
|
7961
7432
|
setLoading(true);
|
|
7962
7433
|
toggleLoading('seller-model-info', false, true);
|
|
7963
7434
|
accountSessionId = undefined;
|
|
7964
7435
|
if (!(organization.type === 'RETAILER')) {
|
|
7965
|
-
_context.next =
|
|
7436
|
+
_context.next = 13;
|
|
7966
7437
|
break;
|
|
7967
7438
|
}
|
|
7968
7439
|
if (accountId) {
|
|
7969
|
-
_context.next =
|
|
7440
|
+
_context.next = 10;
|
|
7970
7441
|
break;
|
|
7971
7442
|
}
|
|
7972
7443
|
LOG$3.errorTransaction('ON_OPEN_MODULE_INFO', 'SELLER_0001', 'Missing account ID', {
|
|
7973
|
-
cat:
|
|
7444
|
+
cat: catalogCodex,
|
|
7974
7445
|
accountId: accountId
|
|
7975
7446
|
});
|
|
7976
7447
|
setLoading(false);
|
|
7977
7448
|
toggleLoading('seller-model-info', false, false);
|
|
7978
7449
|
return _context.abrupt("return");
|
|
7979
|
-
case
|
|
7980
|
-
_context.next =
|
|
7450
|
+
case 10:
|
|
7451
|
+
_context.next = 12;
|
|
7981
7452
|
return checkAccountLogin({
|
|
7982
7453
|
accountId: accountId
|
|
7983
7454
|
});
|
|
7984
|
-
case 11:
|
|
7985
|
-
accountSessionId = _context.sent;
|
|
7986
7455
|
case 12:
|
|
7456
|
+
accountSessionId = _context.sent;
|
|
7457
|
+
case 13:
|
|
7987
7458
|
if (!catalogCodex) {
|
|
7988
|
-
_context.next =
|
|
7459
|
+
_context.next = 21;
|
|
7989
7460
|
break;
|
|
7990
7461
|
}
|
|
7991
|
-
_context.next =
|
|
7462
|
+
_context.next = 16;
|
|
7992
7463
|
return loadCatalogInfo({
|
|
7993
7464
|
catalogCodex: catalogCodex,
|
|
7994
7465
|
accountSessionId: accountSessionId,
|
|
7995
7466
|
accountId: accountId,
|
|
7996
7467
|
language: i18n.language || 'en'
|
|
7997
7468
|
});
|
|
7998
|
-
case
|
|
7469
|
+
case 16:
|
|
7999
7470
|
catalogInfoData = _context.sent;
|
|
7471
|
+
{
|
|
7472
|
+
_context.next = 19;
|
|
7473
|
+
break;
|
|
7474
|
+
}
|
|
7475
|
+
case 19:
|
|
7476
|
+
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
7477
|
+
|
|
7478
|
+
//if there is no relevant catalog information, as a normal seller continue directly to the planner
|
|
7479
|
+
//the productcreator stays regardles on the page, because currently it is only possible to create productvariants from this page
|
|
8000
7480
|
if ((catalogInfoData === null || catalogInfoData === void 0 || (_catalogInfoData$ = catalogInfoData[0]) === null || _catalogInfoData$ === void 0 || (_catalogInfoData$ = _catalogInfoData$.images) === null || _catalogInfoData$ === void 0 ? void 0 : _catalogInfoData$.length) == 0 && !userHasPermission('productcreator')) {
|
|
8001
7481
|
if (catalogInfoData !== null && catalogInfoData !== void 0 && catalogInfoData[0].hasPlanner) {
|
|
8002
7482
|
onOpenPlanner(accountSessionId);
|
|
8003
7483
|
}
|
|
8004
7484
|
}
|
|
8005
|
-
|
|
8006
|
-
case 18:
|
|
7485
|
+
case 21:
|
|
8007
7486
|
LOG$3.successTransaction('ON_OPEN_MODULE_INFO', {
|
|
8008
|
-
cat:
|
|
7487
|
+
cat: catalogCodex,
|
|
8009
7488
|
accountId: accountId
|
|
8010
7489
|
});
|
|
8011
7490
|
setLoading(false);
|
|
8012
7491
|
toggleLoading('seller-model-info', false, false);
|
|
8013
|
-
case
|
|
7492
|
+
case 24:
|
|
8014
7493
|
case "end":
|
|
8015
7494
|
return _context.stop();
|
|
8016
7495
|
}
|
|
@@ -8022,121 +7501,137 @@ function Info(_ref) {
|
|
|
8022
7501
|
}();
|
|
8023
7502
|
load();
|
|
8024
7503
|
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
8025
|
-
var
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
}
|
|
8063
|
-
if (userHasPermission('analytics') && configurationData !== null && configurationData !== void 0 && configurationData.analyticsConfig) {
|
|
8064
|
-
navButtons.push({
|
|
8065
|
-
onClick: function onClick() {
|
|
8066
|
-
return onOpenAnalytics();
|
|
8067
|
-
},
|
|
8068
|
-
text: 'info.buttons.analytics',
|
|
8069
|
-
key: 'diva-seller-info-open-analytics',
|
|
8070
|
-
iconClass: analyticsIcon
|
|
8071
|
-
});
|
|
8072
|
-
}
|
|
8073
|
-
var closePdp = function closePdp() {
|
|
8074
|
-
openComponent({
|
|
8075
|
-
type: 'SELLER',
|
|
8076
|
-
parameters: _objectSpread$j(_objectSpread$j({
|
|
8077
|
-
module: 'Info'
|
|
8078
|
-
}, accountId ? {
|
|
8079
|
-
accountId: accountId
|
|
8080
|
-
} : {}), {}, {
|
|
8081
|
-
catalogCodex: catalogCodex
|
|
8082
|
-
}),
|
|
8083
|
-
breadcrumb: true
|
|
8084
|
-
});
|
|
8085
|
-
};
|
|
8086
|
-
var onProductClick = function onProductClick(product) {
|
|
7504
|
+
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7505
|
+
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7506
|
+
var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7507
|
+
if (checkDoReturnToProductCreator(plannerReturn, returnTo)) {
|
|
7508
|
+
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7509
|
+
}
|
|
7510
|
+
openPlanner({
|
|
7511
|
+
catalogCodex: catalogCodex,
|
|
7512
|
+
accountId: accountId,
|
|
7513
|
+
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7514
|
+
forceReload: '1',
|
|
7515
|
+
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7516
|
+
returnTo: plannerReturn
|
|
7517
|
+
});
|
|
7518
|
+
} else {
|
|
7519
|
+
LOG$3.error(new DivaError('Missing account login ID', {
|
|
7520
|
+
code: 'SELLER_0001'
|
|
7521
|
+
}));
|
|
7522
|
+
}
|
|
7523
|
+
}, [currentAccountLoginId, organization.parentType, accountId, catalogCodex, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo, currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket]);
|
|
7524
|
+
var onOpenArticles = useCallback(function () {
|
|
7525
|
+
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7526
|
+
openComponent({
|
|
7527
|
+
type: 'SELLER',
|
|
7528
|
+
parameters: {
|
|
7529
|
+
module: 'Articles',
|
|
7530
|
+
accountId: accountId,
|
|
7531
|
+
catalogCodex: catalogCodex
|
|
7532
|
+
}
|
|
7533
|
+
});
|
|
7534
|
+
} else {
|
|
7535
|
+
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7536
|
+
code: 'SELLER_0001'
|
|
7537
|
+
}));
|
|
7538
|
+
}
|
|
7539
|
+
}, [accountId, catalogCodex, organization.parentType]);
|
|
7540
|
+
var onOpenPlannerWithProduct = useCallback(function (product) {
|
|
8087
7541
|
openPlanner({
|
|
8088
7542
|
accountSessionGuid: currentAccountLoginId,
|
|
8089
7543
|
forceReload: '1',
|
|
8090
7544
|
productId: product._id,
|
|
8091
7545
|
returnTo: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET'
|
|
8092
7546
|
});
|
|
8093
|
-
};
|
|
8094
|
-
var
|
|
8095
|
-
if (
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
7547
|
+
}, [currentAccountLoginId, openPlanner, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo]);
|
|
7548
|
+
var onNavigateBack = useCallback(function () {
|
|
7549
|
+
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7550
|
+
openComponent({
|
|
7551
|
+
type: 'SELLER',
|
|
7552
|
+
parameters: {
|
|
7553
|
+
module: 'Catalogs',
|
|
7554
|
+
collectionId: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule) === 'Catalogs' ? undefined : accountId
|
|
7555
|
+
}
|
|
7556
|
+
});
|
|
7557
|
+
} else {
|
|
7558
|
+
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7559
|
+
code: 'SELLER_0001'
|
|
7560
|
+
}));
|
|
8099
7561
|
}
|
|
8100
|
-
}, []);
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
7562
|
+
}, [accountId, catalogCodex, organization.parentType, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule]);
|
|
7563
|
+
var navButtons = useMemo(function () {
|
|
7564
|
+
var buttons = {
|
|
7565
|
+
articles: function articles() {
|
|
7566
|
+
return onOpenArticles();
|
|
7567
|
+
},
|
|
7568
|
+
navigateBack: function navigateBack() {
|
|
7569
|
+
return onNavigateBack();
|
|
7570
|
+
}
|
|
8105
7571
|
};
|
|
8106
|
-
|
|
7572
|
+
if ((!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && catalogData !== null && catalogData !== void 0 && catalogData.hasPlanner) {
|
|
7573
|
+
buttons.planner = function () {
|
|
7574
|
+
return onOpenPlanner(currentAccountLoginId);
|
|
7575
|
+
};
|
|
7576
|
+
}
|
|
7577
|
+
if ((userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator) || returnTo === 'toAssortmentManager' || returnTo === 'toProductsGallery') && !originProductId) {
|
|
7578
|
+
buttons.variantsPlanner = function () {
|
|
7579
|
+
return onOpenPlanner(undefined, 'FAVORITS_OPEN_SELLER_PRODUCTCREATOR');
|
|
7580
|
+
};
|
|
7581
|
+
}
|
|
7582
|
+
return buttons;
|
|
7583
|
+
}, [catalogData, configurationData, catalogCodex, onNavigateBack, openPlanner, onOpenArticles]);
|
|
7584
|
+
return {
|
|
7585
|
+
loading: loading,
|
|
7586
|
+
catalogData: catalogData,
|
|
7587
|
+
hideImage: configurationData === null || configurationData === void 0 ? void 0 : configurationData.hideCatalogImagesInModelInfo,
|
|
7588
|
+
hideProducts: configurationData === null || configurationData === void 0 ? void 0 : configurationData.hideProductsInModelInfo,
|
|
7589
|
+
navButtons: navButtons,
|
|
7590
|
+
onOpenPlannerWithProduct: onOpenPlannerWithProduct
|
|
7591
|
+
};
|
|
7592
|
+
}
|
|
7593
|
+
function checkDoReturnToProductCreator(plannerReturn, returnTo) {
|
|
7594
|
+
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
7595
|
+
}
|
|
7596
|
+
|
|
7597
|
+
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7598
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7599
|
+
function Info(props) {
|
|
7600
|
+
var _useModelInfoPage = useModelInfoPage(props),
|
|
7601
|
+
loading = _useModelInfoPage.loading,
|
|
7602
|
+
catalogData = _useModelInfoPage.catalogData,
|
|
7603
|
+
hideImage = _useModelInfoPage.hideImage,
|
|
7604
|
+
hideProducts = _useModelInfoPage.hideProducts,
|
|
7605
|
+
navButtons = _useModelInfoPage.navButtons,
|
|
7606
|
+
onOpenPlannerWithProduct = _useModelInfoPage.onOpenPlannerWithProduct;
|
|
7607
|
+
if (loading || !catalogData) {
|
|
7608
|
+
return /*#__PURE__*/jsx("div", {});
|
|
7609
|
+
}
|
|
8107
7610
|
return /*#__PURE__*/jsx(Fragment, {
|
|
8108
|
-
children: !loading &&
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
7611
|
+
children: !loading && /*#__PURE__*/jsxs("div", {
|
|
7612
|
+
className: layout$1,
|
|
7613
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
7614
|
+
className: content,
|
|
8112
7615
|
children: [/*#__PURE__*/jsx(Description$1, {
|
|
8113
|
-
data:
|
|
8114
|
-
className:
|
|
7616
|
+
data: catalogData,
|
|
7617
|
+
className: leftSide,
|
|
8115
7618
|
text: "info.title"
|
|
8116
7619
|
}), /*#__PURE__*/jsxs("div", {
|
|
8117
|
-
className:
|
|
8118
|
-
children: [/*#__PURE__*/
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
hidden: !showProducts,
|
|
8126
|
-
productState: productState,
|
|
8127
|
-
className: products,
|
|
8128
|
-
catalogCodex: catalogCodex,
|
|
8129
|
-
onProductClick: onProductClick,
|
|
8130
|
-
onArticleClick: onArticleClick,
|
|
8131
|
-
accountId: accountId
|
|
8132
|
-
})]
|
|
8133
|
-
}), /*#__PURE__*/jsx(NavBar, {
|
|
8134
|
-
className: footer,
|
|
8135
|
-
navigateBack: navigateBack,
|
|
8136
|
-
buttons: navButtons
|
|
7620
|
+
className: rightSide$1,
|
|
7621
|
+
children: [!hideImage && /*#__PURE__*/jsx(CatalogImages, {
|
|
7622
|
+
data: catalogData,
|
|
7623
|
+
className: catalogImages
|
|
7624
|
+
}), /*#__PURE__*/jsx(ProductsOrArticles, {
|
|
7625
|
+
catalogCodex: catalogData.codex,
|
|
7626
|
+
onProductClick: onOpenPlannerWithProduct,
|
|
7627
|
+
hideProducts: hideProducts
|
|
8137
7628
|
})]
|
|
8138
7629
|
})]
|
|
8139
|
-
})
|
|
7630
|
+
}), /*#__PURE__*/jsx("div", {
|
|
7631
|
+
className: footer,
|
|
7632
|
+
id: "diva-seller-info-navbar",
|
|
7633
|
+
children: /*#__PURE__*/jsx(NavBar, _objectSpread$j({}, navButtons))
|
|
7634
|
+
})]
|
|
8140
7635
|
})
|
|
8141
7636
|
});
|
|
8142
7637
|
}
|
|
@@ -8196,7 +7691,7 @@ function Priceedit (_ref) {
|
|
|
8196
7691
|
});
|
|
8197
7692
|
} else {
|
|
8198
7693
|
discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
|
|
8199
|
-
percentageDiscount: (price - value || 0) / price * 100
|
|
7694
|
+
percentageDiscount: formatOneDecimals((price - value || 0) / price * 100)
|
|
8200
7695
|
});
|
|
8201
7696
|
}
|
|
8202
7697
|
setDiscount(discount);
|
|
@@ -8208,6 +7703,9 @@ function Priceedit (_ref) {
|
|
|
8208
7703
|
function formatTwoDecimals(value) {
|
|
8209
7704
|
return Math.round(value * 100) / 100;
|
|
8210
7705
|
}
|
|
7706
|
+
function formatOneDecimals(value) {
|
|
7707
|
+
return Math.round(value * 10) / 10;
|
|
7708
|
+
}
|
|
8211
7709
|
return /*#__PURE__*/jsx(Table$1, {
|
|
8212
7710
|
children: /*#__PURE__*/jsxs(TableBody$1, {
|
|
8213
7711
|
children: [/*#__PURE__*/jsxs(TableRow$1, {
|
|
@@ -8352,7 +7850,7 @@ function Autocomplete (_ref) {
|
|
|
8352
7850
|
return v === null || v === void 0 ? void 0 : v.label;
|
|
8353
7851
|
}) : typeof o == 'string' ? o : o === null || o === void 0 ? void 0 : o.label;
|
|
8354
7852
|
},
|
|
8355
|
-
|
|
7853
|
+
isOptionEqualToValue: function isOptionEqualToValue(option, value) {
|
|
8356
7854
|
return (option === null || option === void 0 ? void 0 : option.id) == (value === null || value === void 0 ? void 0 : value.id);
|
|
8357
7855
|
},
|
|
8358
7856
|
value: selectedValue,
|
|
@@ -8539,8 +8037,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8539
8037
|
container: true,
|
|
8540
8038
|
spacing: 2,
|
|
8541
8039
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8542
|
-
|
|
8543
|
-
xs: true,
|
|
8040
|
+
size: "grow",
|
|
8544
8041
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8545
8042
|
fullWidth: true,
|
|
8546
8043
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8557,8 +8054,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8557
8054
|
})
|
|
8558
8055
|
})
|
|
8559
8056
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8560
|
-
|
|
8561
|
-
xs: true,
|
|
8057
|
+
size: "grow",
|
|
8562
8058
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8563
8059
|
fullWidth: true,
|
|
8564
8060
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8579,8 +8075,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8579
8075
|
container: true,
|
|
8580
8076
|
spacing: 2,
|
|
8581
8077
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8582
|
-
|
|
8583
|
-
xs: true,
|
|
8078
|
+
size: "grow",
|
|
8584
8079
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8585
8080
|
fullWidth: true,
|
|
8586
8081
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8597,8 +8092,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8597
8092
|
})
|
|
8598
8093
|
})
|
|
8599
8094
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8600
|
-
|
|
8601
|
-
xs: true,
|
|
8095
|
+
size: "grow",
|
|
8602
8096
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8603
8097
|
fullWidth: true,
|
|
8604
8098
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8633,8 +8127,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8633
8127
|
container: true,
|
|
8634
8128
|
spacing: 2,
|
|
8635
8129
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8636
|
-
|
|
8637
|
-
xs: true,
|
|
8130
|
+
size: "grow",
|
|
8638
8131
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8639
8132
|
fullWidth: true,
|
|
8640
8133
|
children: /*#__PURE__*/jsx(ControlledNumberFormat$1, {
|
|
@@ -8659,8 +8152,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8659
8152
|
})
|
|
8660
8153
|
})
|
|
8661
8154
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8662
|
-
|
|
8663
|
-
xs: true,
|
|
8155
|
+
size: "grow",
|
|
8664
8156
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8665
8157
|
fullWidth: true,
|
|
8666
8158
|
children: /*#__PURE__*/jsx(ControlledNumberFormat$1, {
|
|
@@ -8861,8 +8353,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8861
8353
|
container: true,
|
|
8862
8354
|
spacing: 2,
|
|
8863
8355
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8864
|
-
|
|
8865
|
-
xs: true,
|
|
8356
|
+
size: "grow",
|
|
8866
8357
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8867
8358
|
fullWidth: true,
|
|
8868
8359
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8880,8 +8371,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8880
8371
|
})
|
|
8881
8372
|
})
|
|
8882
8373
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8883
|
-
|
|
8884
|
-
xs: true,
|
|
8374
|
+
size: "grow",
|
|
8885
8375
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8886
8376
|
fullWidth: true,
|
|
8887
8377
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8896,8 +8386,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8896
8386
|
})
|
|
8897
8387
|
})
|
|
8898
8388
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8899
|
-
|
|
8900
|
-
xs: true,
|
|
8389
|
+
size: "grow",
|
|
8901
8390
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8902
8391
|
fullWidth: true,
|
|
8903
8392
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -9342,11 +8831,13 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9342
8831
|
onClick: function onClick() {
|
|
9343
8832
|
return handleRemoveValue(index, i);
|
|
9344
8833
|
},
|
|
8834
|
+
size: "large",
|
|
9345
8835
|
children: /*#__PURE__*/jsx(Remove, {})
|
|
9346
8836
|
}), i === pair.value.length - 1 && /*#__PURE__*/jsx(IconButton$1, {
|
|
9347
8837
|
onClick: function onClick() {
|
|
9348
8838
|
return handleAddValue(index);
|
|
9349
8839
|
},
|
|
8840
|
+
size: "large",
|
|
9350
8841
|
children: /*#__PURE__*/jsx(Add, {})
|
|
9351
8842
|
})]
|
|
9352
8843
|
}, i);
|
|
@@ -9354,6 +8845,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9354
8845
|
onClick: function onClick() {
|
|
9355
8846
|
return handleAddValue(index);
|
|
9356
8847
|
},
|
|
8848
|
+
size: "large",
|
|
9357
8849
|
children: /*#__PURE__*/jsx(Add, {})
|
|
9358
8850
|
})]
|
|
9359
8851
|
})
|
|
@@ -9381,6 +8873,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9381
8873
|
onClick: function onClick() {
|
|
9382
8874
|
return handleRemoveArrayOrObject(index, arrayIndex);
|
|
9383
8875
|
},
|
|
8876
|
+
size: "large",
|
|
9384
8877
|
children: /*#__PURE__*/jsx(Delete, {})
|
|
9385
8878
|
})]
|
|
9386
8879
|
}), /*#__PURE__*/jsxs(CardContent, {
|
|
@@ -9416,6 +8909,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9416
8909
|
style: {
|
|
9417
8910
|
height: 'fit-content'
|
|
9418
8911
|
},
|
|
8912
|
+
size: "large",
|
|
9419
8913
|
children: /*#__PURE__*/jsx(Remove, {})
|
|
9420
8914
|
})]
|
|
9421
8915
|
}, entryIndex);
|
|
@@ -9423,6 +8917,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9423
8917
|
onClick: function onClick() {
|
|
9424
8918
|
return handleAddArrayOrObject(index, arrayIndex);
|
|
9425
8919
|
},
|
|
8920
|
+
size: "large",
|
|
9426
8921
|
children: /*#__PURE__*/jsx(Add, {})
|
|
9427
8922
|
})]
|
|
9428
8923
|
})]
|
|
@@ -9444,6 +8939,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9444
8939
|
style: {
|
|
9445
8940
|
height: 'fit-content'
|
|
9446
8941
|
},
|
|
8942
|
+
size: "large",
|
|
9447
8943
|
children: /*#__PURE__*/jsx(Delete, {})
|
|
9448
8944
|
})]
|
|
9449
8945
|
}, index);
|
|
@@ -10069,8 +9565,7 @@ function FieldSelection (_ref) {
|
|
|
10069
9565
|
height: 'calc(100% - 59px',
|
|
10070
9566
|
borderRight: '1px solid rgba(224, 224, 224, 1)'
|
|
10071
9567
|
},
|
|
10072
|
-
children: [selectedFiltered.length > 0 && /*#__PURE__*/jsxs(
|
|
10073
|
-
button: true,
|
|
9568
|
+
children: [selectedFiltered.length > 0 && /*#__PURE__*/jsxs(ListItemButton, {
|
|
10074
9569
|
onClick: function onClick() {
|
|
10075
9570
|
return setOpenSelected(!openSelected);
|
|
10076
9571
|
},
|
|
@@ -10106,14 +9601,14 @@ function FieldSelection (_ref) {
|
|
|
10106
9601
|
},
|
|
10107
9602
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
10108
9603
|
edge: "end",
|
|
9604
|
+
size: "large",
|
|
10109
9605
|
children: /*#__PURE__*/jsx(RemoveIcon, {})
|
|
10110
9606
|
})
|
|
10111
9607
|
})]
|
|
10112
9608
|
}, f.field);
|
|
10113
9609
|
})
|
|
10114
9610
|
})
|
|
10115
|
-
}), /*#__PURE__*/jsxs(
|
|
10116
|
-
button: true,
|
|
9611
|
+
}), /*#__PURE__*/jsxs(ListItemButton, {
|
|
10117
9612
|
onClick: function onClick() {
|
|
10118
9613
|
return setOpenAll(!openAll);
|
|
10119
9614
|
},
|
|
@@ -10149,6 +9644,7 @@ function FieldSelection (_ref) {
|
|
|
10149
9644
|
},
|
|
10150
9645
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
10151
9646
|
edge: "end",
|
|
9647
|
+
size: "large",
|
|
10152
9648
|
children: /*#__PURE__*/jsx(AddIcon, {})
|
|
10153
9649
|
})
|
|
10154
9650
|
})]
|
|
@@ -12432,6 +11928,7 @@ function AffiliateTable (_ref) {
|
|
|
12432
11928
|
onClick: function onClick() {
|
|
12433
11929
|
return setAdd(true);
|
|
12434
11930
|
},
|
|
11931
|
+
size: "large",
|
|
12435
11932
|
children: /*#__PURE__*/jsx(AddIcon$1, {})
|
|
12436
11933
|
})
|
|
12437
11934
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -12471,6 +11968,7 @@ function AffiliateTable (_ref) {
|
|
|
12471
11968
|
onClick: function onClick() {
|
|
12472
11969
|
return deleteAffiliate(d.id);
|
|
12473
11970
|
},
|
|
11971
|
+
size: "large",
|
|
12474
11972
|
children: /*#__PURE__*/jsx(DeleteIcon, {})
|
|
12475
11973
|
})
|
|
12476
11974
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -12947,19 +12445,20 @@ function ProductCreator (_ref) {
|
|
|
12947
12445
|
onClick: function onClick() {
|
|
12948
12446
|
return setSettings(!settings);
|
|
12949
12447
|
},
|
|
12448
|
+
size: "large",
|
|
12950
12449
|
children: /*#__PURE__*/jsx(Settings, {
|
|
12951
12450
|
color: settings ? 'primary' : 'inherit'
|
|
12952
12451
|
})
|
|
12953
12452
|
})
|
|
12954
12453
|
})]
|
|
12955
12454
|
})
|
|
12956
|
-
}), !!error && /*#__PURE__*/jsx(Alert, {
|
|
12455
|
+
}), !!error && /*#__PURE__*/jsx(Alert$1, {
|
|
12957
12456
|
severity: "error",
|
|
12958
12457
|
onClose: function onClose() {
|
|
12959
12458
|
return setError(undefined);
|
|
12960
12459
|
},
|
|
12961
12460
|
children: error
|
|
12962
|
-
}), warn && /*#__PURE__*/jsx(Alert, {
|
|
12461
|
+
}), warn && /*#__PURE__*/jsx(Alert$1, {
|
|
12963
12462
|
severity: "warning",
|
|
12964
12463
|
onClose: function onClose() {
|
|
12965
12464
|
return setWarning(undefined);
|
|
@@ -13064,7 +12563,7 @@ function Description (_ref) {
|
|
|
13064
12563
|
var _useTranslation = useTranslation(),
|
|
13065
12564
|
t = _useTranslation.t;
|
|
13066
12565
|
return /*#__PURE__*/jsxs("div", _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
13067
|
-
className:
|
|
12566
|
+
className: classnames(wrapper, props.className),
|
|
13068
12567
|
children: [/*#__PURE__*/jsx("div", {
|
|
13069
12568
|
className: title$1,
|
|
13070
12569
|
children: t(text)
|
|
@@ -13328,8 +12827,6 @@ function ModuleComponent(_ref) {
|
|
|
13328
12827
|
activeBasket = _ref.activeBasket,
|
|
13329
12828
|
activeAccountId = _ref.activeAccountId,
|
|
13330
12829
|
checkBasket = _ref.checkBasket;
|
|
13331
|
-
var _useSellerState2 = useSellerState(),
|
|
13332
|
-
configurationData = _useSellerState2.state.configurationData;
|
|
13333
12830
|
switch (activeModule) {
|
|
13334
12831
|
case 'Collections':
|
|
13335
12832
|
return /*#__PURE__*/jsx(Collections, {});
|
|
@@ -13338,13 +12835,7 @@ function ModuleComponent(_ref) {
|
|
|
13338
12835
|
collectionId: activeCollectionId
|
|
13339
12836
|
});
|
|
13340
12837
|
case 'Info':
|
|
13341
|
-
|
|
13342
|
-
return /*#__PURE__*/jsx(Info, {
|
|
13343
|
-
catalogCodex: activeCatalogCodex,
|
|
13344
|
-
accountId: activeAccountId
|
|
13345
|
-
});
|
|
13346
|
-
}
|
|
13347
|
-
return /*#__PURE__*/jsx(Info$1, {
|
|
12838
|
+
return /*#__PURE__*/jsx(Info, {
|
|
13348
12839
|
catalogCodex: activeCatalogCodex,
|
|
13349
12840
|
accountId: activeAccountId
|
|
13350
12841
|
});
|