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