@crystaldesign/diva-seller 25.2.0-beta.2 → 25.2.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/build/esm/index.js +360 -231
  2. package/build/types/seller/src/components/Basket/Step3Checkout.d.ts +1 -1
  3. package/build/types/seller/src/components/Basket/Step3Checkout.d.ts.map +1 -1
  4. package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
  5. package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormInfo.d.ts +4 -2
  6. package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormInfo.d.ts.map +1 -1
  7. package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts +4 -1
  8. package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts.map +1 -1
  9. package/build/types/seller/src/components/ProductCreator/hooks/useProductState.d.ts.map +1 -1
  10. package/build/types/seller/src/components/ProductCreator/index.d.ts.map +1 -1
  11. package/build/types/seller/src/components/ProductCreator/tabs/BaseDataForm.d.ts +4 -2
  12. package/build/types/seller/src/components/ProductCreator/tabs/BaseDataForm.d.ts.map +1 -1
  13. package/build/types/seller/src/provider/SellerStateProvider.d.ts.map +1 -1
  14. package/build/types/seller/src/provider/context.d.ts +2 -0
  15. package/build/types/seller/src/provider/context.d.ts.map +1 -1
  16. package/build/types/seller/src/provider/hooks/useSellerStateData/index.d.ts +2 -0
  17. package/build/types/seller/src/provider/hooks/useSellerStateData/index.d.ts.map +1 -1
  18. package/build/types/seller/src/services/ApiHandler.d.ts +3 -0
  19. package/build/types/seller/src/services/ApiHandler.d.ts.map +1 -1
  20. package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts +1 -1
  21. package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts.map +1 -1
  22. package/package.json +5 -5
@@ -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, Tooltip, Stack, Paper as Paper$1, Skeleton, IconButton as IconButton$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Divider as Divider$1, Alert as Alert$1, AlertTitle as AlertTitle$1, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box as Box$1, Select as Select$1, MenuItem as MenuItem$1, ListItemButton, ListItemIcon } from '@mui/material';
20
+ import { styled, Typography, Card as Card$1, CardActionArea as CardActionArea$1, CardMedia as CardMedia$1, Button as Button$1, TextField, ButtonGroup as ButtonGroup$1, Tooltip, Stack, Paper as Paper$1, Skeleton, IconButton as IconButton$1, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Divider as Divider$1, Alert as Alert$1, AlertTitle as AlertTitle$1, Link, InputBase, Accordion, AccordionSummary, Tabs, Tab, AccordionDetails, Table as Table$1, TableBody as TableBody$1, TableRow as TableRow$1, TableCell as TableCell$1, CardHeader, CardContent, FormControl as FormControl$1, FormHelperText, TextareaAutosize, Box as Box$1, 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
 
@@ -1148,19 +1149,55 @@ function _apiGetProductCreator() {
1148
1149
  }));
1149
1150
  return _apiGetProductCreator.apply(this, arguments);
1150
1151
  }
1151
- function apiGetAffiliates(_x13) {
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 _callee13(_ref13) {
1192
+ _apiGetAffiliates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref14) {
1156
1193
  var serviceUrl, organizationId, jwt, fullUrl, res, resOrg;
1157
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
1158
- while (1) switch (_context13.prev = _context13.next) {
1194
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
1195
+ while (1) switch (_context14.prev = _context14.next) {
1159
1196
  case 0:
1160
- serviceUrl = _ref13.serviceUrl, organizationId = _ref13.organizationId, jwt = _ref13.jwt;
1197
+ serviceUrl = _ref14.serviceUrl, organizationId = _ref14.organizationId, jwt = _ref14.jwt;
1161
1198
  fullUrl = serviceUrl + '/v2/organizations/' + organizationId + '/affiliate?inherit=true';
1162
- _context13.prev = 2;
1163
- _context13.next = 5;
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 = _context13.sent;
1172
- _context13.next = 8;
1208
+ res = _context14.sent;
1209
+ _context14.next = 8;
1173
1210
  return res.json();
1174
1211
  case 8:
1175
- resOrg = _context13.sent;
1176
- _context13.next = 14;
1212
+ resOrg = _context14.sent;
1213
+ _context14.next = 14;
1177
1214
  break;
1178
1215
  case 11:
1179
- _context13.prev = 11;
1180
- _context13.t0 = _context13["catch"](2);
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 _context13.abrupt("return", resOrg.data);
1220
+ return _context14.abrupt("return", resOrg.data);
1184
1221
  case 15:
1185
1222
  case "end":
1186
- return _context13.stop();
1223
+ return _context14.stop();
1187
1224
  }
1188
- }, _callee13, null, [[2, 11]]);
1225
+ }, _callee14, null, [[2, 11]]);
1189
1226
  }));
1190
1227
  return _apiGetAffiliates.apply(this, arguments);
1191
1228
  }
@@ -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',
@@ -2258,11 +2304,12 @@ 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"];
2312
+ var _excluded$9 = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "setManualCustomDataFields", "resetState", "resetForCache"];
2266
2313
  function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2267
2314
  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; }
2268
2315
  var LOG$8 = getLogger('Seller', 'SellerStateProvider');
@@ -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);
@@ -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,7 +3093,8 @@ 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
3099
  actions: _objectSpread$z(_objectSpread$z({}, stateFunctions), {}, {
3028
3100
  openComponent: openComponent,
@@ -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, {
@@ -5404,8 +5477,9 @@ function styleInject(css, ref) {
5404
5477
  }
5405
5478
 
5406
5479
  var infocontainer = "infocontainer-ir9gv";
5407
- var css_248z$b = ".infocontainer-ir9gv {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
5408
- styleInject(css_248z$b);
5480
+ var stepsContent = "steps-content-jDbLc";
5481
+ 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";
5482
+ styleInject(css_248z$c);
5409
5483
 
5410
5484
  function Step2ClientData(_ref) {
5411
5485
  var _config$clientData, _config$clientData2;
@@ -5880,8 +5954,8 @@ var productDetailText = "productDetailText-wkk6U";
5880
5954
  var productDetailSkeleton = "productDetailSkeleton-3-RLq";
5881
5955
  var productDetailDivider = "productDetailDivider-C1Cdh";
5882
5956
  var alertTitle = "alertTitle-Bm1NO";
5883
- var css_248z$a = ".container-3kPdM {\n padding-bottom: 10px;\n margin-top: 2px;\n}\n\n.mainStack-1xE4c {\n width: 100%;\n margin-top: 16px;\n}\n\n.productContainer-JcVn0 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-bottom: 16px;\n width: 100%;\n}\n\n.productNameContainer-35ZZc {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n}\n\n.productNameField-hPNbW {\n margin: 8px;\n width: 70%;\n}\n\n.productImage-Vn0l- {\n width: 70%;\n display: block;\n}\n\n.productImage-Vn0l-.hidden-zZ8fS {\n display: none;\n}\n\n.productDetailsContainer-5c-V9 {\n margin: 20px;\n max-height: 100%;\n}\n\n.productDetailRow-9KtDG {\n display: flex;\n}\n\n.productDetailLabel-t7Mn7 {\n font-weight: 600;\n width: 40%;\n}\n\n.favoriteContainer-ka7lC {\n display: flex;\n align-items: center;\n margin-top: 16px;\n}\n.favoriteCheckbox-JYnH- {\n margin-left: 10px;\n}\n\n.actionButtonContainer-WfYfD {\n display: flex;\n gap: 16px;\n margin-top: 16px;\n justify-content: right;\n}\n@media (max-width: 768px) {\n .actionButtonContainer-WfYfD {\n display: flex;\n justify-content: space-between;\n }\n}\n\n.productDetailsPaper-VsWfW {\n width: 100%;\n max-height: 100%;\n overflow: auto;\n}\n\n.productDetailText-wkk6U {\n white-space: pre-wrap;\n}\n\n.productDetailSkeleton-3-RLq {\n margin-left: 30px;\n height: 28px;\n}\n\n.productDetailDivider-C1Cdh {\n margin-bottom: 16px;\n}\n\n.alertTitle-Bm1NO {\n font-weight: 600;\n}\n\n/* Responsive styles */\n@media (min-width: 900px) {\n .productDetailsPaper-VsWfW {\n width: 60%;\n }\n}\n";
5884
- styleInject(css_248z$a);
5957
+ 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\n/* Responsive styles */\n@media (min-width: 900px) {\n .productDetailsPaper-VsWfW {\n width: 60%;\n }\n}\n";
5958
+ styleInject(css_248z$b);
5885
5959
 
5886
5960
  function Step3Product(_ref) {
5887
5961
  var _currentProduct$techn;
@@ -6139,22 +6213,19 @@ function CheckOut(_ref) {
6139
6213
  userHasPermission = _useDivaCore$actions.userHasPermission,
6140
6214
  toggleLoading = _useDivaCore$actions.toggleLoading,
6141
6215
  openModal = _useDivaCore$actions.openModal,
6142
- _useDivaCore$state = _useDivaCore.state,
6143
- apiConfig = _useDivaCore$state.apiConfig,
6144
- jwt = _useDivaCore$state.jwt,
6145
- organization = _useDivaCore$state.organization;
6216
+ organization = _useDivaCore.state.organization;
6146
6217
  var handleSave = useCallback(/*#__PURE__*/function () {
6147
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(openPDF, sendMail, isFav) {
6148
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
6149
- while (1) switch (_context2.prev = _context2.next) {
6218
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(openPDF, sendMail, isFav) {
6219
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
6220
+ while (1) switch (_context.prev = _context.next) {
6150
6221
  case 0:
6151
6222
  if (!(status === 'BASE_CONFIGURATION')) {
6152
- _context2.next = 17;
6223
+ _context.next = 17;
6153
6224
  break;
6154
6225
  }
6155
6226
  toggleLoading('saveProduct');
6156
- _context2.prev = 2;
6157
- _context2.next = 5;
6227
+ _context.prev = 2;
6228
+ _context.next = 5;
6158
6229
  return saveProduct(isFav);
6159
6230
  case 5:
6160
6231
  toggleLoading('saveProduct');
@@ -6164,11 +6235,11 @@ function CheckOut(_ref) {
6164
6235
  accept: true,
6165
6236
  text: t('basket.checkout.productsavedtext')
6166
6237
  });
6167
- _context2.next = 14;
6238
+ _context.next = 14;
6168
6239
  break;
6169
6240
  case 10:
6170
- _context2.prev = 10;
6171
- _context2.t0 = _context2["catch"](2);
6241
+ _context.prev = 10;
6242
+ _context.t0 = _context["catch"](2);
6172
6243
  toggleLoading('saveProduct');
6173
6244
  openModal({
6174
6245
  title: t('Error'),
@@ -6176,64 +6247,27 @@ function CheckOut(_ref) {
6176
6247
  text: t('basket.checkout.errorsavingproduct')
6177
6248
  });
6178
6249
  case 14:
6179
- _context2.prev = 14;
6180
- return _context2.abrupt("return");
6250
+ _context.prev = 14;
6251
+ return _context.abrupt("return");
6181
6252
  case 17:
6182
6253
  if (!isSaving) {
6183
6254
  setIsSaving(true);
6184
- onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
6185
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(p) {
6186
- var newRenderJob;
6187
- return _regeneratorRuntime.wrap(function _callee$(_context) {
6188
- while (1) switch (_context.prev = _context.next) {
6189
- case 0:
6190
- if (!basket3DExportChecked) {
6191
- _context.next = 4;
6192
- break;
6193
- }
6194
- newRenderJob = {
6195
- divaNr: basket.DivaNr,
6196
- organization: basket.OrganizationId,
6197
- job: '3DEXPORT',
6198
- diva3DProject: basket.Diva3DProject ? atob(basket.Diva3DProject) : undefined,
6199
- hQRenderScript: basket.OrderSets[0].HQRenderScript,
6200
- divaNrVariantId: basket.DocumentVersion,
6201
- organizationName: basket.OrganizationId_displayText,
6202
- productName: basket.SetName
6203
- };
6204
- _context.next = 4;
6205
- return apiSaveRenderJobs({
6206
- serviceUrl: apiConfig.mediaService,
6207
- jobs: [newRenderJob],
6208
- jwt: jwt
6209
- });
6210
- case 4:
6211
- setIsSaving(false);
6212
- case 5:
6213
- case "end":
6214
- return _context.stop();
6215
- }
6216
- }, _callee);
6217
- }));
6218
- return function (_x4) {
6219
- return _ref3.apply(this, arguments);
6220
- };
6221
- }())["catch"](function () {
6255
+ onClickSave(openPDF, sendMail, basket3DExportChecked)["finally"](function () {
6222
6256
  return setIsSaving(false);
6223
6257
  });
6224
6258
  }
6225
6259
  case 18:
6226
6260
  case "end":
6227
- return _context2.stop();
6261
+ return _context.stop();
6228
6262
  }
6229
- }, _callee2, null, [[2, 10, 14, 17]]);
6263
+ }, _callee, null, [[2, 10, 14, 17]]);
6230
6264
  }));
6231
6265
  return function (_x, _x2, _x3) {
6232
6266
  return _ref2.apply(this, arguments);
6233
6267
  };
6234
6268
  }(), [isSaving, onClickSave, basket3DExportChecked]);
6235
- var onChangeForm = function onChangeForm(_ref4) {
6236
- var data = _ref4.data;
6269
+ var onChangeForm = function onChangeForm(_ref3) {
6270
+ var data = _ref3.data;
6237
6271
  for (var key in data) {
6238
6272
  basket[key] = data[key];
6239
6273
  }
@@ -6850,6 +6884,7 @@ function Basket(_ref) {
6850
6884
  _useDivaCore$state = _useDivaCore.state,
6851
6885
  organization = _useDivaCore$state.organization,
6852
6886
  jwt = _useDivaCore$state.jwt,
6887
+ apiConfig = _useDivaCore$state.apiConfig,
6853
6888
  _useDivaCore$actions = _useDivaCore.actions,
6854
6889
  userHasPermission = _useDivaCore$actions.userHasPermission,
6855
6890
  openSnackBar = _useDivaCore$actions.openSnackBar;
@@ -7027,9 +7062,9 @@ function Basket(_ref) {
7027
7062
  }
7028
7063
  };
7029
7064
  var onClickSave = /*#__PURE__*/function () {
7030
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(pdf, doSendEmail) {
7065
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(pdf, doSendEmail, export3D) {
7031
7066
  var _configurationData$Ch, _configurationData$re;
7032
- var getPdf, response, _configurationData$Ch2, _ref3, pdfUrl, _configurationData$Ch3, _configurationData$Ch4, _currentBasket$Client, _opener;
7067
+ var getPdf, response, _configurationData$Ch2, _ref3, pdfUrl, newRenderJob, _configurationData$Ch3, _configurationData$Ch4, _currentBasket$Client, _opener;
7033
7068
  return _regeneratorRuntime.wrap(function _callee$(_context) {
7034
7069
  while (1) switch (_context.prev = _context.next) {
7035
7070
  case 0:
@@ -7046,83 +7081,118 @@ function Basket(_ref) {
7046
7081
  case 6:
7047
7082
  response = _context.sent;
7048
7083
  currentBasket.clearRenderData();
7049
- if (Object.values(BASKET_SAVE_ERROR).includes(response)) {
7050
- errorOnSaving(response);
7084
+ if (!Object.values(BASKET_SAVE_ERROR).includes(response)) {
7085
+ _context.next = 12;
7086
+ break;
7087
+ }
7088
+ errorOnSaving(response);
7089
+ _context.next = 29;
7090
+ break;
7091
+ case 12:
7092
+ _ref3 = response, pdfUrl = _ref3.pdfUrl;
7093
+ if (!export3D) {
7094
+ _context.next = 24;
7095
+ break;
7096
+ }
7097
+ _context.prev = 14;
7098
+ newRenderJob = {
7099
+ divaNr: currentBasket.DivaNr,
7100
+ organization: currentBasket.OrganizationId,
7101
+ job: '3DEXPORT',
7102
+ diva3DProject: currentBasket.Diva3DProject ? atob(currentBasket.Diva3DProject) : undefined,
7103
+ hQRenderScript: currentBasket.OrderSets[0].HQRenderScript,
7104
+ divaNrVariantId: currentBasket.DocumentVersion,
7105
+ organizationName: currentBasket.OrganizationId_displayText,
7106
+ separateMaterials: organization.settings.renderjobSeparateMaterials,
7107
+ productName: currentBasket.SetName
7108
+ };
7109
+ _context.next = 18;
7110
+ return apiSaveRenderJobs({
7111
+ serviceUrl: apiConfig.mediaService,
7112
+ jobs: [newRenderJob],
7113
+ jwt: jwt
7114
+ });
7115
+ case 18:
7116
+ _context.next = 24;
7117
+ break;
7118
+ case 20:
7119
+ _context.prev = 20;
7120
+ _context.t0 = _context["catch"](14);
7121
+ errorOnSaving(BASKET_SAVE_ERROR.ERROR_BASKET_AFTER_SAVE, t('modals.3dexport_unsuccessful'));
7122
+ return _context.abrupt("return");
7123
+ case 24:
7124
+ if (configurationData !== null && configurationData !== void 0 && (_configurationData$Ch2 = configurationData.Checkout) !== null && _configurationData$Ch2 !== void 0 && _configurationData$Ch2.showPdfQR) {
7125
+ openSnackBar({
7126
+ qrCode: pdfUrl,
7127
+ message: t('basket.checkout.pdfqr'),
7128
+ type: 'big',
7129
+ clickable: true,
7130
+ qrCodeSize: 312,
7131
+ 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
7132
+ });
7133
+ }
7134
+ if (doSendEmail) {
7135
+ sendEmail({
7136
+ dialogText: t('basket.modals.email.text', {
7137
+ divaNr: currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()
7138
+ }),
7139
+ content: {
7140
+ type: 'basket',
7141
+ to: ((_currentBasket$Client = currentBasket.Client) === null || _currentBasket$Client === void 0 ? void 0 : _currentBasket$Client.email) || '',
7142
+ divaNr: currentBasket.DivaNr,
7143
+ version: currentBasket.getDocumentVersion().toString(),
7144
+ language: i18n.language
7145
+ }
7146
+ });
7051
7147
  } else {
7052
- _ref3 = response, pdfUrl = _ref3.pdfUrl;
7053
- if (configurationData !== null && configurationData !== void 0 && (_configurationData$Ch2 = configurationData.Checkout) !== null && _configurationData$Ch2 !== void 0 && _configurationData$Ch2.showPdfQR) {
7054
- openSnackBar({
7055
- qrCode: pdfUrl,
7056
- message: t('basket.checkout.pdfqr'),
7057
- type: 'big',
7058
- clickable: true,
7059
- qrCodeSize: 312,
7060
- autoHideDuration: (_configurationData$Ch3 = configurationData === null || configurationData === void 0 || (_configurationData$Ch4 = configurationData.Checkout) === null || _configurationData$Ch4 === void 0 ? void 0 : _configurationData$Ch4.pdfQRAutoHideDuration) !== null && _configurationData$Ch3 !== void 0 ? _configurationData$Ch3 : 1000 * 60 * 2
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
- });
7148
+ if (returnTo == 'toAssortmentManager') {
7149
+ (_opener = opener) === null || _opener === void 0 || _opener.postMessage({
7150
+ event: 'message',
7151
+ detail: 'onLoadBasketConfiguration' + ';' + currentBasket.DivaNr
7152
+ }, '*');
7153
+ window.close();
7076
7154
  } else {
7077
- if (returnTo == 'toAssortmentManager') {
7078
- (_opener = opener) === null || _opener === void 0 || _opener.postMessage({
7079
- event: 'message',
7080
- detail: 'onLoadBasketConfiguration' + ';' + currentBasket.DivaNr
7081
- }, '*');
7082
- window.close();
7083
- } else {
7084
- openModal({
7085
- title: t('modals.saving'),
7086
- reject: false,
7087
- accept: pdf == 'open' ? t('modals.open_now') : true,
7088
- text: t('modals.saving_successful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()),
7089
- callback: function callback() {
7090
- if (pdf == 'open') {
7091
- window.open(pdfUrl, '_blank');
7092
- }
7155
+ openModal({
7156
+ title: t('modals.saving'),
7157
+ reject: false,
7158
+ accept: pdf == 'open' ? t('modals.open_now') : true,
7159
+ text: t('modals.saving_successful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()),
7160
+ callback: function callback() {
7161
+ if (pdf == 'open') {
7162
+ window.open(pdfUrl, '_blank');
7093
7163
  }
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
- */
7164
+ }
7165
+ });
7109
7166
  }
7110
- LOG$4.successTransaction('ON_SAVE_BASKET', {
7111
- divaNr: currentBasket.DivaNr,
7112
- status: currentBasket.Status,
7113
- documentVersion: currentBasket.DocumentVersion,
7114
- bv: (currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.SetPrice) / 1000
7115
- });
7116
- currentBasket.setDocumentVersion(currentBasket.getDocumentVersion() + 1);
7117
- setActBasketPage('Step1');
7167
+ /* TODO used with SM integration in divaProtal
7168
+ openModal({
7169
+ title: t('modals.saving'),
7170
+ reject: false,
7171
+ accept: true,
7172
+ text: t('modals.saving_successful').replace('%1', currentBasket.DivaNr + '-' + currentBasket.getDocumentVersion()),
7173
+ callback: () => {
7174
+ if (openPDF) {
7175
+ window.open(pdfUrl, '_blank');
7176
+ }
7177
+ },
7178
+ });
7179
+ */
7118
7180
  }
7119
- case 9:
7181
+ LOG$4.successTransaction('ON_SAVE_BASKET', {
7182
+ divaNr: currentBasket.DivaNr,
7183
+ status: currentBasket.Status,
7184
+ documentVersion: currentBasket.DocumentVersion,
7185
+ bv: (currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.SetPrice) / 1000
7186
+ });
7187
+ currentBasket.setDocumentVersion(currentBasket.getDocumentVersion() + 1);
7188
+ setActBasketPage('Step1');
7189
+ case 29:
7120
7190
  case "end":
7121
7191
  return _context.stop();
7122
7192
  }
7123
- }, _callee);
7193
+ }, _callee, null, [[14, 20]]);
7124
7194
  }));
7125
- return function onClickSave(_x, _x2) {
7195
+ return function onClickSave(_x, _x2, _x3) {
7126
7196
  return _ref2.apply(this, arguments);
7127
7197
  };
7128
7198
  }();
@@ -7173,7 +7243,7 @@ function Basket(_ref) {
7173
7243
  return _ref4.apply(this, arguments);
7174
7244
  };
7175
7245
  }();
7176
- var errorOnSaving = function errorOnSaving(type) {
7246
+ var errorOnSaving = function errorOnSaving(type, errorText) {
7177
7247
  LOG$4.errorTransaction('ON_SAVE_BASKET', 'SELLER_0003', 'Error Saving Basket', {
7178
7248
  divaNr: currentBasket.DivaNr,
7179
7249
  status: currentBasket.Status,
@@ -7184,7 +7254,7 @@ function Basket(_ref) {
7184
7254
  title: t('modals.error_saving'),
7185
7255
  reject: false,
7186
7256
  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() : '')
7257
+ 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
7258
  });
7189
7259
  };
7190
7260
  var openInfo = function openInfo() {
@@ -7233,13 +7303,7 @@ function Basket(_ref) {
7233
7303
  showProductCreator: userHasPermission('productcreator') && !(configurationData !== null && configurationData !== void 0 && configurationData.hideProductCreator),
7234
7304
  enableVKPExportButton: !currentBasket.catalogStatus || currentBasket.catalogStatus == 'LISTED' || userHasPermission('alwaysenablevkpexport')
7235
7305
  }), /*#__PURE__*/jsxs("div", {
7236
- style: {
7237
- marginLeft: 10,
7238
- paddingTop: 10,
7239
- paddingRight: 10,
7240
- height: '100%',
7241
- overflowY: 'auto'
7242
- },
7306
+ className: stepsContent,
7243
7307
  children: [actBasketPage == 'Step1' && /*#__PURE__*/jsx(Step1PriceOverview, {
7244
7308
  config: configurationData === null || configurationData === void 0 ? void 0 : configurationData.Checkout,
7245
7309
  basket: currentBasket,
@@ -7290,8 +7354,8 @@ var modelTitle = "model-title-Sgm-0";
7290
7354
  var description = "description-GyPZq";
7291
7355
  var pdf = "pdf-oNnao";
7292
7356
  var hidden = "hidden-xYPOr";
7293
- var css_248z$9 = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n height: 100%;\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\n}\n\n.title-iTDPA .MuiButtonBase-root {\n display: none;\n}\n\n.subTitle-4-0PW {\n padding: 12px 18px;\n font-size: 28px;\n}\n\n.description-container-k1vLT {\n display: flex;\n flex-direction: column;\n background-color: #f2f2f2;\n padding: 18px;\n gap: 12px;\n height: 100%;\n overflow: auto;\n}\n\n.model-title-Sgm-0 {\n font-size: 24px;\n font-weight: 600;\n}\n.description-GyPZq {\n font-size: 16px;\n overflow: auto;\n flex-grow: 3;\n scrollbar-width: thin;\n}\n\n.pdf-oNnao {\n display: 'flex';\n flex: 1 1 10px;\n}\n\n.pdf-oNnao svg {\n margin-right: 10px;\n}\n\n@media (max-width: 820px) {\n .wrapper-fSL18 {\n height: 75px;\n }\n .description-container-k1vLT {\n position: fixed;\n top: 22px;\n width: 80%;\n z-index: 101;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n margin-top: 135px;\n margin-left: -10px;\n transition: width 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n height: calc(100% - 195px);\n }\n .title-iTDPA .MuiButtonBase-root {\n display: inline-flex;\n }\n .hidden-xYPOr .description-container-k1vLT {\n padding: 0;\n width: 0;\n }\n\n .hidden-xYPOr .pdf-oNnao {\n display: none;\n }\n\n .hidden-xYPOr .model-title-Sgm-0 {\n display: none;\n }\n\n .hidden-xYPOr .description-GyPZq {\n display: none;\n }\n}\n";
7294
- styleInject(css_248z$9);
7357
+ 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";
7358
+ styleInject(css_248z$a);
7295
7359
 
7296
7360
  var _excluded$6 = ["data", "text"];
7297
7361
  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; }
@@ -7347,8 +7411,8 @@ function Description$1 (_ref) {
7347
7411
  var container = "container-Sr3pC";
7348
7412
  var iconOnly = "icon-only-2SJ6e";
7349
7413
  var icon$1 = "icon-0h-39";
7350
- var css_248z$8 = ".container-Sr3pC {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n padding: 8px;\n flex-wrap: wrap;\n}\n.container-Sr3pC .MuiButton-root {\n height: 45px;\n}\n\n.icon-only-2SJ6e span {\n margin-right: 2px;\n}\n\n.icon-0h-39 {\n width: 24px;\n height: 24px;\n}\n";
7351
- styleInject(css_248z$8);
7414
+ 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";
7415
+ styleInject(css_248z$9);
7352
7416
 
7353
7417
  function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7354
7418
  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; }
@@ -7467,19 +7531,19 @@ function NavBar (buttons) {
7467
7531
  }
7468
7532
 
7469
7533
  var layout$1 = "layout-NhUpB";
7470
- var content = "content-t8Rtl";
7534
+ var content$1 = "content-t8Rtl";
7471
7535
  var leftSide = "left-side-10jmj";
7472
7536
  var rightSide$1 = "right-side-64-Yz";
7473
7537
  var catalogImages = "catalog-images-jJGqW";
7474
7538
  var footer = "footer-1ONIt";
7475
- var css_248z$7 = ".layout-NhUpB {\n display: flex;\n height: 100%;\n flex-direction: column;\n}\n\n.content-t8Rtl {\n display: flex;\n flex: 1;\n overflow: auto;\n}\n\n.left-side-10jmj {\n width: 25%;\n min-width: 300px;\n}\n\n.right-side-64-Yz {\n display: flex;\n flex-direction: column;\n position: relative;\n flex: 1;\n overflow: auto;\n justify-content: flex-end;\n}\n\n.catalog-images-jJGqW {\n flex: 1;\n padding: 12px;\n}\n\n.footer-1ONIt {\n display: flex;\n justify-content: flex-end;\n}\n\n@media (max-width: 820px) {\n .content-t8Rtl {\n flex-direction: column;\n }\n}\n";
7476
- styleInject(css_248z$7);
7539
+ 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";
7540
+ styleInject(css_248z$8);
7477
7541
 
7478
7542
  var wrapper$5 = "wrapper-D5Cmc";
7479
7543
  var thumbs = "thumbs-cWKAj";
7480
7544
  var mainSlider = "mainSlider-S8opH";
7481
- var css_248z$6 = ".wrapper-D5Cmc {\n display: flex;\n position: relative;\n gap: 12px;\n overflow: auto;\n}\n\n.thumbs-cWKAj .swiper-slide {\n opacity: 0.4;\n}\n\n.thumbs-cWKAj .swiper-slide-thumb-active {\n opacity: 1;\n}\n\n.mainSlider-S8opH .swiper-pagination-bullet-active {\n background-color: var(--diva-theme-palette-primary-main) !important;\n}\n\n.mainSlider-S8opH .swiper-pagination-bullet-active { /* Active bullet color */\n}\n\n@media (max-width: 820px) {\n .thumbs-cWKAj {\n display: none;\n }\n}\n";
7482
- styleInject(css_248z$6);
7545
+ 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";
7546
+ styleInject(css_248z$7);
7483
7547
 
7484
7548
  var _excluded$5 = ["data"];
7485
7549
  var CatalogImages = function CatalogImages(_ref) {
@@ -7567,14 +7631,14 @@ var wrapper$4 = "wrapper-3d2zl";
7567
7631
  var fullHeight = "full-height-CQ8Cy";
7568
7632
  var tabBar = "tab-bar-lQQ28";
7569
7633
  var nothingFound = "nothing-found-0eqZ5";
7570
- var css_248z$5 = ".wrapper-3d2zl {\n max-height: 50%;\n overflow: hidden;\n}\n\n.wrapper-3d2zl.MuiAccordion-root.Mui-expanded {\n height: 50%;\n}\n\n.wrapper-3d2zl.full-height-CQ8Cy {\n max-height: 100%;\n}\n\n.wrapper-3d2zl.full-height-CQ8Cy.MuiAccordion-root.Mui-expanded {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-expanded {\n min-height: 0;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-root.Mui-focused {\n background-color: #fff8f8;\n}\n\n.wrapper-3d2zl .MuiAccordionSummary-content {\n justify-content: space-between;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiTabs-root {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n height: calc(100% - 46px) !important;\n}\n\n.wrapper-3d2zl .MuiCollapse-root {\n scrollbar-width: thin;\n overflow-y: scroll;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapper {\n display: none;\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root.MuiCollapse-entered .MuiCollapse-wrapper {\n display: flex;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiCollapse-root .MuiCollapse-wrapperInner > div {\n height: 100%;\n}\n\n.wrapper-3d2zl .MuiAccordionDetails-root {\n height: calc(100% - 24px);\n width: calc(100% - 32px);\n}\n\n.tab-bar-lQQ28 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: #f8f8f8;\n height: 46px;\n}\n\n.nothing-found-0eqZ5 {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n flex-direction: column;\n gap: 15px;\n margin: auto;\n}\n";
7571
- styleInject(css_248z$5);
7634
+ 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";
7635
+ styleInject(css_248z$6);
7572
7636
 
7573
7637
  var wrapper$3 = "wrapper-i9mNn";
7574
7638
  var searchText = "search-text-grXdY";
7575
7639
  var icon = "icon-ydD53";
7576
- var css_248z$4 = ".wrapper-i9mNn {\n display: flex;\n height: 36px;\n align-items: center;\n background-color: #fefefe;\n margin: 6px 0;\n border-radius: 5px;\n}\n\n.search-text-grXdY {\n padding: 8px 8px 8px 0px;\n transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);\n width: 130px;\n}\n\n.search-text-grXdY.Mui-focused {\n width: 200px;\n}\n\n.search-text-grXdY .MuiInputBase-input {\n padding-left: 36px;\n}\n\n.icon-ydD53 {\n width: 36px;\n height: 36px;\n background: center / contain no-repeat url(\"data:image/svg+xml,%3Csvg width%3D%2259%22 height%3D%2259%22 viewBox%3D%220 0 59 59%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M39.9163 41.38C40.3208 41.7844 40.9765 41.7844 41.3809 41.38C41.7854 40.9755 41.7854 40.3198 41.3809 39.9153L39.9163 41.38ZM36.851 27.5286C36.851 32.6767 32.6776 36.85 27.5296 36.85V38.9215C33.8216 38.9215 38.9224 33.8206 38.9224 27.5286H36.851ZM27.5296 36.85C22.3815 36.85 18.2081 32.6767 18.2081 27.5286H16.1367C16.1367 33.8206 21.2375 38.9215 27.5296 38.9215V36.85ZM18.2081 27.5286C18.2081 22.3805 22.3815 18.2072 27.5296 18.2072V16.1357C21.2375 16.1357 16.1367 21.2365 16.1367 27.5286H18.2081ZM27.5296 18.2072C32.6776 18.2072 36.851 22.3805 36.851 27.5286H38.9224C38.9224 21.2365 33.8216 16.1357 27.5296 16.1357V18.2072ZM41.3809 39.9153L35.5982 34.1325L34.1334 35.5972L39.9163 41.38L41.3809 39.9153Z%22 fill%3D%22%234F4F4F%22%2F%3E%3C%2Fsvg%3E\");\n position: absolute;\n pointer-events: none;\n}\n";
7577
- styleInject(css_248z$4);
7640
+ 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";
7641
+ styleInject(css_248z$5);
7578
7642
 
7579
7643
  var Search = function Search(_ref) {
7580
7644
  var searchValue = _ref.searchValue,
@@ -7993,7 +8057,7 @@ function Info(props) {
7993
8057
  children: !loading && /*#__PURE__*/jsxs("div", {
7994
8058
  className: layout$1,
7995
8059
  children: [/*#__PURE__*/jsxs("div", {
7996
- className: content,
8060
+ className: content$1,
7997
8061
  children: [/*#__PURE__*/jsx(Description$1, {
7998
8062
  data: catalogData,
7999
8063
  className: leftSide,
@@ -8933,14 +8997,16 @@ var typeDropDown = "typeDropDown-A1ExF";
8933
8997
  var objectListWrapper = "objectListWrapper-141eT";
8934
8998
  var inputValueElement = "inputValueElement-XljUd";
8935
8999
  var inputValueElementItem = "inputValueElementItem-s6dG0";
8936
- var css_248z$3 = ".wrapper-D74am {\n display: flex;\n grid-gap: 25px;\n margin-bottom: 10px;\n align-items: top;\n width: 100%;\n}\n.typeDropDown-A1ExF {\n min-width: 10%;\n max-height: 48px;\n}\n\n.objectListWrapper-141eT {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.inputValueElement-XljUd {\n width: 100%;\n}\n.inputValueElementItem-s6dG0 {\n display: flex;\n align-items: center;\n margin-bottom: 8px;\n gap: 10px; /* Use 'gap' instead of 'grid-gap' for flex containers */\n}\n";
8937
- styleInject(css_248z$3);
9000
+ 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";
9001
+ styleInject(css_248z$4);
8938
9002
 
8939
9003
  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
9004
  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
9005
  var CustomDataFields = function CustomDataFields(_ref) {
8942
9006
  var productData = _ref.productData,
8943
- update = _ref.update;
9007
+ update = _ref.update,
9008
+ manualCustomDataFields = _ref.manualCustomDataFields,
9009
+ classificationFields = _ref.classificationFields;
8944
9010
  var _useTranslation = useTranslation(),
8945
9011
  t = _useTranslation.t;
8946
9012
  var _useState = useState([{
@@ -8951,6 +9017,10 @@ var CustomDataFields = function CustomDataFields(_ref) {
8951
9017
  _useState2 = _slicedToArray(_useState, 2),
8952
9018
  pairs = _useState2[0],
8953
9019
  setPairs = _useState2[1];
9020
+ var _useState3 = useState(manualCustomDataFields !== null && manualCustomDataFields !== void 0 ? manualCustomDataFields : []),
9021
+ _useState4 = _slicedToArray(_useState3, 2),
9022
+ customFieldKeys = _useState4[0];
9023
+ _useState4[1];
8954
9024
  useEffect(function () {
8955
9025
  var manualCustomData = Object.entries(productData.customData);
8956
9026
  var filteredData = [];
@@ -8965,21 +9035,28 @@ var CustomDataFields = function CustomDataFields(_ref) {
8965
9035
  }
8966
9036
  manualCustomData = filteredData;
8967
9037
  var manualPairs = [];
8968
- for (var _i = 0; _i < manualCustomData.length; _i++) {
9038
+ var _loop = function _loop() {
8969
9039
  var _manualCustomData$_i = _slicedToArray(manualCustomData[_i], 2),
8970
- _key = _manualCustomData$_i[0],
8971
- _valueObj = _manualCustomData$_i[1];
9040
+ key = _manualCustomData$_i[0],
9041
+ valueObj = _manualCustomData$_i[1];
8972
9042
  var type = 'TEXT';
8973
- if (Array.isArray(_valueObj.value) && _typeof(_valueObj.value[0]) === 'object') {
9043
+ if (Array.isArray(valueObj.value) && _typeof(valueObj.value[0]) === 'object') {
8974
9044
  type = 'OBJECTLIST';
8975
- } else if (Array.isArray(_valueObj.value)) {
9045
+ } else if (classificationFields && classificationFields.find(function (field) {
9046
+ return field.field === valueObj.value;
9047
+ })) {
9048
+ type = 'CLASS';
9049
+ } else if (Array.isArray(valueObj.value)) {
8976
9050
  type = 'LIST';
8977
9051
  }
8978
9052
  manualPairs.push({
8979
- key: _key,
9053
+ key: key,
8980
9054
  type: type,
8981
- value: _valueObj.value
9055
+ value: valueObj.value
8982
9056
  });
9057
+ };
9058
+ for (var _i = 0; _i < manualCustomData.length; _i++) {
9059
+ _loop();
8983
9060
  }
8984
9061
  setPairs(manualPairs);
8985
9062
  }, [productData]);
@@ -9140,7 +9217,7 @@ var CustomDataFields = function CustomDataFields(_ref) {
9140
9217
  }));
9141
9218
  setPairs(actPairs);
9142
9219
  };
9143
- var handleListBoxChange = function handleListBoxChange(index, value) {
9220
+ var handleListBoxTypeChange = function handleListBoxTypeChange(index, value) {
9144
9221
  var actPairs = _toConsumableArray(pairs);
9145
9222
  actPairs[index].type = value;
9146
9223
  if (value === 'TEXT') {
@@ -9151,9 +9228,22 @@ var CustomDataFields = function CustomDataFields(_ref) {
9151
9228
  actPairs[index].value = [{
9152
9229
  '': ''
9153
9230
  }];
9231
+ } else if (value === 'CLASS') {
9232
+ actPairs[index].value = '';
9154
9233
  }
9155
9234
  setPairs(actPairs);
9156
9235
  };
9236
+ var handleListBoxValueChange = function handleListBoxValueChange(index, value) {
9237
+ var actPairs = _toConsumableArray(pairs);
9238
+ actPairs[index].value = value;
9239
+ update(_objectSpread$b(_objectSpread$b({}, productData), {}, {
9240
+ customData: _objectSpread$b(_objectSpread$b({}, productData.customData), {}, _defineProperty({}, actPairs[index].key, {
9241
+ value: actPairs[index].value,
9242
+ manual: true
9243
+ }))
9244
+ }));
9245
+ setPairs(actPairs);
9246
+ };
9157
9247
  return /*#__PURE__*/jsxs(Card$1, {
9158
9248
  style: {
9159
9249
  marginBottom: '10px'
@@ -9165,19 +9255,31 @@ var CustomDataFields = function CustomDataFields(_ref) {
9165
9255
  children: [pairs.map(function (pair, index) {
9166
9256
  return /*#__PURE__*/jsxs(Box$1, {
9167
9257
  className: wrapper$2,
9168
- children: [/*#__PURE__*/jsx(TextField, {
9258
+ children: [/*#__PURE__*/jsx(Autocomplete$2, {
9259
+ freeSolo: true,
9169
9260
  style: {
9170
- maxWidth: '10%'
9261
+ width: '20%'
9262
+ },
9263
+ options: customFieldKeys !== null && customFieldKeys !== void 0 ? customFieldKeys : [],
9264
+ getOptionDisabled: function getOptionDisabled(option) {
9265
+ return pairs.map(function (pair) {
9266
+ return pair.key;
9267
+ }).includes(option);
9171
9268
  },
9172
- label: t('fieldname'),
9173
9269
  value: pair.key,
9174
- onChange: function onChange(e) {
9175
- return handleChange(index, 'key', e.target.value);
9270
+ onBlur: function onBlur(e) {
9271
+ var inputValue = e.target.value;
9272
+ handleChange(index, 'key', inputValue);
9273
+ },
9274
+ renderInput: function renderInput(params) {
9275
+ return /*#__PURE__*/jsx(TextField, _objectSpread$b(_objectSpread$b({}, params), {}, {
9276
+ label: t('productcreator.customfields.keylabel')
9277
+ }));
9176
9278
  }
9177
9279
  }), /*#__PURE__*/jsxs(Select$1, {
9178
9280
  value: pair.type,
9179
9281
  onChange: function onChange(e) {
9180
- return handleListBoxChange(index, e.target.value);
9282
+ return handleListBoxTypeChange(index, e.target.value);
9181
9283
  },
9182
9284
  className: typeDropDown,
9183
9285
  displayEmpty: true,
@@ -9190,6 +9292,9 @@ var CustomDataFields = function CustomDataFields(_ref) {
9190
9292
  }), /*#__PURE__*/jsx(MenuItem$1, {
9191
9293
  value: "OBJECTLIST",
9192
9294
  children: t('objectlist')
9295
+ }), /*#__PURE__*/jsx(MenuItem$1, {
9296
+ value: "CLASS",
9297
+ children: t('class')
9193
9298
  })]
9194
9299
  }), pair.type === 'TEXT' && /*#__PURE__*/jsx(TextField, {
9195
9300
  label: t('value'),
@@ -9320,6 +9425,19 @@ var CustomDataFields = function CustomDataFields(_ref) {
9320
9425
  children: t('addentry')
9321
9426
  })]
9322
9427
  })
9428
+ }), pair.type === 'CLASS' && /*#__PURE__*/jsx(Select$1, {
9429
+ className: inputValueElement,
9430
+ value: pair.value,
9431
+ onChange: function onChange(e) {
9432
+ return handleListBoxValueChange(index, e.target.value);
9433
+ },
9434
+ displayEmpty: true,
9435
+ children: classificationFields === null || classificationFields === void 0 ? void 0 : classificationFields.map(function (field, i) {
9436
+ return /*#__PURE__*/jsx(MenuItem$1, {
9437
+ value: field.field,
9438
+ children: field.title ? t(field.title) : field.field
9439
+ }, i);
9440
+ })
9323
9441
  }), /*#__PURE__*/jsx(IconButton$1, {
9324
9442
  onClick: function onClick() {
9325
9443
  return handleRemovePair(index);
@@ -9349,7 +9467,9 @@ var CustomDataFields = function CustomDataFields(_ref) {
9349
9467
  function BaseDataFormInfo (_ref) {
9350
9468
  var productData = _ref.productData,
9351
9469
  additionalBaseFields = _ref.additionalBaseFields,
9352
- _update = _ref.update;
9470
+ _update = _ref.update,
9471
+ manualCustomDataFields = _ref.manualCustomDataFields,
9472
+ classificationFields = _ref.classificationFields;
9353
9473
  return /*#__PURE__*/jsxs(Fragment, {
9354
9474
  children: [/*#__PURE__*/jsx(TranslationWrapper, {
9355
9475
  title: 'productcreator.basedata.baseinfo',
@@ -9386,7 +9506,9 @@ function BaseDataFormInfo (_ref) {
9386
9506
  productData: productData,
9387
9507
  update: function update(d) {
9388
9508
  return _update(d || productData);
9389
- }
9509
+ },
9510
+ manualCustomDataFields: manualCustomDataFields,
9511
+ classificationFields: classificationFields
9390
9512
  })]
9391
9513
  });
9392
9514
  }
@@ -9552,7 +9674,9 @@ function BaseDataForm (_ref) {
9552
9674
  additionalBaseFields = _ref.additionalBaseFields,
9553
9675
  configurationData = _ref.configurationData,
9554
9676
  customFormData = _ref.customFormData,
9555
- hasVariants = _ref.hasVariants;
9677
+ hasVariants = _ref.hasVariants,
9678
+ manualCustomDataFields = _ref.manualCustomDataFields,
9679
+ classificationFields = _ref.classificationFields;
9556
9680
  var _useTranslation = useTranslation(),
9557
9681
  t = _useTranslation.t;
9558
9682
  return /*#__PURE__*/jsxs(Fragment, {
@@ -9608,7 +9732,9 @@ function BaseDataForm (_ref) {
9608
9732
  }), /*#__PURE__*/jsx(BaseDataFormInfo, {
9609
9733
  productData: productData,
9610
9734
  update: update,
9611
- additionalBaseFields: additionalBaseFields
9735
+ additionalBaseFields: additionalBaseFields,
9736
+ manualCustomDataFields: manualCustomDataFields,
9737
+ classificationFields: classificationFields
9612
9738
  }), !!(configurationData !== null && configurationData !== void 0 && (_configurationData$fi = configurationData.fields) !== null && _configurationData$fi !== void 0 && _configurationData$fi.delivery) && /*#__PURE__*/jsx(BaseDataFormDeliveryInfo, {
9613
9739
  productData: productData,
9614
9740
  update: update,
@@ -10256,7 +10382,7 @@ function VariantTable (_ref) {
10256
10382
  style: {
10257
10383
  width: '100%',
10258
10384
  height: '100%',
10259
- overflow: 'hidden'
10385
+ display: 'flex'
10260
10386
  },
10261
10387
  children: /*#__PURE__*/jsx(Grid, {
10262
10388
  options: options,
@@ -10329,8 +10455,8 @@ function _preUpdateData(field, value, row) {
10329
10455
 
10330
10456
  var wrapper$1 = "wrapper-I8eY4";
10331
10457
  var dataTable = "data-table-ImAxQ";
10332
- var css_248z$2 = ".wrapper-I8eY4 {\n display: flex;\n height: calc(100% - 67px);\n border-bottom: 1px solid rgb(224, 224, 224);\n}\n\n.data-table-ImAxQ {\n position: relative;\n height: 100%;\n flex-grow: 1;\n overflow: hidden;\n}\n";
10333
- styleInject(css_248z$2);
10458
+ 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";
10459
+ styleInject(css_248z$3);
10334
10460
 
10335
10461
  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
10462
  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; }
@@ -11770,15 +11896,26 @@ function updateVariants(prevState, currentState, configurationData, baseDataFiel
11770
11896
  _modified = _ProductHandler$calcu.modified;
11771
11897
  finalVariant[field] = _value;
11772
11898
  newModified[field] = _modified;
11899
+ } else if (field.includes('customFlags')) {
11900
+ var path = field.split('.');
11901
+ var prevValue = getData(path, variant);
11902
+ var newValue = getData(path, newVariant);
11903
+ if (prevValue !== newValue) {
11904
+ if (newValue === true || newValue !== null && newValue !== void 0 && newValue.length) {
11905
+ setData(path, [variant.organizationId], finalVariant);
11906
+ } else {
11907
+ setData(path, [], finalVariant);
11908
+ }
11909
+ }
11773
11910
  } else if (field.includes('.')) {
11774
11911
  var _currentState$modifie2;
11775
11912
  //handle nested fields
11776
11913
 
11777
- var path = field.split('.');
11778
- var _ProductHandler$calcu2 = ProductHandler.calculateComputedValue(getData(path, variant), newVariant ? getData(path, newVariant) : undefined, getData(path, currentState.baseData), (_currentState$modifie2 = currentState.modified.variantData[_i]) === null || _currentState$modifie2 === void 0 ? void 0 : _currentState$modifie2[field]),
11914
+ var _path = field.split('.');
11915
+ 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
11916
  _value2 = _ProductHandler$calcu2.value,
11780
11917
  _modified2 = _ProductHandler$calcu2.modified;
11781
- setData(path, _value2, finalVariant);
11918
+ setData(_path, _value2, finalVariant);
11782
11919
  finalVariant.media = variant.media;
11783
11920
  newModified[field] = _modified2;
11784
11921
  } else if (custom) {
@@ -12456,6 +12593,13 @@ function intersection() {
12456
12593
  });
12457
12594
  }
12458
12595
 
12596
+ var main = "main-ERs2i";
12597
+ var content = "content-KMewq";
12598
+ var tabContent = "tab-content-nIlnM";
12599
+ var renderjob = "renderjob-Yt11W";
12600
+ 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";
12601
+ styleInject(css_248z$2);
12602
+
12459
12603
  function ProductCreator (_ref) {
12460
12604
  var _state$variantData, _state$variantData2, _state$variantData$fi, _state$variantData3, _state$baseData$custo2, _currentBasket$DivaNr, _currentBasket$OrderS;
12461
12605
  var basket = _ref.basket,
@@ -12467,10 +12611,12 @@ function ProductCreator (_ref) {
12467
12611
  openModal = _useSellerState$actio.openModal,
12468
12612
  toggleLoading = _useSellerState$actio.toggleLoading,
12469
12613
  clearOriginProductId = _useSellerState$actio.clearOriginProductId,
12614
+ loadManualCustomDataFields = _useSellerState$actio.loadManualCustomDataFields,
12470
12615
  _useSellerState$state = _useSellerState.state,
12471
12616
  configurationData = _useSellerState$state.configurationData,
12472
12617
  returnTo = _useSellerState$state.returnTo,
12473
- originProductId = _useSellerState$state.originProductId;
12618
+ originProductId = _useSellerState$state.originProductId,
12619
+ manualCustomDataFields = _useSellerState$state.manualCustomDataFields;
12474
12620
  var _useDivaCore = useDivaCore(),
12475
12621
  userHasPermission = _useDivaCore.actions.userHasPermission;
12476
12622
  var _useTranslation = useTranslation(),
@@ -12592,6 +12738,9 @@ function ProductCreator (_ref) {
12592
12738
  //reset selection if new data is loaded
12593
12739
  setSelectedFields((_state$initialSelecte = state === null || state === void 0 ? void 0 : state.initialSelectedFields) !== null && _state$initialSelecte !== void 0 ? _state$initialSelecte : []);
12594
12740
  }, [state === null || state === void 0 ? void 0 : state.initialSelectedFields]);
12741
+ useEffect(function () {
12742
+ loadManualCustomDataFields();
12743
+ }, []);
12595
12744
  var onOpenPlanner = function onOpenPlanner() {
12596
12745
  var basketToInit = new BasketData(state === null || state === void 0 ? void 0 : state.baseData.configuration);
12597
12746
  basketToInit.OrderSets[0].TinyVariantConfiguration = state === null || state === void 0 ? void 0 : state.variantData.map(function (v) {
@@ -12803,24 +12952,11 @@ function ProductCreator (_ref) {
12803
12952
  onCancel: onCancel
12804
12953
  });
12805
12954
  return /*#__PURE__*/jsxs("div", {
12806
- style: {
12807
- display: 'flex',
12808
- overflow: 'hidden',
12809
- width: '100%',
12810
- flexDirection: 'column',
12811
- height: '100%'
12812
- },
12955
+ className: main,
12813
12956
  children: [/*#__PURE__*/jsx(Title, {
12814
12957
  text: "".concat(t('productcreator.title'), " - ").concat((_currentBasket$DivaNr = currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.DivaNr) !== null && _currentBasket$DivaNr !== void 0 ? _currentBasket$DivaNr : state.baseData.divaNr)
12815
12958
  }), /*#__PURE__*/jsxs("div", {
12816
- style: {
12817
- position: 'relative',
12818
- width: '100%',
12819
- overflow: 'hidden',
12820
- flex: 1,
12821
- display: 'flex',
12822
- flexDirection: 'column'
12823
- },
12959
+ className: content,
12824
12960
  children: [/*#__PURE__*/jsx(Paper, {
12825
12961
  style: {
12826
12962
  marginBottom: 1
@@ -12876,12 +13012,7 @@ function ProductCreator (_ref) {
12876
13012
  },
12877
13013
  children: t(warn)
12878
13014
  }), /*#__PURE__*/jsxs("div", {
12879
- style: {
12880
- display: 'flex',
12881
- overflow: 'hidden',
12882
- flexDirection: 'column',
12883
- flex: 1
12884
- },
13015
+ className: tabContent,
12885
13016
  children: [tab == 'AFFILIATE' && /*#__PURE__*/jsx(AffiliateTable, {
12886
13017
  variantData: validVariantData,
12887
13018
  baseData: state.baseData,
@@ -12890,11 +13021,7 @@ function ProductCreator (_ref) {
12890
13021
  affiliateData: affiliates,
12891
13022
  children: ButtonsElement
12892
13023
  }), tab == 'RENDERJOB' && /*#__PURE__*/jsx("div", {
12893
- style: {
12894
- display: 'flex',
12895
- flex: 1,
12896
- margin: 10
12897
- },
13024
+ className: renderjob,
12898
13025
  children: /*#__PURE__*/jsx(OrderEntry, {
12899
13026
  variantData: validVariantData,
12900
13027
  baseData: state.baseData,
@@ -12946,6 +13073,8 @@ function ProductCreator (_ref) {
12946
13073
  additionalBaseFields: additional,
12947
13074
  customFormData: customFormData,
12948
13075
  hasVariants: showVarinats,
13076
+ manualCustomDataFields: manualCustomDataFields,
13077
+ classificationFields: state === null || state === void 0 ? void 0 : state.classificationFields,
12949
13078
  children: ButtonsElement
12950
13079
  }), tab == 'BASECONFIG' && /*#__PURE__*/jsx(VariantTable, {
12951
13080
  update: updateVariants,