@crystaldesign/diva-seller 24.14.0-beta.2 → 24.14.0-beta.20
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 +679 -1201
- package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/CatalogImages/index.d.ts +1 -0
- package/build/types/seller/src/components/InfoWithProducts/CatalogImages/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/Description/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/ArticleSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/ArticleSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/EmptyPlanningSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/EmptyPlanningSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/NavBackSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/NavBackSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/VariantPlanningSvg.d.ts +3 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/icons/VariantPlanningSvg.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts +7 -12
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/NothingFound.d.ts +6 -0
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/NothingFound.d.ts.map +1 -0
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Search/index.d.ts +4 -2
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Search/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts +4 -21
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/index.d.ts +2 -6
- package/build/types/seller/src/components/InfoWithProducts/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/useModelInfoPage.d.ts +16 -0
- package/build/types/seller/src/components/InfoWithProducts/useModelInfoPage.d.ts.map +1 -0
- package/build/types/seller/src/components/Seller/index.d.ts.map +1 -1
- package/build/types/seller/src/types.d.ts +2 -3
- package/build/types/seller/src/types.d.ts.map +1 -1
- package/build/types/seller/src/ui/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/package.json +5 -5
- 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
|
@@ -16,7 +16,7 @@ import CardActionArea from '@material-ui/core/CardActionArea';
|
|
|
16
16
|
import CardMedia from '@material-ui/core/CardMedia';
|
|
17
17
|
import Typography$1 from '@material-ui/core/Typography';
|
|
18
18
|
import { makeStyles, createStyles, styled as styled$1 } from '@material-ui/core/styles';
|
|
19
|
-
import { styled, Box, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, withStyles, TextField, ButtonGroup as ButtonGroup$1, makeStyles as makeStyles$1, createStyles as createStyles$1, Tooltip, Paper as Paper$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Link,
|
|
19
|
+
import { styled, Box, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, withStyles, TextField, ButtonGroup as ButtonGroup$1, makeStyles as makeStyles$1, createStyles as createStyles$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, Grid as Grid$1, TextareaAutosize, Select as Select$1, MenuItem as MenuItem$1, ListItemIcon } from '@material-ui/core';
|
|
20
20
|
import { Histogram, useFilterState, FilterComponent, AnalyticsComponent } from '@crystaldesign/analytics';
|
|
21
21
|
import Button from '@material-ui/core/Button';
|
|
22
22
|
import ButtonGroup from '@material-ui/core/ButtonGroup';
|
|
@@ -52,30 +52,21 @@ import FormLabel from '@material-ui/core/FormLabel';
|
|
|
52
52
|
import TextField$1 from '@material-ui/core/TextField';
|
|
53
53
|
import Select from '@material-ui/core/Select';
|
|
54
54
|
import Input from '@material-ui/core/Input';
|
|
55
|
-
import OrderEntry, { VariantSelector } from '@crystaldesign/order-entry';
|
|
55
|
+
import OrderEntry, { apiSaveRenderJobs, VariantSelector } from '@crystaldesign/order-entry';
|
|
56
56
|
import CloseIcon from '@material-ui/icons/Close';
|
|
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';
|
|
57
|
+
import classnames from 'classnames';
|
|
58
|
+
import InfoRounded from '@material-ui/icons/InfoRounded';
|
|
68
59
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
69
|
-
import { Autoplay, Thumbs, Pagination, FreeMode } from 'swiper/modules';
|
|
60
|
+
import { Autoplay, Thumbs, Pagination, FreeMode, Mousewheel } from 'swiper/modules';
|
|
70
61
|
import 'swiper/css';
|
|
71
62
|
import 'swiper/css/pagination';
|
|
72
63
|
import 'swiper/css/autoplay';
|
|
73
64
|
import 'swiper/css/thumbs';
|
|
74
65
|
import 'swiper/css/free-mode';
|
|
75
|
-
import '
|
|
76
|
-
import
|
|
66
|
+
import 'swiper/css/mousewheel';
|
|
67
|
+
import ExpandMore from '@material-ui/icons/ExpandMore';
|
|
77
68
|
import ProductsComponent, { useProductState as useProductState$1 } from '@crystaldesign/products-component';
|
|
78
|
-
import
|
|
69
|
+
import Alert from '@material-ui/lab/Alert';
|
|
79
70
|
import Tab$1 from '@material-ui/core/Tab';
|
|
80
71
|
import Tabs$1 from '@material-ui/core/Tabs';
|
|
81
72
|
import Autocomplete$1 from '@material-ui/lab/Autocomplete';
|
|
@@ -91,13 +82,13 @@ import List from '@material-ui/core/List';
|
|
|
91
82
|
import ListItem from '@material-ui/core/ListItem';
|
|
92
83
|
import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
|
|
93
84
|
import ListItemText from '@material-ui/core/ListItemText';
|
|
85
|
+
import ExpandLess from '@material-ui/icons/ExpandLess';
|
|
94
86
|
import SearchField from '@crystaldesign/searchfield';
|
|
95
87
|
import Drawer from '@material-ui/core/Drawer';
|
|
96
88
|
import AssetEditor, { DivaFile } from '@crystaldesign/media-upload';
|
|
97
89
|
import AddIcon$1 from '@material-ui/icons/NoteAdd';
|
|
98
90
|
import DeleteIcon from '@material-ui/icons/Delete';
|
|
99
91
|
import debounce from 'lodash/debounce';
|
|
100
|
-
import Alert from '@material-ui/lab/Alert';
|
|
101
92
|
import Settings from '@material-ui/icons/Settings';
|
|
102
93
|
|
|
103
94
|
(function() {
|
|
@@ -200,7 +191,7 @@ var SellerContext = /*#__PURE__*/createContext({
|
|
|
200
191
|
}
|
|
201
192
|
});
|
|
202
193
|
|
|
203
|
-
var _excluded$
|
|
194
|
+
var _excluded$b = ["internal"];
|
|
204
195
|
var GROUP_ID = 'SELLER';
|
|
205
196
|
function useBreadcrumbs(_ref) {
|
|
206
197
|
var updateBreadcrumbs = _ref.updateBreadcrumbs,
|
|
@@ -364,7 +355,7 @@ function breadcrumbPlanner(_ref6) {
|
|
|
364
355
|
if (state.currentPlannerParams) {
|
|
365
356
|
var _state$currentPlanner = state.currentPlannerParams,
|
|
366
357
|
internal = _state$currentPlanner.internal,
|
|
367
|
-
params = _objectWithoutProperties(_state$currentPlanner, _excluded$
|
|
358
|
+
params = _objectWithoutProperties(_state$currentPlanner, _excluded$b);
|
|
368
359
|
return {
|
|
369
360
|
groupId: GROUP_ID,
|
|
370
361
|
level: 3,
|
|
@@ -463,11 +454,11 @@ function breadcrumbCollection() {
|
|
|
463
454
|
};
|
|
464
455
|
}
|
|
465
456
|
|
|
466
|
-
function ownKeys$
|
|
467
|
-
function _objectSpread$
|
|
457
|
+
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; }
|
|
458
|
+
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
459
|
var reducer$1 = function reducer(state, action) {
|
|
469
460
|
if (action.type == 'update') {
|
|
470
|
-
var newState = _objectSpread$
|
|
461
|
+
var newState = _objectSpread$B({}, state);
|
|
471
462
|
action.payload.forEach(function (p) {
|
|
472
463
|
if (p.field == 'basketState') {
|
|
473
464
|
if (p.value) {
|
|
@@ -1290,15 +1281,15 @@ function orderFn(a, b, orderBy) {
|
|
|
1290
1281
|
return 0;
|
|
1291
1282
|
}
|
|
1292
1283
|
|
|
1293
|
-
var _excluded$
|
|
1294
|
-
_excluded2$
|
|
1284
|
+
var _excluded$a = ["collectionId"],
|
|
1285
|
+
_excluded2$2 = ["basetId"],
|
|
1295
1286
|
_excluded3$1 = ["catalogCodex", "accountId"];
|
|
1296
1287
|
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
1288
|
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
1289
|
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$
|
|
1290
|
+
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; }
|
|
1291
|
+
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; }
|
|
1292
|
+
var LOG$9 = getLogger('Seller', 'SellerStateData');
|
|
1302
1293
|
function useSellerStateData(_ref) {
|
|
1303
1294
|
var sessionGuid = _ref.sessionGuid,
|
|
1304
1295
|
configData = _ref.configData,
|
|
@@ -1335,7 +1326,7 @@ function useSellerStateData(_ref) {
|
|
|
1335
1326
|
var updateAcountLogo = function updateAcountLogo(logo) {
|
|
1336
1327
|
updateCustomLogo(['SELLER', 'DIVA_WEBPLANNER', 'REPORT'], logo);
|
|
1337
1328
|
};
|
|
1338
|
-
var basketHandler = new BasketHandler(LOG$
|
|
1329
|
+
var basketHandler = new BasketHandler(LOG$9, apiConfig.basketService, apiConfig.api2["default"]);
|
|
1339
1330
|
useEffect(function () {
|
|
1340
1331
|
if (loginMode !== 'offline' && isVisible == true) {
|
|
1341
1332
|
resetState();
|
|
@@ -1427,7 +1418,7 @@ function useSellerStateData(_ref) {
|
|
|
1427
1418
|
}]
|
|
1428
1419
|
});
|
|
1429
1420
|
case 7:
|
|
1430
|
-
return _context.abrupt("return", processData(_objectSpread$
|
|
1421
|
+
return _context.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
1431
1422
|
data: collections
|
|
1432
1423
|
})));
|
|
1433
1424
|
case 10:
|
|
@@ -1451,7 +1442,7 @@ function useSellerStateData(_ref) {
|
|
|
1451
1442
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
1452
1443
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1453
1444
|
case 0:
|
|
1454
|
-
collectionId = _ref3.collectionId, props = _objectWithoutProperties(_ref3, _excluded$
|
|
1445
|
+
collectionId = _ref3.collectionId, props = _objectWithoutProperties(_ref3, _excluded$a);
|
|
1455
1446
|
if (!(state.firstLoginApiUrl && sessionGuid)) {
|
|
1456
1447
|
_context2.next = 14;
|
|
1457
1448
|
break;
|
|
@@ -1491,7 +1482,7 @@ function useSellerStateData(_ref) {
|
|
|
1491
1482
|
updateAcountLogo((_state$collections = state.collections) === null || _state$collections === void 0 || (_state$collections = _state$collections.find(function (c) {
|
|
1492
1483
|
return c.id == collectionId;
|
|
1493
1484
|
})) === null || _state$collections === void 0 ? void 0 : _state$collections.accountLogo);
|
|
1494
|
-
return _context2.abrupt("return", processData(_objectSpread$
|
|
1485
|
+
return _context2.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
1495
1486
|
data: catalogs || []
|
|
1496
1487
|
})));
|
|
1497
1488
|
case 14:
|
|
@@ -1613,7 +1604,7 @@ function useSellerStateData(_ref) {
|
|
|
1613
1604
|
_context4.next = 26;
|
|
1614
1605
|
break;
|
|
1615
1606
|
}
|
|
1616
|
-
LOG$
|
|
1607
|
+
LOG$9.error(new DivaError('AccountSessionId is undefined', {
|
|
1617
1608
|
code: 'SELLER_0001'
|
|
1618
1609
|
}));
|
|
1619
1610
|
return _context4.abrupt("return");
|
|
@@ -1661,7 +1652,7 @@ function useSellerStateData(_ref) {
|
|
|
1661
1652
|
_context4.next = 40;
|
|
1662
1653
|
break;
|
|
1663
1654
|
}
|
|
1664
|
-
LOG$
|
|
1655
|
+
LOG$9.error(new DivaError('Error on Loading CatalogData', {
|
|
1665
1656
|
code: 'SELLER_0001',
|
|
1666
1657
|
cause: _context4.t2
|
|
1667
1658
|
}));
|
|
@@ -1794,7 +1785,7 @@ function useSellerStateData(_ref) {
|
|
|
1794
1785
|
}();
|
|
1795
1786
|
var updateBasketState = function updateBasketState(_ref12) {
|
|
1796
1787
|
var basetId = _ref12.basetId,
|
|
1797
|
-
basketState = _objectWithoutProperties(_ref12, _excluded2$
|
|
1788
|
+
basketState = _objectWithoutProperties(_ref12, _excluded2$2);
|
|
1798
1789
|
dispatch({
|
|
1799
1790
|
type: 'update',
|
|
1800
1791
|
payload: [{
|
|
@@ -1878,8 +1869,8 @@ function useSellerStateData(_ref) {
|
|
|
1878
1869
|
_context7.next = 22;
|
|
1879
1870
|
return apiLoadBasket({
|
|
1880
1871
|
divaNr: divaNr,
|
|
1881
|
-
apiConfig: _objectSpread$
|
|
1882
|
-
api2: _objectSpread$
|
|
1872
|
+
apiConfig: _objectSpread$A(_objectSpread$A({}, apiConfig), {}, {
|
|
1873
|
+
api2: _objectSpread$A(_objectSpread$A({}, apiConfig.api2), {}, {
|
|
1883
1874
|
"default": state.firstLoginApiUrl
|
|
1884
1875
|
})
|
|
1885
1876
|
}),
|
|
@@ -2207,7 +2198,7 @@ function useSellerStateData(_ref) {
|
|
|
2207
2198
|
}]
|
|
2208
2199
|
});
|
|
2209
2200
|
case 24:
|
|
2210
|
-
return _context9.abrupt("return", processData(_objectSpread$
|
|
2201
|
+
return _context9.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
2211
2202
|
data: articles || []
|
|
2212
2203
|
})));
|
|
2213
2204
|
case 27:
|
|
@@ -2263,10 +2254,10 @@ function useSellerStateData(_ref) {
|
|
|
2263
2254
|
};
|
|
2264
2255
|
}
|
|
2265
2256
|
|
|
2266
|
-
var _excluded$
|
|
2267
|
-
function ownKeys$
|
|
2268
|
-
function _objectSpread$
|
|
2269
|
-
var LOG$
|
|
2257
|
+
var _excluded$9 = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "resetState", "resetForCache"];
|
|
2258
|
+
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; }
|
|
2259
|
+
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; }
|
|
2260
|
+
var LOG$8 = getLogger('Seller', 'SellerStateProvider');
|
|
2270
2261
|
var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
2271
2262
|
var children = _ref.children,
|
|
2272
2263
|
vkpExportParams = _ref.vkpExportParams,
|
|
@@ -2346,7 +2337,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2346
2337
|
setProductCategories = _useSellerStateData.setProductCategories,
|
|
2347
2338
|
resetState = _useSellerStateData.resetState,
|
|
2348
2339
|
resetForCache = _useSellerStateData.resetForCache,
|
|
2349
|
-
stateFunctions = _objectWithoutProperties(_useSellerStateData, _excluded$
|
|
2340
|
+
stateFunctions = _objectWithoutProperties(_useSellerStateData, _excluded$9);
|
|
2350
2341
|
if (oldSession !== undefined && oldSession !== sessionGuid) resetState();
|
|
2351
2342
|
if (oldSession !== sessionGuid) setOldSession(sessionGuid);
|
|
2352
2343
|
useEffect(function () {
|
|
@@ -2588,7 +2579,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2588
2579
|
case 37:
|
|
2589
2580
|
_context3.prev = 37;
|
|
2590
2581
|
_context3.t0 = _context3["catch"](0);
|
|
2591
|
-
LOG$
|
|
2582
|
+
LOG$8.error(new DivaError('Could not open divaNr', {
|
|
2592
2583
|
cause: _context3.t0,
|
|
2593
2584
|
code: 'SELLER_0001'
|
|
2594
2585
|
}));
|
|
@@ -2629,7 +2620,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2629
2620
|
_context4.next = 8;
|
|
2630
2621
|
break;
|
|
2631
2622
|
}
|
|
2632
|
-
params = _objectSpread$
|
|
2623
|
+
params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({
|
|
2633
2624
|
catalogCodex: catalogCodex
|
|
2634
2625
|
}, accountId ? {
|
|
2635
2626
|
accountId: accountId
|
|
@@ -2644,13 +2635,13 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2644
2635
|
} : {}), retailArticleNr ? {
|
|
2645
2636
|
retailArticleNr: retailArticleNr
|
|
2646
2637
|
} : {});
|
|
2647
|
-
internal = _objectSpread$
|
|
2638
|
+
internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2648
2639
|
forceReload: forceReload
|
|
2649
2640
|
} : {}), {}, {
|
|
2650
2641
|
accountSessionGuid: accountSessionGuid,
|
|
2651
2642
|
basketData: basketData
|
|
2652
2643
|
});
|
|
2653
|
-
setPlannerParams(_objectSpread$
|
|
2644
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2654
2645
|
internal: internal
|
|
2655
2646
|
}));
|
|
2656
2647
|
openComponent({
|
|
@@ -2682,7 +2673,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2682
2673
|
updateBasketState({
|
|
2683
2674
|
concat: true
|
|
2684
2675
|
});
|
|
2685
|
-
var _params = _objectSpread$
|
|
2676
|
+
var _params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2686
2677
|
catalogCodex: catalogCodex
|
|
2687
2678
|
} : {}), accountId ? {
|
|
2688
2679
|
accountId: accountId
|
|
@@ -2699,12 +2690,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2699
2690
|
} : {}), productId ? {
|
|
2700
2691
|
productId: productId
|
|
2701
2692
|
} : {});
|
|
2702
|
-
var _internal = _objectSpread$
|
|
2693
|
+
var _internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2703
2694
|
forceReload: forceReload
|
|
2704
2695
|
} : {}), {}, {
|
|
2705
2696
|
accountSessionGuid: accountSessionGuid
|
|
2706
2697
|
});
|
|
2707
|
-
setPlannerParams(_objectSpread$
|
|
2698
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params), {}, {
|
|
2708
2699
|
internal: _internal
|
|
2709
2700
|
}));
|
|
2710
2701
|
openComponent({
|
|
@@ -2737,7 +2728,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2737
2728
|
});
|
|
2738
2729
|
}
|
|
2739
2730
|
} else {
|
|
2740
|
-
_params2 = _objectSpread$
|
|
2731
|
+
_params2 = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2741
2732
|
catalogCodex: catalogCodex
|
|
2742
2733
|
} : {}), accountId ? {
|
|
2743
2734
|
accountId: accountId
|
|
@@ -2752,12 +2743,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2752
2743
|
} : {}), retailArticleNr ? {
|
|
2753
2744
|
retailArticleNr: retailArticleNr
|
|
2754
2745
|
} : {});
|
|
2755
|
-
_internal2 = _objectSpread$
|
|
2746
|
+
_internal2 = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2756
2747
|
forceReload: forceReload
|
|
2757
2748
|
} : {}), {}, {
|
|
2758
2749
|
accountSessionGuid: accountSessionGuid
|
|
2759
2750
|
});
|
|
2760
|
-
setPlannerParams(_objectSpread$
|
|
2751
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params2), {}, {
|
|
2761
2752
|
internal: _internal2
|
|
2762
2753
|
}));
|
|
2763
2754
|
openComponent({
|
|
@@ -2793,7 +2784,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2793
2784
|
divaNr: divaNr,
|
|
2794
2785
|
returnTo: returnTo
|
|
2795
2786
|
};
|
|
2796
|
-
setPlannerParams(_objectSpread$
|
|
2787
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params3), {}, {
|
|
2797
2788
|
internal: {
|
|
2798
2789
|
basketData: basketData,
|
|
2799
2790
|
forceReload: forceReload
|
|
@@ -2810,7 +2801,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2810
2801
|
_context4.next = 23;
|
|
2811
2802
|
break;
|
|
2812
2803
|
case 22:
|
|
2813
|
-
LOG$
|
|
2804
|
+
LOG$8.error(new DivaError('openPlanner got called with non all required params', {
|
|
2814
2805
|
code: 'SELLER_0001'
|
|
2815
2806
|
}));
|
|
2816
2807
|
case 23:
|
|
@@ -2841,7 +2832,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2841
2832
|
step: null,
|
|
2842
2833
|
assignNewDivaNr: false
|
|
2843
2834
|
});
|
|
2844
|
-
var params = _objectSpread$
|
|
2835
|
+
var params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2845
2836
|
catalogCodex: catalogCodex
|
|
2846
2837
|
} : {}), accountId ? {
|
|
2847
2838
|
accountId: accountId
|
|
@@ -2856,12 +2847,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2856
2847
|
} : {}), retailArticleNr ? {
|
|
2857
2848
|
retailArticleNr: retailArticleNr
|
|
2858
2849
|
} : {});
|
|
2859
|
-
var internal = _objectSpread$
|
|
2850
|
+
var internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2860
2851
|
forceReload: forceReload
|
|
2861
2852
|
} : {}), {}, {
|
|
2862
2853
|
accountSessionGuid: accountSessionGuid
|
|
2863
2854
|
});
|
|
2864
|
-
setPlannerParams(_objectSpread$
|
|
2855
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2865
2856
|
internal: internal
|
|
2866
2857
|
}));
|
|
2867
2858
|
openComponent({
|
|
@@ -2909,7 +2900,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2909
2900
|
case 'toPlanner':
|
|
2910
2901
|
{
|
|
2911
2902
|
if (plannerParams) {
|
|
2912
|
-
var params = _objectSpread$
|
|
2903
|
+
var params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, plannerParams.catalogCodex ? {
|
|
2913
2904
|
catalogCodex: plannerParams.catalogCodex
|
|
2914
2905
|
} : {}), plannerParams.accountId ? {
|
|
2915
2906
|
accountId: plannerParams.accountId
|
|
@@ -2922,12 +2913,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2922
2913
|
} : {}), plannerParams.retailArticleNr ? {
|
|
2923
2914
|
retailArticleNr: plannerParams.retailArticleNr
|
|
2924
2915
|
} : {});
|
|
2925
|
-
var internal = _objectSpread$
|
|
2916
|
+
var internal = _objectSpread$z(_objectSpread$z({}, plannerParams.forceReload ? {
|
|
2926
2917
|
forceReload: plannerParams.forceReload
|
|
2927
2918
|
} : {}), {}, {
|
|
2928
2919
|
accountSessionGuid: plannerParams.accountSessionGuid
|
|
2929
2920
|
});
|
|
2930
|
-
setPlannerParams(_objectSpread$
|
|
2921
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2931
2922
|
internal: internal
|
|
2932
2923
|
}));
|
|
2933
2924
|
openComponent({
|
|
@@ -2954,8 +2945,8 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2954
2945
|
_context5.next = 2;
|
|
2955
2946
|
return apiLoadBasket({
|
|
2956
2947
|
divaNr: divaNr,
|
|
2957
|
-
apiConfig: _objectSpread$
|
|
2958
|
-
api2: _objectSpread$
|
|
2948
|
+
apiConfig: _objectSpread$z(_objectSpread$z({}, apiConfig), {}, {
|
|
2949
|
+
api2: _objectSpread$z(_objectSpread$z({}, apiConfig.api2), {}, {
|
|
2959
2950
|
"default": state.firstLoginApiUrl
|
|
2960
2951
|
})
|
|
2961
2952
|
}),
|
|
@@ -3024,7 +3015,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3024
3015
|
originProductId: state.originProductId,
|
|
3025
3016
|
productCategories: state.productCategories
|
|
3026
3017
|
},
|
|
3027
|
-
actions: _objectSpread$
|
|
3018
|
+
actions: _objectSpread$z(_objectSpread$z({}, stateFunctions), {}, {
|
|
3028
3019
|
openComponent: openComponent,
|
|
3029
3020
|
openModal: openModal,
|
|
3030
3021
|
openPlanner: openPlanner,
|
|
@@ -3048,13 +3039,13 @@ var useSellerState = function useSellerState() {
|
|
|
3048
3039
|
};
|
|
3049
3040
|
|
|
3050
3041
|
function Badge3D() {
|
|
3051
|
-
var classes = useStyles$
|
|
3042
|
+
var classes = useStyles$3();
|
|
3052
3043
|
return /*#__PURE__*/jsx("span", {
|
|
3053
3044
|
className: classes.root,
|
|
3054
3045
|
children: "3D"
|
|
3055
3046
|
});
|
|
3056
3047
|
}
|
|
3057
|
-
var useStyles$
|
|
3048
|
+
var useStyles$3 = makeStyles(function () {
|
|
3058
3049
|
return createStyles({
|
|
3059
3050
|
root: {
|
|
3060
3051
|
position: 'absolute',
|
|
@@ -3072,21 +3063,20 @@ var useStyles$7 = makeStyles(function () {
|
|
|
3072
3063
|
});
|
|
3073
3064
|
});
|
|
3074
3065
|
|
|
3075
|
-
function ownKeys$
|
|
3076
|
-
function _objectSpread$
|
|
3066
|
+
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; }
|
|
3067
|
+
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
3068
|
function Title(_ref) {
|
|
3078
3069
|
var text = _ref.text,
|
|
3079
3070
|
children = _ref.children,
|
|
3080
3071
|
help = _ref.help;
|
|
3081
3072
|
return /*#__PURE__*/jsxs(Wrapper, {
|
|
3082
|
-
children: [/*#__PURE__*/
|
|
3073
|
+
children: [/*#__PURE__*/jsxs(Typography, {
|
|
3083
3074
|
variant: "h4",
|
|
3084
3075
|
component: "h2",
|
|
3085
|
-
children: text
|
|
3086
|
-
}), help && /*#__PURE__*/jsx(HelpButton, _objectSpread$x({}, help)), /*#__PURE__*/jsx("div", {
|
|
3087
3076
|
style: {
|
|
3088
|
-
|
|
3089
|
-
}
|
|
3077
|
+
flexGrow: 1
|
|
3078
|
+
},
|
|
3079
|
+
children: [text, help && /*#__PURE__*/jsx(HelpButton, _objectSpread$y({}, help))]
|
|
3090
3080
|
}), children]
|
|
3091
3081
|
});
|
|
3092
3082
|
}
|
|
@@ -3094,16 +3084,18 @@ var Wrapper = styled(Box)({
|
|
|
3094
3084
|
display: 'flex',
|
|
3095
3085
|
justifyContent: 'space-between',
|
|
3096
3086
|
alignItems: 'center',
|
|
3097
|
-
margin: '10px 10px 0 10px'
|
|
3087
|
+
margin: '10px 10px 0 10px',
|
|
3088
|
+
flexWrap: 'wrap',
|
|
3089
|
+
gap: '10px'
|
|
3098
3090
|
});
|
|
3099
3091
|
|
|
3100
3092
|
function getImageOrFallbackUrl(url) {
|
|
3101
3093
|
return url || 'https://cdn.diva-portal.com/static/images/image_placeholder-landscape-short.png';
|
|
3102
3094
|
}
|
|
3103
3095
|
|
|
3104
|
-
function ownKeys$
|
|
3105
|
-
function _objectSpread$
|
|
3106
|
-
var LOG$
|
|
3096
|
+
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; }
|
|
3097
|
+
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; }
|
|
3098
|
+
var LOG$7 = getLogger('SellerCatalogs', 'Catalogs');
|
|
3107
3099
|
function Catalogs(_ref) {
|
|
3108
3100
|
var _configurationData$an, _configurationData$ca5, _configurationData$an3, _configurationData$an4;
|
|
3109
3101
|
var collectionId = _ref.collectionId;
|
|
@@ -3177,11 +3169,11 @@ function Catalogs(_ref) {
|
|
|
3177
3169
|
case 19:
|
|
3178
3170
|
_context.prev = 19;
|
|
3179
3171
|
_context.t2 = _context["catch"](1);
|
|
3180
|
-
LOG$
|
|
3172
|
+
LOG$7.errorTransaction('ON_OPEN_MODULE_CATALOGS', 'SELLER_0001', 'Could not load catalogs: ' + _context.t2, {
|
|
3181
3173
|
accountId: collectionId
|
|
3182
3174
|
});
|
|
3183
3175
|
case 22:
|
|
3184
|
-
LOG$
|
|
3176
|
+
LOG$7.successTransaction('ON_OPEN_MODULE_CATALOGS', {
|
|
3185
3177
|
accountId: collectionId
|
|
3186
3178
|
});
|
|
3187
3179
|
setLoading(false);
|
|
@@ -3196,7 +3188,7 @@ function Catalogs(_ref) {
|
|
|
3196
3188
|
};
|
|
3197
3189
|
}(), [loadCatalogs]);
|
|
3198
3190
|
useEffect(function () {
|
|
3199
|
-
LOG$
|
|
3191
|
+
LOG$7.startTransaction({
|
|
3200
3192
|
event: 'onOpenModule',
|
|
3201
3193
|
message: 'Open Catalogs',
|
|
3202
3194
|
eventId: 'ON_OPEN_MODULE_CATALOGS',
|
|
@@ -3215,7 +3207,7 @@ function Catalogs(_ref) {
|
|
|
3215
3207
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
3216
3208
|
while (1) switch (_context2.prev = _context2.next) {
|
|
3217
3209
|
case 0:
|
|
3218
|
-
LOG$
|
|
3210
|
+
LOG$7.businessEvent('onSelectCatalog', 'Seller', "Katalog wurde ausgew\xE4hlt: '".concat(item.name, "'"), {
|
|
3219
3211
|
catalogCodex: item.codex,
|
|
3220
3212
|
catalogName: item.name,
|
|
3221
3213
|
accountId: item.accountId,
|
|
@@ -3232,7 +3224,7 @@ function Catalogs(_ref) {
|
|
|
3232
3224
|
if (configurationData !== null && configurationData !== void 0 && (_configurationData$ca = configurationData.catalogs) !== null && _configurationData$ca !== void 0 && _configurationData$ca.onOpen) {
|
|
3233
3225
|
action = configurationData === null || configurationData === void 0 || (_configurationData$ca2 = configurationData.catalogs) === null || _configurationData$ca2 === void 0 ? void 0 : _configurationData$ca2.onOpen;
|
|
3234
3226
|
if (!action.url) {
|
|
3235
|
-
action = _objectSpread$
|
|
3227
|
+
action = _objectSpread$x({}, action);
|
|
3236
3228
|
parameters = {};
|
|
3237
3229
|
Object.entries(action.parameters || {}).forEach(function (_ref4) {
|
|
3238
3230
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
@@ -3248,7 +3240,7 @@ function Catalogs(_ref) {
|
|
|
3248
3240
|
} else {
|
|
3249
3241
|
openComponent({
|
|
3250
3242
|
type: 'SELLER',
|
|
3251
|
-
parameters: _objectSpread$
|
|
3243
|
+
parameters: _objectSpread$x({
|
|
3252
3244
|
module: 'Info',
|
|
3253
3245
|
catalogCodex: item.codex
|
|
3254
3246
|
}, item.accountId ? {
|
|
@@ -3506,7 +3498,7 @@ function Catalogs(_ref) {
|
|
|
3506
3498
|
});
|
|
3507
3499
|
}
|
|
3508
3500
|
|
|
3509
|
-
var LOG$
|
|
3501
|
+
var LOG$6 = getLogger('SellerCollections', 'Collections');
|
|
3510
3502
|
function Collections() {
|
|
3511
3503
|
var _configurationData$an, _configurationData$an2, _configurationData$an3;
|
|
3512
3504
|
var _useTranslation = useTranslation(),
|
|
@@ -3540,7 +3532,7 @@ function Collections() {
|
|
|
3540
3532
|
parameters: {
|
|
3541
3533
|
module: 'Catalogs'
|
|
3542
3534
|
}
|
|
3543
|
-
});else LOG$
|
|
3535
|
+
});else LOG$6.startTransaction({
|
|
3544
3536
|
event: 'onOpenModule',
|
|
3545
3537
|
message: 'Open Collections',
|
|
3546
3538
|
eventId: 'ON_OPEN_MODULE_COLLECTIONS'
|
|
@@ -3565,9 +3557,9 @@ function Collections() {
|
|
|
3565
3557
|
case 8:
|
|
3566
3558
|
_context.prev = 8;
|
|
3567
3559
|
_context.t0 = _context["catch"](1);
|
|
3568
|
-
LOG$
|
|
3560
|
+
LOG$6.errorTransaction('ON_OPEN_MODULE_COLLECTIONS', 'SELLER_0005', 'Error loading collections: ' + _context.t0);
|
|
3569
3561
|
case 11:
|
|
3570
|
-
LOG$
|
|
3562
|
+
LOG$6.successTransaction('ON_OPEN_MODULE_COLLECTIONS');
|
|
3571
3563
|
setLoading(false);
|
|
3572
3564
|
case 13:
|
|
3573
3565
|
case "end":
|
|
@@ -3585,7 +3577,7 @@ function Collections() {
|
|
|
3585
3577
|
//Grupperiung anch Kollektionen und Lieferanten
|
|
3586
3578
|
var onCollectionClick = function onCollectionClick(item) {
|
|
3587
3579
|
if (item) {
|
|
3588
|
-
LOG$
|
|
3580
|
+
LOG$6.businessEvent('onSelectCollection', 'Seller', "Kollektion wurde ausgew\xE4hlt: '".concat(item.accountName, "'"), {
|
|
3589
3581
|
accountId: item.id,
|
|
3590
3582
|
accountName: item.accountName
|
|
3591
3583
|
});
|
|
@@ -3725,7 +3717,7 @@ function Collections() {
|
|
|
3725
3717
|
});
|
|
3726
3718
|
}
|
|
3727
3719
|
|
|
3728
|
-
var LOG$
|
|
3720
|
+
var LOG$5 = getLogger('SellerArticles', 'Articles');
|
|
3729
3721
|
function Articles(_ref) {
|
|
3730
3722
|
var catalogCodex = _ref.catalogCodex,
|
|
3731
3723
|
accountId = _ref.accountId;
|
|
@@ -3752,7 +3744,7 @@ function Articles(_ref) {
|
|
|
3752
3744
|
var _useDivaCore = useDivaCore(),
|
|
3753
3745
|
organization = _useDivaCore.state.organization;
|
|
3754
3746
|
useEffect(function () {
|
|
3755
|
-
LOG$
|
|
3747
|
+
LOG$5.startTransaction({
|
|
3756
3748
|
event: 'onOpenModule',
|
|
3757
3749
|
message: 'Open Articles',
|
|
3758
3750
|
eventId: 'ON_OPEN_MODULE_SELLER_ARTICLES',
|
|
@@ -3774,7 +3766,7 @@ function Articles(_ref) {
|
|
|
3774
3766
|
_context.next = 5;
|
|
3775
3767
|
break;
|
|
3776
3768
|
}
|
|
3777
|
-
LOG$
|
|
3769
|
+
LOG$5.errorTransaction('ON_OPEN_MODULE_SELLER_ARTICLES', 'SELLER_0001', 'accountId or Catalog Codex missing', {
|
|
3778
3770
|
cat: catalogCodex,
|
|
3779
3771
|
accountId: accountId
|
|
3780
3772
|
});
|
|
@@ -3789,7 +3781,7 @@ function Articles(_ref) {
|
|
|
3789
3781
|
case 7:
|
|
3790
3782
|
articleItems = _context.sent;
|
|
3791
3783
|
setData(articleItems.data);
|
|
3792
|
-
LOG$
|
|
3784
|
+
LOG$5.successTransaction('ON_OPEN_MODULE_SELLER_ARTICLES', {
|
|
3793
3785
|
cat: catalogCodex,
|
|
3794
3786
|
accountId: accountId
|
|
3795
3787
|
});
|
|
@@ -4007,7 +3999,6 @@ function Header$1(_ref) {
|
|
|
4007
3999
|
return /*#__PURE__*/jsx("div", {
|
|
4008
4000
|
style: {
|
|
4009
4001
|
padding: '12px 16px',
|
|
4010
|
-
minHeight: '64px',
|
|
4011
4002
|
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
4003
|
zIndex: 1
|
|
4013
4004
|
},
|
|
@@ -4016,18 +4007,12 @@ function Header$1(_ref) {
|
|
|
4016
4007
|
children: [showVKPExportButton && /*#__PURE__*/jsx(Button, {
|
|
4017
4008
|
color: 'primary',
|
|
4018
4009
|
variant: 'contained',
|
|
4019
|
-
style: {
|
|
4020
|
-
marginRight: 20
|
|
4021
|
-
},
|
|
4022
4010
|
onClick: doExportToVKP,
|
|
4023
4011
|
disabled: !enableVKPExportButton,
|
|
4024
4012
|
children: "VKP-Export"
|
|
4025
4013
|
}), showProductCreator && /*#__PURE__*/jsx(Button, {
|
|
4026
4014
|
color: 'primary',
|
|
4027
4015
|
variant: 'contained',
|
|
4028
|
-
style: {
|
|
4029
|
-
marginRight: 20
|
|
4030
|
-
},
|
|
4031
4016
|
onClick: openProductCreator,
|
|
4032
4017
|
children: t('basket.navigation.products')
|
|
4033
4018
|
}), /*#__PURE__*/jsxs(ButtonGroup, {
|
|
@@ -4071,8 +4056,8 @@ function Header(_ref) {
|
|
|
4071
4056
|
});
|
|
4072
4057
|
}
|
|
4073
4058
|
|
|
4074
|
-
function ownKeys$
|
|
4075
|
-
function _objectSpread$
|
|
4059
|
+
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; }
|
|
4060
|
+
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
4061
|
function MenuListComposition(_ref) {
|
|
4077
4062
|
var setId = _ref.setId,
|
|
4078
4063
|
visibile = _ref.visibile,
|
|
@@ -4152,7 +4137,7 @@ function MenuListComposition(_ref) {
|
|
|
4152
4137
|
children: function children(_ref2) {
|
|
4153
4138
|
var TransitionProps = _ref2.TransitionProps,
|
|
4154
4139
|
placement = _ref2.placement;
|
|
4155
|
-
return /*#__PURE__*/jsx(Grow, _objectSpread$
|
|
4140
|
+
return /*#__PURE__*/jsx(Grow, _objectSpread$w(_objectSpread$w({}, TransitionProps), {}, {
|
|
4156
4141
|
style: {
|
|
4157
4142
|
transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
|
|
4158
4143
|
},
|
|
@@ -4233,8 +4218,8 @@ function Images(_ref) {
|
|
|
4233
4218
|
});
|
|
4234
4219
|
}
|
|
4235
4220
|
|
|
4236
|
-
function ownKeys$
|
|
4237
|
-
function _objectSpread$
|
|
4221
|
+
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; }
|
|
4222
|
+
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
4223
|
var OpvImage = function OpvImage(_ref) {
|
|
4239
4224
|
var src = _ref.src;
|
|
4240
4225
|
var _useHover = useHover({
|
|
@@ -4252,15 +4237,15 @@ var OpvImage = function OpvImage(_ref) {
|
|
|
4252
4237
|
layerProps = _useLayer.layerProps,
|
|
4253
4238
|
triggerProps = _useLayer.triggerProps;
|
|
4254
4239
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
4255
|
-
children: [/*#__PURE__*/jsx("img", _objectSpread$
|
|
4240
|
+
children: [/*#__PURE__*/jsx("img", _objectSpread$v(_objectSpread$v(_objectSpread$v({}, triggerProps), hoverProps), {}, {
|
|
4256
4241
|
src: src,
|
|
4257
4242
|
style: {
|
|
4258
4243
|
width: '20px'
|
|
4259
4244
|
}
|
|
4260
|
-
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$
|
|
4245
|
+
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$v(_objectSpread$v({
|
|
4261
4246
|
src: src.replace('_gal.', '.')
|
|
4262
4247
|
}, layerProps), {}, {
|
|
4263
|
-
style: _objectSpread$
|
|
4248
|
+
style: _objectSpread$v({
|
|
4264
4249
|
width: '300px'
|
|
4265
4250
|
}, layerProps.style)
|
|
4266
4251
|
}))))]
|
|
@@ -4273,7 +4258,7 @@ function SetTable(_ref) {
|
|
|
4273
4258
|
visibile = _ref.visibile;
|
|
4274
4259
|
var _useTranslation = useTranslation(),
|
|
4275
4260
|
t = _useTranslation.t;
|
|
4276
|
-
var classes = useStyles$
|
|
4261
|
+
var classes = useStyles$2();
|
|
4277
4262
|
var _useSellerState = useSellerState(),
|
|
4278
4263
|
_useSellerState$state = _useSellerState.state,
|
|
4279
4264
|
doShowPrices = _useSellerState$state.doShowPrices,
|
|
@@ -4584,7 +4569,7 @@ function SetTable(_ref) {
|
|
|
4584
4569
|
})
|
|
4585
4570
|
});
|
|
4586
4571
|
}
|
|
4587
|
-
var useStyles$
|
|
4572
|
+
var useStyles$2 = makeStyles({
|
|
4588
4573
|
table: {
|
|
4589
4574
|
minWidth: 650
|
|
4590
4575
|
}
|
|
@@ -4667,9 +4652,9 @@ function Set$1(_ref) {
|
|
|
4667
4652
|
});
|
|
4668
4653
|
}
|
|
4669
4654
|
|
|
4670
|
-
var _excluded$
|
|
4671
|
-
function ownKeys$
|
|
4672
|
-
function _objectSpread$
|
|
4655
|
+
var _excluded$8 = ["onValueChange", "value"];
|
|
4656
|
+
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; }
|
|
4657
|
+
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
4658
|
function DiscountField (_ref) {
|
|
4674
4659
|
var _ref2;
|
|
4675
4660
|
var updateDiscount = _ref.updateDiscount,
|
|
@@ -4736,7 +4721,7 @@ function DiscountField (_ref) {
|
|
|
4736
4721
|
function ControlledNumberFormat$1(_ref3) {
|
|
4737
4722
|
var onValueChange = _ref3.onValueChange,
|
|
4738
4723
|
origValue = _ref3.value,
|
|
4739
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
4724
|
+
props = _objectWithoutProperties(_ref3, _excluded$8);
|
|
4740
4725
|
var _useState = useState(origValue),
|
|
4741
4726
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4742
4727
|
value = _useState2[0],
|
|
@@ -4756,7 +4741,7 @@ function ControlledNumberFormat$1(_ref3) {
|
|
|
4756
4741
|
useEffect(function () {
|
|
4757
4742
|
setValue(origValue);
|
|
4758
4743
|
}, [origValue]);
|
|
4759
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4744
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
4760
4745
|
placeholder: props.suffix,
|
|
4761
4746
|
value: value === 0 ? undefined : value,
|
|
4762
4747
|
customInput: StyledTextFiled$1,
|
|
@@ -4780,9 +4765,9 @@ var StyledTextFiled$1 = withStyles({
|
|
|
4780
4765
|
}
|
|
4781
4766
|
})(TextField);
|
|
4782
4767
|
|
|
4783
|
-
var _excluded$
|
|
4784
|
-
function ownKeys$
|
|
4785
|
-
function _objectSpread$
|
|
4768
|
+
var _excluded$7 = ["onValueChange", "value"];
|
|
4769
|
+
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; }
|
|
4770
|
+
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
4771
|
function AdditionalPriceField (_ref) {
|
|
4787
4772
|
var updatePrice = _ref.updatePrice,
|
|
4788
4773
|
price = _ref.price,
|
|
@@ -4840,7 +4825,7 @@ function AdditionalPriceField (_ref) {
|
|
|
4840
4825
|
function ControlledNumberFormat(_ref2) {
|
|
4841
4826
|
var onValueChange = _ref2.onValueChange,
|
|
4842
4827
|
origValue = _ref2.value,
|
|
4843
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
4828
|
+
props = _objectWithoutProperties(_ref2, _excluded$7);
|
|
4844
4829
|
var _useState = useState(origValue),
|
|
4845
4830
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4846
4831
|
value = _useState2[0],
|
|
@@ -4860,7 +4845,7 @@ function ControlledNumberFormat(_ref2) {
|
|
|
4860
4845
|
useEffect(function () {
|
|
4861
4846
|
setValue(origValue);
|
|
4862
4847
|
}, [origValue]);
|
|
4863
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4848
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
4864
4849
|
placeholder: '0 ' + DivaUtils$1.defaultPriceFormat.currency,
|
|
4865
4850
|
value: value,
|
|
4866
4851
|
customInput: StyledTextFiled,
|
|
@@ -5358,7 +5343,7 @@ function StatusMenu(_ref) {
|
|
|
5358
5343
|
});
|
|
5359
5344
|
}
|
|
5360
5345
|
|
|
5361
|
-
var useStyles$
|
|
5346
|
+
var useStyles$1 = makeStyles$1(function (theme) {
|
|
5362
5347
|
return createStyles$1({
|
|
5363
5348
|
margin: {
|
|
5364
5349
|
margin: theme.spacing(1)
|
|
@@ -5377,7 +5362,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5377
5362
|
userInfoPresent = _ref.userInfoPresent;
|
|
5378
5363
|
var _useTranslation = useTranslation(),
|
|
5379
5364
|
t = _useTranslation.t;
|
|
5380
|
-
var classes = useStyles$
|
|
5365
|
+
var classes = useStyles$1();
|
|
5381
5366
|
return /*#__PURE__*/jsxs("div", {
|
|
5382
5367
|
style: {
|
|
5383
5368
|
marginTop: '0.4rem',
|
|
@@ -5430,7 +5415,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5430
5415
|
onClickSave(undefined, false, true);
|
|
5431
5416
|
},
|
|
5432
5417
|
className: classes.margin,
|
|
5433
|
-
children: t('
|
|
5418
|
+
children: t('basket.checkout.actions.saveAsFavorite')
|
|
5434
5419
|
})
|
|
5435
5420
|
}), status == 'BASE_CONFIGURATION' && /*#__PURE__*/jsx(Button$1, {
|
|
5436
5421
|
variant: "outlined",
|
|
@@ -5441,7 +5426,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5441
5426
|
onClickSave(undefined, false, true, true);
|
|
5442
5427
|
},
|
|
5443
5428
|
className: classes.margin,
|
|
5444
|
-
children: t('
|
|
5429
|
+
children: t('basket.checkout.actions.saveAndOrderMedia')
|
|
5445
5430
|
}), (configSaveButtons === null || configSaveButtons === void 0 ? void 0 : configSaveButtons.includes('NEW')) && /*#__PURE__*/jsx(Button$1, {
|
|
5446
5431
|
variant: "outlined",
|
|
5447
5432
|
size: "medium",
|
|
@@ -5749,8 +5734,8 @@ var HQ_RenderingTypeSource = [{
|
|
|
5749
5734
|
RenderPipeline: 'vRayNext'
|
|
5750
5735
|
}];
|
|
5751
5736
|
|
|
5752
|
-
function ownKeys$
|
|
5753
|
-
function _objectSpread$
|
|
5737
|
+
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; }
|
|
5738
|
+
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
5739
|
function useProduct(basket) {
|
|
5755
5740
|
var _useState = useState(undefined),
|
|
5756
5741
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5772,7 +5757,7 @@ function useProduct(basket) {
|
|
|
5772
5757
|
});
|
|
5773
5758
|
case 2:
|
|
5774
5759
|
myProduct = _context.sent;
|
|
5775
|
-
setCurrentProduct(_objectSpread$
|
|
5760
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myProduct.baseData), {}, {
|
|
5776
5761
|
parent: (_myProduct$baseData$p = myProduct.baseData.parent) !== null && _myProduct$baseData$p !== void 0 ? _myProduct$baseData$p : myProduct.baseData._id
|
|
5777
5762
|
}));
|
|
5778
5763
|
return _context.abrupt("return", myProduct);
|
|
@@ -5802,7 +5787,7 @@ function useProduct(basket) {
|
|
|
5802
5787
|
});
|
|
5803
5788
|
case 2:
|
|
5804
5789
|
myproduct = _context2.sent;
|
|
5805
|
-
setCurrentProduct(_objectSpread$
|
|
5790
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myproduct[0]), {}, {
|
|
5806
5791
|
parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
|
|
5807
5792
|
}));
|
|
5808
5793
|
if (!favourite) {
|
|
@@ -5810,7 +5795,7 @@ function useProduct(basket) {
|
|
|
5810
5795
|
break;
|
|
5811
5796
|
}
|
|
5812
5797
|
_context2.next = 7;
|
|
5813
|
-
return productHandler.
|
|
5798
|
+
return productHandler.apiMarkAsFavorite(currentProduct._id, basket.OrganizationId);
|
|
5814
5799
|
case 7:
|
|
5815
5800
|
setCurrentProduct(currentProduct);
|
|
5816
5801
|
basket.DocumentVersion = basket.DocumentVersion + 1;
|
|
@@ -5865,8 +5850,8 @@ var hqMediaTitle = "hqMediaTitle-ugda8";
|
|
|
5865
5850
|
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
5851
|
styleInject(css_248z$a);
|
|
5867
5852
|
|
|
5868
|
-
function ownKeys$
|
|
5869
|
-
function _objectSpread$
|
|
5853
|
+
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; }
|
|
5854
|
+
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
5855
|
function CheckOut(_ref) {
|
|
5871
5856
|
var _basket$Client;
|
|
5872
5857
|
var schema = _ref.schema,
|
|
@@ -5893,18 +5878,24 @@ function CheckOut(_ref) {
|
|
|
5893
5878
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
5894
5879
|
showRenderJobs = _useState6[0],
|
|
5895
5880
|
setShowRenderJobs = _useState6[1];
|
|
5881
|
+
var _useState7 = useState(false),
|
|
5882
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5883
|
+
basket3DExportChecked = _useState8[0],
|
|
5884
|
+
setBasket3DExportChecked = _useState8[1];
|
|
5896
5885
|
var _useTranslation = useTranslation(),
|
|
5897
5886
|
t = _useTranslation.t;
|
|
5898
5887
|
var _useSellerState = useSellerState(),
|
|
5899
|
-
|
|
5900
|
-
catalogData = _useSellerState$state.catalogData;
|
|
5901
|
-
_useSellerState$state.configurationData;
|
|
5888
|
+
catalogData = _useSellerState.state.catalogData;
|
|
5902
5889
|
var _useDivaCore = useDivaCore(),
|
|
5903
5890
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
5904
5891
|
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
5905
5892
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
5906
5893
|
openModal = _useDivaCore$actions.openModal,
|
|
5907
|
-
productHandler = _useDivaCore.handler.productHandler
|
|
5894
|
+
productHandler = _useDivaCore.handler.productHandler,
|
|
5895
|
+
_useDivaCore$state = _useDivaCore.state,
|
|
5896
|
+
apiConfig = _useDivaCore$state.apiConfig,
|
|
5897
|
+
jwt = _useDivaCore$state.jwt,
|
|
5898
|
+
organization = _useDivaCore$state.organization;
|
|
5908
5899
|
var _useProduct = useProduct(basket),
|
|
5909
5900
|
currentProduct = _useProduct.currentProduct,
|
|
5910
5901
|
loadProduct = _useProduct.loadProduct,
|
|
@@ -5969,26 +5960,26 @@ function CheckOut(_ref) {
|
|
|
5969
5960
|
};
|
|
5970
5961
|
}();
|
|
5971
5962
|
var handleSave = useCallback(/*#__PURE__*/function () {
|
|
5972
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5973
|
-
return _regeneratorRuntime.wrap(function
|
|
5974
|
-
while (1) switch (
|
|
5963
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(openPDF, sendMail, favourite, hqMedia) {
|
|
5964
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
5965
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
5975
5966
|
case 0:
|
|
5976
5967
|
if (!(status === 'BASE_CONFIGURATION')) {
|
|
5977
|
-
|
|
5968
|
+
_context4.next = 13;
|
|
5978
5969
|
break;
|
|
5979
5970
|
}
|
|
5980
5971
|
if (!hqMedia) {
|
|
5981
|
-
|
|
5972
|
+
_context4.next = 6;
|
|
5982
5973
|
break;
|
|
5983
5974
|
}
|
|
5984
|
-
|
|
5975
|
+
_context4.next = 4;
|
|
5985
5976
|
return saveProductAndShowHqMedia();
|
|
5986
5977
|
case 4:
|
|
5987
|
-
|
|
5978
|
+
_context4.next = 11;
|
|
5988
5979
|
break;
|
|
5989
5980
|
case 6:
|
|
5990
5981
|
toggleLoading('saveProduct');
|
|
5991
|
-
|
|
5982
|
+
_context4.next = 9;
|
|
5992
5983
|
return saveProduct(favourite);
|
|
5993
5984
|
case 9:
|
|
5994
5985
|
toggleLoading('saveProduct');
|
|
@@ -5999,28 +5990,60 @@ function CheckOut(_ref) {
|
|
|
5999
5990
|
});
|
|
6000
5991
|
case 11:
|
|
6001
5992
|
setIsSaved(true);
|
|
6002
|
-
return
|
|
5993
|
+
return _context4.abrupt("return");
|
|
6003
5994
|
case 13:
|
|
6004
5995
|
if (!isSaving) {
|
|
6005
5996
|
setIsSaving(true);
|
|
6006
|
-
onClickSave(openPDF, sendMail).then(function (
|
|
6007
|
-
|
|
6008
|
-
|
|
5997
|
+
onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
|
|
5998
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
|
|
5999
|
+
var newRenderJob;
|
|
6000
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6001
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
6002
|
+
case 0:
|
|
6003
|
+
if (!basket3DExportChecked) {
|
|
6004
|
+
_context3.next = 4;
|
|
6005
|
+
break;
|
|
6006
|
+
}
|
|
6007
|
+
newRenderJob = {
|
|
6008
|
+
divaNr: basket.DivaNr,
|
|
6009
|
+
organization: basket.OrganizationId,
|
|
6010
|
+
job: '3DEXPORT',
|
|
6011
|
+
diva3DProject: basket.Diva3DProject ? atob(basket.Diva3DProject) : undefined,
|
|
6012
|
+
hQRenderScript: basket.OrderSets[0].HQRenderScript
|
|
6013
|
+
};
|
|
6014
|
+
_context3.next = 4;
|
|
6015
|
+
return apiSaveRenderJobs({
|
|
6016
|
+
serviceUrl: apiConfig.mediaService,
|
|
6017
|
+
jobs: [newRenderJob],
|
|
6018
|
+
jwt: jwt
|
|
6019
|
+
});
|
|
6020
|
+
case 4:
|
|
6021
|
+
setIsSaving(false);
|
|
6022
|
+
case 5:
|
|
6023
|
+
case "end":
|
|
6024
|
+
return _context3.stop();
|
|
6025
|
+
}
|
|
6026
|
+
}, _callee3);
|
|
6027
|
+
}));
|
|
6028
|
+
return function (_x5) {
|
|
6029
|
+
return _ref5.apply(this, arguments);
|
|
6030
|
+
};
|
|
6031
|
+
}())["catch"](function () {
|
|
6009
6032
|
return setIsSaving(false);
|
|
6010
6033
|
});
|
|
6011
6034
|
}
|
|
6012
6035
|
case 14:
|
|
6013
6036
|
case "end":
|
|
6014
|
-
return
|
|
6037
|
+
return _context4.stop();
|
|
6015
6038
|
}
|
|
6016
|
-
},
|
|
6039
|
+
}, _callee4);
|
|
6017
6040
|
}));
|
|
6018
6041
|
return function (_x, _x2, _x3, _x4) {
|
|
6019
6042
|
return _ref4.apply(this, arguments);
|
|
6020
6043
|
};
|
|
6021
|
-
}(), [isSaving, onClickSave]);
|
|
6022
|
-
var onChangeForm = function onChangeForm(
|
|
6023
|
-
var data =
|
|
6044
|
+
}(), [isSaving, onClickSave, basket3DExportChecked]);
|
|
6045
|
+
var onChangeForm = function onChangeForm(_ref6) {
|
|
6046
|
+
var data = _ref6.data;
|
|
6024
6047
|
for (var key in data) {
|
|
6025
6048
|
basket[key] = data[key];
|
|
6026
6049
|
}
|
|
@@ -6034,7 +6057,7 @@ function CheckOut(_ref) {
|
|
|
6034
6057
|
};
|
|
6035
6058
|
|
|
6036
6059
|
// for LEAFLET don't show printOptions, if there are any configured.
|
|
6037
|
-
var finalSchema = _objectSpread$
|
|
6060
|
+
var finalSchema = _objectSpread$r(_objectSpread$r({}, uiSchema), {}, {
|
|
6038
6061
|
elements: _toConsumableArray(uiSchema.elements)
|
|
6039
6062
|
});
|
|
6040
6063
|
if (status == 'LEAFLET') {
|
|
@@ -6046,6 +6069,9 @@ function CheckOut(_ref) {
|
|
|
6046
6069
|
}
|
|
6047
6070
|
}
|
|
6048
6071
|
var permissionAnyHqRenderBox = userHasPermission('anyhqrenderbox');
|
|
6072
|
+
var handleCheckBoxChange = function handleCheckBoxChange(event) {
|
|
6073
|
+
setBasket3DExportChecked(event.target.checked);
|
|
6074
|
+
};
|
|
6049
6075
|
return /*#__PURE__*/jsxs("div", {
|
|
6050
6076
|
style: {
|
|
6051
6077
|
display: 'flex',
|
|
@@ -6136,7 +6162,21 @@ function CheckOut(_ref) {
|
|
|
6136
6162
|
}), !!renderService && permissionAnyHqRenderBox && (catalogData === null || catalogData === void 0 ? void 0 : catalogData[0].has3D) && /*#__PURE__*/jsx(HqRenderBox, {
|
|
6137
6163
|
basket: basket,
|
|
6138
6164
|
config: renderService
|
|
6139
|
-
}),
|
|
6165
|
+
}), (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", {
|
|
6166
|
+
style: {
|
|
6167
|
+
marginLeft: '50px',
|
|
6168
|
+
width: '700px'
|
|
6169
|
+
},
|
|
6170
|
+
children: [/*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6171
|
+
control: /*#__PURE__*/jsx(Checkbox$1, {
|
|
6172
|
+
onChange: handleCheckBoxChange
|
|
6173
|
+
}),
|
|
6174
|
+
label: t('basket.checkout.order3dexport')
|
|
6175
|
+
}), /*#__PURE__*/jsxs(Typography, {
|
|
6176
|
+
variant: "caption",
|
|
6177
|
+
children: ["(", t('basket.checkout.3dexport'), ")"]
|
|
6178
|
+
})]
|
|
6179
|
+
}), gdpr && !isEmpty(basket === null || basket === void 0 ? void 0 : basket.Client) && /*#__PURE__*/jsx(FormControlLabel$1, {
|
|
6140
6180
|
style: {
|
|
6141
6181
|
marginLeft: '40px'
|
|
6142
6182
|
},
|
|
@@ -6174,12 +6214,12 @@ function isEmpty(data) {
|
|
|
6174
6214
|
});
|
|
6175
6215
|
}
|
|
6176
6216
|
|
|
6177
|
-
function ownKeys$
|
|
6178
|
-
function _objectSpread$
|
|
6217
|
+
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; }
|
|
6218
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6179
6219
|
var schema = function schema(hideWWSButton) {
|
|
6180
6220
|
return {
|
|
6181
6221
|
type: 'object',
|
|
6182
|
-
properties: _objectSpread$
|
|
6222
|
+
properties: _objectSpread$q(_objectSpread$q({
|
|
6183
6223
|
Salesperson: {
|
|
6184
6224
|
type: 'string',
|
|
6185
6225
|
title: 'basket.checkout.form.seller'
|
|
@@ -6433,9 +6473,9 @@ function Step3Checkout(_ref) {
|
|
|
6433
6473
|
});
|
|
6434
6474
|
}
|
|
6435
6475
|
|
|
6436
|
-
function ownKeys$
|
|
6437
|
-
function _objectSpread$
|
|
6438
|
-
var LOG$
|
|
6476
|
+
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; }
|
|
6477
|
+
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; }
|
|
6478
|
+
var LOG$4 = getLogger('SellerBasket', 'Basket');
|
|
6439
6479
|
function Basket(_ref) {
|
|
6440
6480
|
var _configurationData$Ch5;
|
|
6441
6481
|
var divaNr = _ref.divaNr,
|
|
@@ -6477,7 +6517,7 @@ function Basket(_ref) {
|
|
|
6477
6517
|
resetBasketState = _useSellerState$actio.resetBasketState;
|
|
6478
6518
|
var statusRef = useRef(basket !== null && basket !== void 0 && basket.StatusKey ? basket === null || basket === void 0 ? void 0 : basket.StatusKey : basket !== null && basket !== void 0 && basket.Status ? basket === null || basket === void 0 ? void 0 : basket.Status : '');
|
|
6479
6519
|
useEffect(function () {
|
|
6480
|
-
LOG$
|
|
6520
|
+
LOG$4.startTransaction({
|
|
6481
6521
|
event: 'onOpenModule',
|
|
6482
6522
|
message: 'Open Basket',
|
|
6483
6523
|
eventId: 'ON_OPEN_MODULE_BASKET',
|
|
@@ -6485,11 +6525,12 @@ function Basket(_ref) {
|
|
|
6485
6525
|
divaNr: divaNr
|
|
6486
6526
|
}
|
|
6487
6527
|
});
|
|
6528
|
+
if (!basket) DivaUtils$1.businessMetrics.setConfiguratorSessionId();
|
|
6488
6529
|
}, []);
|
|
6489
6530
|
useEffect(function () {
|
|
6490
6531
|
openBasket(statusRef, divaNr, checkBasket, basket).then(function () {
|
|
6491
6532
|
var _getBasketStatusArr;
|
|
6492
|
-
LOG$
|
|
6533
|
+
LOG$4.successTransaction('ON_OPEN_MODULE_BASKET', {
|
|
6493
6534
|
divaNr: divaNr
|
|
6494
6535
|
});
|
|
6495
6536
|
if (!statusRef.current || !((_getBasketStatusArr = getBasketStatusArr()) !== null && _getBasketStatusArr !== void 0 && _getBasketStatusArr.includes(statusRef.current))) {
|
|
@@ -6525,7 +6566,7 @@ function Basket(_ref) {
|
|
|
6525
6566
|
}
|
|
6526
6567
|
}, [currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.step]);
|
|
6527
6568
|
useEffect(function () {
|
|
6528
|
-
LOG$
|
|
6569
|
+
LOG$4.businessEvent('onBasketStep', 'SellerBasket', "goto BasketStep '".concat(actBasketPage, "'"), {
|
|
6529
6570
|
basketStep: actBasketPage
|
|
6530
6571
|
});
|
|
6531
6572
|
}, [actBasketPage]);
|
|
@@ -6700,7 +6741,7 @@ function Basket(_ref) {
|
|
|
6700
6741
|
});
|
|
6701
6742
|
*/
|
|
6702
6743
|
}
|
|
6703
|
-
LOG$
|
|
6744
|
+
LOG$4.successTransaction('ON_SAVE_BASKET', {
|
|
6704
6745
|
divaNr: currentBasket.DivaNr,
|
|
6705
6746
|
status: currentBasket.Status,
|
|
6706
6747
|
documentVersion: currentBasket.DocumentVersion,
|
|
@@ -6767,7 +6808,7 @@ function Basket(_ref) {
|
|
|
6767
6808
|
};
|
|
6768
6809
|
}();
|
|
6769
6810
|
var errorOnSaving = function errorOnSaving(type) {
|
|
6770
|
-
LOG$
|
|
6811
|
+
LOG$4.errorTransaction('ON_SAVE_BASKET', 'SELLER_0003', 'Error Saving Basket', {
|
|
6771
6812
|
divaNr: currentBasket.DivaNr,
|
|
6772
6813
|
status: currentBasket.Status,
|
|
6773
6814
|
documentVersion: currentBasket.DocumentVersion,
|
|
@@ -6784,7 +6825,7 @@ function Basket(_ref) {
|
|
|
6784
6825
|
var _currentBasket$OrderS2, _currentBasket$OrderS3, _currentBasket$OrderS4;
|
|
6785
6826
|
openComponent({
|
|
6786
6827
|
type: 'SELLER',
|
|
6787
|
-
parameters: _objectSpread$
|
|
6828
|
+
parameters: _objectSpread$p({
|
|
6788
6829
|
module: 'Info',
|
|
6789
6830
|
catalogCodex: currentBasket === null || currentBasket === void 0 || (_currentBasket$OrderS2 = currentBasket.OrderSets[0]) === null || _currentBasket$OrderS2 === void 0 ? void 0 : _currentBasket$OrderS2.CatalogCodex
|
|
6790
6831
|
}, currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS3 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS3 !== void 0 && _currentBasket$OrderS3.AccountGUID ? {
|
|
@@ -6862,719 +6903,200 @@ function Basket(_ref) {
|
|
|
6862
6903
|
});
|
|
6863
6904
|
}
|
|
6864
6905
|
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
useEffect(function () {
|
|
6875
|
-
setOpen(!hide && !!data);
|
|
6876
|
-
}, [hide, data]);
|
|
6877
|
-
return /*#__PURE__*/jsx("div", {
|
|
6878
|
-
className: classes.root,
|
|
6879
|
-
children: /*#__PURE__*/jsxs(Paper, {
|
|
6880
|
-
className: "".concat(classes.paper, " ").concat(open ? '' : 'hide'),
|
|
6881
|
-
elevation: 4,
|
|
6882
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
6883
|
-
className: classes.expander,
|
|
6884
|
-
onClick: function onClick() {
|
|
6885
|
-
return setOpen(!open);
|
|
6886
|
-
},
|
|
6887
|
-
children: [open && /*#__PURE__*/jsx(ArrowBackIosIcon, {}), !open && /*#__PURE__*/jsx(ArrowForwardIosIcon, {})]
|
|
6888
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
6889
|
-
variant: "h5",
|
|
6890
|
-
children: (data === null || data === void 0 ? void 0 : data.name) || ''
|
|
6891
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
6892
|
-
className: classes.scrollWrapper,
|
|
6893
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
6894
|
-
component: "div",
|
|
6895
|
-
children: /*#__PURE__*/jsx("div", {
|
|
6896
|
-
dangerouslySetInnerHTML: {
|
|
6897
|
-
__html: (data === null || data === void 0 ? void 0 : data.description) || ''
|
|
6898
|
-
}
|
|
6899
|
-
})
|
|
6900
|
-
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
6901
|
-
return /*#__PURE__*/jsxs("div", {
|
|
6902
|
-
className: classes.document,
|
|
6903
|
-
children: [/*#__PURE__*/jsx(PictureAsPdfIcon, {}), /*#__PURE__*/jsx(Typography, {
|
|
6904
|
-
children: /*#__PURE__*/jsx(Link, {
|
|
6905
|
-
href: d.url,
|
|
6906
|
-
download: true,
|
|
6907
|
-
target: "_blank",
|
|
6908
|
-
children: d.name
|
|
6909
|
-
})
|
|
6910
|
-
})]
|
|
6911
|
-
}, i);
|
|
6912
|
-
})]
|
|
6913
|
-
})]
|
|
6914
|
-
})
|
|
6915
|
-
});
|
|
6916
|
-
}
|
|
6917
|
-
var useStyles$4 = makeStyles(function (theme) {
|
|
6918
|
-
return {
|
|
6919
|
-
root: {
|
|
6920
|
-
position: 'absolute',
|
|
6921
|
-
height: '100%',
|
|
6922
|
-
width: '500px',
|
|
6923
|
-
overflow: 'hidden'
|
|
6924
|
-
},
|
|
6925
|
-
paper: {
|
|
6926
|
-
display: 'flex',
|
|
6927
|
-
width: '300px',
|
|
6928
|
-
minHeight: '60px',
|
|
6929
|
-
maxHeight: 'calc(100% - 150px - 300px)',
|
|
6930
|
-
flexDirection: 'column',
|
|
6931
|
-
justifyContent: 'center',
|
|
6932
|
-
position: 'absolute',
|
|
6933
|
-
top: 150,
|
|
6934
|
-
left: 0,
|
|
6935
|
-
zIndex: 3,
|
|
6936
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
6937
|
-
transition: 'all 0.4s ease-in-out 0s',
|
|
6938
|
-
borderRadius: '0 4px 4px 0',
|
|
6939
|
-
padding: '1rem',
|
|
6940
|
-
'&.hide': {
|
|
6941
|
-
left: 'calc(-300px + -2rem)'
|
|
6942
|
-
}
|
|
6943
|
-
},
|
|
6944
|
-
scrollWrapper: {
|
|
6945
|
-
overflow: 'auto'
|
|
6946
|
-
},
|
|
6947
|
-
expander: {
|
|
6948
|
-
display: 'flex',
|
|
6949
|
-
alignItems: 'center',
|
|
6950
|
-
justifyContent: 'center',
|
|
6951
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
6952
|
-
width: 30,
|
|
6953
|
-
height: 40,
|
|
6954
|
-
right: '-30px',
|
|
6955
|
-
top: 10,
|
|
6956
|
-
zIndex: 10,
|
|
6957
|
-
position: 'absolute',
|
|
6958
|
-
boxShadow: '2px 0px 5px 0px rgba(0,0,0,0.2)',
|
|
6959
|
-
borderRadius: '0 4px 4px 0',
|
|
6960
|
-
'&:hover': {
|
|
6961
|
-
cursor: 'pointer'
|
|
6962
|
-
}
|
|
6963
|
-
},
|
|
6964
|
-
document: {
|
|
6965
|
-
display: 'flex',
|
|
6966
|
-
'& svg': {
|
|
6967
|
-
marginRight: '10px'
|
|
6968
|
-
}
|
|
6969
|
-
}
|
|
6970
|
-
};
|
|
6971
|
-
});
|
|
6906
|
+
var wrapper$6 = "wrapper-fSL18";
|
|
6907
|
+
var title$2 = "title-iTDPA";
|
|
6908
|
+
var descriptionContainer$1 = "description-container-k1vLT";
|
|
6909
|
+
var modelTitle = "model-title-Sgm-0";
|
|
6910
|
+
var description = "description-GyPZq";
|
|
6911
|
+
var pdf = "pdf-oNnao";
|
|
6912
|
+
var hidden = "hidden-xYPOr";
|
|
6913
|
+
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";
|
|
6914
|
+
styleInject(css_248z$9);
|
|
6972
6915
|
|
|
6973
|
-
|
|
6974
|
-
|
|
6916
|
+
var _excluded$6 = ["data", "text"];
|
|
6917
|
+
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; }
|
|
6918
|
+
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; }
|
|
6919
|
+
function Description$1 (_ref) {
|
|
6975
6920
|
var data = _ref.data,
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
hide = _ref.hide,
|
|
6979
|
-
loading = _ref.loading;
|
|
6921
|
+
text = _ref.text,
|
|
6922
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
6980
6923
|
var _useTranslation = useTranslation(),
|
|
6981
6924
|
t = _useTranslation.t;
|
|
6982
|
-
|
|
6983
|
-
var
|
|
6984
|
-
return (data === null || data === void 0 ? void 0 : data.images.map(function () {
|
|
6985
|
-
return /*#__PURE__*/React.createRef();
|
|
6986
|
-
})) || [];
|
|
6987
|
-
}, [data]);
|
|
6988
|
-
var classes = useStyles$3();
|
|
6989
|
-
var _useState = useState(false),
|
|
6925
|
+
//hiden is only for smaller devices relevant
|
|
6926
|
+
var _useState = useState(true),
|
|
6990
6927
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
}
|
|
7001
|
-
}, [selected, open]);
|
|
7002
|
-
return /*#__PURE__*/jsx("div", {
|
|
7003
|
-
className: classes.root,
|
|
7004
|
-
children: /*#__PURE__*/jsxs(Paper, {
|
|
7005
|
-
className: "".concat(classes.paper, " ").concat(open ? '' : 'hide'),
|
|
7006
|
-
elevation: 4,
|
|
7007
|
-
onWheel: function onWheel(e) {
|
|
7008
|
-
return listRef.current.scrollLeft = listRef.current.scrollLeft + e.deltaY * 10;
|
|
7009
|
-
},
|
|
7010
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
7011
|
-
className: classes.expander,
|
|
6928
|
+
isHidden = _useState2[0],
|
|
6929
|
+
setIsHidden = _useState2[1];
|
|
6930
|
+
return /*#__PURE__*/jsxs("div", _objectSpread$o(_objectSpread$o({}, props), {}, {
|
|
6931
|
+
className: classnames(wrapper$6, isHidden ? hidden : undefined, props.className),
|
|
6932
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6933
|
+
className: title$2,
|
|
6934
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
6935
|
+
children: t(text)
|
|
6936
|
+
}), /*#__PURE__*/jsx(IconButton$1, {
|
|
7012
6937
|
onClick: function onClick() {
|
|
7013
|
-
return
|
|
7014
|
-
},
|
|
7015
|
-
children: [!open && /*#__PURE__*/jsx(ExpandLess, {}), open && /*#__PURE__*/jsx(ExpandMore, {}), /*#__PURE__*/jsx(Typography$1, {
|
|
7016
|
-
variant: "button",
|
|
7017
|
-
style: {
|
|
7018
|
-
padding: '0 15px 0 5px'
|
|
7019
|
-
},
|
|
7020
|
-
children: t('info.buttons.images')
|
|
7021
|
-
})]
|
|
7022
|
-
}), /*#__PURE__*/jsxs(GridList, {
|
|
7023
|
-
ref: listRef,
|
|
7024
|
-
cols: (data === null || data === void 0 || (_data$images = data.images) === null || _data$images === void 0 ? void 0 : _data$images.length) == 1 ? 1 : 2,
|
|
7025
|
-
className: classes.gridList,
|
|
7026
|
-
style: {
|
|
7027
|
-
margin: 0
|
|
6938
|
+
return setIsHidden(!isHidden);
|
|
7028
6939
|
},
|
|
7029
|
-
children:
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
className: classes.gridTile,
|
|
7045
|
-
children: /*#__PURE__*/jsx("div", {
|
|
7046
|
-
style: {
|
|
7047
|
-
height: 120,
|
|
7048
|
-
width: 160
|
|
7049
|
-
}
|
|
6940
|
+
children: /*#__PURE__*/jsx(InfoRounded, {})
|
|
6941
|
+
})]
|
|
6942
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6943
|
+
className: descriptionContainer$1,
|
|
6944
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
6945
|
+
className: modelTitle,
|
|
6946
|
+
children: data.name
|
|
6947
|
+
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
6948
|
+
return /*#__PURE__*/jsx("div", {
|
|
6949
|
+
className: pdf,
|
|
6950
|
+
children: /*#__PURE__*/jsx(Link, {
|
|
6951
|
+
href: d.url,
|
|
6952
|
+
download: true,
|
|
6953
|
+
target: "_blank",
|
|
6954
|
+
children: d.name
|
|
7050
6955
|
})
|
|
7051
|
-
}
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
className: classes.gridTile,
|
|
7058
|
-
children: /*#__PURE__*/jsx(Card, {
|
|
7059
|
-
className: "".concat(classes.card, " ").concat(selected == i ? 'selected' : ''),
|
|
7060
|
-
children: /*#__PURE__*/jsx(CardActionArea, {
|
|
7061
|
-
className: classes.cardActionArea,
|
|
7062
|
-
onClick: function onClick() {
|
|
7063
|
-
return setSelected(i);
|
|
7064
|
-
},
|
|
7065
|
-
children: /*#__PURE__*/jsx(CardMedia, {
|
|
7066
|
-
className: classes.cardMedia,
|
|
7067
|
-
image: getImageOrFallbackUrl(img.thumbUrl)
|
|
7068
|
-
})
|
|
7069
|
-
})
|
|
7070
|
-
})
|
|
7071
|
-
}, i)
|
|
7072
|
-
);
|
|
7073
|
-
}))]
|
|
6956
|
+
}, i);
|
|
6957
|
+
}), data.description && /*#__PURE__*/jsx("div", {
|
|
6958
|
+
className: description,
|
|
6959
|
+
dangerouslySetInnerHTML: {
|
|
6960
|
+
__html: data.description
|
|
6961
|
+
}
|
|
7074
6962
|
})]
|
|
6963
|
+
})]
|
|
6964
|
+
}));
|
|
6965
|
+
}
|
|
6966
|
+
|
|
6967
|
+
var container = "container-Sr3pC";
|
|
6968
|
+
var icon$1 = "icon-0h-39";
|
|
6969
|
+
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";
|
|
6970
|
+
styleInject(css_248z$8);
|
|
6971
|
+
|
|
6972
|
+
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; }
|
|
6973
|
+
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; }
|
|
6974
|
+
function ArticleSvg (props) {
|
|
6975
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
6976
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6977
|
+
viewBox: "0 0 24 24",
|
|
6978
|
+
children: /*#__PURE__*/jsx("path", {
|
|
6979
|
+
fill: "currentColor",
|
|
6980
|
+
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
|
|
7075
6981
|
})
|
|
7076
|
-
});
|
|
6982
|
+
}));
|
|
7077
6983
|
}
|
|
7078
|
-
var useStyles$3 = makeStyles(function (theme) {
|
|
7079
|
-
return {
|
|
7080
|
-
root: {
|
|
7081
|
-
position: 'absolute',
|
|
7082
|
-
bottom: 0,
|
|
7083
|
-
height: '300px',
|
|
7084
|
-
width: '100%',
|
|
7085
|
-
overflow: 'hidden'
|
|
7086
|
-
},
|
|
7087
|
-
paper: {
|
|
7088
|
-
display: 'flex',
|
|
7089
|
-
width: '100%',
|
|
7090
|
-
justifyContent: 'center',
|
|
7091
|
-
position: 'absolute',
|
|
7092
|
-
bottom: 0,
|
|
7093
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7094
|
-
transition: 'all 0.4s ease-in-out 0s',
|
|
7095
|
-
'&.hide': {
|
|
7096
|
-
bottom: '-199px'
|
|
7097
|
-
}
|
|
7098
|
-
},
|
|
7099
|
-
expander: {
|
|
7100
|
-
display: 'flex',
|
|
7101
|
-
alignItems: 'center',
|
|
7102
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7103
|
-
height: 40,
|
|
7104
|
-
top: '-40px',
|
|
7105
|
-
right: 24,
|
|
7106
|
-
zIndex: 10,
|
|
7107
|
-
position: 'absolute',
|
|
7108
|
-
boxShadow: '2px -2px 5px -1px rgba(0,0,0,0.2),0px -2px 5px 0px rgba(0,0,0,0.2)',
|
|
7109
|
-
borderRadius: '4px 4px 0 0',
|
|
7110
|
-
'&:hover': {
|
|
7111
|
-
cursor: 'pointer'
|
|
7112
|
-
}
|
|
7113
|
-
},
|
|
7114
|
-
gridList: {
|
|
7115
|
-
flexWrap: 'nowrap',
|
|
7116
|
-
// Promote the list into his own layer on Chrome. This cost memory but helps keeping high FPS.
|
|
7117
|
-
transform: 'translateZ(0)'
|
|
7118
|
-
},
|
|
7119
|
-
gridTile: {
|
|
7120
|
-
flexShrink: 'initial',
|
|
7121
|
-
height: '100%'
|
|
7122
|
-
},
|
|
7123
|
-
card: {
|
|
7124
|
-
height: 120,
|
|
7125
|
-
width: 160,
|
|
7126
|
-
margin: '15px 5px',
|
|
7127
|
-
display: 'flex',
|
|
7128
|
-
alignItems: 'stretch',
|
|
7129
|
-
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
7130
|
-
'&.selected': {
|
|
7131
|
-
border: '1px solid #4B4B4B'
|
|
7132
|
-
}
|
|
7133
|
-
},
|
|
7134
|
-
cardActionArea: {
|
|
7135
|
-
display: 'flex',
|
|
7136
|
-
flexDirection: 'column',
|
|
7137
|
-
justifyContent: 'start'
|
|
7138
|
-
},
|
|
7139
|
-
cardMedia: {
|
|
7140
|
-
height: '100%',
|
|
7141
|
-
width: '100%',
|
|
7142
|
-
backgroundSize: 'auto 100%'
|
|
7143
|
-
}
|
|
7144
|
-
};
|
|
7145
|
-
});
|
|
7146
6984
|
|
|
7147
|
-
function
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
children:
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
index: selected,
|
|
7160
|
-
onChange: function onChange(next) {
|
|
7161
|
-
if (next !== selected) {
|
|
7162
|
-
setSelected(next);
|
|
7163
|
-
}
|
|
7164
|
-
},
|
|
7165
|
-
children: data === null || data === void 0 ? void 0 : data.images.map(function (img, i) {
|
|
7166
|
-
return /*#__PURE__*/jsx("div", {
|
|
7167
|
-
style: {
|
|
7168
|
-
backgroundImage: "url(".concat(getImageOrFallbackUrl(img.url), ")")
|
|
7169
|
-
},
|
|
7170
|
-
className: classes.image,
|
|
7171
|
-
onWheel: function onWheel(e) {
|
|
7172
|
-
return setSelected(getNext(e.deltaY, selected, data.images.length));
|
|
7173
|
-
},
|
|
7174
|
-
onClick: onClick
|
|
7175
|
-
}, i);
|
|
7176
|
-
})
|
|
7177
|
-
}), /*#__PURE__*/jsx("div", {
|
|
7178
|
-
style: {
|
|
7179
|
-
height: '100px'
|
|
7180
|
-
}
|
|
7181
|
-
})]
|
|
7182
|
-
});
|
|
6985
|
+
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; }
|
|
6986
|
+
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; }
|
|
6987
|
+
function EmptyPlanningSvg (props) {
|
|
6988
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
6989
|
+
viewBox: "0 0 24 24",
|
|
6990
|
+
fill: "none",
|
|
6991
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6992
|
+
children: /*#__PURE__*/jsx("path", {
|
|
6993
|
+
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",
|
|
6994
|
+
fill: "currentColor"
|
|
6995
|
+
})
|
|
6996
|
+
}));
|
|
7183
6997
|
}
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
6998
|
+
|
|
6999
|
+
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; }
|
|
7000
|
+
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; }
|
|
7001
|
+
function VarinatPlanningSvg (props) {
|
|
7002
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
7003
|
+
viewBox: "0 0 24 24",
|
|
7004
|
+
fill: "none",
|
|
7005
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7006
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7007
|
+
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",
|
|
7008
|
+
stroke: "currentColor",
|
|
7009
|
+
strokeWidth: "1.5",
|
|
7010
|
+
strokeLinecap: "round",
|
|
7011
|
+
strokeLinejoin: "round"
|
|
7012
|
+
})
|
|
7013
|
+
}));
|
|
7187
7014
|
}
|
|
7188
|
-
var useStyles$2 = makeStyles(function (theme) {
|
|
7189
|
-
return {
|
|
7190
|
-
carousel: {
|
|
7191
|
-
flex: 1,
|
|
7192
|
-
display: 'flex',
|
|
7193
|
-
flexDirection: 'column',
|
|
7194
|
-
'& div.CarouselItem': {
|
|
7195
|
-
flex: 1,
|
|
7196
|
-
display: 'flex',
|
|
7197
|
-
'& div': {
|
|
7198
|
-
height: '100%',
|
|
7199
|
-
width: '100%'
|
|
7200
|
-
}
|
|
7201
|
-
}
|
|
7202
|
-
},
|
|
7203
|
-
image: {
|
|
7204
|
-
backgroundRepeat: 'no-repeat',
|
|
7205
|
-
backgroundPosition: 'center',
|
|
7206
|
-
backgroundSize: 'auto 100%',
|
|
7207
|
-
marginTop: '10px'
|
|
7208
|
-
}
|
|
7209
|
-
};
|
|
7210
|
-
});
|
|
7211
7015
|
|
|
7212
|
-
function
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7016
|
+
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; }
|
|
7017
|
+
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; }
|
|
7018
|
+
function NavBackSvg (props) {
|
|
7019
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
7020
|
+
viewBox: "0 0 10 18",
|
|
7021
|
+
fill: "none",
|
|
7022
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7023
|
+
children: /*#__PURE__*/jsx("path", {
|
|
7024
|
+
d: "M9 1L1 9L9 17",
|
|
7025
|
+
stroke: "currentColor",
|
|
7026
|
+
strokeWidth: "1.5",
|
|
7027
|
+
strokeLinecap: "round",
|
|
7028
|
+
strokeLinejoin: "round"
|
|
7029
|
+
})
|
|
7030
|
+
}));
|
|
7031
|
+
}
|
|
7032
|
+
|
|
7033
|
+
function NavBar (buttons) {
|
|
7220
7034
|
var _useTranslation = useTranslation(),
|
|
7221
7035
|
t = _useTranslation.t;
|
|
7222
|
-
var
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
className: classes.button,
|
|
7230
|
-
disabled: !hasArticles,
|
|
7036
|
+
var varinatArticles = !buttons.planner ? 'contained' : 'outlined';
|
|
7037
|
+
var varinatVarinats = !buttons.articles && !buttons.planner ? 'contained' : 'outlined';
|
|
7038
|
+
var variantPlanner = 'contained';
|
|
7039
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7040
|
+
className: container,
|
|
7041
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
7042
|
+
variant: "outlined",
|
|
7231
7043
|
color: "primary",
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7044
|
+
startIcon: /*#__PURE__*/jsx(NavBackSvg, {
|
|
7045
|
+
className: icon$1
|
|
7046
|
+
}),
|
|
7047
|
+
onClick: function onClick() {
|
|
7048
|
+
return buttons.navigateBack();
|
|
7049
|
+
}
|
|
7236
7050
|
}), /*#__PURE__*/jsx(Button, {
|
|
7237
|
-
|
|
7238
|
-
|
|
7051
|
+
id: "diva-seller-info-openarticlesbtn",
|
|
7052
|
+
variant: varinatArticles,
|
|
7239
7053
|
color: "primary",
|
|
7240
|
-
|
|
7054
|
+
startIcon: /*#__PURE__*/jsx(ArticleSvg, {
|
|
7055
|
+
className: icon$1
|
|
7056
|
+
}),
|
|
7241
7057
|
onClick: function onClick() {
|
|
7242
|
-
return
|
|
7058
|
+
return buttons.articles();
|
|
7243
7059
|
},
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
disabled: !hasPlanner,
|
|
7060
|
+
children: t('info.buttons.articles')
|
|
7061
|
+
}), buttons.variantsPlanner && /*#__PURE__*/jsx(Button, {
|
|
7062
|
+
id: "diva-seller-info-openfavplannerbtn",
|
|
7063
|
+
variant: varinatVarinats,
|
|
7249
7064
|
color: "primary",
|
|
7250
|
-
|
|
7065
|
+
startIcon: /*#__PURE__*/jsx(VarinatPlanningSvg, {
|
|
7066
|
+
className: icon$1
|
|
7067
|
+
}),
|
|
7251
7068
|
onClick: function onClick() {
|
|
7252
|
-
return
|
|
7069
|
+
return buttons.variantsPlanner();
|
|
7253
7070
|
},
|
|
7254
7071
|
children: t('info.buttons.varinats')
|
|
7255
|
-
}),
|
|
7256
|
-
|
|
7257
|
-
|
|
7072
|
+
}), buttons.planner && /*#__PURE__*/jsx(Button, {
|
|
7073
|
+
id: "diva-seller-info-openplannerbtn",
|
|
7074
|
+
variant: variantPlanner,
|
|
7258
7075
|
color: "primary",
|
|
7259
|
-
|
|
7076
|
+
startIcon: /*#__PURE__*/jsx(EmptyPlanningSvg, {
|
|
7077
|
+
className: icon$1
|
|
7078
|
+
}),
|
|
7260
7079
|
onClick: function onClick() {
|
|
7261
|
-
return
|
|
7080
|
+
return buttons.planner();
|
|
7262
7081
|
},
|
|
7263
|
-
children: t('info.buttons.
|
|
7082
|
+
children: t('info.buttons.configurator')
|
|
7264
7083
|
})]
|
|
7265
7084
|
});
|
|
7266
7085
|
}
|
|
7267
|
-
var useStyles$1 = makeStyles(function (theme) {
|
|
7268
|
-
return {
|
|
7269
|
-
toolbar: {
|
|
7270
|
-
boxShadow: '0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)',
|
|
7271
|
-
zIndex: 10,
|
|
7272
|
-
padding: '12px 0'
|
|
7273
|
-
},
|
|
7274
|
-
spacer: {
|
|
7275
|
-
flex: 1
|
|
7276
|
-
},
|
|
7277
|
-
button: {
|
|
7278
|
-
margin: '0 10px'
|
|
7279
|
-
}
|
|
7280
|
-
};
|
|
7281
|
-
});
|
|
7282
|
-
|
|
7283
|
-
var LOG$4 = getLogger('Seller', 'Info');
|
|
7284
|
-
function Info$1(_ref) {
|
|
7285
|
-
var accountId = _ref.accountId,
|
|
7286
|
-
catalogCodex = _ref.catalogCodex;
|
|
7287
|
-
var _useTranslation = useTranslation(),
|
|
7288
|
-
t = _useTranslation.t,
|
|
7289
|
-
i18n = _useTranslation.i18n;
|
|
7290
|
-
var _useState = useState(),
|
|
7291
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7292
|
-
data = _useState2[0],
|
|
7293
|
-
setData = _useState2[1];
|
|
7294
|
-
var _useState3 = useState(true),
|
|
7295
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
7296
|
-
loading = _useState4[0],
|
|
7297
|
-
setLoading = _useState4[1];
|
|
7298
|
-
var _useSellerState = useSellerState(),
|
|
7299
|
-
_useSellerState$actio = _useSellerState.actions,
|
|
7300
|
-
loadCatalogInfo = _useSellerState$actio.loadCatalogInfo,
|
|
7301
|
-
openPlanner = _useSellerState$actio.openPlanner,
|
|
7302
|
-
openComponent = _useSellerState$actio.openComponent,
|
|
7303
|
-
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
7304
|
-
_useSellerState$state = _useSellerState.state,
|
|
7305
|
-
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
7306
|
-
catalogs = _useSellerState$state.catalogs;
|
|
7307
|
-
_useSellerState$state.currentUser;
|
|
7308
|
-
var currentBasketState = _useSellerState$state.currentBasketState,
|
|
7309
|
-
configurationData = _useSellerState$state.configurationData,
|
|
7310
|
-
returnTo = _useSellerState$state.returnTo,
|
|
7311
|
-
sessionGuid = _useSellerState$state.sessionGuid;
|
|
7312
|
-
var _useState5 = useState(0),
|
|
7313
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7314
|
-
selected = _useState6[0],
|
|
7315
|
-
setSelected = _useState6[1];
|
|
7316
|
-
var _useState7 = useState(false),
|
|
7317
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
7318
|
-
hideAll = _useState8[0],
|
|
7319
|
-
setHideAll = _useState8[1];
|
|
7320
|
-
var _useDivaCore = useDivaCore(),
|
|
7321
|
-
_useDivaCore$actions = _useDivaCore.actions,
|
|
7322
|
-
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
7323
|
-
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
7324
|
-
organization = _useDivaCore.state.organization;
|
|
7325
|
-
useEffect(function () {
|
|
7326
|
-
LOG$4.businessEvent('onOpenModule', 'SellerCatalogInfo', "Open Catalog Info", {
|
|
7327
|
-
cat: catalogCodex,
|
|
7328
|
-
accountId: accountId
|
|
7329
|
-
});
|
|
7330
|
-
}, []);
|
|
7331
|
-
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7332
|
-
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7333
|
-
openPlanner({
|
|
7334
|
-
catalogCodex: catalogCodex,
|
|
7335
|
-
accountId: accountId,
|
|
7336
|
-
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7337
|
-
forceReload: '1',
|
|
7338
|
-
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7339
|
-
returnTo: returnToPlanner !== null && returnToPlanner !== void 0 && returnToPlanner.endsWith('PRODUCTCREATOR') ? returnToPlanner : ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') ? 'OPEN_SELLER_PRODUCTCREATOR' : returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET'
|
|
7340
|
-
});
|
|
7341
|
-
} else {
|
|
7342
|
-
LOG$4.error(new DivaError('Missing account login ID', {
|
|
7343
|
-
code: 'SELLER_0001'
|
|
7344
|
-
}));
|
|
7345
|
-
}
|
|
7346
|
-
}, [openPlanner, catalogs, currentAccountLoginId]);
|
|
7347
|
-
var _onOpenArticles = useCallback(function () {
|
|
7348
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7349
|
-
openComponent({
|
|
7350
|
-
type: 'SELLER',
|
|
7351
|
-
parameters: {
|
|
7352
|
-
module: 'Articles',
|
|
7353
|
-
accountId: accountId,
|
|
7354
|
-
catalogCodex: catalogCodex
|
|
7355
|
-
}
|
|
7356
|
-
});
|
|
7357
|
-
} else {
|
|
7358
|
-
LOG$4.error(new DivaError('Missing account ID or catalog', {
|
|
7359
|
-
code: 'SELLER_0001'
|
|
7360
|
-
}));
|
|
7361
|
-
}
|
|
7362
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7363
|
-
useEffect(function () {
|
|
7364
|
-
var load = /*#__PURE__*/function () {
|
|
7365
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
7366
|
-
var accountSessionId, _catalogInfoData$, catalogInfoData;
|
|
7367
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7368
|
-
while (1) switch (_context.prev = _context.next) {
|
|
7369
|
-
case 0:
|
|
7370
|
-
setLoading(true);
|
|
7371
|
-
toggleLoading('seller-model-info', false, true);
|
|
7372
|
-
accountSessionId = undefined;
|
|
7373
|
-
if (!(organization.type === 'RETAILER')) {
|
|
7374
|
-
_context.next = 12;
|
|
7375
|
-
break;
|
|
7376
|
-
}
|
|
7377
|
-
if (accountId) {
|
|
7378
|
-
_context.next = 9;
|
|
7379
|
-
break;
|
|
7380
|
-
}
|
|
7381
|
-
LOG$4.error(new DivaError('Missing account ID', {
|
|
7382
|
-
code: 'SELLER_0001'
|
|
7383
|
-
}));
|
|
7384
|
-
setLoading(false);
|
|
7385
|
-
toggleLoading('seller-model-info', false, false);
|
|
7386
|
-
return _context.abrupt("return");
|
|
7387
|
-
case 9:
|
|
7388
|
-
_context.next = 11;
|
|
7389
|
-
return checkAccountLogin({
|
|
7390
|
-
accountId: accountId
|
|
7391
|
-
});
|
|
7392
|
-
case 11:
|
|
7393
|
-
accountSessionId = _context.sent;
|
|
7394
|
-
case 12:
|
|
7395
|
-
if (!catalogCodex) {
|
|
7396
|
-
_context.next = 18;
|
|
7397
|
-
break;
|
|
7398
|
-
}
|
|
7399
|
-
_context.next = 15;
|
|
7400
|
-
return loadCatalogInfo({
|
|
7401
|
-
catalogCodex: catalogCodex,
|
|
7402
|
-
accountSessionId: accountSessionId,
|
|
7403
|
-
accountId: accountId,
|
|
7404
|
-
language: i18n.language || 'en'
|
|
7405
|
-
});
|
|
7406
|
-
case 15:
|
|
7407
|
-
catalogInfoData = _context.sent;
|
|
7408
|
-
if ((catalogInfoData === null || catalogInfoData === void 0 || (_catalogInfoData$ = catalogInfoData[0]) === null || _catalogInfoData$ === void 0 || (_catalogInfoData$ = _catalogInfoData$.images) === null || _catalogInfoData$ === void 0 ? void 0 : _catalogInfoData$.length) == 0 && !userHasPermission('productcreator')) {
|
|
7409
|
-
catalogInfoData !== null && catalogInfoData !== void 0 && catalogInfoData[0].hasPlanner ? onOpenPlanner(accountSessionId) : _onOpenArticles();
|
|
7410
|
-
}
|
|
7411
|
-
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
7412
|
-
case 18:
|
|
7413
|
-
setLoading(false);
|
|
7414
|
-
toggleLoading('seller-model-info', false, false);
|
|
7415
|
-
case 20:
|
|
7416
|
-
case "end":
|
|
7417
|
-
return _context.stop();
|
|
7418
|
-
}
|
|
7419
|
-
}, _callee);
|
|
7420
|
-
}));
|
|
7421
|
-
return function load() {
|
|
7422
|
-
return _ref2.apply(this, arguments);
|
|
7423
|
-
};
|
|
7424
|
-
}();
|
|
7425
|
-
load();
|
|
7426
|
-
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
7427
|
-
return /*#__PURE__*/jsx(Fragment, {
|
|
7428
|
-
children: !loading && /*#__PURE__*/jsxs(Fragment, {
|
|
7429
|
-
children: [/*#__PURE__*/jsx(NavBar$1, {
|
|
7430
|
-
title: /*#__PURE__*/jsx(Title, {
|
|
7431
|
-
text: t('info.title')
|
|
7432
|
-
}),
|
|
7433
|
-
onOpenPlanner: onOpenPlanner,
|
|
7434
|
-
onOpenArticles: function onOpenArticles() {
|
|
7435
|
-
return _onOpenArticles();
|
|
7436
|
-
},
|
|
7437
|
-
hasPlanner: (!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && (data === null || data === void 0 ? void 0 : data.hasPlanner),
|
|
7438
|
-
hasArticles: (!!currentAccountLoginId && !!accountId || organization.parentType === 'SUPPLIER') && !!catalogCodex,
|
|
7439
|
-
showVariants: userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator) || returnTo === 'toAssortmentManager' || returnTo === 'toProductsGallery',
|
|
7440
|
-
showSetPlanner: userHasPermission('productcreator')
|
|
7441
|
-
}), /*#__PURE__*/jsx(MainView, {
|
|
7442
|
-
data: data,
|
|
7443
|
-
selected: selected,
|
|
7444
|
-
setSelected: setSelected,
|
|
7445
|
-
onClick: function onClick() {
|
|
7446
|
-
setHideAll(!hideAll);
|
|
7447
|
-
}
|
|
7448
|
-
}), /*#__PURE__*/jsx(Description$2, {
|
|
7449
|
-
data: data,
|
|
7450
|
-
hide: hideAll
|
|
7451
|
-
}), /*#__PURE__*/jsx(ImagesBar, {
|
|
7452
|
-
data: data,
|
|
7453
|
-
selected: selected,
|
|
7454
|
-
setSelected: setSelected,
|
|
7455
|
-
hide: hideAll,
|
|
7456
|
-
loading: loading
|
|
7457
|
-
})]
|
|
7458
|
-
})
|
|
7459
|
-
});
|
|
7460
|
-
}
|
|
7461
|
-
|
|
7462
|
-
var wrapper$7 = "wrapper-fSL18";
|
|
7463
|
-
var title$2 = "title-iTDPA";
|
|
7464
|
-
var subTitle = "subTitle-4-0PW";
|
|
7465
|
-
var descriptionContainer$1 = "description-container-k1vLT";
|
|
7466
|
-
var modelTitle = "model-title-Sgm-0";
|
|
7467
|
-
var description = "description-GyPZq";
|
|
7468
|
-
var pdf = "pdf-oNnao";
|
|
7469
|
-
var css_248z$9 = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n max-height: calc(100% - 42px);\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\n}\n\n.subTitle-4-0PW {\n padding: 12px 18px;\n font-size: 28px;\n}\n\n.description-container-k1vLT {\n display: flex;\n flex-direction: column;\n background-color: #f8f8f8;\n padding: 18px;\n gap: 12px;\n height: calc(100% - 164px);\n}\n\n.model-title-Sgm-0 {\n font-size: 24px;\n font-weight: 600;\n}\n.description-GyPZq {\n font-size: 16px;\n overflow: auto;\n flex-grow: 3;\n}\n\n.pdf-oNnao {\n display: 'flex';\n flex: 1 1 10px;\n}\n\n.pdf-oNnao svg {\n margin-right: 10px;\n}\n";
|
|
7470
|
-
styleInject(css_248z$9);
|
|
7471
|
-
|
|
7472
|
-
var _excluded$7 = ["data", "text"];
|
|
7473
|
-
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7474
|
-
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7475
|
-
getLogger('SellerCatalogInfo', 'Description');
|
|
7476
|
-
function Description$1 (_ref) {
|
|
7477
|
-
var data = _ref.data,
|
|
7478
|
-
text = _ref.text,
|
|
7479
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
7480
|
-
var _useTranslation = useTranslation(),
|
|
7481
|
-
t = _useTranslation.t;
|
|
7482
|
-
return /*#__PURE__*/jsxs("div", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
7483
|
-
className: classNames(wrapper$7, props.className),
|
|
7484
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
7485
|
-
className: title$2,
|
|
7486
|
-
children: t(text)
|
|
7487
|
-
}), /*#__PURE__*/jsx("div", {
|
|
7488
|
-
className: subTitle,
|
|
7489
|
-
children: t('pdp.info')
|
|
7490
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
7491
|
-
className: descriptionContainer$1,
|
|
7492
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
7493
|
-
className: modelTitle,
|
|
7494
|
-
children: data.name
|
|
7495
|
-
}), data === null || data === void 0 ? void 0 : data.documents.map(function (d, i) {
|
|
7496
|
-
return /*#__PURE__*/jsx("div", {
|
|
7497
|
-
className: pdf,
|
|
7498
|
-
children: /*#__PURE__*/jsx(Link, {
|
|
7499
|
-
href: d.url,
|
|
7500
|
-
download: true,
|
|
7501
|
-
target: "_blank",
|
|
7502
|
-
children: d.name
|
|
7503
|
-
})
|
|
7504
|
-
}, i);
|
|
7505
|
-
}), data.description && /*#__PURE__*/jsx("div", {
|
|
7506
|
-
className: description,
|
|
7507
|
-
dangerouslySetInnerHTML: {
|
|
7508
|
-
__html: data.description
|
|
7509
|
-
}
|
|
7510
|
-
})]
|
|
7511
|
-
})]
|
|
7512
|
-
}));
|
|
7513
|
-
}
|
|
7514
|
-
|
|
7515
|
-
var wrapper$6 = "wrapper-oUrTP";
|
|
7516
|
-
var container = "container-Sr3pC";
|
|
7517
|
-
var button = "button-NXyWV";
|
|
7518
|
-
var navBack = "nav-back-AzU6X";
|
|
7519
|
-
var icon$1 = "icon-0h-39";
|
|
7520
|
-
var text = "text-55Zpw";
|
|
7521
|
-
var css_248z$8 = ".wrapper-oUrTP {\n right: 10px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n z-index: 500;\n background-color: #fff;\n position: absolute;\n bottom: 0;\n width: 83%;\n}\n\n.container-Sr3pC {\n display: flex;\n gap: 12px;\n width: 50%;\n justify-content: flex-end;\n padding: 8px;\n}\n\n.button-NXyWV {\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--diva-theme-palette-primary-main);\n border-radius: 2px;\n border-color: var(--diva-theme-palette-primary-main);\n border-style: solid;\n border-width: 1.5px;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.nav-back-AzU6X {\n width: 50px;\n height: 50px;\n border-radius: 2px;\n border-color: var(--diva-theme-palette-primary-main);\n border-style: solid;\n border-width: 1.5px;\n background-color: #fff;\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%2218%22 viewBox%3D%220 0 10 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M9 1L1 9L9 17%22 stroke%3D%22%23713434%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n background-size: 27%;\n background-repeat: no-repeat;\n background-position: center center;\n cursor: pointer;\n}\n\n.icon-0h-39 {\n width: 24px;\n height: 24px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n}\n\n.text-55Zpw {\n text-align: center;\n /* flex-basis: 100%; */\n color: white;\n}\n";
|
|
7522
|
-
styleInject(css_248z$8);
|
|
7523
|
-
|
|
7524
|
-
var _excluded$6 = ["navigateBack", "buttons"];
|
|
7525
|
-
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7526
|
-
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7527
|
-
function NavBar (_ref) {
|
|
7528
|
-
var navigateBack = _ref.navigateBack,
|
|
7529
|
-
buttons = _ref.buttons,
|
|
7530
|
-
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
7531
|
-
var _useTranslation = useTranslation(),
|
|
7532
|
-
t = _useTranslation.t;
|
|
7533
|
-
return /*#__PURE__*/jsx("div", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
7534
|
-
className: classNames(wrapper$6, props.className),
|
|
7535
|
-
id: "diva-seller-info-navbar",
|
|
7536
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
7537
|
-
className: container,
|
|
7538
|
-
children: [navigateBack && /*#__PURE__*/jsx("div", {
|
|
7539
|
-
className: classNames(navBack),
|
|
7540
|
-
onClick: navigateBack
|
|
7541
|
-
}), buttons.map(function (button$1) {
|
|
7542
|
-
return /*#__PURE__*/jsxs("div", {
|
|
7543
|
-
className: classNames(button),
|
|
7544
|
-
onClick: button$1.onClick,
|
|
7545
|
-
id: button$1.key,
|
|
7546
|
-
children: [button$1.iconClass && /*#__PURE__*/jsx("div", {
|
|
7547
|
-
className: classNames(icon$1, button$1.iconClass)
|
|
7548
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
7549
|
-
className: classNames(text),
|
|
7550
|
-
children: [" ", t(button$1.text)]
|
|
7551
|
-
})]
|
|
7552
|
-
}, button$1.key);
|
|
7553
|
-
})]
|
|
7554
|
-
})
|
|
7555
|
-
}));
|
|
7556
|
-
}
|
|
7557
7086
|
|
|
7558
7087
|
var layout$1 = "layout-NhUpB";
|
|
7559
|
-
var
|
|
7088
|
+
var content = "content-t8Rtl";
|
|
7089
|
+
var leftSide = "left-side-10jmj";
|
|
7560
7090
|
var rightSide$1 = "right-side-64-Yz";
|
|
7561
|
-
var scrollerContainer = "scroller-container-TAsAz";
|
|
7562
7091
|
var catalogImages = "catalog-images-jJGqW";
|
|
7563
|
-
var productsHidden = "products-hidden-T6mTt";
|
|
7564
|
-
var products = "products-QxoIf";
|
|
7565
7092
|
var footer = "footer-1ONIt";
|
|
7566
|
-
var
|
|
7567
|
-
var favPlanning = "fav-planning-R8cxS";
|
|
7568
|
-
var setPlanning = "set-planning-1AQNC";
|
|
7569
|
-
var articleList = "article-list-uOn26";
|
|
7570
|
-
var analyticsIcon = "analytics-icon-kCv53";
|
|
7571
|
-
var css_248z$7 = ".layout-NhUpB {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: repeat(10, 1fr);\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n overflow: auto;\n height: 100%;\n}\n\n.info-9St01 {\n grid-area: 1 / 1 / 11 / 3;\n z-index: 100;\n}\n\n.right-side-64-Yz {\n grid-area: 1 / 3 / 11 / 13;\n width: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.scroller-container-TAsAz {\n overflow: auto;\n height: calc(100% - 70px);\n}\n\n.catalog-images-jJGqW {\n padding: 12px 12px 0 12px;\n height: calc(50% - 12px);\n}\n.products-hidden-T6mTt .catalog-images-jJGqW {\n height: calc(100% - 12px);\n}\n.products-QxoIf {\n height: 50%;\n}\n.footer-1ONIt {\n bottom: 0;\n right: 8px;\n}\n\n.empty-planning-BZTrr {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4 16L3.57574 15.5757C3.46321 15.6883 3.4 15.8409 3.4 16H4ZM17 3L17.4243 2.57574C17.1899 2.34142 16.8101 2.34142 16.5757 2.57574L17 3ZM21 7L21.4243 7.42426C21.6586 7.18995 21.6586 6.81005 21.4243 6.57574L21 7ZM8 20V20.6C8.15913 20.6 8.31174 20.5368 8.42426 20.4243L8 20ZM4 20H3.4C3.4 20.3314 3.66863 20.6 4 20.6V20ZM12 19.4C11.6686 19.4 11.4 19.6686 11.4 20C11.4 20.3314 11.6686 20.6 12 20.6V19.4ZM20.5 20.6C20.8314 20.6 21.1 20.3314 21.1 20C21.1 19.6686 20.8314 19.4 20.5 19.4V20.6ZM4.42426 16.4243L17.4243 3.42426L16.5757 2.57574L3.57574 15.5757L4.42426 16.4243ZM16.5757 3.42426L20.5757 7.42426L21.4243 6.57574L17.4243 2.57574L16.5757 3.42426ZM20.5757 6.57574L7.57574 19.5757L8.42426 20.4243L21.4243 7.42426L20.5757 6.57574ZM8 19.4H4V20.6H8V19.4ZM4.6 20V16H3.4V20H4.6ZM13.5757 6.42426L17.5757 10.4243L18.4243 9.57574L14.4243 5.57574L13.5757 6.42426ZM12 20.6H20.5V19.4H12V20.6Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.fav-planning-R8cxS {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4.3314 12.0474L12 20L19.6686 12.0474C20.5211 11.1633 21 9.96429 21 8.71405C21 6.11055 18.9648 4 16.4543 4C15.2487 4 14.0925 4.49666 13.24 5.38071L12 6.66667L10.76 5.38071C9.90749 4.49666 8.75128 4 7.54569 4C5.03517 4 3 6.11055 3 8.71405C3 9.96429 3.47892 11.1633 4.3314 12.0474Z%22 stroke%3D%22white%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.set-planning-1AQNC {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M7.11164 16.5938L3.8061 18.9095C3.46519 19.1412 3 18.9011 3 18.4934V5.5064C3 5.12726 3.4083 4.88294 3.75042 5.05738L7.1021 6.77004M12.1193 16.7346V9.76989C12.1193 9.49058 12.3494 9.26416 12.6332 9.26416H16.1086C16.3924 9.26416 16.6225 9.49058 16.6225 9.76989V16.7346M7.46741 16.7346H19.486C19.7699 16.7346 20 16.5081 20 16.2288V7.12577C20 6.84647 19.7699 6.62004 19.486 6.62004H7.46741C7.18356 6.62004 6.95346 6.84647 6.95346 7.12577V16.2288C6.95346 16.5081 7.18356 16.7346 7.46741 16.7346Z%22 stroke%3D%22white%22 stroke-width%3D%221.5%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.article-list-uOn26 {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 24 24%22 %3E %3Cpath fill%3D%22white%22 d%3D%22M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.analytics-icon-kCv53 {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 stroke%3D%22%23fff%22 fill%3D%22%23fff%22 stroke-width%3D%222px%22 height%3D%2248%22 width%3D%2248%22%3E%3Cpath d%3D%22M7.3 40.7v-2.1l1.1-1.1v3.2Zm8.1 0V30.6l1.1-1.1v11.2Zm8.05 0V29.5l1.1 1.15V40.7Zm8.1 0V30.65l1.1-1.1V40.7Zm8.05 0V22.6l1.1-1.1v19.2ZM7.3 28.05v-1.5L20 13.85l8 8 12.7-12.7v1.55L28 23.4l-8-8Z%22%2F%3E%3C%2Fsvg%3E\");\n}\n";
|
|
7093
|
+
var css_248z$7 = ".layout-NhUpB {\n display: flex;\n height: 100%;\n flex-direction: column;\n}\n\n.content-t8Rtl {\n display: flex;\n flex: 1;\n overflow: auto;\n}\n\n.left-side-10jmj {\n width: 25%;\n min-width: 300px;\n}\n\n.right-side-64-Yz {\n display: flex;\n flex-direction: column;\n position: relative;\n flex: 1;\n overflow: auto;\n}\n\n.catalog-images-jJGqW {\n flex: 1;\n padding: 12px;\n}\n\n.footer-1ONIt {\n display: flex;\n justify-content: flex-end;\n}\n\n@media (max-width: 820px) {\n .content-t8Rtl {\n flex-direction: column;\n }\n}\n";
|
|
7572
7094
|
styleInject(css_248z$7);
|
|
7573
7095
|
|
|
7574
7096
|
var wrapper$5 = "wrapper-D5Cmc";
|
|
7575
7097
|
var thumbs = "thumbs-cWKAj";
|
|
7576
7098
|
var mainSlider = "mainSlider-S8opH";
|
|
7577
|
-
var css_248z$6 = ".wrapper-D5Cmc {\n display: flex;\n position: relative;\n
|
|
7099
|
+
var css_248z$6 = ".wrapper-D5Cmc {\n display: flex;\n position: relative;\n gap: 12px;\n overflow: auto;\n}\n\n.thumbs-cWKAj .swiper-slide {\n opacity: 0.4;\n}\n\n.thumbs-cWKAj .swiper-slide-thumb-active {\n opacity: 1;\n}\n\n.mainSlider-S8opH .swiper-pagination-bullet-active {\n background-color: var(--diva-theme-palette-primary-main) !important;\n}\n\n.mainSlider-S8opH .swiper-pagination-bullet-active { /* Active bullet color */\n}\n\n@media (max-width: 820px) {\n .thumbs-cWKAj {\n display: none;\n }\n}\n";
|
|
7578
7100
|
styleInject(css_248z$6);
|
|
7579
7101
|
|
|
7580
7102
|
var _excluded$5 = ["data"];
|
|
@@ -7588,7 +7110,7 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7588
7110
|
var mainSwiperRef = useRef(null);
|
|
7589
7111
|
return /*#__PURE__*/jsxs("div", {
|
|
7590
7112
|
id: "diva-catalog-images",
|
|
7591
|
-
className:
|
|
7113
|
+
className: classnames(wrapper$5, props.className),
|
|
7592
7114
|
children: [/*#__PURE__*/jsx(Swiper, {
|
|
7593
7115
|
ref: mainSwiperRef,
|
|
7594
7116
|
pagination: {
|
|
@@ -7604,7 +7126,8 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7604
7126
|
},
|
|
7605
7127
|
style: {
|
|
7606
7128
|
height: '100%',
|
|
7607
|
-
width: '90%'
|
|
7129
|
+
width: '90%',
|
|
7130
|
+
minWidth: 0
|
|
7608
7131
|
},
|
|
7609
7132
|
className: mainSlider,
|
|
7610
7133
|
children: data.images.map(function (media, index) {
|
|
@@ -7622,14 +7145,18 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7622
7145
|
}), /*#__PURE__*/jsx(Swiper, {
|
|
7623
7146
|
onSwiper: setThumbsSwiper,
|
|
7624
7147
|
spaceBetween: 10,
|
|
7625
|
-
slidesPerView:
|
|
7626
|
-
freeMode:
|
|
7148
|
+
slidesPerView: "auto",
|
|
7149
|
+
freeMode: {
|
|
7150
|
+
sticky: true
|
|
7151
|
+
},
|
|
7152
|
+
mousewheel: true,
|
|
7627
7153
|
direction: "vertical",
|
|
7628
7154
|
watchSlidesProgress: true,
|
|
7629
|
-
modules: [Thumbs, FreeMode],
|
|
7155
|
+
modules: [Thumbs, FreeMode, Mousewheel],
|
|
7630
7156
|
style: {
|
|
7631
7157
|
width: '10%',
|
|
7632
7158
|
marginLeft: '10px',
|
|
7159
|
+
minWidth: '150px',
|
|
7633
7160
|
cursor: 'pointer'
|
|
7634
7161
|
},
|
|
7635
7162
|
className: thumbs,
|
|
@@ -7655,160 +7182,203 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
7655
7182
|
};
|
|
7656
7183
|
|
|
7657
7184
|
var wrapper$4 = "wrapper-3d2zl";
|
|
7658
|
-
var
|
|
7185
|
+
var tabBar = "tab-bar-lQQ28";
|
|
7186
|
+
var nothingFound = "nothing-found-0eqZ5";
|
|
7187
|
+
var css_248z$5 = ".wrapper-3d2zl {\n max-height: 50%;\n overflow: hidden;\n}\n\n.wrapper-3d2zl.MuiAccordion-root.Mui-expanded {\n height: 50%;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-expanded {\n min-height: 0;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-focused {\n background-color: #fff8f8;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-content {\n justify-content: space-between;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiTabs-root {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n height: calc(100% - 46px) !important;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n scrollbar-width: thin;\n overflow-y: scroll;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapper {\n display: none;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root.MuiCollapse-entered .MuiCollapse-wrapper {\n display: flex;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner > div {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiAccordionDetails-root {\n height: calc(100% - 24px);\n width: calc(100% - 32px);\n}\n\n.tab-bar-lQQ28 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: #f8f8f8;\n height: 46px;\n}\n\n.nothing-found-0eqZ5 {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n flex-direction: column;\n gap: 15px;\n margin: auto;\n}\n";
|
|
7659
7188
|
styleInject(css_248z$5);
|
|
7660
7189
|
|
|
7661
|
-
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7662
|
-
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7663
|
-
var Products = function Products(_ref) {
|
|
7664
|
-
var catalogCodex = _ref.catalogCodex,
|
|
7665
|
-
onProductClick = _ref.onProductClick,
|
|
7666
|
-
productState = _ref.productState;
|
|
7667
|
-
var _useSellerState = useSellerState(),
|
|
7668
|
-
_useSellerState$state = _useSellerState.state,
|
|
7669
|
-
currentProductId = _useSellerState$state.currentProductId,
|
|
7670
|
-
configurationData = _useSellerState$state.configurationData;
|
|
7671
|
-
var _productState$filter = _slicedToArray(productState.filter, 2),
|
|
7672
|
-
filter = _productState$filter[0],
|
|
7673
|
-
setFilter = _productState$filter[1];
|
|
7674
|
-
useEffect(function () {
|
|
7675
|
-
setFilter(_objectSpread$l(_objectSpread$l({}, filter), {}, {
|
|
7676
|
-
catCodex: {
|
|
7677
|
-
type: 'singleSelect',
|
|
7678
|
-
value: catalogCodex
|
|
7679
|
-
}
|
|
7680
|
-
}));
|
|
7681
|
-
}, []);
|
|
7682
|
-
return /*#__PURE__*/jsx(ProductsComponent, {
|
|
7683
|
-
productState: productState,
|
|
7684
|
-
onClickFunction: onProductClick,
|
|
7685
|
-
curProductId: currentProductId,
|
|
7686
|
-
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7687
|
-
galleryConfig: {
|
|
7688
|
-
hidePrices: true
|
|
7689
|
-
}
|
|
7690
|
-
});
|
|
7691
|
-
};
|
|
7692
|
-
|
|
7693
7190
|
var wrapper$3 = "wrapper-i9mNn";
|
|
7694
7191
|
var searchText = "search-text-grXdY";
|
|
7695
7192
|
var icon = "icon-ydD53";
|
|
7696
|
-
var css_248z$4 = ".wrapper-i9mNn {\n display: flex;\n height:
|
|
7193
|
+
var css_248z$4 = ".wrapper-i9mNn {\n display: flex;\n height: 36px;\n align-items: center;\n background-color: #fefefe;\n margin: 6px 0;\n border-radius: 5px;\n}\n\n.search-text-grXdY {\n padding: 8px 8px 8px 0px;\n transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);\n width: 130px;\n}\n\n.search-text-grXdY.Mui-focused {\n width: 200px;\n}\n\n.search-text-grXdY .MuiInputBase-input {\n padding-left: 36px;\n}\n\n.icon-ydD53 {\n width: 36px;\n height: 36px;\n background: center / contain no-repeat url(\"data:image/svg+xml,%3Csvg width%3D%2259%22 height%3D%2259%22 viewBox%3D%220 0 59 59%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M39.9163 41.38C40.3208 41.7844 40.9765 41.7844 41.3809 41.38C41.7854 40.9755 41.7854 40.3198 41.3809 39.9153L39.9163 41.38ZM36.851 27.5286C36.851 32.6767 32.6776 36.85 27.5296 36.85V38.9215C33.8216 38.9215 38.9224 33.8206 38.9224 27.5286H36.851ZM27.5296 36.85C22.3815 36.85 18.2081 32.6767 18.2081 27.5286H16.1367C16.1367 33.8206 21.2375 38.9215 27.5296 38.9215V36.85ZM18.2081 27.5286C18.2081 22.3805 22.3815 18.2072 27.5296 18.2072V16.1357C21.2375 16.1357 16.1367 21.2365 16.1367 27.5286H18.2081ZM27.5296 18.2072C32.6776 18.2072 36.851 22.3805 36.851 27.5286H38.9224C38.9224 21.2365 33.8216 16.1357 27.5296 16.1357V18.2072ZM41.3809 39.9153L35.5982 34.1325L34.1334 35.5972L39.9163 41.38L41.3809 39.9153Z%22 fill%3D%22%234F4F4F%22%2F%3E%3C%2Fsvg%3E\");\n position: absolute;\n pointer-events: none;\n}\n";
|
|
7697
7194
|
styleInject(css_248z$4);
|
|
7698
7195
|
|
|
7699
7196
|
var Search = function Search(_ref) {
|
|
7700
|
-
var
|
|
7701
|
-
|
|
7702
|
-
|
|
7197
|
+
var searchValue = _ref.searchValue,
|
|
7198
|
+
onSearch = _ref.onSearch,
|
|
7199
|
+
setExpanded = _ref.setExpanded;
|
|
7703
7200
|
var _useTranslation = useTranslation(),
|
|
7704
7201
|
t = _useTranslation.t;
|
|
7705
|
-
var _useState = useState(''),
|
|
7706
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7707
|
-
value = _useState2[0],
|
|
7708
|
-
setValue = _useState2[1];
|
|
7709
|
-
var inputRef = useRef(null);
|
|
7710
|
-
useEffect(function () {
|
|
7711
|
-
if (value && value.length > 2) setSearch(value);else if ((search === null || search === void 0 ? void 0 : search.length) !== 0) {
|
|
7712
|
-
setSearch(undefined);
|
|
7713
|
-
}
|
|
7714
|
-
}, [value]);
|
|
7715
|
-
useEffect(function () {
|
|
7716
|
-
if (!(search !== null && search !== void 0 && search.length)) setValue('');
|
|
7717
|
-
}, [search]);
|
|
7718
7202
|
return /*#__PURE__*/jsxs("div", {
|
|
7719
7203
|
className: wrapper$3,
|
|
7720
|
-
|
|
7721
|
-
|
|
7204
|
+
onClick: function onClick(ev) {
|
|
7205
|
+
return ev.stopPropagation();
|
|
7206
|
+
},
|
|
7207
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
7208
|
+
className: icon
|
|
7209
|
+
}), /*#__PURE__*/jsx(InputBase, {
|
|
7722
7210
|
onChange: function onChange(e) {
|
|
7723
|
-
return
|
|
7211
|
+
return onSearch(e.target.value);
|
|
7724
7212
|
},
|
|
7725
|
-
|
|
7726
|
-
value: value,
|
|
7213
|
+
value: searchValue,
|
|
7727
7214
|
className: searchText,
|
|
7728
|
-
placeholder: t('filter.global')
|
|
7729
|
-
|
|
7730
|
-
|
|
7215
|
+
placeholder: t('filter.global'),
|
|
7216
|
+
onFocus: function onFocus() {
|
|
7217
|
+
return setExpanded(true);
|
|
7218
|
+
}
|
|
7731
7219
|
})]
|
|
7732
7220
|
});
|
|
7733
7221
|
};
|
|
7734
7222
|
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
({
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
}
|
|
7749
|
-
var StyledTab = withStyles$1(function (theme) {
|
|
7750
|
-
return createStyles$1({
|
|
7751
|
-
root: {
|
|
7752
|
-
textTransform: 'none',
|
|
7753
|
-
fontWeight: 'bold',
|
|
7754
|
-
fontSize: theme.typography.pxToRem(15),
|
|
7755
|
-
marginRight: theme.spacing(1)
|
|
7756
|
-
}
|
|
7223
|
+
function NothingFound (_ref) {
|
|
7224
|
+
var text = _ref.text,
|
|
7225
|
+
info = _ref.info;
|
|
7226
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7227
|
+
className: nothingFound,
|
|
7228
|
+
children: [/*#__PURE__*/jsx(Typography$1, {
|
|
7229
|
+
variant: "body2",
|
|
7230
|
+
children: text
|
|
7231
|
+
}), info && /*#__PURE__*/jsx(Alert, {
|
|
7232
|
+
variant: "outlined",
|
|
7233
|
+
severity: "info",
|
|
7234
|
+
children: info
|
|
7235
|
+
})]
|
|
7757
7236
|
});
|
|
7758
|
-
}
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
_ref2.onArticleClick;
|
|
7768
|
-
var productState = _ref2.productState,
|
|
7769
|
-
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
7237
|
+
}
|
|
7238
|
+
|
|
7239
|
+
var ProductsOrArticles = function ProductsOrArticles(_ref) {
|
|
7240
|
+
var _scroller$current, _scroller$current2;
|
|
7241
|
+
var catalogCodex = _ref.catalogCodex,
|
|
7242
|
+
onProductClick = _ref.onProductClick,
|
|
7243
|
+
hideProducts = _ref.hideProducts;
|
|
7244
|
+
var _useSellerState = useSellerState(),
|
|
7245
|
+
configurationData = _useSellerState.state.configurationData;
|
|
7770
7246
|
var _useState = useState(0),
|
|
7771
7247
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7772
|
-
|
|
7773
|
-
|
|
7248
|
+
tab = _useState2[0],
|
|
7249
|
+
setTab = _useState2[1];
|
|
7250
|
+
var _useState3 = useState(false),
|
|
7251
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7252
|
+
expanded = _useState4[0],
|
|
7253
|
+
setExpanded = _useState4[1];
|
|
7254
|
+
var _useState5 = useState(''),
|
|
7255
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7256
|
+
productSearch = _useState6[0],
|
|
7257
|
+
setProductSearch = _useState6[1];
|
|
7258
|
+
var _useState7 = useState(false),
|
|
7259
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7260
|
+
showVZProducts = _useState8[0],
|
|
7261
|
+
setShowVZProducts = _useState8[1];
|
|
7262
|
+
var _useState9 = useState(false),
|
|
7263
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7264
|
+
showFavoriteProducts = _useState10[0],
|
|
7265
|
+
setShowFavoriteProducts = _useState10[1];
|
|
7266
|
+
var favDisabled = hideProducts == true || hideProducts == 'hideFav';
|
|
7267
|
+
var vzDisabled = hideProducts == true || hideProducts == 'hideVZ';
|
|
7268
|
+
var hideAll = !showFavoriteProducts && !showVZProducts;
|
|
7269
|
+
//expand only if there is something to show
|
|
7270
|
+
var shouldExpand = expanded && !hideAll;
|
|
7271
|
+
//tabs are only selectable if both are shown
|
|
7272
|
+
var selectedTab = !showVZProducts ? 1 : tab;
|
|
7774
7273
|
var _useTranslation = useTranslation(),
|
|
7775
7274
|
t = _useTranslation.t;
|
|
7275
|
+
var scroller = useRef(null);
|
|
7276
|
+
var vzProductsState = useProductState$1({
|
|
7277
|
+
parameters: {
|
|
7278
|
+
catCodex: catalogCodex
|
|
7279
|
+
},
|
|
7280
|
+
sort: '{-modelInfoPageWeight}',
|
|
7281
|
+
scroller: (_scroller$current = scroller.current) !== null && _scroller$current !== void 0 ? _scroller$current : undefined,
|
|
7282
|
+
disabled: vzDisabled,
|
|
7283
|
+
onInitialized: function onInitialized(empty) {
|
|
7284
|
+
setShowVZProducts(!empty);
|
|
7285
|
+
if (!empty) setExpanded(true);
|
|
7286
|
+
}
|
|
7287
|
+
});
|
|
7288
|
+
var favoriteProductsState = useProductState$1({
|
|
7289
|
+
parameters: {
|
|
7290
|
+
catCodex: catalogCodex
|
|
7291
|
+
},
|
|
7292
|
+
favorites: true,
|
|
7293
|
+
scroller: (_scroller$current2 = scroller.current) !== null && _scroller$current2 !== void 0 ? _scroller$current2 : undefined,
|
|
7294
|
+
disabled: favDisabled,
|
|
7295
|
+
onInitialized: function onInitialized(empty) {
|
|
7296
|
+
if (!favDisabled) {
|
|
7297
|
+
setShowFavoriteProducts(true);
|
|
7298
|
+
if (!empty) setExpanded(true);
|
|
7299
|
+
}
|
|
7300
|
+
}
|
|
7301
|
+
});
|
|
7776
7302
|
var handleChange = function handleChange(event, newValue) {
|
|
7777
|
-
|
|
7778
|
-
|
|
7303
|
+
vzProductsState.search[1](undefined);
|
|
7304
|
+
favoriteProductsState.search[1](undefined);
|
|
7305
|
+
setProductSearch('');
|
|
7306
|
+
setTab(newValue);
|
|
7307
|
+
if (newValue == selectedTab) {
|
|
7308
|
+
setExpanded(!expanded);
|
|
7309
|
+
} else {
|
|
7310
|
+
setExpanded(true);
|
|
7311
|
+
}
|
|
7312
|
+
event.stopPropagation();
|
|
7779
7313
|
};
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7314
|
+
var handleSearch = function handleSearch(search) {
|
|
7315
|
+
setProductSearch(search);
|
|
7316
|
+
if (selectedTab === 0) {
|
|
7317
|
+
vzProductsState.search[1](search);
|
|
7318
|
+
} else {
|
|
7319
|
+
favoriteProductsState.search[1](search);
|
|
7320
|
+
}
|
|
7321
|
+
};
|
|
7322
|
+
if (hideAll || vzProductsState.loading || favoriteProductsState.loading) return /*#__PURE__*/jsx(Fragment, {});
|
|
7323
|
+
/*#__PURE__*/jsx(ProductsComponent, {
|
|
7324
|
+
productState: vzProductsState,
|
|
7325
|
+
onClickFunction: onProductClick,
|
|
7326
|
+
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7327
|
+
galleryConfig: {
|
|
7328
|
+
hidePrices: true
|
|
7329
|
+
}
|
|
7330
|
+
});
|
|
7331
|
+
var isEmpty = tab == 0 ? vzProductsState.groups.length == 0 : favoriteProductsState.groups.length == 0;
|
|
7332
|
+
return /*#__PURE__*/jsxs(Accordion, {
|
|
7333
|
+
className: wrapper$4,
|
|
7334
|
+
expanded: shouldExpand,
|
|
7335
|
+
onChange: function onChange(_, exp) {
|
|
7336
|
+
return setExpanded(exp);
|
|
7337
|
+
},
|
|
7338
|
+
children: [/*#__PURE__*/jsxs(AccordionSummary, {
|
|
7339
|
+
className: tabBar,
|
|
7340
|
+
expandIcon: /*#__PURE__*/jsx(ExpandMore, {}),
|
|
7341
|
+
children: [/*#__PURE__*/jsxs(Tabs, {
|
|
7342
|
+
value: selectedTab,
|
|
7785
7343
|
onChange: handleChange,
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7344
|
+
children: [showVZProducts && /*#__PURE__*/jsx(Tab, {
|
|
7345
|
+
label: t('info.products.shared'),
|
|
7346
|
+
value: 0
|
|
7347
|
+
}), /*#__PURE__*/jsx(Tab, {
|
|
7348
|
+
label: t('info.products.favorite'),
|
|
7349
|
+
value: 1
|
|
7350
|
+
})]
|
|
7791
7351
|
}), /*#__PURE__*/jsx(Search, {
|
|
7792
|
-
|
|
7352
|
+
searchValue: productSearch,
|
|
7353
|
+
onSearch: handleSearch,
|
|
7354
|
+
setExpanded: setExpanded
|
|
7355
|
+
}, selectedTab)]
|
|
7356
|
+
}), /*#__PURE__*/jsxs(AccordionDetails, {
|
|
7357
|
+
ref: scroller,
|
|
7358
|
+
children: [!isEmpty && /*#__PURE__*/jsx(ProductsComponent, {
|
|
7359
|
+
productState: selectedTab == 0 ? vzProductsState : favoriteProductsState,
|
|
7360
|
+
onClickFunction: onProductClick,
|
|
7361
|
+
groupVariantsByField: configurationData === null || configurationData === void 0 ? void 0 : configurationData.groupVariantsByField,
|
|
7362
|
+
galleryConfig: {
|
|
7363
|
+
hidePrices: true
|
|
7364
|
+
}
|
|
7365
|
+
}), isEmpty && /*#__PURE__*/jsx(NothingFound, {
|
|
7366
|
+
text: selectedTab == 0 ? t('info.products.novzproducts') : t('info.products.nofavorites'),
|
|
7367
|
+
info: selectedTab == 0 ? undefined : t('info.products.farvoritesinfo')
|
|
7793
7368
|
})]
|
|
7794
|
-
}), /*#__PURE__*/jsx(Products, {
|
|
7795
|
-
catalogCodex: catalogCodex,
|
|
7796
|
-
onProductClick: onProductClick,
|
|
7797
|
-
productState: productState
|
|
7798
7369
|
})]
|
|
7799
|
-
})
|
|
7370
|
+
});
|
|
7800
7371
|
};
|
|
7801
7372
|
|
|
7802
|
-
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7803
|
-
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7804
7373
|
var LOG$3 = getLogger('SellerArticles', 'InfoWithProducts');
|
|
7805
|
-
function
|
|
7806
|
-
var _scroller$current;
|
|
7374
|
+
function useModelInfoPage (_ref) {
|
|
7807
7375
|
var accountId = _ref.accountId,
|
|
7808
7376
|
catalogCodex = _ref.catalogCodex;
|
|
7377
|
+
var _useTranslation = useTranslation(),
|
|
7378
|
+
i18n = _useTranslation.i18n;
|
|
7809
7379
|
var _useState = useState(),
|
|
7810
7380
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7811
|
-
|
|
7381
|
+
catalogData = _useState2[0],
|
|
7812
7382
|
setData = _useState2[1];
|
|
7813
7383
|
var _useState3 = useState(true),
|
|
7814
7384
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -7821,10 +7391,7 @@ function Info(_ref) {
|
|
|
7821
7391
|
openComponent = _useSellerState$actio.openComponent,
|
|
7822
7392
|
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
7823
7393
|
_useSellerState$state = _useSellerState.state,
|
|
7824
|
-
sellerIsVisible = _useSellerState$state.sellerIsVisible,
|
|
7825
|
-
currentProductId = _useSellerState$state.currentProductId,
|
|
7826
7394
|
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
7827
|
-
catalogs = _useSellerState$state.catalogs,
|
|
7828
7395
|
currentBasketState = _useSellerState$state.currentBasketState,
|
|
7829
7396
|
configurationData = _useSellerState$state.configurationData,
|
|
7830
7397
|
returnTo = _useSellerState$state.returnTo,
|
|
@@ -7835,121 +7402,7 @@ function Info(_ref) {
|
|
|
7835
7402
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
7836
7403
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
7837
7404
|
userHasPermission = _useDivaCore$actions.userHasPermission;
|
|
7838
|
-
|
|
7839
|
-
i18n = _useTranslation.i18n;
|
|
7840
|
-
var scroller = useRef(null);
|
|
7841
|
-
var productState = useProductState$1({
|
|
7842
|
-
parameters: {},
|
|
7843
|
-
sort: '{-modelInfoPageWeight}',
|
|
7844
|
-
scroller: (_scroller$current = scroller.current) !== null && _scroller$current !== void 0 ? _scroller$current : undefined
|
|
7845
|
-
});
|
|
7846
|
-
useEffect(function () {
|
|
7847
|
-
LOG$3.startTransaction({
|
|
7848
|
-
event: 'onOpenModule',
|
|
7849
|
-
message: 'Open Catalog Info',
|
|
7850
|
-
eventId: 'ON_OPEN_MODULE_INFO',
|
|
7851
|
-
labels: {
|
|
7852
|
-
cat: catalogCodex,
|
|
7853
|
-
accountId: accountId
|
|
7854
|
-
}
|
|
7855
|
-
});
|
|
7856
|
-
}, []);
|
|
7857
|
-
var _useState5 = useState(false),
|
|
7858
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7859
|
-
showProducts = _useState6[0],
|
|
7860
|
-
setShowProducts = _useState6[1];
|
|
7861
|
-
var showImages = !(configurationData !== null && configurationData !== void 0 && configurationData.hideCatalogImagesInModelInfo);
|
|
7862
|
-
useEffect(function () {
|
|
7863
|
-
if (!showProducts && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductsInModelInfo)) {
|
|
7864
|
-
if (productState.groups.length) setShowProducts(true);
|
|
7865
|
-
}
|
|
7866
|
-
}, [productState.groups]);
|
|
7867
|
-
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7868
|
-
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7869
|
-
var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7870
|
-
if (checkDoReturnToProductCreator(plannerReturn)) {
|
|
7871
|
-
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7872
|
-
}
|
|
7873
|
-
openPlanner({
|
|
7874
|
-
catalogCodex: catalogCodex,
|
|
7875
|
-
accountId: accountId,
|
|
7876
|
-
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7877
|
-
forceReload: '1',
|
|
7878
|
-
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7879
|
-
returnTo: plannerReturn
|
|
7880
|
-
});
|
|
7881
|
-
} else {
|
|
7882
|
-
LOG$3.error(new DivaError('Missing account login ID', {
|
|
7883
|
-
code: 'SELLER_0001'
|
|
7884
|
-
}));
|
|
7885
|
-
}
|
|
7886
|
-
}, [openPlanner, catalogs, currentAccountLoginId]);
|
|
7887
|
-
var onOpenArticles = useCallback(function () {
|
|
7888
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7889
|
-
openComponent({
|
|
7890
|
-
type: 'SELLER',
|
|
7891
|
-
parameters: {
|
|
7892
|
-
module: 'Articles',
|
|
7893
|
-
accountId: accountId,
|
|
7894
|
-
catalogCodex: catalogCodex
|
|
7895
|
-
}
|
|
7896
|
-
});
|
|
7897
|
-
} else {
|
|
7898
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7899
|
-
code: 'SELLER_0001'
|
|
7900
|
-
}));
|
|
7901
|
-
}
|
|
7902
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7903
|
-
var onOpenAnalytics = useCallback(function () {
|
|
7904
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7905
|
-
openComponent({
|
|
7906
|
-
type: 'SELLER',
|
|
7907
|
-
parameters: {
|
|
7908
|
-
module: 'InfoAnalytics',
|
|
7909
|
-
accountId: accountId,
|
|
7910
|
-
catalogCodex: catalogCodex
|
|
7911
|
-
}
|
|
7912
|
-
});
|
|
7913
|
-
} else {
|
|
7914
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7915
|
-
code: 'SELLER_0001'
|
|
7916
|
-
}));
|
|
7917
|
-
}
|
|
7918
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7919
|
-
var onArticleClick = function onArticleClick(item) {
|
|
7920
|
-
var plannerReturn = (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7921
|
-
if (checkDoReturnToProductCreator(plannerReturn)) {
|
|
7922
|
-
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7923
|
-
}
|
|
7924
|
-
openPlanner({
|
|
7925
|
-
catalogCodex: item.catalogCodex,
|
|
7926
|
-
articleCodexes: item.articleCodex,
|
|
7927
|
-
forceReload: '1',
|
|
7928
|
-
accountSessionGuid: currentAccountLoginId,
|
|
7929
|
-
accountId: accountId,
|
|
7930
|
-
retailArticleNr: item.retailArticleNr,
|
|
7931
|
-
returnTo: plannerReturn
|
|
7932
|
-
});
|
|
7933
|
-
};
|
|
7934
|
-
var checkDoReturnToProductCreator = function checkDoReturnToProductCreator(plannerReturn) {
|
|
7935
|
-
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
7936
|
-
};
|
|
7937
|
-
var navigateBack = useCallback(function () {
|
|
7938
|
-
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7939
|
-
var _data$accountGuid;
|
|
7940
|
-
openComponent({
|
|
7941
|
-
type: 'SELLER',
|
|
7942
|
-
parameters: {
|
|
7943
|
-
module: 'Catalogs',
|
|
7944
|
-
collectionId: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule) === 'Catalogs' ? undefined : (_data$accountGuid = data === null || data === void 0 ? void 0 : data.accountGuid) !== null && _data$accountGuid !== void 0 ? _data$accountGuid : accountId
|
|
7945
|
-
}
|
|
7946
|
-
});
|
|
7947
|
-
} else {
|
|
7948
|
-
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7949
|
-
code: 'SELLER_0001'
|
|
7950
|
-
}));
|
|
7951
|
-
}
|
|
7952
|
-
}, [openComponent, currentAccountLoginId, accountId, catalogCodex]);
|
|
7405
|
+
useEffect(function () {}, []);
|
|
7953
7406
|
useEffect(function () {
|
|
7954
7407
|
var load = /*#__PURE__*/function () {
|
|
7955
7408
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -7957,59 +7410,76 @@ function Info(_ref) {
|
|
|
7957
7410
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7958
7411
|
while (1) switch (_context.prev = _context.next) {
|
|
7959
7412
|
case 0:
|
|
7413
|
+
LOG$3.startTransaction({
|
|
7414
|
+
event: 'onOpenModule',
|
|
7415
|
+
message: 'Open Catalog Info',
|
|
7416
|
+
eventId: 'ON_OPEN_MODULE_INFO',
|
|
7417
|
+
labels: {
|
|
7418
|
+
cat: catalogCodex,
|
|
7419
|
+
accountId: accountId
|
|
7420
|
+
}
|
|
7421
|
+
});
|
|
7960
7422
|
setLoading(true);
|
|
7961
7423
|
toggleLoading('seller-model-info', false, true);
|
|
7962
7424
|
accountSessionId = undefined;
|
|
7963
7425
|
if (!(organization.type === 'RETAILER')) {
|
|
7964
|
-
_context.next =
|
|
7426
|
+
_context.next = 13;
|
|
7965
7427
|
break;
|
|
7966
7428
|
}
|
|
7967
7429
|
if (accountId) {
|
|
7968
|
-
_context.next =
|
|
7430
|
+
_context.next = 10;
|
|
7969
7431
|
break;
|
|
7970
7432
|
}
|
|
7971
7433
|
LOG$3.errorTransaction('ON_OPEN_MODULE_INFO', 'SELLER_0001', 'Missing account ID', {
|
|
7972
|
-
cat:
|
|
7434
|
+
cat: catalogCodex,
|
|
7973
7435
|
accountId: accountId
|
|
7974
7436
|
});
|
|
7975
7437
|
setLoading(false);
|
|
7976
7438
|
toggleLoading('seller-model-info', false, false);
|
|
7977
7439
|
return _context.abrupt("return");
|
|
7978
|
-
case
|
|
7979
|
-
_context.next =
|
|
7440
|
+
case 10:
|
|
7441
|
+
_context.next = 12;
|
|
7980
7442
|
return checkAccountLogin({
|
|
7981
7443
|
accountId: accountId
|
|
7982
7444
|
});
|
|
7983
|
-
case 11:
|
|
7984
|
-
accountSessionId = _context.sent;
|
|
7985
7445
|
case 12:
|
|
7446
|
+
accountSessionId = _context.sent;
|
|
7447
|
+
case 13:
|
|
7986
7448
|
if (!catalogCodex) {
|
|
7987
|
-
_context.next =
|
|
7449
|
+
_context.next = 21;
|
|
7988
7450
|
break;
|
|
7989
7451
|
}
|
|
7990
|
-
_context.next =
|
|
7452
|
+
_context.next = 16;
|
|
7991
7453
|
return loadCatalogInfo({
|
|
7992
7454
|
catalogCodex: catalogCodex,
|
|
7993
7455
|
accountSessionId: accountSessionId,
|
|
7994
7456
|
accountId: accountId,
|
|
7995
7457
|
language: i18n.language || 'en'
|
|
7996
7458
|
});
|
|
7997
|
-
case
|
|
7459
|
+
case 16:
|
|
7998
7460
|
catalogInfoData = _context.sent;
|
|
7461
|
+
{
|
|
7462
|
+
_context.next = 19;
|
|
7463
|
+
break;
|
|
7464
|
+
}
|
|
7465
|
+
case 19:
|
|
7466
|
+
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
7467
|
+
|
|
7468
|
+
//if there is no relevant catalog information, as a normal seller continue directly to the planner
|
|
7469
|
+
//the productcreator stays regardles on the page, because currently it is only possible to create productvariants from this page
|
|
7999
7470
|
if ((catalogInfoData === null || catalogInfoData === void 0 || (_catalogInfoData$ = catalogInfoData[0]) === null || _catalogInfoData$ === void 0 || (_catalogInfoData$ = _catalogInfoData$.images) === null || _catalogInfoData$ === void 0 ? void 0 : _catalogInfoData$.length) == 0 && !userHasPermission('productcreator')) {
|
|
8000
7471
|
if (catalogInfoData !== null && catalogInfoData !== void 0 && catalogInfoData[0].hasPlanner) {
|
|
8001
7472
|
onOpenPlanner(accountSessionId);
|
|
8002
7473
|
}
|
|
8003
7474
|
}
|
|
8004
|
-
|
|
8005
|
-
case 18:
|
|
7475
|
+
case 21:
|
|
8006
7476
|
LOG$3.successTransaction('ON_OPEN_MODULE_INFO', {
|
|
8007
|
-
cat:
|
|
7477
|
+
cat: catalogCodex,
|
|
8008
7478
|
accountId: accountId
|
|
8009
7479
|
});
|
|
8010
7480
|
setLoading(false);
|
|
8011
7481
|
toggleLoading('seller-model-info', false, false);
|
|
8012
|
-
case
|
|
7482
|
+
case 24:
|
|
8013
7483
|
case "end":
|
|
8014
7484
|
return _context.stop();
|
|
8015
7485
|
}
|
|
@@ -8021,121 +7491,137 @@ function Info(_ref) {
|
|
|
8021
7491
|
}();
|
|
8022
7492
|
load();
|
|
8023
7493
|
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
8024
|
-
var
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
}
|
|
8062
|
-
if (userHasPermission('analytics') && configurationData !== null && configurationData !== void 0 && configurationData.analyticsConfig) {
|
|
8063
|
-
navButtons.push({
|
|
8064
|
-
onClick: function onClick() {
|
|
8065
|
-
return onOpenAnalytics();
|
|
8066
|
-
},
|
|
8067
|
-
text: 'info.buttons.analytics',
|
|
8068
|
-
key: 'diva-seller-info-open-analytics',
|
|
8069
|
-
iconClass: analyticsIcon
|
|
8070
|
-
});
|
|
8071
|
-
}
|
|
8072
|
-
var closePdp = function closePdp() {
|
|
8073
|
-
openComponent({
|
|
8074
|
-
type: 'SELLER',
|
|
8075
|
-
parameters: _objectSpread$j(_objectSpread$j({
|
|
8076
|
-
module: 'Info'
|
|
8077
|
-
}, accountId ? {
|
|
8078
|
-
accountId: accountId
|
|
8079
|
-
} : {}), {}, {
|
|
8080
|
-
catalogCodex: catalogCodex
|
|
8081
|
-
}),
|
|
8082
|
-
breadcrumb: true
|
|
8083
|
-
});
|
|
8084
|
-
};
|
|
8085
|
-
var onProductClick = function onProductClick(product) {
|
|
7494
|
+
var onOpenPlanner = useCallback(function (accountLoginId, returnToPlanner) {
|
|
7495
|
+
if (accountLoginId || currentAccountLoginId || organization.parentType === 'SUPPLIER') {
|
|
7496
|
+
var plannerReturn = returnToPlanner || (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET';
|
|
7497
|
+
if (checkDoReturnToProductCreator(plannerReturn, returnTo)) {
|
|
7498
|
+
plannerReturn = 'OPEN_SELLER_PRODUCTCREATOR';
|
|
7499
|
+
}
|
|
7500
|
+
openPlanner({
|
|
7501
|
+
catalogCodex: catalogCodex,
|
|
7502
|
+
accountId: accountId,
|
|
7503
|
+
accountSessionGuid: accountLoginId || currentAccountLoginId,
|
|
7504
|
+
forceReload: '1',
|
|
7505
|
+
basketData: returnToPlanner === 'SETPLANNER_OPEN_SELLER_BASKET' ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
7506
|
+
returnTo: plannerReturn
|
|
7507
|
+
});
|
|
7508
|
+
} else {
|
|
7509
|
+
LOG$3.error(new DivaError('Missing account login ID', {
|
|
7510
|
+
code: 'SELLER_0001'
|
|
7511
|
+
}));
|
|
7512
|
+
}
|
|
7513
|
+
}, [currentAccountLoginId, organization.parentType, accountId, catalogCodex, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo, currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket]);
|
|
7514
|
+
var onOpenArticles = useCallback(function () {
|
|
7515
|
+
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7516
|
+
openComponent({
|
|
7517
|
+
type: 'SELLER',
|
|
7518
|
+
parameters: {
|
|
7519
|
+
module: 'Articles',
|
|
7520
|
+
accountId: accountId,
|
|
7521
|
+
catalogCodex: catalogCodex
|
|
7522
|
+
}
|
|
7523
|
+
});
|
|
7524
|
+
} else {
|
|
7525
|
+
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7526
|
+
code: 'SELLER_0001'
|
|
7527
|
+
}));
|
|
7528
|
+
}
|
|
7529
|
+
}, [accountId, catalogCodex, organization.parentType]);
|
|
7530
|
+
var onOpenPlannerWithProduct = useCallback(function (product) {
|
|
8086
7531
|
openPlanner({
|
|
8087
7532
|
accountSessionGuid: currentAccountLoginId,
|
|
8088
7533
|
forceReload: '1',
|
|
8089
7534
|
productId: product._id,
|
|
8090
7535
|
returnTo: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo) || 'OPEN_SELLER_BASKET'
|
|
8091
7536
|
});
|
|
8092
|
-
};
|
|
8093
|
-
var
|
|
8094
|
-
if (
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
7537
|
+
}, [currentAccountLoginId, openPlanner, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultWebPlannerReturnTo]);
|
|
7538
|
+
var onNavigateBack = useCallback(function () {
|
|
7539
|
+
if ((accountId || organization.parentType === 'SUPPLIER') && catalogCodex) {
|
|
7540
|
+
openComponent({
|
|
7541
|
+
type: 'SELLER',
|
|
7542
|
+
parameters: {
|
|
7543
|
+
module: 'Catalogs',
|
|
7544
|
+
collectionId: (configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule) === 'Catalogs' ? undefined : accountId
|
|
7545
|
+
}
|
|
7546
|
+
});
|
|
7547
|
+
} else {
|
|
7548
|
+
LOG$3.error(new DivaError('Missing account ID or catalog', {
|
|
7549
|
+
code: 'SELLER_0001'
|
|
7550
|
+
}));
|
|
8098
7551
|
}
|
|
8099
|
-
}, []);
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
7552
|
+
}, [accountId, catalogCodex, organization.parentType, configurationData === null || configurationData === void 0 ? void 0 : configurationData.defaultModule]);
|
|
7553
|
+
var navButtons = useMemo(function () {
|
|
7554
|
+
var buttons = {
|
|
7555
|
+
articles: function articles() {
|
|
7556
|
+
return onOpenArticles();
|
|
7557
|
+
},
|
|
7558
|
+
navigateBack: function navigateBack() {
|
|
7559
|
+
return onNavigateBack();
|
|
7560
|
+
}
|
|
8104
7561
|
};
|
|
8105
|
-
|
|
7562
|
+
if ((!!currentAccountLoginId || organization.parentType === 'SUPPLIER') && !!catalogCodex && catalogData !== null && catalogData !== void 0 && catalogData.hasPlanner) {
|
|
7563
|
+
buttons.planner = function () {
|
|
7564
|
+
return onOpenPlanner(currentAccountLoginId);
|
|
7565
|
+
};
|
|
7566
|
+
}
|
|
7567
|
+
if ((userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator) || returnTo === 'toAssortmentManager' || returnTo === 'toProductsGallery') && !originProductId) {
|
|
7568
|
+
buttons.variantsPlanner = function () {
|
|
7569
|
+
return onOpenPlanner(undefined, 'FAVORITS_OPEN_SELLER_PRODUCTCREATOR');
|
|
7570
|
+
};
|
|
7571
|
+
}
|
|
7572
|
+
return buttons;
|
|
7573
|
+
}, [catalogData, configurationData, catalogCodex, onNavigateBack, openPlanner, onOpenArticles]);
|
|
7574
|
+
return {
|
|
7575
|
+
loading: loading,
|
|
7576
|
+
catalogData: catalogData,
|
|
7577
|
+
hideImage: configurationData === null || configurationData === void 0 ? void 0 : configurationData.hideCatalogImagesInModelInfo,
|
|
7578
|
+
hideProducts: configurationData === null || configurationData === void 0 ? void 0 : configurationData.hideProductsInModelInfo,
|
|
7579
|
+
navButtons: navButtons,
|
|
7580
|
+
onOpenPlannerWithProduct: onOpenPlannerWithProduct
|
|
7581
|
+
};
|
|
7582
|
+
}
|
|
7583
|
+
function checkDoReturnToProductCreator(plannerReturn, returnTo) {
|
|
7584
|
+
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
7585
|
+
}
|
|
7586
|
+
|
|
7587
|
+
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; }
|
|
7588
|
+
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; }
|
|
7589
|
+
function Info(props) {
|
|
7590
|
+
var _useModelInfoPage = useModelInfoPage(props),
|
|
7591
|
+
loading = _useModelInfoPage.loading,
|
|
7592
|
+
catalogData = _useModelInfoPage.catalogData,
|
|
7593
|
+
hideImage = _useModelInfoPage.hideImage,
|
|
7594
|
+
hideProducts = _useModelInfoPage.hideProducts,
|
|
7595
|
+
navButtons = _useModelInfoPage.navButtons,
|
|
7596
|
+
onOpenPlannerWithProduct = _useModelInfoPage.onOpenPlannerWithProduct;
|
|
7597
|
+
if (loading || !catalogData) {
|
|
7598
|
+
return /*#__PURE__*/jsx("div", {});
|
|
7599
|
+
}
|
|
8106
7600
|
return /*#__PURE__*/jsx(Fragment, {
|
|
8107
|
-
children: !loading &&
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
7601
|
+
children: !loading && /*#__PURE__*/jsxs("div", {
|
|
7602
|
+
className: layout$1,
|
|
7603
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
7604
|
+
className: content,
|
|
8111
7605
|
children: [/*#__PURE__*/jsx(Description$1, {
|
|
8112
|
-
data:
|
|
8113
|
-
className:
|
|
7606
|
+
data: catalogData,
|
|
7607
|
+
className: leftSide,
|
|
8114
7608
|
text: "info.title"
|
|
8115
7609
|
}), /*#__PURE__*/jsxs("div", {
|
|
8116
|
-
className:
|
|
8117
|
-
children: [/*#__PURE__*/
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
hidden: !showProducts,
|
|
8125
|
-
productState: productState,
|
|
8126
|
-
className: products,
|
|
8127
|
-
catalogCodex: catalogCodex,
|
|
8128
|
-
onProductClick: onProductClick,
|
|
8129
|
-
onArticleClick: onArticleClick,
|
|
8130
|
-
accountId: accountId
|
|
8131
|
-
})]
|
|
8132
|
-
}), /*#__PURE__*/jsx(NavBar, {
|
|
8133
|
-
className: footer,
|
|
8134
|
-
navigateBack: navigateBack,
|
|
8135
|
-
buttons: navButtons
|
|
7610
|
+
className: rightSide$1,
|
|
7611
|
+
children: [!hideImage && /*#__PURE__*/jsx(CatalogImages, {
|
|
7612
|
+
data: catalogData,
|
|
7613
|
+
className: catalogImages
|
|
7614
|
+
}), /*#__PURE__*/jsx(ProductsOrArticles, {
|
|
7615
|
+
catalogCodex: catalogData.codex,
|
|
7616
|
+
onProductClick: onOpenPlannerWithProduct,
|
|
7617
|
+
hideProducts: hideProducts
|
|
8136
7618
|
})]
|
|
8137
7619
|
})]
|
|
8138
|
-
})
|
|
7620
|
+
}), /*#__PURE__*/jsx("div", {
|
|
7621
|
+
className: footer,
|
|
7622
|
+
id: "diva-seller-info-navbar",
|
|
7623
|
+
children: /*#__PURE__*/jsx(NavBar, _objectSpread$j({}, navButtons))
|
|
7624
|
+
})]
|
|
8139
7625
|
})
|
|
8140
7626
|
});
|
|
8141
7627
|
}
|
|
@@ -13063,7 +12549,7 @@ function Description (_ref) {
|
|
|
13063
12549
|
var _useTranslation = useTranslation(),
|
|
13064
12550
|
t = _useTranslation.t;
|
|
13065
12551
|
return /*#__PURE__*/jsxs("div", _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
13066
|
-
className:
|
|
12552
|
+
className: classnames(wrapper, props.className),
|
|
13067
12553
|
children: [/*#__PURE__*/jsx("div", {
|
|
13068
12554
|
className: title$1,
|
|
13069
12555
|
children: t(text)
|
|
@@ -13327,8 +12813,6 @@ function ModuleComponent(_ref) {
|
|
|
13327
12813
|
activeBasket = _ref.activeBasket,
|
|
13328
12814
|
activeAccountId = _ref.activeAccountId,
|
|
13329
12815
|
checkBasket = _ref.checkBasket;
|
|
13330
|
-
var _useSellerState2 = useSellerState(),
|
|
13331
|
-
configurationData = _useSellerState2.state.configurationData;
|
|
13332
12816
|
switch (activeModule) {
|
|
13333
12817
|
case 'Collections':
|
|
13334
12818
|
return /*#__PURE__*/jsx(Collections, {});
|
|
@@ -13337,13 +12821,7 @@ function ModuleComponent(_ref) {
|
|
|
13337
12821
|
collectionId: activeCollectionId
|
|
13338
12822
|
});
|
|
13339
12823
|
case 'Info':
|
|
13340
|
-
|
|
13341
|
-
return /*#__PURE__*/jsx(Info, {
|
|
13342
|
-
catalogCodex: activeCatalogCodex,
|
|
13343
|
-
accountId: activeAccountId
|
|
13344
|
-
});
|
|
13345
|
-
}
|
|
13346
|
-
return /*#__PURE__*/jsx(Info$1, {
|
|
12824
|
+
return /*#__PURE__*/jsx(Info, {
|
|
13347
12825
|
catalogCodex: activeCatalogCodex,
|
|
13348
12826
|
accountId: activeAccountId
|
|
13349
12827
|
});
|