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