@crystaldesign/diva-seller 25.1.0-beta.3 → 25.1.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.
@@ -6084,21 +6084,35 @@ function CheckOut(_ref) {
6084
6084
  while (1) switch (_context2.prev = _context2.next) {
6085
6085
  case 0:
6086
6086
  if (!(status === 'BASE_CONFIGURATION')) {
6087
- _context2.next = 7;
6087
+ _context2.next = 16;
6088
6088
  break;
6089
6089
  }
6090
6090
  toggleLoading('saveProduct');
6091
- _context2.next = 4;
6091
+ _context2.prev = 2;
6092
+ _context2.next = 5;
6092
6093
  return saveProduct(isFav);
6093
- case 4:
6094
+ case 5:
6094
6095
  toggleLoading('saveProduct');
6095
6096
  openModal({
6096
6097
  title: t('basket.checkout.productsavedtitle'),
6097
6098
  accept: true,
6098
6099
  text: t('basket.checkout.productsavedtext')
6099
6100
  });
6101
+ _context2.next = 13;
6102
+ break;
6103
+ case 9:
6104
+ _context2.prev = 9;
6105
+ _context2.t0 = _context2["catch"](2);
6106
+ toggleLoading('saveProduct');
6107
+ openModal({
6108
+ title: t('Error'),
6109
+ accept: true,
6110
+ text: t('basket.checkout.errorsavingproduct')
6111
+ });
6112
+ case 13:
6113
+ _context2.prev = 13;
6100
6114
  return _context2.abrupt("return");
6101
- case 7:
6115
+ case 16:
6102
6116
  if (!isSaving) {
6103
6117
  setIsSaving(true);
6104
6118
  onClickSave(openPDF, sendMail).then(/*#__PURE__*/function () {
@@ -6116,7 +6130,10 @@ function CheckOut(_ref) {
6116
6130
  organization: basket.OrganizationId,
6117
6131
  job: '3DEXPORT',
6118
6132
  diva3DProject: basket.Diva3DProject ? atob(basket.Diva3DProject) : undefined,
6119
- hQRenderScript: basket.OrderSets[0].HQRenderScript
6133
+ hQRenderScript: basket.OrderSets[0].HQRenderScript,
6134
+ divaNrVariantId: basket.DocumentVersion,
6135
+ organizationName: basket.OrganizationId_displayText,
6136
+ productName: basket.SetName
6120
6137
  };
6121
6138
  _context.next = 4;
6122
6139
  return apiSaveRenderJobs({
@@ -6139,11 +6156,11 @@ function CheckOut(_ref) {
6139
6156
  return setIsSaving(false);
6140
6157
  });
6141
6158
  }
6142
- case 8:
6159
+ case 17:
6143
6160
  case "end":
6144
6161
  return _context2.stop();
6145
6162
  }
6146
- }, _callee2);
6163
+ }, _callee2, null, [[2, 9, 13, 16]]);
6147
6164
  }));
6148
6165
  return function (_x, _x2, _x3) {
6149
6166
  return _ref2.apply(this, arguments);
@@ -6686,8 +6703,7 @@ function useProduct(basket) {
6686
6703
  }();
6687
6704
  var saveProduct = /*#__PURE__*/function () {
6688
6705
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(favourite) {
6689
- var _myproduct$0$parent;
6690
- var myproduct;
6706
+ var _myproduct$0$parent, myproduct;
6691
6707
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
6692
6708
  while (1) switch (_context3.prev = _context3.next) {
6693
6709
  case 0:
@@ -6697,28 +6713,35 @@ function useProduct(basket) {
6697
6713
  }
6698
6714
  return _context3.abrupt("return");
6699
6715
  case 2:
6700
- _context3.next = 4;
6716
+ _context3.prev = 2;
6717
+ _context3.next = 5;
6701
6718
  return productHandler.saveProducts({
6702
6719
  products: [currentProduct]
6703
6720
  });
6704
- case 4:
6721
+ case 5:
6705
6722
  myproduct = _context3.sent;
6706
6723
  setCurrentProduct(_objectSpread$q(_objectSpread$q({}, myproduct[0]), {}, {
6707
6724
  parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
6708
6725
  }));
6709
6726
  if (!favourite) {
6710
- _context3.next = 9;
6727
+ _context3.next = 10;
6711
6728
  break;
6712
6729
  }
6713
- _context3.next = 9;
6730
+ _context3.next = 10;
6714
6731
  return productHandler.apiMarkAsFavorite(currentProduct._id, currentProduct.organizationId);
6715
- case 9:
6716
- setProductSaved(true);
6717
6732
  case 10:
6733
+ setProductSaved(true);
6734
+ _context3.next = 16;
6735
+ break;
6736
+ case 13:
6737
+ _context3.prev = 13;
6738
+ _context3.t0 = _context3["catch"](2);
6739
+ throw new Error('Error saving product');
6740
+ case 16:
6718
6741
  case "end":
6719
6742
  return _context3.stop();
6720
6743
  }
6721
- }, _callee3);
6744
+ }, _callee3, null, [[2, 13]]);
6722
6745
  }));
6723
6746
  return function saveProduct(_x2) {
6724
6747
  return _ref3.apply(this, arguments);
@@ -12715,7 +12738,9 @@ function ProductCreator (_ref) {
12715
12738
  position: 'relative',
12716
12739
  width: '100%',
12717
12740
  overflow: 'hidden',
12718
- flex: 1
12741
+ flex: 1,
12742
+ display: 'flex',
12743
+ flexDirection: 'column'
12719
12744
  },
12720
12745
  children: [/*#__PURE__*/jsx(Paper, {
12721
12746
  style: {
@@ -12775,9 +12800,8 @@ function ProductCreator (_ref) {
12775
12800
  style: {
12776
12801
  display: 'flex',
12777
12802
  overflow: 'hidden',
12778
- width: '100%',
12779
12803
  flexDirection: 'column',
12780
- height: "calc(100% - 50px".concat(error ? ' - 47px' : '').concat(warn ? ' - 47px' : '', ")")
12804
+ flex: 1
12781
12805
  },
12782
12806
  children: [tab == 'AFFILIATE' && /*#__PURE__*/jsx(AffiliateTable, {
12783
12807
  variantData: validVariantData,
@@ -12786,13 +12810,20 @@ function ProductCreator (_ref) {
12786
12810
  updateBaseData: updateBaseData,
12787
12811
  affiliateData: affiliates,
12788
12812
  children: ButtonsElement
12789
- }), tab == 'RENDERJOB' && /*#__PURE__*/jsx(OrderEntry, {
12790
- variantData: validVariantData,
12791
- baseData: state.baseData,
12792
- basketData: currentBasket,
12793
- onSave: save,
12794
- saved: !isNew,
12795
- onError: setError
12813
+ }), tab == 'RENDERJOB' && /*#__PURE__*/jsx("div", {
12814
+ style: {
12815
+ display: 'flex',
12816
+ flex: 1,
12817
+ margin: 10
12818
+ },
12819
+ children: /*#__PURE__*/jsx(OrderEntry, {
12820
+ variantData: validVariantData,
12821
+ baseData: state.baseData,
12822
+ basketData: currentBasket,
12823
+ onSave: save,
12824
+ saved: !isNew,
12825
+ onError: setError
12826
+ })
12796
12827
  }), tab == 'MEDIA' && /*#__PURE__*/jsx(MediaTable, {
12797
12828
  variantData: validVariantData,
12798
12829
  baseData: state.baseData,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ProductCreator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKtD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,qBAqajD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ProductCreator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKtD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,qBAsajD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/provider/hooks/useProduct.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEhF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,CAAC,EAAE,UAAU;;8BA2Bb,OAAO;;iCAWV,WAAW;EAKhD"}
1
+ {"version":3,"file":"useProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/provider/hooks/useProduct.ts"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AE,WAAW,CAAC;IAC7B,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,iBAAiB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACnD;AACD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,MAAM,EACN,QAAQ,EACR,aAAa,EACb,MAAM,EACN,MAAM,EACN,oBAAoB,EACpB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,IAAI,GACL,EAAE,KAAK,qBAwIP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-seller",
3
- "version": "25.1.0-beta.3",
3
+ "version": "25.1.0-beta.30",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -29,9 +29,9 @@
29
29
  "react-dom": "^18.3.1"
30
30
  },
31
31
  "dependencies": {
32
- "@crystaldesign/analytics": "25.1.0-beta.3",
33
- "@crystaldesign/products-component": "25.1.0-beta.3",
34
- "@crystaldesign/real-time-viewer": "25.1.0-beta.3",
32
+ "@crystaldesign/analytics": "25.1.0-beta.30",
33
+ "@crystaldesign/products-component": "25.1.0-beta.30",
34
+ "@crystaldesign/real-time-viewer": "25.1.0-beta.30",
35
35
  "@emotion/react": "^11.4.1",
36
36
  "@emotion/styled": "^11.3.0",
37
37
  "@mui/icons-material": "^6.1.5",
@@ -43,5 +43,5 @@
43
43
  },
44
44
  "types": "./build/types/seller/src/index.d.ts",
45
45
  "module": "build/esm/index.js",
46
- "gitHead": "fbf1ef780692f644a2d3a29ae58eb3b28349bdc8"
46
+ "gitHead": "ca34bcb415e552de31f9acdcdd8375dd69f69bf8"
47
47
  }