@crystaldesign/diva-seller 25.1.0-beta.2 → 25.1.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/esm/index.js
CHANGED
|
@@ -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 =
|
|
6087
|
+
_context2.next = 16;
|
|
6088
6088
|
break;
|
|
6089
6089
|
}
|
|
6090
6090
|
toggleLoading('saveProduct');
|
|
6091
|
-
_context2.
|
|
6091
|
+
_context2.prev = 2;
|
|
6092
|
+
_context2.next = 5;
|
|
6092
6093
|
return saveProduct(isFav);
|
|
6093
|
-
case
|
|
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
|
|
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
|
|
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.
|
|
6716
|
+
_context3.prev = 2;
|
|
6717
|
+
_context3.next = 5;
|
|
6701
6718
|
return productHandler.saveProducts({
|
|
6702
6719
|
products: [currentProduct]
|
|
6703
6720
|
});
|
|
6704
|
-
case
|
|
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 =
|
|
6727
|
+
_context3.next = 10;
|
|
6711
6728
|
break;
|
|
6712
6729
|
}
|
|
6713
|
-
_context3.next =
|
|
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);
|
|
@@ -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;;
|
|
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;;iCAgBV,WAAW;EAKhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/Basket/CheckOut/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,WAAW,EAA+B,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO1E,UAAU,KAAK;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IACxC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,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E,QAAQ,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,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
|
+
"version": "25.1.0-beta.20",
|
|
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.
|
|
33
|
-
"@crystaldesign/products-component": "25.1.0-beta.
|
|
34
|
-
"@crystaldesign/real-time-viewer": "25.1.0-beta.
|
|
32
|
+
"@crystaldesign/analytics": "25.1.0-beta.20",
|
|
33
|
+
"@crystaldesign/products-component": "25.1.0-beta.20",
|
|
34
|
+
"@crystaldesign/real-time-viewer": "25.1.0-beta.20",
|
|
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": "
|
|
46
|
+
"gitHead": "539a4915427a870c52a954f81d660a7dbd91ef72"
|
|
47
47
|
}
|