@crystaldesign/diva-seller 24.14.0-beta.3 → 24.14.0-beta.31
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 +772 -1284
- package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
- 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/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,
|
|
@@ -4736,7 +4724,7 @@ function DiscountField (_ref) {
|
|
|
4736
4724
|
function ControlledNumberFormat$1(_ref3) {
|
|
4737
4725
|
var onValueChange = _ref3.onValueChange,
|
|
4738
4726
|
origValue = _ref3.value,
|
|
4739
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
4727
|
+
props = _objectWithoutProperties(_ref3, _excluded$8);
|
|
4740
4728
|
var _useState = useState(origValue),
|
|
4741
4729
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4742
4730
|
value = _useState2[0],
|
|
@@ -4756,7 +4744,7 @@ function ControlledNumberFormat$1(_ref3) {
|
|
|
4756
4744
|
useEffect(function () {
|
|
4757
4745
|
setValue(origValue);
|
|
4758
4746
|
}, [origValue]);
|
|
4759
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4747
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
4760
4748
|
placeholder: props.suffix,
|
|
4761
4749
|
value: value === 0 ? undefined : value,
|
|
4762
4750
|
customInput: StyledTextFiled$1,
|
|
@@ -4780,9 +4768,9 @@ var StyledTextFiled$1 = withStyles({
|
|
|
4780
4768
|
}
|
|
4781
4769
|
})(TextField);
|
|
4782
4770
|
|
|
4783
|
-
var _excluded$
|
|
4784
|
-
function ownKeys$
|
|
4785
|
-
function _objectSpread$
|
|
4771
|
+
var _excluded$7 = ["onValueChange", "value"];
|
|
4772
|
+
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; }
|
|
4773
|
+
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
4774
|
function AdditionalPriceField (_ref) {
|
|
4787
4775
|
var updatePrice = _ref.updatePrice,
|
|
4788
4776
|
price = _ref.price,
|
|
@@ -4840,7 +4828,7 @@ function AdditionalPriceField (_ref) {
|
|
|
4840
4828
|
function ControlledNumberFormat(_ref2) {
|
|
4841
4829
|
var onValueChange = _ref2.onValueChange,
|
|
4842
4830
|
origValue = _ref2.value,
|
|
4843
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
4831
|
+
props = _objectWithoutProperties(_ref2, _excluded$7);
|
|
4844
4832
|
var _useState = useState(origValue),
|
|
4845
4833
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4846
4834
|
value = _useState2[0],
|
|
@@ -4860,7 +4848,7 @@ function ControlledNumberFormat(_ref2) {
|
|
|
4860
4848
|
useEffect(function () {
|
|
4861
4849
|
setValue(origValue);
|
|
4862
4850
|
}, [origValue]);
|
|
4863
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4851
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
4864
4852
|
placeholder: '0 ' + DivaUtils$1.defaultPriceFormat.currency,
|
|
4865
4853
|
value: value,
|
|
4866
4854
|
customInput: StyledTextFiled,
|
|
@@ -5007,6 +4995,7 @@ function PriceTable (_ref) {
|
|
|
5007
4995
|
onClick: function onClick() {
|
|
5008
4996
|
return updatePrice('', '', i, true);
|
|
5009
4997
|
},
|
|
4998
|
+
size: "large",
|
|
5010
4999
|
children: /*#__PURE__*/jsx(RemoveIcon, {})
|
|
5011
5000
|
})
|
|
5012
5001
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -5014,6 +5003,7 @@ function PriceTable (_ref) {
|
|
|
5014
5003
|
children: basket.AdditionalPrices.length - 1 == i && /*#__PURE__*/jsx(IconButton, {
|
|
5015
5004
|
"aria-label": "addPrice",
|
|
5016
5005
|
onClick: addPrice,
|
|
5006
|
+
size: "large",
|
|
5017
5007
|
children: /*#__PURE__*/jsx(AddIcon, {})
|
|
5018
5008
|
})
|
|
5019
5009
|
})]
|
|
@@ -5061,6 +5051,7 @@ function PriceTable (_ref) {
|
|
|
5061
5051
|
onClick: function onClick() {
|
|
5062
5052
|
return removeDiscount(i);
|
|
5063
5053
|
},
|
|
5054
|
+
size: "large",
|
|
5064
5055
|
children: /*#__PURE__*/jsx(RemoveIcon, {})
|
|
5065
5056
|
})
|
|
5066
5057
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -5068,6 +5059,7 @@ function PriceTable (_ref) {
|
|
|
5068
5059
|
children: basket.Discounts.length - 1 == i && /*#__PURE__*/jsx(IconButton, {
|
|
5069
5060
|
"aria-label": "addDiscount",
|
|
5070
5061
|
onClick: addDiscount,
|
|
5062
|
+
size: "large",
|
|
5071
5063
|
children: /*#__PURE__*/jsx(AddIcon, {})
|
|
5072
5064
|
})
|
|
5073
5065
|
})]
|
|
@@ -5097,11 +5089,13 @@ function PriceTable (_ref) {
|
|
|
5097
5089
|
id: "addPrice",
|
|
5098
5090
|
"aria-label": "addPrice",
|
|
5099
5091
|
onClick: addPrice,
|
|
5092
|
+
size: "large",
|
|
5100
5093
|
children: /*#__PURE__*/jsx(AddCircleIcon, {})
|
|
5101
5094
|
}), (!basket.Discounts || basket.Discounts.length == 0) && /*#__PURE__*/jsx(IconButton, {
|
|
5102
5095
|
id: "addDiscount",
|
|
5103
5096
|
"aria-label": "addDiscount",
|
|
5104
5097
|
onClick: addDiscount,
|
|
5098
|
+
size: "large",
|
|
5105
5099
|
children: /*#__PURE__*/jsx(LocalOfferIcon, {})
|
|
5106
5100
|
})]
|
|
5107
5101
|
})
|
|
@@ -5358,8 +5352,8 @@ function StatusMenu(_ref) {
|
|
|
5358
5352
|
});
|
|
5359
5353
|
}
|
|
5360
5354
|
|
|
5361
|
-
var useStyles$
|
|
5362
|
-
return createStyles
|
|
5355
|
+
var useStyles$1 = makeStyles(function (theme) {
|
|
5356
|
+
return createStyles({
|
|
5363
5357
|
margin: {
|
|
5364
5358
|
margin: theme.spacing(1)
|
|
5365
5359
|
},
|
|
@@ -5377,7 +5371,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5377
5371
|
userInfoPresent = _ref.userInfoPresent;
|
|
5378
5372
|
var _useTranslation = useTranslation(),
|
|
5379
5373
|
t = _useTranslation.t;
|
|
5380
|
-
var classes = useStyles$
|
|
5374
|
+
var classes = useStyles$1();
|
|
5381
5375
|
return /*#__PURE__*/jsxs("div", {
|
|
5382
5376
|
style: {
|
|
5383
5377
|
marginTop: '0.4rem',
|
|
@@ -5430,7 +5424,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5430
5424
|
onClickSave(undefined, false, true);
|
|
5431
5425
|
},
|
|
5432
5426
|
className: classes.margin,
|
|
5433
|
-
children: t('
|
|
5427
|
+
children: t('basket.checkout.actions.saveAsFavorite')
|
|
5434
5428
|
})
|
|
5435
5429
|
}), status == 'BASE_CONFIGURATION' && /*#__PURE__*/jsx(Button$1, {
|
|
5436
5430
|
variant: "outlined",
|
|
@@ -5441,7 +5435,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5441
5435
|
onClickSave(undefined, false, true, true);
|
|
5442
5436
|
},
|
|
5443
5437
|
className: classes.margin,
|
|
5444
|
-
children: t('
|
|
5438
|
+
children: t('basket.checkout.actions.saveAndOrderMedia')
|
|
5445
5439
|
}), (configSaveButtons === null || configSaveButtons === void 0 ? void 0 : configSaveButtons.includes('NEW')) && /*#__PURE__*/jsx(Button$1, {
|
|
5446
5440
|
variant: "outlined",
|
|
5447
5441
|
size: "medium",
|
|
@@ -5664,12 +5658,12 @@ function HqRenderBox (_ref) {
|
|
|
5664
5658
|
})]
|
|
5665
5659
|
});
|
|
5666
5660
|
}
|
|
5667
|
-
var ErrorBox = styled$1(
|
|
5661
|
+
var ErrorBox = styled$1('div')({
|
|
5668
5662
|
marginLeft: '50px',
|
|
5669
5663
|
color: 'red',
|
|
5670
5664
|
marginTop: '20px'
|
|
5671
5665
|
});
|
|
5672
|
-
var BorderBox = styled$1(
|
|
5666
|
+
var BorderBox = styled$1('div')({
|
|
5673
5667
|
border: '1px grey solid',
|
|
5674
5668
|
padding: '20px',
|
|
5675
5669
|
marginLeft: '50px',
|
|
@@ -5749,8 +5743,8 @@ var HQ_RenderingTypeSource = [{
|
|
|
5749
5743
|
RenderPipeline: 'vRayNext'
|
|
5750
5744
|
}];
|
|
5751
5745
|
|
|
5752
|
-
function ownKeys$
|
|
5753
|
-
function _objectSpread$
|
|
5746
|
+
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; }
|
|
5747
|
+
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
5748
|
function useProduct(basket) {
|
|
5755
5749
|
var _useState = useState(undefined),
|
|
5756
5750
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5772,7 +5766,7 @@ function useProduct(basket) {
|
|
|
5772
5766
|
});
|
|
5773
5767
|
case 2:
|
|
5774
5768
|
myProduct = _context.sent;
|
|
5775
|
-
setCurrentProduct(_objectSpread$
|
|
5769
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myProduct.baseData), {}, {
|
|
5776
5770
|
parent: (_myProduct$baseData$p = myProduct.baseData.parent) !== null && _myProduct$baseData$p !== void 0 ? _myProduct$baseData$p : myProduct.baseData._id
|
|
5777
5771
|
}));
|
|
5778
5772
|
return _context.abrupt("return", myProduct);
|
|
@@ -5802,7 +5796,7 @@ function useProduct(basket) {
|
|
|
5802
5796
|
});
|
|
5803
5797
|
case 2:
|
|
5804
5798
|
myproduct = _context2.sent;
|
|
5805
|
-
setCurrentProduct(_objectSpread$
|
|
5799
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myproduct[0]), {}, {
|
|
5806
5800
|
parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
|
|
5807
5801
|
}));
|
|
5808
5802
|
if (!favourite) {
|
|
@@ -5810,7 +5804,7 @@ function useProduct(basket) {
|
|
|
5810
5804
|
break;
|
|
5811
5805
|
}
|
|
5812
5806
|
_context2.next = 7;
|
|
5813
|
-
return productHandler.
|
|
5807
|
+
return productHandler.apiMarkAsFavorite(currentProduct._id, basket.OrganizationId);
|
|
5814
5808
|
case 7:
|
|
5815
5809
|
setCurrentProduct(currentProduct);
|
|
5816
5810
|
basket.DocumentVersion = basket.DocumentVersion + 1;
|
|
@@ -5865,8 +5859,8 @@ var hqMediaTitle = "hqMediaTitle-ugda8";
|
|
|
5865
5859
|
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
5860
|
styleInject(css_248z$a);
|
|
5867
5861
|
|
|
5868
|
-
function ownKeys$
|
|
5869
|
-
function _objectSpread$
|
|
5862
|
+
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; }
|
|
5863
|
+
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
5864
|
function CheckOut(_ref) {
|
|
5871
5865
|
var _basket$Client;
|
|
5872
5866
|
var schema = _ref.schema,
|
|
@@ -5893,18 +5887,24 @@ function CheckOut(_ref) {
|
|
|
5893
5887
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
5894
5888
|
showRenderJobs = _useState6[0],
|
|
5895
5889
|
setShowRenderJobs = _useState6[1];
|
|
5890
|
+
var _useState7 = useState(false),
|
|
5891
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5892
|
+
basket3DExportChecked = _useState8[0],
|
|
5893
|
+
setBasket3DExportChecked = _useState8[1];
|
|
5896
5894
|
var _useTranslation = useTranslation(),
|
|
5897
5895
|
t = _useTranslation.t;
|
|
5898
5896
|
var _useSellerState = useSellerState(),
|
|
5899
|
-
|
|
5900
|
-
catalogData = _useSellerState$state.catalogData;
|
|
5901
|
-
_useSellerState$state.configurationData;
|
|
5897
|
+
catalogData = _useSellerState.state.catalogData;
|
|
5902
5898
|
var _useDivaCore = useDivaCore(),
|
|
5903
5899
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
5904
5900
|
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
5905
5901
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
5906
5902
|
openModal = _useDivaCore$actions.openModal,
|
|
5907
|
-
productHandler = _useDivaCore.handler.productHandler
|
|
5903
|
+
productHandler = _useDivaCore.handler.productHandler,
|
|
5904
|
+
_useDivaCore$state = _useDivaCore.state,
|
|
5905
|
+
apiConfig = _useDivaCore$state.apiConfig,
|
|
5906
|
+
jwt = _useDivaCore$state.jwt,
|
|
5907
|
+
organization = _useDivaCore$state.organization;
|
|
5908
5908
|
var _useProduct = useProduct(basket),
|
|
5909
5909
|
currentProduct = _useProduct.currentProduct,
|
|
5910
5910
|
loadProduct = _useProduct.loadProduct,
|
|
@@ -5969,26 +5969,26 @@ function CheckOut(_ref) {
|
|
|
5969
5969
|
};
|
|
5970
5970
|
}();
|
|
5971
5971
|
var handleSave = useCallback(/*#__PURE__*/function () {
|
|
5972
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5973
|
-
return _regeneratorRuntime.wrap(function
|
|
5974
|
-
while (1) switch (
|
|
5972
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail, favourite, hqMedia) {
|
|
5973
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
5974
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
5975
5975
|
case 0:
|
|
5976
5976
|
if (!(status === 'BASE_CONFIGURATION')) {
|
|
5977
|
-
|
|
5977
|
+
_context4.next = 13;
|
|
5978
5978
|
break;
|
|
5979
5979
|
}
|
|
5980
5980
|
if (!hqMedia) {
|
|
5981
|
-
|
|
5981
|
+
_context4.next = 6;
|
|
5982
5982
|
break;
|
|
5983
5983
|
}
|
|
5984
|
-
|
|
5984
|
+
_context4.next = 4;
|
|
5985
5985
|
return saveProductAndShowHqMedia();
|
|
5986
5986
|
case 4:
|
|
5987
|
-
|
|
5987
|
+
_context4.next = 11;
|
|
5988
5988
|
break;
|
|
5989
5989
|
case 6:
|
|
5990
5990
|
toggleLoading('saveProduct');
|
|
5991
|
-
|
|
5991
|
+
_context4.next = 9;
|
|
5992
5992
|
return saveProduct(favourite);
|
|
5993
5993
|
case 9:
|
|
5994
5994
|
toggleLoading('saveProduct');
|
|
@@ -5999,28 +5999,60 @@ function CheckOut(_ref) {
|
|
|
5999
5999
|
});
|
|
6000
6000
|
case 11:
|
|
6001
6001
|
setIsSaved(true);
|
|
6002
|
-
return
|
|
6002
|
+
return _context4.abrupt("return");
|
|
6003
6003
|
case 13:
|
|
6004
6004
|
if (!isSaving) {
|
|
6005
6005
|
setIsSaving(true);
|
|
6006
|
-
onClickSave(openPDF, sendMail).then(function (
|
|
6007
|
-
|
|
6008
|
-
|
|
6006
|
+
onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
|
|
6007
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
|
|
6008
|
+
var newRenderJob;
|
|
6009
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6010
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
6011
|
+
case 0:
|
|
6012
|
+
if (!basket3DExportChecked) {
|
|
6013
|
+
_context3.next = 4;
|
|
6014
|
+
break;
|
|
6015
|
+
}
|
|
6016
|
+
newRenderJob = {
|
|
6017
|
+
divaNr: basket.DivaNr,
|
|
6018
|
+
organization: basket.OrganizationId,
|
|
6019
|
+
job: '3DEXPORT',
|
|
6020
|
+
diva3DProject: basket.Diva3DProject ? atob(basket.Diva3DProject) : undefined,
|
|
6021
|
+
hQRenderScript: basket.OrderSets[0].HQRenderScript
|
|
6022
|
+
};
|
|
6023
|
+
_context3.next = 4;
|
|
6024
|
+
return apiSaveRenderJobs({
|
|
6025
|
+
serviceUrl: apiConfig.mediaService,
|
|
6026
|
+
jobs: [newRenderJob],
|
|
6027
|
+
jwt: jwt
|
|
6028
|
+
});
|
|
6029
|
+
case 4:
|
|
6030
|
+
setIsSaving(false);
|
|
6031
|
+
case 5:
|
|
6032
|
+
case "end":
|
|
6033
|
+
return _context3.stop();
|
|
6034
|
+
}
|
|
6035
|
+
}, _callee3);
|
|
6036
|
+
}));
|
|
6037
|
+
return function (_x5) {
|
|
6038
|
+
return _ref5.apply(this, arguments);
|
|
6039
|
+
};
|
|
6040
|
+
}())["catch"](function () {
|
|
6009
6041
|
return setIsSaving(false);
|
|
6010
6042
|
});
|
|
6011
6043
|
}
|
|
6012
6044
|
case 14:
|
|
6013
6045
|
case "end":
|
|
6014
|
-
return
|
|
6046
|
+
return _context4.stop();
|
|
6015
6047
|
}
|
|
6016
|
-
},
|
|
6048
|
+
}, _callee4);
|
|
6017
6049
|
}));
|
|
6018
6050
|
return function (_x, _x2, _x3, _x4) {
|
|
6019
6051
|
return _ref4.apply(this, arguments);
|
|
6020
6052
|
};
|
|
6021
|
-
}(), [isSaving, onClickSave]);
|
|
6022
|
-
var onChangeForm = function onChangeForm(
|
|
6023
|
-
var data =
|
|
6053
|
+
}(), [isSaving, onClickSave, basket3DExportChecked]);
|
|
6054
|
+
var onChangeForm = function onChangeForm(_ref6) {
|
|
6055
|
+
var data = _ref6.data;
|
|
6024
6056
|
for (var key in data) {
|
|
6025
6057
|
basket[key] = data[key];
|
|
6026
6058
|
}
|
|
@@ -6034,7 +6066,7 @@ function CheckOut(_ref) {
|
|
|
6034
6066
|
};
|
|
6035
6067
|
|
|
6036
6068
|
// for LEAFLET don't show printOptions, if there are any configured.
|
|
6037
|
-
var finalSchema = _objectSpread$
|
|
6069
|
+
var finalSchema = _objectSpread$r(_objectSpread$r({}, uiSchema), {}, {
|
|
6038
6070
|
elements: _toConsumableArray(uiSchema.elements)
|
|
6039
6071
|
});
|
|
6040
6072
|
if (status == 'LEAFLET') {
|
|
@@ -6046,6 +6078,9 @@ function CheckOut(_ref) {
|
|
|
6046
6078
|
}
|
|
6047
6079
|
}
|
|
6048
6080
|
var permissionAnyHqRenderBox = userHasPermission('anyhqrenderbox');
|
|
6081
|
+
var handleCheckBoxChange = function handleCheckBoxChange(event) {
|
|
6082
|
+
setBasket3DExportChecked(event.target.checked);
|
|
6083
|
+
};
|
|
6049
6084
|
return /*#__PURE__*/jsxs("div", {
|
|
6050
6085
|
style: {
|
|
6051
6086
|
display: 'flex',
|
|
@@ -6136,7 +6171,21 @@ function CheckOut(_ref) {
|
|
|
6136
6171
|
}), !!renderService && permissionAnyHqRenderBox && (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && /*#__PURE__*/jsx(HqRenderBox, {
|
|
6137
6172
|
basket: basket,
|
|
6138
6173
|
config: renderService
|
|
6139
|
-
}),
|
|
6174
|
+
}), (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", {
|
|
6175
|
+
style: {
|
|
6176
|
+
marginLeft: '50px',
|
|
6177
|
+
width: '700px'
|
|
6178
|
+
},
|
|
6179
|
+
children: [/*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6180
|
+
control: /*#__PURE__*/jsx(Checkbox$1, {
|
|
6181
|
+
onChange: handleCheckBoxChange
|
|
6182
|
+
}),
|
|
6183
|
+
label: t('basket.checkout.order3dexport')
|
|
6184
|
+
}), /*#__PURE__*/jsxs(Typography, {
|
|
6185
|
+
variant: "caption",
|
|
6186
|
+
children: ["(", t('basket.checkout.3dexport'), ")"]
|
|
6187
|
+
})]
|
|
6188
|
+
}), gdpr && !isEmpty(basket === null || basket === void 0 ? void 0 : basket.Client) && /*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6140
6189
|
style: {
|
|
6141
6190
|
marginLeft: '40px'
|
|
6142
6191
|
},
|
|
@@ -6174,12 +6223,12 @@ function isEmpty(data) {
|
|
|
6174
6223
|
});
|
|
6175
6224
|
}
|
|
6176
6225
|
|
|
6177
|
-
function ownKeys$
|
|
6178
|
-
function _objectSpread$
|
|
6226
|
+
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; }
|
|
6227
|
+
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
6228
|
var schema = function schema(hideWWSButton) {
|
|
6180
6229
|
return {
|
|
6181
6230
|
type: 'object',
|
|
6182
|
-
properties: _objectSpread$
|
|
6231
|
+
properties: _objectSpread$q(_objectSpread$q({
|
|
6183
6232
|
Salesperson: {
|
|
6184
6233
|
type: 'string',
|
|
6185
6234
|
title: 'basket.checkout.form.seller'
|
|
@@ -6433,9 +6482,9 @@ function Step3Checkout(_ref) {
|
|
|
6433
6482
|
});
|
|
6434
6483
|
}
|
|
6435
6484
|
|
|
6436
|
-
function ownKeys$
|
|
6437
|
-
function _objectSpread$
|
|
6438
|
-
var LOG$
|
|
6485
|
+
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; }
|
|
6486
|
+
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; }
|
|
6487
|
+
var LOG$4 = getLogger('SellerBasket', 'Basket');
|
|
6439
6488
|
function Basket(_ref) {
|
|
6440
6489
|
var _configurationData$Ch5;
|
|
6441
6490
|
var divaNr = _ref.divaNr,
|
|
@@ -6477,7 +6526,8 @@ function Basket(_ref) {
|
|
|
6477
6526
|
resetBasketState = _useSellerState$actio.resetBasketState;
|
|
6478
6527
|
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
6528
|
useEffect(function () {
|
|
6480
|
-
|
|
6529
|
+
if (!basket) DivaUtils$1.businessMetrics.setConfiguratorSessionId();
|
|
6530
|
+
LOG$4.startTransaction({
|
|
6481
6531
|
event: 'onOpenModule',
|
|
6482
6532
|
message: 'Open Basket',
|
|
6483
6533
|
eventId: 'ON_OPEN_MODULE_BASKET',
|
|
@@ -6489,7 +6539,7 @@ function Basket(_ref) {
|
|
|
6489
6539
|
useEffect(function () {
|
|
6490
6540
|
openBasket(statusRef, divaNr, checkBasket, basket).then(function () {
|
|
6491
6541
|
var _getBasketStatusArr;
|
|
6492
|
-
LOG$
|
|
6542
|
+
LOG$4.successTransaction('ON_OPEN_MODULE_BASKET', {
|
|
6493
6543
|
divaNr: divaNr
|
|
6494
6544
|
});
|
|
6495
6545
|
if (!statusRef.current || !((_getBasketStatusArr = getBasketStatusArr()) !== null && _getBasketStatusArr !== void 0 && _getBasketStatusArr.includes(statusRef.current))) {
|
|
@@ -6525,7 +6575,7 @@ function Basket(_ref) {
|
|
|
6525
6575
|
}
|
|
6526
6576
|
}, [currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.step]);
|
|
6527
6577
|
useEffect(function () {
|
|
6528
|
-
LOG$
|
|
6578
|
+
LOG$4.businessEvent('onBasketStep', 'SellerBasket', "goto BasketStep '".concat(actBasketPage, "'"), {
|
|
6529
6579
|
basketStep: actBasketPage
|
|
6530
6580
|
});
|
|
6531
6581
|
}, [actBasketPage]);
|
|
@@ -6700,7 +6750,7 @@ function Basket(_ref) {
|
|
|
6700
6750
|
});
|
|
6701
6751
|
*/
|
|
6702
6752
|
}
|
|
6703
|
-
LOG$
|
|
6753
|
+
LOG$4.successTransaction('ON_SAVE_BASKET', {
|
|
6704
6754
|
divaNr: currentBasket.DivaNr,
|
|
6705
6755
|
status: currentBasket.Status,
|
|
6706
6756
|
documentVersion: currentBasket.DocumentVersion,
|
|
@@ -6767,7 +6817,7 @@ function Basket(_ref) {
|
|
|
6767
6817
|
};
|
|
6768
6818
|
}();
|
|
6769
6819
|
var errorOnSaving = function errorOnSaving(type) {
|
|
6770
|
-
LOG$
|
|
6820
|
+
LOG$4.errorTransaction('ON_SAVE_BASKET', 'SELLER_0003', 'Error Saving Basket', {
|
|
6771
6821
|
divaNr: currentBasket.DivaNr,
|
|
6772
6822
|
status: currentBasket.Status,
|
|
6773
6823
|
documentVersion: currentBasket.DocumentVersion,
|
|
@@ -6784,7 +6834,7 @@ function Basket(_ref) {
|
|
|
6784
6834
|
var _currentBasket$OrderS2, _currentBasket$OrderS3, _currentBasket$OrderS4;
|
|
6785
6835
|
openComponent({
|
|
6786
6836
|
type: 'SELLER',
|
|
6787
|
-
parameters: _objectSpread$
|
|
6837
|
+
parameters: _objectSpread$p({
|
|
6788
6838
|
module: 'Info',
|
|
6789
6839
|
catalogCodex: currentBasket === null || currentBasket === void 0 || (_currentBasket$OrderS2 = currentBasket.OrderSets[0]) === null || _currentBasket$OrderS2 === void 0 ? void 0 : _currentBasket$OrderS2.CatalogCodex
|
|
6790
6840
|
}, currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS3 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS3 !== void 0 && _currentBasket$OrderS3.AccountGUID ? {
|
|
@@ -6862,719 +6912,200 @@ function Basket(_ref) {
|
|
|
6862
6912
|
});
|
|
6863
6913
|
}
|
|
6864
6914
|
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
useEffect(function () {
|
|
6875
|
-
setOpen(!hide && !!data);
|
|
6876
|
-
}, [hide, data]);
|
|
6877
|
-
return /*#__PURE__*/jsx("div", {
|
|
6878
|
-
className: classes.root,
|
|
6879
|
-
children: /*#__PURE__*/jsxs(Paper, {
|
|
6880
|
-
className: "".concat(classes.paper, " ").concat(open ? '' : 'hide'),
|
|
6881
|
-
elevation: 4,
|
|
6882
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
6883
|
-
className: classes.expander,
|
|
6884
|
-
onClick: function onClick() {
|
|
6885
|
-
return setOpen(!open);
|
|
6886
|
-
},
|
|
6887
|
-
children: [open && /*#__PURE__*/jsx(ArrowBackIosIcon, {}), !open && /*#__PURE__*/jsx(ArrowForwardIosIcon, {})]
|
|
6888
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
6889
|
-
variant: "h5",
|
|
6890
|
-
children: (data === null || data === void 0 ? void 0 : data.name) || ''
|
|
6891
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
6892
|
-
className: classes.scrollWrapper,
|
|
6893
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
6894
|
-
component: "div",
|
|
6895
|
-
children: /*#__PURE__*/jsx("div", {
|
|
6896
|
-
dangerouslySetInnerHTML: {
|
|
6897
|
-
__html: (data === null || data === void 0 ? void 0 : data.description) || ''
|
|
6898
|
-
}
|
|
6899
|
-
})
|
|
6900
|
-
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
6901
|
-
return /*#__PURE__*/jsxs("div", {
|
|
6902
|
-
className: classes.document,
|
|
6903
|
-
children: [/*#__PURE__*/jsx(PictureAsPdfIcon, {}), /*#__PURE__*/jsx(Typography, {
|
|
6904
|
-
children: /*#__PURE__*/jsx(Link, {
|
|
6905
|
-
href: d.url,
|
|
6906
|
-
download: true,
|
|
6907
|
-
target: "_blank",
|
|
6908
|
-
children: d.name
|
|
6909
|
-
})
|
|
6910
|
-
})]
|
|
6911
|
-
}, i);
|
|
6912
|
-
})]
|
|
6913
|
-
})]
|
|
6914
|
-
})
|
|
6915
|
-
});
|
|
6916
|
-
}
|
|
6917
|
-
var useStyles$4 = makeStyles(function (theme) {
|
|
6918
|
-
return {
|
|
6919
|
-
root: {
|
|
6920
|
-
position: 'absolute',
|
|
6921
|
-
height: '100%',
|
|
6922
|
-
width: '500px',
|
|
6923
|
-
overflow: 'hidden'
|
|
6924
|
-
},
|
|
6925
|
-
paper: {
|
|
6926
|
-
display: 'flex',
|
|
6927
|
-
width: '300px',
|
|
6928
|
-
minHeight: '60px',
|
|
6929
|
-
maxHeight: 'calc(100% - 150px - 300px)',
|
|
6930
|
-
flexDirection: 'column',
|
|
6931
|
-
justifyContent: 'center',
|
|
6932
|
-
position: 'absolute',
|
|
6933
|
-
top: 150,
|
|
6934
|
-
left: 0,
|
|
6935
|
-
zIndex: 3,
|
|
6936
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
6937
|
-
transition: 'all 0.4s ease-in-out 0s',
|
|
6938
|
-
borderRadius: '0 4px 4px 0',
|
|
6939
|
-
padding: '1rem',
|
|
6940
|
-
'&.hide': {
|
|
6941
|
-
left: 'calc(-300px + -2rem)'
|
|
6942
|
-
}
|
|
6943
|
-
},
|
|
6944
|
-
scrollWrapper: {
|
|
6945
|
-
overflow: 'auto'
|
|
6946
|
-
},
|
|
6947
|
-
expander: {
|
|
6948
|
-
display: 'flex',
|
|
6949
|
-
alignItems: 'center',
|
|
6950
|
-
justifyContent: 'center',
|
|
6951
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
6952
|
-
width: 30,
|
|
6953
|
-
height: 40,
|
|
6954
|
-
right: '-30px',
|
|
6955
|
-
top: 10,
|
|
6956
|
-
zIndex: 10,
|
|
6957
|
-
position: 'absolute',
|
|
6958
|
-
boxShadow: '2px 0px 5px 0px rgba(0,0,0,0.2)',
|
|
6959
|
-
borderRadius: '0 4px 4px 0',
|
|
6960
|
-
'&:hover': {
|
|
6961
|
-
cursor: 'pointer'
|
|
6962
|
-
}
|
|
6963
|
-
},
|
|
6964
|
-
document: {
|
|
6965
|
-
display: 'flex',
|
|
6966
|
-
'& svg': {
|
|
6967
|
-
marginRight: '10px'
|
|
6968
|
-
}
|
|
6969
|
-
}
|
|
6970
|
-
};
|
|
6971
|
-
});
|
|
6915
|
+
var wrapper$6 = "wrapper-fSL18";
|
|
6916
|
+
var title$2 = "title-iTDPA";
|
|
6917
|
+
var descriptionContainer$1 = "description-container-k1vLT";
|
|
6918
|
+
var modelTitle = "model-title-Sgm-0";
|
|
6919
|
+
var description = "description-GyPZq";
|
|
6920
|
+
var pdf = "pdf-oNnao";
|
|
6921
|
+
var hidden = "hidden-xYPOr";
|
|
6922
|
+
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";
|
|
6923
|
+
styleInject(css_248z$9);
|
|
6972
6924
|
|
|
6973
|
-
|
|
6974
|
-
|
|
6925
|
+
var _excluded$6 = ["data", "text"];
|
|
6926
|
+
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; }
|
|
6927
|
+
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; }
|
|
6928
|
+
function Description$1 (_ref) {
|
|
6975
6929
|
var data = _ref.data,
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
hide = _ref.hide,
|
|
6979
|
-
loading = _ref.loading;
|
|
6930
|
+
text = _ref.text,
|
|
6931
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
6980
6932
|
var _useTranslation = useTranslation(),
|
|
6981
6933
|
t = _useTranslation.t;
|
|
6982
|
-
|
|
6983
|
-
var
|
|
6984
|
-
return (data === null || data === void 0 ? void 0 : data.images.map(function () {
|
|
6985
|
-
return /*#__PURE__*/React.createRef();
|
|
6986
|
-
})) || [];
|
|
6987
|
-
}, [data]);
|
|
6988
|
-
var classes = useStyles$3();
|
|
6989
|
-
var _useState = useState(false),
|
|
6934
|
+
//hiden is only for smaller devices relevant
|
|
6935
|
+
var _useState = useState(true),
|
|
6990
6936
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
}
|
|
7001
|
-
}, [selected, open]);
|
|
7002
|
-
return /*#__PURE__*/jsx("div", {
|
|
7003
|
-
className: classes.root,
|
|
7004
|
-
children: /*#__PURE__*/jsxs(Paper, {
|
|
7005
|
-
className: "".concat(classes.paper, " ").concat(open ? '' : 'hide'),
|
|
7006
|
-
elevation: 4,
|
|
7007
|
-
onWheel: function onWheel(e) {
|
|
7008
|
-
return listRef.current.scrollLeft = listRef.current.scrollLeft + e.deltaY * 10;
|
|
7009
|
-
},
|
|
7010
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
7011
|
-
className: classes.expander,
|
|
6937
|
+
isHidden = _useState2[0],
|
|
6938
|
+
setIsHidden = _useState2[1];
|
|
6939
|
+
return /*#__PURE__*/jsxs("div", _objectSpread$o(_objectSpread$o({}, props), {}, {
|
|
6940
|
+
className: classnames(wrapper$6, isHidden ? hidden : undefined, props.className),
|
|
6941
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6942
|
+
className: title$2,
|
|
6943
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
6944
|
+
children: t(text)
|
|
6945
|
+
}), /*#__PURE__*/jsx(IconButton$1, {
|
|
7012
6946
|
onClick: function onClick() {
|
|
7013
|
-
return
|
|
7014
|
-
},
|
|
7015
|
-
children: [!open && /*#__PURE__*/jsx(ExpandLess, {}), open && /*#__PURE__*/jsx(ExpandMore, {}), /*#__PURE__*/jsx(Typography$1, {
|
|
7016
|
-
variant: "button",
|
|
7017
|
-
style: {
|
|
7018
|
-
padding: '0 15px 0 5px'
|
|
7019
|
-
},
|
|
7020
|
-
children: t('info.buttons.images')
|
|
7021
|
-
})]
|
|
7022
|
-
}), /*#__PURE__*/jsxs(GridList, {
|
|
7023
|
-
ref: listRef,
|
|
7024
|
-
cols: (data === null || data === void 0 || (_data$images = data.images) === null || _data$images === void 0 ? void 0 : _data$images.length) == 1 ? 1 : 2,
|
|
7025
|
-
className: classes.gridList,
|
|
7026
|
-
style: {
|
|
7027
|
-
margin: 0
|
|
6947
|
+
return setIsHidden(!isHidden);
|
|
7028
6948
|
},
|
|
7029
|
-
children:
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
className: classes.gridTile,
|
|
7045
|
-
children: /*#__PURE__*/jsx("div", {
|
|
7046
|
-
style: {
|
|
7047
|
-
height: 120,
|
|
7048
|
-
width: 160
|
|
7049
|
-
}
|
|
6949
|
+
children: /*#__PURE__*/jsx(InfoRounded, {})
|
|
6950
|
+
})]
|
|
6951
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6952
|
+
className: descriptionContainer$1,
|
|
6953
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
6954
|
+
className: modelTitle,
|
|
6955
|
+
children: data.name
|
|
6956
|
+
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
6957
|
+
return /*#__PURE__*/jsx("div", {
|
|
6958
|
+
className: pdf,
|
|
6959
|
+
children: /*#__PURE__*/jsx(Link, {
|
|
6960
|
+
href: d.url,
|
|
6961
|
+
download: true,
|
|
6962
|
+
target: "_blank",
|
|
6963
|
+
children: d.name
|
|
7050
6964
|
})
|
|
7051
|
-
}
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
className: classes.gridTile,
|
|
7058
|
-
children: /*#__PURE__*/jsx(Card, {
|
|
7059
|
-
className: "".concat(classes.card, " ").concat(selected == i ? 'selected' : ''),
|
|
7060
|
-
children: /*#__PURE__*/jsx(CardActionArea, {
|
|
7061
|
-
className: classes.cardActionArea,
|
|
7062
|
-
onClick: function onClick() {
|
|
7063
|
-
return setSelected(i);
|
|
7064
|
-
},
|
|
7065
|
-
children: /*#__PURE__*/jsx(CardMedia, {
|
|
7066
|
-
className: classes.cardMedia,
|
|
7067
|
-
image: getImageOrFallbackUrl(img.thumbUrl)
|
|
7068
|
-
})
|
|
7069
|
-
})
|
|
7070
|
-
})
|
|
7071
|
-
}, i)
|
|
7072
|
-
);
|
|
7073
|
-
}))]
|
|
6965
|
+
}, i);
|
|
6966
|
+
}), data.description && /*#__PURE__*/jsx("div", {
|
|
6967
|
+
className: description,
|
|
6968
|
+
dangerouslySetInnerHTML: {
|
|
6969
|
+
__html: data.description
|
|
6970
|
+
}
|
|
7074
6971
|
})]
|
|
6972
|
+
})]
|
|
6973
|
+
}));
|
|
6974
|
+
}
|
|
6975
|
+
|
|
6976
|
+
var container = "container-Sr3pC";
|
|
6977
|
+
var icon$1 = "icon-0h-39";
|
|
6978
|
+
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";
|
|
6979
|
+
styleInject(css_248z$8);
|
|
6980
|
+
|
|
6981
|
+
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; }
|
|
6982
|
+
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; }
|
|
6983
|
+
function ArticleSvg (props) {
|
|
6984
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
6985
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6986
|
+
viewBox: "0 0 24 24",
|
|
6987
|
+
children: /*#__PURE__*/jsx("path", {
|
|
6988
|
+
fill: "currentColor",
|
|
6989
|
+
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
|
|
7075
6990
|
})
|
|
7076
|
-
});
|
|
6991
|
+
}));
|
|
7077
6992
|
}
|
|
7078
|
-
var useStyles$3 = makeStyles(function (theme) {
|
|
7079
|
-
return {
|
|
7080
|
-
root: {
|
|
7081
|
-
position: 'absolute',
|
|
7082
|
-
bottom: 0,
|
|
7083
|
-
height: '300px',
|
|
7084
|
-
width: '100%',
|
|
7085
|
-
overflow: 'hidden'
|
|
7086
|
-
},
|
|
7087
|
-
paper: {
|
|
7088
|
-
display: 'flex',
|
|
7089
|
-
width: '100%',
|
|
7090
|
-
justifyContent: 'center',
|
|
7091
|
-
position: 'absolute',
|
|
7092
|
-
bottom: 0,
|
|
7093
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7094
|
-
transition: 'all 0.4s ease-in-out 0s',
|
|
7095
|
-
'&.hide': {
|
|
7096
|
-
bottom: '-199px'
|
|
7097
|
-
}
|
|
7098
|
-
},
|
|
7099
|
-
expander: {
|
|
7100
|
-
display: 'flex',
|
|
7101
|
-
alignItems: 'center',
|
|
7102
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7103
|
-
height: 40,
|
|
7104
|
-
top: '-40px',
|
|
7105
|
-
right: 24,
|
|
7106
|
-
zIndex: 10,
|
|
7107
|
-
position: 'absolute',
|
|
7108
|
-
boxShadow: '2px -2px 5px -1px rgba(0,0,0,0.2),0px -2px 5px 0px rgba(0,0,0,0.2)',
|
|
7109
|
-
borderRadius: '4px 4px 0 0',
|
|
7110
|
-
'&:hover': {
|
|
7111
|
-
cursor: 'pointer'
|
|
7112
|
-
}
|
|
7113
|
-
},
|
|
7114
|
-
gridList: {
|
|
7115
|
-
flexWrap: 'nowrap',
|
|
7116
|
-
// Promote the list into his own layer on Chrome. This cost memory but helps keeping high FPS.
|
|
7117
|
-
transform: 'translateZ(0)'
|
|
7118
|
-
},
|
|
7119
|
-
gridTile: {
|
|
7120
|
-
flexShrink: 'initial',
|
|
7121
|
-
height: '100%'
|
|
7122
|
-
},
|
|
7123
|
-
card: {
|
|
7124
|
-
height: 120,
|
|
7125
|
-
width: 160,
|
|
7126
|
-
margin: '15px 5px',
|
|
7127
|
-
display: 'flex',
|
|
7128
|
-
alignItems: 'stretch',
|
|
7129
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7130
|
-
'&.selected': {
|
|
7131
|
-
border: '1px solid #4B4B4B'
|
|
7132
|
-
}
|
|
7133
|
-
},
|
|
7134
|
-
cardActionArea: {
|
|
7135
|
-
display: 'flex',
|
|
7136
|
-
flexDirection: 'column',
|
|
7137
|
-
justifyContent: 'start'
|
|
7138
|
-
},
|
|
7139
|
-
cardMedia: {
|
|
7140
|
-
height: '100%',
|
|
7141
|
-
width: '100%',
|
|
7142
|
-
backgroundSize: 'auto 100%'
|
|
7143
|
-
}
|
|
7144
|
-
};
|
|
7145
|
-
});
|
|
7146
6993
|
|
|
7147
|
-
function
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
children:
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
index: selected,
|
|
7160
|
-
onChange: function onChange(next) {
|
|
7161
|
-
if (next !== selected) {
|
|
7162
|
-
setSelected(next);
|
|
7163
|
-
}
|
|
7164
|
-
},
|
|
7165
|
-
children: data === null || data === void 0 ? void 0 : data.images.map(function (img, i) {
|
|
7166
|
-
return /*#__PURE__*/jsx("div", {
|
|
7167
|
-
style: {
|
|
7168
|
-
backgroundImage: "url(".concat(getImageOrFallbackUrl(img.url), ")")
|
|
7169
|
-
},
|
|
7170
|
-
className: classes.image,
|
|
7171
|
-
onWheel: function onWheel(e) {
|
|
7172
|
-
return setSelected(getNext(e.deltaY, selected, data.images.length));
|
|
7173
|
-
},
|
|
7174
|
-
onClick: onClick
|
|
7175
|
-
}, i);
|
|
7176
|
-
})
|
|
7177
|
-
}), /*#__PURE__*/jsx("div", {
|
|
7178
|
-
style: {
|
|
7179
|
-
height: '100px'
|
|
7180
|
-
}
|
|
7181
|
-
})]
|
|
7182
|
-
});
|
|
6994
|
+
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; }
|
|
6995
|
+
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; }
|
|
6996
|
+
function EmptyPlanningSvg (props) {
|
|
6997
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
6998
|
+
viewBox: "0 0 24 24",
|
|
6999
|
+
fill: "none",
|
|
7000
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7001
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7002
|
+
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",
|
|
7003
|
+
fill: "currentColor"
|
|
7004
|
+
})
|
|
7005
|
+
}));
|
|
7183
7006
|
}
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7007
|
+
|
|
7008
|
+
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; }
|
|
7009
|
+
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; }
|
|
7010
|
+
function VarinatPlanningSvg (props) {
|
|
7011
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
7012
|
+
viewBox: "0 0 24 24",
|
|
7013
|
+
fill: "none",
|
|
7014
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7015
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7016
|
+
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",
|
|
7017
|
+
stroke: "currentColor",
|
|
7018
|
+
strokeWidth: "1.5",
|
|
7019
|
+
strokeLinecap: "round",
|
|
7020
|
+
strokeLinejoin: "round"
|
|
7021
|
+
})
|
|
7022
|
+
}));
|
|
7187
7023
|
}
|
|
7188
|
-
var useStyles$2 = makeStyles(function (theme) {
|
|
7189
|
-
return {
|
|
7190
|
-
carousel: {
|
|
7191
|
-
flex: 1,
|
|
7192
|
-
display: 'flex',
|
|
7193
|
-
flexDirection: 'column',
|
|
7194
|
-
'& div.CarouselItem': {
|
|
7195
|
-
flex: 1,
|
|
7196
|
-
display: 'flex',
|
|
7197
|
-
'& div': {
|
|
7198
|
-
height: '100%',
|
|
7199
|
-
width: '100%'
|
|
7200
|
-
}
|
|
7201
|
-
}
|
|
7202
|
-
},
|
|
7203
|
-
image: {
|
|
7204
|
-
backgroundRepeat: 'no-repeat',
|
|
7205
|
-
backgroundPosition: 'center',
|
|
7206
|
-
backgroundSize: 'auto 100%',
|
|
7207
|
-
marginTop: '10px'
|
|
7208
|
-
}
|
|
7209
|
-
};
|
|
7210
|
-
});
|
|
7211
7024
|
|
|
7212
|
-
function
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7025
|
+
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; }
|
|
7026
|
+
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; }
|
|
7027
|
+
function NavBackSvg (props) {
|
|
7028
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
7029
|
+
viewBox: "0 0 10 18",
|
|
7030
|
+
fill: "none",
|
|
7031
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7032
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7033
|
+
d: "M9 1L1 9L9 17",
|
|
7034
|
+
stroke: "currentColor",
|
|
7035
|
+
strokeWidth: "1.5",
|
|
7036
|
+
strokeLinecap: "round",
|
|
7037
|
+
strokeLinejoin: "round"
|
|
7038
|
+
})
|
|
7039
|
+
}));
|
|
7040
|
+
}
|
|
7041
|
+
|
|
7042
|
+
function NavBar (buttons) {
|
|
7220
7043
|
var _useTranslation = useTranslation(),
|
|
7221
7044
|
t = _useTranslation.t;
|
|
7222
|
-
var
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
className: classes.button,
|
|
7230
|
-
disabled: !hasArticles,
|
|
7045
|
+
var varinatArticles = !buttons.planner ? 'contained' : 'outlined';
|
|
7046
|
+
var varinatVarinats = !buttons.articles && !buttons.planner ? 'contained' : 'outlined';
|
|
7047
|
+
var variantPlanner = 'contained';
|
|
7048
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7049
|
+
className: container,
|
|
7050
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
7051
|
+
variant: "outlined",
|
|
7231
7052
|
color: "primary",
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7053
|
+
startIcon: /*#__PURE__*/jsx(NavBackSvg, {
|
|
7054
|
+
className: icon$1
|
|
7055
|
+
}),
|
|
7056
|
+
onClick: function onClick() {
|
|
7057
|
+
return buttons.navigateBack();
|
|
7058
|
+
}
|
|
7236
7059
|
}), /*#__PURE__*/jsx(Button, {
|
|
7237
|
-
|
|
7238
|
-
|
|
7060
|
+
id: "diva-seller-info-openarticlesbtn",
|
|
7061
|
+
variant: varinatArticles,
|
|
7239
7062
|
color: "primary",
|
|
7240
|
-
|
|
7063
|
+
startIcon: /*#__PURE__*/jsx(ArticleSvg, {
|
|
7064
|
+
className: icon$1
|
|
7065
|
+
}),
|
|
7241
7066
|
onClick: function onClick() {
|
|
7242
|
-
return
|
|
7067
|
+
return buttons.articles();
|
|
7243
7068
|
},
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
disabled: !hasPlanner,
|
|
7069
|
+
children: t('info.buttons.articles')
|
|
7070
|
+
}), buttons.variantsPlanner && /*#__PURE__*/jsx(Button, {
|
|
7071
|
+
id: "diva-seller-info-openfavplannerbtn",
|
|
7072
|
+
variant: varinatVarinats,
|
|
7249
7073
|
color: "primary",
|
|
7250
|
-
|
|
7074
|
+
startIcon: /*#__PURE__*/jsx(VarinatPlanningSvg, {
|
|
7075
|
+
className: icon$1
|
|
7076
|
+
}),
|
|
7251
7077
|
onClick: function onClick() {
|
|
7252
|
-
return
|
|
7078
|
+
return buttons.variantsPlanner();
|
|
7253
7079
|
},
|
|
7254
7080
|
children: t('info.buttons.varinats')
|
|
7255
|
-
}),
|
|
7256
|
-
|
|
7257
|
-
|
|
7081
|
+
}), buttons.planner && /*#__PURE__*/jsx(Button, {
|
|
7082
|
+
id: "diva-seller-info-openplannerbtn",
|
|
7083
|
+
variant: variantPlanner,
|
|
7258
7084
|
color: "primary",
|
|
7259
|
-
|
|
7085
|
+
startIcon: /*#__PURE__*/jsx(EmptyPlanningSvg, {
|
|
7086
|
+
className: icon$1
|
|
7087
|
+
}),
|
|
7260
7088
|
onClick: function onClick() {
|
|
7261
|
-
return
|
|
7089
|
+
return buttons.planner();
|
|
7262
7090
|
},
|
|
7263
|
-
children: t('info.buttons.
|
|
7091
|
+
children: t('info.buttons.configurator')
|
|
7264
7092
|
})]
|
|
7265
7093
|
});
|
|
7266
7094
|
}
|
|
7267
|
-
var useStyles$1 = makeStyles(function (theme) {
|
|
7268
|
-
return {
|
|
7269
|
-
toolbar: {
|
|
7270
|
-
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%)',
|
|
7271
|
-
zIndex: 10,
|
|
7272
|
-
padding: '12px 0'
|
|
7273
|
-
},
|
|
7274
|
-
spacer: {
|
|
7275
|
-
flex: 1
|
|
7276
|
-
},
|
|
7277
|
-
button: {
|
|
7278
|
-
margin: '0 10px'
|
|
7279
|
-
}
|
|
7280
|
-
};
|
|
7281
|
-
});
|
|
7282
|
-
|
|
7283
|
-
var LOG$4 = getLogger('Seller', 'Info');
|
|
7284
|
-
function Info$1(_ref) {
|
|
7285
|
-
var accountId = _ref.accountId,
|
|
7286
|
-
catalogCodex = _ref.catalogCodex;
|
|
7287
|
-
var _useTranslation = useTranslation(),
|
|
7288
|
-
t = _useTranslation.t,
|
|
7289
|
-
i18n = _useTranslation.i18n;
|
|
7290
|
-
var _useState = useState(),
|
|
7291
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7292
|
-
data = _useState2[0],
|
|
7293
|
-
setData = _useState2[1];
|
|
7294
|
-
var _useState3 = useState(true),
|
|
7295
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
7296
|
-
loading = _useState4[0],
|
|
7297
|
-
setLoading = _useState4[1];
|
|
7298
|
-
var _useSellerState = useSellerState(),
|
|
7299
|
-
_useSellerState$actio = _useSellerState.actions,
|
|
7300
|
-
loadCatalogInfo = _useSellerState$actio.loadCatalogInfo,
|
|
7301
|
-
openPlanner = _useSellerState$actio.openPlanner,
|
|
7302
|
-
openComponent = _useSellerState$actio.openComponent,
|
|
7303
|
-
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
7304
|
-
_useSellerState$state = _useSellerState.state,
|
|
7305
|
-
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
7306
|
-
catalogs = _useSellerState$state.catalogs;
|
|
7307
|
-
_useSellerState$state.currentUser;
|
|
7308
|
-
var currentBasketState = _useSellerState$state.currentBasketState,
|
|
7309
|
-
configurationData = _useSellerState$state.configurationData,
|
|
7310
|
-
returnTo = _useSellerState$state.returnTo,
|
|
7311
|
-
sessionGuid = _useSellerState$state.sessionGuid;
|
|
7312
|
-
var _useState5 = useState(0),
|
|
7313
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7314
|
-
selected = _useState6[0],
|
|
7315
|
-
setSelected = _useState6[1];
|
|
7316
|
-
var _useState7 = useState(false),
|
|
7317
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
7318
|
-
hideAll = _useState8[0],
|
|
7319
|
-
setHideAll = _useState8[1];
|
|
7320
|
-
var _useDivaCore = useDivaCore(),
|
|
7321
|
-
_useDivaCore$actions = _useDivaCore.actions,
|
|
7322
|
-
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
7323
|
-
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
7324
|
-
organization = _useDivaCore.state.organization;
|
|
7325
|
-
useEffect(function () {
|
|
7326
|
-
LOG$4.businessEvent('onOpenModule', 'SellerCatalogInfo', "Open Catalog Info", {
|
|
7327
|
-
cat: catalogCodex,
|
|
7328
|
-
accountId: accountId
|
|
7329
|
-
});
|
|
7330
|
-
}, []);
|
|
7331
|
-
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7332
|
-
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7333
|
-
openPlanner({
|
|
7334
|
-
catalogCodex: catalogCodex,
|
|
7335
|
-
accountId: accountId,
|
|
7336
|
-
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7337
|
-
forceReload: '1',
|
|
7338
|
-
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7339
|
-
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'
|
|
7340
|
-
});
|
|
7341
|
-
} else {
|
|
7342
|
-
LOG$4.error(new DivaError('Missing account login ID', {
|
|
7343
|
-
code: 'SELLER_0001'
|
|
7344
|
-
}));
|
|
7345
|
-
}
|
|
7346
|
-
}, [openPlanner, catalogs, currentAccountLoginId]);
|
|
7347
|
-
var _onOpenArticles = useCallback(function () {
|
|
7348
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7349
|
-
openComponent({
|
|
7350
|
-
type: 'SELLER',
|
|
7351
|
-
parameters: {
|
|
7352
|
-
module: 'Articles',
|
|
7353
|
-
accountId: accountId,
|
|
7354
|
-
catalogCodex: catalogCodex
|
|
7355
|
-
}
|
|
7356
|
-
});
|
|
7357
|
-
} else {
|
|
7358
|
-
LOG$4.error(new DivaError('Missing account ID or catalog', {
|
|
7359
|
-
code: 'SELLER_0001'
|
|
7360
|
-
}));
|
|
7361
|
-
}
|
|
7362
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7363
|
-
useEffect(function () {
|
|
7364
|
-
var load = /*#__PURE__*/function () {
|
|
7365
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
7366
|
-
var accountSessionId, _catalogInfoData$, catalogInfoData;
|
|
7367
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7368
|
-
while (1) switch (_context.prev = _context.next) {
|
|
7369
|
-
case 0:
|
|
7370
|
-
setLoading(true);
|
|
7371
|
-
toggleLoading('seller-model-info', false, true);
|
|
7372
|
-
accountSessionId = undefined;
|
|
7373
|
-
if (!(organization.type === 'RETAILER')) {
|
|
7374
|
-
_context.next = 12;
|
|
7375
|
-
break;
|
|
7376
|
-
}
|
|
7377
|
-
if (accountId) {
|
|
7378
|
-
_context.next = 9;
|
|
7379
|
-
break;
|
|
7380
|
-
}
|
|
7381
|
-
LOG$4.error(new DivaError('Missing account ID', {
|
|
7382
|
-
code: 'SELLER_0001'
|
|
7383
|
-
}));
|
|
7384
|
-
setLoading(false);
|
|
7385
|
-
toggleLoading('seller-model-info', false, false);
|
|
7386
|
-
return _context.abrupt("return");
|
|
7387
|
-
case 9:
|
|
7388
|
-
_context.next = 11;
|
|
7389
|
-
return checkAccountLogin({
|
|
7390
|
-
accountId: accountId
|
|
7391
|
-
});
|
|
7392
|
-
case 11:
|
|
7393
|
-
accountSessionId = _context.sent;
|
|
7394
|
-
case 12:
|
|
7395
|
-
if (!catalogCodex) {
|
|
7396
|
-
_context.next = 18;
|
|
7397
|
-
break;
|
|
7398
|
-
}
|
|
7399
|
-
_context.next = 15;
|
|
7400
|
-
return loadCatalogInfo({
|
|
7401
|
-
catalogCodex: catalogCodex,
|
|
7402
|
-
accountSessionId: accountSessionId,
|
|
7403
|
-
accountId: accountId,
|
|
7404
|
-
language: i18n.language || 'en'
|
|
7405
|
-
});
|
|
7406
|
-
case 15:
|
|
7407
|
-
catalogInfoData = _context.sent;
|
|
7408
|
-
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')) {
|
|
7409
|
-
catalogInfoData !== null && catalogInfoData !== void 0 && catalogInfoData[0].hasPlanner ? onOpenPlanner(accountSessionId) : _onOpenArticles();
|
|
7410
|
-
}
|
|
7411
|
-
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
7412
|
-
case 18:
|
|
7413
|
-
setLoading(false);
|
|
7414
|
-
toggleLoading('seller-model-info', false, false);
|
|
7415
|
-
case 20:
|
|
7416
|
-
case "end":
|
|
7417
|
-
return _context.stop();
|
|
7418
|
-
}
|
|
7419
|
-
}, _callee);
|
|
7420
|
-
}));
|
|
7421
|
-
return function load() {
|
|
7422
|
-
return _ref2.apply(this, arguments);
|
|
7423
|
-
};
|
|
7424
|
-
}();
|
|
7425
|
-
load();
|
|
7426
|
-
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
7427
|
-
return /*#__PURE__*/jsx(Fragment, {
|
|
7428
|
-
children: !loading && /*#__PURE__*/jsxs(Fragment, {
|
|
7429
|
-
children: [/*#__PURE__*/jsx(NavBar$1, {
|
|
7430
|
-
title: /*#__PURE__*/jsx(Title, {
|
|
7431
|
-
text: t('info.title')
|
|
7432
|
-
}),
|
|
7433
|
-
onOpenPlanner: onOpenPlanner,
|
|
7434
|
-
onOpenArticles: function onOpenArticles() {
|
|
7435
|
-
return _onOpenArticles();
|
|
7436
|
-
},
|
|
7437
|
-
hasPlanner: (!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && (data === null || data === void 0 ? void 0 : data.hasPlanner),
|
|
7438
|
-
hasArticles: (!!currentAccountLoginId && !!accountId || organization.parentType === 'SUPPLIER') && !!catalogCodex,
|
|
7439
|
-
showVariants: userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator) || returnTo === 'toAssortmentManager' || returnTo === 'toProductsGallery',
|
|
7440
|
-
showSetPlanner: userHasPermission('productcreator')
|
|
7441
|
-
}), /*#__PURE__*/jsx(MainView, {
|
|
7442
|
-
data: data,
|
|
7443
|
-
selected: selected,
|
|
7444
|
-
setSelected: setSelected,
|
|
7445
|
-
onClick: function onClick() {
|
|
7446
|
-
setHideAll(!hideAll);
|
|
7447
|
-
}
|
|
7448
|
-
}), /*#__PURE__*/jsx(Description$2, {
|
|
7449
|
-
data: data,
|
|
7450
|
-
hide: hideAll
|
|
7451
|
-
}), /*#__PURE__*/jsx(ImagesBar, {
|
|
7452
|
-
data: data,
|
|
7453
|
-
selected: selected,
|
|
7454
|
-
setSelected: setSelected,
|
|
7455
|
-
hide: hideAll,
|
|
7456
|
-
loading: loading
|
|
7457
|
-
})]
|
|
7458
|
-
})
|
|
7459
|
-
});
|
|
7460
|
-
}
|
|
7461
|
-
|
|
7462
|
-
var wrapper$7 = "wrapper-fSL18";
|
|
7463
|
-
var title$2 = "title-iTDPA";
|
|
7464
|
-
var subTitle = "subTitle-4-0PW";
|
|
7465
|
-
var descriptionContainer$1 = "description-container-k1vLT";
|
|
7466
|
-
var modelTitle = "model-title-Sgm-0";
|
|
7467
|
-
var description = "description-GyPZq";
|
|
7468
|
-
var pdf = "pdf-oNnao";
|
|
7469
|
-
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";
|
|
7470
|
-
styleInject(css_248z$9);
|
|
7471
|
-
|
|
7472
|
-
var _excluded$7 = ["data", "text"];
|
|
7473
|
-
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; }
|
|
7474
|
-
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; }
|
|
7475
|
-
getLogger('SellerCatalogInfo', 'Description');
|
|
7476
|
-
function Description$1 (_ref) {
|
|
7477
|
-
var data = _ref.data,
|
|
7478
|
-
text = _ref.text,
|
|
7479
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
7480
|
-
var _useTranslation = useTranslation(),
|
|
7481
|
-
t = _useTranslation.t;
|
|
7482
|
-
return /*#__PURE__*/jsxs("div", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
7483
|
-
className: classNames(wrapper$7, props.className),
|
|
7484
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
7485
|
-
className: title$2,
|
|
7486
|
-
children: t(text)
|
|
7487
|
-
}), /*#__PURE__*/jsx("div", {
|
|
7488
|
-
className: subTitle,
|
|
7489
|
-
children: t('pdp.info')
|
|
7490
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
7491
|
-
className: descriptionContainer$1,
|
|
7492
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
7493
|
-
className: modelTitle,
|
|
7494
|
-
children: data.name
|
|
7495
|
-
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
7496
|
-
return /*#__PURE__*/jsx("div", {
|
|
7497
|
-
className: pdf,
|
|
7498
|
-
children: /*#__PURE__*/jsx(Link, {
|
|
7499
|
-
href: d.url,
|
|
7500
|
-
download: true,
|
|
7501
|
-
target: "_blank",
|
|
7502
|
-
children: d.name
|
|
7503
|
-
})
|
|
7504
|
-
}, i);
|
|
7505
|
-
}), data.description && /*#__PURE__*/jsx("div", {
|
|
7506
|
-
className: description,
|
|
7507
|
-
dangerouslySetInnerHTML: {
|
|
7508
|
-
__html: data.description
|
|
7509
|
-
}
|
|
7510
|
-
})]
|
|
7511
|
-
})]
|
|
7512
|
-
}));
|
|
7513
|
-
}
|
|
7514
|
-
|
|
7515
|
-
var wrapper$6 = "wrapper-oUrTP";
|
|
7516
|
-
var container = "container-Sr3pC";
|
|
7517
|
-
var button = "button-NXyWV";
|
|
7518
|
-
var navBack = "nav-back-AzU6X";
|
|
7519
|
-
var icon$1 = "icon-0h-39";
|
|
7520
|
-
var text = "text-55Zpw";
|
|
7521
|
-
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";
|
|
7522
|
-
styleInject(css_248z$8);
|
|
7523
|
-
|
|
7524
|
-
var _excluded$6 = ["navigateBack", "buttons"];
|
|
7525
|
-
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; }
|
|
7526
|
-
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; }
|
|
7527
|
-
function NavBar (_ref) {
|
|
7528
|
-
var navigateBack = _ref.navigateBack,
|
|
7529
|
-
buttons = _ref.buttons,
|
|
7530
|
-
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
7531
|
-
var _useTranslation = useTranslation(),
|
|
7532
|
-
t = _useTranslation.t;
|
|
7533
|
-
return /*#__PURE__*/jsx("div", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
7534
|
-
className: classNames(wrapper$6, props.className),
|
|
7535
|
-
id: "diva-seller-info-navbar",
|
|
7536
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
7537
|
-
className: container,
|
|
7538
|
-
children: [navigateBack && /*#__PURE__*/jsx("div", {
|
|
7539
|
-
className: classNames(navBack),
|
|
7540
|
-
onClick: navigateBack
|
|
7541
|
-
}), buttons.map(function (button$1) {
|
|
7542
|
-
return /*#__PURE__*/jsxs("div", {
|
|
7543
|
-
className: classNames(button),
|
|
7544
|
-
onClick: button$1.onClick,
|
|
7545
|
-
id: button$1.key,
|
|
7546
|
-
children: [button$1.iconClass && /*#__PURE__*/jsx("div", {
|
|
7547
|
-
className: classNames(icon$1, button$1.iconClass)
|
|
7548
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
7549
|
-
className: classNames(text),
|
|
7550
|
-
children: [" ", t(button$1.text)]
|
|
7551
|
-
})]
|
|
7552
|
-
}, button$1.key);
|
|
7553
|
-
})]
|
|
7554
|
-
})
|
|
7555
|
-
}));
|
|
7556
|
-
}
|
|
7557
7095
|
|
|
7558
7096
|
var layout$1 = "layout-NhUpB";
|
|
7559
|
-
var
|
|
7097
|
+
var content = "content-t8Rtl";
|
|
7098
|
+
var leftSide = "left-side-10jmj";
|
|
7560
7099
|
var rightSide$1 = "right-side-64-Yz";
|
|
7561
|
-
var scrollerContainer = "scroller-container-TAsAz";
|
|
7562
7100
|
var catalogImages = "catalog-images-jJGqW";
|
|
7563
|
-
var productsHidden = "products-hidden-T6mTt";
|
|
7564
|
-
var products = "products-QxoIf";
|
|
7565
7101
|
var footer = "footer-1ONIt";
|
|
7566
|
-
var
|
|
7567
|
-
var favPlanning = "fav-planning-R8cxS";
|
|
7568
|
-
var setPlanning = "set-planning-1AQNC";
|
|
7569
|
-
var articleList = "article-list-uOn26";
|
|
7570
|
-
var analyticsIcon = "analytics-icon-kCv53";
|
|
7571
|
-
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";
|
|
7102
|
+
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";
|
|
7572
7103
|
styleInject(css_248z$7);
|
|
7573
7104
|
|
|
7574
7105
|
var wrapper$5 = "wrapper-D5Cmc";
|
|
7575
7106
|
var thumbs = "thumbs-cWKAj";
|
|
7576
7107
|
var mainSlider = "mainSlider-S8opH";
|
|
7577
|
-
var css_248z$6 = ".wrapper-D5Cmc {\n display: flex;\n position: relative;\n
|
|
7108
|
+
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";
|
|
7578
7109
|
styleInject(css_248z$6);
|
|
7579
7110
|
|
|
7580
7111
|
var _excluded$5 = ["data"];
|
|
@@ -7588,7 +7119,7 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7588
7119
|
var mainSwiperRef = useRef(null);
|
|
7589
7120
|
return /*#__PURE__*/jsxs("div", {
|
|
7590
7121
|
id: "diva-catalog-images",
|
|
7591
|
-
className:
|
|
7122
|
+
className: classnames(wrapper$5, props.className),
|
|
7592
7123
|
children: [/*#__PURE__*/jsx(Swiper, {
|
|
7593
7124
|
ref: mainSwiperRef,
|
|
7594
7125
|
pagination: {
|
|
@@ -7604,7 +7135,8 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7604
7135
|
},
|
|
7605
7136
|
style: {
|
|
7606
7137
|
height: '100%',
|
|
7607
|
-
width: '90%'
|
|
7138
|
+
width: '90%',
|
|
7139
|
+
minWidth: 0
|
|
7608
7140
|
},
|
|
7609
7141
|
className: mainSlider,
|
|
7610
7142
|
children: data.images.map(function (media, index) {
|
|
@@ -7622,14 +7154,18 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7622
7154
|
}), /*#__PURE__*/jsx(Swiper, {
|
|
7623
7155
|
onSwiper: setThumbsSwiper,
|
|
7624
7156
|
spaceBetween: 10,
|
|
7625
|
-
slidesPerView:
|
|
7626
|
-
freeMode:
|
|
7157
|
+
slidesPerView: "auto",
|
|
7158
|
+
freeMode: {
|
|
7159
|
+
sticky: true
|
|
7160
|
+
},
|
|
7161
|
+
mousewheel: true,
|
|
7627
7162
|
direction: "vertical",
|
|
7628
7163
|
watchSlidesProgress: true,
|
|
7629
|
-
modules: [Thumbs, FreeMode],
|
|
7164
|
+
modules: [Thumbs, FreeMode, Mousewheel],
|
|
7630
7165
|
style: {
|
|
7631
7166
|
width: '10%',
|
|
7632
7167
|
marginLeft: '10px',
|
|
7168
|
+
minWidth: '150px',
|
|
7633
7169
|
cursor: 'pointer'
|
|
7634
7170
|
},
|
|
7635
7171
|
className: thumbs,
|
|
@@ -7655,160 +7191,203 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7655
7191
|
};
|
|
7656
7192
|
|
|
7657
7193
|
var wrapper$4 = "wrapper-3d2zl";
|
|
7658
|
-
var
|
|
7194
|
+
var tabBar = "tab-bar-lQQ28";
|
|
7195
|
+
var nothingFound = "nothing-found-0eqZ5";
|
|
7196
|
+
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";
|
|
7659
7197
|
styleInject(css_248z$5);
|
|
7660
7198
|
|
|
7661
|
-
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; }
|
|
7662
|
-
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; }
|
|
7663
|
-
var Products = function Products(_ref) {
|
|
7664
|
-
var catalogCodex = _ref.catalogCodex,
|
|
7665
|
-
onProductClick = _ref.onProductClick,
|
|
7666
|
-
productState = _ref.productState;
|
|
7667
|
-
var _useSellerState = useSellerState(),
|
|
7668
|
-
_useSellerState$state = _useSellerState.state,
|
|
7669
|
-
currentProductId = _useSellerState$state.currentProductId,
|
|
7670
|
-
configurationData = _useSellerState$state.configurationData;
|
|
7671
|
-
var _productState$filter = _slicedToArray(productState.filter, 2),
|
|
7672
|
-
filter = _productState$filter[0],
|
|
7673
|
-
setFilter = _productState$filter[1];
|
|
7674
|
-
useEffect(function () {
|
|
7675
|
-
setFilter(_objectSpread$l(_objectSpread$l({}, filter), {}, {
|
|
7676
|
-
catCodex: {
|
|
7677
|
-
type: 'singleSelect',
|
|
7678
|
-
value: catalogCodex
|
|
7679
|
-
}
|
|
7680
|
-
}));
|
|
7681
|
-
}, []);
|
|
7682
|
-
return /*#__PURE__*/jsx(ProductsComponent, {
|
|
7683
|
-
productState: productState,
|
|
7684
|
-
onClickFunction: onProductClick,
|
|
7685
|
-
curProductId: currentProductId,
|
|
7686
|
-
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7687
|
-
galleryConfig: {
|
|
7688
|
-
hidePrices: true
|
|
7689
|
-
}
|
|
7690
|
-
});
|
|
7691
|
-
};
|
|
7692
|
-
|
|
7693
7199
|
var wrapper$3 = "wrapper-i9mNn";
|
|
7694
7200
|
var searchText = "search-text-grXdY";
|
|
7695
7201
|
var icon = "icon-ydD53";
|
|
7696
|
-
var css_248z$4 = ".wrapper-i9mNn {\n display: flex;\n height:
|
|
7202
|
+
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";
|
|
7697
7203
|
styleInject(css_248z$4);
|
|
7698
7204
|
|
|
7699
7205
|
var Search = function Search(_ref) {
|
|
7700
|
-
var
|
|
7701
|
-
|
|
7702
|
-
|
|
7206
|
+
var searchValue = _ref.searchValue,
|
|
7207
|
+
onSearch = _ref.onSearch,
|
|
7208
|
+
setExpanded = _ref.setExpanded;
|
|
7703
7209
|
var _useTranslation = useTranslation(),
|
|
7704
7210
|
t = _useTranslation.t;
|
|
7705
|
-
var _useState = useState(''),
|
|
7706
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7707
|
-
value = _useState2[0],
|
|
7708
|
-
setValue = _useState2[1];
|
|
7709
|
-
var inputRef = useRef(null);
|
|
7710
|
-
useEffect(function () {
|
|
7711
|
-
if (value && value.length > 2) setSearch(value);else if ((search === null || search === void 0 ? void 0 : search.length) !== 0) {
|
|
7712
|
-
setSearch(undefined);
|
|
7713
|
-
}
|
|
7714
|
-
}, [value]);
|
|
7715
|
-
useEffect(function () {
|
|
7716
|
-
if (!(search !== null && search !== void 0 && search.length)) setValue('');
|
|
7717
|
-
}, [search]);
|
|
7718
7211
|
return /*#__PURE__*/jsxs("div", {
|
|
7719
7212
|
className: wrapper$3,
|
|
7720
|
-
|
|
7721
|
-
|
|
7213
|
+
onClick: function onClick(ev) {
|
|
7214
|
+
return ev.stopPropagation();
|
|
7215
|
+
},
|
|
7216
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
7217
|
+
className: icon
|
|
7218
|
+
}), /*#__PURE__*/jsx(InputBase, {
|
|
7722
7219
|
onChange: function onChange(e) {
|
|
7723
|
-
return
|
|
7220
|
+
return onSearch(e.target.value);
|
|
7724
7221
|
},
|
|
7725
|
-
|
|
7726
|
-
value: value,
|
|
7222
|
+
value: searchValue,
|
|
7727
7223
|
className: searchText,
|
|
7728
|
-
placeholder: t('filter.global')
|
|
7729
|
-
|
|
7730
|
-
|
|
7224
|
+
placeholder: t('filter.global'),
|
|
7225
|
+
onFocus: function onFocus() {
|
|
7226
|
+
return setExpanded(true);
|
|
7227
|
+
}
|
|
7731
7228
|
})]
|
|
7732
7229
|
});
|
|
7733
7230
|
};
|
|
7734
7231
|
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
({
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
}
|
|
7749
|
-
var StyledTab = withStyles$1(function (theme) {
|
|
7750
|
-
return createStyles$1({
|
|
7751
|
-
root: {
|
|
7752
|
-
textTransform: 'none',
|
|
7753
|
-
fontWeight: 'bold',
|
|
7754
|
-
fontSize: theme.typography.pxToRem(15),
|
|
7755
|
-
marginRight: theme.spacing(1)
|
|
7756
|
-
}
|
|
7232
|
+
function NothingFound (_ref) {
|
|
7233
|
+
var text = _ref.text,
|
|
7234
|
+
info = _ref.info;
|
|
7235
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7236
|
+
className: nothingFound,
|
|
7237
|
+
children: [/*#__PURE__*/jsx(Typography$1, {
|
|
7238
|
+
variant: "body2",
|
|
7239
|
+
children: text
|
|
7240
|
+
}), info && /*#__PURE__*/jsx(Alert, {
|
|
7241
|
+
variant: "outlined",
|
|
7242
|
+
severity: "info",
|
|
7243
|
+
children: info
|
|
7244
|
+
})]
|
|
7757
7245
|
});
|
|
7758
|
-
}
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
_ref2.onArticleClick;
|
|
7768
|
-
var productState = _ref2.productState,
|
|
7769
|
-
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
7246
|
+
}
|
|
7247
|
+
|
|
7248
|
+
var ProductsOrArticles = function ProductsOrArticles(_ref) {
|
|
7249
|
+
var _scroller$current, _scroller$current2;
|
|
7250
|
+
var catalogCodex = _ref.catalogCodex,
|
|
7251
|
+
onProductClick = _ref.onProductClick,
|
|
7252
|
+
hideProducts = _ref.hideProducts;
|
|
7253
|
+
var _useSellerState = useSellerState(),
|
|
7254
|
+
configurationData = _useSellerState.state.configurationData;
|
|
7770
7255
|
var _useState = useState(0),
|
|
7771
7256
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7772
|
-
|
|
7773
|
-
|
|
7257
|
+
tab = _useState2[0],
|
|
7258
|
+
setTab = _useState2[1];
|
|
7259
|
+
var _useState3 = useState(false),
|
|
7260
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7261
|
+
expanded = _useState4[0],
|
|
7262
|
+
setExpanded = _useState4[1];
|
|
7263
|
+
var _useState5 = useState(''),
|
|
7264
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7265
|
+
productSearch = _useState6[0],
|
|
7266
|
+
setProductSearch = _useState6[1];
|
|
7267
|
+
var _useState7 = useState(false),
|
|
7268
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7269
|
+
showVZProducts = _useState8[0],
|
|
7270
|
+
setShowVZProducts = _useState8[1];
|
|
7271
|
+
var _useState9 = useState(false),
|
|
7272
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7273
|
+
showFavoriteProducts = _useState10[0],
|
|
7274
|
+
setShowFavoriteProducts = _useState10[1];
|
|
7275
|
+
var favDisabled = hideProducts == true || hideProducts == 'hideFav';
|
|
7276
|
+
var vzDisabled = hideProducts == true || hideProducts == 'hideVZ';
|
|
7277
|
+
var hideAll = !showFavoriteProducts && !showVZProducts;
|
|
7278
|
+
//expand only if there is something to show
|
|
7279
|
+
var shouldExpand = expanded && !hideAll;
|
|
7280
|
+
//tabs are only selectable if both are shown
|
|
7281
|
+
var selectedTab = !showVZProducts ? 1 : tab;
|
|
7774
7282
|
var _useTranslation = useTranslation(),
|
|
7775
7283
|
t = _useTranslation.t;
|
|
7284
|
+
var scroller = useRef(null);
|
|
7285
|
+
var vzProductsState = useProductState$1({
|
|
7286
|
+
parameters: {
|
|
7287
|
+
catCodex: catalogCodex
|
|
7288
|
+
},
|
|
7289
|
+
sort: '{-modelInfoPageWeight}',
|
|
7290
|
+
scroller: (_scroller$current = scroller.current) !== null && _scroller$current !== void 0 ? _scroller$current : undefined,
|
|
7291
|
+
disabled: vzDisabled,
|
|
7292
|
+
onInitialized: function onInitialized(empty) {
|
|
7293
|
+
setShowVZProducts(!empty);
|
|
7294
|
+
if (!empty) setExpanded(true);
|
|
7295
|
+
}
|
|
7296
|
+
});
|
|
7297
|
+
var favoriteProductsState = useProductState$1({
|
|
7298
|
+
parameters: {
|
|
7299
|
+
catCodex: catalogCodex
|
|
7300
|
+
},
|
|
7301
|
+
favorites: true,
|
|
7302
|
+
scroller: (_scroller$current2 = scroller.current) !== null && _scroller$current2 !== void 0 ? _scroller$current2 : undefined,
|
|
7303
|
+
disabled: favDisabled,
|
|
7304
|
+
onInitialized: function onInitialized(empty) {
|
|
7305
|
+
if (!favDisabled) {
|
|
7306
|
+
setShowFavoriteProducts(true);
|
|
7307
|
+
if (!empty) setExpanded(true);
|
|
7308
|
+
}
|
|
7309
|
+
}
|
|
7310
|
+
});
|
|
7776
7311
|
var handleChange = function handleChange(event, newValue) {
|
|
7777
|
-
|
|
7778
|
-
|
|
7312
|
+
vzProductsState.search[1](undefined);
|
|
7313
|
+
favoriteProductsState.search[1](undefined);
|
|
7314
|
+
setProductSearch('');
|
|
7315
|
+
setTab(newValue);
|
|
7316
|
+
if (newValue == selectedTab) {
|
|
7317
|
+
setExpanded(!expanded);
|
|
7318
|
+
} else {
|
|
7319
|
+
setExpanded(true);
|
|
7320
|
+
}
|
|
7321
|
+
event.stopPropagation();
|
|
7779
7322
|
};
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7323
|
+
var handleSearch = function handleSearch(search) {
|
|
7324
|
+
setProductSearch(search);
|
|
7325
|
+
if (selectedTab === 0) {
|
|
7326
|
+
vzProductsState.search[1](search);
|
|
7327
|
+
} else {
|
|
7328
|
+
favoriteProductsState.search[1](search);
|
|
7329
|
+
}
|
|
7330
|
+
};
|
|
7331
|
+
if (hideAll || vzProductsState.loading || favoriteProductsState.loading) return /*#__PURE__*/jsx(Fragment, {});
|
|
7332
|
+
/*#__PURE__*/jsx(ProductsComponent, {
|
|
7333
|
+
productState: vzProductsState,
|
|
7334
|
+
onClickFunction: onProductClick,
|
|
7335
|
+
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7336
|
+
galleryConfig: {
|
|
7337
|
+
hidePrices: true
|
|
7338
|
+
}
|
|
7339
|
+
});
|
|
7340
|
+
var isEmpty = tab == 0 ? vzProductsState.groups.length == 0 : favoriteProductsState.groups.length == 0;
|
|
7341
|
+
return /*#__PURE__*/jsxs(Accordion, {
|
|
7342
|
+
className: wrapper$4,
|
|
7343
|
+
expanded: shouldExpand,
|
|
7344
|
+
onChange: function onChange(_, exp) {
|
|
7345
|
+
return setExpanded(exp);
|
|
7346
|
+
},
|
|
7347
|
+
children: [/*#__PURE__*/jsxs(AccordionSummary, {
|
|
7348
|
+
className: tabBar,
|
|
7349
|
+
expandIcon: /*#__PURE__*/jsx(ExpandMore, {}),
|
|
7350
|
+
children: [/*#__PURE__*/jsxs(Tabs, {
|
|
7351
|
+
value: selectedTab,
|
|
7785
7352
|
onChange: handleChange,
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7353
|
+
children: [showVZProducts && /*#__PURE__*/jsx(Tab, {
|
|
7354
|
+
label: t('info.products.shared'),
|
|
7355
|
+
value: 0
|
|
7356
|
+
}), /*#__PURE__*/jsx(Tab, {
|
|
7357
|
+
label: t('info.products.favorite'),
|
|
7358
|
+
value: 1
|
|
7359
|
+
})]
|
|
7791
7360
|
}), /*#__PURE__*/jsx(Search, {
|
|
7792
|
-
|
|
7361
|
+
searchValue: productSearch,
|
|
7362
|
+
onSearch: handleSearch,
|
|
7363
|
+
setExpanded: setExpanded
|
|
7364
|
+
}, selectedTab)]
|
|
7365
|
+
}), /*#__PURE__*/jsxs(AccordionDetails, {
|
|
7366
|
+
ref: scroller,
|
|
7367
|
+
children: [!isEmpty && /*#__PURE__*/jsx(ProductsComponent, {
|
|
7368
|
+
productState: selectedTab == 0 ? vzProductsState : favoriteProductsState,
|
|
7369
|
+
onClickFunction: onProductClick,
|
|
7370
|
+
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7371
|
+
galleryConfig: {
|
|
7372
|
+
hidePrices: true
|
|
7373
|
+
}
|
|
7374
|
+
}), isEmpty && /*#__PURE__*/jsx(NothingFound, {
|
|
7375
|
+
text: selectedTab == 0 ? t('info.products.novzproducts') : t('info.products.nofavorites'),
|
|
7376
|
+
info: selectedTab == 0 ? undefined : t('info.products.farvoritesinfo')
|
|
7793
7377
|
})]
|
|
7794
|
-
}), /*#__PURE__*/jsx(Products, {
|
|
7795
|
-
catalogCodex: catalogCodex,
|
|
7796
|
-
onProductClick: onProductClick,
|
|
7797
|
-
productState: productState
|
|
7798
7378
|
})]
|
|
7799
|
-
})
|
|
7379
|
+
});
|
|
7800
7380
|
};
|
|
7801
7381
|
|
|
7802
|
-
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; }
|
|
7803
|
-
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; }
|
|
7804
7382
|
var LOG$3 = getLogger('SellerArticles', 'InfoWithProducts');
|
|
7805
|
-
function
|
|
7806
|
-
var _scroller$current;
|
|
7383
|
+
function useModelInfoPage (_ref) {
|
|
7807
7384
|
var accountId = _ref.accountId,
|
|
7808
7385
|
catalogCodex = _ref.catalogCodex;
|
|
7386
|
+
var _useTranslation = useTranslation(),
|
|
7387
|
+
i18n = _useTranslation.i18n;
|
|
7809
7388
|
var _useState = useState(),
|
|
7810
7389
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7811
|
-
|
|
7390
|
+
catalogData = _useState2[0],
|
|
7812
7391
|
setData = _useState2[1];
|
|
7813
7392
|
var _useState3 = useState(true),
|
|
7814
7393
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -7821,10 +7400,7 @@ function Info(_ref) {
|
|
|
7821
7400
|
openComponent = _useSellerState$actio.openComponent,
|
|
7822
7401
|
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
7823
7402
|
_useSellerState$state = _useSellerState.state,
|
|
7824
|
-
sellerIsVisible = _useSellerState$state.sellerIsVisible,
|
|
7825
|
-
currentProductId = _useSellerState$state.currentProductId,
|
|
7826
7403
|
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
7827
|
-
catalogs = _useSellerState$state.catalogs,
|
|
7828
7404
|
currentBasketState = _useSellerState$state.currentBasketState,
|
|
7829
7405
|
configurationData = _useSellerState$state.configurationData,
|
|
7830
7406
|
returnTo = _useSellerState$state.returnTo,
|
|
@@ -7835,121 +7411,7 @@ function Info(_ref) {
|
|
|
7835
7411
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
7836
7412
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
7837
7413
|
userHasPermission = _useDivaCore$actions.userHasPermission;
|
|
7838
|
-
|
|
7839
|
-
i18n = _useTranslation.i18n;
|
|
7840
|
-
var scroller = useRef(null);
|
|
7841
|
-
var productState = useProductState$1({
|
|
7842
|
-
parameters: {},
|
|
7843
|
-
sort: '{-modelInfoPageWeight}',
|
|
7844
|
-
scroller: (_scroller$current = scroller.current) !== null && _scroller$current !== void 0 ? _scroller$current : undefined
|
|
7845
|
-
});
|
|
7846
|
-
useEffect(function () {
|
|
7847
|
-
LOG$3.startTransaction({
|
|
7848
|
-
event: 'onOpenModule',
|
|
7849
|
-
message: 'Open Catalog Info',
|
|
7850
|
-
eventId: 'ON_OPEN_MODULE_INFO',
|
|
7851
|
-
labels: {
|
|
7852
|
-
cat: catalogCodex,
|
|
7853
|
-
accountId: accountId
|
|
7854
|
-
}
|
|
7855
|
-
});
|
|
7856
|
-
}, []);
|
|
7857
|
-
var _useState5 = useState(false),
|
|
7858
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7859
|
-
showProducts = _useState6[0],
|
|
7860
|
-
setShowProducts = _useState6[1];
|
|
7861
|
-
var showImages = !(configurationData !== null && configurationData !== void 0 && configurationData.hideCatalogImagesInModelInfo);
|
|
7862
|
-
useEffect(function () {
|
|
7863
|
-
if (!showProducts && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductsInModelInfo)) {
|
|
7864
|
-
if (productState.groups.length) setShowProducts(true);
|
|
7865
|
-
}
|
|
7866
|
-
}, [productState.groups]);
|
|
7867
|
-
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7868
|
-
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7869
|
-
var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7870
|
-
if (checkDoReturnToProductCreator(plannerReturn)) {
|
|
7871
|
-
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7872
|
-
}
|
|
7873
|
-
openPlanner({
|
|
7874
|
-
catalogCodex: catalogCodex,
|
|
7875
|
-
accountId: accountId,
|
|
7876
|
-
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7877
|
-
forceReload: '1',
|
|
7878
|
-
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7879
|
-
returnTo: plannerReturn
|
|
7880
|
-
});
|
|
7881
|
-
} else {
|
|
7882
|
-
LOG$3.error(new DivaError('Missing account login ID', {
|
|
7883
|
-
code: 'SELLER_0001'
|
|
7884
|
-
}));
|
|
7885
|
-
}
|
|
7886
|
-
}, [openPlanner, catalogs, currentAccountLoginId]);
|
|
7887
|
-
var onOpenArticles = useCallback(function () {
|
|
7888
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7889
|
-
openComponent({
|
|
7890
|
-
type: 'SELLER',
|
|
7891
|
-
parameters: {
|
|
7892
|
-
module: 'Articles',
|
|
7893
|
-
accountId: accountId,
|
|
7894
|
-
catalogCodex: catalogCodex
|
|
7895
|
-
}
|
|
7896
|
-
});
|
|
7897
|
-
} else {
|
|
7898
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7899
|
-
code: 'SELLER_0001'
|
|
7900
|
-
}));
|
|
7901
|
-
}
|
|
7902
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7903
|
-
var onOpenAnalytics = useCallback(function () {
|
|
7904
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7905
|
-
openComponent({
|
|
7906
|
-
type: 'SELLER',
|
|
7907
|
-
parameters: {
|
|
7908
|
-
module: 'InfoAnalytics',
|
|
7909
|
-
accountId: accountId,
|
|
7910
|
-
catalogCodex: catalogCodex
|
|
7911
|
-
}
|
|
7912
|
-
});
|
|
7913
|
-
} else {
|
|
7914
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7915
|
-
code: 'SELLER_0001'
|
|
7916
|
-
}));
|
|
7917
|
-
}
|
|
7918
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7919
|
-
var onArticleClick = function onArticleClick(item) {
|
|
7920
|
-
var plannerReturn = (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7921
|
-
if (checkDoReturnToProductCreator(plannerReturn)) {
|
|
7922
|
-
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7923
|
-
}
|
|
7924
|
-
openPlanner({
|
|
7925
|
-
catalogCodex: item.catalogCodex,
|
|
7926
|
-
articleCodexes: item.articleCodex,
|
|
7927
|
-
forceReload: '1',
|
|
7928
|
-
accountSessionGuid: currentAccountLoginId,
|
|
7929
|
-
accountId: accountId,
|
|
7930
|
-
retailArticleNr: item.retailArticleNr,
|
|
7931
|
-
returnTo: plannerReturn
|
|
7932
|
-
});
|
|
7933
|
-
};
|
|
7934
|
-
var checkDoReturnToProductCreator = function checkDoReturnToProductCreator(plannerReturn) {
|
|
7935
|
-
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
7936
|
-
};
|
|
7937
|
-
var navigateBack = useCallback(function () {
|
|
7938
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7939
|
-
var _data$accountGuid;
|
|
7940
|
-
openComponent({
|
|
7941
|
-
type: 'SELLER',
|
|
7942
|
-
parameters: {
|
|
7943
|
-
module: 'Catalogs',
|
|
7944
|
-
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
|
|
7945
|
-
}
|
|
7946
|
-
});
|
|
7947
|
-
} else {
|
|
7948
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7949
|
-
code: 'SELLER_0001'
|
|
7950
|
-
}));
|
|
7951
|
-
}
|
|
7952
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7414
|
+
useEffect(function () {}, []);
|
|
7953
7415
|
useEffect(function () {
|
|
7954
7416
|
var load = /*#__PURE__*/function () {
|
|
7955
7417
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -7957,59 +7419,76 @@ function Info(_ref) {
|
|
|
7957
7419
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7958
7420
|
while (1) switch (_context.prev = _context.next) {
|
|
7959
7421
|
case 0:
|
|
7422
|
+
LOG$3.startTransaction({
|
|
7423
|
+
event: 'onOpenModule',
|
|
7424
|
+
message: 'Open Catalog Info',
|
|
7425
|
+
eventId: 'ON_OPEN_MODULE_INFO',
|
|
7426
|
+
labels: {
|
|
7427
|
+
cat: catalogCodex,
|
|
7428
|
+
accountId: accountId
|
|
7429
|
+
}
|
|
7430
|
+
});
|
|
7960
7431
|
setLoading(true);
|
|
7961
7432
|
toggleLoading('seller-model-info', false, true);
|
|
7962
7433
|
accountSessionId = undefined;
|
|
7963
7434
|
if (!(organization.type === 'RETAILER')) {
|
|
7964
|
-
_context.next =
|
|
7435
|
+
_context.next = 13;
|
|
7965
7436
|
break;
|
|
7966
7437
|
}
|
|
7967
7438
|
if (accountId) {
|
|
7968
|
-
_context.next =
|
|
7439
|
+
_context.next = 10;
|
|
7969
7440
|
break;
|
|
7970
7441
|
}
|
|
7971
7442
|
LOG$3.errorTransaction('ON_OPEN_MODULE_INFO', 'SELLER_0001', 'Missing account ID', {
|
|
7972
|
-
cat:
|
|
7443
|
+
cat: catalogCodex,
|
|
7973
7444
|
accountId: accountId
|
|
7974
7445
|
});
|
|
7975
7446
|
setLoading(false);
|
|
7976
7447
|
toggleLoading('seller-model-info', false, false);
|
|
7977
7448
|
return _context.abrupt("return");
|
|
7978
|
-
case
|
|
7979
|
-
_context.next =
|
|
7449
|
+
case 10:
|
|
7450
|
+
_context.next = 12;
|
|
7980
7451
|
return checkAccountLogin({
|
|
7981
7452
|
accountId: accountId
|
|
7982
7453
|
});
|
|
7983
|
-
case 11:
|
|
7984
|
-
accountSessionId = _context.sent;
|
|
7985
7454
|
case 12:
|
|
7455
|
+
accountSessionId = _context.sent;
|
|
7456
|
+
case 13:
|
|
7986
7457
|
if (!catalogCodex) {
|
|
7987
|
-
_context.next =
|
|
7458
|
+
_context.next = 21;
|
|
7988
7459
|
break;
|
|
7989
7460
|
}
|
|
7990
|
-
_context.next =
|
|
7461
|
+
_context.next = 16;
|
|
7991
7462
|
return loadCatalogInfo({
|
|
7992
7463
|
catalogCodex: catalogCodex,
|
|
7993
7464
|
accountSessionId: accountSessionId,
|
|
7994
7465
|
accountId: accountId,
|
|
7995
7466
|
language: i18n.language || 'en'
|
|
7996
7467
|
});
|
|
7997
|
-
case
|
|
7468
|
+
case 16:
|
|
7998
7469
|
catalogInfoData = _context.sent;
|
|
7470
|
+
{
|
|
7471
|
+
_context.next = 19;
|
|
7472
|
+
break;
|
|
7473
|
+
}
|
|
7474
|
+
case 19:
|
|
7475
|
+
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
7476
|
+
|
|
7477
|
+
//if there is no relevant catalog information, as a normal seller continue directly to the planner
|
|
7478
|
+
//the productcreator stays regardles on the page, because currently it is only possible to create productvariants from this page
|
|
7999
7479
|
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')) {
|
|
8000
7480
|
if (catalogInfoData !== null && catalogInfoData !== void 0 && catalogInfoData[0].hasPlanner) {
|
|
8001
7481
|
onOpenPlanner(accountSessionId);
|
|
8002
7482
|
}
|
|
8003
7483
|
}
|
|
8004
|
-
|
|
8005
|
-
case 18:
|
|
7484
|
+
case 21:
|
|
8006
7485
|
LOG$3.successTransaction('ON_OPEN_MODULE_INFO', {
|
|
8007
|
-
cat:
|
|
7486
|
+
cat: catalogCodex,
|
|
8008
7487
|
accountId: accountId
|
|
8009
7488
|
});
|
|
8010
7489
|
setLoading(false);
|
|
8011
7490
|
toggleLoading('seller-model-info', false, false);
|
|
8012
|
-
case
|
|
7491
|
+
case 24:
|
|
8013
7492
|
case "end":
|
|
8014
7493
|
return _context.stop();
|
|
8015
7494
|
}
|
|
@@ -8021,121 +7500,137 @@ function Info(_ref) {
|
|
|
8021
7500
|
}();
|
|
8022
7501
|
load();
|
|
8023
7502
|
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
8024
|
-
var
|
|
8025
|
-
|
|
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
|
-
if (userHasPermission('analytics') && configurationData !== null && configurationData !== void 0 && configurationData.analyticsConfig) {
|
|
8063
|
-
navButtons.push({
|
|
8064
|
-
onClick: function onClick() {
|
|
8065
|
-
return onOpenAnalytics();
|
|
8066
|
-
},
|
|
8067
|
-
text: 'info.buttons.analytics',
|
|
8068
|
-
key: 'diva-seller-info-open-analytics',
|
|
8069
|
-
iconClass: analyticsIcon
|
|
8070
|
-
});
|
|
8071
|
-
}
|
|
8072
|
-
var closePdp = function closePdp() {
|
|
8073
|
-
openComponent({
|
|
8074
|
-
type: 'SELLER',
|
|
8075
|
-
parameters: _objectSpread$j(_objectSpread$j({
|
|
8076
|
-
module: 'Info'
|
|
8077
|
-
}, accountId ? {
|
|
8078
|
-
accountId: accountId
|
|
8079
|
-
} : {}), {}, {
|
|
8080
|
-
catalogCodex: catalogCodex
|
|
8081
|
-
}),
|
|
8082
|
-
breadcrumb: true
|
|
8083
|
-
});
|
|
8084
|
-
};
|
|
8085
|
-
var onProductClick = function onProductClick(product) {
|
|
7503
|
+
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7504
|
+
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7505
|
+
var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7506
|
+
if (checkDoReturnToProductCreator(plannerReturn, returnTo)) {
|
|
7507
|
+
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7508
|
+
}
|
|
7509
|
+
openPlanner({
|
|
7510
|
+
catalogCodex: catalogCodex,
|
|
7511
|
+
accountId: accountId,
|
|
7512
|
+
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7513
|
+
forceReload: '1',
|
|
7514
|
+
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7515
|
+
returnTo: plannerReturn
|
|
7516
|
+
});
|
|
7517
|
+
} else {
|
|
7518
|
+
LOG$3.error(new DivaError('Missing account login ID', {
|
|
7519
|
+
code: 'SELLER_0001'
|
|
7520
|
+
}));
|
|
7521
|
+
}
|
|
7522
|
+
}, [currentAccountLoginId, organization.parentType, accountId, catalogCodex, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo, currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket]);
|
|
7523
|
+
var onOpenArticles = useCallback(function () {
|
|
7524
|
+
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7525
|
+
openComponent({
|
|
7526
|
+
type: 'SELLER',
|
|
7527
|
+
parameters: {
|
|
7528
|
+
module: 'Articles',
|
|
7529
|
+
accountId: accountId,
|
|
7530
|
+
catalogCodex: catalogCodex
|
|
7531
|
+
}
|
|
7532
|
+
});
|
|
7533
|
+
} else {
|
|
7534
|
+
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7535
|
+
code: 'SELLER_0001'
|
|
7536
|
+
}));
|
|
7537
|
+
}
|
|
7538
|
+
}, [accountId, catalogCodex, organization.parentType]);
|
|
7539
|
+
var onOpenPlannerWithProduct = useCallback(function (product) {
|
|
8086
7540
|
openPlanner({
|
|
8087
7541
|
accountSessionGuid: currentAccountLoginId,
|
|
8088
7542
|
forceReload: '1',
|
|
8089
7543
|
productId: product._id,
|
|
8090
7544
|
returnTo: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET'
|
|
8091
7545
|
});
|
|
8092
|
-
};
|
|
8093
|
-
var
|
|
8094
|
-
if (
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
7546
|
+
}, [currentAccountLoginId, openPlanner, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo]);
|
|
7547
|
+
var onNavigateBack = useCallback(function () {
|
|
7548
|
+
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7549
|
+
openComponent({
|
|
7550
|
+
type: 'SELLER',
|
|
7551
|
+
parameters: {
|
|
7552
|
+
module: 'Catalogs',
|
|
7553
|
+
collectionId: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule) === 'Catalogs' ? undefined : accountId
|
|
7554
|
+
}
|
|
7555
|
+
});
|
|
7556
|
+
} else {
|
|
7557
|
+
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7558
|
+
code: 'SELLER_0001'
|
|
7559
|
+
}));
|
|
8098
7560
|
}
|
|
8099
|
-
}, []);
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
7561
|
+
}, [accountId, catalogCodex, organization.parentType, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule]);
|
|
7562
|
+
var navButtons = useMemo(function () {
|
|
7563
|
+
var buttons = {
|
|
7564
|
+
articles: function articles() {
|
|
7565
|
+
return onOpenArticles();
|
|
7566
|
+
},
|
|
7567
|
+
navigateBack: function navigateBack() {
|
|
7568
|
+
return onNavigateBack();
|
|
7569
|
+
}
|
|
8104
7570
|
};
|
|
8105
|
-
|
|
7571
|
+
if ((!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && catalogData !== null && catalogData !== void 0 && catalogData.hasPlanner) {
|
|
7572
|
+
buttons.planner = function () {
|
|
7573
|
+
return onOpenPlanner(currentAccountLoginId);
|
|
7574
|
+
};
|
|
7575
|
+
}
|
|
7576
|
+
if ((userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator) || returnTo === 'toAssortmentManager' || returnTo === 'toProductsGallery') && !originProductId) {
|
|
7577
|
+
buttons.variantsPlanner = function () {
|
|
7578
|
+
return onOpenPlanner(undefined, 'FAVORITS_OPEN_SELLER_PRODUCTCREATOR');
|
|
7579
|
+
};
|
|
7580
|
+
}
|
|
7581
|
+
return buttons;
|
|
7582
|
+
}, [catalogData, configurationData, catalogCodex, onNavigateBack, openPlanner, onOpenArticles]);
|
|
7583
|
+
return {
|
|
7584
|
+
loading: loading,
|
|
7585
|
+
catalogData: catalogData,
|
|
7586
|
+
hideImage: configurationData === null || configurationData === void 0 ? void 0 : configurationData.hideCatalogImagesInModelInfo,
|
|
7587
|
+
hideProducts: configurationData === null || configurationData === void 0 ? void 0 : configurationData.hideProductsInModelInfo,
|
|
7588
|
+
navButtons: navButtons,
|
|
7589
|
+
onOpenPlannerWithProduct: onOpenPlannerWithProduct
|
|
7590
|
+
};
|
|
7591
|
+
}
|
|
7592
|
+
function checkDoReturnToProductCreator(plannerReturn, returnTo) {
|
|
7593
|
+
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
7594
|
+
}
|
|
7595
|
+
|
|
7596
|
+
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; }
|
|
7597
|
+
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; }
|
|
7598
|
+
function Info(props) {
|
|
7599
|
+
var _useModelInfoPage = useModelInfoPage(props),
|
|
7600
|
+
loading = _useModelInfoPage.loading,
|
|
7601
|
+
catalogData = _useModelInfoPage.catalogData,
|
|
7602
|
+
hideImage = _useModelInfoPage.hideImage,
|
|
7603
|
+
hideProducts = _useModelInfoPage.hideProducts,
|
|
7604
|
+
navButtons = _useModelInfoPage.navButtons,
|
|
7605
|
+
onOpenPlannerWithProduct = _useModelInfoPage.onOpenPlannerWithProduct;
|
|
7606
|
+
if (loading || !catalogData) {
|
|
7607
|
+
return /*#__PURE__*/jsx("div", {});
|
|
7608
|
+
}
|
|
8106
7609
|
return /*#__PURE__*/jsx(Fragment, {
|
|
8107
|
-
children: !loading &&
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
7610
|
+
children: !loading && /*#__PURE__*/jsxs("div", {
|
|
7611
|
+
className: layout$1,
|
|
7612
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
7613
|
+
className: content,
|
|
8111
7614
|
children: [/*#__PURE__*/jsx(Description$1, {
|
|
8112
|
-
data:
|
|
8113
|
-
className:
|
|
7615
|
+
data: catalogData,
|
|
7616
|
+
className: leftSide,
|
|
8114
7617
|
text: "info.title"
|
|
8115
7618
|
}), /*#__PURE__*/jsxs("div", {
|
|
8116
|
-
className:
|
|
8117
|
-
children: [/*#__PURE__*/
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
hidden: !showProducts,
|
|
8125
|
-
productState: productState,
|
|
8126
|
-
className: products,
|
|
8127
|
-
catalogCodex: catalogCodex,
|
|
8128
|
-
onProductClick: onProductClick,
|
|
8129
|
-
onArticleClick: onArticleClick,
|
|
8130
|
-
accountId: accountId
|
|
8131
|
-
})]
|
|
8132
|
-
}), /*#__PURE__*/jsx(NavBar, {
|
|
8133
|
-
className: footer,
|
|
8134
|
-
navigateBack: navigateBack,
|
|
8135
|
-
buttons: navButtons
|
|
7619
|
+
className: rightSide$1,
|
|
7620
|
+
children: [!hideImage && /*#__PURE__*/jsx(CatalogImages, {
|
|
7621
|
+
data: catalogData,
|
|
7622
|
+
className: catalogImages
|
|
7623
|
+
}), /*#__PURE__*/jsx(ProductsOrArticles, {
|
|
7624
|
+
catalogCodex: catalogData.codex,
|
|
7625
|
+
onProductClick: onOpenPlannerWithProduct,
|
|
7626
|
+
hideProducts: hideProducts
|
|
8136
7627
|
})]
|
|
8137
7628
|
})]
|
|
8138
|
-
})
|
|
7629
|
+
}), /*#__PURE__*/jsx("div", {
|
|
7630
|
+
className: footer,
|
|
7631
|
+
id: "diva-seller-info-navbar",
|
|
7632
|
+
children: /*#__PURE__*/jsx(NavBar, _objectSpread$j({}, navButtons))
|
|
7633
|
+
})]
|
|
8139
7634
|
})
|
|
8140
7635
|
});
|
|
8141
7636
|
}
|
|
@@ -8351,7 +7846,7 @@ function Autocomplete (_ref) {
|
|
|
8351
7846
|
return v === null || v === void 0 ? void 0 : v.label;
|
|
8352
7847
|
}) : typeof o == 'string' ? o : o === null || o === void 0 ? void 0 : o.label;
|
|
8353
7848
|
},
|
|
8354
|
-
|
|
7849
|
+
isOptionEqualToValue: function isOptionEqualToValue(option, value) {
|
|
8355
7850
|
return (option === null || option === void 0 ? void 0 : option.id) == (value === null || value === void 0 ? void 0 : value.id);
|
|
8356
7851
|
},
|
|
8357
7852
|
value: selectedValue,
|
|
@@ -8538,8 +8033,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8538
8033
|
container: true,
|
|
8539
8034
|
spacing: 2,
|
|
8540
8035
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8541
|
-
|
|
8542
|
-
xs: true,
|
|
8036
|
+
size: "grow",
|
|
8543
8037
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8544
8038
|
fullWidth: true,
|
|
8545
8039
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8556,8 +8050,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8556
8050
|
})
|
|
8557
8051
|
})
|
|
8558
8052
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8559
|
-
|
|
8560
|
-
xs: true,
|
|
8053
|
+
size: "grow",
|
|
8561
8054
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8562
8055
|
fullWidth: true,
|
|
8563
8056
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8578,8 +8071,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8578
8071
|
container: true,
|
|
8579
8072
|
spacing: 2,
|
|
8580
8073
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8581
|
-
|
|
8582
|
-
xs: true,
|
|
8074
|
+
size: "grow",
|
|
8583
8075
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8584
8076
|
fullWidth: true,
|
|
8585
8077
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8596,8 +8088,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8596
8088
|
})
|
|
8597
8089
|
})
|
|
8598
8090
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8599
|
-
|
|
8600
|
-
xs: true,
|
|
8091
|
+
size: "grow",
|
|
8601
8092
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8602
8093
|
fullWidth: true,
|
|
8603
8094
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8632,8 +8123,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8632
8123
|
container: true,
|
|
8633
8124
|
spacing: 2,
|
|
8634
8125
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8635
|
-
|
|
8636
|
-
xs: true,
|
|
8126
|
+
size: "grow",
|
|
8637
8127
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8638
8128
|
fullWidth: true,
|
|
8639
8129
|
children: /*#__PURE__*/jsx(ControlledNumberFormat$1, {
|
|
@@ -8658,8 +8148,7 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8658
8148
|
})
|
|
8659
8149
|
})
|
|
8660
8150
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8661
|
-
|
|
8662
|
-
xs: true,
|
|
8151
|
+
size: "grow",
|
|
8663
8152
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8664
8153
|
fullWidth: true,
|
|
8665
8154
|
children: /*#__PURE__*/jsx(ControlledNumberFormat$1, {
|
|
@@ -8860,8 +8349,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8860
8349
|
container: true,
|
|
8861
8350
|
spacing: 2,
|
|
8862
8351
|
children: [/*#__PURE__*/jsx(Grid$1, {
|
|
8863
|
-
|
|
8864
|
-
xs: true,
|
|
8352
|
+
size: "grow",
|
|
8865
8353
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8866
8354
|
fullWidth: true,
|
|
8867
8355
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8879,8 +8367,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8879
8367
|
})
|
|
8880
8368
|
})
|
|
8881
8369
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8882
|
-
|
|
8883
|
-
xs: true,
|
|
8370
|
+
size: "grow",
|
|
8884
8371
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8885
8372
|
fullWidth: true,
|
|
8886
8373
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -8895,8 +8382,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8895
8382
|
})
|
|
8896
8383
|
})
|
|
8897
8384
|
}), /*#__PURE__*/jsx(Grid$1, {
|
|
8898
|
-
|
|
8899
|
-
xs: true,
|
|
8385
|
+
size: "grow",
|
|
8900
8386
|
children: /*#__PURE__*/jsx(FormControl$1, {
|
|
8901
8387
|
fullWidth: true,
|
|
8902
8388
|
children: /*#__PURE__*/jsx(TextField, {
|
|
@@ -9341,11 +8827,13 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9341
8827
|
onClick: function onClick() {
|
|
9342
8828
|
return handleRemoveValue(index, i);
|
|
9343
8829
|
},
|
|
8830
|
+
size: "large",
|
|
9344
8831
|
children: /*#__PURE__*/jsx(Remove, {})
|
|
9345
8832
|
}), i === pair.value.length - 1 && /*#__PURE__*/jsx(IconButton$1, {
|
|
9346
8833
|
onClick: function onClick() {
|
|
9347
8834
|
return handleAddValue(index);
|
|
9348
8835
|
},
|
|
8836
|
+
size: "large",
|
|
9349
8837
|
children: /*#__PURE__*/jsx(Add, {})
|
|
9350
8838
|
})]
|
|
9351
8839
|
}, i);
|
|
@@ -9353,6 +8841,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9353
8841
|
onClick: function onClick() {
|
|
9354
8842
|
return handleAddValue(index);
|
|
9355
8843
|
},
|
|
8844
|
+
size: "large",
|
|
9356
8845
|
children: /*#__PURE__*/jsx(Add, {})
|
|
9357
8846
|
})]
|
|
9358
8847
|
})
|
|
@@ -9380,6 +8869,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9380
8869
|
onClick: function onClick() {
|
|
9381
8870
|
return handleRemoveArrayOrObject(index, arrayIndex);
|
|
9382
8871
|
},
|
|
8872
|
+
size: "large",
|
|
9383
8873
|
children: /*#__PURE__*/jsx(Delete, {})
|
|
9384
8874
|
})]
|
|
9385
8875
|
}), /*#__PURE__*/jsxs(CardContent, {
|
|
@@ -9415,6 +8905,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9415
8905
|
style: {
|
|
9416
8906
|
height: 'fit-content'
|
|
9417
8907
|
},
|
|
8908
|
+
size: "large",
|
|
9418
8909
|
children: /*#__PURE__*/jsx(Remove, {})
|
|
9419
8910
|
})]
|
|
9420
8911
|
}, entryIndex);
|
|
@@ -9422,6 +8913,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9422
8913
|
onClick: function onClick() {
|
|
9423
8914
|
return handleAddArrayOrObject(index, arrayIndex);
|
|
9424
8915
|
},
|
|
8916
|
+
size: "large",
|
|
9425
8917
|
children: /*#__PURE__*/jsx(Add, {})
|
|
9426
8918
|
})]
|
|
9427
8919
|
})]
|
|
@@ -9443,6 +8935,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9443
8935
|
style: {
|
|
9444
8936
|
height: 'fit-content'
|
|
9445
8937
|
},
|
|
8938
|
+
size: "large",
|
|
9446
8939
|
children: /*#__PURE__*/jsx(Delete, {})
|
|
9447
8940
|
})]
|
|
9448
8941
|
}, index);
|
|
@@ -10068,8 +9561,7 @@ function FieldSelection (_ref) {
|
|
|
10068
9561
|
height: 'calc(100% - 59px',
|
|
10069
9562
|
borderRight: '1px solid rgba(224, 224, 224, 1)'
|
|
10070
9563
|
},
|
|
10071
|
-
children: [selectedFiltered.length > 0 && /*#__PURE__*/jsxs(
|
|
10072
|
-
button: true,
|
|
9564
|
+
children: [selectedFiltered.length > 0 && /*#__PURE__*/jsxs(ListItemButton, {
|
|
10073
9565
|
onClick: function onClick() {
|
|
10074
9566
|
return setOpenSelected(!openSelected);
|
|
10075
9567
|
},
|
|
@@ -10105,14 +9597,14 @@ function FieldSelection (_ref) {
|
|
|
10105
9597
|
},
|
|
10106
9598
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
10107
9599
|
edge: "end",
|
|
9600
|
+
size: "large",
|
|
10108
9601
|
children: /*#__PURE__*/jsx(RemoveIcon, {})
|
|
10109
9602
|
})
|
|
10110
9603
|
})]
|
|
10111
9604
|
}, f.field);
|
|
10112
9605
|
})
|
|
10113
9606
|
})
|
|
10114
|
-
}), /*#__PURE__*/jsxs(
|
|
10115
|
-
button: true,
|
|
9607
|
+
}), /*#__PURE__*/jsxs(ListItemButton, {
|
|
10116
9608
|
onClick: function onClick() {
|
|
10117
9609
|
return setOpenAll(!openAll);
|
|
10118
9610
|
},
|
|
@@ -10148,6 +9640,7 @@ function FieldSelection (_ref) {
|
|
|
10148
9640
|
},
|
|
10149
9641
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
10150
9642
|
edge: "end",
|
|
9643
|
+
size: "large",
|
|
10151
9644
|
children: /*#__PURE__*/jsx(AddIcon, {})
|
|
10152
9645
|
})
|
|
10153
9646
|
})]
|
|
@@ -12431,6 +11924,7 @@ function AffiliateTable (_ref) {
|
|
|
12431
11924
|
onClick: function onClick() {
|
|
12432
11925
|
return setAdd(true);
|
|
12433
11926
|
},
|
|
11927
|
+
size: "large",
|
|
12434
11928
|
children: /*#__PURE__*/jsx(AddIcon$1, {})
|
|
12435
11929
|
})
|
|
12436
11930
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -12470,6 +11964,7 @@ function AffiliateTable (_ref) {
|
|
|
12470
11964
|
onClick: function onClick() {
|
|
12471
11965
|
return deleteAffiliate(d.id);
|
|
12472
11966
|
},
|
|
11967
|
+
size: "large",
|
|
12473
11968
|
children: /*#__PURE__*/jsx(DeleteIcon, {})
|
|
12474
11969
|
})
|
|
12475
11970
|
}), /*#__PURE__*/jsx(TableCell, {
|
|
@@ -12946,19 +12441,20 @@ function ProductCreator (_ref) {
|
|
|
12946
12441
|
onClick: function onClick() {
|
|
12947
12442
|
return setSettings(!settings);
|
|
12948
12443
|
},
|
|
12444
|
+
size: "large",
|
|
12949
12445
|
children: /*#__PURE__*/jsx(Settings, {
|
|
12950
12446
|
color: settings ? 'primary' : 'inherit'
|
|
12951
12447
|
})
|
|
12952
12448
|
})
|
|
12953
12449
|
})]
|
|
12954
12450
|
})
|
|
12955
|
-
}), !!error && /*#__PURE__*/jsx(Alert, {
|
|
12451
|
+
}), !!error && /*#__PURE__*/jsx(Alert$1, {
|
|
12956
12452
|
severity: "error",
|
|
12957
12453
|
onClose: function onClose() {
|
|
12958
12454
|
return setError(undefined);
|
|
12959
12455
|
},
|
|
12960
12456
|
children: error
|
|
12961
|
-
}), warn && /*#__PURE__*/jsx(Alert, {
|
|
12457
|
+
}), warn && /*#__PURE__*/jsx(Alert$1, {
|
|
12962
12458
|
severity: "warning",
|
|
12963
12459
|
onClose: function onClose() {
|
|
12964
12460
|
return setWarning(undefined);
|
|
@@ -13063,7 +12559,7 @@ function Description (_ref) {
|
|
|
13063
12559
|
var _useTranslation = useTranslation(),
|
|
13064
12560
|
t = _useTranslation.t;
|
|
13065
12561
|
return /*#__PURE__*/jsxs("div", _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
13066
|
-
className:
|
|
12562
|
+
className: classnames(wrapper, props.className),
|
|
13067
12563
|
children: [/*#__PURE__*/jsx("div", {
|
|
13068
12564
|
className: title$1,
|
|
13069
12565
|
children: t(text)
|
|
@@ -13327,8 +12823,6 @@ function ModuleComponent(_ref) {
|
|
|
13327
12823
|
activeBasket = _ref.activeBasket,
|
|
13328
12824
|
activeAccountId = _ref.activeAccountId,
|
|
13329
12825
|
checkBasket = _ref.checkBasket;
|
|
13330
|
-
var _useSellerState2 = useSellerState(),
|
|
13331
|
-
configurationData = _useSellerState2.state.configurationData;
|
|
13332
12826
|
switch (activeModule) {
|
|
13333
12827
|
case 'Collections':
|
|
13334
12828
|
return /*#__PURE__*/jsx(Collections, {});
|
|
@@ -13337,13 +12831,7 @@ function ModuleComponent(_ref) {
|
|
|
13337
12831
|
collectionId: activeCollectionId
|
|
13338
12832
|
});
|
|
13339
12833
|
case 'Info':
|
|
13340
|
-
|
|
13341
|
-
return /*#__PURE__*/jsx(Info, {
|
|
13342
|
-
catalogCodex: activeCatalogCodex,
|
|
13343
|
-
accountId: activeAccountId
|
|
13344
|
-
});
|
|
13345
|
-
}
|
|
13346
|
-
return /*#__PURE__*/jsx(Info$1, {
|
|
12834
|
+
return /*#__PURE__*/jsx(Info, {
|
|
13347
12835
|
catalogCodex: activeCatalogCodex,
|
|
13348
12836
|
accountId: activeAccountId
|
|
13349
12837
|
});
|