@crystaldesign/diva-seller 25.1.0-beta.3 → 25.1.0-beta.5
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 () {
|
|
@@ -6139,11 +6153,11 @@ function CheckOut(_ref) {
|
|
|
6139
6153
|
return setIsSaving(false);
|
|
6140
6154
|
});
|
|
6141
6155
|
}
|
|
6142
|
-
case
|
|
6156
|
+
case 17:
|
|
6143
6157
|
case "end":
|
|
6144
6158
|
return _context2.stop();
|
|
6145
6159
|
}
|
|
6146
|
-
}, _callee2);
|
|
6160
|
+
}, _callee2, null, [[2, 9, 13, 16]]);
|
|
6147
6161
|
}));
|
|
6148
6162
|
return function (_x, _x2, _x3) {
|
|
6149
6163
|
return _ref2.apply(this, arguments);
|
|
@@ -6686,8 +6700,7 @@ function useProduct(basket) {
|
|
|
6686
6700
|
}();
|
|
6687
6701
|
var saveProduct = /*#__PURE__*/function () {
|
|
6688
6702
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(favourite) {
|
|
6689
|
-
var _myproduct$0$parent;
|
|
6690
|
-
var myproduct;
|
|
6703
|
+
var _myproduct$0$parent, myproduct;
|
|
6691
6704
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6692
6705
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6693
6706
|
case 0:
|
|
@@ -6697,28 +6710,35 @@ function useProduct(basket) {
|
|
|
6697
6710
|
}
|
|
6698
6711
|
return _context3.abrupt("return");
|
|
6699
6712
|
case 2:
|
|
6700
|
-
_context3.
|
|
6713
|
+
_context3.prev = 2;
|
|
6714
|
+
_context3.next = 5;
|
|
6701
6715
|
return productHandler.saveProducts({
|
|
6702
6716
|
products: [currentProduct]
|
|
6703
6717
|
});
|
|
6704
|
-
case
|
|
6718
|
+
case 5:
|
|
6705
6719
|
myproduct = _context3.sent;
|
|
6706
6720
|
setCurrentProduct(_objectSpread$q(_objectSpread$q({}, myproduct[0]), {}, {
|
|
6707
6721
|
parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
|
|
6708
6722
|
}));
|
|
6709
6723
|
if (!favourite) {
|
|
6710
|
-
_context3.next =
|
|
6724
|
+
_context3.next = 10;
|
|
6711
6725
|
break;
|
|
6712
6726
|
}
|
|
6713
|
-
_context3.next =
|
|
6727
|
+
_context3.next = 10;
|
|
6714
6728
|
return productHandler.apiMarkAsFavorite(currentProduct._id, currentProduct.organizationId);
|
|
6715
|
-
case 9:
|
|
6716
|
-
setProductSaved(true);
|
|
6717
6729
|
case 10:
|
|
6730
|
+
setProductSaved(true);
|
|
6731
|
+
_context3.next = 16;
|
|
6732
|
+
break;
|
|
6733
|
+
case 13:
|
|
6734
|
+
_context3.prev = 13;
|
|
6735
|
+
_context3.t0 = _context3["catch"](2);
|
|
6736
|
+
throw new Error('Error saving product');
|
|
6737
|
+
case 16:
|
|
6718
6738
|
case "end":
|
|
6719
6739
|
return _context3.stop();
|
|
6720
6740
|
}
|
|
6721
|
-
}, _callee3);
|
|
6741
|
+
}, _callee3, null, [[2, 13]]);
|
|
6722
6742
|
}));
|
|
6723
6743
|
return function saveProduct(_x2) {
|
|
6724
6744
|
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","sourceRo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AQ,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,qBAqIP"}
|
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.5",
|
|
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.5",
|
|
33
|
+
"@crystaldesign/products-component": "25.1.0-beta.5",
|
|
34
|
+
"@crystaldesign/real-time-viewer": "25.1.0-beta.5",
|
|
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": "cc748572e68edc7ed83350a71109ee1163ec55bd"
|
|
47
47
|
}
|