@crystaldesign/diva-seller 25.2.0-beta.28 → 25.2.0-beta.3
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 +399 -619
- package/build/types/seller/src/components/Basket/Step3Checkout.d.ts +1 -1
- package/build/types/seller/src/components/Basket/Step3Checkout.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormInfo.d.ts +2 -4
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormInfo.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts +1 -4
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/hooks/useProductState.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/BaseDataForm.d.ts +2 -4
- package/build/types/seller/src/components/ProductCreator/tabs/BaseDataForm.d.ts.map +1 -1
- package/build/types/seller/src/provider/SellerStateProvider.d.ts.map +1 -1
- package/build/types/seller/src/provider/context.d.ts +0 -2
- package/build/types/seller/src/provider/context.d.ts.map +1 -1
- package/build/types/seller/src/provider/hooks/useSellerStateData/index.d.ts +0 -2
- package/build/types/seller/src/provider/hooks/useSellerStateData/index.d.ts.map +1 -1
- package/build/types/seller/src/services/ApiHandler.d.ts +0 -3
- package/build/types/seller/src/services/ApiHandler.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/components/Step3Product.d.ts +1 -2
- package/build/types/seller/src/ui/Basket/CheckOut/components/Step3Product.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts +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 -2
- package/build/types/seller/src/ui/Basket/Header.d.ts.map +1 -1
- package/package.json +5 -5
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/components/SelectClasses.d.ts +0 -12
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/components/SelectClasses.d.ts.map +0 -1
package/build/esm/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import CardMedia from '@mui/material/CardMedia';
|
|
|
17
17
|
import Typography$1 from '@mui/material/Typography';
|
|
18
18
|
import createStyles from '@mui/styles/createStyles';
|
|
19
19
|
import makeStyles from '@mui/styles/makeStyles';
|
|
20
|
-
import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1,
|
|
20
|
+
import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Tooltip, Stack, Paper as Paper$1, Skeleton, IconButton as IconButton$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Divider as Divider$1, Alert as Alert$1, AlertTitle as AlertTitle$1, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box as Box$1, Select as Select$1, MenuItem as MenuItem$1, ListItemButton, ListItemIcon } from '@mui/material';
|
|
21
21
|
import { Histogram, useFilterState, FilterComponent, AnalyticsComponent } from '@crystaldesign/analytics';
|
|
22
22
|
import Button from '@mui/material/Button';
|
|
23
23
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
|
@@ -56,11 +56,11 @@ import { styled as styled$1 } from '@mui/material/styles';
|
|
|
56
56
|
import TextField$1 from '@mui/material/TextField';
|
|
57
57
|
import Select from '@mui/material/Select';
|
|
58
58
|
import Input from '@mui/material/Input';
|
|
59
|
+
import OrderEntry, { apiSaveRenderJobs, VariantSelector } from '@crystaldesign/order-entry';
|
|
59
60
|
import _toArray from '@babel/runtime/helpers/toArray';
|
|
60
61
|
import Box from '@mui/material/Box';
|
|
61
62
|
import StarBorderIcon from '@mui/icons-material/StarBorder';
|
|
62
63
|
import EditIcon from '@mui/icons-material/Edit';
|
|
63
|
-
import OrderEntry, { apiSaveRenderJobs, VariantSelector } from '@crystaldesign/order-entry';
|
|
64
64
|
import classnames from 'classnames';
|
|
65
65
|
import { InfoRounded, Remove, Add, Delete } from '@mui/icons-material';
|
|
66
66
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
@@ -194,8 +194,7 @@ var SellerContext = /*#__PURE__*/createContext({
|
|
|
194
194
|
copyArticleInfoToClipboard: function copyArticleInfoToClipboard() {},
|
|
195
195
|
loadAnalyticScore: function loadAnalyticScore() {
|
|
196
196
|
return Promise.resolve({});
|
|
197
|
-
}
|
|
198
|
-
loadManualCustomDataFields: function loadManualCustomDataFields() {}
|
|
197
|
+
}
|
|
199
198
|
}
|
|
200
199
|
});
|
|
201
200
|
|
|
@@ -462,11 +461,11 @@ function breadcrumbCollection() {
|
|
|
462
461
|
};
|
|
463
462
|
}
|
|
464
463
|
|
|
465
|
-
function ownKeys$
|
|
466
|
-
function _objectSpread$
|
|
464
|
+
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; }
|
|
465
|
+
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; }
|
|
467
466
|
var reducer$1 = function reducer(state, action) {
|
|
468
467
|
if (action.type == 'update') {
|
|
469
|
-
var newState = _objectSpread$
|
|
468
|
+
var newState = _objectSpread$B({}, state);
|
|
470
469
|
action.payload.forEach(function (p) {
|
|
471
470
|
if (p.field == 'basketState') {
|
|
472
471
|
if (p.value) {
|
|
@@ -1149,55 +1148,19 @@ function _apiGetProductCreator() {
|
|
|
1149
1148
|
}));
|
|
1150
1149
|
return _apiGetProductCreator.apply(this, arguments);
|
|
1151
1150
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return _apiGetManualCustomDataFields.apply(this, arguments);
|
|
1154
|
-
}
|
|
1155
|
-
function _apiGetManualCustomDataFields() {
|
|
1156
|
-
_apiGetManualCustomDataFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref13) {
|
|
1157
|
-
var serviceUrl, res, resData;
|
|
1158
|
-
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
1159
|
-
while (1) switch (_context13.prev = _context13.next) {
|
|
1160
|
-
case 0:
|
|
1161
|
-
serviceUrl = _ref13.serviceUrl;
|
|
1162
|
-
_context13.prev = 1;
|
|
1163
|
-
_context13.next = 4;
|
|
1164
|
-
return fetch("".concat(serviceUrl, "/v1/customdata/fields"), {
|
|
1165
|
-
headers: {
|
|
1166
|
-
'Content-Type': 'application/json'
|
|
1167
|
-
}
|
|
1168
|
-
});
|
|
1169
|
-
case 4:
|
|
1170
|
-
res = _context13.sent;
|
|
1171
|
-
_context13.next = 7;
|
|
1172
|
-
return res.json();
|
|
1173
|
-
case 7:
|
|
1174
|
-
resData = _context13.sent;
|
|
1175
|
-
return _context13.abrupt("return", resData);
|
|
1176
|
-
case 11:
|
|
1177
|
-
_context13.prev = 11;
|
|
1178
|
-
_context13.t0 = _context13["catch"](1);
|
|
1179
|
-
throw new Error('Could not custom data field keys');
|
|
1180
|
-
case 14:
|
|
1181
|
-
case "end":
|
|
1182
|
-
return _context13.stop();
|
|
1183
|
-
}
|
|
1184
|
-
}, _callee13, null, [[1, 11]]);
|
|
1185
|
-
}));
|
|
1186
|
-
return _apiGetManualCustomDataFields.apply(this, arguments);
|
|
1187
|
-
}
|
|
1188
|
-
function apiGetAffiliates(_x14) {
|
|
1151
|
+
function apiGetAffiliates(_x13) {
|
|
1189
1152
|
return _apiGetAffiliates.apply(this, arguments);
|
|
1190
1153
|
}
|
|
1191
1154
|
function _apiGetAffiliates() {
|
|
1192
|
-
_apiGetAffiliates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1155
|
+
_apiGetAffiliates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref13) {
|
|
1193
1156
|
var serviceUrl, organizationId, jwt, fullUrl, res, resOrg;
|
|
1194
|
-
return _regeneratorRuntime.wrap(function
|
|
1195
|
-
while (1) switch (
|
|
1157
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
1158
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1196
1159
|
case 0:
|
|
1197
|
-
serviceUrl =
|
|
1160
|
+
serviceUrl = _ref13.serviceUrl, organizationId = _ref13.organizationId, jwt = _ref13.jwt;
|
|
1198
1161
|
fullUrl = serviceUrl + '/v2/organizations/' + organizationId + '/affiliate?inherit=true';
|
|
1199
|
-
|
|
1200
|
-
|
|
1162
|
+
_context13.prev = 2;
|
|
1163
|
+
_context13.next = 5;
|
|
1201
1164
|
return fetch(fullUrl, {
|
|
1202
1165
|
headers: {
|
|
1203
1166
|
Authorization: 'Bearer ' + jwt,
|
|
@@ -1205,24 +1168,24 @@ function _apiGetAffiliates() {
|
|
|
1205
1168
|
}
|
|
1206
1169
|
});
|
|
1207
1170
|
case 5:
|
|
1208
|
-
res =
|
|
1209
|
-
|
|
1171
|
+
res = _context13.sent;
|
|
1172
|
+
_context13.next = 8;
|
|
1210
1173
|
return res.json();
|
|
1211
1174
|
case 8:
|
|
1212
|
-
resOrg =
|
|
1213
|
-
|
|
1175
|
+
resOrg = _context13.sent;
|
|
1176
|
+
_context13.next = 14;
|
|
1214
1177
|
break;
|
|
1215
1178
|
case 11:
|
|
1216
|
-
|
|
1217
|
-
|
|
1179
|
+
_context13.prev = 11;
|
|
1180
|
+
_context13.t0 = _context13["catch"](2);
|
|
1218
1181
|
throw new Error('Could not fetch existing affiliates for organization');
|
|
1219
1182
|
case 14:
|
|
1220
|
-
return
|
|
1183
|
+
return _context13.abrupt("return", resOrg.data);
|
|
1221
1184
|
case 15:
|
|
1222
1185
|
case "end":
|
|
1223
|
-
return
|
|
1186
|
+
return _context13.stop();
|
|
1224
1187
|
}
|
|
1225
|
-
},
|
|
1188
|
+
}, _callee13, null, [[2, 11]]);
|
|
1226
1189
|
}));
|
|
1227
1190
|
return _apiGetAffiliates.apply(this, arguments);
|
|
1228
1191
|
}
|
|
@@ -1332,8 +1295,8 @@ var _excluded$a = ["collectionId"],
|
|
|
1332
1295
|
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; } } }; }
|
|
1333
1296
|
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; } }
|
|
1334
1297
|
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; }
|
|
1335
|
-
function ownKeys$
|
|
1336
|
-
function _objectSpread$
|
|
1298
|
+
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; }
|
|
1299
|
+
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; }
|
|
1337
1300
|
var LOG$9 = getLogger('Seller', 'SellerStateData');
|
|
1338
1301
|
function useSellerStateData(_ref) {
|
|
1339
1302
|
var sessionGuid = _ref.sessionGuid,
|
|
@@ -1463,7 +1426,7 @@ function useSellerStateData(_ref) {
|
|
|
1463
1426
|
}]
|
|
1464
1427
|
});
|
|
1465
1428
|
case 7:
|
|
1466
|
-
return _context.abrupt("return", processData(_objectSpread$
|
|
1429
|
+
return _context.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
1467
1430
|
data: collections
|
|
1468
1431
|
})));
|
|
1469
1432
|
case 10:
|
|
@@ -1527,7 +1490,7 @@ function useSellerStateData(_ref) {
|
|
|
1527
1490
|
updateAcountLogo((_state$collections = state.collections) === null || _state$collections === void 0 || (_state$collections = _state$collections.find(function (c) {
|
|
1528
1491
|
return c.id == collectionId;
|
|
1529
1492
|
})) === null || _state$collections === void 0 ? void 0 : _state$collections.accountLogo);
|
|
1530
|
-
return _context2.abrupt("return", processData(_objectSpread$
|
|
1493
|
+
return _context2.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
1531
1494
|
data: catalogs || []
|
|
1532
1495
|
})));
|
|
1533
1496
|
case 14:
|
|
@@ -1914,8 +1877,8 @@ function useSellerStateData(_ref) {
|
|
|
1914
1877
|
_context7.next = 22;
|
|
1915
1878
|
return apiLoadBasket({
|
|
1916
1879
|
divaNr: divaNr,
|
|
1917
|
-
apiConfig: _objectSpread$
|
|
1918
|
-
api2: _objectSpread$
|
|
1880
|
+
apiConfig: _objectSpread$A(_objectSpread$A({}, apiConfig), {}, {
|
|
1881
|
+
api2: _objectSpread$A(_objectSpread$A({}, apiConfig.api2), {}, {
|
|
1919
1882
|
"default": state.firstLoginApiUrl
|
|
1920
1883
|
})
|
|
1921
1884
|
}),
|
|
@@ -2129,15 +2092,6 @@ function useSellerStateData(_ref) {
|
|
|
2129
2092
|
}
|
|
2130
2093
|
return configData === null || configData === void 0 ? void 0 : configData.BasketStatusArr;
|
|
2131
2094
|
};
|
|
2132
|
-
var setManualCustomDataFields = function setManualCustomDataFields(manualCustomDataFields) {
|
|
2133
|
-
dispatch({
|
|
2134
|
-
type: 'update',
|
|
2135
|
-
payload: [{
|
|
2136
|
-
field: 'manualCustomDataFields',
|
|
2137
|
-
value: manualCustomDataFields
|
|
2138
|
-
}]
|
|
2139
|
-
});
|
|
2140
|
-
};
|
|
2141
2095
|
var setReturnTo = function setReturnTo(returnTo) {
|
|
2142
2096
|
dispatch({
|
|
2143
2097
|
type: 'update',
|
|
@@ -2252,7 +2206,7 @@ function useSellerStateData(_ref) {
|
|
|
2252
2206
|
}]
|
|
2253
2207
|
});
|
|
2254
2208
|
case 24:
|
|
2255
|
-
return _context9.abrupt("return", processData(_objectSpread$
|
|
2209
|
+
return _context9.abrupt("return", processData(_objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
2256
2210
|
data: articles || []
|
|
2257
2211
|
})));
|
|
2258
2212
|
case 27:
|
|
@@ -2304,14 +2258,13 @@ function useSellerStateData(_ref) {
|
|
|
2304
2258
|
copyArticleInfoToClipboard: copyArticleInfoToClipboard,
|
|
2305
2259
|
resetState: resetState,
|
|
2306
2260
|
resetForCache: resetForCache,
|
|
2307
|
-
loadAnalyticScore: loadAnalyticScore
|
|
2308
|
-
setManualCustomDataFields: setManualCustomDataFields
|
|
2261
|
+
loadAnalyticScore: loadAnalyticScore
|
|
2309
2262
|
};
|
|
2310
2263
|
}
|
|
2311
2264
|
|
|
2312
|
-
var _excluded$9 = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "
|
|
2313
|
-
function ownKeys$
|
|
2314
|
-
function _objectSpread$
|
|
2265
|
+
var _excluded$9 = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "resetState", "resetForCache"];
|
|
2266
|
+
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; }
|
|
2267
|
+
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; }
|
|
2315
2268
|
var LOG$8 = getLogger('Seller', 'SellerStateProvider');
|
|
2316
2269
|
var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
2317
2270
|
var children = _ref.children,
|
|
@@ -2390,7 +2343,6 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2390
2343
|
setReturnTo = _useSellerStateData.setReturnTo,
|
|
2391
2344
|
setOriginProductId = _useSellerStateData.setOriginProductId,
|
|
2392
2345
|
setProductCategories = _useSellerStateData.setProductCategories,
|
|
2393
|
-
setManualCustomDataFields = _useSellerStateData.setManualCustomDataFields,
|
|
2394
2346
|
resetState = _useSellerStateData.resetState,
|
|
2395
2347
|
resetForCache = _useSellerStateData.resetForCache,
|
|
2396
2348
|
stateFunctions = _objectWithoutProperties(_useSellerStateData, _excluded$9);
|
|
@@ -2676,7 +2628,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2676
2628
|
_context4.next = 8;
|
|
2677
2629
|
break;
|
|
2678
2630
|
}
|
|
2679
|
-
params = _objectSpread$
|
|
2631
|
+
params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({
|
|
2680
2632
|
catalogCodex: catalogCodex
|
|
2681
2633
|
}, accountId ? {
|
|
2682
2634
|
accountId: accountId
|
|
@@ -2691,13 +2643,13 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2691
2643
|
} : {}), retailArticleNr ? {
|
|
2692
2644
|
retailArticleNr: retailArticleNr
|
|
2693
2645
|
} : {});
|
|
2694
|
-
internal = _objectSpread$
|
|
2646
|
+
internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2695
2647
|
forceReload: forceReload
|
|
2696
2648
|
} : {}), {}, {
|
|
2697
2649
|
accountSessionGuid: accountSessionGuid,
|
|
2698
2650
|
basketData: basketData
|
|
2699
2651
|
});
|
|
2700
|
-
setPlannerParams(_objectSpread$
|
|
2652
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2701
2653
|
internal: internal
|
|
2702
2654
|
}));
|
|
2703
2655
|
openComponent({
|
|
@@ -2729,7 +2681,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2729
2681
|
updateBasketState({
|
|
2730
2682
|
concat: true
|
|
2731
2683
|
});
|
|
2732
|
-
var _params = _objectSpread$
|
|
2684
|
+
var _params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2733
2685
|
catalogCodex: catalogCodex
|
|
2734
2686
|
} : {}), accountId ? {
|
|
2735
2687
|
accountId: accountId
|
|
@@ -2746,12 +2698,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2746
2698
|
} : {}), productId ? {
|
|
2747
2699
|
productId: productId
|
|
2748
2700
|
} : {});
|
|
2749
|
-
var _internal = _objectSpread$
|
|
2701
|
+
var _internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2750
2702
|
forceReload: forceReload
|
|
2751
2703
|
} : {}), {}, {
|
|
2752
2704
|
accountSessionGuid: accountSessionGuid
|
|
2753
2705
|
});
|
|
2754
|
-
setPlannerParams(_objectSpread$
|
|
2706
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params), {}, {
|
|
2755
2707
|
internal: _internal
|
|
2756
2708
|
}));
|
|
2757
2709
|
openComponent({
|
|
@@ -2784,7 +2736,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2784
2736
|
});
|
|
2785
2737
|
}
|
|
2786
2738
|
} else {
|
|
2787
|
-
_params2 = _objectSpread$
|
|
2739
|
+
_params2 = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2788
2740
|
catalogCodex: catalogCodex
|
|
2789
2741
|
} : {}), accountId ? {
|
|
2790
2742
|
accountId: accountId
|
|
@@ -2799,12 +2751,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2799
2751
|
} : {}), retailArticleNr ? {
|
|
2800
2752
|
retailArticleNr: retailArticleNr
|
|
2801
2753
|
} : {});
|
|
2802
|
-
_internal2 = _objectSpread$
|
|
2754
|
+
_internal2 = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2803
2755
|
forceReload: forceReload
|
|
2804
2756
|
} : {}), {}, {
|
|
2805
2757
|
accountSessionGuid: accountSessionGuid
|
|
2806
2758
|
});
|
|
2807
|
-
setPlannerParams(_objectSpread$
|
|
2759
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params2), {}, {
|
|
2808
2760
|
internal: _internal2
|
|
2809
2761
|
}));
|
|
2810
2762
|
openComponent({
|
|
@@ -2840,7 +2792,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2840
2792
|
divaNr: divaNr,
|
|
2841
2793
|
returnTo: returnTo
|
|
2842
2794
|
};
|
|
2843
|
-
setPlannerParams(_objectSpread$
|
|
2795
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, _params3), {}, {
|
|
2844
2796
|
internal: {
|
|
2845
2797
|
basketData: basketData,
|
|
2846
2798
|
forceReload: forceReload
|
|
@@ -2888,7 +2840,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2888
2840
|
step: null,
|
|
2889
2841
|
assignNewDivaNr: false
|
|
2890
2842
|
});
|
|
2891
|
-
var params = _objectSpread$
|
|
2843
|
+
var params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, catalogCodex ? {
|
|
2892
2844
|
catalogCodex: catalogCodex
|
|
2893
2845
|
} : {}), accountId ? {
|
|
2894
2846
|
accountId: accountId
|
|
@@ -2903,12 +2855,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2903
2855
|
} : {}), retailArticleNr ? {
|
|
2904
2856
|
retailArticleNr: retailArticleNr
|
|
2905
2857
|
} : {});
|
|
2906
|
-
var internal = _objectSpread$
|
|
2858
|
+
var internal = _objectSpread$z(_objectSpread$z({}, forceReload ? {
|
|
2907
2859
|
forceReload: forceReload
|
|
2908
2860
|
} : {}), {}, {
|
|
2909
2861
|
accountSessionGuid: accountSessionGuid
|
|
2910
2862
|
});
|
|
2911
|
-
setPlannerParams(_objectSpread$
|
|
2863
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2912
2864
|
internal: internal
|
|
2913
2865
|
}));
|
|
2914
2866
|
openComponent({
|
|
@@ -2957,7 +2909,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2957
2909
|
case 'toPlanner':
|
|
2958
2910
|
{
|
|
2959
2911
|
if (plannerParams) {
|
|
2960
|
-
var params = _objectSpread$
|
|
2912
|
+
var params = _objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z(_objectSpread$z({}, plannerParams.catalogCodex ? {
|
|
2961
2913
|
catalogCodex: plannerParams.catalogCodex
|
|
2962
2914
|
} : {}), plannerParams.accountId ? {
|
|
2963
2915
|
accountId: plannerParams.accountId
|
|
@@ -2970,12 +2922,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
2970
2922
|
} : {}), plannerParams.retailArticleNr ? {
|
|
2971
2923
|
retailArticleNr: plannerParams.retailArticleNr
|
|
2972
2924
|
} : {});
|
|
2973
|
-
var internal = _objectSpread$
|
|
2925
|
+
var internal = _objectSpread$z(_objectSpread$z({}, plannerParams.forceReload ? {
|
|
2974
2926
|
forceReload: plannerParams.forceReload
|
|
2975
2927
|
} : {}), {}, {
|
|
2976
2928
|
accountSessionGuid: plannerParams.accountSessionGuid
|
|
2977
2929
|
});
|
|
2978
|
-
setPlannerParams(_objectSpread$
|
|
2930
|
+
setPlannerParams(_objectSpread$z(_objectSpread$z({}, params), {}, {
|
|
2979
2931
|
internal: internal
|
|
2980
2932
|
}));
|
|
2981
2933
|
openComponent({
|
|
@@ -3002,8 +2954,8 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3002
2954
|
_context5.next = 2;
|
|
3003
2955
|
return apiLoadBasket({
|
|
3004
2956
|
divaNr: divaNr,
|
|
3005
|
-
apiConfig: _objectSpread$
|
|
3006
|
-
api2: _objectSpread$
|
|
2957
|
+
apiConfig: _objectSpread$z(_objectSpread$z({}, apiConfig), {}, {
|
|
2958
|
+
api2: _objectSpread$z(_objectSpread$z({}, apiConfig.api2), {}, {
|
|
3007
2959
|
"default": state.firstLoginApiUrl
|
|
3008
2960
|
})
|
|
3009
2961
|
}),
|
|
@@ -3045,29 +2997,6 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3045
2997
|
return _ref7.apply(this, arguments);
|
|
3046
2998
|
};
|
|
3047
2999
|
}();
|
|
3048
|
-
var loadManualCustomDataFields = /*#__PURE__*/function () {
|
|
3049
|
-
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
3050
|
-
var data;
|
|
3051
|
-
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
3052
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
3053
|
-
case 0:
|
|
3054
|
-
_context7.next = 2;
|
|
3055
|
-
return apiGetManualCustomDataFields({
|
|
3056
|
-
serviceUrl: apiConfig.catalogService
|
|
3057
|
-
});
|
|
3058
|
-
case 2:
|
|
3059
|
-
data = _context7.sent;
|
|
3060
|
-
if (data !== null && data !== void 0 && data.length) setManualCustomDataFields(data);
|
|
3061
|
-
case 4:
|
|
3062
|
-
case "end":
|
|
3063
|
-
return _context7.stop();
|
|
3064
|
-
}
|
|
3065
|
-
}, _callee7);
|
|
3066
|
-
}));
|
|
3067
|
-
return function loadManualCustomDataFields() {
|
|
3068
|
-
return _ref8.apply(this, arguments);
|
|
3069
|
-
};
|
|
3070
|
-
}();
|
|
3071
3000
|
var contextData = {
|
|
3072
3001
|
state: {
|
|
3073
3002
|
loadingBasket: loadingBasket,
|
|
@@ -3093,10 +3022,9 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3093
3022
|
doShowPrices: !hidePrices,
|
|
3094
3023
|
returnTo: state.returnTo,
|
|
3095
3024
|
originProductId: state.originProductId,
|
|
3096
|
-
productCategories: state.productCategories
|
|
3097
|
-
manualCustomDataFields: state.manualCustomDataFields
|
|
3025
|
+
productCategories: state.productCategories
|
|
3098
3026
|
},
|
|
3099
|
-
actions: _objectSpread$
|
|
3027
|
+
actions: _objectSpread$z(_objectSpread$z({}, stateFunctions), {}, {
|
|
3100
3028
|
openComponent: openComponent,
|
|
3101
3029
|
openModal: openModal,
|
|
3102
3030
|
openPlanner: openPlanner,
|
|
@@ -3107,8 +3035,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3107
3035
|
sendEmail: sendEmail,
|
|
3108
3036
|
fetchBasket: fetchBasket,
|
|
3109
3037
|
updateBasketState: updateBasketState,
|
|
3110
|
-
loadUniqueDivaNr: loadUniqueDivaNr
|
|
3111
|
-
loadManualCustomDataFields: loadManualCustomDataFields
|
|
3038
|
+
loadUniqueDivaNr: loadUniqueDivaNr
|
|
3112
3039
|
})
|
|
3113
3040
|
};
|
|
3114
3041
|
return /*#__PURE__*/jsx(SellerContext.Provider, {
|
|
@@ -3145,8 +3072,8 @@ var useStyles$3 = makeStyles(function () {
|
|
|
3145
3072
|
});
|
|
3146
3073
|
});
|
|
3147
3074
|
|
|
3148
|
-
function ownKeys$
|
|
3149
|
-
function _objectSpread$
|
|
3075
|
+
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; }
|
|
3076
|
+
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; }
|
|
3150
3077
|
function Title(_ref) {
|
|
3151
3078
|
var text = _ref.text,
|
|
3152
3079
|
children = _ref.children,
|
|
@@ -3158,7 +3085,7 @@ function Title(_ref) {
|
|
|
3158
3085
|
style: {
|
|
3159
3086
|
flexGrow: 1
|
|
3160
3087
|
},
|
|
3161
|
-
children: [text, help && /*#__PURE__*/jsx(HelpButton, _objectSpread$
|
|
3088
|
+
children: [text, help && /*#__PURE__*/jsx(HelpButton, _objectSpread$y({}, help))]
|
|
3162
3089
|
}), children]
|
|
3163
3090
|
});
|
|
3164
3091
|
}
|
|
@@ -3175,8 +3102,8 @@ function getImageOrFallbackUrl(url) {
|
|
|
3175
3102
|
return url || 'https://cdn.diva-portal.com/static/images/image_placeholder-landscape-short.png';
|
|
3176
3103
|
}
|
|
3177
3104
|
|
|
3178
|
-
function ownKeys$
|
|
3179
|
-
function _objectSpread$
|
|
3105
|
+
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; }
|
|
3106
|
+
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; }
|
|
3180
3107
|
var LOG$7 = getLogger('SellerCatalogs', 'Catalogs');
|
|
3181
3108
|
function Catalogs(_ref) {
|
|
3182
3109
|
var _configurationData$an, _configurationData$ca5, _configurationData$an3, _configurationData$an4;
|
|
@@ -3306,7 +3233,7 @@ function Catalogs(_ref) {
|
|
|
3306
3233
|
if (configurationData !== null && configurationData !== void 0 && (_configurationData$ca = configurationData.catalogs) !== null && _configurationData$ca !== void 0 && _configurationData$ca.onOpen) {
|
|
3307
3234
|
action = configurationData === null || configurationData === void 0 || (_configurationData$ca2 = configurationData.catalogs) === null || _configurationData$ca2 === void 0 ? void 0 : _configurationData$ca2.onOpen;
|
|
3308
3235
|
if (!action.url) {
|
|
3309
|
-
action = _objectSpread$
|
|
3236
|
+
action = _objectSpread$x({}, action);
|
|
3310
3237
|
parameters = {};
|
|
3311
3238
|
Object.entries(action.parameters || {}).forEach(function (_ref4) {
|
|
3312
3239
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
@@ -3322,7 +3249,7 @@ function Catalogs(_ref) {
|
|
|
3322
3249
|
} else {
|
|
3323
3250
|
openComponent({
|
|
3324
3251
|
type: 'SELLER',
|
|
3325
|
-
parameters: _objectSpread$
|
|
3252
|
+
parameters: _objectSpread$x({
|
|
3326
3253
|
module: 'Info',
|
|
3327
3254
|
catalogCodex: item.codex
|
|
3328
3255
|
}, item.accountId ? {
|
|
@@ -4089,7 +4016,6 @@ function Header$1(_ref) {
|
|
|
4089
4016
|
setActBasketPage = _ref.setActBasketPage,
|
|
4090
4017
|
doExportToVKP = _ref.doExportToVKP,
|
|
4091
4018
|
showProductCreator = _ref.showProductCreator,
|
|
4092
|
-
disableProductCreator = _ref.disableProductCreator,
|
|
4093
4019
|
config = _ref.config,
|
|
4094
4020
|
enableVKPExportButton = _ref.enableVKPExportButton;
|
|
4095
4021
|
var _useTranslation = useTranslation(),
|
|
@@ -4115,18 +4041,11 @@ function Header$1(_ref) {
|
|
|
4115
4041
|
onClick: doExportToVKP,
|
|
4116
4042
|
disabled: !enableVKPExportButton,
|
|
4117
4043
|
children: "VKP-Export"
|
|
4118
|
-
}), showProductCreator && /*#__PURE__*/jsx(
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
color: 'primary',
|
|
4124
|
-
variant: 'contained',
|
|
4125
|
-
onClick: openProductCreator,
|
|
4126
|
-
disabled: disableProductCreator,
|
|
4127
|
-
children: t('basket.navigation.products')
|
|
4128
|
-
})
|
|
4129
|
-
})
|
|
4044
|
+
}), showProductCreator && /*#__PURE__*/jsx(Button, {
|
|
4045
|
+
color: 'primary',
|
|
4046
|
+
variant: 'contained',
|
|
4047
|
+
onClick: openProductCreator,
|
|
4048
|
+
children: t('basket.navigation.products')
|
|
4130
4049
|
}), /*#__PURE__*/jsxs(ButtonGroup, {
|
|
4131
4050
|
color: "primary",
|
|
4132
4051
|
children: [/*#__PURE__*/jsx(Button, {
|
|
@@ -4175,8 +4094,8 @@ function Header(_ref) {
|
|
|
4175
4094
|
});
|
|
4176
4095
|
}
|
|
4177
4096
|
|
|
4178
|
-
function ownKeys$
|
|
4179
|
-
function _objectSpread$
|
|
4097
|
+
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; }
|
|
4098
|
+
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; }
|
|
4180
4099
|
function MenuListComposition(_ref) {
|
|
4181
4100
|
var setId = _ref.setId,
|
|
4182
4101
|
visibile = _ref.visibile,
|
|
@@ -4259,7 +4178,7 @@ function MenuListComposition(_ref) {
|
|
|
4259
4178
|
children: function children(_ref2) {
|
|
4260
4179
|
var TransitionProps = _ref2.TransitionProps,
|
|
4261
4180
|
placement = _ref2.placement;
|
|
4262
|
-
return /*#__PURE__*/jsx(Grow, _objectSpread$
|
|
4181
|
+
return /*#__PURE__*/jsx(Grow, _objectSpread$w(_objectSpread$w({}, TransitionProps), {}, {
|
|
4263
4182
|
style: {
|
|
4264
4183
|
transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
|
|
4265
4184
|
},
|
|
@@ -4339,8 +4258,8 @@ function Images(_ref) {
|
|
|
4339
4258
|
});
|
|
4340
4259
|
}
|
|
4341
4260
|
|
|
4342
|
-
function ownKeys$
|
|
4343
|
-
function _objectSpread$
|
|
4261
|
+
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; }
|
|
4262
|
+
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; }
|
|
4344
4263
|
var OpvImage = function OpvImage(_ref) {
|
|
4345
4264
|
var src = _ref.src;
|
|
4346
4265
|
var _useHover = useHover({
|
|
@@ -4358,15 +4277,15 @@ var OpvImage = function OpvImage(_ref) {
|
|
|
4358
4277
|
layerProps = _useLayer.layerProps,
|
|
4359
4278
|
triggerProps = _useLayer.triggerProps;
|
|
4360
4279
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
4361
|
-
children: [/*#__PURE__*/jsx("img", _objectSpread$
|
|
4280
|
+
children: [/*#__PURE__*/jsx("img", _objectSpread$v(_objectSpread$v(_objectSpread$v({}, triggerProps), hoverProps), {}, {
|
|
4362
4281
|
src: src,
|
|
4363
4282
|
style: {
|
|
4364
4283
|
width: '20px'
|
|
4365
4284
|
}
|
|
4366
|
-
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$
|
|
4285
|
+
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$v(_objectSpread$v({
|
|
4367
4286
|
src: src.replace('_gal.', '.')
|
|
4368
4287
|
}, layerProps), {}, {
|
|
4369
|
-
style: _objectSpread$
|
|
4288
|
+
style: _objectSpread$v({
|
|
4370
4289
|
width: '300px'
|
|
4371
4290
|
}, layerProps.style)
|
|
4372
4291
|
}))))]
|
|
@@ -4776,8 +4695,8 @@ function Set$1(_ref) {
|
|
|
4776
4695
|
}
|
|
4777
4696
|
|
|
4778
4697
|
var _excluded$8 = ["onValueChange", "value"];
|
|
4779
|
-
function ownKeys$
|
|
4780
|
-
function _objectSpread$
|
|
4698
|
+
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; }
|
|
4699
|
+
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; }
|
|
4781
4700
|
function DiscountField (_ref) {
|
|
4782
4701
|
var _ref2;
|
|
4783
4702
|
var updateDiscount = _ref.updateDiscount,
|
|
@@ -4865,7 +4784,7 @@ function ControlledNumberFormat$1(_ref3) {
|
|
|
4865
4784
|
useEffect(function () {
|
|
4866
4785
|
setValue(origValue);
|
|
4867
4786
|
}, [origValue]);
|
|
4868
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4787
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
4869
4788
|
placeholder: props.suffix,
|
|
4870
4789
|
value: value === 0 ? undefined : value,
|
|
4871
4790
|
customInput: StyledTextFiled$1,
|
|
@@ -4890,8 +4809,8 @@ var StyledTextFiled$1 = withStyles({
|
|
|
4890
4809
|
})(TextField);
|
|
4891
4810
|
|
|
4892
4811
|
var _excluded$7 = ["onValueChange", "value"];
|
|
4893
|
-
function ownKeys$
|
|
4894
|
-
function _objectSpread$
|
|
4812
|
+
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; }
|
|
4813
|
+
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; }
|
|
4895
4814
|
function AdditionalPriceField (_ref) {
|
|
4896
4815
|
var updatePrice = _ref.updatePrice,
|
|
4897
4816
|
price = _ref.price,
|
|
@@ -4972,7 +4891,7 @@ function ControlledNumberFormat(_ref2) {
|
|
|
4972
4891
|
useEffect(function () {
|
|
4973
4892
|
setValue(origValue);
|
|
4974
4893
|
}, [origValue]);
|
|
4975
|
-
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$
|
|
4894
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
4976
4895
|
placeholder: '0 ' + DivaUtils$1.defaultPriceFormat.currency,
|
|
4977
4896
|
value: value,
|
|
4978
4897
|
customInput: StyledTextFiled,
|
|
@@ -5484,10 +5403,9 @@ function styleInject(css, ref) {
|
|
|
5484
5403
|
}
|
|
5485
5404
|
}
|
|
5486
5405
|
|
|
5487
|
-
var infocontainer
|
|
5488
|
-
var
|
|
5489
|
-
|
|
5490
|
-
styleInject(css_248z$c);
|
|
5406
|
+
var infocontainer = "infocontainer-ir9gv";
|
|
5407
|
+
var css_248z$b = ".infocontainer-ir9gv {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
|
|
5408
|
+
styleInject(css_248z$b);
|
|
5491
5409
|
|
|
5492
5410
|
function Step2ClientData(_ref) {
|
|
5493
5411
|
var _config$clientData, _config$clientData2;
|
|
@@ -5498,7 +5416,7 @@ function Step2ClientData(_ref) {
|
|
|
5498
5416
|
t = _useTranslation.t;
|
|
5499
5417
|
if (productSaved) {
|
|
5500
5418
|
return /*#__PURE__*/jsx("div", {
|
|
5501
|
-
className: infocontainer
|
|
5419
|
+
className: infocontainer,
|
|
5502
5420
|
children: /*#__PURE__*/jsx(InfoAlert$1, {
|
|
5503
5421
|
title: t('basket.checkout.step2.disabledtitle'),
|
|
5504
5422
|
content: /*#__PURE__*/jsx(Fragment, {
|
|
@@ -5962,9 +5880,8 @@ var productDetailText = "productDetailText-wkk6U";
|
|
|
5962
5880
|
var productDetailSkeleton = "productDetailSkeleton-3-RLq";
|
|
5963
5881
|
var productDetailDivider = "productDetailDivider-C1Cdh";
|
|
5964
5882
|
var alertTitle = "alertTitle-Bm1NO";
|
|
5965
|
-
var
|
|
5966
|
-
|
|
5967
|
-
styleInject(css_248z$b);
|
|
5883
|
+
var css_248z$a = ".container-3kPdM {\n padding-bottom: 10px;\n margin-top: 2px;\n}\n\n.mainStack-1xE4c {\n width: 100%;\n margin-top: 16px;\n}\n\n.productContainer-JcVn0 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-bottom: 16px;\n width: 100%;\n}\n\n.productNameContainer-35ZZc {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n}\n\n.productNameField-hPNbW {\n margin: 8px;\n width: 70%;\n}\n\n.productImage-Vn0l- {\n width: 70%;\n display: block;\n}\n\n.productImage-Vn0l-.hidden-zZ8fS {\n display: none;\n}\n\n.productDetailsContainer-5c-V9 {\n margin: 20px;\n max-height: 100%;\n}\n\n.productDetailRow-9KtDG {\n display: flex;\n}\n\n.productDetailLabel-t7Mn7 {\n font-weight: 600;\n width: 40%;\n}\n\n.favoriteContainer-ka7lC {\n display: flex;\n align-items: center;\n margin-top: 16px;\n}\n.favoriteCheckbox-JYnH- {\n margin-left: 10px;\n}\n\n.actionButtonContainer-WfYfD {\n display: flex;\n gap: 16px;\n margin-top: 16px;\n justify-content: right;\n}\n@media (max-width: 768px) {\n .actionButtonContainer-WfYfD {\n display: flex;\n justify-content: space-between;\n }\n}\n\n.productDetailsPaper-VsWfW {\n width: 100%;\n max-height: 100%;\n overflow: auto;\n}\n\n.productDetailText-wkk6U {\n white-space: pre-wrap;\n}\n\n.productDetailSkeleton-3-RLq {\n margin-left: 30px;\n height: 28px;\n}\n\n.productDetailDivider-C1Cdh {\n margin-bottom: 16px;\n}\n\n.alertTitle-Bm1NO {\n font-weight: 600;\n}\n\n/* Responsive styles */\n@media (min-width: 900px) {\n .productDetailsPaper-VsWfW {\n width: 60%;\n }\n}\n";
|
|
5884
|
+
styleInject(css_248z$a);
|
|
5968
5885
|
|
|
5969
5886
|
function Step3Product(_ref) {
|
|
5970
5887
|
var _currentProduct$techn;
|
|
@@ -5972,8 +5889,7 @@ function Step3Product(_ref) {
|
|
|
5972
5889
|
startWithEmptyBasket = _ref.startWithEmptyBasket,
|
|
5973
5890
|
handleSave = _ref.handleSave,
|
|
5974
5891
|
updateProductData = _ref.updateProductData,
|
|
5975
|
-
productIsLoading = _ref.productIsLoading
|
|
5976
|
-
disabled = _ref.disabled;
|
|
5892
|
+
productIsLoading = _ref.productIsLoading;
|
|
5977
5893
|
var _useDivaCore = useDivaCore(),
|
|
5978
5894
|
organization = _useDivaCore.state.organization;
|
|
5979
5895
|
var _useTranslation = useTranslation(),
|
|
@@ -6004,18 +5920,6 @@ function Step3Product(_ref) {
|
|
|
6004
5920
|
var handleFavoriteToggle = function handleFavoriteToggle() {
|
|
6005
5921
|
setIsFavorite(!isFavorite);
|
|
6006
5922
|
};
|
|
6007
|
-
if (disabled) {
|
|
6008
|
-
return /*#__PURE__*/jsx("div", {
|
|
6009
|
-
className: infocontainer,
|
|
6010
|
-
children: /*#__PURE__*/jsx(InfoAlert, {
|
|
6011
|
-
type: "info",
|
|
6012
|
-
title: t('basket.checkout.step3.productdisabled'),
|
|
6013
|
-
content: /*#__PURE__*/jsx(Fragment, {
|
|
6014
|
-
children: t('basket.checkout.step3.productdisabledtext')
|
|
6015
|
-
})
|
|
6016
|
-
})
|
|
6017
|
-
});
|
|
6018
|
-
}
|
|
6019
5923
|
return /*#__PURE__*/jsxs(Box, {
|
|
6020
5924
|
className: container$1,
|
|
6021
5925
|
children: [organization.settings.enableVKMarketing && /*#__PURE__*/jsx(InfoAlert, {
|
|
@@ -6194,8 +6098,8 @@ function InfoAlert(_ref2) {
|
|
|
6194
6098
|
});
|
|
6195
6099
|
}
|
|
6196
6100
|
|
|
6197
|
-
function ownKeys$
|
|
6198
|
-
function _objectSpread$
|
|
6101
|
+
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; }
|
|
6102
|
+
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; }
|
|
6199
6103
|
function CheckOut(_ref) {
|
|
6200
6104
|
var _basket$Client;
|
|
6201
6105
|
var schema = _ref.schema,
|
|
@@ -6235,19 +6139,22 @@ function CheckOut(_ref) {
|
|
|
6235
6139
|
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
6236
6140
|
toggleLoading = _useDivaCore$actions.toggleLoading,
|
|
6237
6141
|
openModal = _useDivaCore$actions.openModal,
|
|
6238
|
-
|
|
6142
|
+
_useDivaCore$state = _useDivaCore.state,
|
|
6143
|
+
apiConfig = _useDivaCore$state.apiConfig,
|
|
6144
|
+
jwt = _useDivaCore$state.jwt,
|
|
6145
|
+
organization = _useDivaCore$state.organization;
|
|
6239
6146
|
var handleSave = useCallback(/*#__PURE__*/function () {
|
|
6240
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6241
|
-
return _regeneratorRuntime.wrap(function
|
|
6242
|
-
while (1) switch (
|
|
6147
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(openPDF, sendMail, isFav) {
|
|
6148
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
6149
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
6243
6150
|
case 0:
|
|
6244
6151
|
if (!(status === 'BASE_CONFIGURATION')) {
|
|
6245
|
-
|
|
6152
|
+
_context2.next = 17;
|
|
6246
6153
|
break;
|
|
6247
6154
|
}
|
|
6248
6155
|
toggleLoading('saveProduct');
|
|
6249
|
-
|
|
6250
|
-
|
|
6156
|
+
_context2.prev = 2;
|
|
6157
|
+
_context2.next = 5;
|
|
6251
6158
|
return saveProduct(isFav);
|
|
6252
6159
|
case 5:
|
|
6253
6160
|
toggleLoading('saveProduct');
|
|
@@ -6257,11 +6164,11 @@ function CheckOut(_ref) {
|
|
|
6257
6164
|
accept: true,
|
|
6258
6165
|
text: t('basket.checkout.productsavedtext')
|
|
6259
6166
|
});
|
|
6260
|
-
|
|
6167
|
+
_context2.next = 14;
|
|
6261
6168
|
break;
|
|
6262
6169
|
case 10:
|
|
6263
|
-
|
|
6264
|
-
|
|
6170
|
+
_context2.prev = 10;
|
|
6171
|
+
_context2.t0 = _context2["catch"](2);
|
|
6265
6172
|
toggleLoading('saveProduct');
|
|
6266
6173
|
openModal({
|
|
6267
6174
|
title: t('Error'),
|
|
@@ -6269,34 +6176,71 @@ function CheckOut(_ref) {
|
|
|
6269
6176
|
text: t('basket.checkout.errorsavingproduct')
|
|
6270
6177
|
});
|
|
6271
6178
|
case 14:
|
|
6272
|
-
|
|
6273
|
-
return
|
|
6179
|
+
_context2.prev = 14;
|
|
6180
|
+
return _context2.abrupt("return");
|
|
6274
6181
|
case 17:
|
|
6275
6182
|
if (!isSaving) {
|
|
6276
6183
|
setIsSaving(true);
|
|
6277
|
-
onClickSave(openPDF, sendMail
|
|
6184
|
+
onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
|
|
6185
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(p) {
|
|
6186
|
+
var newRenderJob;
|
|
6187
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
6188
|
+
while (1) switch (_context.prev = _context.next) {
|
|
6189
|
+
case 0:
|
|
6190
|
+
if (!basket3DExportChecked) {
|
|
6191
|
+
_context.next = 4;
|
|
6192
|
+
break;
|
|
6193
|
+
}
|
|
6194
|
+
newRenderJob = {
|
|
6195
|
+
divaNr: basket.DivaNr,
|
|
6196
|
+
organization: basket.OrganizationId,
|
|
6197
|
+
job: '3DEXPORT',
|
|
6198
|
+
diva3DProject: basket.Diva3DProject ? atob(basket.Diva3DProject) : undefined,
|
|
6199
|
+
hQRenderScript: basket.OrderSets[0].HQRenderScript,
|
|
6200
|
+
divaNrVariantId: basket.DocumentVersion,
|
|
6201
|
+
organizationName: basket.OrganizationId_displayText,
|
|
6202
|
+
productName: basket.SetName
|
|
6203
|
+
};
|
|
6204
|
+
_context.next = 4;
|
|
6205
|
+
return apiSaveRenderJobs({
|
|
6206
|
+
serviceUrl: apiConfig.mediaService,
|
|
6207
|
+
jobs: [newRenderJob],
|
|
6208
|
+
jwt: jwt
|
|
6209
|
+
});
|
|
6210
|
+
case 4:
|
|
6211
|
+
setIsSaving(false);
|
|
6212
|
+
case 5:
|
|
6213
|
+
case "end":
|
|
6214
|
+
return _context.stop();
|
|
6215
|
+
}
|
|
6216
|
+
}, _callee);
|
|
6217
|
+
}));
|
|
6218
|
+
return function (_x4) {
|
|
6219
|
+
return _ref3.apply(this, arguments);
|
|
6220
|
+
};
|
|
6221
|
+
}())["catch"](function () {
|
|
6278
6222
|
return setIsSaving(false);
|
|
6279
6223
|
});
|
|
6280
6224
|
}
|
|
6281
6225
|
case 18:
|
|
6282
6226
|
case "end":
|
|
6283
|
-
return
|
|
6227
|
+
return _context2.stop();
|
|
6284
6228
|
}
|
|
6285
|
-
},
|
|
6229
|
+
}, _callee2, null, [[2, 10, 14, 17]]);
|
|
6286
6230
|
}));
|
|
6287
6231
|
return function (_x, _x2, _x3) {
|
|
6288
6232
|
return _ref2.apply(this, arguments);
|
|
6289
6233
|
};
|
|
6290
6234
|
}(), [isSaving, onClickSave, basket3DExportChecked]);
|
|
6291
|
-
var onChangeForm = function onChangeForm(
|
|
6292
|
-
var data =
|
|
6235
|
+
var onChangeForm = function onChangeForm(_ref4) {
|
|
6236
|
+
var data = _ref4.data;
|
|
6293
6237
|
for (var key in data) {
|
|
6294
6238
|
basket[key] = data[key];
|
|
6295
6239
|
}
|
|
6296
6240
|
};
|
|
6297
6241
|
|
|
6298
6242
|
// for LEAFLET don't show printOptions, if there are any configured.
|
|
6299
|
-
var finalSchema = _objectSpread$
|
|
6243
|
+
var finalSchema = _objectSpread$s(_objectSpread$s({}, uiSchema), {}, {
|
|
6300
6244
|
elements: _toConsumableArray(uiSchema.elements)
|
|
6301
6245
|
});
|
|
6302
6246
|
if (status == 'LEAFLET') {
|
|
@@ -6337,8 +6281,7 @@ function CheckOut(_ref) {
|
|
|
6337
6281
|
currentProduct: currentProduct,
|
|
6338
6282
|
productIsLoading: productIsLoading,
|
|
6339
6283
|
handleSave: handleSave,
|
|
6340
|
-
updateProductData: updateProductData
|
|
6341
|
-
disabled: basket.OrderSets.length > 1
|
|
6284
|
+
updateProductData: updateProductData
|
|
6342
6285
|
}), status !== 'BASE_CONFIGURATION' && /*#__PURE__*/jsxs(Fragment, {
|
|
6343
6286
|
children: [/*#__PURE__*/jsx("div", {
|
|
6344
6287
|
style: {
|
|
@@ -6408,12 +6351,12 @@ function isEmpty(data) {
|
|
|
6408
6351
|
});
|
|
6409
6352
|
}
|
|
6410
6353
|
|
|
6411
|
-
function ownKeys$
|
|
6412
|
-
function _objectSpread$
|
|
6354
|
+
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; }
|
|
6355
|
+
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; }
|
|
6413
6356
|
var schema = function schema(hideWWSButton) {
|
|
6414
6357
|
return {
|
|
6415
6358
|
type: 'object',
|
|
6416
|
-
properties: _objectSpread$
|
|
6359
|
+
properties: _objectSpread$r(_objectSpread$r({
|
|
6417
6360
|
Salesperson: {
|
|
6418
6361
|
type: 'string',
|
|
6419
6362
|
title: 'basket.checkout.form.seller'
|
|
@@ -6694,7 +6637,7 @@ function Step4Checkout(_ref) {
|
|
|
6694
6637
|
};
|
|
6695
6638
|
if (!is3dReady) {
|
|
6696
6639
|
return /*#__PURE__*/jsx("div", {
|
|
6697
|
-
className: infocontainer
|
|
6640
|
+
className: infocontainer,
|
|
6698
6641
|
children: /*#__PURE__*/jsx(InfoAlert$1, {
|
|
6699
6642
|
title: t('basket.checkout.step4.errortitle'),
|
|
6700
6643
|
content: /*#__PURE__*/jsx(Fragment, {
|
|
@@ -6705,7 +6648,7 @@ function Step4Checkout(_ref) {
|
|
|
6705
6648
|
}
|
|
6706
6649
|
if (!productSaved) {
|
|
6707
6650
|
return /*#__PURE__*/jsx("div", {
|
|
6708
|
-
className: infocontainer
|
|
6651
|
+
className: infocontainer,
|
|
6709
6652
|
children: /*#__PURE__*/jsx(InfoAlert$1, {
|
|
6710
6653
|
title: t('basket.checkout.step4.errortitle'),
|
|
6711
6654
|
content: /*#__PURE__*/jsx(Fragment, {
|
|
@@ -6748,8 +6691,8 @@ function Step4Checkout(_ref) {
|
|
|
6748
6691
|
});
|
|
6749
6692
|
}
|
|
6750
6693
|
|
|
6751
|
-
function ownKeys$
|
|
6752
|
-
function _objectSpread$
|
|
6694
|
+
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; }
|
|
6695
|
+
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; }
|
|
6753
6696
|
function useProduct(basket) {
|
|
6754
6697
|
var _useState = useState(false),
|
|
6755
6698
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -6812,7 +6755,7 @@ function useProduct(basket) {
|
|
|
6812
6755
|
});
|
|
6813
6756
|
case 2:
|
|
6814
6757
|
myProduct = _context2.sent;
|
|
6815
|
-
setCurrentProduct(_objectSpread$
|
|
6758
|
+
setCurrentProduct(_objectSpread$q(_objectSpread$q({}, myProduct.baseData), {}, {
|
|
6816
6759
|
parent: (_myProduct$baseData$p = myProduct.baseData.parent) !== null && _myProduct$baseData$p !== void 0 ? _myProduct$baseData$p : myProduct.baseData._id
|
|
6817
6760
|
}));
|
|
6818
6761
|
case 4:
|
|
@@ -6844,7 +6787,7 @@ function useProduct(basket) {
|
|
|
6844
6787
|
});
|
|
6845
6788
|
case 5:
|
|
6846
6789
|
myproduct = _context3.sent;
|
|
6847
|
-
setCurrentProduct(_objectSpread$
|
|
6790
|
+
setCurrentProduct(_objectSpread$q(_objectSpread$q({}, myproduct[0]), {}, {
|
|
6848
6791
|
parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
|
|
6849
6792
|
}));
|
|
6850
6793
|
if (!favourite) {
|
|
@@ -6872,7 +6815,7 @@ function useProduct(basket) {
|
|
|
6872
6815
|
};
|
|
6873
6816
|
}();
|
|
6874
6817
|
var updateProductData = function updateProductData(product) {
|
|
6875
|
-
setCurrentProduct(_objectSpread$
|
|
6818
|
+
setCurrentProduct(_objectSpread$q({}, product));
|
|
6876
6819
|
};
|
|
6877
6820
|
var resetProductSaved = function resetProductSaved() {
|
|
6878
6821
|
setCurrentProduct(undefined);
|
|
@@ -6888,8 +6831,8 @@ function useProduct(basket) {
|
|
|
6888
6831
|
};
|
|
6889
6832
|
}
|
|
6890
6833
|
|
|
6891
|
-
function ownKeys$
|
|
6892
|
-
function _objectSpread$
|
|
6834
|
+
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; }
|
|
6835
|
+
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; }
|
|
6893
6836
|
var LOG$4 = getLogger('SellerBasket', 'Basket');
|
|
6894
6837
|
function Basket(_ref) {
|
|
6895
6838
|
var _currentProduct$divaN, _configurationData$Ch5, _currentBasket$OrderS5;
|
|
@@ -6907,7 +6850,6 @@ function Basket(_ref) {
|
|
|
6907
6850
|
_useDivaCore$state = _useDivaCore.state,
|
|
6908
6851
|
organization = _useDivaCore$state.organization,
|
|
6909
6852
|
jwt = _useDivaCore$state.jwt,
|
|
6910
|
-
apiConfig = _useDivaCore$state.apiConfig,
|
|
6911
6853
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
6912
6854
|
userHasPermission = _useDivaCore$actions.userHasPermission,
|
|
6913
6855
|
openSnackBar = _useDivaCore$actions.openSnackBar;
|
|
@@ -7085,9 +7027,9 @@ function Basket(_ref) {
|
|
|
7085
7027
|
}
|
|
7086
7028
|
};
|
|
7087
7029
|
var onClickSave = /*#__PURE__*/function () {
|
|
7088
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(pdf, doSendEmail
|
|
7030
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(pdf, doSendEmail) {
|
|
7089
7031
|
var _configurationData$Ch, _configurationData$re;
|
|
7090
|
-
var getPdf, response, _configurationData$Ch2, _ref3, pdfUrl,
|
|
7032
|
+
var getPdf, response, _configurationData$Ch2, _ref3, pdfUrl, _configurationData$Ch3, _configurationData$Ch4, _currentBasket$Client, _opener;
|
|
7091
7033
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7092
7034
|
while (1) switch (_context.prev = _context.next) {
|
|
7093
7035
|
case 0:
|
|
@@ -7104,118 +7046,83 @@ function Basket(_ref) {
|
|
|
7104
7046
|
case 6:
|
|
7105
7047
|
response = _context.sent;
|
|
7106
7048
|
currentBasket.clearRenderData();
|
|
7107
|
-
if (
|
|
7108
|
-
|
|
7109
|
-
break;
|
|
7110
|
-
}
|
|
7111
|
-
errorOnSaving(response);
|
|
7112
|
-
_context.next = 29;
|
|
7113
|
-
break;
|
|
7114
|
-
case 12:
|
|
7115
|
-
_ref3 = response, pdfUrl = _ref3.pdfUrl;
|
|
7116
|
-
if (!export3D) {
|
|
7117
|
-
_context.next = 24;
|
|
7118
|
-
break;
|
|
7119
|
-
}
|
|
7120
|
-
_context.prev = 14;
|
|
7121
|
-
newRenderJob = {
|
|
7122
|
-
divaNr: currentBasket.DivaNr,
|
|
7123
|
-
organization: currentBasket.OrganizationId,
|
|
7124
|
-
job: '3DEXPORT',
|
|
7125
|
-
diva3DProject: currentBasket.Diva3DProject ? atob(currentBasket.Diva3DProject) : undefined,
|
|
7126
|
-
hQRenderScript: currentBasket.OrderSets[0].HQRenderScript,
|
|
7127
|
-
divaNrVariantId: currentBasket.DocumentVersion,
|
|
7128
|
-
organizationName: currentBasket.OrganizationId_displayText,
|
|
7129
|
-
separateMaterials: organization.settings.renderjobSeparateMaterials,
|
|
7130
|
-
productName: currentBasket.SetName
|
|
7131
|
-
};
|
|
7132
|
-
_context.next = 18;
|
|
7133
|
-
return apiSaveRenderJobs({
|
|
7134
|
-
serviceUrl: apiConfig.mediaService,
|
|
7135
|
-
jobs: [newRenderJob],
|
|
7136
|
-
jwt: jwt
|
|
7137
|
-
});
|
|
7138
|
-
case 18:
|
|
7139
|
-
_context.next = 24;
|
|
7140
|
-
break;
|
|
7141
|
-
case 20:
|
|
7142
|
-
_context.prev = 20;
|
|
7143
|
-
_context.t0 = _context["catch"](14);
|
|
7144
|
-
errorOnSaving(BASKET_SAVE_ERROR.ERROR_BASKET_AFTER_SAVE, t('modals.3dexport_unsuccessful'));
|
|
7145
|
-
return _context.abrupt("return");
|
|
7146
|
-
case 24:
|
|
7147
|
-
if (configurationData !== null && configurationData !== void 0 && (_configurationData$Ch2 = configurationData.Checkout) !== null && _configurationData$Ch2 !== void 0 && _configurationData$Ch2.showPdfQR) {
|
|
7148
|
-
openSnackBar({
|
|
7149
|
-
qrCode: pdfUrl,
|
|
7150
|
-
message: t('basket.checkout.pdfqr'),
|
|
7151
|
-
type: 'big',
|
|
7152
|
-
clickable: true,
|
|
7153
|
-
qrCodeSize: 312,
|
|
7154
|
-
autoHideDuration: (_configurationData$Ch3 = configurationData === null || configurationData === void 0 || (_configurationData$Ch4 = configurationData.Checkout) === null || _configurationData$Ch4 === void 0 ? void 0 : _configurationData$Ch4.pdfQRAutoHideDuration) !== null && _configurationData$Ch3 !== void 0 ? _configurationData$Ch3 : 1000 * 60 * 2
|
|
7155
|
-
});
|
|
7156
|
-
}
|
|
7157
|
-
if (doSendEmail) {
|
|
7158
|
-
sendEmail({
|
|
7159
|
-
dialogText: t('basket.modals.email.text', {
|
|
7160
|
-
divaNr: currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()
|
|
7161
|
-
}),
|
|
7162
|
-
content: {
|
|
7163
|
-
type: 'basket',
|
|
7164
|
-
to: ((_currentBasket$Client = currentBasket.Client) === null || _currentBasket$Client === void 0 ? void 0 : _currentBasket$Client.email) || '',
|
|
7165
|
-
divaNr: currentBasket.DivaNr,
|
|
7166
|
-
version: currentBasket.getDocumentVersion().toString(),
|
|
7167
|
-
language: i18n.language
|
|
7168
|
-
}
|
|
7169
|
-
});
|
|
7049
|
+
if (Object.values(BASKET_SAVE_ERROR).includes(response)) {
|
|
7050
|
+
errorOnSaving(response);
|
|
7170
7051
|
} else {
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
reject: false,
|
|
7181
|
-
accept: pdf == 'open' ? t('modals.open_now') : true,
|
|
7182
|
-
text: t('modals.saving_successful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()),
|
|
7183
|
-
callback: function callback() {
|
|
7184
|
-
if (pdf == 'open') {
|
|
7185
|
-
window.open(pdfUrl, '_blank');
|
|
7186
|
-
}
|
|
7187
|
-
}
|
|
7052
|
+
_ref3 = response, pdfUrl = _ref3.pdfUrl;
|
|
7053
|
+
if (configurationData !== null && configurationData !== void 0 && (_configurationData$Ch2 = configurationData.Checkout) !== null && _configurationData$Ch2 !== void 0 && _configurationData$Ch2.showPdfQR) {
|
|
7054
|
+
openSnackBar({
|
|
7055
|
+
qrCode: pdfUrl,
|
|
7056
|
+
message: t('basket.checkout.pdfqr'),
|
|
7057
|
+
type: 'big',
|
|
7058
|
+
clickable: true,
|
|
7059
|
+
qrCodeSize: 312,
|
|
7060
|
+
autoHideDuration: (_configurationData$Ch3 = configurationData === null || configurationData === void 0 || (_configurationData$Ch4 = configurationData.Checkout) === null || _configurationData$Ch4 === void 0 ? void 0 : _configurationData$Ch4.pdfQRAutoHideDuration) !== null && _configurationData$Ch3 !== void 0 ? _configurationData$Ch3 : 1000 * 60 * 2
|
|
7188
7061
|
});
|
|
7189
7062
|
}
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7063
|
+
if (doSendEmail) {
|
|
7064
|
+
sendEmail({
|
|
7065
|
+
dialogText: t('basket.modals.email.text', {
|
|
7066
|
+
divaNr: currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()
|
|
7067
|
+
}),
|
|
7068
|
+
content: {
|
|
7069
|
+
type: 'basket',
|
|
7070
|
+
to: ((_currentBasket$Client = currentBasket.Client) === null || _currentBasket$Client === void 0 ? void 0 : _currentBasket$Client.email) || '',
|
|
7071
|
+
divaNr: currentBasket.DivaNr,
|
|
7072
|
+
version: currentBasket.getDocumentVersion().toString(),
|
|
7073
|
+
language: i18n.language
|
|
7074
|
+
}
|
|
7201
7075
|
});
|
|
7202
|
-
|
|
7076
|
+
} else {
|
|
7077
|
+
if (returnTo == 'toAssortmentManager') {
|
|
7078
|
+
(_opener = opener) === null || _opener === void 0 || _opener.postMessage({
|
|
7079
|
+
event: 'message',
|
|
7080
|
+
detail: 'onLoadBasketConfiguration' + ';' + currentBasket.DivaNr
|
|
7081
|
+
}, '*');
|
|
7082
|
+
window.close();
|
|
7083
|
+
} else {
|
|
7084
|
+
openModal({
|
|
7085
|
+
title: t('modals.saving'),
|
|
7086
|
+
reject: false,
|
|
7087
|
+
accept: pdf == 'open' ? t('modals.open_now') : true,
|
|
7088
|
+
text: t('modals.saving_successful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()),
|
|
7089
|
+
callback: function callback() {
|
|
7090
|
+
if (pdf == 'open') {
|
|
7091
|
+
window.open(pdfUrl, '_blank');
|
|
7092
|
+
}
|
|
7093
|
+
}
|
|
7094
|
+
});
|
|
7095
|
+
}
|
|
7096
|
+
/* TODO used with SM integration in divaProtal
|
|
7097
|
+
openModal({
|
|
7098
|
+
title: t('modals.saving'),
|
|
7099
|
+
reject: false,
|
|
7100
|
+
accept: true,
|
|
7101
|
+
text: t('modals.saving_successful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()),
|
|
7102
|
+
callback: () => {
|
|
7103
|
+
if (openPDF) {
|
|
7104
|
+
window.open(pdfUrl, '_blank');
|
|
7105
|
+
}
|
|
7106
|
+
},
|
|
7107
|
+
});
|
|
7108
|
+
*/
|
|
7109
|
+
}
|
|
7110
|
+
LOG$4.successTransaction('ON_SAVE_BASKET', {
|
|
7111
|
+
divaNr: currentBasket.DivaNr,
|
|
7112
|
+
status: currentBasket.Status,
|
|
7113
|
+
documentVersion: currentBasket.DocumentVersion,
|
|
7114
|
+
bv: (currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.SetPrice) / 1000
|
|
7115
|
+
});
|
|
7116
|
+
currentBasket.setDocumentVersion(currentBasket.getDocumentVersion() + 1);
|
|
7117
|
+
setActBasketPage('Step1');
|
|
7203
7118
|
}
|
|
7204
|
-
|
|
7205
|
-
divaNr: currentBasket.DivaNr,
|
|
7206
|
-
status: currentBasket.Status,
|
|
7207
|
-
documentVersion: currentBasket.DocumentVersion,
|
|
7208
|
-
bv: (currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.SetPrice) / 1000
|
|
7209
|
-
});
|
|
7210
|
-
currentBasket.setDocumentVersion(currentBasket.getDocumentVersion() + 1);
|
|
7211
|
-
setActBasketPage('Step1');
|
|
7212
|
-
case 29:
|
|
7119
|
+
case 9:
|
|
7213
7120
|
case "end":
|
|
7214
7121
|
return _context.stop();
|
|
7215
7122
|
}
|
|
7216
|
-
}, _callee
|
|
7123
|
+
}, _callee);
|
|
7217
7124
|
}));
|
|
7218
|
-
return function onClickSave(_x, _x2
|
|
7125
|
+
return function onClickSave(_x, _x2) {
|
|
7219
7126
|
return _ref2.apply(this, arguments);
|
|
7220
7127
|
};
|
|
7221
7128
|
}();
|
|
@@ -7266,7 +7173,7 @@ function Basket(_ref) {
|
|
|
7266
7173
|
return _ref4.apply(this, arguments);
|
|
7267
7174
|
};
|
|
7268
7175
|
}();
|
|
7269
|
-
var errorOnSaving = function errorOnSaving(type
|
|
7176
|
+
var errorOnSaving = function errorOnSaving(type) {
|
|
7270
7177
|
LOG$4.errorTransaction('ON_SAVE_BASKET', 'SELLER_0003', 'Error Saving Basket', {
|
|
7271
7178
|
divaNr: currentBasket.DivaNr,
|
|
7272
7179
|
status: currentBasket.Status,
|
|
@@ -7277,14 +7184,14 @@ function Basket(_ref) {
|
|
|
7277
7184
|
title: t('modals.error_saving'),
|
|
7278
7185
|
reject: false,
|
|
7279
7186
|
accept: true,
|
|
7280
|
-
text: t(type == 'ERROR_NO_BASKET_SAVED' ? 'modals.saving_unsuccessful' : 'modals.postsave_unsuccessful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()) +
|
|
7187
|
+
text: t(type == 'ERROR_NO_BASKET_SAVED' ? 'modals.saving_unsuccessful' : 'modals.postsave_unsuccessful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()) + ' --- ' + DivaUtils$1.formatDate(new Date(), true, undefined, true) + (DivaUtils$1.getCurrentTraceId() ? ' --- ' + t('modal.errorcode') + ': ' + DivaUtils$1.getCurrentTraceId() : '')
|
|
7281
7188
|
});
|
|
7282
7189
|
};
|
|
7283
7190
|
var openInfo = function openInfo() {
|
|
7284
7191
|
var _currentBasket$OrderS2, _currentBasket$OrderS3, _currentBasket$OrderS4;
|
|
7285
7192
|
openComponent({
|
|
7286
7193
|
type: 'SELLER',
|
|
7287
|
-
parameters: _objectSpread$
|
|
7194
|
+
parameters: _objectSpread$p({
|
|
7288
7195
|
module: 'Info',
|
|
7289
7196
|
catalogCodex: currentBasket === null || currentBasket === void 0 || (_currentBasket$OrderS2 = currentBasket.OrderSets[0]) === null || _currentBasket$OrderS2 === void 0 ? void 0 : _currentBasket$OrderS2.CatalogCodex
|
|
7290
7197
|
}, currentBasket !== null && currentBasket !== void 0 && (_currentBasket$OrderS3 = currentBasket.OrderSets[0]) !== null && _currentBasket$OrderS3 !== void 0 && _currentBasket$OrderS3.AccountGUID ? {
|
|
@@ -7324,10 +7231,15 @@ function Basket(_ref) {
|
|
|
7324
7231
|
doExportToVKP: doExportToVKP,
|
|
7325
7232
|
openProductCreator: openProductCreator,
|
|
7326
7233
|
showProductCreator: userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator),
|
|
7327
|
-
disableProductCreator: currentBasket.OrderSets.length > 1,
|
|
7328
7234
|
enableVKPExportButton: !currentBasket.catalogStatus || currentBasket.catalogStatus == 'LISTED' || userHasPermission('alwaysenablevkpexport')
|
|
7329
7235
|
}), /*#__PURE__*/jsxs("div", {
|
|
7330
|
-
|
|
7236
|
+
style: {
|
|
7237
|
+
marginLeft: 10,
|
|
7238
|
+
paddingTop: 10,
|
|
7239
|
+
paddingRight: 10,
|
|
7240
|
+
height: '100%',
|
|
7241
|
+
overflowY: 'auto'
|
|
7242
|
+
},
|
|
7331
7243
|
children: [actBasketPage == 'Step1' && /*#__PURE__*/jsx(Step1PriceOverview, {
|
|
7332
7244
|
config: configurationData === null || configurationData === void 0 ? void 0 : configurationData.Checkout,
|
|
7333
7245
|
basket: currentBasket,
|
|
@@ -7378,12 +7290,12 @@ var modelTitle = "model-title-Sgm-0";
|
|
|
7378
7290
|
var description = "description-GyPZq";
|
|
7379
7291
|
var pdf = "pdf-oNnao";
|
|
7380
7292
|
var hidden = "hidden-xYPOr";
|
|
7381
|
-
var css_248z$
|
|
7382
|
-
styleInject(css_248z$
|
|
7293
|
+
var css_248z$9 = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n height: 100%;\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\n}\n\n.title-iTDPA .MuiButtonBase-root {\n display: none;\n}\n\n.subTitle-4-0PW {\n padding: 12px 18px;\n font-size: 28px;\n}\n\n.description-container-k1vLT {\n display: flex;\n flex-direction: column;\n background-color: #f2f2f2;\n padding: 18px;\n gap: 12px;\n height: 100%;\n overflow: auto;\n}\n\n.model-title-Sgm-0 {\n font-size: 24px;\n font-weight: 600;\n}\n.description-GyPZq {\n font-size: 16px;\n overflow: auto;\n flex-grow: 3;\n scrollbar-width: thin;\n}\n\n.pdf-oNnao {\n display: 'flex';\n flex: 1 1 10px;\n}\n\n.pdf-oNnao svg {\n margin-right: 10px;\n}\n\n@media (max-width: 820px) {\n .wrapper-fSL18 {\n height: 75px;\n }\n .description-container-k1vLT {\n position: fixed;\n top: 22px;\n width: 80%;\n z-index: 101;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n margin-top: 135px;\n margin-left: -10px;\n transition: width 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n height: calc(100% - 195px);\n }\n .title-iTDPA .MuiButtonBase-root {\n display: inline-flex;\n }\n .hidden-xYPOr .description-container-k1vLT {\n padding: 0;\n width: 0;\n }\n\n .hidden-xYPOr .pdf-oNnao {\n display: none;\n }\n\n .hidden-xYPOr .model-title-Sgm-0 {\n display: none;\n }\n\n .hidden-xYPOr .description-GyPZq {\n display: none;\n }\n}\n";
|
|
7294
|
+
styleInject(css_248z$9);
|
|
7383
7295
|
|
|
7384
7296
|
var _excluded$6 = ["data", "text"];
|
|
7385
|
-
function ownKeys$
|
|
7386
|
-
function _objectSpread$
|
|
7297
|
+
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; }
|
|
7298
|
+
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; }
|
|
7387
7299
|
function Description$1 (_ref) {
|
|
7388
7300
|
var data = _ref.data,
|
|
7389
7301
|
text = _ref.text,
|
|
@@ -7395,7 +7307,7 @@ function Description$1 (_ref) {
|
|
|
7395
7307
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7396
7308
|
isHidden = _useState2[0],
|
|
7397
7309
|
setIsHidden = _useState2[1];
|
|
7398
|
-
return /*#__PURE__*/jsxs("div", _objectSpread$
|
|
7310
|
+
return /*#__PURE__*/jsxs("div", _objectSpread$o(_objectSpread$o({}, props), {}, {
|
|
7399
7311
|
className: classnames(wrapper$6, isHidden ? hidden : undefined, props.className),
|
|
7400
7312
|
children: [/*#__PURE__*/jsxs("div", {
|
|
7401
7313
|
className: title$2,
|
|
@@ -7435,13 +7347,13 @@ function Description$1 (_ref) {
|
|
|
7435
7347
|
var container = "container-Sr3pC";
|
|
7436
7348
|
var iconOnly = "icon-only-2SJ6e";
|
|
7437
7349
|
var icon$1 = "icon-0h-39";
|
|
7438
|
-
var css_248z$
|
|
7439
|
-
styleInject(css_248z$
|
|
7350
|
+
var css_248z$8 = ".container-Sr3pC {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n padding: 8px;\n flex-wrap: wrap;\n}\n.container-Sr3pC .MuiButton-root {\n height: 45px;\n}\n\n.icon-only-2SJ6e span {\n margin-right: 2px;\n}\n\n.icon-0h-39 {\n width: 24px;\n height: 24px;\n}\n";
|
|
7351
|
+
styleInject(css_248z$8);
|
|
7440
7352
|
|
|
7441
|
-
function ownKeys$
|
|
7442
|
-
function _objectSpread$
|
|
7353
|
+
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; }
|
|
7354
|
+
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; }
|
|
7443
7355
|
function ArticleSvg (props) {
|
|
7444
|
-
return /*#__PURE__*/jsx("svg", _objectSpread$
|
|
7356
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
7445
7357
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7446
7358
|
viewBox: "0 0 24 24",
|
|
7447
7359
|
children: /*#__PURE__*/jsx("path", {
|
|
@@ -7451,10 +7363,10 @@ function ArticleSvg (props) {
|
|
|
7451
7363
|
}));
|
|
7452
7364
|
}
|
|
7453
7365
|
|
|
7454
|
-
function ownKeys$
|
|
7455
|
-
function _objectSpread$
|
|
7366
|
+
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; }
|
|
7367
|
+
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; }
|
|
7456
7368
|
function EmptyPlanningSvg (props) {
|
|
7457
|
-
return /*#__PURE__*/jsx("svg", _objectSpread$
|
|
7369
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
7458
7370
|
viewBox: "0 0 24 24",
|
|
7459
7371
|
fill: "none",
|
|
7460
7372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7465,10 +7377,10 @@ function EmptyPlanningSvg (props) {
|
|
|
7465
7377
|
}));
|
|
7466
7378
|
}
|
|
7467
7379
|
|
|
7468
|
-
function ownKeys$
|
|
7469
|
-
function _objectSpread$
|
|
7380
|
+
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; }
|
|
7381
|
+
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; }
|
|
7470
7382
|
function VarinatPlanningSvg (props) {
|
|
7471
|
-
return /*#__PURE__*/jsx("svg", _objectSpread$
|
|
7383
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
7472
7384
|
viewBox: "0 0 24 24",
|
|
7473
7385
|
fill: "none",
|
|
7474
7386
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7482,10 +7394,10 @@ function VarinatPlanningSvg (props) {
|
|
|
7482
7394
|
}));
|
|
7483
7395
|
}
|
|
7484
7396
|
|
|
7485
|
-
function ownKeys$
|
|
7486
|
-
function _objectSpread$
|
|
7397
|
+
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; }
|
|
7398
|
+
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; }
|
|
7487
7399
|
function NavBackSvg (props) {
|
|
7488
|
-
return /*#__PURE__*/jsx("svg", _objectSpread$
|
|
7400
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
7489
7401
|
viewBox: "0 0 10 18",
|
|
7490
7402
|
fill: "none",
|
|
7491
7403
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7555,19 +7467,19 @@ function NavBar (buttons) {
|
|
|
7555
7467
|
}
|
|
7556
7468
|
|
|
7557
7469
|
var layout$1 = "layout-NhUpB";
|
|
7558
|
-
var content
|
|
7470
|
+
var content = "content-t8Rtl";
|
|
7559
7471
|
var leftSide = "left-side-10jmj";
|
|
7560
7472
|
var rightSide$1 = "right-side-64-Yz";
|
|
7561
7473
|
var catalogImages = "catalog-images-jJGqW";
|
|
7562
7474
|
var footer = "footer-1ONIt";
|
|
7563
|
-
var css_248z$
|
|
7564
|
-
styleInject(css_248z$
|
|
7475
|
+
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 justify-content: flex-end;\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";
|
|
7476
|
+
styleInject(css_248z$7);
|
|
7565
7477
|
|
|
7566
7478
|
var wrapper$5 = "wrapper-D5Cmc";
|
|
7567
7479
|
var thumbs = "thumbs-cWKAj";
|
|
7568
7480
|
var mainSlider = "mainSlider-S8opH";
|
|
7569
|
-
var css_248z$
|
|
7570
|
-
styleInject(css_248z$
|
|
7481
|
+
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";
|
|
7482
|
+
styleInject(css_248z$6);
|
|
7571
7483
|
|
|
7572
7484
|
var _excluded$5 = ["data"];
|
|
7573
7485
|
var CatalogImages = function CatalogImages(_ref) {
|
|
@@ -7655,14 +7567,14 @@ var wrapper$4 = "wrapper-3d2zl";
|
|
|
7655
7567
|
var fullHeight = "full-height-CQ8Cy";
|
|
7656
7568
|
var tabBar = "tab-bar-lQQ28";
|
|
7657
7569
|
var nothingFound = "nothing-found-0eqZ5";
|
|
7658
|
-
var css_248z$
|
|
7659
|
-
styleInject(css_248z$
|
|
7570
|
+
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.full-height-CQ8Cy {\n max-height: 100%;\n}\n\n.wrapper-3d2zl.full-height-CQ8Cy.MuiAccordion-root.Mui-expanded {\n height: 100%;\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";
|
|
7571
|
+
styleInject(css_248z$5);
|
|
7660
7572
|
|
|
7661
7573
|
var wrapper$3 = "wrapper-i9mNn";
|
|
7662
7574
|
var searchText = "search-text-grXdY";
|
|
7663
7575
|
var icon = "icon-ydD53";
|
|
7664
|
-
var css_248z$
|
|
7665
|
-
styleInject(css_248z$
|
|
7576
|
+
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";
|
|
7577
|
+
styleInject(css_248z$4);
|
|
7666
7578
|
|
|
7667
7579
|
var Search = function Search(_ref) {
|
|
7668
7580
|
var searchValue = _ref.searchValue,
|
|
@@ -8064,8 +7976,8 @@ function checkDoReturnToProductCreator(plannerReturn, returnTo) {
|
|
|
8064
7976
|
return ['toProductsGallery', 'toAssortmentManager'].includes(returnTo !== null && returnTo !== void 0 ? returnTo : '') && !plannerReturn.includes('PRODUCTCREATOR');
|
|
8065
7977
|
}
|
|
8066
7978
|
|
|
8067
|
-
function ownKeys$
|
|
8068
|
-
function _objectSpread$
|
|
7979
|
+
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; }
|
|
7980
|
+
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; }
|
|
8069
7981
|
function Info(props) {
|
|
8070
7982
|
var _useModelInfoPage = useModelInfoPage(props),
|
|
8071
7983
|
loading = _useModelInfoPage.loading,
|
|
@@ -8081,7 +7993,7 @@ function Info(props) {
|
|
|
8081
7993
|
children: !loading && /*#__PURE__*/jsxs("div", {
|
|
8082
7994
|
className: layout$1,
|
|
8083
7995
|
children: [/*#__PURE__*/jsxs("div", {
|
|
8084
|
-
className: content
|
|
7996
|
+
className: content,
|
|
8085
7997
|
children: [/*#__PURE__*/jsx(Description$1, {
|
|
8086
7998
|
data: catalogData,
|
|
8087
7999
|
className: leftSide,
|
|
@@ -8101,14 +8013,14 @@ function Info(props) {
|
|
|
8101
8013
|
}), /*#__PURE__*/jsx("div", {
|
|
8102
8014
|
className: footer,
|
|
8103
8015
|
id: "diva-seller-info-navbar",
|
|
8104
|
-
children: /*#__PURE__*/jsx(NavBar, _objectSpread$
|
|
8016
|
+
children: /*#__PURE__*/jsx(NavBar, _objectSpread$j({}, navButtons))
|
|
8105
8017
|
})]
|
|
8106
8018
|
})
|
|
8107
8019
|
});
|
|
8108
8020
|
}
|
|
8109
8021
|
|
|
8110
|
-
function ownKeys$
|
|
8111
|
-
function _objectSpread$
|
|
8022
|
+
function ownKeys$i(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; }
|
|
8023
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8112
8024
|
function Priceedit (_ref) {
|
|
8113
8025
|
var _productData$calculat2, _productData$addedPri2;
|
|
8114
8026
|
var productData = _ref.productData,
|
|
@@ -8137,13 +8049,13 @@ function Priceedit (_ref) {
|
|
|
8137
8049
|
percentageDiscount: discount.percentageDiscount,
|
|
8138
8050
|
calcDiscountPrice: formatTwoDecimals(price)
|
|
8139
8051
|
});
|
|
8140
|
-
update(_objectSpread$
|
|
8052
|
+
update(_objectSpread$i(_objectSpread$i({}, productData), {}, {
|
|
8141
8053
|
addedPrice: value,
|
|
8142
8054
|
percentageDiscount: discount.percentageDiscount,
|
|
8143
8055
|
discountedPrice: formatTwoDecimals(price)
|
|
8144
8056
|
}));
|
|
8145
8057
|
} else {
|
|
8146
|
-
update(_objectSpread$
|
|
8058
|
+
update(_objectSpread$i(_objectSpread$i({}, productData), {}, {
|
|
8147
8059
|
addedPrice: value
|
|
8148
8060
|
}));
|
|
8149
8061
|
}
|
|
@@ -8157,22 +8069,22 @@ function Priceedit (_ref) {
|
|
|
8157
8069
|
var price = (_productData$addedPri = productData.addedPrice) !== null && _productData$addedPri !== void 0 ? _productData$addedPri : 0;
|
|
8158
8070
|
if (isPercentage) {
|
|
8159
8071
|
if (discount.percentageDiscount == 0 || discount.percentageDiscount == undefined) {
|
|
8160
|
-
discount = _objectSpread$
|
|
8072
|
+
discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
|
|
8161
8073
|
calcDiscountPrice: ''
|
|
8162
8074
|
});
|
|
8163
8075
|
} else {
|
|
8164
8076
|
var discountPrice = (discount.percentageDiscount || 0) / 100 * price;
|
|
8165
|
-
discount = _objectSpread$
|
|
8077
|
+
discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
|
|
8166
8078
|
calcDiscountPrice: formatTwoDecimals(price - discountPrice)
|
|
8167
8079
|
});
|
|
8168
8080
|
}
|
|
8169
8081
|
} else {
|
|
8170
|
-
discount = _objectSpread$
|
|
8082
|
+
discount = _objectSpread$i(_objectSpread$i({}, discount), {}, {
|
|
8171
8083
|
percentageDiscount: formatOneDecimals((price - value || 0) / price * 100)
|
|
8172
8084
|
});
|
|
8173
8085
|
}
|
|
8174
8086
|
setDiscount(discount);
|
|
8175
|
-
update(_objectSpread$
|
|
8087
|
+
update(_objectSpread$i(_objectSpread$i({}, productData), {}, {
|
|
8176
8088
|
discountedPrice: isPercentage ? discount.calcDiscountPrice ? formatTwoDecimals(discount.calcDiscountPrice) : undefined : value,
|
|
8177
8089
|
percentageDiscount: discount.percentageDiscount > 0 ? discount.percentageDiscount : undefined
|
|
8178
8090
|
}));
|
|
@@ -8278,8 +8190,8 @@ function getLabel(value, i18n) {
|
|
|
8278
8190
|
return value.value + valueText;
|
|
8279
8191
|
}
|
|
8280
8192
|
|
|
8281
|
-
function ownKeys$
|
|
8282
|
-
function _objectSpread$
|
|
8193
|
+
function ownKeys$h(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; }
|
|
8194
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8283
8195
|
function Autocomplete (_ref) {
|
|
8284
8196
|
var options = _ref.options,
|
|
8285
8197
|
label = _ref.label,
|
|
@@ -8346,9 +8258,9 @@ function Autocomplete (_ref) {
|
|
|
8346
8258
|
setInputValue(newInputValue);
|
|
8347
8259
|
},
|
|
8348
8260
|
renderInput: function renderInput(params) {
|
|
8349
|
-
return /*#__PURE__*/jsx(TextField$1, _objectSpread$
|
|
8261
|
+
return /*#__PURE__*/jsx(TextField$1, _objectSpread$h(_objectSpread$h({}, params), {}, {
|
|
8350
8262
|
label: label ? t(label) : undefined,
|
|
8351
|
-
inputProps: _objectSpread$
|
|
8263
|
+
inputProps: _objectSpread$h(_objectSpread$h({}, params.inputProps), {}, {
|
|
8352
8264
|
maxLength: maxLength
|
|
8353
8265
|
})
|
|
8354
8266
|
}));
|
|
@@ -8391,8 +8303,8 @@ function toOneOption(value, options) {
|
|
|
8391
8303
|
}
|
|
8392
8304
|
}
|
|
8393
8305
|
|
|
8394
|
-
function ownKeys$
|
|
8395
|
-
function _objectSpread$
|
|
8306
|
+
function ownKeys$g(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; }
|
|
8307
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8396
8308
|
function BaseDataFormCategories (_ref) {
|
|
8397
8309
|
var _categories$livingAre, _categories$livingAre2, _categories$mainCateg, _categories$mainCateg2, _categories$mainCateg3, _categories$mainCateg4, _categories$subCatego, _categories$subCatego2, _categories$subCatego3, _categories$subCatego4, _Object$entries;
|
|
8398
8310
|
var productData = _ref.productData,
|
|
@@ -8470,8 +8382,8 @@ function BaseDataFormCategories (_ref) {
|
|
|
8470
8382
|
label: "productcreator.fields.".concat(key, ".name"),
|
|
8471
8383
|
multiple: value.multi,
|
|
8472
8384
|
onChange: function onChange(value) {
|
|
8473
|
-
return update(_objectSpread$
|
|
8474
|
-
customData: _objectSpread$
|
|
8385
|
+
return update(_objectSpread$g(_objectSpread$g({}, productData), {}, {
|
|
8386
|
+
customData: _objectSpread$g(_objectSpread$g({}, productData.customData), {}, _defineProperty({}, key, value))
|
|
8475
8387
|
}));
|
|
8476
8388
|
}
|
|
8477
8389
|
})
|
|
@@ -8481,8 +8393,8 @@ function BaseDataFormCategories (_ref) {
|
|
|
8481
8393
|
});
|
|
8482
8394
|
}
|
|
8483
8395
|
|
|
8484
|
-
function ownKeys$
|
|
8485
|
-
function _objectSpread$
|
|
8396
|
+
function ownKeys$f(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; }
|
|
8397
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8486
8398
|
function BaseDataFormDeliveryInfo (_ref) {
|
|
8487
8399
|
var _productData$delivery, _productData$delivery2, _productData$delivery3, _productData$delivery4, _productData$delivery5, _productData$delivery6, _productData$delivery7, _productData$delivery8, _productData$delivery9, _productData$delivery10, _productData$delivery11, _productData$delivery12, _productData$delivery13, _productData$delivery14, _productData$delivery15, _productData$delivery16;
|
|
8488
8400
|
var productData = _ref.productData,
|
|
@@ -8503,8 +8415,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8503
8415
|
value: (_productData$delivery = (_productData$delivery2 = productData.delivery) === null || _productData$delivery2 === void 0 ? void 0 : _productData$delivery2.estMaxPackages) !== null && _productData$delivery !== void 0 ? _productData$delivery : '',
|
|
8504
8416
|
type: "number",
|
|
8505
8417
|
onChange: function onChange(s) {
|
|
8506
|
-
return update(_objectSpread$
|
|
8507
|
-
delivery: _objectSpread$
|
|
8418
|
+
return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8419
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8508
8420
|
estMaxPackages: Number(s.target.value)
|
|
8509
8421
|
})
|
|
8510
8422
|
}));
|
|
@@ -8522,8 +8434,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8522
8434
|
value: (_productData$delivery3 = (_productData$delivery4 = productData.delivery) === null || _productData$delivery4 === void 0 ? void 0 : _productData$delivery4.estMaxPackageWeight) !== null && _productData$delivery3 !== void 0 ? _productData$delivery3 : '',
|
|
8523
8435
|
type: "number",
|
|
8524
8436
|
onChange: function onChange(s) {
|
|
8525
|
-
return update(_objectSpread$
|
|
8526
|
-
delivery: _objectSpread$
|
|
8437
|
+
return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8438
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8527
8439
|
estMaxPackageWeight: Number(s.target.value)
|
|
8528
8440
|
})
|
|
8529
8441
|
}));
|
|
@@ -8539,8 +8451,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8539
8451
|
value: (_productData$delivery5 = (_productData$delivery6 = productData.delivery) === null || _productData$delivery6 === void 0 ? void 0 : _productData$delivery6.estMaxPackageHeight) !== null && _productData$delivery5 !== void 0 ? _productData$delivery5 : '',
|
|
8540
8452
|
type: "number",
|
|
8541
8453
|
onChange: function onChange(s) {
|
|
8542
|
-
return update(_objectSpread$
|
|
8543
|
-
delivery: _objectSpread$
|
|
8454
|
+
return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8455
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8544
8456
|
estMaxPackageHeight: Number(s.target.value)
|
|
8545
8457
|
})
|
|
8546
8458
|
}));
|
|
@@ -8560,8 +8472,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8560
8472
|
value: (_productData$delivery7 = (_productData$delivery8 = productData.delivery) === null || _productData$delivery8 === void 0 ? void 0 : _productData$delivery8.estMaxPackageWidth) !== null && _productData$delivery7 !== void 0 ? _productData$delivery7 : '',
|
|
8561
8473
|
type: "number",
|
|
8562
8474
|
onChange: function onChange(s) {
|
|
8563
|
-
return update(_objectSpread$
|
|
8564
|
-
delivery: _objectSpread$
|
|
8475
|
+
return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8476
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8565
8477
|
estMaxPackageWidth: Number(s.target.value)
|
|
8566
8478
|
})
|
|
8567
8479
|
}));
|
|
@@ -8577,8 +8489,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8577
8489
|
value: (_productData$delivery9 = (_productData$delivery10 = productData.delivery) === null || _productData$delivery10 === void 0 ? void 0 : _productData$delivery10.estMaxPackageDepth) !== null && _productData$delivery9 !== void 0 ? _productData$delivery9 : '',
|
|
8578
8490
|
type: "number",
|
|
8579
8491
|
onChange: function onChange(s) {
|
|
8580
|
-
return update(_objectSpread$
|
|
8581
|
-
delivery: _objectSpread$
|
|
8492
|
+
return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8493
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8582
8494
|
estMaxPackageDepth: Number(s.target.value)
|
|
8583
8495
|
})
|
|
8584
8496
|
}));
|
|
@@ -8593,8 +8505,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8593
8505
|
value: (_productData$delivery11 = (_productData$delivery12 = productData.delivery) === null || _productData$delivery12 === void 0 ? void 0 : _productData$delivery12.deliveryTime) !== null && _productData$delivery11 !== void 0 ? _productData$delivery11 : '',
|
|
8594
8506
|
type: "number",
|
|
8595
8507
|
onChange: function onChange(s) {
|
|
8596
|
-
return update(_objectSpread$
|
|
8597
|
-
delivery: _objectSpread$
|
|
8508
|
+
return update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8509
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8598
8510
|
deliveryTime: Number(s.target.value)
|
|
8599
8511
|
})
|
|
8600
8512
|
}));
|
|
@@ -8620,8 +8532,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8620
8532
|
return ((_v$floatValue = v === null || v === void 0 ? void 0 : v.floatValue) !== null && _v$floatValue !== void 0 ? _v$floatValue : 0) >= 0;
|
|
8621
8533
|
},
|
|
8622
8534
|
onValueChange: function onValueChange(value) {
|
|
8623
|
-
update(_objectSpread$
|
|
8624
|
-
delivery: _objectSpread$
|
|
8535
|
+
update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8536
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8625
8537
|
deliveryPrice: Number(value.floatValue)
|
|
8626
8538
|
})
|
|
8627
8539
|
}));
|
|
@@ -8645,8 +8557,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8645
8557
|
return ((_v$floatValue2 = v === null || v === void 0 ? void 0 : v.floatValue) !== null && _v$floatValue2 !== void 0 ? _v$floatValue2 : 0) >= 0;
|
|
8646
8558
|
},
|
|
8647
8559
|
onValueChange: function onValueChange(value) {
|
|
8648
|
-
update(_objectSpread$
|
|
8649
|
-
delivery: _objectSpread$
|
|
8560
|
+
update(_objectSpread$f(_objectSpread$f({}, productData), {}, {
|
|
8561
|
+
delivery: _objectSpread$f(_objectSpread$f({}, productData.delivery), {}, {
|
|
8650
8562
|
installationPrice: Number(value.floatValue)
|
|
8651
8563
|
})
|
|
8652
8564
|
}));
|
|
@@ -8659,8 +8571,8 @@ function BaseDataFormDeliveryInfo (_ref) {
|
|
|
8659
8571
|
});
|
|
8660
8572
|
}
|
|
8661
8573
|
|
|
8662
|
-
function ownKeys$
|
|
8663
|
-
function _objectSpread$
|
|
8574
|
+
function ownKeys$e(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; }
|
|
8575
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8664
8576
|
var TranslationWrapper = function TranslationWrapper(_ref) {
|
|
8665
8577
|
var productData = _ref.productData,
|
|
8666
8578
|
update = _ref.update,
|
|
@@ -8695,13 +8607,13 @@ var TranslationWrapper = function TranslationWrapper(_ref) {
|
|
|
8695
8607
|
};
|
|
8696
8608
|
var handleUpdate = function handleUpdate(key, value) {
|
|
8697
8609
|
if (TRANSLATED_FILEDS.includes(key)) {
|
|
8698
|
-
var newProductData = _objectSpread$
|
|
8610
|
+
var newProductData = _objectSpread$e({}, productData);
|
|
8699
8611
|
if (!newProductData[key + '_locales']) newProductData[key + '_locales'] = {};
|
|
8700
8612
|
newProductData[key + '_locales'][languages[curLangIndex]] = value;
|
|
8701
8613
|
if (curLangIndex == 0) newProductData[key] = value;
|
|
8702
8614
|
update(newProductData);
|
|
8703
8615
|
} else {
|
|
8704
|
-
update(_objectSpread$
|
|
8616
|
+
update(_objectSpread$e(_objectSpread$e({}, productData), {}, _defineProperty({}, key, value)));
|
|
8705
8617
|
}
|
|
8706
8618
|
};
|
|
8707
8619
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -8718,7 +8630,7 @@ var TranslationWrapper = function TranslationWrapper(_ref) {
|
|
|
8718
8630
|
return setCutLang(newValue);
|
|
8719
8631
|
},
|
|
8720
8632
|
children: languages.map(function (lang, index) {
|
|
8721
|
-
return /*#__PURE__*/jsx(Tab, _objectSpread$
|
|
8633
|
+
return /*#__PURE__*/jsx(Tab, _objectSpread$e({
|
|
8722
8634
|
style: {
|
|
8723
8635
|
minWidth: 72,
|
|
8724
8636
|
height: '30px',
|
|
@@ -8810,8 +8722,8 @@ var BaseInfo = function BaseInfo(_ref) {
|
|
|
8810
8722
|
});
|
|
8811
8723
|
};
|
|
8812
8724
|
|
|
8813
|
-
function ownKeys$
|
|
8814
|
-
function _objectSpread$
|
|
8725
|
+
function ownKeys$d(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; }
|
|
8726
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8815
8727
|
var Dimensions = function Dimensions(_ref) {
|
|
8816
8728
|
var _productData$width, _productData$height, _productData$depth;
|
|
8817
8729
|
var productData = _ref.productData,
|
|
@@ -8837,7 +8749,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8837
8749
|
label: t('productcreator.fields.width'),
|
|
8838
8750
|
value: (_productData$width = productData.width) !== null && _productData$width !== void 0 ? _productData$width : '',
|
|
8839
8751
|
onChange: function onChange(s) {
|
|
8840
|
-
return update(_objectSpread$
|
|
8752
|
+
return update(_objectSpread$d(_objectSpread$d({}, productData), {}, {
|
|
8841
8753
|
width: Number(s.target.value)
|
|
8842
8754
|
}));
|
|
8843
8755
|
},
|
|
@@ -8855,7 +8767,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8855
8767
|
label: t('productcreator.fields.height'),
|
|
8856
8768
|
value: (_productData$height = productData.height) !== null && _productData$height !== void 0 ? _productData$height : '',
|
|
8857
8769
|
onChange: function onChange(s) {
|
|
8858
|
-
return update(_objectSpread$
|
|
8770
|
+
return update(_objectSpread$d(_objectSpread$d({}, productData), {}, {
|
|
8859
8771
|
height: Number(s.target.value)
|
|
8860
8772
|
}));
|
|
8861
8773
|
},
|
|
@@ -8870,7 +8782,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8870
8782
|
label: t('productcreator.fields.depth'),
|
|
8871
8783
|
value: (_productData$depth = productData.depth) !== null && _productData$depth !== void 0 ? _productData$depth : '',
|
|
8872
8784
|
onChange: function onChange(s) {
|
|
8873
|
-
return update(_objectSpread$
|
|
8785
|
+
return update(_objectSpread$d(_objectSpread$d({}, productData), {}, {
|
|
8874
8786
|
depth: Number(s.target.value)
|
|
8875
8787
|
}));
|
|
8876
8788
|
},
|
|
@@ -8893,7 +8805,7 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8893
8805
|
label: t('productcreator.fields.model_info_page_weight'),
|
|
8894
8806
|
value: productData.modelInfoPageWeight,
|
|
8895
8807
|
onChange: function onChange(s) {
|
|
8896
|
-
return update(_objectSpread$
|
|
8808
|
+
return update(_objectSpread$d(_objectSpread$d({}, productData), {}, {
|
|
8897
8809
|
modelInfoPageWeight: Number(s.target.value)
|
|
8898
8810
|
}));
|
|
8899
8811
|
},
|
|
@@ -8905,8 +8817,8 @@ var Dimensions = function Dimensions(_ref) {
|
|
|
8905
8817
|
});
|
|
8906
8818
|
};
|
|
8907
8819
|
|
|
8908
|
-
function ownKeys$
|
|
8909
|
-
function _objectSpread$
|
|
8820
|
+
function ownKeys$c(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; }
|
|
8821
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8910
8822
|
var Additionalnfos = function Additionalnfos(_ref) {
|
|
8911
8823
|
var _Object$entries;
|
|
8912
8824
|
var additionalBaseFields = _ref.additionalBaseFields,
|
|
@@ -8932,8 +8844,8 @@ var Additionalnfos = function Additionalnfos(_ref) {
|
|
|
8932
8844
|
label: "productcreator.fields.".concat(key, ".name"),
|
|
8933
8845
|
multiple: value.multi,
|
|
8934
8846
|
onChange: function onChange(value) {
|
|
8935
|
-
return update(_objectSpread$
|
|
8936
|
-
customData: _objectSpread$
|
|
8847
|
+
return update(_objectSpread$c(_objectSpread$c({}, productData), {}, {
|
|
8848
|
+
customData: _objectSpread$c(_objectSpread$c({}, productData.customData), {}, _defineProperty({}, key, value))
|
|
8937
8849
|
}));
|
|
8938
8850
|
}
|
|
8939
8851
|
})
|
|
@@ -9021,48 +8933,14 @@ var typeDropDown = "typeDropDown-A1ExF";
|
|
|
9021
8933
|
var objectListWrapper = "objectListWrapper-141eT";
|
|
9022
8934
|
var inputValueElement = "inputValueElement-XljUd";
|
|
9023
8935
|
var inputValueElementItem = "inputValueElementItem-s6dG0";
|
|
9024
|
-
var
|
|
9025
|
-
|
|
9026
|
-
styleInject(css_248z$4);
|
|
9027
|
-
|
|
9028
|
-
function ownKeys$c(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; }
|
|
9029
|
-
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9030
|
-
var SelectClasses = function SelectClasses(_ref) {
|
|
9031
|
-
var classificationFields = _ref.classificationFields,
|
|
9032
|
-
handleListBoxValueChange = _ref.handleListBoxValueChange,
|
|
9033
|
-
inputValueElement = _ref.inputValueElement,
|
|
9034
|
-
value = _ref.value,
|
|
9035
|
-
pairIndex = _ref.pairIndex;
|
|
9036
|
-
var _useTranslation = useTranslation(),
|
|
9037
|
-
t = _useTranslation.t;
|
|
9038
|
-
var handleChange = function handleChange(event, newValue) {
|
|
9039
|
-
handleListBoxValueChange(pairIndex, newValue ? newValue.field : '');
|
|
9040
|
-
};
|
|
9041
|
-
return /*#__PURE__*/jsx(Autocomplete$1, {
|
|
9042
|
-
className: inputValueElement,
|
|
9043
|
-
options: classificationFields || [],
|
|
9044
|
-
getOptionLabel: function getOptionLabel(option) {
|
|
9045
|
-
return option.title ? t(option.title) : option.field;
|
|
9046
|
-
},
|
|
9047
|
-
value: (classificationFields === null || classificationFields === void 0 ? void 0 : classificationFields.find(function (field) {
|
|
9048
|
-
return field.field === value;
|
|
9049
|
-
})) || null,
|
|
9050
|
-
onChange: handleChange,
|
|
9051
|
-
renderInput: function renderInput(params) {
|
|
9052
|
-
return /*#__PURE__*/jsx(TextField$1, _objectSpread$c(_objectSpread$c({}, params), {}, {
|
|
9053
|
-
label: t('productcreator.customfields.selectclass')
|
|
9054
|
-
}));
|
|
9055
|
-
}
|
|
9056
|
-
});
|
|
9057
|
-
};
|
|
8936
|
+
var css_248z$3 = ".wrapper-D74am {\n display: flex;\n grid-gap: 25px;\n margin-bottom: 10px;\n align-items: top;\n width: 100%;\n}\n.typeDropDown-A1ExF {\n min-width: 10%;\n max-height: 48px;\n}\n\n.objectListWrapper-141eT {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.inputValueElement-XljUd {\n width: 100%;\n}\n.inputValueElementItem-s6dG0 {\n display: flex;\n align-items: center;\n margin-bottom: 8px;\n gap: 10px; /* Use 'gap' instead of 'grid-gap' for flex containers */\n}\n";
|
|
8937
|
+
styleInject(css_248z$3);
|
|
9058
8938
|
|
|
9059
8939
|
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; }
|
|
9060
8940
|
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; }
|
|
9061
8941
|
var CustomDataFields = function CustomDataFields(_ref) {
|
|
9062
8942
|
var productData = _ref.productData,
|
|
9063
|
-
update = _ref.update
|
|
9064
|
-
manualCustomDataFields = _ref.manualCustomDataFields,
|
|
9065
|
-
classificationFields = _ref.classificationFields;
|
|
8943
|
+
update = _ref.update;
|
|
9066
8944
|
var _useTranslation = useTranslation(),
|
|
9067
8945
|
t = _useTranslation.t;
|
|
9068
8946
|
var _useState = useState([{
|
|
@@ -9087,41 +8965,24 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9087
8965
|
}
|
|
9088
8966
|
manualCustomData = filteredData;
|
|
9089
8967
|
var manualPairs = [];
|
|
9090
|
-
var
|
|
8968
|
+
for (var _i = 0; _i < manualCustomData.length; _i++) {
|
|
9091
8969
|
var _manualCustomData$_i = _slicedToArray(manualCustomData[_i], 2),
|
|
9092
|
-
|
|
9093
|
-
|
|
8970
|
+
_key = _manualCustomData$_i[0],
|
|
8971
|
+
_valueObj = _manualCustomData$_i[1];
|
|
9094
8972
|
var type = 'TEXT';
|
|
9095
|
-
if (Array.isArray(
|
|
8973
|
+
if (Array.isArray(_valueObj.value) && _typeof(_valueObj.value[0]) === 'object') {
|
|
9096
8974
|
type = 'OBJECTLIST';
|
|
9097
|
-
} else if (
|
|
9098
|
-
return field.field === valueObj.value;
|
|
9099
|
-
})) {
|
|
9100
|
-
type = 'CLASS';
|
|
9101
|
-
} else if (Array.isArray(valueObj.value)) {
|
|
8975
|
+
} else if (Array.isArray(_valueObj.value)) {
|
|
9102
8976
|
type = 'LIST';
|
|
9103
8977
|
}
|
|
9104
8978
|
manualPairs.push({
|
|
9105
|
-
key:
|
|
8979
|
+
key: _key,
|
|
9106
8980
|
type: type,
|
|
9107
|
-
value:
|
|
8981
|
+
value: _valueObj.value
|
|
9108
8982
|
});
|
|
9109
|
-
};
|
|
9110
|
-
for (var _i = 0; _i < manualCustomData.length; _i++) {
|
|
9111
|
-
_loop();
|
|
9112
8983
|
}
|
|
9113
8984
|
setPairs(manualPairs);
|
|
9114
8985
|
}, [productData]);
|
|
9115
|
-
useEffect(function () {
|
|
9116
|
-
//order classification fields by title
|
|
9117
|
-
if (classificationFields) {
|
|
9118
|
-
classificationFields.sort(function (a, b) {
|
|
9119
|
-
var titleA = a.title ? t(a.title) : a.field;
|
|
9120
|
-
var titleB = b.title ? t(b.title) : b.field;
|
|
9121
|
-
return titleA.localeCompare(titleB);
|
|
9122
|
-
});
|
|
9123
|
-
}
|
|
9124
|
-
}, [classificationFields]);
|
|
9125
8986
|
var handleAddPair = function handleAddPair() {
|
|
9126
8987
|
setPairs([].concat(_toConsumableArray(pairs), [{
|
|
9127
8988
|
key: '',
|
|
@@ -9279,7 +9140,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9279
9140
|
}));
|
|
9280
9141
|
setPairs(actPairs);
|
|
9281
9142
|
};
|
|
9282
|
-
var
|
|
9143
|
+
var handleListBoxChange = function handleListBoxChange(index, value) {
|
|
9283
9144
|
var actPairs = _toConsumableArray(pairs);
|
|
9284
9145
|
actPairs[index].type = value;
|
|
9285
9146
|
if (value === 'TEXT') {
|
|
@@ -9290,22 +9151,9 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9290
9151
|
actPairs[index].value = [{
|
|
9291
9152
|
'': ''
|
|
9292
9153
|
}];
|
|
9293
|
-
} else if (value === 'CLASS') {
|
|
9294
|
-
actPairs[index].value = '';
|
|
9295
9154
|
}
|
|
9296
9155
|
setPairs(actPairs);
|
|
9297
9156
|
};
|
|
9298
|
-
var handleListBoxValueChange = function handleListBoxValueChange(index, value) {
|
|
9299
|
-
var actPairs = _toConsumableArray(pairs);
|
|
9300
|
-
actPairs[index].value = value;
|
|
9301
|
-
update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
|
|
9302
|
-
customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[index].key, {
|
|
9303
|
-
value: actPairs[index].value,
|
|
9304
|
-
manual: true
|
|
9305
|
-
}))
|
|
9306
|
-
}));
|
|
9307
|
-
setPairs(actPairs);
|
|
9308
|
-
};
|
|
9309
9157
|
return /*#__PURE__*/jsxs(Card$1, {
|
|
9310
9158
|
style: {
|
|
9311
9159
|
marginBottom: '10px'
|
|
@@ -9317,56 +9165,19 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9317
9165
|
children: [pairs.map(function (pair, index) {
|
|
9318
9166
|
return /*#__PURE__*/jsxs(Box$1, {
|
|
9319
9167
|
className: wrapper$2,
|
|
9320
|
-
children: [/*#__PURE__*/jsx(
|
|
9321
|
-
freeSolo: true,
|
|
9168
|
+
children: [/*#__PURE__*/jsx(TextField, {
|
|
9322
9169
|
style: {
|
|
9323
|
-
|
|
9324
|
-
},
|
|
9325
|
-
options: manualCustomDataFields !== null && manualCustomDataFields !== void 0 ? manualCustomDataFields : [],
|
|
9326
|
-
getOptionDisabled: function getOptionDisabled(option) {
|
|
9327
|
-
return pairs.map(function (pair) {
|
|
9328
|
-
return pair.key;
|
|
9329
|
-
}).includes(option);
|
|
9170
|
+
maxWidth: '10%'
|
|
9330
9171
|
},
|
|
9172
|
+
label: t('fieldname'),
|
|
9331
9173
|
value: pair.key,
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
handleChange(index, 'key', inputValue);
|
|
9335
|
-
},
|
|
9336
|
-
sx: {
|
|
9337
|
-
width: '100%'
|
|
9338
|
-
},
|
|
9339
|
-
renderInput: function renderInput(params) {
|
|
9340
|
-
return /*#__PURE__*/jsx(Tooltip, {
|
|
9341
|
-
title: pair.key,
|
|
9342
|
-
placement: "left",
|
|
9343
|
-
children: /*#__PURE__*/jsx(TextField, _objectSpread$b(_objectSpread$b({}, params), {}, {
|
|
9344
|
-
label: t('productcreator.customfields.keylabel')
|
|
9345
|
-
}))
|
|
9346
|
-
});
|
|
9347
|
-
},
|
|
9348
|
-
renderOption: function renderOption(props, option) {
|
|
9349
|
-
return /*#__PURE__*/jsx("li", _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
9350
|
-
style: {
|
|
9351
|
-
display: 'flex',
|
|
9352
|
-
alignItems: 'center',
|
|
9353
|
-
width: '100%'
|
|
9354
|
-
},
|
|
9355
|
-
children: /*#__PURE__*/jsx(Tooltip, {
|
|
9356
|
-
title: option,
|
|
9357
|
-
placement: "right",
|
|
9358
|
-
children: /*#__PURE__*/jsx(Typography, {
|
|
9359
|
-
noWrap: true,
|
|
9360
|
-
className: keyDropdownText,
|
|
9361
|
-
children: option
|
|
9362
|
-
})
|
|
9363
|
-
})
|
|
9364
|
-
}));
|
|
9174
|
+
onChange: function onChange(e) {
|
|
9175
|
+
return handleChange(index, 'key', e.target.value);
|
|
9365
9176
|
}
|
|
9366
9177
|
}), /*#__PURE__*/jsxs(Select$1, {
|
|
9367
9178
|
value: pair.type,
|
|
9368
9179
|
onChange: function onChange(e) {
|
|
9369
|
-
return
|
|
9180
|
+
return handleListBoxChange(index, e.target.value);
|
|
9370
9181
|
},
|
|
9371
9182
|
className: typeDropDown,
|
|
9372
9183
|
displayEmpty: true,
|
|
@@ -9379,9 +9190,6 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9379
9190
|
}), /*#__PURE__*/jsx(MenuItem$1, {
|
|
9380
9191
|
value: "OBJECTLIST",
|
|
9381
9192
|
children: t('objectlist')
|
|
9382
|
-
}), /*#__PURE__*/jsx(MenuItem$1, {
|
|
9383
|
-
value: "CLASS",
|
|
9384
|
-
children: t('class')
|
|
9385
9193
|
})]
|
|
9386
9194
|
}), pair.type === 'TEXT' && /*#__PURE__*/jsx(TextField, {
|
|
9387
9195
|
label: t('value'),
|
|
@@ -9512,12 +9320,6 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9512
9320
|
children: t('addentry')
|
|
9513
9321
|
})]
|
|
9514
9322
|
})
|
|
9515
|
-
}), pair.type === 'CLASS' && /*#__PURE__*/jsx(SelectClasses, {
|
|
9516
|
-
classificationFields: classificationFields,
|
|
9517
|
-
handleListBoxValueChange: handleListBoxValueChange,
|
|
9518
|
-
value: pair.value,
|
|
9519
|
-
pairIndex: index,
|
|
9520
|
-
inputValueElement: inputValueElement
|
|
9521
9323
|
}), /*#__PURE__*/jsx(IconButton$1, {
|
|
9522
9324
|
onClick: function onClick() {
|
|
9523
9325
|
return handleRemovePair(index);
|
|
@@ -9547,9 +9349,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
|
|
|
9547
9349
|
function BaseDataFormInfo (_ref) {
|
|
9548
9350
|
var productData = _ref.productData,
|
|
9549
9351
|
additionalBaseFields = _ref.additionalBaseFields,
|
|
9550
|
-
_update = _ref.update
|
|
9551
|
-
manualCustomDataFields = _ref.manualCustomDataFields,
|
|
9552
|
-
classificationFields = _ref.classificationFields;
|
|
9352
|
+
_update = _ref.update;
|
|
9553
9353
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
9554
9354
|
children: [/*#__PURE__*/jsx(TranslationWrapper, {
|
|
9555
9355
|
title: 'productcreator.basedata.baseinfo',
|
|
@@ -9586,9 +9386,7 @@ function BaseDataFormInfo (_ref) {
|
|
|
9586
9386
|
productData: productData,
|
|
9587
9387
|
update: function update(d) {
|
|
9588
9388
|
return _update(d || productData);
|
|
9589
|
-
}
|
|
9590
|
-
manualCustomDataFields: manualCustomDataFields,
|
|
9591
|
-
classificationFields: classificationFields
|
|
9389
|
+
}
|
|
9592
9390
|
})]
|
|
9593
9391
|
});
|
|
9594
9392
|
}
|
|
@@ -9754,9 +9552,7 @@ function BaseDataForm (_ref) {
|
|
|
9754
9552
|
additionalBaseFields = _ref.additionalBaseFields,
|
|
9755
9553
|
configurationData = _ref.configurationData,
|
|
9756
9554
|
customFormData = _ref.customFormData,
|
|
9757
|
-
hasVariants = _ref.hasVariants
|
|
9758
|
-
manualCustomDataFields = _ref.manualCustomDataFields,
|
|
9759
|
-
classificationFields = _ref.classificationFields;
|
|
9555
|
+
hasVariants = _ref.hasVariants;
|
|
9760
9556
|
var _useTranslation = useTranslation(),
|
|
9761
9557
|
t = _useTranslation.t;
|
|
9762
9558
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -9812,9 +9608,7 @@ function BaseDataForm (_ref) {
|
|
|
9812
9608
|
}), /*#__PURE__*/jsx(BaseDataFormInfo, {
|
|
9813
9609
|
productData: productData,
|
|
9814
9610
|
update: update,
|
|
9815
|
-
additionalBaseFields: additionalBaseFields
|
|
9816
|
-
manualCustomDataFields: manualCustomDataFields,
|
|
9817
|
-
classificationFields: classificationFields
|
|
9611
|
+
additionalBaseFields: additionalBaseFields
|
|
9818
9612
|
}), !!(configurationData !== null && configurationData !== void 0 && (_configurationData$fi = configurationData.fields) !== null && _configurationData$fi !== void 0 && _configurationData$fi.delivery) && /*#__PURE__*/jsx(BaseDataFormDeliveryInfo, {
|
|
9819
9613
|
productData: productData,
|
|
9820
9614
|
update: update,
|
|
@@ -10462,7 +10256,7 @@ function VariantTable (_ref) {
|
|
|
10462
10256
|
style: {
|
|
10463
10257
|
width: '100%',
|
|
10464
10258
|
height: '100%',
|
|
10465
|
-
|
|
10259
|
+
overflow: 'hidden'
|
|
10466
10260
|
},
|
|
10467
10261
|
children: /*#__PURE__*/jsx(Grid, {
|
|
10468
10262
|
options: options,
|
|
@@ -10535,8 +10329,8 @@ function _preUpdateData(field, value, row) {
|
|
|
10535
10329
|
|
|
10536
10330
|
var wrapper$1 = "wrapper-I8eY4";
|
|
10537
10331
|
var dataTable = "data-table-ImAxQ";
|
|
10538
|
-
var css_248z$
|
|
10539
|
-
styleInject(css_248z$
|
|
10332
|
+
var css_248z$2 = ".wrapper-I8eY4 {\n display: flex;\n height: calc(100% - 67px);\n border-bottom: 1px solid rgb(224, 224, 224);\n}\n\n.data-table-ImAxQ {\n position: relative;\n height: 100%;\n flex-grow: 1;\n overflow: hidden;\n}\n";
|
|
10333
|
+
styleInject(css_248z$2);
|
|
10540
10334
|
|
|
10541
10335
|
function ownKeys$6(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; }
|
|
10542
10336
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -11530,7 +11324,7 @@ function useProductState (basket, divaNr) {
|
|
|
11530
11324
|
useEffect(function () {
|
|
11531
11325
|
var init = /*#__PURE__*/function () {
|
|
11532
11326
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
11533
|
-
var _ref4, updateBasket, catalogData,
|
|
11327
|
+
var _ref4, updateBasket, catalogData, _affiliates, _Object$keys$map2, _configurationData$Pr2, _optClassMap, _catalogs$, _initState, _yield$loadCategories, classificationFields, newCurrentData, additional, _additionalBaseFields, newLivingArea, _yield$productHandler2, _isNew, baseChanged, catalogs, initState, currentCategories, differingOptFields, optMapEntries, missingOptFields, accountlogourl, logofile, _initState$baseData$m, newlogofile, _initState$baseData$m2;
|
|
11534
11328
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
11535
11329
|
while (1) switch (_context4.prev = _context4.next) {
|
|
11536
11330
|
case 0:
|
|
@@ -11550,49 +11344,38 @@ function useProductState (basket, divaNr) {
|
|
|
11550
11344
|
_ref4 = _context4.t0;
|
|
11551
11345
|
updateBasket = _ref4.basket;
|
|
11552
11346
|
catalogData = _ref4.catalogData;
|
|
11553
|
-
if (!(basket && basket.getDocumentVersion() > 1)) {
|
|
11554
|
-
_context4.next = 16;
|
|
11555
|
-
break;
|
|
11556
|
-
}
|
|
11557
|
-
_context4.next = 13;
|
|
11558
|
-
return productHandler.apiGetUniqueDivaNr();
|
|
11559
|
-
case 13:
|
|
11560
|
-
newDivaNr = _context4.sent;
|
|
11561
|
-
updateBasket.DivaNr = newDivaNr;
|
|
11562
|
-
divaNr = newDivaNr;
|
|
11563
|
-
case 16:
|
|
11564
11347
|
toggleLoading('ProductDataInit');
|
|
11565
11348
|
updateBasketState({
|
|
11566
11349
|
overwriteStates: ['BASE_CONFIGURATION']
|
|
11567
11350
|
});
|
|
11568
11351
|
if (!userHasPermission('productcreator_affiliate')) {
|
|
11569
|
-
_context4.next =
|
|
11352
|
+
_context4.next = 23;
|
|
11570
11353
|
break;
|
|
11571
11354
|
}
|
|
11572
|
-
_context4.prev =
|
|
11573
|
-
_context4.next =
|
|
11355
|
+
_context4.prev = 13;
|
|
11356
|
+
_context4.next = 16;
|
|
11574
11357
|
return apiGetAffiliates({
|
|
11575
11358
|
serviceUrl: apiConfig.authService,
|
|
11576
11359
|
organizationId: organization._id,
|
|
11577
11360
|
jwt: jwt
|
|
11578
11361
|
});
|
|
11579
|
-
case
|
|
11362
|
+
case 16:
|
|
11580
11363
|
_affiliates = _context4.sent;
|
|
11581
11364
|
setAffiliates(_affiliates);
|
|
11582
|
-
_context4.next =
|
|
11365
|
+
_context4.next = 23;
|
|
11583
11366
|
break;
|
|
11584
|
-
case
|
|
11585
|
-
_context4.prev =
|
|
11586
|
-
_context4.t1 = _context4["catch"](
|
|
11367
|
+
case 20:
|
|
11368
|
+
_context4.prev = 20;
|
|
11369
|
+
_context4.t1 = _context4["catch"](13);
|
|
11587
11370
|
LOG$2.error(new DivaError("Error loading affiliates", {
|
|
11588
11371
|
code: 'SELLER_0002',
|
|
11589
11372
|
cause: _context4.t1
|
|
11590
11373
|
}));
|
|
11591
|
-
case
|
|
11592
|
-
_context4.prev =
|
|
11593
|
-
_context4.next =
|
|
11374
|
+
case 23:
|
|
11375
|
+
_context4.prev = 23;
|
|
11376
|
+
_context4.next = 26;
|
|
11594
11377
|
return loadCategories();
|
|
11595
|
-
case
|
|
11378
|
+
case 26:
|
|
11596
11379
|
_yield$loadCategories = _context4.sent;
|
|
11597
11380
|
classificationFields = _yield$loadCategories.classificationFields;
|
|
11598
11381
|
newCurrentData = _yield$loadCategories.newCurrentData;
|
|
@@ -11616,7 +11399,7 @@ function useProductState (basket, divaNr) {
|
|
|
11616
11399
|
});
|
|
11617
11400
|
newCurrentData.livingAreas = _objectSpread$4({}, newLivingArea);
|
|
11618
11401
|
}
|
|
11619
|
-
_context4.next =
|
|
11402
|
+
_context4.next = 34;
|
|
11620
11403
|
return productHandler.loadProducts({
|
|
11621
11404
|
basket: updateBasket,
|
|
11622
11405
|
divaNr: divaNr,
|
|
@@ -11628,7 +11411,7 @@ function useProductState (basket, divaNr) {
|
|
|
11628
11411
|
availableLanguages: availableLanguages,
|
|
11629
11412
|
currentLang: language
|
|
11630
11413
|
});
|
|
11631
|
-
case
|
|
11414
|
+
case 34:
|
|
11632
11415
|
_yield$productHandler2 = _context4.sent;
|
|
11633
11416
|
_isNew = _yield$productHandler2.isNew;
|
|
11634
11417
|
baseChanged = _yield$productHandler2.baseChanged;
|
|
@@ -11702,22 +11485,22 @@ function useProductState (basket, divaNr) {
|
|
|
11702
11485
|
text: t('productcreator.configurationchanged.text')
|
|
11703
11486
|
});
|
|
11704
11487
|
setSaved(!_isNew);
|
|
11705
|
-
_context4.next =
|
|
11488
|
+
_context4.next = 60;
|
|
11706
11489
|
break;
|
|
11707
|
-
case
|
|
11708
|
-
_context4.prev =
|
|
11709
|
-
_context4.t2 = _context4["catch"](
|
|
11490
|
+
case 57:
|
|
11491
|
+
_context4.prev = 57;
|
|
11492
|
+
_context4.t2 = _context4["catch"](23);
|
|
11710
11493
|
LOG$2.error(new DivaError("Error initalization", {
|
|
11711
11494
|
code: 'SELLER_0002',
|
|
11712
11495
|
cause: _context4.t2
|
|
11713
11496
|
}));
|
|
11714
|
-
case
|
|
11497
|
+
case 60:
|
|
11715
11498
|
toggleLoading('ProductDataInit');
|
|
11716
|
-
case
|
|
11499
|
+
case 61:
|
|
11717
11500
|
case "end":
|
|
11718
11501
|
return _context4.stop();
|
|
11719
11502
|
}
|
|
11720
|
-
}, _callee4, null, [[
|
|
11503
|
+
}, _callee4, null, [[13, 20], [23, 57]]);
|
|
11721
11504
|
}));
|
|
11722
11505
|
return function init() {
|
|
11723
11506
|
return _ref3.apply(this, arguments);
|
|
@@ -11987,26 +11770,15 @@ function updateVariants(prevState, currentState, configurationData, baseDataFiel
|
|
|
11987
11770
|
_modified = _ProductHandler$calcu.modified;
|
|
11988
11771
|
finalVariant[field] = _value;
|
|
11989
11772
|
newModified[field] = _modified;
|
|
11990
|
-
} else if (field.includes('customFlags')) {
|
|
11991
|
-
var path = field.split('.');
|
|
11992
|
-
var prevValue = getData(path, variant);
|
|
11993
|
-
var newValue = getData(path, newVariant);
|
|
11994
|
-
if (prevValue !== newValue) {
|
|
11995
|
-
if (newValue === true || newValue !== null && newValue !== void 0 && newValue.length) {
|
|
11996
|
-
setData(path, [variant.organizationId], finalVariant);
|
|
11997
|
-
} else {
|
|
11998
|
-
setData(path, [], finalVariant);
|
|
11999
|
-
}
|
|
12000
|
-
}
|
|
12001
11773
|
} else if (field.includes('.')) {
|
|
12002
11774
|
var _currentState$modifie2;
|
|
12003
11775
|
//handle nested fields
|
|
12004
11776
|
|
|
12005
|
-
var
|
|
12006
|
-
var _ProductHandler$calcu2 = ProductHandler.calculateComputedValue(getData(
|
|
11777
|
+
var path = field.split('.');
|
|
11778
|
+
var _ProductHandler$calcu2 = ProductHandler.calculateComputedValue(getData(path, variant), newVariant ? getData(path, newVariant) : undefined, getData(path, currentState.baseData), (_currentState$modifie2 = currentState.modified.variantData[_i]) === null || _currentState$modifie2 === void 0 ? void 0 : _currentState$modifie2[field]),
|
|
12007
11779
|
_value2 = _ProductHandler$calcu2.value,
|
|
12008
11780
|
_modified2 = _ProductHandler$calcu2.modified;
|
|
12009
|
-
setData(
|
|
11781
|
+
setData(path, _value2, finalVariant);
|
|
12010
11782
|
finalVariant.media = variant.media;
|
|
12011
11783
|
newModified[field] = _modified2;
|
|
12012
11784
|
} else if (custom) {
|
|
@@ -12684,15 +12456,8 @@ function intersection() {
|
|
|
12684
12456
|
});
|
|
12685
12457
|
}
|
|
12686
12458
|
|
|
12687
|
-
var main = "main-ERs2i";
|
|
12688
|
-
var content = "content-KMewq";
|
|
12689
|
-
var tabContent = "tab-content-nIlnM";
|
|
12690
|
-
var renderjob = "renderjob-Yt11W";
|
|
12691
|
-
var css_248z$2 = ".main-ERs2i {\n display: flex;\n overflow: hidden;\n width: 100%;\n flex-direction: column;\n height: 100%;\n}\n\n.content-KMewq {\n position: relative;\n width: 100%;\n overflow: hidden;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.tab-content-nIlnM {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n flex: 1;\n}\n\n.renderjob-Yt11W {\n display: flex;\n height: calc(100% - 20px);\n margin: 10px;\n}\n\n.renderjob-Yt11W #diva-order-entry-footer > span > div {\n width: 500px;\n}\n\n.renderjob-Yt11W #diva-order-entry-footer > span > div > span {\n margin-left: 110px;\n}\n";
|
|
12692
|
-
styleInject(css_248z$2);
|
|
12693
|
-
|
|
12694
12459
|
function ProductCreator (_ref) {
|
|
12695
|
-
var _state$variantData, _state$variantData2, _state$variantData$fi, _state$variantData3, _state$baseData$custo2,
|
|
12460
|
+
var _state$variantData, _state$variantData2, _state$variantData$fi, _state$variantData3, _state$baseData$custo2, _currentBasket$DivaNr, _currentBasket$OrderS;
|
|
12696
12461
|
var basket = _ref.basket,
|
|
12697
12462
|
divaNr = _ref.divaNr;
|
|
12698
12463
|
var _useSellerState = useSellerState(),
|
|
@@ -12702,12 +12467,10 @@ function ProductCreator (_ref) {
|
|
|
12702
12467
|
openModal = _useSellerState$actio.openModal,
|
|
12703
12468
|
toggleLoading = _useSellerState$actio.toggleLoading,
|
|
12704
12469
|
clearOriginProductId = _useSellerState$actio.clearOriginProductId,
|
|
12705
|
-
loadManualCustomDataFields = _useSellerState$actio.loadManualCustomDataFields,
|
|
12706
12470
|
_useSellerState$state = _useSellerState.state,
|
|
12707
12471
|
configurationData = _useSellerState$state.configurationData,
|
|
12708
12472
|
returnTo = _useSellerState$state.returnTo,
|
|
12709
|
-
originProductId = _useSellerState$state.originProductId
|
|
12710
|
-
manualCustomDataFields = _useSellerState$state.manualCustomDataFields;
|
|
12473
|
+
originProductId = _useSellerState$state.originProductId;
|
|
12711
12474
|
var _useDivaCore = useDivaCore(),
|
|
12712
12475
|
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
12713
12476
|
var _useTranslation = useTranslation(),
|
|
@@ -12829,9 +12592,6 @@ function ProductCreator (_ref) {
|
|
|
12829
12592
|
//reset selection if new data is loaded
|
|
12830
12593
|
setSelectedFields((_state$initialSelecte = state === null || state === void 0 ? void 0 : state.initialSelectedFields) !== null && _state$initialSelecte !== void 0 ? _state$initialSelecte : []);
|
|
12831
12594
|
}, [state === null || state === void 0 ? void 0 : state.initialSelectedFields]);
|
|
12832
|
-
useEffect(function () {
|
|
12833
|
-
loadManualCustomDataFields();
|
|
12834
|
-
}, []);
|
|
12835
12595
|
var onOpenPlanner = function onOpenPlanner() {
|
|
12836
12596
|
var basketToInit = new BasketData(state === null || state === void 0 ? void 0 : state.baseData.configuration);
|
|
12837
12597
|
basketToInit.OrderSets[0].TinyVariantConfiguration = state === null || state === void 0 ? void 0 : state.variantData.map(function (v) {
|
|
@@ -13043,11 +12803,24 @@ function ProductCreator (_ref) {
|
|
|
13043
12803
|
onCancel: onCancel
|
|
13044
12804
|
});
|
|
13045
12805
|
return /*#__PURE__*/jsxs("div", {
|
|
13046
|
-
|
|
12806
|
+
style: {
|
|
12807
|
+
display: 'flex',
|
|
12808
|
+
overflow: 'hidden',
|
|
12809
|
+
width: '100%',
|
|
12810
|
+
flexDirection: 'column',
|
|
12811
|
+
height: '100%'
|
|
12812
|
+
},
|
|
13047
12813
|
children: [/*#__PURE__*/jsx(Title, {
|
|
13048
|
-
text: "".concat(t('productcreator.title'), " - ").concat((
|
|
12814
|
+
text: "".concat(t('productcreator.title'), " - ").concat((_currentBasket$DivaNr = currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.DivaNr) !== null && _currentBasket$DivaNr !== void 0 ? _currentBasket$DivaNr : state.baseData.divaNr)
|
|
13049
12815
|
}), /*#__PURE__*/jsxs("div", {
|
|
13050
|
-
|
|
12816
|
+
style: {
|
|
12817
|
+
position: 'relative',
|
|
12818
|
+
width: '100%',
|
|
12819
|
+
overflow: 'hidden',
|
|
12820
|
+
flex: 1,
|
|
12821
|
+
display: 'flex',
|
|
12822
|
+
flexDirection: 'column'
|
|
12823
|
+
},
|
|
13051
12824
|
children: [/*#__PURE__*/jsx(Paper, {
|
|
13052
12825
|
style: {
|
|
13053
12826
|
marginBottom: 1
|
|
@@ -13103,7 +12876,12 @@ function ProductCreator (_ref) {
|
|
|
13103
12876
|
},
|
|
13104
12877
|
children: t(warn)
|
|
13105
12878
|
}), /*#__PURE__*/jsxs("div", {
|
|
13106
|
-
|
|
12879
|
+
style: {
|
|
12880
|
+
display: 'flex',
|
|
12881
|
+
overflow: 'hidden',
|
|
12882
|
+
flexDirection: 'column',
|
|
12883
|
+
flex: 1
|
|
12884
|
+
},
|
|
13107
12885
|
children: [tab == 'AFFILIATE' && /*#__PURE__*/jsx(AffiliateTable, {
|
|
13108
12886
|
variantData: validVariantData,
|
|
13109
12887
|
baseData: state.baseData,
|
|
@@ -13112,7 +12890,11 @@ function ProductCreator (_ref) {
|
|
|
13112
12890
|
affiliateData: affiliates,
|
|
13113
12891
|
children: ButtonsElement
|
|
13114
12892
|
}), tab == 'RENDERJOB' && /*#__PURE__*/jsx("div", {
|
|
13115
|
-
|
|
12893
|
+
style: {
|
|
12894
|
+
display: 'flex',
|
|
12895
|
+
flex: 1,
|
|
12896
|
+
margin: 10
|
|
12897
|
+
},
|
|
13116
12898
|
children: /*#__PURE__*/jsx(OrderEntry, {
|
|
13117
12899
|
variantData: validVariantData,
|
|
13118
12900
|
baseData: state.baseData,
|
|
@@ -13164,8 +12946,6 @@ function ProductCreator (_ref) {
|
|
|
13164
12946
|
additionalBaseFields: additional,
|
|
13165
12947
|
customFormData: customFormData,
|
|
13166
12948
|
hasVariants: showVarinats,
|
|
13167
|
-
manualCustomDataFields: manualCustomDataFields,
|
|
13168
|
-
classificationFields: state === null || state === void 0 ? void 0 : state.classificationFields,
|
|
13169
12949
|
children: ButtonsElement
|
|
13170
12950
|
}), tab == 'BASECONFIG' && /*#__PURE__*/jsx(VariantTable, {
|
|
13171
12951
|
update: updateVariants,
|